I interpreted the first post as single pin input, single pin output.
I think that is correct. A 555 and either a 4017 or a 4-bit binary counter can do this, with only a small buttload of external gating, assuming that the circuit always starts in one condition. There has to be feedback, but I'm trying to do it without flipflops.
OP: Does the input stay in one state or the other while the output makes its one or two pulses, or can it change during the output pattern?
OK, I think I've got it. Differentiate both edges of the input, invert one and OR, so either edge creates a short reset pulse to the counter. The steady state of the input drives the decode gating that inhibits the counter when the cycle is finished. With a 4017, OR outputs 0 and 2 to the output stage. With a binary counter, Q0 is the output for either pattern, Q1 terminates the single pulse, Q2 terminates the double pulse. Since I'm not a 555 fan, this can be done with 1 CD4060 and 1 CD4093.
ak