#1794 — WorktreeCreate command-type returns wrong envelope

Symptom

A literal directory named {"continue":true,"suppressOutput":true}/ appears in the project root after CC fires a WorktreeCreate hook. The chdir call ENAMETOOLONGs or silently mkdirs a stringified-JSON path.

Root cause

src/hooks/src/worktree/worktree-lifecycle-logger.ts:115 returned outputPromptContext(advisory), which stamps hookEventName: 'UserPromptSubmit' on a WorktreeCreate response. CC's WorktreeCreate consumer does not read additionalContext; it falls back to using the stringified shallow envelope as a chdir target.

Defense in depth (5 layers)

  1. Call site: command-type returns outputSilentSuccess(). HTTP branch unchanged.
  2. Existing tests updated: worktree-hook-loading.test.ts asserts the new silent shape.
  3. Dispatcher guard: src/hooks/bin/output-guard.mjs + wiring in run-hook.mjs:509 strips hookEventName / additionalContext from events that don't consume them. Symmetric to the input-side isValidPath() (#1250).
  4. Roundtrip test: lifecycle-output-protocol.test.ts fires synthetic input at each lifecycle hook and asserts no wrong-event envelope.
  5. Opt-out: ORCHESTKIT_DISABLE_OUTPUT_GUARD=1 for emergency revert without rolling the package.

Verified

RUN  v4.1.3 /Users/yonatangross/coding/yonatangross/orchestkit/src/hooks

 Test Files  2 passed (2)
      Tests  26 passed | 1 skipped (27)

Closes #1794.