@with-logic/elwood 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +166 -1
- package/LICENSE +1 -1
- package/README.md +276 -13
- package/dist/claude/command.d.ts +9 -2
- package/dist/claude/command.d.ts.map +1 -1
- package/dist/claude/command.js +23 -16
- package/dist/claude/command.js.map +1 -1
- package/dist/claude/session/index.d.ts.map +1 -1
- package/dist/claude/session/index.js +5 -2
- package/dist/claude/session/index.js.map +1 -1
- package/dist/claude/session/resume.d.ts +1 -1
- package/dist/claude/session/resume.d.ts.map +1 -1
- package/dist/claude/session/resume.js +5 -1
- package/dist/claude/session/resume.js.map +1 -1
- package/dist/claude/simple.d.ts.map +1 -1
- package/dist/claude/simple.js +4 -0
- package/dist/claude/simple.js.map +1 -1
- package/dist/cli/args/index.d.ts +3 -1
- package/dist/cli/args/index.d.ts.map +1 -1
- package/dist/cli/args/index.js +10 -2
- package/dist/cli/args/index.js.map +1 -1
- package/dist/cli/args/options.d.ts.map +1 -1
- package/dist/cli/args/options.js +2 -0
- package/dist/cli/args/options.js.map +1 -1
- package/dist/cli/args-commands.d.ts +10 -0
- package/dist/cli/args-commands.d.ts.map +1 -0
- package/dist/cli/args-commands.js +113 -0
- package/dist/cli/args-commands.js.map +1 -0
- package/dist/cli/command-types.d.ts +26 -0
- package/dist/cli/command-types.d.ts.map +1 -0
- package/dist/cli/command-types.js +9 -0
- package/dist/cli/command-types.js.map +1 -0
- package/dist/cli/config/codec-primitives.d.ts +20 -0
- package/dist/cli/config/codec-primitives.d.ts.map +1 -0
- package/dist/cli/config/codec-primitives.js +51 -0
- package/dist/cli/config/codec-primitives.js.map +1 -0
- package/dist/cli/config/codec.d.ts.map +1 -1
- package/dist/cli/config/codec.js +4 -46
- package/dist/cli/config/codec.js.map +1 -1
- package/dist/cli/config/effective.d.ts.map +1 -1
- package/dist/cli/config/effective.js +1 -0
- package/dist/cli/config/effective.js.map +1 -1
- package/dist/cli/config/keys.d.ts +1 -1
- package/dist/cli/config/keys.d.ts.map +1 -1
- package/dist/cli/config/keys.js +1 -0
- package/dist/cli/config/keys.js.map +1 -1
- package/dist/cli/entry.d.ts +4 -2
- package/dist/cli/entry.d.ts.map +1 -1
- package/dist/cli/entry.js +2 -1
- package/dist/cli/entry.js.map +1 -1
- package/dist/cli/help.d.ts +2 -2
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +40 -1
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/interactive/index.d.ts +26 -0
- package/dist/cli/interactive/index.d.ts.map +1 -0
- package/dist/cli/interactive/index.js +33 -0
- package/dist/cli/interactive/index.js.map +1 -0
- package/dist/cli/interactive/launch.d.ts +14 -0
- package/dist/cli/interactive/launch.d.ts.map +1 -0
- package/dist/cli/interactive/launch.js +66 -0
- package/dist/cli/interactive/launch.js.map +1 -0
- package/dist/cli/interactive/spawn.d.ts +18 -0
- package/dist/cli/interactive/spawn.d.ts.map +1 -0
- package/dist/cli/interactive/spawn.js +32 -0
- package/dist/cli/interactive/spawn.js.map +1 -0
- package/dist/cli/main-failure.d.ts +28 -0
- package/dist/cli/main-failure.d.ts.map +1 -0
- package/dist/cli/main-failure.js +78 -0
- package/dist/cli/main-failure.js.map +1 -0
- package/dist/cli/main.d.ts +12 -4
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +27 -73
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/models/index.d.ts +20 -0
- package/dist/cli/models/index.d.ts.map +1 -0
- package/dist/cli/models/index.js +60 -0
- package/dist/cli/models/index.js.map +1 -0
- package/dist/cli/models/render.d.ts +9 -0
- package/dist/cli/models/render.d.ts.map +1 -0
- package/dist/cli/models/render.js +33 -0
- package/dist/cli/models/render.js.map +1 -0
- package/dist/cli/request/index.d.ts.map +1 -1
- package/dist/cli/request/index.js +8 -2
- package/dist/cli/request/index.js.map +1 -1
- package/dist/cli/request/posture.d.ts +28 -0
- package/dist/cli/request/posture.d.ts.map +1 -0
- package/dist/cli/request/posture.js +70 -0
- package/dist/cli/request/posture.js.map +1 -0
- package/dist/cli/request/resolution-types.d.ts +1 -0
- package/dist/cli/request/resolution-types.d.ts.map +1 -1
- package/dist/cli/request/settings.d.ts +2 -12
- package/dist/cli/request/settings.d.ts.map +1 -1
- package/dist/cli/request/settings.js +2 -25
- package/dist/cli/request/settings.js.map +1 -1
- package/dist/cli/request/validation.d.ts +12 -0
- package/dist/cli/request/validation.d.ts.map +1 -1
- package/dist/cli/request/validation.js +30 -10
- package/dist/cli/request/validation.js.map +1 -1
- package/dist/cli/request/values.d.ts +1 -0
- package/dist/cli/request/values.d.ts.map +1 -1
- package/dist/cli/request/values.js +1 -0
- package/dist/cli/request/values.js.map +1 -1
- package/dist/cli/run/index.d.ts.map +1 -1
- package/dist/cli/run/index.js +5 -41
- package/dist/cli/run/index.js.map +1 -1
- package/dist/cli/run/subscribe.d.ts +19 -0
- package/dist/cli/run/subscribe.d.ts.map +1 -0
- package/dist/cli/run/subscribe.js +47 -0
- package/dist/cli/run/subscribe.js.map +1 -0
- package/dist/cli/session/launch.d.ts +3 -0
- package/dist/cli/session/launch.d.ts.map +1 -1
- package/dist/cli/session/launch.js +11 -0
- package/dist/cli/session/launch.js.map +1 -1
- package/dist/cli/sessions/index.d.ts +23 -0
- package/dist/cli/sessions/index.d.ts.map +1 -0
- package/dist/cli/sessions/index.js +65 -0
- package/dist/cli/sessions/index.js.map +1 -0
- package/dist/cli/sessions/list.d.ts +28 -0
- package/dist/cli/sessions/list.d.ts.map +1 -0
- package/dist/cli/sessions/list.js +63 -0
- package/dist/cli/sessions/list.js.map +1 -0
- package/dist/cli/table.d.ts +7 -0
- package/dist/cli/table.d.ts.map +1 -0
- package/dist/cli/table.js +14 -0
- package/dist/cli/table.js.map +1 -0
- package/dist/cli/types.d.ts +5 -1
- package/dist/cli/types.d.ts.map +1 -1
- package/dist/cli/types.js.map +1 -1
- package/dist/codex/command.d.ts +18 -2
- package/dist/codex/command.d.ts.map +1 -1
- package/dist/codex/command.js +39 -24
- package/dist/codex/command.js.map +1 -1
- package/dist/codex/session/index.d.ts.map +1 -1
- package/dist/codex/session/index.js +5 -2
- package/dist/codex/session/index.js.map +1 -1
- package/dist/codex/session/resume.d.ts +1 -1
- package/dist/codex/session/resume.d.ts.map +1 -1
- package/dist/codex/session/resume.js +5 -1
- package/dist/codex/session/resume.js.map +1 -1
- package/dist/codex/session/types.d.ts +3 -0
- package/dist/codex/session/types.d.ts.map +1 -1
- package/dist/codex/simple.d.ts.map +1 -1
- package/dist/codex/simple.js +4 -0
- package/dist/codex/simple.js.map +1 -1
- package/dist/core/errors.d.ts +1 -1
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/errors.js.map +1 -1
- package/dist/core/high-trust.d.ts +41 -0
- package/dist/core/high-trust.d.ts.map +1 -0
- package/dist/core/high-trust.js +50 -0
- package/dist/core/high-trust.js.map +1 -0
- package/dist/core/trust/allowlist.d.ts +56 -0
- package/dist/core/trust/allowlist.d.ts.map +1 -0
- package/dist/core/{trust-prompts.js → trust/allowlist.js} +21 -38
- package/dist/core/trust/allowlist.js.map +1 -0
- package/dist/core/trust/prompts.d.ts +4 -46
- package/dist/core/trust/prompts.d.ts.map +1 -1
- package/dist/core/trust/prompts.js +2 -73
- package/dist/core/trust/prompts.js.map +1 -1
- package/dist/core/trust/responder.d.ts +2 -0
- package/dist/core/trust/responder.d.ts.map +1 -1
- package/dist/core/trust/responder.js +4 -0
- package/dist/core/trust/responder.js.map +1 -1
- package/dist/core/types.d.ts +3 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/runtime/launch-arguments.d.ts +12 -0
- package/dist/runtime/launch-arguments.d.ts.map +1 -0
- package/dist/runtime/launch-arguments.js +15 -0
- package/dist/runtime/launch-arguments.js.map +1 -0
- package/docs/cli-behavior.md +88 -0
- package/docs/cli-output.md +60 -0
- package/docs/cli.md +10 -2
- package/package.json +8 -6
- package/dist/claude/hook-dispatch.d.ts +0 -9
- package/dist/claude/hook-dispatch.d.ts.map +0 -1
- package/dist/claude/hook-dispatch.js +0 -12
- package/dist/claude/hook-dispatch.js.map +0 -1
- package/dist/claude/hook-events-extra.d.ts +0 -81
- package/dist/claude/hook-events-extra.d.ts.map +0 -1
- package/dist/claude/hook-events-extra.js +0 -6
- package/dist/claude/hook-events-extra.js.map +0 -1
- package/dist/claude/hook-events.d.ts +0 -101
- package/dist/claude/hook-events.d.ts.map +0 -1
- package/dist/claude/hook-events.js +0 -6
- package/dist/claude/hook-events.js.map +0 -1
- package/dist/claude/hook-names.d.ts +0 -24
- package/dist/claude/hook-names.d.ts.map +0 -1
- package/dist/claude/hook-names.js +0 -45
- package/dist/claude/hook-names.js.map +0 -1
- package/dist/claude/hooks.d.ts +0 -78
- package/dist/claude/hooks.d.ts.map +0 -1
- package/dist/claude/hooks.js +0 -6
- package/dist/claude/hooks.js.map +0 -1
- package/dist/claude/session-bridge.d.ts +0 -11
- package/dist/claude/session-bridge.d.ts.map +0 -1
- package/dist/claude/session-bridge.js +0 -18
- package/dist/claude/session-bridge.js.map +0 -1
- package/dist/claude/session-build.d.ts +0 -15
- package/dist/claude/session-build.d.ts.map +0 -1
- package/dist/claude/session-build.js +0 -147
- package/dist/claude/session-build.js.map +0 -1
- package/dist/claude/session-hook-handler.d.ts +0 -34
- package/dist/claude/session-hook-handler.d.ts.map +0 -1
- package/dist/claude/session-hook-handler.js +0 -42
- package/dist/claude/session-hook-handler.js.map +0 -1
- package/dist/claude/session-instance.d.ts +0 -42
- package/dist/claude/session-instance.d.ts.map +0 -1
- package/dist/claude/session-instance.js +0 -146
- package/dist/claude/session-instance.js.map +0 -1
- package/dist/claude/session-interface.d.ts +0 -49
- package/dist/claude/session-interface.d.ts.map +0 -1
- package/dist/claude/session-interface.js +0 -10
- package/dist/claude/session-interface.js.map +0 -1
- package/dist/claude/session-resume.d.ts +0 -8
- package/dist/claude/session-resume.d.ts.map +0 -1
- package/dist/claude/session-resume.js +0 -47
- package/dist/claude/session-resume.js.map +0 -1
- package/dist/claude/session-runtime.d.ts +0 -43
- package/dist/claude/session-runtime.d.ts.map +0 -1
- package/dist/claude/session-runtime.js +0 -105
- package/dist/claude/session-runtime.js.map +0 -1
- package/dist/claude/session-transcript.d.ts +0 -62
- package/dist/claude/session-transcript.d.ts.map +0 -1
- package/dist/claude/session-transcript.js +0 -88
- package/dist/claude/session-transcript.js.map +0 -1
- package/dist/claude/session.d.ts +0 -18
- package/dist/claude/session.d.ts.map +0 -1
- package/dist/claude/session.js +0 -58
- package/dist/claude/session.js.map +0 -1
- package/dist/claude/start-or-resume.d.ts +0 -12
- package/dist/claude/start-or-resume.d.ts.map +0 -1
- package/dist/claude/start-or-resume.js +0 -32
- package/dist/claude/start-or-resume.js.map +0 -1
- package/dist/claude/tool-hook-events.d.ts +0 -10
- package/dist/claude/tool-hook-events.d.ts.map +0 -1
- package/dist/claude/tool-hook-events.js +0 -18
- package/dist/claude/tool-hook-events.js.map +0 -1
- package/dist/claude/tool-types.d.ts +0 -158
- package/dist/claude/tool-types.d.ts.map +0 -1
- package/dist/claude/tool-types.js +0 -6
- package/dist/claude/tool-types.js.map +0 -1
- package/dist/claude/validate-input.d.ts +0 -8
- package/dist/claude/validate-input.d.ts.map +0 -1
- package/dist/claude/validate-input.js +0 -137
- package/dist/claude/validate-input.js.map +0 -1
- package/dist/claude/validate-permission-update.d.ts +0 -10
- package/dist/claude/validate-permission-update.d.ts.map +0 -1
- package/dist/claude/validate-permission-update.js +0 -72
- package/dist/claude/validate-permission-update.js.map +0 -1
- package/dist/claude/validate-result.d.ts +0 -7
- package/dist/claude/validate-result.d.ts.map +0 -1
- package/dist/claude/validate-result.js +0 -118
- package/dist/claude/validate-result.js.map +0 -1
- package/dist/claude/validate-shapes.d.ts +0 -22
- package/dist/claude/validate-shapes.d.ts.map +0 -1
- package/dist/claude/validate-shapes.js +0 -15
- package/dist/claude/validate-shapes.js.map +0 -1
- package/dist/claude/validate-tool-update.d.ts +0 -15
- package/dist/claude/validate-tool-update.d.ts.map +0 -1
- package/dist/claude/validate-tool-update.js +0 -122
- package/dist/claude/validate-tool-update.js.map +0 -1
- package/dist/cli/agent-detect.d.ts +0 -44
- package/dist/cli/agent-detect.d.ts.map +0 -1
- package/dist/cli/agent-detect.js +0 -66
- package/dist/cli/agent-detect.js.map +0 -1
- package/dist/cli/arg-errors.d.ts +0 -6
- package/dist/cli/arg-errors.d.ts.map +0 -1
- package/dist/cli/arg-errors.js +0 -44
- package/dist/cli/arg-errors.js.map +0 -1
- package/dist/cli/arg-options.d.ts +0 -26
- package/dist/cli/arg-options.d.ts.map +0 -1
- package/dist/cli/arg-options.js +0 -50
- package/dist/cli/arg-options.js.map +0 -1
- package/dist/cli/args.d.ts +0 -7
- package/dist/cli/args.d.ts.map +0 -1
- package/dist/cli/args.js +0 -70
- package/dist/cli/args.js.map +0 -1
- package/dist/cli/lifecycle-outcome.d.ts +0 -13
- package/dist/cli/lifecycle-outcome.d.ts.map +0 -1
- package/dist/cli/lifecycle-outcome.js +0 -20
- package/dist/cli/lifecycle-outcome.js.map +0 -1
- package/dist/cli/lifecycle.d.ts +0 -61
- package/dist/cli/lifecycle.d.ts.map +0 -1
- package/dist/cli/lifecycle.js +0 -152
- package/dist/cli/lifecycle.js.map +0 -1
- package/dist/cli/request-finalize.d.ts +0 -10
- package/dist/cli/request-finalize.d.ts.map +0 -1
- package/dist/cli/request-finalize.js +0 -135
- package/dist/cli/request-finalize.js.map +0 -1
- package/dist/cli/request-layers.d.ts +0 -30
- package/dist/cli/request-layers.d.ts.map +0 -1
- package/dist/cli/request-layers.js +0 -44
- package/dist/cli/request-layers.js.map +0 -1
- package/dist/cli/request-settings.d.ts +0 -34
- package/dist/cli/request-settings.d.ts.map +0 -1
- package/dist/cli/request-settings.js +0 -66
- package/dist/cli/request-settings.js.map +0 -1
- package/dist/cli/request-sources.d.ts +0 -13
- package/dist/cli/request-sources.d.ts.map +0 -1
- package/dist/cli/request-sources.js +0 -23
- package/dist/cli/request-sources.js.map +0 -1
- package/dist/cli/request-validation.d.ts +0 -18
- package/dist/cli/request-validation.d.ts.map +0 -1
- package/dist/cli/request-validation.js +0 -84
- package/dist/cli/request-validation.js.map +0 -1
- package/dist/cli/request-values.d.ts +0 -33
- package/dist/cli/request-values.d.ts.map +0 -1
- package/dist/cli/request-values.js +0 -73
- package/dist/cli/request-values.js.map +0 -1
- package/dist/cli/request.d.ts +0 -12
- package/dist/cli/request.d.ts.map +0 -1
- package/dist/cli/request.js +0 -103
- package/dist/cli/request.js.map +0 -1
- package/dist/cli/resolution-types.d.ts +0 -35
- package/dist/cli/resolution-types.d.ts.map +0 -1
- package/dist/cli/resolution-types.js +0 -6
- package/dist/cli/resolution-types.js.map +0 -1
- package/dist/cli/run-output-lines.d.ts +0 -14
- package/dist/cli/run-output-lines.d.ts.map +0 -1
- package/dist/cli/run-output-lines.js +0 -42
- package/dist/cli/run-output-lines.js.map +0 -1
- package/dist/cli/run-output.d.ts +0 -48
- package/dist/cli/run-output.d.ts.map +0 -1
- package/dist/cli/run-output.js +0 -150
- package/dist/cli/run-output.js.map +0 -1
- package/dist/cli/run.d.ts +0 -20
- package/dist/cli/run.d.ts.map +0 -1
- package/dist/cli/run.js +0 -126
- package/dist/cli/run.js.map +0 -1
- package/dist/cli/session-launch.d.ts +0 -23
- package/dist/cli/session-launch.d.ts.map +0 -1
- package/dist/cli/session-launch.js +0 -57
- package/dist/cli/session-launch.js.map +0 -1
- package/dist/cli/session.d.ts +0 -68
- package/dist/cli/session.d.ts.map +0 -1
- package/dist/cli/session.js +0 -124
- package/dist/cli/session.js.map +0 -1
- package/dist/codex/attach-images.d.ts +0 -20
- package/dist/codex/attach-images.d.ts.map +0 -1
- package/dist/codex/attach-images.js +0 -66
- package/dist/codex/attach-images.js.map +0 -1
- package/dist/codex/clipboard-lock.d.ts +0 -15
- package/dist/codex/clipboard-lock.d.ts.map +0 -1
- package/dist/codex/clipboard-lock.js +0 -16
- package/dist/codex/clipboard-lock.js.map +0 -1
- package/dist/codex/clipboard.d.ts +0 -32
- package/dist/codex/clipboard.d.ts.map +0 -1
- package/dist/codex/clipboard.js +0 -92
- package/dist/codex/clipboard.js.map +0 -1
- package/dist/codex/config-lock.d.ts +0 -21
- package/dist/codex/config-lock.d.ts.map +0 -1
- package/dist/codex/config-lock.js +0 -22
- package/dist/codex/config-lock.js.map +0 -1
- package/dist/codex/config-restore.d.ts +0 -33
- package/dist/codex/config-restore.d.ts.map +0 -1
- package/dist/codex/config-restore.js +0 -90
- package/dist/codex/config-restore.js.map +0 -1
- package/dist/codex/config-transaction.d.ts +0 -26
- package/dist/codex/config-transaction.d.ts.map +0 -1
- package/dist/codex/config-transaction.js +0 -47
- package/dist/codex/config-transaction.js.map +0 -1
- package/dist/codex/hook-dispatch.d.ts +0 -9
- package/dist/codex/hook-dispatch.d.ts.map +0 -1
- package/dist/codex/hook-dispatch.js +0 -14
- package/dist/codex/hook-dispatch.js.map +0 -1
- package/dist/codex/hook-names.d.ts +0 -19
- package/dist/codex/hook-names.d.ts.map +0 -1
- package/dist/codex/hook-names.js +0 -17
- package/dist/codex/hook-names.js.map +0 -1
- package/dist/codex/hooks.d.ts +0 -99
- package/dist/codex/hooks.d.ts.map +0 -1
- package/dist/codex/hooks.js +0 -6
- package/dist/codex/hooks.js.map +0 -1
- package/dist/codex/initial-ready.d.ts +0 -19
- package/dist/codex/initial-ready.d.ts.map +0 -1
- package/dist/codex/initial-ready.js +0 -19
- package/dist/codex/initial-ready.js.map +0 -1
- package/dist/codex/serialize.d.ts +0 -8
- package/dist/codex/serialize.d.ts.map +0 -1
- package/dist/codex/serialize.js +0 -48
- package/dist/codex/serialize.js.map +0 -1
- package/dist/codex/session-bridge.d.ts +0 -14
- package/dist/codex/session-bridge.d.ts.map +0 -1
- package/dist/codex/session-bridge.js +0 -20
- package/dist/codex/session-bridge.js.map +0 -1
- package/dist/codex/session-build.d.ts +0 -15
- package/dist/codex/session-build.d.ts.map +0 -1
- package/dist/codex/session-build.js +0 -144
- package/dist/codex/session-build.js.map +0 -1
- package/dist/codex/session-cleanup.d.ts +0 -12
- package/dist/codex/session-cleanup.d.ts.map +0 -1
- package/dist/codex/session-cleanup.js +0 -15
- package/dist/codex/session-cleanup.js.map +0 -1
- package/dist/codex/session-hooks.d.ts +0 -13
- package/dist/codex/session-hooks.d.ts.map +0 -1
- package/dist/codex/session-hooks.js +0 -54
- package/dist/codex/session-hooks.js.map +0 -1
- package/dist/codex/session-instance.d.ts +0 -50
- package/dist/codex/session-instance.d.ts.map +0 -1
- package/dist/codex/session-instance.js +0 -117
- package/dist/codex/session-instance.js.map +0 -1
- package/dist/codex/session-resume.d.ts +0 -7
- package/dist/codex/session-resume.d.ts.map +0 -1
- package/dist/codex/session-resume.js +0 -44
- package/dist/codex/session-resume.js.map +0 -1
- package/dist/codex/session-runtime.d.ts +0 -7
- package/dist/codex/session-runtime.d.ts.map +0 -1
- package/dist/codex/session-runtime.js +0 -10
- package/dist/codex/session-runtime.js.map +0 -1
- package/dist/codex/session-transcript.d.ts +0 -30
- package/dist/codex/session-transcript.d.ts.map +0 -1
- package/dist/codex/session-transcript.js +0 -53
- package/dist/codex/session-transcript.js.map +0 -1
- package/dist/codex/session-types.d.ts +0 -87
- package/dist/codex/session-types.d.ts.map +0 -1
- package/dist/codex/session-types.js +0 -6
- package/dist/codex/session-types.js.map +0 -1
- package/dist/codex/session-warnings.d.ts +0 -27
- package/dist/codex/session-warnings.d.ts.map +0 -1
- package/dist/codex/session-warnings.js +0 -54
- package/dist/codex/session-warnings.js.map +0 -1
- package/dist/codex/session.d.ts +0 -16
- package/dist/codex/session.d.ts.map +0 -1
- package/dist/codex/session.js +0 -61
- package/dist/codex/session.js.map +0 -1
- package/dist/codex/start-or-resume.d.ts +0 -12
- package/dist/codex/start-or-resume.d.ts.map +0 -1
- package/dist/codex/start-or-resume.js +0 -31
- package/dist/codex/start-or-resume.js.map +0 -1
- package/dist/codex/transcript/cursor-io.d.ts +0 -7
- package/dist/codex/transcript/cursor-io.d.ts.map +0 -1
- package/dist/codex/transcript/cursor-io.js +0 -7
- package/dist/codex/transcript/cursor-io.js.map +0 -1
- package/dist/codex/transcript/cursor.d.ts +0 -8
- package/dist/codex/transcript/cursor.d.ts.map +0 -1
- package/dist/codex/transcript/cursor.js +0 -8
- package/dist/codex/transcript/cursor.js.map +0 -1
- package/dist/codex/transcript/drops.d.ts +0 -9
- package/dist/codex/transcript/drops.d.ts.map +0 -1
- package/dist/codex/transcript/drops.js +0 -9
- package/dist/codex/transcript/drops.js.map +0 -1
- package/dist/codex/transcript.d.ts +0 -12
- package/dist/codex/transcript.d.ts.map +0 -1
- package/dist/codex/transcript.js +0 -10
- package/dist/codex/transcript.js.map +0 -1
- package/dist/codex/validate-result.d.ts +0 -7
- package/dist/codex/validate-result.d.ts.map +0 -1
- package/dist/codex/validate-result.js +0 -84
- package/dist/codex/validate-result.js.map +0 -1
- package/dist/codex/validate.d.ts +0 -11
- package/dist/codex/validate.d.ts.map +0 -1
- package/dist/codex/validate.js +0 -88
- package/dist/codex/validate.js.map +0 -1
- package/dist/core/activity-lifecycle.d.ts +0 -21
- package/dist/core/activity-lifecycle.d.ts.map +0 -1
- package/dist/core/activity-lifecycle.js +0 -45
- package/dist/core/activity-lifecycle.js.map +0 -1
- package/dist/core/activity-meta.d.ts +0 -13
- package/dist/core/activity-meta.d.ts.map +0 -1
- package/dist/core/activity-meta.js +0 -67
- package/dist/core/activity-meta.js.map +0 -1
- package/dist/core/activity-transcript.d.ts +0 -19
- package/dist/core/activity-transcript.d.ts.map +0 -1
- package/dist/core/activity-transcript.js +0 -60
- package/dist/core/activity-transcript.js.map +0 -1
- package/dist/core/activity.d.ts +0 -51
- package/dist/core/activity.d.ts.map +0 -1
- package/dist/core/activity.js +0 -81
- package/dist/core/activity.js.map +0 -1
- package/dist/core/control-queue-state.d.ts +0 -29
- package/dist/core/control-queue-state.d.ts.map +0 -1
- package/dist/core/control-queue-state.js +0 -95
- package/dist/core/control-queue-state.js.map +0 -1
- package/dist/core/control-queue-traits.d.ts +0 -54
- package/dist/core/control-queue-traits.d.ts.map +0 -1
- package/dist/core/control-queue-traits.js +0 -118
- package/dist/core/control-queue-traits.js.map +0 -1
- package/dist/core/control-queue-types.d.ts +0 -45
- package/dist/core/control-queue-types.d.ts.map +0 -1
- package/dist/core/control-queue-types.js +0 -7
- package/dist/core/control-queue-types.js.map +0 -1
- package/dist/core/control-queue.d.ts +0 -21
- package/dist/core/control-queue.d.ts.map +0 -1
- package/dist/core/control-queue.js +0 -98
- package/dist/core/control-queue.js.map +0 -1
- package/dist/core/list-models.d.ts +0 -44
- package/dist/core/list-models.d.ts.map +0 -1
- package/dist/core/list-models.js +0 -73
- package/dist/core/list-models.js.map +0 -1
- package/dist/core/model-picker.d.ts +0 -22
- package/dist/core/model-picker.d.ts.map +0 -1
- package/dist/core/model-picker.js +0 -58
- package/dist/core/model-picker.js.map +0 -1
- package/dist/core/model-rows.d.ts +0 -21
- package/dist/core/model-rows.d.ts.map +0 -1
- package/dist/core/model-rows.js +0 -57
- package/dist/core/model-rows.js.map +0 -1
- package/dist/core/probe-state.d.ts +0 -21
- package/dist/core/probe-state.d.ts.map +0 -1
- package/dist/core/probe-state.js +0 -39
- package/dist/core/probe-state.js.map +0 -1
- package/dist/core/session-input-abort.d.ts +0 -10
- package/dist/core/session-input-abort.d.ts.map +0 -1
- package/dist/core/session-input-abort.js +0 -44
- package/dist/core/session-input-abort.js.map +0 -1
- package/dist/core/session-input.d.ts +0 -37
- package/dist/core/session-input.d.ts.map +0 -1
- package/dist/core/session-input.js +0 -154
- package/dist/core/session-input.js.map +0 -1
- package/dist/core/session-warnings.d.ts +0 -20
- package/dist/core/session-warnings.d.ts.map +0 -1
- package/dist/core/session-warnings.js +0 -32
- package/dist/core/session-warnings.js.map +0 -1
- package/dist/core/simple/loop-controls.d.ts +0 -7
- package/dist/core/simple/loop-controls.d.ts.map +0 -1
- package/dist/core/simple/loop-controls.js +0 -7
- package/dist/core/simple/loop-controls.js.map +0 -1
- package/dist/core/startup-automation.d.ts +0 -54
- package/dist/core/startup-automation.d.ts.map +0 -1
- package/dist/core/startup-automation.js +0 -40
- package/dist/core/startup-automation.js.map +0 -1
- package/dist/core/startup-frame.d.ts +0 -39
- package/dist/core/startup-frame.d.ts.map +0 -1
- package/dist/core/startup-frame.js +0 -60
- package/dist/core/startup-frame.js.map +0 -1
- package/dist/core/startup-write.d.ts +0 -47
- package/dist/core/startup-write.d.ts.map +0 -1
- package/dist/core/startup-write.js +0 -73
- package/dist/core/startup-write.js.map +0 -1
- package/dist/core/trust-blocking.d.ts +0 -22
- package/dist/core/trust-blocking.d.ts.map +0 -1
- package/dist/core/trust-blocking.js +0 -38
- package/dist/core/trust-blocking.js.map +0 -1
- package/dist/core/trust-prompts.d.ts +0 -135
- package/dist/core/trust-prompts.d.ts.map +0 -1
- package/dist/core/trust-prompts.js.map +0 -1
- package/dist/core/trust-responder.d.ts +0 -48
- package/dist/core/trust-responder.d.ts.map +0 -1
- package/dist/core/trust-responder.js +0 -119
- package/dist/core/trust-responder.js.map +0 -1
- package/dist/core/tui-screen.d.ts +0 -21
- package/dist/core/tui-screen.d.ts.map +0 -1
- package/dist/core/tui-screen.js +0 -56
- package/dist/core/tui-screen.js.map +0 -1
- package/dist/core/update-warning.d.ts +0 -25
- package/dist/core/update-warning.d.ts.map +0 -1
- package/dist/core/update-warning.js +0 -33
- package/dist/core/update-warning.js.map +0 -1
- package/dist/core/warning-lifecycle.d.ts +0 -23
- package/dist/core/warning-lifecycle.d.ts.map +0 -1
- package/dist/core/warning-lifecycle.js +0 -6
- package/dist/core/warning-lifecycle.js.map +0 -1
- package/dist/core/warning-reasons.d.ts +0 -62
- package/dist/core/warning-reasons.d.ts.map +0 -1
- package/dist/core/warning-reasons.js +0 -121
- package/dist/core/warning-reasons.js.map +0 -1
- package/dist/core/warnings.d.ts +0 -145
- package/dist/core/warnings.d.ts.map +0 -1
- package/dist/core/warnings.js +0 -12
- package/dist/core/warnings.js.map +0 -1
- package/dist/runtime/cleanup-latch.d.ts +0 -27
- package/dist/runtime/cleanup-latch.d.ts.map +0 -1
- package/dist/runtime/cleanup-latch.js +0 -43
- package/dist/runtime/cleanup-latch.js.map +0 -1
- package/dist/runtime/initial-ready-advance.d.ts +0 -22
- package/dist/runtime/initial-ready-advance.d.ts.map +0 -1
- package/dist/runtime/initial-ready-advance.js +0 -39
- package/dist/runtime/initial-ready-advance.js.map +0 -1
- package/dist/runtime/initial-ready-fallback.d.ts +0 -12
- package/dist/runtime/initial-ready-fallback.d.ts.map +0 -1
- package/dist/runtime/initial-ready-fallback.js +0 -20
- package/dist/runtime/initial-ready-fallback.js.map +0 -1
- package/dist/runtime/initial-ready.d.ts +0 -49
- package/dist/runtime/initial-ready.d.ts.map +0 -1
- package/dist/runtime/initial-ready.js +0 -81
- package/dist/runtime/initial-ready.js.map +0 -1
- package/dist/runtime/reap-tree.d.ts +0 -62
- package/dist/runtime/reap-tree.d.ts.map +0 -1
- package/dist/runtime/reap-tree.js +0 -108
- package/dist/runtime/reap-tree.js.map +0 -1
- package/dist/runtime/session-base-types.d.ts +0 -36
- package/dist/runtime/session-base-types.d.ts.map +0 -1
- package/dist/runtime/session-base-types.js +0 -14
- package/dist/runtime/session-base-types.js.map +0 -1
- package/dist/runtime/session-base.d.ts +0 -48
- package/dist/runtime/session-base.d.ts.map +0 -1
- package/dist/runtime/session-base.js +0 -76
- package/dist/runtime/session-base.js.map +0 -1
- package/dist/runtime/session-commands.d.ts +0 -43
- package/dist/runtime/session-commands.d.ts.map +0 -1
- package/dist/runtime/session-commands.js +0 -52
- package/dist/runtime/session-commands.js.map +0 -1
- package/dist/runtime/session-exit.d.ts +0 -16
- package/dist/runtime/session-exit.d.ts.map +0 -1
- package/dist/runtime/session-exit.js +0 -32
- package/dist/runtime/session-exit.js.map +0 -1
- package/dist/runtime/session-image-attach.d.ts +0 -45
- package/dist/runtime/session-image-attach.d.ts.map +0 -1
- package/dist/runtime/session-image-attach.js +0 -82
- package/dist/runtime/session-image-attach.js.map +0 -1
- package/dist/runtime/session-lifecycle.d.ts +0 -61
- package/dist/runtime/session-lifecycle.d.ts.map +0 -1
- package/dist/runtime/session-lifecycle.js +0 -164
- package/dist/runtime/session-lifecycle.js.map +0 -1
- package/dist/runtime/session-loops.d.ts +0 -32
- package/dist/runtime/session-loops.d.ts.map +0 -1
- package/dist/runtime/session-loops.js +0 -62
- package/dist/runtime/session-loops.js.map +0 -1
- package/dist/runtime/session-readiness.d.ts +0 -18
- package/dist/runtime/session-readiness.d.ts.map +0 -1
- package/dist/runtime/session-readiness.js +0 -22
- package/dist/runtime/session-readiness.js.map +0 -1
- package/dist/runtime/session-reap.d.ts +0 -28
- package/dist/runtime/session-reap.d.ts.map +0 -1
- package/dist/runtime/session-reap.js +0 -51
- package/dist/runtime/session-reap.js.map +0 -1
- package/dist/runtime/session-resize.d.ts +0 -20
- package/dist/runtime/session-resize.d.ts.map +0 -1
- package/dist/runtime/session-resize.js +0 -26
- package/dist/runtime/session-resize.js.map +0 -1
- package/dist/runtime/session-shutdown-binding.d.ts +0 -30
- package/dist/runtime/session-shutdown-binding.d.ts.map +0 -1
- package/dist/runtime/session-shutdown-binding.js +0 -37
- package/dist/runtime/session-shutdown-binding.js.map +0 -1
- package/dist/runtime/session-shutdown.d.ts +0 -60
- package/dist/runtime/session-shutdown.d.ts.map +0 -1
- package/dist/runtime/session-shutdown.js +0 -140
- package/dist/runtime/session-shutdown.js.map +0 -1
- package/dist/runtime/session-status-wiring.d.ts +0 -38
- package/dist/runtime/session-status-wiring.d.ts.map +0 -1
- package/dist/runtime/session-status-wiring.js +0 -41
- package/dist/runtime/session-status-wiring.js.map +0 -1
- package/dist/runtime/session-status.d.ts +0 -7
- package/dist/runtime/session-status.d.ts.map +0 -1
- package/dist/runtime/session-status.js +0 -22
- package/dist/runtime/session-status.js.map +0 -1
- package/dist/runtime/shutdown-coordinator.d.ts +0 -57
- package/dist/runtime/shutdown-coordinator.d.ts.map +0 -1
- package/dist/runtime/shutdown-coordinator.js +0 -77
- package/dist/runtime/shutdown-coordinator.js.map +0 -1
- package/dist/runtime/startup-buffer.d.ts +0 -33
- package/dist/runtime/startup-buffer.d.ts.map +0 -1
- package/dist/runtime/startup-buffer.js +0 -53
- package/dist/runtime/startup-buffer.js.map +0 -1
- package/dist/runtime/startup-cleanup.d.ts +0 -43
- package/dist/runtime/startup-cleanup.d.ts.map +0 -1
- package/dist/runtime/startup-cleanup.js +0 -89
- package/dist/runtime/startup-cleanup.js.map +0 -1
- package/dist/runtime/startup.d.ts +0 -17
- package/dist/runtime/startup.d.ts.map +0 -1
- package/dist/runtime/startup.js +0 -47
- package/dist/runtime/startup.js.map +0 -1
- package/dist/runtime/status-emit.d.ts +0 -14
- package/dist/runtime/status-emit.d.ts.map +0 -1
- package/dist/runtime/status-emit.js +0 -15
- package/dist/runtime/status-emit.js.map +0 -1
- package/dist/runtime/teardown.d.ts +0 -15
- package/dist/runtime/teardown.d.ts.map +0 -1
- package/dist/runtime/teardown.js +0 -40
- package/dist/runtime/teardown.js.map +0 -1
- package/dist/runtime/terminate.d.ts +0 -22
- package/dist/runtime/terminate.d.ts.map +0 -1
- package/dist/runtime/terminate.js +0 -129
- package/dist/runtime/terminate.js.map +0 -1
- package/dist/runtime/update-lock.d.ts +0 -19
- package/dist/runtime/update-lock.d.ts.map +0 -1
- package/dist/runtime/update-lock.js +0 -183
- package/dist/runtime/update-lock.js.map +0 -1
- package/dist/runtime/update-once.d.ts +0 -40
- package/dist/runtime/update-once.d.ts.map +0 -1
- package/dist/runtime/update-once.js +0 -88
- package/dist/runtime/update-once.js.map +0 -1
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared PTY input submission helpers for adapter sessions.
|
|
3
|
-
* Implements PRD §5.3 prompt and command submission semantics (C-API-31).
|
|
4
|
-
*/
|
|
5
|
-
import { clearStagedComposer, throwIfInputAborted, waitForInput, } from "./session-input-abort.js";
|
|
6
|
-
export const commandEnterDelayMs = 150;
|
|
7
|
-
export const pasteSettleDelayMs = 150;
|
|
8
|
-
export const pasteNudgeDelayMs = 1_000;
|
|
9
|
-
export const pasteNudgeAttempts = 2;
|
|
10
|
-
/** How often the submitting Enter re-checks a blocking dialog before firing. */
|
|
11
|
-
export const blockedPollMs = 50;
|
|
12
|
-
/** Explicitly best-effort input for startup/recovery automation. */
|
|
13
|
-
export function ignoreInputFailure(input) {
|
|
14
|
-
void Promise.resolve(input).catch(() => undefined);
|
|
15
|
-
}
|
|
16
|
-
// C0 (\u0000-\u001f) and C1 (\u007f-\u009f) control chars EXCEPT tab,
|
|
17
|
-
// newline, and carriage return, which are legitimate multi-line whitespace.
|
|
18
|
-
// Stripping ESC (\u001b) alone already defuses the ESC[200~ / ESC[201~
|
|
19
|
-
// bracketed-paste sentinels, leaving only inert `[20x~` text.
|
|
20
|
-
// biome-ignore lint/suspicious/noControlCharactersInRegex: neutralizing control input is the point.
|
|
21
|
-
const pasteUnsafe = /[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f-\u009f]/g;
|
|
22
|
-
/**
|
|
23
|
-
* Neutralizes caller/model text before it is framed as a bracketed paste (§5.3).
|
|
24
|
-
* Message text is data, so an embedded `ESC[201~` end sentinel (or a bare control
|
|
25
|
-
* byte) MUST NOT terminate paste mode early and turn following bytes into live
|
|
26
|
-
* keystrokes — e.g. an Enter that confirms a permission dialog. Tab, newline, and
|
|
27
|
-
* carriage return survive as legitimate multi-line text; everything else is
|
|
28
|
-
* stripped. `sendKeys` is the raw escape hatch and never goes through here.
|
|
29
|
-
*/
|
|
30
|
-
export function sanitizePasteText(text) {
|
|
31
|
-
return text.replace(pasteUnsafe, "");
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Writes a bracketed paste and submits it.
|
|
35
|
-
*
|
|
36
|
-
* The TUIs ingest bracketed pastes asynchronously; an Enter concatenated into
|
|
37
|
-
* the same PTY write races that ingestion and can be dropped, leaving the prompt
|
|
38
|
-
* staged but never submitted (long personas hit this reliably). The Enter
|
|
39
|
-
* therefore follows as a separate keystroke after a settle delay, and bounded
|
|
40
|
-
* re-Enters fire while the screen still shows staged content — a lone Enter from
|
|
41
|
-
* the staged state submits, and a surplus Enter on an empty composer is a no-op,
|
|
42
|
-
* so the recovery is safe on both adapters.
|
|
43
|
-
*
|
|
44
|
-
* While a blocking human-decision dialog is on screen, the WHOLE submission is
|
|
45
|
-
* held: neither the paste nor any Enter reaches the terminal until the dialog
|
|
46
|
-
* clears, so caller/model text can never be interpreted as the dialog's
|
|
47
|
-
* shortcuts or confirm its highlighted option (C-API-37 dialog safety). Paste
|
|
48
|
-
* text is sanitized first so an embedded end sentinel or control byte cannot
|
|
49
|
-
* escape paste mode into live keystrokes (§5.3).
|
|
50
|
-
*
|
|
51
|
-
* The returned promise resolves once the first submitting Enter has been
|
|
52
|
-
* dispatched (after the settle delay), so the control queue does not drain the
|
|
53
|
-
* next operation into the composer before this prompt has actually been
|
|
54
|
-
* submitted. Bounded recovery re-Enters continue in the background afterwards
|
|
55
|
-
* and are idempotent.
|
|
56
|
-
*/
|
|
57
|
-
async function writePastedPrompt(terminal, prompt, guard, signal, settleDelayMs = pasteSettleDelayMs, nudgeDelayMs = pasteNudgeDelayMs) {
|
|
58
|
-
// Hold the WHOLE submission — paste included — while a blocking dialog is on
|
|
59
|
-
// screen. A dialog can appear before an overtaking guidance's paste dispatches;
|
|
60
|
-
// pasting caller/model text into it risks the TUI interpreting shortcuts, so no
|
|
61
|
-
// bytes may reach a dialog until it clears (C-API-37 dialog safety). Only await
|
|
62
|
-
// when actually blocked, so the common path still writes the paste synchronously.
|
|
63
|
-
if (guard?.blocked?.())
|
|
64
|
-
await waitWhileBlocked(guard, signal);
|
|
65
|
-
throwIfInputAborted(signal);
|
|
66
|
-
// Sanitize: caller/model text is data, so an embedded end sentinel or control
|
|
67
|
-
// byte must not escape paste mode into live keystrokes (§5.3).
|
|
68
|
-
await terminal.sendInput(`\u001b[200~${sanitizePasteText(prompt)}\u001b[201~`);
|
|
69
|
-
const schedule = (work, ms) => {
|
|
70
|
-
const timer = setTimeout(work, ms);
|
|
71
|
-
timer.unref?.();
|
|
72
|
-
};
|
|
73
|
-
let nudges = 0;
|
|
74
|
-
const nudge = async () => {
|
|
75
|
-
// Stop once a LATER submission has begun: a stale nudge must never fire an
|
|
76
|
-
// Enter into a newer prompt's paste (the staged chip is not prompt-specific).
|
|
77
|
-
if (signal?.aborted || !guard || nudges >= pasteNudgeAttempts)
|
|
78
|
-
return;
|
|
79
|
-
// A dialog that appears after the first Enter must not be confirmed by a
|
|
80
|
-
// recovery Enter either; skip this attempt and re-check on the next tick.
|
|
81
|
-
if (guard.blocked?.()) {
|
|
82
|
-
schedule(nudge, nudgeDelayMs);
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
nudges += 1;
|
|
86
|
-
if (!guard.staged(guard.snapshot(), prompt))
|
|
87
|
-
return;
|
|
88
|
-
try {
|
|
89
|
-
await terminal.sendInput("\r");
|
|
90
|
-
}
|
|
91
|
-
catch {
|
|
92
|
-
// Recovery nudges are best-effort after the first Enter already landed.
|
|
93
|
-
}
|
|
94
|
-
schedule(nudge, nudgeDelayMs);
|
|
95
|
-
};
|
|
96
|
-
try {
|
|
97
|
-
await waitForInput(settleDelayMs, signal);
|
|
98
|
-
// Hold the submitting Enter while a blocking dialog is on screen: firing it
|
|
99
|
-
// would confirm the dialog's highlighted option instead of submitting the
|
|
100
|
-
// staged paste (C-API-37 dialog safety). The paste stays staged behind the
|
|
101
|
-
// dialog and submits once it clears.
|
|
102
|
-
await waitWhileBlocked(guard, signal);
|
|
103
|
-
throwIfInputAborted(signal);
|
|
104
|
-
await terminal.sendInput("\r");
|
|
105
|
-
}
|
|
106
|
-
catch (error) {
|
|
107
|
-
if (signal?.aborted)
|
|
108
|
-
await clearStagedComposer(terminal);
|
|
109
|
-
throw error;
|
|
110
|
-
}
|
|
111
|
-
schedule(nudge, nudgeDelayMs);
|
|
112
|
-
}
|
|
113
|
-
function waitWhileBlocked(guard, signal) {
|
|
114
|
-
if (!guard?.blocked?.())
|
|
115
|
-
return Promise.resolve();
|
|
116
|
-
return new Promise((resolve) => {
|
|
117
|
-
const poll = () => {
|
|
118
|
-
if (signal?.aborted) {
|
|
119
|
-
resolve();
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
if (!guard.blocked?.()) {
|
|
123
|
-
resolve();
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
126
|
-
const timer = setTimeout(poll, blockedPollMs);
|
|
127
|
-
timer.unref?.();
|
|
128
|
-
};
|
|
129
|
-
const timer = setTimeout(poll, blockedPollMs);
|
|
130
|
-
timer.unref?.();
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
export async function writeQueuedInput(terminal, input, mode, guard, signal, enterDelayMs = commandEnterDelayMs) {
|
|
134
|
-
// Dispatch through a Record keyed by ControlSubmitMode: a new mode must add an
|
|
135
|
-
// entry here or the object fails to type-check, so it can never silently reuse
|
|
136
|
-
// pasted-input behavior. The map has no unreachable default arm, so 100%
|
|
137
|
-
// coverage holds (both entries are exercised).
|
|
138
|
-
const submitters = {
|
|
139
|
-
// Resolve only after the input's submitting Enter has dispatched, so the next
|
|
140
|
-
// queued operation cannot write into the composer first (FIFO).
|
|
141
|
-
pasted_input: () => writePastedPrompt(terminal, input, guard, signal),
|
|
142
|
-
// Slash-command popups (Codex) swallow an Enter that arrives in the same PTY
|
|
143
|
-
// chunk as the command text, so Enter follows as a separate keystroke. The
|
|
144
|
-
// returned promise resolves only after that Enter is dispatched, so a queued
|
|
145
|
-
// command's Enter always lands before the next operation writes.
|
|
146
|
-
command: async () => {
|
|
147
|
-
await terminal.sendInput(input);
|
|
148
|
-
await waitForInput(enterDelayMs, signal);
|
|
149
|
-
await terminal.sendInput("\r");
|
|
150
|
-
},
|
|
151
|
-
};
|
|
152
|
-
await submitters[mode]();
|
|
153
|
-
}
|
|
154
|
-
//# sourceMappingURL=session-input.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"session-input.js","sourceRoot":"","sources":["../../src/core/session-input.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared live-only warning emission for all adapter sessions.
|
|
3
|
-
* Implements PRD §5.7: a warning is emitted ONCE when observed, as a `warning`
|
|
4
|
-
* event plus its `activity`, and is never persisted, replayed, deduplicated, or
|
|
5
|
-
* counted. This mirrors the human experience — a banner flashes live, then it's gone.
|
|
6
|
-
*/
|
|
7
|
-
import { type ElwoodActivityEvent } from "./activity.ts";
|
|
8
|
-
import type { ElwoodWarningEvent } from "./types.ts";
|
|
9
|
-
/**
|
|
10
|
-
* Separately-typed emit callbacks for the two events a warning produces. Each
|
|
11
|
-
* adapter supplies its own emitter's `emit` bound to the correlated event name,
|
|
12
|
-
* so a mismatch between an adapter's event map and these payload types is a
|
|
13
|
-
* compile error at the call site — no unchecked cast bridges the two.
|
|
14
|
-
*/
|
|
15
|
-
export type WarningEmit = {
|
|
16
|
-
readonly warning: (event: ElwoodWarningEvent) => void;
|
|
17
|
-
readonly activity: (event: ElwoodActivityEvent) => void;
|
|
18
|
-
};
|
|
19
|
-
export declare function emitSessionWarnings(warnings: readonly ElwoodWarningEvent[], emit: WarningEmit): void;
|
|
20
|
-
//# sourceMappingURL=session-warnings.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"session-warnings.d.ts","sourceRoot":"","sources":["../../src/core/session-warnings.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAuB,KAAK,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAC9E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAErD;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACtD,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAC;CACzD,CAAC;AAEF,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,SAAS,kBAAkB,EAAE,EACvC,IAAI,EAAE,WAAW,GAChB,IAAI,CAYN"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared live-only warning emission for all adapter sessions.
|
|
3
|
-
* Implements PRD §5.7: a warning is emitted ONCE when observed, as a `warning`
|
|
4
|
-
* event plus its `activity`, and is never persisted, replayed, deduplicated, or
|
|
5
|
-
* counted. This mirrors the human experience — a banner flashes live, then it's gone.
|
|
6
|
-
*/
|
|
7
|
-
import { activityFromWarning } from "./activity.js";
|
|
8
|
-
export function emitSessionWarnings(warnings, emit) {
|
|
9
|
-
// EVERY warning (and both of its two events) is attempted, even if an earlier
|
|
10
|
-
// listener throws — a throwing listener for warning #1 must not silently drop
|
|
11
|
-
// warnings #2+, whose identities/buffer were already consumed upstream and cannot
|
|
12
|
-
// be recovered. The FIRST error is retained and rethrown only after the whole batch
|
|
13
|
-
// fired, so an enclosing boundary still sees a failure without losing siblings.
|
|
14
|
-
let firstError;
|
|
15
|
-
for (const warning of warnings) {
|
|
16
|
-
firstError = deliver(() => emit.warning(warning), firstError);
|
|
17
|
-
firstError = deliver(() => emit.activity(activityFromWarning(warning)), firstError);
|
|
18
|
-
}
|
|
19
|
-
if (firstError !== undefined)
|
|
20
|
-
throw firstError;
|
|
21
|
-
}
|
|
22
|
-
/** Run a fan-out step; return the FIRST error seen so both steps always run. */
|
|
23
|
-
function deliver(step, prior) {
|
|
24
|
-
try {
|
|
25
|
-
step();
|
|
26
|
-
return prior;
|
|
27
|
-
}
|
|
28
|
-
catch (error) {
|
|
29
|
-
return prior ?? error;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=session-warnings.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"session-warnings.js","sourceRoot":"","sources":["../../src/core/session-warnings.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,mBAAmB,EAA4B,MAAM,eAAe,CAAC;AAc9E,MAAM,UAAU,mBAAmB,CACjC,QAAuC,EACvC,IAAiB;IAEjB,8EAA8E;IAC9E,8EAA8E;IAC9E,kFAAkF;IAClF,oFAAoF;IACpF,gFAAgF;IAChF,IAAI,UAAmB,CAAC;IACxB,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,UAAU,CAAC,CAAC;QAC9D,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;IACtF,CAAC;IACD,IAAI,UAAU,KAAK,SAAS;QAAE,MAAM,UAAU,CAAC;AACjD,CAAC;AAED,gFAAgF;AAChF,SAAS,OAAO,CAAC,IAAgB,EAAE,KAAe;IAChD,IAAI,CAAC;QACH,IAAI,EAAE,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,KAAK,IAAI,KAAK,CAAC;IACxB,CAAC;AACH,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Import-path shim: `LoopControls` now lives in `core/loops/loop-controls.ts` (it is a loop
|
|
3
|
-
* contract, not an ergonomic-session concern). Kept only until the adapter session interfaces
|
|
4
|
-
* switch their import; new code must import from `../loops/loop-controls.ts`.
|
|
5
|
-
*/
|
|
6
|
-
export type { LoopControls } from "../loops/loop-controls.ts";
|
|
7
|
-
//# sourceMappingURL=loop-controls.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loop-controls.d.ts","sourceRoot":"","sources":["../../../src/core/simple/loop-controls.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Import-path shim: `LoopControls` now lives in `core/loops/loop-controls.ts` (it is a loop
|
|
3
|
-
* contract, not an ergonomic-session concern). Kept only until the adapter session interfaces
|
|
4
|
-
* switch their import; new code must import from `../loops/loop-controls.ts`.
|
|
5
|
-
*/
|
|
6
|
-
export {};
|
|
7
|
-
//# sourceMappingURL=loop-controls.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loop-controls.js","sourceRoot":"","sources":["../../../src/core/simple/loop-controls.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Emits activity for automated startup prompt responses.
|
|
3
|
-
* Implements PRD §5.4 and C-API-18.
|
|
4
|
-
*/
|
|
5
|
-
import type { ElwoodActivityEvent, ElwoodAgentKind } from "./activity.ts";
|
|
6
|
-
import type { TrustPromptIdFor } from "./trust-prompts.ts";
|
|
7
|
-
export type { TrustPromptIdFor } from "./trust-prompts.ts";
|
|
8
|
-
/**
|
|
9
|
-
* The single source of truth for the non-trust startup-prompt labels, keyed by
|
|
10
|
-
* owning agent: the browser-tools onboarding decline is Claude-only (C-CLAUDE-11)
|
|
11
|
-
* and the skip-update prompt is Codex-only (C-CODEX-12). Every non-trust union
|
|
12
|
-
* and the runtime label set below are DERIVED from this table, so they cannot
|
|
13
|
-
* drift from each other or from the §5.4 label contract. Adding an agent's label
|
|
14
|
-
* here automatically extends both the type and the validator.
|
|
15
|
-
*/
|
|
16
|
-
declare const nonTrustStartupLabels: {
|
|
17
|
-
readonly claude: readonly ["browser_tools"];
|
|
18
|
-
readonly codex: readonly ["update"];
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* The non-trust startup-prompt labels for one agent, derived from the table so
|
|
22
|
-
* each impossible pairing (Claude + `update`, Codex + `browser_tools`) stays
|
|
23
|
-
* unrepresentable, matching the §5.4 label table exactly.
|
|
24
|
-
*/
|
|
25
|
-
type NonTrustStartupLabel<A extends ElwoodAgentKind> = (typeof nonTrustStartupLabels)[A][number];
|
|
26
|
-
/**
|
|
27
|
-
* Every startup-prompt label for one agent: its own allowlisted trust ids plus
|
|
28
|
-
* its own non-trust prompts. Matches the PRD's exact per-agent label contract
|
|
29
|
-
* (§5.4) so a second implementation and this type can never drift.
|
|
30
|
-
*/
|
|
31
|
-
export type StartupPromptLabelFor<A extends ElwoodAgentKind> = TrustPromptIdFor<A> | NonTrustStartupLabel<A>;
|
|
32
|
-
/**
|
|
33
|
-
* The outcome of handling a startup prompt for agent `A`, discriminated so the
|
|
34
|
-
* two states cannot be confused: an `answered` prompt ALWAYS carries the `input`
|
|
35
|
-
* sent and is labeled with any of the agent's startup labels, while an
|
|
36
|
-
* `option_pending` prompt (recognized allowlisted trust prompt whose affirmative
|
|
37
|
-
* option has not rendered yet — a TRANSIENT render delay, C-CLAUDE-14) NEVER
|
|
38
|
-
* carries an input and is limited to the agent's TRUST ids (a non-trust prompt
|
|
39
|
-
* like `browser_tools`/`update` is never "recognized but option-pending"). Both
|
|
40
|
-
* correlate the label to `A`, so an off-agent or impossible label does not compile.
|
|
41
|
-
*/
|
|
42
|
-
export type StartupPromptOutcome<A extends ElwoodAgentKind = ElwoodAgentKind> = {
|
|
43
|
-
readonly kind: "answered";
|
|
44
|
-
readonly prompt: StartupPromptLabelFor<A>;
|
|
45
|
-
readonly input: string;
|
|
46
|
-
} | {
|
|
47
|
-
readonly kind: "option_pending";
|
|
48
|
-
readonly prompt: TrustPromptIdFor<A>;
|
|
49
|
-
};
|
|
50
|
-
export type StartupActivityEmitter = {
|
|
51
|
-
emit(event: "activity", payload: ElwoodActivityEvent): void;
|
|
52
|
-
};
|
|
53
|
-
export declare function emitStartupPromptActivity<A extends ElwoodAgentKind>(emitter: StartupActivityEmitter, agent: A, elwoodSessionId: string, automation: StartupPromptOutcome<A>): void;
|
|
54
|
-
//# sourceMappingURL=startup-automation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"startup-automation.d.ts","sourceRoot":"","sources":["../../src/core/startup-automation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D;;;;;;;GAOG;AACH,QAAA,MAAM,qBAAqB;;;CAGoC,CAAC;AAEhE;;;;GAIG;AACH,KAAK,oBAAoB,CAAC,CAAC,SAAS,eAAe,IAAI,CAAC,OAAO,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjG;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,CAAC,CAAC,SAAS,eAAe,IACvD,gBAAgB,CAAC,CAAC,CAAC,GACnB,oBAAoB,CAAC,CAAC,CAAC,CAAC;AAE5B;;;;;;;;;GASG;AACH,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,eAAe,GAAG,eAAe,IACxE;IAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAChG;IAAE,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAA;CAAE,CAAC;AAE9E,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAC;CAC7D,CAAC;AA2BF,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,eAAe,EACjE,OAAO,EAAE,sBAAsB,EAC/B,KAAK,EAAE,CAAC,EACR,eAAe,EAAE,MAAM,EACvB,UAAU,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAClC,IAAI,CAEN"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Emits activity for automated startup prompt responses.
|
|
3
|
-
* Implements PRD §5.4 and C-API-18.
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* The single source of truth for the non-trust startup-prompt labels, keyed by
|
|
7
|
-
* owning agent: the browser-tools onboarding decline is Claude-only (C-CLAUDE-11)
|
|
8
|
-
* and the skip-update prompt is Codex-only (C-CODEX-12). Every non-trust union
|
|
9
|
-
* and the runtime label set below are DERIVED from this table, so they cannot
|
|
10
|
-
* drift from each other or from the §5.4 label contract. Adding an agent's label
|
|
11
|
-
* here automatically extends both the type and the validator.
|
|
12
|
-
*/
|
|
13
|
-
const nonTrustStartupLabels = {
|
|
14
|
-
claude: ["browser_tools"],
|
|
15
|
-
codex: ["update"],
|
|
16
|
-
};
|
|
17
|
-
function activityFromStartupPrompt(agent, elwoodSessionId, automation) {
|
|
18
|
-
if (automation.kind === "option_pending") {
|
|
19
|
-
return {
|
|
20
|
-
elwoodSessionId,
|
|
21
|
-
agent,
|
|
22
|
-
source: "terminal",
|
|
23
|
-
kind: "attention",
|
|
24
|
-
label: automation.prompt,
|
|
25
|
-
text: `Recognized ${agent} ${automation.prompt} prompt; affirmative option not rendered yet, awaiting a later frame.`,
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
return {
|
|
29
|
-
elwoodSessionId,
|
|
30
|
-
agent,
|
|
31
|
-
source: "terminal",
|
|
32
|
-
kind: "startup_prompt",
|
|
33
|
-
label: automation.prompt,
|
|
34
|
-
text: `Detected ${agent} ${automation.prompt} prompt; sent ${automation.input}.`,
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
export function emitStartupPromptActivity(emitter, agent, elwoodSessionId, automation) {
|
|
38
|
-
emitter.emit("activity", activityFromStartupPrompt(agent, elwoodSessionId, automation));
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=startup-automation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"startup-automation.js","sourceRoot":"","sources":["../../src/core/startup-automation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH;;;;;;;GAOG;AACH,MAAM,qBAAqB,GAAG;IAC5B,MAAM,EAAE,CAAC,eAAe,CAAC;IACzB,KAAK,EAAE,CAAC,QAAQ,CAAC;CAC4C,CAAC;AAoChE,SAAS,yBAAyB,CAChC,KAAQ,EACR,eAAuB,EACvB,UAAmC;IAEnC,IAAI,UAAU,CAAC,IAAI,KAAK,gBAAgB,EAAE,CAAC;QACzC,OAAO;YACL,eAAe;YACf,KAAK;YACL,MAAM,EAAE,UAAU;YAClB,IAAI,EAAE,WAAW;YACjB,KAAK,EAAE,UAAU,CAAC,MAAM;YACxB,IAAI,EAAE,cAAc,KAAK,IAAI,UAAU,CAAC,MAAM,uEAAuE;SACtH,CAAC;IACJ,CAAC;IACD,OAAO;QACL,eAAe;QACf,KAAK;QACL,MAAM,EAAE,UAAU;QAClB,IAAI,EAAE,gBAAgB;QACtB,KAAK,EAAE,UAAU,CAAC,MAAM;QACxB,IAAI,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,MAAM,iBAAiB,UAAU,CAAC,KAAK,GAAG;KACjF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,yBAAyB,CACvC,OAA+B,EAC/B,KAAQ,EACR,eAAuB,EACvB,UAAmC;IAEnC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,yBAAyB,CAAC,KAAK,EAAE,eAAe,EAAE,UAAU,CAAC,CAAC,CAAC;AAC1F,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared startup-frame helpers keeping telemetry off the critical frame path.
|
|
3
|
-
* Implements PRD §5.7/§9.1 (C-API-14, C-API-37): a warning is TELEMETRY and must
|
|
4
|
-
* never control session progress. On the hot terminal-frame callback a throwing
|
|
5
|
-
* `warning`/`activity` listener must not skip the rest of the frame (readiness
|
|
6
|
-
* detection, prompt automation, login/attention detection, `terminal:data`), and the
|
|
7
|
-
* preflight/version warning must reach a caller that subscribes in the same turn it
|
|
8
|
-
* receives the session — so it is delivered on a deferred macrotask AFTER start
|
|
9
|
-
* resolves, not on an early startup frame a caller cannot yet observe.
|
|
10
|
-
*/
|
|
11
|
-
import type { ElwoodWarningEvent } from "./types.ts";
|
|
12
|
-
/** A session's live warning sink (emits a batch as `warning` + `activity`). */
|
|
13
|
-
export type FrameWarningSink = {
|
|
14
|
-
readonly emitWarnings: (warnings: readonly ElwoodWarningEvent[]) => void;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* Delivers `warnings` through `sink` but CONTAINS a throwing listener so frame
|
|
18
|
-
* processing continues. Warnings are live-only: a contained throw drops the warning
|
|
19
|
-
* (it is not retried), exactly as a human's terminal does not re-show a flashed banner.
|
|
20
|
-
*/
|
|
21
|
-
export declare function deliverFrameWarnings(sink: FrameWarningSink | undefined, warnings: readonly ElwoodWarningEvent[]): void;
|
|
22
|
-
/**
|
|
23
|
-
* A buffer-then-live warning sink for the STARTUP region. Warnings emitted BEFORE the
|
|
24
|
-
* caller can subscribe (during the pre-return startup gate — MCP/transcript/preflight
|
|
25
|
-
* diagnostics) are BUFFERED, then flushed on a deferred macrotask AFTER start resolves,
|
|
26
|
-
* so a caller attaching a `warning` listener in the same turn it receives the session
|
|
27
|
-
* still observes them (C-API-14) — WITHOUT restoring general late-subscriber replay.
|
|
28
|
-
* Once opened, delivery is live pass-through. Every observed startup warning is
|
|
29
|
-
* delivered: PRD §5.7/C-API-14 defines no overflow exception, and the buffer drains one
|
|
30
|
-
* macrotask after start resolves, so it is inherently short-lived (the finite set of
|
|
31
|
-
* startup diagnostics), not an unbounded queue — a silent cap could drop the guaranteed
|
|
32
|
-
* `version_unparseable` warning. A macrotask (not a microtask) is required: a microtask
|
|
33
|
-
* runs before the caller's post-`await` continuation, so it would fire into no listener.
|
|
34
|
-
*/
|
|
35
|
-
export declare function createStartupWarningGate(sink: FrameWarningSink): {
|
|
36
|
-
readonly emitWarnings: (warnings: readonly ElwoodWarningEvent[]) => void;
|
|
37
|
-
readonly openAfterReturn: () => void;
|
|
38
|
-
};
|
|
39
|
-
//# sourceMappingURL=startup-frame.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"startup-frame.d.ts","sourceRoot":"","sources":["../../src/core/startup-frame.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAErD,+EAA+E;AAC/E,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,YAAY,EAAE,CAAC,QAAQ,EAAE,SAAS,kBAAkB,EAAE,KAAK,IAAI,CAAC;CAC1E,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,gBAAgB,GAAG,SAAS,EAClC,QAAQ,EAAE,SAAS,kBAAkB,EAAE,GACtC,IAAI,CAQN;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,gBAAgB,GAAG;IAChE,QAAQ,CAAC,YAAY,EAAE,CAAC,QAAQ,EAAE,SAAS,kBAAkB,EAAE,KAAK,IAAI,CAAC;IACzE,QAAQ,CAAC,eAAe,EAAE,MAAM,IAAI,CAAC;CACtC,CAiBA"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared startup-frame helpers keeping telemetry off the critical frame path.
|
|
3
|
-
* Implements PRD §5.7/§9.1 (C-API-14, C-API-37): a warning is TELEMETRY and must
|
|
4
|
-
* never control session progress. On the hot terminal-frame callback a throwing
|
|
5
|
-
* `warning`/`activity` listener must not skip the rest of the frame (readiness
|
|
6
|
-
* detection, prompt automation, login/attention detection, `terminal:data`), and the
|
|
7
|
-
* preflight/version warning must reach a caller that subscribes in the same turn it
|
|
8
|
-
* receives the session — so it is delivered on a deferred macrotask AFTER start
|
|
9
|
-
* resolves, not on an early startup frame a caller cannot yet observe.
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* Delivers `warnings` through `sink` but CONTAINS a throwing listener so frame
|
|
13
|
-
* processing continues. Warnings are live-only: a contained throw drops the warning
|
|
14
|
-
* (it is not retried), exactly as a human's terminal does not re-show a flashed banner.
|
|
15
|
-
*/
|
|
16
|
-
export function deliverFrameWarnings(sink, warnings) {
|
|
17
|
-
if (!sink || warnings.length === 0)
|
|
18
|
-
return;
|
|
19
|
-
try {
|
|
20
|
-
sink.emitWarnings(warnings);
|
|
21
|
-
}
|
|
22
|
-
catch {
|
|
23
|
-
// Telemetry must not wedge the frame: a throwing listener is contained here so
|
|
24
|
-
// readiness, prompt automation, login detection, and terminal:data still run.
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* A buffer-then-live warning sink for the STARTUP region. Warnings emitted BEFORE the
|
|
29
|
-
* caller can subscribe (during the pre-return startup gate — MCP/transcript/preflight
|
|
30
|
-
* diagnostics) are BUFFERED, then flushed on a deferred macrotask AFTER start resolves,
|
|
31
|
-
* so a caller attaching a `warning` listener in the same turn it receives the session
|
|
32
|
-
* still observes them (C-API-14) — WITHOUT restoring general late-subscriber replay.
|
|
33
|
-
* Once opened, delivery is live pass-through. Every observed startup warning is
|
|
34
|
-
* delivered: PRD §5.7/C-API-14 defines no overflow exception, and the buffer drains one
|
|
35
|
-
* macrotask after start resolves, so it is inherently short-lived (the finite set of
|
|
36
|
-
* startup diagnostics), not an unbounded queue — a silent cap could drop the guaranteed
|
|
37
|
-
* `version_unparseable` warning. A macrotask (not a microtask) is required: a microtask
|
|
38
|
-
* runs before the caller's post-`await` continuation, so it would fire into no listener.
|
|
39
|
-
*/
|
|
40
|
-
export function createStartupWarningGate(sink) {
|
|
41
|
-
let open = false;
|
|
42
|
-
const buffered = [];
|
|
43
|
-
return {
|
|
44
|
-
emitWarnings: (warnings) => {
|
|
45
|
-
if (open)
|
|
46
|
-
return deliverFrameWarnings(sink, warnings);
|
|
47
|
-
buffered.push(...warnings);
|
|
48
|
-
},
|
|
49
|
-
openAfterReturn: () => {
|
|
50
|
-
const timer = setTimeout(() => {
|
|
51
|
-
open = true; // subsequent startup-frame warnings deliver live from here on
|
|
52
|
-
const batch = buffered.splice(0);
|
|
53
|
-
if (batch.length > 0)
|
|
54
|
-
deliverFrameWarnings(sink, batch);
|
|
55
|
-
}, 0);
|
|
56
|
-
timer.unref?.();
|
|
57
|
-
},
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=startup-frame.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"startup-frame.js","sourceRoot":"","sources":["../../src/core/startup-frame.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AASH;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAClC,IAAkC,EAClC,QAAuC;IAEvC,IAAI,CAAC,IAAI,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAC3C,IAAI,CAAC;QACH,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IAC9B,CAAC;IAAC,MAAM,CAAC;QACP,+EAA+E;QAC/E,8EAA8E;IAChF,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,wBAAwB,CAAC,IAAsB;IAI7D,IAAI,IAAI,GAAG,KAAK,CAAC;IACjB,MAAM,QAAQ,GAAyB,EAAE,CAAC;IAC1C,OAAO;QACL,YAAY,EAAE,CAAC,QAAQ,EAAE,EAAE;YACzB,IAAI,IAAI;gBAAE,OAAO,oBAAoB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;YACtD,QAAQ,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC;QAC7B,CAAC;QACD,eAAe,EAAE,GAAG,EAAE;YACpB,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE;gBAC5B,IAAI,GAAG,IAAI,CAAC,CAAC,8DAA8D;gBAC3E,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;gBACjC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;oBAAE,oBAAoB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YAC1D,CAAC,EAAE,CAAC,CAAC,CAAC;YACN,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC;QAClB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Completion-aware settlement for automated startup-prompt PTY writes.
|
|
3
|
-
* Implements PRD §5.1, §5.4, and §5.7: a startup prompt is marked answered (its
|
|
4
|
-
* `startup_prompt` activity emitted) ONLY after its `sendInput` write actually
|
|
5
|
-
* fulfills. A rejected write leaves the prompt retryable and surfaces a bounded,
|
|
6
|
-
* content-free `startup_prompt_write_failed` warning instead of false telemetry
|
|
7
|
-
* (C-CLAUDE-16, C-CODEX-17).
|
|
8
|
-
*/
|
|
9
|
-
import type { ElwoodAgentKind } from "./activity.ts";
|
|
10
|
-
import type { TrustPromptIdFor } from "./startup-automation.ts";
|
|
11
|
-
import { type StartupActivityEmitter, type StartupPromptLabelFor } from "./startup-automation.ts";
|
|
12
|
-
import type { ElwoodWarningEvent } from "./warnings.ts";
|
|
13
|
-
/**
|
|
14
|
-
* A settled startup-prompt automation, discriminated by `outcome.kind` so the
|
|
15
|
-
* invalid pairings are unrepresentable: an `answered` outcome ALWAYS carries the
|
|
16
|
-
* write-completion `settled` promise (resolves on write success, rejects — after
|
|
17
|
-
* the responder un-settles the prompt — on a rejected write), and an
|
|
18
|
-
* `option_pending` outcome (no write happened) NEVER carries one. This makes a
|
|
19
|
-
* false success ("answered" with no write to await) and a silently lost warning
|
|
20
|
-
* (write present on a non-answered outcome) impossible to construct (§5.4, §5.7).
|
|
21
|
-
*/
|
|
22
|
-
export type SettledStartupOutcome<A extends ElwoodAgentKind> = {
|
|
23
|
-
readonly outcome: {
|
|
24
|
-
readonly kind: "answered";
|
|
25
|
-
readonly prompt: StartupPromptLabelFor<A>;
|
|
26
|
-
readonly input: string;
|
|
27
|
-
};
|
|
28
|
-
readonly settled: Promise<void>;
|
|
29
|
-
} | {
|
|
30
|
-
readonly outcome: {
|
|
31
|
-
readonly kind: "option_pending";
|
|
32
|
-
readonly prompt: TrustPromptIdFor<A>;
|
|
33
|
-
};
|
|
34
|
-
readonly settled?: undefined;
|
|
35
|
-
};
|
|
36
|
-
/** Where a rejected startup-prompt write is reported. */
|
|
37
|
-
export type StartupWarningSink = {
|
|
38
|
-
emitWarnings(warnings: readonly ElwoodWarningEvent[]): void;
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* Emit each settled automation's activity at the RIGHT time: an `option_pending`
|
|
42
|
-
* or write-less outcome emits immediately; a write-backed `answered` outcome emits
|
|
43
|
-
* its `startup_prompt` activity only once the write resolves, and on rejection
|
|
44
|
-
* emits a bounded warning instead — never a false "answered" activity.
|
|
45
|
-
*/
|
|
46
|
-
export declare function emitSettledStartupOutcomes<A extends ElwoodAgentKind>(emitter: StartupActivityEmitter, agent: A, elwoodSessionId: string, settledOutcomes: readonly SettledStartupOutcome<NoInfer<A>>[], warnings: StartupWarningSink | undefined): void;
|
|
47
|
-
//# sourceMappingURL=startup-write.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"startup-write.d.ts","sourceRoot":"","sources":["../../src/core/startup-write.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAE3B,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,kBAAkB,EAA4B,MAAM,eAAe,CAAC;AAElF;;;;;;;;GAQG;AACH,MAAM,MAAM,qBAAqB,CAAC,CAAC,SAAS,eAAe,IACvD;IACE,QAAQ,CAAC,OAAO,EAAE;QAChB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;QAC1B,QAAQ,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC;QAC1C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;KACxB,CAAC;IACF,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;CACjC,GACD;IACE,QAAQ,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAA;KAAE,CAAC;IAC5F,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC;CAC9B,CAAC;AAEN,yDAAyD;AACzD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,YAAY,CAAC,QAAQ,EAAE,SAAS,kBAAkB,EAAE,GAAG,IAAI,CAAC;CAC7D,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,CAAC,SAAS,eAAe,EAClE,OAAO,EAAE,sBAAsB,EAC/B,KAAK,EAAE,CAAC,EACR,eAAe,EAAE,MAAM,EAIvB,eAAe,EAAE,SAAS,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,EAC7D,QAAQ,EAAE,kBAAkB,GAAG,SAAS,GACvC,IAAI,CAgCN"}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Completion-aware settlement for automated startup-prompt PTY writes.
|
|
3
|
-
* Implements PRD §5.1, §5.4, and §5.7: a startup prompt is marked answered (its
|
|
4
|
-
* `startup_prompt` activity emitted) ONLY after its `sendInput` write actually
|
|
5
|
-
* fulfills. A rejected write leaves the prompt retryable and surfaces a bounded,
|
|
6
|
-
* content-free `startup_prompt_write_failed` warning instead of false telemetry
|
|
7
|
-
* (C-CLAUDE-16, C-CODEX-17).
|
|
8
|
-
*/
|
|
9
|
-
import { emitStartupPromptActivity, } from "./startup-automation.js";
|
|
10
|
-
/**
|
|
11
|
-
* Emit each settled automation's activity at the RIGHT time: an `option_pending`
|
|
12
|
-
* or write-less outcome emits immediately; a write-backed `answered` outcome emits
|
|
13
|
-
* its `startup_prompt` activity only once the write resolves, and on rejection
|
|
14
|
-
* emits a bounded warning instead — never a false "answered" activity.
|
|
15
|
-
*/
|
|
16
|
-
export function emitSettledStartupOutcomes(emitter, agent, elwoodSessionId,
|
|
17
|
-
// `NoInfer` blocks inference of `A` from the outcomes, so `A` is pinned by the
|
|
18
|
-
// `agent` argument alone. Passing Codex outcomes with `agent: "claude"` no
|
|
19
|
-
// longer widens `A` to the union and cannot construct a cross-agent warning.
|
|
20
|
-
settledOutcomes, warnings) {
|
|
21
|
-
for (const settledOutcome of settledOutcomes) {
|
|
22
|
-
if (settledOutcome.settled === undefined) {
|
|
23
|
-
// An `option_pending` outcome: no write happened, so there is nothing to
|
|
24
|
-
// await — emit its attention activity immediately. The discriminated union
|
|
25
|
-
// guarantees this branch is only ever `option_pending`. CONTAIN a throwing
|
|
26
|
-
// activity listener exactly as the promise-backed branch does: this runs on the
|
|
27
|
-
// hot startup frame, so an escaping throw would skip the rest of the frame
|
|
28
|
-
// (readiness/blocking observation, `terminal:data`) and could let an already-armed
|
|
29
|
-
// readiness deadline drain queued input into an unlatched dialog (C-API-28).
|
|
30
|
-
try {
|
|
31
|
-
emitStartupPromptActivity(emitter, agent, elwoodSessionId, settledOutcome.outcome);
|
|
32
|
-
}
|
|
33
|
-
catch {
|
|
34
|
-
// Telemetry must not wedge the frame; the activity is dropped (live-only).
|
|
35
|
-
}
|
|
36
|
-
continue;
|
|
37
|
-
}
|
|
38
|
-
// An `answered` outcome always carries the write-completion promise: its
|
|
39
|
-
// activity is emitted only once the write fulfills, and a rejected write
|
|
40
|
-
// surfaces a bounded warning instead of a false "answered" activity.
|
|
41
|
-
const { outcome, settled } = settledOutcome;
|
|
42
|
-
// A terminal `.catch` OWNS the derived promise: both continuations call public
|
|
43
|
-
// event paths that can throw (activity emission rethrows listener failures;
|
|
44
|
-
// warning recording can fail), and a floated rejection would be an unhandled
|
|
45
|
-
// rejection that can terminate the host during startup. Swallow it here.
|
|
46
|
-
settled
|
|
47
|
-
.then(() => emitStartupPromptActivity(emitter, agent, elwoodSessionId, outcome), () => warnings?.emitWarnings([writeFailedWarning(agent, elwoodSessionId, outcome)]))
|
|
48
|
-
.catch(() => undefined);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
// `agent` and `outcome` are always the SAME concrete `A` here — the caller
|
|
52
|
-
// (`emitSettledStartupOutcomes`) already pins `A` via NoInfer, so this internal
|
|
53
|
-
// helper needs no extra guard and its correlation is enforced by construction.
|
|
54
|
-
function writeFailedWarning(agent, elwoodSessionId, outcome) {
|
|
55
|
-
// `outcome.prompt` is already the agent-correlated label, so no cast discards
|
|
56
|
-
// the correlation: an off-agent (label, agent) pairing cannot be constructed.
|
|
57
|
-
const label = outcome.prompt;
|
|
58
|
-
const warning = {
|
|
59
|
-
elwoodSessionId,
|
|
60
|
-
agent,
|
|
61
|
-
source: "terminal",
|
|
62
|
-
code: "startup_prompt_write_failed",
|
|
63
|
-
severity: "warning",
|
|
64
|
-
message: `Startup prompt ${label} could not be answered: PTY write was rejected; leaving it retryable.`,
|
|
65
|
-
label,
|
|
66
|
-
raw: `startup_prompt_write_failed label=${label}`,
|
|
67
|
-
};
|
|
68
|
-
// A concrete `StartupPromptWriteFailed<"claude"|"codex">` IS an ElwoodWarningEvent
|
|
69
|
-
// member; the widening bridges TS's generic-union assignability gap only (the
|
|
70
|
-
// agent/label correlation above is already enforced at construction).
|
|
71
|
-
return warning;
|
|
72
|
-
}
|
|
73
|
-
//# sourceMappingURL=startup-write.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"startup-write.js","sourceRoot":"","sources":["../../src/core/startup-write.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EACL,yBAAyB,GAI1B,MAAM,yBAAyB,CAAC;AA+BjC;;;;;GAKG;AACH,MAAM,UAAU,0BAA0B,CACxC,OAA+B,EAC/B,KAAQ,EACR,eAAuB;AACvB,+EAA+E;AAC/E,2EAA2E;AAC3E,6EAA6E;AAC7E,eAA6D,EAC7D,QAAwC;IAExC,KAAK,MAAM,cAAc,IAAI,eAAe,EAAE,CAAC;QAC7C,IAAI,cAAc,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;YACzC,yEAAyE;YACzE,2EAA2E;YAC3E,2EAA2E;YAC3E,gFAAgF;YAChF,2EAA2E;YAC3E,mFAAmF;YACnF,6EAA6E;YAC7E,IAAI,CAAC;gBACH,yBAAyB,CAAC,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;YACrF,CAAC;YAAC,MAAM,CAAC;gBACP,2EAA2E;YAC7E,CAAC;YACD,SAAS;QACX,CAAC;QACD,yEAAyE;QACzE,yEAAyE;QACzE,qEAAqE;QACrE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,cAAc,CAAC;QAC5C,+EAA+E;QAC/E,4EAA4E;QAC5E,6EAA6E;QAC7E,yEAAyE;QACzE,OAAO;aACJ,IAAI,CACH,GAAG,EAAE,CAAC,yBAAyB,CAAC,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,OAAO,CAAC,EACzE,GAAG,EAAE,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,kBAAkB,CAAC,KAAK,EAAE,eAAe,EAAE,OAAO,CAAC,CAAC,CAAC,CACpF;aACA,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;IAC5B,CAAC;AACH,CAAC;AAED,2EAA2E;AAC3E,gFAAgF;AAChF,+EAA+E;AAC/E,SAAS,kBAAkB,CACzB,KAAQ,EACR,eAAuB,EACvB,OAAgC;IAEhC,8EAA8E;IAC9E,8EAA8E;IAC9E,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC;IAC7B,MAAM,OAAO,GAAgC;QAC3C,eAAe;QACf,KAAK;QACL,MAAM,EAAE,UAAU;QAClB,IAAI,EAAE,6BAA6B;QACnC,QAAQ,EAAE,SAAS;QACnB,OAAO,EAAE,kBAAkB,KAAK,uEAAuE;QACvG,KAAK;QACL,GAAG,EAAE,qCAAqC,KAAK,EAAE;KAClD,CAAC;IACF,mFAAmF;IACnF,8EAA8E;IAC9E,sEAAsE;IACtE,OAAO,OAA6B,CAAC;AACvC,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared builder for the per-agent trust blocking screen-fact rules.
|
|
3
|
-
* Implements PRD §5.1/§5.5 (C-ATTN-03): a trust prompt that stays UNANSWERED
|
|
4
|
-
* under the policy classifies as a blocking prompt. Both adapters build these
|
|
5
|
-
* rules identically, so the construction — option-aware header recognition,
|
|
6
|
-
* stable semantic ids, base-table append — lives here once instead of diverging
|
|
7
|
-
* across `claude/screen-table.ts` and `codex/screen-table.ts`.
|
|
8
|
-
*/
|
|
9
|
-
import type { ElwoodAgentKind } from "./activity.ts";
|
|
10
|
-
import type { ScreenFactTable } from "./screen-facts.ts";
|
|
11
|
-
/**
|
|
12
|
-
* `base` plus one `blocking_prompt_visible` rule per trust prompt that stays
|
|
13
|
-
* unanswered under `autotrust`. Each rule recognizes the prompt only by its
|
|
14
|
-
* HEADER outside the option region (`trustHeaderMatches`, the same recognizer
|
|
15
|
-
* the responder uses; the non-option text is computed once per frame and cached
|
|
16
|
-
* across the rules), so an unrelated numbered/cursor option containing a trust
|
|
17
|
-
* phrase is NOT mistaken for a blocking trust prompt (PRD §5.1). Returns `base`
|
|
18
|
-
* unchanged when no trust prompt blocks (e.g. every allowlisted prompt is
|
|
19
|
-
* auto-answered).
|
|
20
|
-
*/
|
|
21
|
-
export declare function withTrustBlockingRules(base: ScreenFactTable, agent: ElwoodAgentKind, autotrust: boolean): ScreenFactTable;
|
|
22
|
-
//# sourceMappingURL=trust-blocking.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"trust-blocking.d.ts","sourceRoot":"","sources":["../../src/core/trust-blocking.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAkB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAIzE;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,eAAe,EACrB,KAAK,EAAE,eAAe,EACtB,SAAS,EAAE,OAAO,GACjB,eAAe,CAgBjB"}
|