@gajae-code/coding-agent 0.10.1 → 0.11.0
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 +70 -2
- package/dist/types/append-only-mode.d.ts +1 -1
- package/dist/types/cli/args.d.ts +4 -5
- package/dist/types/cli/daemon-cli.d.ts +12 -1
- package/dist/types/cli/notify-cli.d.ts +21 -1
- package/dist/types/cli.d.ts +3 -0
- package/dist/types/commands/daemon.d.ts +39 -0
- package/dist/types/commands/launch.d.ts +3 -0
- package/dist/types/commands/notify.d.ts +28 -1
- package/dist/types/commands/sdk.d.ts +33 -0
- package/dist/types/config/atomic-yaml-patch.d.ts +85 -0
- package/dist/types/config/model-profile-activation.d.ts +35 -15
- package/dist/types/config/model-profiles.d.ts +11 -5
- package/dist/types/config/model-registry.d.ts +3 -3
- package/dist/types/config/model-resolver.d.ts +39 -6
- package/dist/types/config/model-selector-value.d.ts +17 -0
- package/dist/types/config/models-config-schema.d.ts +10 -6
- package/dist/types/config/settings-schema.d.ts +133 -6
- package/dist/types/config/settings.d.ts +63 -35
- package/dist/types/coordinator-mcp/model-preset.d.ts +7 -6
- package/dist/types/coordinator-mcp/server.d.ts +6 -49
- package/dist/types/daemon/builtin.d.ts +6 -5
- package/dist/types/daemon/control-types.d.ts +1 -1
- package/dist/types/discovery/mcp-json.d.ts +12 -1
- package/dist/types/extensibility/custom-tools/types.d.ts +1 -1
- package/dist/types/extensibility/extensions/compact-handler.d.ts +4 -2
- package/dist/types/extensibility/extensions/get-commands-handler.d.ts +2 -2
- package/dist/types/extensibility/extensions/loader.d.ts +10 -1
- package/dist/types/extensibility/extensions/runner.d.ts +3 -3
- package/dist/types/extensibility/extensions/types.d.ts +141 -16
- package/dist/types/extensibility/hooks/types.d.ts +1 -1
- package/dist/types/gjc-runtime/launch-tmux.d.ts +3 -2
- package/dist/types/gjc-runtime/psmux-detect.d.ts +3 -0
- package/dist/types/gjc-runtime/session-state-sidecar.d.ts +3 -0
- package/dist/types/gjc-runtime/team-runtime.d.ts +3 -4
- package/dist/types/gjc-runtime/tmux-owner-isolation-cli.d.ts +13 -0
- package/dist/types/gjc-runtime/tmux-sessions.d.ts +4 -1
- package/dist/types/gjc-runtime/windows-powershell-command.d.ts +9 -0
- package/dist/types/harness-control-plane/operate.d.ts +5 -5
- package/dist/types/harness-control-plane/owner.d.ts +18 -4
- package/dist/types/harness-control-plane/receipts.d.ts +0 -1
- package/dist/types/harness-control-plane/sdk-transport.d.ts +43 -0
- package/dist/types/harness-control-plane/session-transport.d.ts +48 -0
- package/dist/types/harness-control-plane/types.d.ts +3 -4
- package/dist/types/lsp/index.d.ts +1 -1
- package/dist/types/main.d.ts +32 -38
- package/dist/types/modes/acp/acp-agent.d.ts +224 -53
- package/dist/types/modes/acp/acp-client-bridge.d.ts +1 -0
- package/dist/types/modes/acp/acp-mode.d.ts +6 -15
- package/dist/types/modes/acp/permission-mode.d.ts +4 -0
- package/dist/types/modes/acp/startup-options.d.ts +6 -0
- package/dist/types/modes/components/agent-dashboard.d.ts +3 -0
- package/dist/types/modes/components/gajae-pet-widget.d.ts +1 -0
- package/dist/types/modes/components/model-selector.d.ts +1 -0
- package/dist/types/modes/components/notifications-settings-editor.d.ts +135 -0
- package/dist/types/modes/components/pet-capability.d.ts +37 -0
- package/dist/types/modes/components/pet-selector.d.ts +1 -1
- package/dist/types/modes/components/settings-selector.d.ts +15 -4
- package/dist/types/modes/components/welcome.d.ts +1 -1
- package/dist/types/modes/controllers/selector-controller.d.ts +35 -1
- package/dist/types/modes/index.d.ts +0 -4
- package/dist/types/modes/interactive-mode.d.ts +5 -1
- package/dist/types/modes/runtime-init.d.ts +2 -2
- package/dist/types/modes/shared/agent-wire/approval-gate.d.ts +6 -9
- package/dist/types/modes/shared/agent-wire/deep-interview-gate.d.ts +4 -6
- package/dist/types/modes/shared/agent-wire/event-contract.d.ts +6 -6
- package/dist/types/modes/shared/agent-wire/event-envelope.d.ts +4 -9
- package/dist/types/modes/shared/agent-wire/event-observation.d.ts +1 -1
- package/dist/types/modes/shared/agent-wire/workflow-gate-broker.d.ts +169 -30
- package/dist/types/modes/shared/agent-wire/workflow-gate-schema.d.ts +7 -7
- package/dist/types/modes/shared/agent-wire/workflow-gate-types.d.ts +105 -0
- package/dist/types/modes/types.d.ts +16 -1
- package/dist/types/runtime-mcp/client.d.ts +2 -0
- package/dist/types/runtime-mcp/config.d.ts +5 -1
- package/dist/types/runtime-mcp/manager.d.ts +8 -1
- package/dist/types/runtime-mcp/types.d.ts +4 -0
- package/dist/types/sdk/acp/adapter.d.ts +67 -0
- package/dist/types/sdk/acp/index.d.ts +2 -0
- package/dist/types/sdk/broker/broker.d.ts +53 -0
- package/dist/types/sdk/broker/discovery.d.ts +30 -0
- package/dist/types/sdk/broker/ensure.d.ts +33 -0
- package/dist/types/sdk/broker/identity.d.ts +3 -0
- package/dist/types/sdk/broker/index.d.ts +8 -0
- package/dist/types/sdk/broker/lifecycle-ledger.d.ts +95 -0
- package/dist/types/sdk/broker/lifecycle.d.ts +85 -0
- package/dist/types/sdk/broker/process-incarnation.d.ts +14 -0
- package/dist/types/sdk/broker/runtime.d.ts +33 -0
- package/dist/types/sdk/broker/session-index.d.ts +57 -0
- package/dist/types/sdk/broker/state-version.d.ts +8 -0
- package/dist/types/sdk/broker/transport.d.ts +9 -0
- package/dist/types/sdk/bus/chat-command-policy.d.ts +49 -0
- package/dist/types/sdk/bus/chat-daemon-cli.d.ts +21 -0
- package/dist/types/sdk/bus/chat-daemon-control.d.ts +111 -0
- package/dist/types/sdk/bus/chat-daemon-runtime.d.ts +77 -0
- package/dist/types/sdk/bus/chat-effect-journal.d.ts +84 -0
- package/dist/types/{notifications → sdk/bus}/config-commands.d.ts +7 -2
- package/dist/types/sdk/bus/config.d.ts +274 -0
- package/dist/types/sdk/bus/conversation-store.d.ts +72 -0
- package/dist/types/sdk/bus/discord-conversation.d.ts +58 -0
- package/dist/types/sdk/bus/discord-daemon.d.ts +45 -0
- package/dist/types/sdk/bus/discord-live-provider.d.ts +70 -0
- package/dist/types/sdk/bus/discord-provider.d.ts +85 -0
- package/dist/types/{notifications → sdk/bus}/html-format.d.ts +2 -2
- package/dist/types/{notifications → sdk/bus}/index.d.ts +113 -13
- package/dist/types/{notifications → sdk/bus}/lifecycle-control-runtime.d.ts +4 -2
- package/dist/types/{notifications → sdk/bus}/lifecycle-orchestrator.d.ts +18 -21
- package/dist/types/{notifications → sdk/bus}/managed-daemon.d.ts +1 -1
- package/dist/types/sdk/bus/native-runtime-compatibility.d.ts +13 -0
- package/dist/types/sdk/bus/notification-orchestration.d.ts +170 -0
- package/dist/types/{notifications → sdk/bus}/notification-service.d.ts +7 -1
- package/dist/types/sdk/bus/session-control.d.ts +83 -0
- package/dist/types/sdk/bus/slack-conversation.d.ts +56 -0
- package/dist/types/sdk/bus/slack-daemon.d.ts +60 -0
- package/dist/types/sdk/bus/slack-live-provider.d.ts +59 -0
- package/dist/types/sdk/bus/slack-provider.d.ts +55 -0
- package/dist/types/{notifications → sdk/bus}/telegram-cli.d.ts +4 -4
- package/dist/types/{notifications → sdk/bus}/telegram-daemon-cli.d.ts +14 -5
- package/dist/types/sdk/bus/telegram-daemon-contract.d.ts +12 -0
- package/dist/types/{notifications → sdk/bus}/telegram-daemon-control.d.ts +2 -2
- package/dist/types/{notifications → sdk/bus}/telegram-daemon.d.ts +55 -17
- package/dist/types/{notifications → sdk/bus}/telegram-reference.d.ts +2 -2
- package/dist/types/sdk/bus/telegram-setup.d.ts +128 -0
- package/dist/types/{notifications → sdk/bus}/topic-registry.d.ts +11 -0
- package/dist/types/sdk/cli/index.d.ts +1 -0
- package/dist/types/sdk/cli/session-cli.d.ts +19 -0
- package/dist/types/sdk/client/client.d.ts +1 -0
- package/dist/types/sdk/client/discovery.d.ts +27 -0
- package/dist/types/sdk/client/index.d.ts +2 -0
- package/dist/types/sdk/host/control/dispatch.d.ts +34 -0
- package/dist/types/sdk/host/control/index.d.ts +2 -0
- package/dist/types/sdk/host/control/operations.d.ts +65 -0
- package/dist/types/sdk/host/events.d.ts +35 -0
- package/dist/types/sdk/host/host.d.ts +35 -0
- package/dist/types/sdk/host/index.d.ts +4 -0
- package/dist/types/sdk/host/query/cursor.d.ts +62 -0
- package/dist/types/sdk/host/query/handlers.d.ts +70 -0
- package/dist/types/sdk/host/query/index.d.ts +3 -0
- package/dist/types/sdk/host/query/revision-store.d.ts +60 -0
- package/dist/types/sdk/host/reverse-leases.d.ts +45 -0
- package/dist/types/sdk/host/types.d.ts +32 -0
- package/dist/types/sdk/index.d.ts +6 -0
- package/dist/types/sdk/lifecycle-session.d.ts +14 -0
- package/dist/types/sdk/mcp/index.d.ts +1 -0
- package/dist/types/sdk/mcp/server.d.ts +37 -0
- package/dist/types/sdk/models.d.ts +44 -0
- package/dist/types/sdk/protocol/adapter-validation.d.ts +14 -0
- package/dist/types/sdk/protocol/operation-registry.d.ts +24 -0
- package/dist/types/{sdk.d.ts → sdk/session.d.ts} +44 -38
- package/dist/types/sdk/startup-capability.d.ts +50 -0
- package/dist/types/session/agent-session.d.ts +114 -21
- package/dist/types/session/default-model-selection.d.ts +25 -0
- package/dist/types/session/fallback-chain-controller.d.ts +52 -0
- package/dist/types/session/session-manager.d.ts +58 -1
- package/dist/types/setup/credential-auto-import.d.ts +36 -6
- package/dist/types/tools/ask-answer-registry.d.ts +1 -1
- package/dist/types/tools/browser/benchmark/detector-report.d.ts +63 -0
- package/dist/types/tools/browser/benchmark/run-suite.d.ts +18 -0
- package/dist/types/tools/browser/launch.d.ts +22 -0
- package/dist/types/tools/browser/profile-discovery.d.ts +31 -0
- package/dist/types/tools/browser/profile-posture.d.ts +37 -0
- package/dist/types/tools/browser/profile-reuse.d.ts +39 -0
- package/dist/types/tools/browser/profile-warmup.d.ts +39 -0
- package/dist/types/tools/browser/registry.d.ts +19 -0
- package/dist/types/tools/browser/tab-protocol.d.ts +4 -0
- package/dist/types/tools/index.d.ts +8 -8
- package/package.json +34 -13
- package/scripts/build-sdk-package-smoke.ts +94 -0
- package/scripts/capture-notifications-settings-showcase.ts +435 -0
- package/scripts/compile-args.ts +4 -2
- package/scripts/g005-daemon-smoke.ts +4 -5
- package/scripts/g011-daemon-path-smoke.ts +5 -5
- package/scripts/generate-sdk-adapter-parity-manifest.ts +163 -0
- package/scripts/generate-sdk-operation-inventory.ts +867 -0
- package/scripts/generate-telegram-baseline-manifest.ts +128 -0
- package/scripts/manifest-schema.ts +124 -0
- package/scripts/run-test-manifest.ts +153 -0
- package/scripts/run-threat-model-check.ts +157 -0
- package/scripts/verify-gjc-sdk-canonicalization.ts +3467 -0
- package/scripts/verify-gjc-sdk-rename.ts +90 -0
- package/src/append-only-mode.ts +1 -1
- package/src/cli/args.ts +43 -12
- package/src/cli/auth-gateway-cli.ts +2 -2
- package/src/cli/config-cli.ts +2 -1
- package/src/cli/daemon-cli.ts +63 -14
- package/src/cli/list-models.ts +1 -1
- package/src/cli/notify-cli.ts +288 -286
- package/src/cli.ts +21 -2
- package/src/commands/daemon.ts +50 -6
- package/src/commands/harness.ts +93 -36
- package/src/commands/launch.ts +5 -2
- package/src/commands/mcp-serve.ts +19 -12
- package/src/commands/notify.ts +36 -3
- package/src/commands/sdk.ts +426 -0
- package/src/commit/agentic/agent.ts +1 -0
- package/src/config/atomic-yaml-patch.ts +423 -0
- package/src/config/model-profile-activation.ts +240 -89
- package/src/config/model-profiles.ts +37 -34
- package/src/config/model-registry.ts +51 -26
- package/src/config/model-resolver.ts +138 -51
- package/src/config/model-selector-value.ts +50 -0
- package/src/config/models-config-schema.ts +14 -21
- package/src/config/settings-schema.ts +128 -10
- package/src/config/settings.ts +1120 -158
- package/src/coordinator-mcp/model-preset.ts +74 -20
- package/src/coordinator-mcp/server.ts +1597 -3052
- package/src/daemon/builtin.ts +8 -5
- package/src/daemon/control-types.ts +1 -1
- package/src/defaults/gjc/skills/team/SKILL.md +4 -4
- package/src/discovery/mcp-json.ts +327 -20
- package/src/extensibility/custom-tools/types.ts +1 -1
- package/src/extensibility/extensions/compact-handler.ts +3 -3
- package/src/extensibility/extensions/get-commands-handler.ts +2 -2
- package/src/extensibility/extensions/loader.ts +69 -5
- package/src/extensibility/extensions/runner.ts +112 -4
- package/src/extensibility/extensions/types.ts +176 -17
- package/src/extensibility/hooks/types.ts +1 -1
- package/src/extensibility/slash-commands.ts +3 -3
- package/src/gjc-runtime/launch-tmux.ts +170 -86
- package/src/gjc-runtime/psmux-detect.ts +82 -4
- package/src/gjc-runtime/session-state-sidecar.ts +41 -31
- package/src/gjc-runtime/team-runtime.ts +54 -35
- package/src/gjc-runtime/tmux-owner-isolation-cli.ts +53 -17
- package/src/gjc-runtime/tmux-owner-isolation.ts +5 -2
- package/src/gjc-runtime/tmux-sessions.ts +19 -13
- package/src/gjc-runtime/ultragoal-guard.ts +53 -6
- package/src/gjc-runtime/ultragoal-runtime.ts +155 -3
- package/src/gjc-runtime/windows-powershell-command.ts +58 -0
- package/src/harness-control-plane/operate.ts +9 -9
- package/src/harness-control-plane/owner.ts +283 -39
- package/src/harness-control-plane/receipts.ts +0 -1
- package/src/harness-control-plane/sdk-transport.ts +395 -0
- package/src/harness-control-plane/session-transport.ts +94 -0
- package/src/harness-control-plane/types.ts +1 -1
- package/src/internal-urls/docs-index.generated.ts +36 -37
- package/src/lsp/client.ts +42 -6
- package/src/lsp/index.ts +2 -2
- package/src/main.ts +299 -204
- package/src/modes/DESIGN.md +258 -0
- package/src/modes/acp/acp-agent.ts +1228 -2612
- package/src/modes/acp/acp-client-bridge.ts +2 -20
- package/src/modes/acp/acp-event-mapper.ts +18 -2
- package/src/modes/acp/acp-mode.ts +8 -36
- package/src/modes/acp/permission-mode.ts +25 -0
- package/src/modes/acp/startup-options.ts +6 -0
- package/src/modes/components/agent-dashboard.ts +37 -17
- package/src/modes/components/custom-editor.ts +1 -0
- package/src/modes/components/gajae-pet-widget.ts +169 -20
- package/src/modes/components/model-selector.ts +93 -35
- package/src/modes/components/notifications-settings-editor.ts +1379 -0
- package/src/modes/components/pet-capability.ts +115 -0
- package/src/modes/components/pet-selector.ts +4 -6
- package/src/modes/components/settings-selector.ts +86 -11
- package/src/modes/components/welcome.ts +4 -4
- package/src/modes/controllers/command-controller.ts +1 -2
- package/src/modes/controllers/event-controller.ts +11 -16
- package/src/modes/controllers/extension-ui-controller.ts +357 -12
- package/src/modes/controllers/input-controller.ts +43 -13
- package/src/modes/controllers/selector-controller.ts +671 -44
- package/src/modes/index.ts +0 -22
- package/src/modes/interactive-mode.ts +108 -24
- package/src/modes/runtime-init.ts +298 -6
- package/src/modes/shared/agent-wire/approval-gate.ts +9 -11
- package/src/modes/shared/agent-wire/deep-interview-gate.ts +10 -11
- package/src/modes/shared/agent-wire/event-contract.ts +7 -8
- package/src/modes/shared/agent-wire/event-envelope.ts +9 -17
- package/src/modes/shared/agent-wire/event-observation.ts +16 -7
- package/src/modes/shared/agent-wire/workflow-gate-broker.ts +1254 -87
- package/src/modes/shared/agent-wire/workflow-gate-schema.ts +15 -15
- package/src/modes/shared/agent-wire/workflow-gate-types.ts +113 -0
- package/src/modes/types.ts +16 -1
- package/src/runtime-mcp/client.ts +94 -19
- package/src/runtime-mcp/config.ts +27 -15
- package/src/runtime-mcp/manager.ts +343 -105
- package/src/runtime-mcp/oauth-flow.ts +42 -12
- package/src/runtime-mcp/transports/http.ts +49 -19
- package/src/runtime-mcp/transports/stdio.ts +47 -28
- package/src/runtime-mcp/types.ts +10 -0
- package/src/sdk/acp/adapter.ts +418 -0
- package/src/sdk/acp/index.ts +2 -0
- package/src/sdk/broker/broker.ts +642 -0
- package/src/sdk/broker/discovery.ts +94 -0
- package/src/sdk/broker/ensure.ts +249 -0
- package/src/sdk/broker/identity.ts +42 -0
- package/src/sdk/broker/index.ts +8 -0
- package/src/sdk/broker/internal-source-marker-2178.txt +1 -0
- package/src/sdk/broker/internal-source.bunfig.toml +1 -0
- package/src/sdk/broker/lifecycle-ledger.ts +286 -0
- package/src/sdk/broker/lifecycle.ts +2157 -0
- package/src/sdk/broker/process-incarnation.ts +159 -0
- package/src/sdk/broker/runtime.ts +164 -0
- package/src/sdk/broker/session-index.ts +318 -0
- package/src/sdk/broker/state-version.ts +23 -0
- package/src/sdk/broker/transport.ts +125 -0
- package/src/sdk/bus/chat-command-policy.ts +107 -0
- package/src/sdk/bus/chat-daemon-cli.ts +214 -0
- package/src/sdk/bus/chat-daemon-control.ts +713 -0
- package/src/sdk/bus/chat-daemon-runtime.ts +526 -0
- package/src/sdk/bus/chat-effect-journal.ts +353 -0
- package/src/{notifications → sdk/bus}/config-commands.ts +39 -10
- package/src/sdk/bus/config.ts +433 -0
- package/src/sdk/bus/conversation-store.ts +391 -0
- package/src/sdk/bus/discord-conversation.ts +85 -0
- package/src/sdk/bus/discord-daemon.ts +2275 -0
- package/src/sdk/bus/discord-live-provider.ts +521 -0
- package/src/sdk/bus/discord-provider.ts +56 -0
- package/src/{notifications → sdk/bus}/html-format.ts +2 -2
- package/src/sdk/bus/index.ts +3943 -0
- package/src/{notifications → sdk/bus}/lifecycle-commands.ts +2 -0
- package/src/{notifications → sdk/bus}/lifecycle-control-runtime.ts +225 -196
- package/src/{notifications → sdk/bus}/lifecycle-orchestrator.ts +161 -74
- package/src/{notifications → sdk/bus}/managed-daemon.ts +2 -2
- package/src/sdk/bus/native-runtime-compatibility.ts +42 -0
- package/src/sdk/bus/natives-augment.d.ts +38 -0
- package/src/sdk/bus/notification-orchestration.ts +535 -0
- package/src/{notifications → sdk/bus}/notification-service.ts +106 -12
- package/src/sdk/bus/session-control.ts +333 -0
- package/src/sdk/bus/slack-conversation.ts +74 -0
- package/src/sdk/bus/slack-daemon.ts +2144 -0
- package/src/sdk/bus/slack-live-provider.ts +380 -0
- package/src/sdk/bus/slack-provider.ts +76 -0
- package/src/{notifications → sdk/bus}/telegram-cli.ts +8 -8
- package/src/sdk/bus/telegram-daemon-cli.ts +330 -0
- package/src/sdk/bus/telegram-daemon-contract.ts +14 -0
- package/src/{notifications → sdk/bus}/telegram-daemon-control.ts +4 -4
- package/src/{notifications → sdk/bus}/telegram-daemon.ts +502 -54
- package/src/{notifications → sdk/bus}/telegram-reference.ts +2 -2
- package/src/sdk/bus/telegram-setup.ts +663 -0
- package/src/{notifications → sdk/bus}/topic-registry.ts +32 -0
- package/src/sdk/cli/index.ts +1 -0
- package/src/sdk/cli/session-cli.ts +275 -0
- package/src/sdk/client/client.ts +1 -0
- package/src/sdk/client/discovery.ts +108 -0
- package/src/sdk/client/index.ts +2 -0
- package/src/sdk/host/control/dispatch.ts +367 -0
- package/src/sdk/host/control/index.ts +10 -0
- package/src/sdk/host/control/operations.ts +63 -0
- package/src/sdk/host/events.ts +91 -0
- package/src/sdk/host/host.ts +296 -0
- package/src/sdk/host/index.ts +4 -0
- package/src/sdk/host/query/cursor.ts +189 -0
- package/src/sdk/host/query/handlers.ts +533 -0
- package/src/sdk/host/query/index.ts +3 -0
- package/src/sdk/host/query/revision-store.ts +1126 -0
- package/src/sdk/host/reverse-leases.ts +325 -0
- package/src/sdk/host/types.ts +29 -0
- package/src/sdk/index.ts +13 -0
- package/src/sdk/lifecycle-session.ts +39 -0
- package/src/sdk/mcp/index.ts +1 -0
- package/src/sdk/mcp/server.ts +332 -0
- package/src/sdk/models.ts +168 -0
- package/src/sdk/protocol/adapter-validation.ts +48 -0
- package/src/sdk/protocol/operation-inventory.generated.json +5654 -0
- package/src/sdk/protocol/operation-registry.ts +312 -0
- package/src/{sdk.ts → sdk/session.ts} +339 -212
- package/src/sdk/startup-capability.ts +189 -0
- package/src/session/agent-session.ts +2470 -866
- package/src/session/default-model-selection.ts +93 -0
- package/src/session/fallback-chain-controller.ts +136 -0
- package/src/session/session-manager.ts +447 -13
- package/src/session/session-storage.ts +8 -1
- package/src/setup/credential-auto-import.ts +290 -35
- package/src/setup/hermes/templates/operator-instructions.v1.md +3 -5
- package/src/slash-commands/builtin-registry.ts +33 -30
- package/src/task/executor.ts +62 -13
- package/src/tools/ask-answer-registry.ts +1 -1
- package/src/tools/ask.ts +13 -8
- package/src/tools/browser/STEALTH-THIRD-PARTY-NOTICES.md +26 -0
- package/src/tools/browser/benchmark/detector-report.ts +157 -0
- package/src/tools/browser/benchmark/run-suite.ts +39 -0
- package/src/tools/browser/launch.ts +124 -19
- package/src/tools/browser/profile-discovery.ts +63 -0
- package/src/tools/browser/profile-posture.ts +59 -0
- package/src/tools/browser/profile-reuse.ts +102 -0
- package/src/tools/browser/profile-warmup.ts +109 -0
- package/src/tools/browser/registry.ts +87 -11
- package/src/tools/browser/tab-protocol.ts +1 -0
- package/src/tools/browser/tab-supervisor.ts +1 -0
- package/src/tools/browser/tab-worker.ts +1 -1
- package/src/tools/browser.ts +6 -0
- package/src/tools/index.ts +8 -8
- package/src/tools/puppeteer/14_stealth_permissions.txt +57 -0
- package/src/tools/puppeteer/15_stealth_webrtc.txt +60 -0
- package/src/tools/telegram-send.ts +2 -2
- package/vendor/insane-search/MANIFEST.json +2 -1
- package/vendor/insane-search/engine/bias_check.py +4 -1
- package/vendor/insane-search/engine/phase0.py +26 -1
- package/dist/types/harness-control-plane/rpc-adapter.d.ts +0 -69
- package/dist/types/modes/bridge/auth.d.ts +0 -12
- package/dist/types/modes/bridge/bridge-client-bridge.d.ts +0 -9
- package/dist/types/modes/bridge/bridge-mode.d.ts +0 -47
- package/dist/types/modes/bridge/bridge-ui-context.d.ts +0 -88
- package/dist/types/modes/bridge/event-stream.d.ts +0 -8
- package/dist/types/modes/rpc/host-tools.d.ts +0 -1
- package/dist/types/modes/rpc/host-uris.d.ts +0 -1
- package/dist/types/modes/rpc/rpc-client.d.ts +0 -299
- package/dist/types/modes/rpc/rpc-mode.d.ts +0 -86
- package/dist/types/modes/rpc/rpc-socket-security.d.ts +0 -10
- package/dist/types/modes/rpc/rpc-types.d.ts +0 -810
- package/dist/types/modes/shared/agent-wire/command-contract.d.ts +0 -18
- package/dist/types/modes/shared/agent-wire/command-dispatch.d.ts +0 -37
- package/dist/types/modes/shared/agent-wire/command-validation.d.ts +0 -2
- package/dist/types/modes/shared/agent-wire/handshake.d.ts +0 -56
- package/dist/types/modes/shared/agent-wire/host-tool-bridge.d.ts +0 -16
- package/dist/types/modes/shared/agent-wire/host-uri-bridge.d.ts +0 -17
- package/dist/types/modes/shared/agent-wire/protocol.d.ts +0 -25
- package/dist/types/modes/shared/agent-wire/responses.d.ts +0 -4
- package/dist/types/modes/shared/agent-wire/scopes.d.ts +0 -18
- package/dist/types/modes/shared/agent-wire/session-registry.d.ts +0 -25
- package/dist/types/modes/shared/agent-wire/ui-request-broker.d.ts +0 -42
- package/dist/types/modes/shared/agent-wire/ui-result.d.ts +0 -27
- package/dist/types/modes/shared/agent-wire/unattended-action-policy.d.ts +0 -29
- package/dist/types/modes/shared/agent-wire/unattended-audit.d.ts +0 -68
- package/dist/types/modes/shared/agent-wire/unattended-run-controller.d.ts +0 -166
- package/dist/types/modes/shared/agent-wire/unattended-session.d.ts +0 -127
- package/dist/types/notifications/config.d.ts +0 -132
- package/src/harness-control-plane/rpc-adapter.ts +0 -290
- package/src/modes/bridge/auth.ts +0 -41
- package/src/modes/bridge/bridge-client-bridge.ts +0 -47
- package/src/modes/bridge/bridge-mode.ts +0 -675
- package/src/modes/bridge/bridge-ui-context.ts +0 -200
- package/src/modes/bridge/event-stream.ts +0 -70
- package/src/modes/rpc/host-tools.ts +0 -1
- package/src/modes/rpc/host-uris.ts +0 -1
- package/src/modes/rpc/rpc-client.ts +0 -1166
- package/src/modes/rpc/rpc-mode.ts +0 -1029
- package/src/modes/rpc/rpc-socket-security.ts +0 -115
- package/src/modes/rpc/rpc-types.ts +0 -637
- package/src/modes/shared/agent-wire/command-contract.ts +0 -18
- package/src/modes/shared/agent-wire/command-dispatch.ts +0 -498
- package/src/modes/shared/agent-wire/command-validation.ts +0 -181
- package/src/modes/shared/agent-wire/handshake.ts +0 -157
- package/src/modes/shared/agent-wire/host-tool-bridge.ts +0 -197
- package/src/modes/shared/agent-wire/host-uri-bridge.ts +0 -236
- package/src/modes/shared/agent-wire/protocol.ts +0 -46
- package/src/modes/shared/agent-wire/responses.ts +0 -17
- package/src/modes/shared/agent-wire/scopes.ts +0 -94
- package/src/modes/shared/agent-wire/session-registry.ts +0 -109
- package/src/modes/shared/agent-wire/ui-request-broker.ts +0 -150
- package/src/modes/shared/agent-wire/ui-result.ts +0 -48
- package/src/modes/shared/agent-wire/unattended-action-policy.ts +0 -365
- package/src/modes/shared/agent-wire/unattended-audit.ts +0 -176
- package/src/modes/shared/agent-wire/unattended-run-controller.ts +0 -426
- package/src/modes/shared/agent-wire/unattended-session.ts +0 -528
- package/src/notifications/config.ts +0 -219
- package/src/notifications/index.ts +0 -1835
- package/src/notifications/telegram-daemon-cli.ts +0 -243
- package/src/tools/puppeteer/09_stealth_locale.txt +0 -46
- /package/dist/types/{notifications → sdk/bus}/attachment-registry.d.ts +0 -0
- /package/dist/types/{notifications → sdk/bus}/chat-adapters.d.ts +0 -0
- /package/dist/types/{notifications → sdk/bus}/daemon-paths.d.ts +0 -0
- /package/dist/types/{notifications → sdk/bus}/engine.d.ts +0 -0
- /package/dist/types/{notifications → sdk/bus}/helpers.d.ts +0 -0
- /package/dist/types/{notifications → sdk/bus}/lifecycle-commands.d.ts +0 -0
- /package/dist/types/{notifications → sdk/bus}/operator-runtime.d.ts +0 -0
- /package/dist/types/{notifications → sdk/bus}/rate-limit-pool.d.ts +0 -0
- /package/dist/types/{notifications → sdk/bus}/recent-activity.d.ts +0 -0
- /package/dist/types/{notifications → sdk/bus}/reply-sent-store.d.ts +0 -0
- /package/dist/types/{notifications → sdk/bus}/rich-draft.d.ts +0 -0
- /package/dist/types/{notifications → sdk/bus}/rich-render.d.ts +0 -0
- /package/dist/types/{notifications → sdk/bus}/threaded-inbound.d.ts +0 -0
- /package/dist/types/{notifications → sdk/bus}/threaded-render.d.ts +0 -0
- /package/src/{notifications → sdk/bus}/attachment-registry.ts +0 -0
- /package/src/{notifications → sdk/bus}/chat-adapters.ts +0 -0
- /package/src/{notifications → sdk/bus}/daemon-paths.ts +0 -0
- /package/src/{notifications → sdk/bus}/engine.ts +0 -0
- /package/src/{notifications → sdk/bus}/helpers.ts +0 -0
- /package/src/{notifications → sdk/bus}/operator-runtime.ts +0 -0
- /package/src/{notifications → sdk/bus}/rate-limit-pool.ts +0 -0
- /package/src/{notifications → sdk/bus}/recent-activity.ts +0 -0
- /package/src/{notifications → sdk/bus}/reply-sent-store.ts +0 -0
- /package/src/{notifications → sdk/bus}/rich-draft.ts +0 -0
- /package/src/{notifications → sdk/bus}/rich-render.ts +0 -0
- /package/src/{notifications → sdk/bus}/threaded-inbound.ts +0 -0
- /package/src/{notifications → sdk/bus}/threaded-render.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,18 +2,84 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.11.0] - 2026-07-15
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- Input-free interactive TTY startup now keeps the TUI reachable when configured model profiles are missing required provider credentials, skips only the blocked profiles, and preserves later `--mpreset` and explicit model/thinking precedence; redirected terminals, input-bearing, resume-continuation, image-only, print/text, and unrelated activation failures remain fail-closed (#2277).
|
|
9
|
+
- Browser geo settings now propagate coherently across request `Accept-Language`, navigator languages, and `Intl` locale/timezone surfaces; configured managed browsers are isolated by geo/profile posture, concurrent acquisition is serialized, and unset geo preserves Chromium's native locale/timezone instead of injecting a fixed New York profile.
|
|
10
|
+
|
|
11
|
+
- Cooperative mid-run context maintenance now waits at a cancellation-aware FIFO consumer-drain checkpoint before flushing or rewriting session history. Materialized tool results and steering messages are synchronously canonicalized first; aborted barriers and hook/signal-cancelled compactions settle without rewriting or scheduling a continuation. Promotion, pruning, and compaction each start a clean provider/prompt-cache epoch. Script-aware #2067 unsent-delta accounting remains cache-free and distinct from the lifecycle checkpoint.
|
|
12
|
+
- Classified the cooperative mid-run maintenance driver and token estimator test seams as locked non-public SDK exclusions, restoring deterministic operation-inventory generation and post-merge dev CI coverage.
|
|
13
|
+
- Accepted SDK prompts now deliver correlated `agent_start` and exactly one terminal lifecycle frame directly to the requesting authenticated WebSocket connection while retaining replayable host events. Harness owner observation also waits for every previously accepted frame to finish serial persistence, so message-update storms and polling gaps cannot hide sticky completion evidence (#2169).
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- Added the additive SDK Q10 model-catalog DTO: `Q10`, `models.list/current`, `models.list`, and `models.current` now return the same paged registry rows with reasoning/thinking capability metadata and current-model readback. `thinking.validLevels` is an `off`-first canonical menu; sparse raw reasoning descriptors remain available for inspection. The public DTO types are exported from `@gajae-code/coding-agent/sdk`, while undocumented `/sdk/models` deep imports remain unavailable. `inherit` is readback-only and malformed descriptors fail with a safe internal SDK error (#2163).
|
|
18
|
+
- Gajae Pet selection is now terminal-capability aware: unsupported terminals show an actionable warning (with multiplexer-specific guidance for tmux/screen/zellij, including the `PI_FORCE_IMAGE_PROTOCOL=sixel` expert opt-in), `/pet` and Settings disable the unavailable `RedGajae`/`BlueGajae` choices while `off` stays selectable, a saved-but-unavailable choice is identified as `(saved)`, and the public command names are consistent across execution, completion, and inline hints (`/pet RedGajae`, `/pet BlueGajae`, `/pet off`, case-insensitive).
|
|
19
|
+
- Added the standalone `@gajae-code/bridge-client` transport-only v3 SDK package. It exports `SdkClient` and its associated types; `@gajae-code/coding-agent/sdk` remains a compatibility re-export with the exact same class identity. Historical BridgeClient backend protocol, handshake, commands, SSE, and host-control bypass surfaces remain unavailable.
|
|
20
|
+
- Added explicit `--mcp-config <absolute-path>` support for one trusted, tools-only MCP config in top-level standalone sessions without enabling automatic user or project MCP discovery; exact reads reject links and identity changes, and MCP tool-name collisions fail closed.
|
|
21
|
+
- Added additive v3 workflow-gate correlation compatibility surfaces (#2171): explicit Rust workflow-frame readers/registration preserve `workflowGateId` without changing legacy `ActionNeeded`, `ServerMessage`, or `register_ask`; N-API retains `registerAsk` and adds correlated/arbitrated registration and exact unclaimed-retirement APIs. Private presentation leases, routes, claims, receipts, epochs, and endpoint generations remain non-public.
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- Renamed the notifications SDK to the Gajae-Code SDK: `docs/notifications-sdk.md` is now `docs/sdk.md`, `src/notifications/` is now `src/sdk/bus/`, and `src/sdk.ts` is now the `src/sdk/` module directory. Old deep-import specifiers no longer resolve.
|
|
26
|
+
- Moved SDK discovery from `.gjc/state/notifications/` to `.gjc/state/sdk/`. Restart sessions and daemons together when upgrading; the runtime does not dual-scan the old and new directories.
|
|
27
|
+
- Removed the `--mode rpc`, `--mode rpc-ui`, and `--mode bridge` external ingress modes. Machine clients must use the SDK WebSocket interfaces documented in `docs/sdk.md`; no RPC or Bridge compatibility path remains.
|
|
28
|
+
- Documented the current GPT-5.6 Codex and combo profile mappings as product judgments, including the durable `opus-codex` `anthropic/claude-sonnet-5` planner override and `fable-opus-codex` `anthropic/claude-opus-4-8:medium` planner.
|
|
29
|
+
- Resolved the SDK v3 workflow-gate shipping classification (#2171): `workflowGateId` and Q12 diagnostics are additive SDK v3 surfaces, while `action_needed.id` remains the transient, generic `reply.id` authority. `expectedSessionId` omission remains accepted and audited for the entire SDK v3 line; new clients must send it, and mandatory enforcement or removal can occur no earlier than SDK v4 only after at least one full published deprecation release/window with deployed-client notice. Explicit session mismatches fail closed before resolution; mismatched sessions, stale/reissued actions, and unsafe ambiguity never regain authority.
|
|
30
|
+
- Documented release pairing: the `@gajae-code/coding-agent` runtime and `@gajae-code/natives` native addon ship from the same source release at exact matching package versions (currently `0.10.2`), with the native loader version sentinel enforcing the pair. Mixed native/runtime versions are unsupported and cannot claim SDK compatibility.
|
|
31
|
+
### Fixed
|
|
32
|
+
- Startup continuation now participates in the existing managed fallback and in-flight recovery envelope, preventing a retryable resumed turn from publishing `agent_end`/idle before retry success, exhaustion, cancellation, or startup failure has settled (#2092).
|
|
33
|
+
|
|
34
|
+
- Fenced SDK WebSocket lifecycle callbacks and request settlement to the owning retry cycle/socket incarnation, so stale open, close, error, message, and timeout delivery cannot reject or corrupt work on a replacement connection; sent mutations remain non-replayed and deterministic race regressions cover the reconnect boundary (#2164).
|
|
35
|
+
- Owned LSP stdin `EPIPE` and `ERR_STREAM_DESTROYED` failures now terminalize and evict only the affected client, reject pending and stale requests with a stable transport-closed error, and permit clean client recreation without suppressing serialization or unrelated sink failures (#2138).
|
|
36
|
+
- Serialized fresh prompt preflight and durable default-model selection through deterministic per-session admission, preventing a later `model.set` from overtaking an earlier prompt while preserving provider-stream and continuation behavior (#2199).
|
|
37
|
+
- Direct SDK broker lifecycle hosts now wait for their session-owned startup capability before publishing lifecycle readiness. Only a `started` capability permits a ready marker; failed startup requires proven process, endpoint, and host cleanup before the broker reports `spawn_failed` with no endpoint available, otherwise it preserves terminal uncertainty (#2168).
|
|
38
|
+
- Isolated default source-mode SDK broker and session-host respawns from caller Bun startup policy. Internal children now use fixed `--no-env-file` plus product-owned config/entrypoint paths, scrub `BUN_OPTIONS` and mutable compiled markers, preserve compiled/custom launch compatibility, and clean up owned broker children on startup failure without leaking launch secrets (#2178).
|
|
39
|
+
## [0.10.2] - 2026-07-14
|
|
40
|
+
|
|
41
|
+
### Added
|
|
42
|
+
|
|
43
|
+
- Gajae Pet selection is now terminal-capability aware: unsupported terminals show an actionable warning (with multiplexer-specific guidance for tmux/screen/zellij, including the `PI_FORCE_IMAGE_PROTOCOL=sixel` expert opt-in), `/pet` and Settings disable the unavailable `RedGajae`/`BlueGajae` choices while `off` stays selectable, a saved-but-unavailable choice is identified as `(saved)`, and the public command names are consistent across execution, completion, and inline hints (`/pet RedGajae`, `/pet BlueGajae`, `/pet off`, case-insensitive).
|
|
44
|
+
|
|
45
|
+
### Changed
|
|
46
|
+
|
|
47
|
+
- Documented the current GPT-5.6 Codex and combo profile mappings as product judgments, including the durable `opus-codex` `anthropic/claude-sonnet-5` planner override and `fable-opus-codex` `anthropic/claude-opus-4-8:medium` planner.
|
|
48
|
+
- RPC clients can now durably select the machine-global default model and effective thinking level for subsequent messages, while project policy and resumed session history retain precedence; a late live-apply failure now restores the prior runtime model and thinking level without masking the original error.
|
|
49
|
+
|
|
50
|
+
### Fixed
|
|
51
|
+
|
|
52
|
+
- Gajae Pet overlays no longer leak images or stale pixels across lifecycle changes: each widget owns a randomized Kitty image ID (deleted on disable, replace, switch, and dispose), the previous Sixel footprint is tracked and erased on movement, resize, and narrow-terminal fallback, replaced pet widgets are disposed before their successors install, and a saved pet preference survives editor replacement while graphics are still unavailable (so a delayed Sixel capability probe can still activate it). Teardown is exception-safe and idempotent: a failed or unavailable terminal write never aborts logical disposal or steals a successor widget's overlay slot, and Sixel/Kitty cleanup authority is retained until the erase is actually delivered so a later mode switch or dispose retries it.
|
|
53
|
+
- Gajae Pet cleanup that fails during final widget disposal is now retained by the TUI for retry, and Kitty image IDs remain reserved until their exact-ID delete is delivered.
|
|
54
|
+
- Fixed `gjc --tmux` startup from GNOME and other VTE terminals by recognizing `vte-spawn-*.scope` only when cgroup metadata proves matching user-manager ancestry (#2159).
|
|
55
|
+
- Fixed native Windows `GJC_TMUX_COMMAND=tmux` resolution when WinGet's `tmux.exe` is a psmux alias with a generic `tmux` banner: GJC now compares executable identity with the installed `psmux.exe`/`pmux.exe` companions and fails closed when identity cannot be established instead of authorizing native-tmux semantics (#2086).
|
|
56
|
+
|
|
57
|
+
- Accepted or declined initial external credential-import decisions now persist across normal restarts and upgrades, suppressing automatic startup and bare `/login` discovery; same-version legacy markers remain compatible and explicit `/provider` import remains available ([#2117](https://github.com/Yeachan-Heo/gajae-code/issues/2117)).
|
|
58
|
+
|
|
59
|
+
|
|
5
60
|
## [0.10.1] - 2026-07-13
|
|
6
61
|
|
|
7
62
|
### Added
|
|
8
63
|
|
|
64
|
+
- Added an owner-proof idle session reaper and `gjc_coordinator_stop_session` for ephemeral (delegate-created) coordinator sessions. Termination goes exclusively through the canonical SDK broker `session.close` lifecycle (durable process identity verified before close) — never a raw `process.kill` or tmux control. The reaper re-validates ephemeral and no-active-turn state at close time under the same per-session mutation lock as delegate reuse, and purges coordinator metadata only after SDK closure is verified, retaining it when closure cannot be confirmed (#2080).
|
|
65
|
+
|
|
9
66
|
- Added an owner-proof idle session reaper and `gjc_coordinator_stop_session` for ephemeral (delegate-created) coordinator sessions. Termination goes exclusively through the owner-proof `forceCloseGjcTmuxSession` path (pid, native session id, owner generation, server key, and start time all verified before SIGTERM) — never a raw `process.kill`. The reaper binds each close to the persisted runtime-state file, re-validates ephemeral and no-active-turn at kill time under the same per-session mutation lock as delegate reuse, and purges state only on verified termination (#2080).
|
|
10
|
-
-
|
|
67
|
+
- SDK clients can now pass an explicit thinking level to `model.set`, atomically applying the effective model and thinking level to the active session and the machine-global default for future sessions, while project policy and resumed session history retain precedence.
|
|
11
68
|
- Context-usage tokens/% now use provider-reported usage as the single source of truth on every surface. `AgentSession.getContextUsage()` returns a source-tagged snapshot (`source: "provider_anchor" | "heuristic" | "unknown"`), and the status-line `context_pct` segment, inline model percentage, and `/context` totals consume that snapshot instead of recomputing an independent heuristic sum — so footer, status line, `/context`, ACP, and RPC can no longer disagree about the same session state. Heuristic estimation now applies only when no provider anchor exists (session start, aborted/error-only turns), and that fallback now includes the fixed system-prompt/tool/skill context it previously omitted. The pre-prompt compaction estimate honors the latest-compaction boundary (never anchors on stale pre-compaction usage totals), unknown post-compaction usage stays unknown (status line renders `?`; ACP omits the `usage_update` instead of reporting `used: 0`), and `/context` labels its total by provenance with a reconciliation line when the estimated category composition diverges from the provider-reported total.
|
|
69
|
+
- Post-durable default-model-selection failures now expose a stable SDK error with bounded `restored`, `partial`, or `unknown` rollback state; preflight and validation errors remain unchanged.
|
|
12
70
|
### Fixed
|
|
71
|
+
- Made SDK host startup publish its runtime and initial identity frame before exposing direct-v3 transport endpoints, preventing early replay/control frames from being dropped or dereferencing uninitialized session state under concurrent test and process load.
|
|
13
72
|
|
|
14
73
|
- IRC deliveries now accept their exchange batch in the recipient's volatile current-session queue before recipient/main UI observations or sender success. Awaited deliveries generate the reply first, then accept the ordered incoming + auto-reply pair and commit the IRC roster claim before observation; provider failures and sender aborts before acceptance leave no ghost exchange, while observer failures after acceptance are isolated. This is not a durability guarantee: durable history injection remains a later flush and no fsync, recovery, persistent IDs, or deduplication was added.
|
|
74
|
+
- `/model` role-agent assignments now replace active model-profile overrides immediately, so changing architect, critic, planner, or executor models and reasoning levels takes effect in the current session and remains persisted afterward.
|
|
15
75
|
- Print mode now records terminal text-mode errors as exit status 1 (or 78 for context overflow) without bypassing output quiescence or session disposal. It retains JSON event delivery through disposal and suppresses `EPIPE` from its owned stdout; `ERR_STREAM_DESTROYED` is suppressed only after that `EPIPE` has latched, while other output failures remain errors.
|
|
76
|
+
- Preserved clipboard image attachments when the interactive editor clears the composer before dispatching the submit callback, so Alt+V image placeholders still send their image blocks instead of placeholder-only text (#2126).
|
|
16
77
|
- Extension contexts now receive a defensive copy from `getSystemPrompt()` instead of the live mutable system-prompt array, so an in-place mutation by an in-process extension can no longer bypass context-revision tracking and serve stale display-only context-usage estimates.
|
|
78
|
+
- Completed bracketed-paste input now returns a manually paged transcript to live output before the paste is dispatched, including asynchronous consumed and unconsumed paste paths.
|
|
79
|
+
- Prevented orphaned background processes by reaping failed detached harness owners and their exact SDK session children with verified TERM/KILL cleanup, giving only the invocation-scoped transport-close capability permission to break a direct owner-stop cycle while every public stop caller awaits truthful teardown, keeping runtime-owner lease/heartbeat authority live while failed teardown retries, binding broker discovery to OS process incarnations before accepting retained ownership, making isolated ACP and broker subprocess tests stop their exact broker before deleting temporary state, and adding a cooperative Telegram daemon watchdog that stops superseded or non-progressing owners.
|
|
80
|
+
- Preserved clipboard image attachments when the interactive editor clears the composer before dispatching the submit callback, so Alt+V image placeholders still send their image blocks instead of placeholder-only text (#2126).
|
|
81
|
+
- Completed bracketed-paste input now returns a manually paged transcript to live output before the paste is dispatched, including asynchronous consumed and unconsumed paste paths.
|
|
82
|
+
- Telegram `/usage` now includes secret-safe 5-hour and weekly limit summaries when normalized provider data is available, `/reasoning` reports effort/scope/display with compatible controls and accurate help, and `/model` offers owner-authorized one-shot inline buttons with stale/invalid callback safeguards (#2095).
|
|
17
83
|
|
|
18
84
|
## [0.10.0] - 2026-07-12
|
|
19
85
|
|
|
@@ -30,15 +96,17 @@
|
|
|
30
96
|
- Added a transport-agnostic, secret-safe shared notification service (status, health, test delivery, ownership-protected recovery) consumed by both the `gjc notify` CLI and the cross-mode `/notify` slash command (TUI + ACP), so onboarding and daemon recovery no longer duplicate daemon/config logic per surface. `/notify` now exposes `status|health|test|recovery|setup` and `gjc notify` gains `health`/`test`/`recovery` with `--probe`/`--message` (#2050).
|
|
31
97
|
- Added beginner-safe `gjc daemon` operational shortcuts sharing one operator contract so the guided human surface and machine-readable `--json` never drift: a `restart` alias that resolves to reload-if-running-else-spawn, concise per-daemon output by default with `--verbose`/`-v` for runtime detail and the full roots list, and an actionable structured recovery path when token/chat ownership mismatches instead of a large payload ending in `blocked`. Exit codes stay 0 on success / 1 on failure (#2057).
|
|
32
98
|
- Added fail-closed ACP session deletion: the delete path refuses rather than proceeding when the target session cannot be safely resolved, and retains the inode in the replacement case (#2074).
|
|
99
|
+
- Added the interactive **Notifications** settings tab with masked Telegram setup, global and session controls, health/test/recovery/reconnect actions, atomic preference saves, and safe blocked-owner recovery guidance (#2050).
|
|
33
100
|
|
|
34
101
|
### Changed
|
|
35
102
|
|
|
36
|
-
- Migrated the repository type-check and release declaration pipeline to stable TypeScript 7.0.2
|
|
103
|
+
- Migrated the repository type-check and release declaration pipeline to stable TypeScript 7.0.2 with a non-mutating publish-type gate.
|
|
37
104
|
- Rebalanced GPT-5.6 Codex and combo presets around published family tiers and reasoning-effort curves. The executor assignments are informed by descriptive repeated local exact-edit evidence from selected TypeScript tasks; default, planner, architect, and critic assignments remain product judgments rather than benchmark claims.
|
|
38
105
|
- Cache-miss diagnostics now separate actionable, diagnostic-only, and provider-side-suspected causes instead of asserting a user-side fix for every miss (#2020). A large, costly miss with no cache reads or writes is reported as a neutral `Cache notice` marked "provider-side suspected / not user-actionable" (with what GJC cannot determine) rather than telling the user to keep a stable prefix; a miss with reads but no writes is reported as diagnostic-only without asserting a single cause; and the "cache write without enough matching reads" warning now only fires when reads actually fail to cover the writes. The existing miss cost summary and the #1929/#1936 pricing/provenance safeguards are unchanged.
|
|
39
106
|
|
|
40
107
|
### Fixed
|
|
41
108
|
|
|
109
|
+
- Fixed native-Windows coordinator/runtime compatibility by treating psmux's successful empty `list-sessions` response as an absent server while keeping malformed rows fail-closed, reading process incarnations through a validated PowerShell start-time query, sharing the existing BOM-free encoded PowerShell pane command, preserving multiline SDK prompts behind semantic readiness, and retaining runtime command/turn acknowledgement identity across Windows-equivalent workspace paths (#2145).
|
|
42
110
|
- The coordinator MCP owner-server probe now recognizes tmux ≥3.7's missing-server diagnostic (`error connecting to <socket> (No such file or directory)`) as an absent server. tmux 3.7 changed the wording from the older `no server running on <socket>`, which the coordinator probe did not match — so a brand-new coordinator socket (which never has a server yet) was misclassified `unverifiable` instead of `absent`, and **every** `gjc_delegate_*` / session create failed closed with `coordinator_tmux_owner_server_unverifiable` on tmux ≥3.7. The coordinator and `gjc` harness probes now match the same no-server wordings the other owner-isolation probes already did.
|
|
43
111
|
- Preserved explicit Telegram forum-topic renames as durable user-owned names, immediately re-asserting delayed edits while retaining restart and rename-race recovery (#1910).
|
|
44
112
|
- Prevented typed provider safety stops from entering automatic retry loops and aligned ACP refusal reporting with the provider-native classification.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Single source of truth for append-only context-mode resolution and manager
|
|
3
|
-
* construction. Both the initial session build (`sdk.ts`) and the runtime
|
|
3
|
+
* construction. Both the initial session build (`sdk/session.ts`) and the runtime
|
|
4
4
|
* model/setting-change path (`agent-session.ts`), plus the status UI, resolve
|
|
5
5
|
* through here so the auto allowlist and prefix-reset diagnostics never drift.
|
|
6
6
|
*/
|
package/dist/types/cli/args.d.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CLI argument parsing and help display
|
|
3
|
-
*/
|
|
4
1
|
import { type Effort } from "@gajae-code/ai";
|
|
5
|
-
export type Mode = "text" | "json" | "
|
|
2
|
+
export type Mode = "text" | "json" | "acp";
|
|
6
3
|
export interface Args {
|
|
7
4
|
cwd?: string;
|
|
8
5
|
allowHome?: boolean;
|
|
@@ -17,6 +14,7 @@ export interface Args {
|
|
|
17
14
|
credential?: string;
|
|
18
15
|
systemPrompt?: string;
|
|
19
16
|
appendSystemPrompt?: string;
|
|
17
|
+
mcpConfig?: string;
|
|
20
18
|
thinking?: Effort;
|
|
21
19
|
continue?: boolean;
|
|
22
20
|
resume?: string | true;
|
|
@@ -25,7 +23,6 @@ export interface Args {
|
|
|
25
23
|
mode?: Mode;
|
|
26
24
|
noSession?: boolean;
|
|
27
25
|
sessionDir?: string;
|
|
28
|
-
rpcListen?: string;
|
|
29
26
|
providerSessionId?: string;
|
|
30
27
|
fork?: string;
|
|
31
28
|
models?: string[];
|
|
@@ -51,6 +48,8 @@ export interface Args {
|
|
|
51
48
|
fileArgs: string[];
|
|
52
49
|
/** Retained for test/runtime compatibility; extension-defined flags are no longer parsed. */
|
|
53
50
|
unknownFlags: Map<string, boolean | string>;
|
|
51
|
+
/** Exact interactive startup login intent, recognized before model-profile activation. */
|
|
52
|
+
authBootstrap?: true;
|
|
54
53
|
}
|
|
55
54
|
export declare function parseArgs(args: string[]): Args;
|
|
56
55
|
export declare function getExtraHelpText(): string;
|
|
@@ -7,8 +7,16 @@
|
|
|
7
7
|
import { Settings } from "../config/settings";
|
|
8
8
|
import type { BuiltInDaemonController, DaemonKind } from "../daemon/control-types";
|
|
9
9
|
export type DaemonCliAction = "list" | "status" | "stop" | "reload";
|
|
10
|
+
export type DaemonInternalCliAction = "discord-internal" | "slack-internal";
|
|
11
|
+
export type DaemonCommandAction = DaemonCliAction | DaemonInternalCliAction;
|
|
12
|
+
export declare class UnknownDaemonKindError extends Error {
|
|
13
|
+
readonly kinds: readonly string[];
|
|
14
|
+
readonly knownKinds: readonly DaemonKind[];
|
|
15
|
+
constructor(kinds: readonly string[], knownKinds: readonly DaemonKind[]);
|
|
16
|
+
}
|
|
17
|
+
export declare function isDaemonInternalAction(action: DaemonCommandAction): action is DaemonInternalCliAction;
|
|
10
18
|
export interface DaemonCommandArgs {
|
|
11
|
-
action:
|
|
19
|
+
action: DaemonCommandAction;
|
|
12
20
|
kinds: DaemonKind[];
|
|
13
21
|
all: boolean;
|
|
14
22
|
json: boolean;
|
|
@@ -16,6 +24,9 @@ export interface DaemonCommandArgs {
|
|
|
16
24
|
gracefulTimeoutMs?: number;
|
|
17
25
|
killTimeoutMs?: number;
|
|
18
26
|
spawnIfStopped?: boolean;
|
|
27
|
+
smoke?: boolean;
|
|
28
|
+
ownerId?: string;
|
|
29
|
+
agentDir?: string;
|
|
19
30
|
/** Show runtime detail and the full roots list in human output. */
|
|
20
31
|
verbose?: boolean;
|
|
21
32
|
}
|
|
@@ -1,11 +1,24 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Settings } from "../config/settings";
|
|
2
|
+
import { type EnsureChatDaemonResult } from "../sdk/bus/chat-daemon-control";
|
|
3
|
+
import { type TelegramSetupPreflight, type TelegramSetupTimers } from "../sdk/bus/telegram-setup";
|
|
2
4
|
export type NotifyAction = "setup" | "status" | "health" | "test" | "recovery" | "daemon-internal";
|
|
5
|
+
export type NotifySetupProvider = "telegram" | "discord" | "slack";
|
|
3
6
|
export interface NotifyCommandArgs {
|
|
4
7
|
action: NotifyAction;
|
|
5
8
|
smoke?: boolean;
|
|
6
9
|
rawArgs: string[];
|
|
10
|
+
provider?: NotifySetupProvider;
|
|
7
11
|
token?: string;
|
|
8
12
|
chatId?: string;
|
|
13
|
+
discordBotToken?: string;
|
|
14
|
+
discordApplicationId?: string;
|
|
15
|
+
discordGuildId?: string;
|
|
16
|
+
discordParentChannelId?: string;
|
|
17
|
+
slackBotToken?: string;
|
|
18
|
+
slackAppToken?: string;
|
|
19
|
+
slackWorkspaceId?: string;
|
|
20
|
+
slackChannelId?: string;
|
|
21
|
+
slackAuthorizedUserId?: string;
|
|
9
22
|
redact?: boolean;
|
|
10
23
|
probe?: boolean;
|
|
11
24
|
message?: string;
|
|
@@ -24,6 +37,13 @@ export interface NotifyCommandDeps {
|
|
|
24
37
|
tokenPrompt?: () => Promise<string>;
|
|
25
38
|
setExitCode?: (code: number) => void;
|
|
26
39
|
exitProcess?: (code: number) => void;
|
|
40
|
+
/** Optional daemon ownership facts collected by an embedding host. */
|
|
41
|
+
setupPreflight?: TelegramSetupPreflight;
|
|
42
|
+
/** Injectable timers and cancellation for setup pairing. */
|
|
43
|
+
setupTimers?: TelegramSetupTimers;
|
|
44
|
+
setupAbortSignal?: AbortSignal;
|
|
45
|
+
setupPidAlive?: (pid: number) => boolean;
|
|
46
|
+
ensureProviderDaemon?: (provider: "discord" | "slack", settings: Settings) => Promise<EnsureChatDaemonResult | "failed">;
|
|
27
47
|
}
|
|
28
48
|
export declare function parseNotifyArgs(args: string[]): NotifyCommandArgs | undefined;
|
|
29
49
|
export declare function runNotifyCommand(cmd: NotifyCommandArgs, deps?: NotifyCommandDeps): Promise<void>;
|
package/dist/types/cli.d.ts
CHANGED
|
@@ -50,6 +50,9 @@ export declare class RootHelpCommand extends Command {
|
|
|
50
50
|
"append-system-prompt": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
51
51
|
description: string;
|
|
52
52
|
};
|
|
53
|
+
"mcp-config": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
54
|
+
description: string;
|
|
55
|
+
};
|
|
53
56
|
"allow-home": import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
54
57
|
description: string;
|
|
55
58
|
};
|
|
@@ -40,6 +40,45 @@ export default class Daemon extends Command {
|
|
|
40
40
|
"spawn-if-stopped": import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
41
41
|
description: string;
|
|
42
42
|
};
|
|
43
|
+
smoke: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
44
|
+
description: string;
|
|
45
|
+
};
|
|
46
|
+
"owner-id": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
47
|
+
description: string;
|
|
48
|
+
};
|
|
49
|
+
"agent-dir": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
50
|
+
description: string;
|
|
51
|
+
};
|
|
52
|
+
op: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
53
|
+
description: string;
|
|
54
|
+
};
|
|
55
|
+
"idempotency-key": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
56
|
+
description: string;
|
|
57
|
+
};
|
|
58
|
+
"json-input": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
59
|
+
description: string;
|
|
60
|
+
};
|
|
61
|
+
"json-input-file": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
62
|
+
description: string;
|
|
63
|
+
};
|
|
64
|
+
"json-input-stdin": import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
65
|
+
description: string;
|
|
66
|
+
};
|
|
67
|
+
confirm: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
68
|
+
description: string;
|
|
69
|
+
};
|
|
70
|
+
query: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
71
|
+
description: string;
|
|
72
|
+
};
|
|
73
|
+
cursor: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
74
|
+
description: string;
|
|
75
|
+
};
|
|
76
|
+
"show-endpoint-credential": import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
77
|
+
description: string;
|
|
78
|
+
};
|
|
79
|
+
yes: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
80
|
+
description: string;
|
|
81
|
+
};
|
|
43
82
|
};
|
|
44
83
|
run(): Promise<void>;
|
|
45
84
|
}
|
|
@@ -47,6 +47,9 @@ export default class Index extends Command {
|
|
|
47
47
|
"append-system-prompt": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
48
48
|
description: string;
|
|
49
49
|
};
|
|
50
|
+
"mcp-config": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
51
|
+
description: string;
|
|
52
|
+
};
|
|
50
53
|
"allow-home": import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
51
54
|
description: string;
|
|
52
55
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Configure Telegram notifications.
|
|
2
|
+
* Configure Telegram, Discord, or Slack notifications.
|
|
3
3
|
*/
|
|
4
4
|
import { Command } from "@gajae-code/utils/cli";
|
|
5
5
|
import { type NotifyAction } from "../cli/notify-cli";
|
|
@@ -27,6 +27,33 @@ export default class Notify extends Command {
|
|
|
27
27
|
"chat-id": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
28
28
|
description: string;
|
|
29
29
|
};
|
|
30
|
+
"discord-bot-token": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
"discord-application-id": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
34
|
+
description: string;
|
|
35
|
+
};
|
|
36
|
+
"discord-guild-id": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
37
|
+
description: string;
|
|
38
|
+
};
|
|
39
|
+
"discord-parent-channel-id": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
40
|
+
description: string;
|
|
41
|
+
};
|
|
42
|
+
"slack-bot-token": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
43
|
+
description: string;
|
|
44
|
+
};
|
|
45
|
+
"slack-app-token": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
46
|
+
description: string;
|
|
47
|
+
};
|
|
48
|
+
"slack-workspace-id": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
49
|
+
description: string;
|
|
50
|
+
};
|
|
51
|
+
"slack-channel-id": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
52
|
+
description: string;
|
|
53
|
+
};
|
|
54
|
+
"slack-authorized-user-id": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
55
|
+
description: string;
|
|
56
|
+
};
|
|
30
57
|
redact: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
31
58
|
description: string;
|
|
32
59
|
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Command } from "@gajae-code/utils/cli";
|
|
2
|
+
import type { Args as ParsedArgs } from "../cli/args";
|
|
3
|
+
import { type SessionLifecycleLaunchRequest } from "../sdk/broker/lifecycle";
|
|
4
|
+
import { SessionManager } from "../session/session-manager";
|
|
5
|
+
export declare function lifecycleArgs(request: SessionLifecycleLaunchRequest, cwd: string, agentDir: string): ParsedArgs;
|
|
6
|
+
/** Opens lifecycle-authorized history without letting replacement content reach readiness. */
|
|
7
|
+
export declare function openLifecycleSessionManager(request: SessionLifecycleLaunchRequest, cwd: string, agentDir: string): Promise<{
|
|
8
|
+
parsed: ParsedArgs;
|
|
9
|
+
sessionManager: SessionManager | undefined;
|
|
10
|
+
}>;
|
|
11
|
+
/** Runs the same persisted AgentSession bootstrap used by the production CLI. */
|
|
12
|
+
export declare function runSessionHost(timing?: {
|
|
13
|
+
now?: () => number;
|
|
14
|
+
sleep?: (ms: number) => Promise<void>;
|
|
15
|
+
cwd?: string;
|
|
16
|
+
processIncarnation?: (pid: number) => string | undefined;
|
|
17
|
+
}): Promise<void>;
|
|
18
|
+
export default class Sdk extends Command {
|
|
19
|
+
static description: string;
|
|
20
|
+
static hidden: boolean;
|
|
21
|
+
static args: {
|
|
22
|
+
action: import("@gajae-code/utils/cli").ArgDescriptor & {
|
|
23
|
+
required: true;
|
|
24
|
+
options: string[];
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
static flags: {
|
|
28
|
+
"agent-dir": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
29
|
+
description: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
run(): Promise<void>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
export interface AtomicYamlSetPatch {
|
|
2
|
+
path: string;
|
|
3
|
+
op: "set";
|
|
4
|
+
value: unknown;
|
|
5
|
+
}
|
|
6
|
+
export interface AtomicYamlUnsetPatch {
|
|
7
|
+
path: string;
|
|
8
|
+
op: "unset";
|
|
9
|
+
}
|
|
10
|
+
export type AtomicYamlPatch = AtomicYamlSetPatch | AtomicYamlUnsetPatch;
|
|
11
|
+
export interface AtomicYamlPatchRevision {
|
|
12
|
+
path: string;
|
|
13
|
+
beforeHash: string;
|
|
14
|
+
afterHash: string;
|
|
15
|
+
beforeRevision: number;
|
|
16
|
+
afterRevision: number;
|
|
17
|
+
}
|
|
18
|
+
export type CasRestoreResult = {
|
|
19
|
+
status: "restored";
|
|
20
|
+
receipt: CasReceipt;
|
|
21
|
+
} | {
|
|
22
|
+
status: "conflict";
|
|
23
|
+
paths: readonly string[];
|
|
24
|
+
} | {
|
|
25
|
+
status: "discarded";
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* A receipt intentionally exposes only path-level hashes and opaque revisions.
|
|
29
|
+
* The before values needed by restore stay in this module's closure.
|
|
30
|
+
*/
|
|
31
|
+
export interface CasReceipt {
|
|
32
|
+
readonly revisions: readonly AtomicYamlPatchRevision[];
|
|
33
|
+
restore(): Promise<CasRestoreResult>;
|
|
34
|
+
discard(): void;
|
|
35
|
+
}
|
|
36
|
+
export interface AtomicYamlUpdate<T> {
|
|
37
|
+
apply(current: Record<string, unknown>): T | Promise<T>;
|
|
38
|
+
shouldWrite?(result: T): boolean;
|
|
39
|
+
committed?(current: Record<string, unknown>, result: T): void | Promise<void>;
|
|
40
|
+
}
|
|
41
|
+
export interface AtomicYamlPatchOptions {
|
|
42
|
+
/** Test seam for deterministic pre-rename and Windows sharing-violation failures. */
|
|
43
|
+
rename?: (from: string, to: string) => Promise<void>;
|
|
44
|
+
/** Test seam for bounded retry timing. */
|
|
45
|
+
sleep?: (ms: number) => Promise<void>;
|
|
46
|
+
/** Test seam for Windows rename retry behavior. */
|
|
47
|
+
platform?: NodeJS.Platform;
|
|
48
|
+
/** Called under the config lock after a successful CAS restore. */
|
|
49
|
+
onRestored?: (patches: readonly AtomicYamlPatch[]) => void | Promise<void>;
|
|
50
|
+
}
|
|
51
|
+
/** A replacement failure never unlinks the destination as a fallback. */
|
|
52
|
+
export declare class AtomicYamlReplaceError extends Error {
|
|
53
|
+
readonly configPath: string;
|
|
54
|
+
readonly attempts: number;
|
|
55
|
+
readonly cause: unknown;
|
|
56
|
+
readonly code = "ATOMIC_YAML_REPLACE_FAILED";
|
|
57
|
+
constructor(configPath: string, attempts: number, cause: unknown);
|
|
58
|
+
}
|
|
59
|
+
/** Set a dotted YAML path, creating object intermediates as needed. */
|
|
60
|
+
export declare function setByPath(value: Record<string, unknown>, segments: readonly string[], nextValue: unknown): void;
|
|
61
|
+
/** Delete a dotted YAML path without disturbing sibling keys or parent objects. */
|
|
62
|
+
export declare function deleteByPath(value: Record<string, unknown>, segments: readonly string[]): void;
|
|
63
|
+
/** Build patches from current durable YAML while holding the shared queue and file lock. */
|
|
64
|
+
export declare function applyAtomicYamlPatchesWithCurrent(configPath: string, buildPatches: (current: Readonly<Record<string, unknown>>) => Promise<readonly AtomicYamlPatch[]> | readonly AtomicYamlPatch[], options?: AtomicYamlPatchOptions): Promise<CasReceipt>;
|
|
65
|
+
/**
|
|
66
|
+
* Reserve a FIFO operation for a config file immediately. The patch supplier runs
|
|
67
|
+
* only when this operation reaches the front of the in-process queue, which lets
|
|
68
|
+
* Settings debounce/coalesce inside its already-reserved causal slot.
|
|
69
|
+
*/
|
|
70
|
+
export declare function enqueueAtomicYamlOperation<T>(configPath: string, operation: (canonicalConfigPath: string) => Promise<T>): Promise<T>;
|
|
71
|
+
/**
|
|
72
|
+
* Reserve an atomic patch slot now, producing patches only after earlier slots
|
|
73
|
+
* complete. Writers with state-aware merges use {@link reserveAtomicYamlUpdateSlot}.
|
|
74
|
+
*/
|
|
75
|
+
export declare function reserveAtomicYamlPatchSlot(configPath: string, patches: () => Promise<readonly AtomicYamlPatch[]> | readonly AtomicYamlPatch[], options?: AtomicYamlPatchOptions): Promise<CasReceipt>;
|
|
76
|
+
/**
|
|
77
|
+
* Reserve a FIFO update slot and atomically persist a caller-owned YAML mutation.
|
|
78
|
+
* The supplier runs only when its operation reaches the front of the queue.
|
|
79
|
+
*/
|
|
80
|
+
export declare function reserveAtomicYamlUpdateSlot<T>(configPath: string, update: () => Promise<AtomicYamlUpdate<T>> | AtomicYamlUpdate<T>, options?: AtomicYamlPatchOptions): Promise<T>;
|
|
81
|
+
/**
|
|
82
|
+
* Apply tagged patches through the one per-file in-process queue and the shared
|
|
83
|
+
* cross-process file lock. Success means the temp file was fsynced and renamed.
|
|
84
|
+
*/
|
|
85
|
+
export declare function applyAtomicYamlPatches(configPath: string, patches: readonly AtomicYamlPatch[], options?: AtomicYamlPatchOptions): Promise<CasReceipt>;
|
|
@@ -2,13 +2,18 @@ import { ThinkingLevel } from "@gajae-code/agent-core";
|
|
|
2
2
|
import type { Api, Model } from "@gajae-code/ai";
|
|
3
3
|
import type { AgentSession } from "../session/agent-session";
|
|
4
4
|
import { type GjcModelAssignmentTargetId, type ModelRegistry } from "./model-registry";
|
|
5
|
+
import { type ModelSelectorValue } from "./model-selector-value";
|
|
5
6
|
import type { Settings } from "./settings";
|
|
6
|
-
type ModelProfileActivationSession = Pick<AgentSession, "model" | "thinkingLevel" | "sessionId"> & {
|
|
7
|
+
type ModelProfileActivationSession = Pick<AgentSession, "model" | "thinkingLevel" | "sessionId" | "getConfiguredModelChain" | "setConfiguredModelChain"> & {
|
|
7
8
|
setModelTemporary?: AgentSession["setModelTemporary"];
|
|
8
9
|
setActiveModelProfile?: (name: string | undefined) => void;
|
|
9
10
|
getActiveModelProfile?: () => string | undefined;
|
|
10
11
|
getSessionDefaultModelSelector?: () => string | undefined;
|
|
11
12
|
recordResumeDefaultModel?: (selector: string) => void;
|
|
13
|
+
seedDefaultFallbackResolution?: (activeIndex: number, skips: Array<{
|
|
14
|
+
selector: string;
|
|
15
|
+
reason: string;
|
|
16
|
+
}>) => void;
|
|
12
17
|
};
|
|
13
18
|
export interface PrepareModelProfileActivationOptions {
|
|
14
19
|
session: ModelProfileActivationSession;
|
|
@@ -25,15 +30,25 @@ export interface PreparedModelProfileActivation {
|
|
|
25
30
|
session: ModelProfileActivationSession & {
|
|
26
31
|
setModelTemporary: AgentSession["setModelTemporary"];
|
|
27
32
|
};
|
|
28
|
-
settings: Pick<Settings, "clearOverride" | "get" | "getGlobal" | "override" | "set" | "flush">;
|
|
33
|
+
settings: Pick<Settings, "clearOverride" | "get" | "getGlobal" | "override" | "set" | "unset" | "flush">;
|
|
29
34
|
previousModel: Model<Api> | undefined;
|
|
30
35
|
previousThinkingLevel: ThinkingLevel | undefined;
|
|
31
|
-
previousAgentModelOverrides: Record<string,
|
|
32
|
-
previousModelRoles: Record<string,
|
|
36
|
+
previousAgentModelOverrides: Record<string, ModelSelectorValue>;
|
|
37
|
+
previousModelRoles: Record<string, ModelSelectorValue>;
|
|
38
|
+
previousDefaultChain: readonly string[] | undefined;
|
|
33
39
|
defaultModel: Model<Api> | undefined;
|
|
34
40
|
defaultThinkingLevel: ThinkingLevel | undefined;
|
|
35
|
-
|
|
36
|
-
|
|
41
|
+
/** Full configured default fallback chain with resolvable entries clamped. */
|
|
42
|
+
defaultChain: readonly string[];
|
|
43
|
+
/** Index of the authenticated default-chain entry selected for activation. */
|
|
44
|
+
defaultActiveIndex: number | undefined;
|
|
45
|
+
/** Resolution-time skips that occurred before selecting the default entry. */
|
|
46
|
+
defaultResolutionSkips: Array<{
|
|
47
|
+
selector: string;
|
|
48
|
+
reason: string;
|
|
49
|
+
}>;
|
|
50
|
+
modelRoles: Record<string, ModelSelectorValue>;
|
|
51
|
+
agentModelOverrides: Record<string, ModelSelectorValue>;
|
|
37
52
|
previousActiveModelProfile: string | undefined;
|
|
38
53
|
/**
|
|
39
54
|
* The session resume default ("provider/id") captured BEFORE activation —
|
|
@@ -45,33 +60,38 @@ export interface PreparedModelProfileActivation {
|
|
|
45
60
|
previousSessionDefaultModel: string | undefined;
|
|
46
61
|
}
|
|
47
62
|
export interface MaterializeModelProfileAssignmentOptions {
|
|
48
|
-
session: Pick<ModelProfileActivationSession, "model" | "thinkingLevel" | "setActiveModelProfile" | "getActiveModelProfile">;
|
|
49
|
-
settings: Pick<Settings, "clearOverride" | "get" | "override" | "set">;
|
|
63
|
+
session: Pick<ModelProfileActivationSession, "model" | "thinkingLevel" | "getConfiguredModelChain" | "setActiveModelProfile" | "getActiveModelProfile">;
|
|
64
|
+
settings: Pick<Settings, "clearOverride" | "get" | "override" | "set" | "unset">;
|
|
50
65
|
role: GjcModelAssignmentTargetId;
|
|
51
66
|
selector: string;
|
|
52
67
|
}
|
|
53
68
|
export interface MaterializeModelProfileAssignmentsOptions {
|
|
54
|
-
session: Pick<ModelProfileActivationSession, "model" | "thinkingLevel" | "setActiveModelProfile" | "getActiveModelProfile">;
|
|
55
|
-
settings: Pick<Settings, "clearOverride" | "get" | "override" | "set">;
|
|
69
|
+
session: Pick<ModelProfileActivationSession, "model" | "thinkingLevel" | "getConfiguredModelChain" | "setActiveModelProfile" | "getActiveModelProfile">;
|
|
70
|
+
settings: Pick<Settings, "clearOverride" | "get" | "override" | "set" | "unset">;
|
|
56
71
|
assignments: ReadonlyMap<GjcModelAssignmentTargetId, string> | Partial<Record<GjcModelAssignmentTargetId, string>>;
|
|
57
72
|
}
|
|
58
73
|
export declare function materializeActiveModelProfileAssignment(options: MaterializeModelProfileAssignmentOptions): boolean;
|
|
59
74
|
export declare function materializeActiveModelProfileAssignments(options: MaterializeModelProfileAssignmentsOptions): boolean;
|
|
75
|
+
export declare class ModelProfileCredentialError extends Error {
|
|
76
|
+
readonly profileLabel: string;
|
|
77
|
+
readonly providers: readonly string[];
|
|
78
|
+
constructor(profileLabel: string, providers: readonly string[]);
|
|
79
|
+
}
|
|
60
80
|
export declare function formatModelProfileCredentialError(profileLabel: string, providers: readonly string[]): string;
|
|
61
81
|
export declare function resolveModelProfileName(profileName: string, profiles: ReadonlyMap<string, unknown>): string;
|
|
62
82
|
export declare function prepareModelProfileActivation(options: PrepareModelProfileActivationOptions): Promise<PreparedModelProfileActivation>;
|
|
63
83
|
export declare function applyPreparedModelProfileActivation(prepared: PreparedModelProfileActivation, options?: ApplyModelProfileActivationOptions): Promise<void>;
|
|
64
84
|
export interface MaterializeModelProfileForDeletionResult {
|
|
65
|
-
modelRoles: Record<string,
|
|
66
|
-
agentModelOverrides: Record<string,
|
|
67
|
-
previousModelRoles: Record<string,
|
|
68
|
-
previousAgentModelOverrides: Record<string,
|
|
85
|
+
modelRoles: Record<string, ModelSelectorValue>;
|
|
86
|
+
agentModelOverrides: Record<string, ModelSelectorValue>;
|
|
87
|
+
previousModelRoles: Record<string, ModelSelectorValue>;
|
|
88
|
+
previousAgentModelOverrides: Record<string, ModelSelectorValue>;
|
|
69
89
|
previousDefaultProfile: string | undefined;
|
|
70
90
|
previousPersistedDefaultProfile: string | undefined;
|
|
71
91
|
previousActiveModelProfile: string | undefined;
|
|
72
92
|
}
|
|
73
93
|
export declare function materializeModelProfileForDeletion(options: PrepareModelProfileActivationOptions & {
|
|
74
|
-
settings: Pick<Settings, "clearOverride" | "flush" | "get" | "getGlobal" | "override" | "set">;
|
|
94
|
+
settings: Pick<Settings, "clearOverride" | "flush" | "get" | "getGlobal" | "override" | "set" | "unset">;
|
|
75
95
|
}): Promise<MaterializeModelProfileForDeletionResult>;
|
|
76
96
|
export declare function restoreMaterializedModelProfileForDeletion(options: {
|
|
77
97
|
settings: Pick<Settings, "flush" | "override" | "set">;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { GjcModelAssignmentTargetId } from "./model-registry";
|
|
2
|
+
import { type ModelSelectorValue } from "./model-selector-value";
|
|
2
3
|
import type { ModelsConfig } from "./models-config-schema";
|
|
3
4
|
export type ModelProfileRole = GjcModelAssignmentTargetId;
|
|
4
5
|
export interface ModelProfileDefinition {
|
|
@@ -15,16 +16,21 @@ export interface ModelProfileDefinition {
|
|
|
15
16
|
* means any single xiaomi credential satisfies the group.
|
|
16
17
|
*/
|
|
17
18
|
alternativeProviderGroups?: readonly (readonly string[])[];
|
|
18
|
-
modelMapping: Partial<Record<ModelProfileRole,
|
|
19
|
+
modelMapping: Partial<Record<ModelProfileRole, ModelSelectorValue>>;
|
|
19
20
|
source: "builtin" | "user";
|
|
20
21
|
}
|
|
21
22
|
export interface ResolvedProfileBinding {
|
|
22
|
-
defaultSelector?:
|
|
23
|
-
modelRoles: Record<string,
|
|
24
|
-
agentModelOverrides: Partial<Record<Exclude<ModelProfileRole, "default">,
|
|
23
|
+
defaultSelector?: ModelSelectorValue;
|
|
24
|
+
modelRoles: Record<string, ModelSelectorValue>;
|
|
25
|
+
agentModelOverrides: Partial<Record<Exclude<ModelProfileRole, "default">, ModelSelectorValue>>;
|
|
25
26
|
}
|
|
26
27
|
export declare function deriveModelProfileMappedProviders(definition: Pick<ModelProfileDefinition, "modelMapping">): string[];
|
|
27
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Return the providers explicitly declared as hard prerequisites.
|
|
30
|
+
* Model mappings may reference fallback providers, but those references are
|
|
31
|
+
* resolution-time candidates rather than activation requirements.
|
|
32
|
+
*/
|
|
33
|
+
export declare function aggregateModelProfileRequiredProviders(requiredProviders: readonly string[], _definition: Pick<ModelProfileDefinition, "modelMapping">): string[];
|
|
28
34
|
export declare const BUILTIN_MODEL_PROFILES: readonly ModelProfileDefinition[];
|
|
29
35
|
export interface ModelProfilePresentation {
|
|
30
36
|
displayName: string;
|
|
@@ -265,8 +265,8 @@ export declare const ModelsConfigFile: ConfigFile<{
|
|
|
265
265
|
} | undefined;
|
|
266
266
|
}> | undefined;
|
|
267
267
|
modelBindings?: {
|
|
268
|
-
modelRoles?: Record<string, string> | undefined;
|
|
269
|
-
agentModelOverrides?: Record<string, string> | undefined;
|
|
268
|
+
modelRoles?: Record<string, string | string[]> | undefined;
|
|
269
|
+
agentModelOverrides?: Record<string, string | string[]> | undefined;
|
|
270
270
|
} | undefined;
|
|
271
271
|
equivalence?: {
|
|
272
272
|
overrides?: Record<string, string> | undefined;
|
|
@@ -275,7 +275,7 @@ export declare const ModelsConfigFile: ConfigFile<{
|
|
|
275
275
|
profiles?: Record<string, {
|
|
276
276
|
required_providers: string[];
|
|
277
277
|
display_name?: string | undefined;
|
|
278
|
-
model_mapping: Partial<Record<"architect" | "critic" | "default" | "executor" | "planner", string>>;
|
|
278
|
+
model_mapping: Partial<Record<"architect" | "critic" | "default" | "executor" | "planner", string | string[]>>;
|
|
279
279
|
}> | undefined;
|
|
280
280
|
}>;
|
|
281
281
|
/** Provider override config (baseUrl, headers, apiKey, compat, transport) without custom models */
|