@gajae-code/coding-agent 0.18.7 → 0.18.9
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 +377 -1
- package/dist/types/async/endpoint-id.d.ts +16 -0
- package/dist/types/async/job-manager.d.ts +1 -1
- package/dist/types/async/support.d.ts +0 -14
- package/dist/types/capability/mcp.d.ts +2 -0
- package/dist/types/capability/skill.d.ts +2 -0
- package/dist/types/capability/types.d.ts +2 -0
- package/dist/types/cli/public-command-errors.d.ts +3 -1
- package/dist/types/cli/setup-cli.d.ts +1 -1
- package/dist/types/commands/deep-interview.d.ts +3 -0
- package/dist/types/commands/mcp-serve.d.ts +4 -0
- package/dist/types/config/autorouting-tier-map.d.ts +348 -9
- package/dist/types/config/file-lock.d.ts +1 -0
- package/dist/types/config/model-bindings-applier.d.ts +2 -0
- package/dist/types/config/model-profile-activation.d.ts +11 -3
- package/dist/types/config/model-registry.d.ts +4 -9
- package/dist/types/config/skill-settings-defaults.d.ts +2 -0
- package/dist/types/cursor-delete-path.d.ts +1 -0
- package/dist/types/cursor-mcp-name.d.ts +8 -0
- package/dist/types/customization/inventory.d.ts +2 -0
- package/dist/types/debug/report-bundle-parent.d.ts +2 -0
- package/dist/types/defaults/gjc/extensions/grok-cli-vendor/src/provider/stream.d.ts +1 -0
- package/dist/types/defaults/gjc/extensions/grok-cli-vendor/src/provider/version-manager.d.ts +31 -0
- package/dist/types/defaults/gjc-skills.generated.d.ts +5 -6
- package/dist/types/discovery/helpers.d.ts +6 -1
- package/dist/types/discovery/mcp-json.d.ts +1 -0
- package/dist/types/eval/py/kernel.d.ts +18 -0
- package/dist/types/export/html/css-color.d.ts +2 -0
- package/dist/types/export/html/html-export-destination.d.ts +2 -0
- package/dist/types/export/html/template.generated.d.ts +1 -1
- package/dist/types/extensibility/extensions/function-hooks-internal.d.ts +5 -0
- package/dist/types/extensibility/extensions/types.d.ts +7 -0
- package/dist/types/extensibility/gjc-plugins/runtime-adapters.d.ts +14 -1
- package/dist/types/extensibility/plugins/marketplace/cache.d.ts +2 -0
- package/dist/types/extensibility/plugins/plugin-link-path.d.ts +2 -0
- package/dist/types/extensibility/runtime-skill-discovery.d.ts +3 -1
- package/dist/types/extensibility/skill-management.d.ts +4 -1
- package/dist/types/extensibility/skills.d.ts +2 -0
- package/dist/types/gjc-runtime/deep-interview-crystallize.d.ts +74 -0
- package/dist/types/gjc-runtime/deep-interview-runtime.d.ts +11 -0
- package/dist/types/gjc-runtime/gc-runtime.d.ts +5 -0
- package/dist/types/gjc-runtime/psmux-detect.d.ts +3 -3
- package/dist/types/gjc-runtime/ralplan-runtime.d.ts +0 -5
- package/dist/types/gjc-runtime/sidecar-bootstrap-env.d.ts +6 -0
- package/dist/types/gjc-runtime/state-argv.d.ts +1 -1
- package/dist/types/gjc-runtime/state-migrations.d.ts +8 -0
- package/dist/types/gjc-runtime/state-runtime.d.ts +95 -0
- package/dist/types/gjc-runtime/state-writer.d.ts +14 -1
- package/dist/types/gjc-runtime/tmux-common.d.ts +8 -5
- package/dist/types/gjc-runtime/ultragoal-runtime.d.ts +8 -0
- package/dist/types/internal-urls/skill-path.d.ts +1 -0
- package/dist/types/lsp/config.d.ts +8 -5
- package/dist/types/lsp/workspace-path.d.ts +1 -0
- package/dist/types/modes/acp/acp-agent.d.ts +7 -0
- package/dist/types/modes/components/custom-editor.d.ts +6 -0
- package/dist/types/modes/components/customization/customization-dashboard.d.ts +1 -0
- package/dist/types/modes/components/extensions/state-manager.d.ts +4 -3
- package/dist/types/modes/controllers/input-controller.d.ts +9 -0
- package/dist/types/modes/interactive-mode.d.ts +1 -0
- package/dist/types/modes/utils/interrupt-ownership.d.ts +3 -0
- package/dist/types/modes/utils/keybinding-matchers.d.ts +1 -0
- package/dist/types/modes/utils/macos-option-forwarding.d.ts +17 -0
- package/dist/types/progress/collect-project-progress.d.ts +38 -0
- package/dist/types/progress/progress-contract.d.ts +154 -0
- package/dist/types/progress/progress-snapshot.d.ts +11 -0
- package/dist/types/progress/project-progress.d.ts +141 -0
- package/dist/types/progress/render-progress.d.ts +28 -0
- package/dist/types/runtime-mcp/manager.d.ts +2 -1
- package/dist/types/runtime-mcp/mcp-redirect.d.ts +9 -0
- package/dist/types/runtime-mcp/oauth-public-url.d.ts +3 -0
- package/dist/types/runtime-mcp/plugin-network-boundary.d.ts +1 -0
- package/dist/types/runtime-mcp/project-host-values.d.ts +27 -0
- package/dist/types/runtime-mcp/smithery-registry.d.ts +24 -0
- package/dist/types/runtime-mcp/types.d.ts +6 -0
- package/dist/types/sdk/acp/adapter.d.ts +1 -1
- package/dist/types/sdk/broker/broker-exit.d.ts +6 -2
- package/dist/types/sdk/broker/broker.d.ts +24 -2
- package/dist/types/sdk/broker/doctor-restart.d.ts +5 -0
- package/dist/types/sdk/broker/ensure.d.ts +14 -1
- package/dist/types/sdk/broker/session-index.d.ts +12 -6
- package/dist/types/sdk/bus/index.d.ts +12 -1
- package/dist/types/sdk/bus/telegram-daemon-contract.d.ts +6 -1
- package/dist/types/sdk/client/client.d.ts +2 -0
- package/dist/types/sdk/host/query/handlers.d.ts +3 -0
- package/dist/types/sdk/index.d.ts +1 -0
- package/dist/types/sdk/router/session-router.d.ts +2 -0
- package/dist/types/sdk/session-list.d.ts +1 -1
- package/dist/types/sdk/session.d.ts +8 -0
- package/dist/types/session/agent-session.d.ts +38 -9
- package/dist/types/session/artifacts.d.ts +2 -2
- package/dist/types/session/internal/managed-gc-retirement-codec.d.ts +32 -0
- package/dist/types/session/internal/managed-session-scope.d.ts +79 -2
- package/dist/types/session/internal/managed-session-storage.d.ts +26 -1
- package/dist/types/session/internal/managed-task-owner-cleanup.d.ts +62 -0
- package/dist/types/session/internal/task-artifact-owner-access.d.ts +2 -0
- package/dist/types/session/internal/task-artifact-owner-transcript.d.ts +9 -1
- package/dist/types/session/session-manager.d.ts +31 -5
- package/dist/types/session/session-retirement.d.ts +31 -7
- package/dist/types/session/session-storage.d.ts +69 -2
- package/dist/types/session/task-artifact-owner-codec.d.ts +2 -0
- package/dist/types/setup/credential-auto-import.d.ts +1 -1
- package/dist/types/setup/credential-import.d.ts +6 -4
- package/dist/types/skill-state/active-state.d.ts +38 -0
- package/dist/types/skill-state/workflow-mutation-guard.d.ts +3 -0
- package/dist/types/slash-commands/helpers/progress-report.d.ts +8 -0
- package/dist/types/task/executor.d.ts +3 -0
- package/dist/types/task/isolation-dir.d.ts +26 -0
- package/dist/types/tools/ast-edit-write-path.d.ts +13 -0
- package/dist/types/tools/bash-skill-urls.d.ts +1 -1
- package/dist/types/tools/browser/cdp-url.d.ts +2 -0
- package/dist/types/tools/github-side-effect.d.ts +22 -0
- package/dist/types/tools/index.d.ts +3 -0
- package/dist/types/tools/monitor-mutation.d.ts +9 -0
- package/dist/types/tools/python.d.ts +9 -1
- package/dist/types/tools/recipe/recipe-guard.d.ts +7 -0
- package/dist/types/tools/restricted-cwd.d.ts +1 -0
- package/dist/types/tools/todo-write.d.ts +6 -0
- package/dist/types/utils/tools-checksum.d.ts +7 -0
- package/package.json +7 -7
- package/scripts/generate-sdk-operation-inventory.ts +21 -0
- package/scripts/verify-managed-empty-stop.ts +28 -0
- package/src/async/endpoint-id.ts +26 -0
- package/src/async/job-manager.ts +247 -132
- package/src/async/support.ts +0 -25
- package/src/capability/index.ts +15 -0
- package/src/capability/mcp.ts +2 -0
- package/src/capability/skill.ts +2 -0
- package/src/capability/types.ts +2 -0
- package/src/cli/auth-broker-cli.ts +1 -1
- package/src/cli/customize-doctor.ts +15 -2
- package/src/cli/doctor/repairs.ts +4 -1
- package/src/cli/doctor-supervisor.ts +3 -0
- package/src/cli/public-command-errors.ts +21 -1
- package/src/cli/public-command-registry.ts +28 -6
- package/src/cli/setup-cli.ts +4 -4
- package/src/cli/skills-cli.ts +5 -0
- package/src/commands/deep-interview.ts +47 -8
- package/src/commands/mcp-serve.ts +7 -0
- package/src/commands/sdk.ts +455 -397
- package/src/config/autorouting-tier-map.ts +117 -7
- package/src/config/file-lock.ts +316 -79
- package/src/config/mcp-schema.json +4 -0
- package/src/config/model-bindings-applier.ts +20 -0
- package/src/config/model-profile-activation.ts +240 -46
- package/src/config/model-registry.ts +47 -153
- package/src/config/skill-settings-defaults.ts +7 -0
- package/src/coordinator-mcp/policy.ts +3 -2
- package/src/coordinator-mcp/server.ts +2 -0
- package/src/cursor-delete-path.ts +10 -0
- package/src/cursor-mcp-name.ts +15 -0
- package/src/cursor.ts +13 -2
- package/src/customization/inventory.ts +4 -13
- package/src/dap/config.ts +2 -2
- package/src/debug/report-bundle-parent.ts +22 -0
- package/src/debug/report-bundle.ts +3 -0
- package/src/debug/system-info.ts +13 -1
- package/src/defaults/gjc/extensions/grok-cli-vendor/src/provider/register.ts +10 -6
- package/src/defaults/gjc/extensions/grok-cli-vendor/src/provider/stream.ts +67 -4
- package/src/defaults/gjc/extensions/grok-cli-vendor/src/provider/version-manager.ts +80 -0
- package/src/defaults/gjc/skills/deep-interview/SKILL.md +105 -10
- package/src/defaults/gjc/skills/ralplan/SKILL.md +6 -4
- package/src/defaults/gjc-defaults.test.ts +18 -1
- package/src/defaults/gjc-defaults.ts +3 -0
- package/src/defaults/gjc-skills.generated.ts +58 -36
- package/src/discovery/agents.ts +6 -1
- package/src/discovery/builtin.ts +13 -1
- package/src/discovery/helpers.ts +171 -29
- package/src/discovery/mcp-json.ts +26 -12
- package/src/discovery/ssh.ts +1 -1
- package/src/discovery/substitute-plugin-root.ts +3 -1
- package/src/edit/file-read-cache.ts +1 -1
- package/src/eval/py/executor.ts +796 -154
- package/src/eval/py/kernel.ts +79 -13
- package/src/eval/py/tool-bridge.ts +4 -0
- package/src/export/html/css-color.ts +9 -0
- package/src/export/html/html-export-destination.ts +16 -0
- package/src/export/html/index.ts +7 -10
- package/src/export/html/template.generated.ts +1 -1
- package/src/extensibility/extensions/function-hooks-internal.ts +27 -0
- package/src/extensibility/extensions/runner.ts +15 -1
- package/src/extensibility/extensions/types.ts +7 -0
- package/src/extensibility/gjc-plugins/mcp-policy.ts +2 -1
- package/src/extensibility/gjc-plugins/runtime-adapters.ts +85 -8
- package/src/extensibility/plugins/manager.ts +3 -2
- package/src/extensibility/plugins/marketplace/cache.ts +15 -0
- package/src/extensibility/plugins/marketplace/manager.ts +11 -3
- package/src/extensibility/plugins/plugin-link-path.ts +12 -0
- package/src/extensibility/runtime-skill-discovery.ts +20 -2
- package/src/extensibility/skill-management.ts +9 -2
- package/src/extensibility/skills.ts +6 -1
- package/src/gjc-runtime/deep-interview-crystallize.ts +1814 -0
- package/src/gjc-runtime/deep-interview-recorder.ts +20 -2
- package/src/gjc-runtime/deep-interview-runtime.ts +1415 -13
- package/src/gjc-runtime/deep-interview-stage.ts +98 -21
- package/src/gjc-runtime/gc-runtime.ts +206 -9
- package/src/gjc-runtime/launch-worktree.ts +70 -9
- package/src/gjc-runtime/psmux-detect.ts +28 -4
- package/src/gjc-runtime/ralplan-runtime.ts +447 -52
- package/src/gjc-runtime/session-state-sidecar.ts +3 -2
- package/src/gjc-runtime/sidecar-bootstrap-env.ts +19 -0
- package/src/gjc-runtime/state-argv.ts +2 -0
- package/src/gjc-runtime/state-migrations.ts +91 -29
- package/src/gjc-runtime/state-runtime.ts +3716 -135
- package/src/gjc-runtime/state-writer.ts +105 -16
- package/src/gjc-runtime/tmux-common.ts +8 -5
- package/src/gjc-runtime/ultragoal-runtime.ts +16 -4
- package/src/gjc-runtime/workflow-manifest.generated.json +70 -42
- package/src/gjc-runtime/workflow-manifest.ts +54 -21
- package/src/harness-control-plane/operate.ts +12 -4
- package/src/harness-control-plane/owner.ts +5 -1
- package/src/hashline/parser.ts +48 -9
- package/src/hashline/recovery.ts +13 -4
- package/src/internal-urls/docs-index.generated.ts +20 -19
- package/src/internal-urls/skill-path.ts +19 -0
- package/src/internal-urls/skill-protocol.ts +2 -0
- package/src/lsp/config.ts +12 -63
- package/src/lsp/edits.ts +6 -0
- package/src/lsp/workspace-path.ts +51 -0
- package/src/main.ts +195 -31
- package/src/memories/index.ts +88 -7
- package/src/modes/acp/acp-agent.ts +88 -4
- package/src/modes/components/custom-editor.ts +14 -0
- package/src/modes/components/customization/customization-dashboard.ts +12 -0
- package/src/modes/components/extensions/extension-dashboard.ts +2 -2
- package/src/modes/components/extensions/state-manager.ts +15 -5
- package/src/modes/components/hook-editor.ts +1 -1
- package/src/modes/components/hook-selector.ts +1 -1
- package/src/modes/components/model-selector.ts +1 -4
- package/src/modes/components/provider-onboarding-selector.ts +1 -1
- package/src/modes/components/status-line/segments.ts +4 -0
- package/src/modes/controllers/event-controller.ts +11 -4
- package/src/modes/controllers/input-controller.ts +76 -31
- package/src/modes/controllers/runtime-mcp-command-controller.ts +29 -16
- package/src/modes/controllers/selector-controller.ts +24 -15
- package/src/modes/controllers/todo-command-controller.ts +1 -1
- package/src/modes/interactive-mode.ts +5 -1
- package/src/modes/runtime-init.ts +4 -0
- package/src/modes/utils/abort-message.ts +3 -1
- package/src/modes/utils/interrupt-ownership.ts +12 -0
- package/src/modes/utils/keybinding-matchers.ts +4 -0
- package/src/modes/utils/macos-option-forwarding.ts +80 -0
- package/src/progress/collect-project-progress.ts +153 -0
- package/src/progress/progress-contract.ts +172 -0
- package/src/progress/progress-snapshot.ts +140 -0
- package/src/progress/project-progress.ts +446 -0
- package/src/progress/render-progress.ts +209 -0
- package/src/prompts/system/master-mode.md +1 -0
- package/src/prompts/tools/skill-discovery.md +1 -1
- package/src/runtime-mcp/client.ts +4 -2
- package/src/runtime-mcp/config-writer.ts +10 -6
- package/src/runtime-mcp/config.ts +1 -0
- package/src/runtime-mcp/json-rpc.ts +2 -1
- package/src/runtime-mcp/manager.ts +29 -11
- package/src/runtime-mcp/mcp-redirect.ts +73 -0
- package/src/runtime-mcp/oauth-flow.ts +14 -2
- package/src/runtime-mcp/oauth-public-url.ts +14 -0
- package/src/runtime-mcp/plugin-network-boundary.ts +4 -0
- package/src/runtime-mcp/pool.ts +6 -0
- package/src/runtime-mcp/project-host-values.ts +46 -0
- package/src/runtime-mcp/smithery-registry.ts +22 -3
- package/src/runtime-mcp/transports/http.ts +4 -3
- package/src/runtime-mcp/types.ts +6 -0
- package/src/sdk/acp/adapter.ts +95 -8
- package/src/sdk/broker/broker-exit.ts +52 -23
- package/src/sdk/broker/broker.ts +81 -6
- package/src/sdk/broker/doctor-restart.ts +4 -0
- package/src/sdk/broker/ensure.ts +31 -2
- package/src/sdk/broker/lifecycle.ts +711 -66
- package/src/sdk/broker/session-index.ts +191 -81
- package/src/sdk/bus/chat-daemon-cli.ts +38 -1
- package/src/sdk/bus/chat-daemon-control.ts +2 -2
- package/src/sdk/bus/index.ts +238 -43
- package/src/sdk/bus/telegram-daemon-contract.ts +6 -1
- package/src/sdk/cli/session-cli.ts +17 -3
- package/src/sdk/client/client.ts +28 -8
- package/src/sdk/host/query/handlers.ts +9 -1
- package/src/sdk/host/session-runtime.test.ts +2705 -303
- package/src/sdk/host/session-runtime.ts +490 -143
- package/src/sdk/host/surface-policy.ts +1 -0
- package/src/sdk/index.ts +8 -0
- package/src/sdk/lifecycle-session.ts +3 -1
- package/src/sdk/prompt-deadline-manager.ts +15 -0
- package/src/sdk/protocol/operation-inventory.generated.json +146 -0
- package/src/sdk/protocol/operation-registry.ts +9 -2
- package/src/sdk/router/session-router.ts +82 -18
- package/src/sdk/session-list.ts +1 -0
- package/src/sdk/session.ts +69 -45
- package/src/session/agent-session.ts +679 -238
- package/src/session/artifacts.ts +176 -71
- package/src/session/internal/managed-gc-retirement-codec.ts +319 -0
- package/src/session/internal/managed-session-scope.ts +3779 -462
- package/src/session/internal/managed-session-storage.ts +501 -78
- package/src/session/internal/managed-task-owner-cleanup.ts +473 -0
- package/src/session/internal/task-artifact-owner-access.ts +19 -3
- package/src/session/internal/task-artifact-owner-transcript.ts +547 -1
- package/src/session/session-manager.ts +951 -133
- package/src/session/session-retirement.ts +573 -14
- package/src/session/session-storage.ts +447 -15
- package/src/session/task-artifact-owner-codec.ts +71 -8
- package/src/session/task-artifact-owner-retirement.ts +21 -19
- package/src/setup/credential-auto-import.ts +12 -3
- package/src/setup/credential-import.ts +176 -5
- package/src/setup/paseo/announce.ts +6 -1
- package/src/skill-state/active-state.ts +145 -2
- package/src/skill-state/workflow-mutation-guard.ts +102 -10
- package/src/slash-commands/builtin-registry.ts +39 -9
- package/src/slash-commands/helpers/mcp.ts +8 -4
- package/src/slash-commands/helpers/progress-report.ts +23 -0
- package/src/stt/setup.ts +3 -5
- package/src/task/commands.ts +3 -1
- package/src/task/executor.ts +4 -0
- package/src/task/index.ts +6 -0
- package/src/task/isolation-dir.ts +143 -0
- package/src/task/worktree.ts +16 -7
- package/src/tools/ask.ts +205 -6
- package/src/tools/ast-edit-write-path.ts +68 -0
- package/src/tools/ast-edit.ts +10 -1
- package/src/tools/bash-allowed-prefixes.ts +15 -0
- package/src/tools/bash-skill-urls.ts +56 -3
- package/src/tools/bash.ts +48 -79
- package/src/tools/browser/cdp-url.ts +18 -0
- package/src/tools/browser.ts +8 -1
- package/src/tools/descriptors.ts +5 -1
- package/src/tools/eval.ts +56 -36
- package/src/tools/gh.ts +10 -0
- package/src/tools/github-side-effect.ts +112 -0
- package/src/tools/image-gen.ts +1 -1
- package/src/tools/index.ts +3 -0
- package/src/tools/monitor-mutation.ts +27 -0
- package/src/tools/monitor.ts +7 -0
- package/src/tools/python.ts +188 -66
- package/src/tools/recipe/index.ts +9 -0
- package/src/tools/recipe/recipe-guard.ts +19 -0
- package/src/tools/restricted-cwd.ts +10 -0
- package/src/tools/skill-discovery.ts +5 -0
- package/src/tools/skill.ts +28 -1
- package/src/tools/todo-write.ts +10 -1
- package/src/tools/tool-catalog.generated.ts +1 -1
- package/src/tools/write.ts +1 -0
- package/src/utils/external-editor.ts +3 -2
- package/src/utils/tools-checksum.ts +34 -0
- package/src/utils/tools-manager.ts +24 -6
- package/src/web/insane/url-guard.ts +2 -1
- package/src/web/search/providers/codex.ts +3 -2
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { type FunctionHookRegistration } from "./function-hooks";
|
|
2
2
|
export type TaggedFunctionHookHandler = (...args: unknown[]) => Promise<unknown>;
|
|
3
|
+
/** Host-owned provider adapters must not consume replay authority for other providers. */
|
|
4
|
+
export declare function tagProviderRequestHandler<T extends (...args: never[]) => unknown>(provider: string, handler: T): T;
|
|
5
|
+
export declare function getProviderRequestHandlerProvider(handler: (...args: never[]) => unknown): string | undefined;
|
|
6
|
+
export declare function tagSdkLifecycleObserver<T extends (...args: never[]) => unknown>(handler: T): T;
|
|
7
|
+
export declare function isSdkLifecycleObserver(handler: (...args: never[]) => unknown): boolean;
|
|
3
8
|
export declare function tagExtensionHandlerRegistrationOrder<T extends (...args: never[]) => unknown>(handler: T, registrationOrder: number): T;
|
|
4
9
|
export declare function wrapExtensionHandlerRegistration<T extends (...args: never[]) => unknown>(handler: T, registrationOrder: number): T;
|
|
5
10
|
export declare function getExtensionHandlerRegistrationOrder(value: unknown): number | undefined;
|
|
@@ -27,6 +27,7 @@ import type { ExecOptions, ExecResult } from "../../exec/exec";
|
|
|
27
27
|
import type { CustomEditor } from "../../modes/components/custom-editor";
|
|
28
28
|
import type { WorkflowGateEmitter } from "../../modes/shared/agent-wire/workflow-gate-broker";
|
|
29
29
|
import type { Theme } from "../../modes/theme/theme";
|
|
30
|
+
import type { ProjectProgressSnapshot } from "../../progress/progress-contract";
|
|
30
31
|
import type { AgentSessionEventListener } from "../../session/agent-session";
|
|
31
32
|
import type { ClientBridge, ClientBridgePermissionOption, ClientBridgePermissionOutcome, ClientBridgePermissionToolCall } from "../../session/client-bridge";
|
|
32
33
|
import type { CustomMessage } from "../../session/messages";
|
|
@@ -339,6 +340,8 @@ export interface ExtensionContext {
|
|
|
339
340
|
totalBytes: number;
|
|
340
341
|
} | undefined>;
|
|
341
342
|
getJobs(): unknown;
|
|
343
|
+
/** Read-only project progress snapshot (`session.progress`), derived from durable session state. */
|
|
344
|
+
getProjectProgress?(): Promise<ProjectProgressSnapshot>;
|
|
342
345
|
/** Subscribe to foreground-wait folds (`bash_folded`). Returns an unsubscribe function. */
|
|
343
346
|
onJobFold?(listener: (event: JobFoldEvent) => void): () => void;
|
|
344
347
|
/** Observe session events synchronously in producer order. Returns an unsubscribe function. */
|
|
@@ -498,6 +501,8 @@ export interface AgentStartEvent extends SharedAgentStartEvent {
|
|
|
498
501
|
sdkRunToken?: string;
|
|
499
502
|
/** Complete set of SDK queue owners consumed together by this run. */
|
|
500
503
|
sdkRunTokens?: string[];
|
|
504
|
+
/** Internal public lifecycle boundary; accepted retries with a suppressed predecessor end retain it. */
|
|
505
|
+
lifecycleScope?: AttemptScope;
|
|
501
506
|
}
|
|
502
507
|
/** Fired when an agent run fails before emitting agent_end. The error is the
|
|
503
508
|
* sanitized `{ code, message }` diagnostic from the agent runtime — never the raw
|
|
@@ -1180,6 +1185,8 @@ export interface ExtensionContextActions {
|
|
|
1180
1185
|
totalBytes: number;
|
|
1181
1186
|
} | undefined>;
|
|
1182
1187
|
getJobs?: () => unknown;
|
|
1188
|
+
/** Read-only project progress snapshot backing the `session.progress` SDK query. */
|
|
1189
|
+
getProjectProgress?: () => Promise<ProjectProgressSnapshot>;
|
|
1183
1190
|
/** Subscribe to foreground-wait folds so the SDK host can publish `bash_folded`. Returns an unsubscribe. */
|
|
1184
1191
|
onJobFold?: (listener: (event: JobFoldEvent) => void) => () => void;
|
|
1185
1192
|
/** Ordered, synchronous AgentSession subscription, independent of async extension hooks. */
|
|
@@ -22,6 +22,19 @@ export declare function safePluginMcpDiagnostic(value: unknown): string;
|
|
|
22
22
|
export declare function getGjcPluginToolDeclarations(cwd: string): Promise<GjcPluginToolDeclaration[]>;
|
|
23
23
|
/** Serve the canonical schemas keyed by their stable tool surface id. */
|
|
24
24
|
export declare function serveGjcPluginSchemas(cwd: string): Promise<Record<string, JsonSchema202012>>;
|
|
25
|
+
/** Startup identity of a file: the object `hashStableFile` must still be reading. */
|
|
26
|
+
export interface StableFileIdentity {
|
|
27
|
+
dev: number;
|
|
28
|
+
ino: number;
|
|
29
|
+
size: number;
|
|
30
|
+
mtimeMs: number;
|
|
31
|
+
ctimeMs: number;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Digest of a `node` that was on PATH at startup, or `undefined` when the path
|
|
35
|
+
* was not a startup candidate or no longer is the startup file object.
|
|
36
|
+
*/
|
|
37
|
+
export declare function getInitialNodeHash(realPath: string): Promise<string | undefined>;
|
|
25
38
|
/**
|
|
26
39
|
* SHA-256 of a regular file with the same stability contract as `readStableFile`
|
|
27
40
|
* (follows symlinks, bounded size, rejects a file that changes while it is read),
|
|
@@ -29,7 +42,7 @@ export declare function serveGjcPluginSchemas(cwd: string): Promise<Record<strin
|
|
|
29
42
|
* on PATH; buffering each interpreter (~120 MiB) held its full bytes in the
|
|
30
43
|
* session process until exit.
|
|
31
44
|
*/
|
|
32
|
-
export declare function hashStableFile(filePath: string, label: string, maxBytes: number): Promise<string>;
|
|
45
|
+
export declare function hashStableFile(filePath: string, label: string, maxBytes: number, expected?: StableFileIdentity): Promise<string>;
|
|
33
46
|
/**
|
|
34
47
|
* Load the always-on plugin tool surfaces for the effective registry at `cwd`.
|
|
35
48
|
*
|
|
@@ -23,6 +23,8 @@ export declare function getCachedPluginPath(cacheDir: string, marketplace: strin
|
|
|
23
23
|
* so a partial previous cache is never silently reused.
|
|
24
24
|
*/
|
|
25
25
|
export declare function cachePlugin(sourcePath: string, cacheDir: string, marketplace: string, pluginName: string, version: string): Promise<string>;
|
|
26
|
+
/** Write a regular file. A symlink at the destination is removed, not followed. */
|
|
27
|
+
export declare function writeCachedRegularFile(targetPath: string, content: string): Promise<void>;
|
|
26
28
|
export declare function stageCachedPlugin(sourcePath: string, stagingPath: string): Promise<string>;
|
|
27
29
|
export declare function digestCachedPlugin(targetPath: string): Promise<string | undefined>;
|
|
28
30
|
export declare function inspectCachedPlugin(targetPath: string): Promise<{
|
|
@@ -47,6 +47,8 @@ export interface DiscoverRuntimeSkillsOptions {
|
|
|
47
47
|
offset?: number;
|
|
48
48
|
source?: RuntimeSkillDiscoveryScope | "all";
|
|
49
49
|
policy?: SkillsSettings;
|
|
50
|
+
/** User-owned permission to read external user skill symlinks; defaults to the direct policy value. */
|
|
51
|
+
allowExternalUserSkillSymlinks?: boolean;
|
|
50
52
|
}
|
|
51
53
|
/**
|
|
52
54
|
* Upper bound every caller's `limit` clamps to. Exported so `gjc skills discover`
|
|
@@ -71,5 +73,5 @@ export declare function describeDisabledSkillScopes(source: RuntimeSkillDiscover
|
|
|
71
73
|
*/
|
|
72
74
|
export declare function describeNoSkillMatch(query: string | undefined, scanned: number): string | undefined;
|
|
73
75
|
export declare function discoverRuntimeSkills(options: DiscoverRuntimeSkillsOptions): Promise<RuntimeSkillDiscoveryResult>;
|
|
74
|
-
export declare function findRuntimeSkillByName(cwd: string, name: string, policy?: SkillsSettings, home?: string, agentDir?: string, profileAuthority?: "default" | "custom"): Promise<Skill | undefined>;
|
|
76
|
+
export declare function findRuntimeSkillByName(cwd: string, name: string, policy?: SkillsSettings, home?: string, agentDir?: string, profileAuthority?: "default" | "custom", allowExternalUserSkillSymlinks?: boolean): Promise<Skill | undefined>;
|
|
75
77
|
export {};
|
|
@@ -13,6 +13,7 @@ export type SkillDisabledReason = "protected" | "scope-trust" | "ignored" | "inc
|
|
|
13
13
|
export interface ManagedSkillRecord {
|
|
14
14
|
name: string;
|
|
15
15
|
description: string;
|
|
16
|
+
importedFrom?: string;
|
|
16
17
|
path: string;
|
|
17
18
|
scope: SkillScope;
|
|
18
19
|
/** Canonical source label, e.g. "project .gjc/skills" or "user ~/.gjc/agent/skills". */
|
|
@@ -80,8 +81,10 @@ export declare function listNativeSkillsForManagement(options: {
|
|
|
80
81
|
cwd: string;
|
|
81
82
|
home?: string;
|
|
82
83
|
agentDir?: string;
|
|
83
|
-
/** Resolver-owned profile classification; unlike path comparison, this survives HOME refreshes. */
|
|
84
|
+
/** Resolver-owned profile classification; unlike path comparison, this survives HOME/config refreshes. */
|
|
84
85
|
profileAuthority?: "default" | "custom";
|
|
86
|
+
/** User-owned permission to follow symlinks outside user skill scan roots. */
|
|
87
|
+
allowExternalUserSkillSymlinks?: boolean;
|
|
85
88
|
policy?: SkillManagementPolicy;
|
|
86
89
|
}): Promise<ManagedSkillRecord[]>;
|
|
87
90
|
/**
|
|
@@ -59,6 +59,8 @@ export interface LoadSkillsOptions extends SkillsSettings {
|
|
|
59
59
|
agentDir?: string;
|
|
60
60
|
/** Resolver-owned classification for the selected agent directory. */
|
|
61
61
|
profileAuthority?: "default" | "custom";
|
|
62
|
+
/** User-owned permission to follow symlinks outside user skill scan roots. */
|
|
63
|
+
allowExternalUserSkillSymlinks?: boolean;
|
|
62
64
|
}
|
|
63
65
|
/**
|
|
64
66
|
* Load skills from all configured locations.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export type CrystalClassification = "confirmed" | "inferred" | "disputed";
|
|
2
|
+
export type CrystalItemKind = "goal" | "constraint" | "decision" | "acceptance_criterion" | "non_goal";
|
|
3
|
+
export interface CrystalMessage {
|
|
4
|
+
index: number;
|
|
5
|
+
role: "user" | "assistant" | "system" | "tool" | "toolResult" | "developer";
|
|
6
|
+
content: string;
|
|
7
|
+
}
|
|
8
|
+
export interface CrystalSnapshot {
|
|
9
|
+
revision: number;
|
|
10
|
+
start: number;
|
|
11
|
+
end: number;
|
|
12
|
+
digest: string;
|
|
13
|
+
messages: CrystalMessage[];
|
|
14
|
+
}
|
|
15
|
+
export interface CrystalItem {
|
|
16
|
+
id: string;
|
|
17
|
+
kind: CrystalItemKind;
|
|
18
|
+
classification: CrystalClassification;
|
|
19
|
+
statement: string;
|
|
20
|
+
anchor?: {
|
|
21
|
+
message_index: number;
|
|
22
|
+
quote: string;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export interface CrystalInput {
|
|
26
|
+
snapshot: CrystalSnapshot;
|
|
27
|
+
current_revision: number;
|
|
28
|
+
items: CrystalItem[];
|
|
29
|
+
removed_ids?: string[];
|
|
30
|
+
removed_item_anchors?: CrystalResolutionAnchor[];
|
|
31
|
+
open_gaps?: string[];
|
|
32
|
+
conflicts?: string[];
|
|
33
|
+
resolved_open_gaps?: string[];
|
|
34
|
+
resolved_conflicts?: string[];
|
|
35
|
+
resolved_open_gap_anchors?: CrystalResolutionAnchor[];
|
|
36
|
+
resolved_conflict_anchors?: CrystalResolutionAnchor[];
|
|
37
|
+
prior?: DeepInterviewCrystal;
|
|
38
|
+
}
|
|
39
|
+
export interface CrystalResolutionAnchor {
|
|
40
|
+
item: string;
|
|
41
|
+
message_index: number;
|
|
42
|
+
quote: string;
|
|
43
|
+
resolution: string;
|
|
44
|
+
}
|
|
45
|
+
export interface CrystalDelta {
|
|
46
|
+
kind: "none" | "additive" | "intent-changed" | "goal-replaced" | "stale";
|
|
47
|
+
changed_ids: string[];
|
|
48
|
+
added_ids: string[];
|
|
49
|
+
preserved_ids: string[];
|
|
50
|
+
approval_invalidated: boolean;
|
|
51
|
+
}
|
|
52
|
+
export interface DeepInterviewCrystal {
|
|
53
|
+
schema_version: 1;
|
|
54
|
+
spec_version: number;
|
|
55
|
+
lifecycle: "ready" | "needs-questions" | "stale" | "superseded";
|
|
56
|
+
source: {
|
|
57
|
+
revision: number;
|
|
58
|
+
start: number;
|
|
59
|
+
end: number;
|
|
60
|
+
digest: string;
|
|
61
|
+
messages: CrystalMessage[];
|
|
62
|
+
};
|
|
63
|
+
items: CrystalItem[];
|
|
64
|
+
removed_ids?: string[];
|
|
65
|
+
removed_item_anchors?: CrystalResolutionAnchor[];
|
|
66
|
+
pending_removals?: string[];
|
|
67
|
+
open_gaps: string[];
|
|
68
|
+
conflicts: string[];
|
|
69
|
+
delta: CrystalDelta;
|
|
70
|
+
execution_approval: "not-approved";
|
|
71
|
+
}
|
|
72
|
+
export declare function crystalSnapshotDigest(snapshot: Pick<CrystalSnapshot, "revision" | "start" | "end" | "messages">): string;
|
|
73
|
+
export declare function crystallizeDeepInterview(value: unknown): DeepInterviewCrystal;
|
|
74
|
+
export declare function crystalMarkdown(crystal: DeepInterviewCrystal): string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type CrystalSnapshot } from "./deep-interview-crystallize";
|
|
1
2
|
export * from "./deep-interview-recorder";
|
|
2
3
|
/**
|
|
3
4
|
* Native implementation of `gjc deep-interview`.
|
|
@@ -13,6 +14,16 @@ export interface DeepInterviewCommandResult {
|
|
|
13
14
|
stdout?: string;
|
|
14
15
|
stderr?: string;
|
|
15
16
|
}
|
|
17
|
+
export declare function authoritativeConversationSnapshot(cwd: string, sessionId: string): Promise<{
|
|
18
|
+
revision: number;
|
|
19
|
+
messages: CrystalSnapshot["messages"];
|
|
20
|
+
transcriptPath: string;
|
|
21
|
+
transcriptSha256: string;
|
|
22
|
+
}>;
|
|
23
|
+
export declare function assertDeepInterviewCrystalCoversLiveTranscript(cwd: string, sessionId: string, requireCrystalTail?: boolean): Promise<{
|
|
24
|
+
transcriptPath: string;
|
|
25
|
+
transcriptSha256: string;
|
|
26
|
+
}>;
|
|
16
27
|
export declare function deepInterviewStatePath(cwd: string, sessionId?: string): string;
|
|
17
28
|
export interface ResolvedDeepInterviewSpecWriteArgs {
|
|
18
29
|
stage: "final";
|
|
@@ -181,6 +181,11 @@ export interface GcDiskRecord {
|
|
|
181
181
|
action: GcDiskAction;
|
|
182
182
|
reason: string;
|
|
183
183
|
error?: string;
|
|
184
|
+
/** Exact incomplete retirement phase surfaced by the owning session adapter. */
|
|
185
|
+
phase?: "artifacts" | "transcript";
|
|
186
|
+
task_artifact_owner_retired?: true;
|
|
187
|
+
task_artifact_owner_payload_retired?: true;
|
|
188
|
+
task_artifact_owner_namespace_retained?: true;
|
|
184
189
|
/** Set when `bytes` is a floor because a walk was capped or partially unreadable. */
|
|
185
190
|
partial?: true;
|
|
186
191
|
/** Set when this entry was a reclaim candidate that its surface withheld on incomplete evidence. */
|
|
@@ -64,9 +64,9 @@ export interface ResolvedTmuxBinary {
|
|
|
64
64
|
viaExplicitOverride: boolean;
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
|
-
* Resolve the tmux command GJC should invoke. Honors
|
|
68
|
-
* GJC_TMUX_COMMAND override;
|
|
69
|
-
* override is set, psmux (installed as psmux, pmux, or tmux) is picked
|
|
67
|
+
* Resolve the tmux command GJC should invoke. Honors an operator
|
|
68
|
+
* GJC_TMUX_COMMAND override; a project dotenv value is ignored. On Windows
|
|
69
|
+
* when no override is set, psmux (installed as psmux, pmux, or tmux) is picked
|
|
70
70
|
* automatically so the default gjc --tmux flow lands on a real multiplexer.
|
|
71
71
|
*/
|
|
72
72
|
export declare function resolveGjcTmuxBinary(options?: ResolveGjcTmuxBinaryOptions): ResolvedTmuxBinary;
|
|
@@ -117,11 +117,6 @@ export declare function countRalplanOnDiskLaneArtifacts(cwd: string, sessionId:
|
|
|
117
117
|
architect: number;
|
|
118
118
|
critic: number;
|
|
119
119
|
}>;
|
|
120
|
-
/**
|
|
121
|
-
* Load index rows for cap enforcement. Unlike HUD reads, returns structural
|
|
122
|
-
* signals so callers can fail closed when the ledger is empty/malformed while
|
|
123
|
-
* opener artifacts already exist on disk.
|
|
124
|
-
*/
|
|
125
120
|
export declare function loadRalplanIndexForCap(cwd: string, sessionId: string, runId: string): Promise<{
|
|
126
121
|
rows: RalplanIndexRow[];
|
|
127
122
|
indexPresent: boolean;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ProjectEnvSnapshot } from "@gajae-code/utils/env-file";
|
|
2
|
+
/**
|
|
3
|
+
* Operator environment only. A value that matches the project dotenv snapshot
|
|
4
|
+
* was loaded by Bun from the repository and must not become signing material.
|
|
5
|
+
*/
|
|
6
|
+
export declare function trustedCoordinatorEnv(name: string, env?: NodeJS.ProcessEnv, snapshot?: ProjectEnvSnapshot): string | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type StateAction = "read" | "write" | "clear" | "contract" | "handoff" | "graph" | "prune" | "gc" | "migrate" | "status" | "doctor";
|
|
1
|
+
export type StateAction = "read" | "write" | "clear" | "contract" | "approve-execution" | "handoff" | "graph" | "prune" | "gc" | "migrate" | "status" | "doctor";
|
|
2
2
|
export declare const STATE_ACTION_NAMES: ReadonlySet<StateAction>;
|
|
3
3
|
export declare const STATE_FLAGS_WITH_VALUES: ReadonlySet<string>;
|
|
4
4
|
export declare const STATE_BOOLEAN_FLAGS: ReadonlySet<string>;
|
|
@@ -20,6 +20,14 @@ export interface MigrateWorkflowStateResult {
|
|
|
20
20
|
changed: boolean;
|
|
21
21
|
}
|
|
22
22
|
export type WorkflowStateMigration = (state: Record<string, unknown>, skill: CanonicalGjcWorkflowSkill) => Record<string, unknown>;
|
|
23
|
+
/**
|
|
24
|
+
* A newer workflow envelope is not a legacy shape. Treating it as one would
|
|
25
|
+
* silently downgrade state written by a newer runtime when any sanctioned
|
|
26
|
+
* read/modify/write path persists the result. Callers that can surface a
|
|
27
|
+
* command error should use this guard before doing any merge; the migration
|
|
28
|
+
* primitive also enforces it so internal writers cannot bypass that boundary.
|
|
29
|
+
*/
|
|
30
|
+
export declare function assertNotFutureWorkflowState(state: Record<string, unknown>, skill: string, surface?: string): void;
|
|
23
31
|
export declare function migrateWorkflowState(raw: Record<string, unknown>, skill: string): MigrateWorkflowStateResult;
|
|
24
32
|
/**
|
|
25
33
|
* Pure legacy state normalizer for background/internal readers.
|
|
@@ -36,5 +36,100 @@ export declare function reconcileWorkflowSkillState(options: {
|
|
|
36
36
|
stateFile: string;
|
|
37
37
|
}>;
|
|
38
38
|
export declare function readWorkflowStateJson(cwd: string, skill: CanonicalGjcWorkflowSkill, sessionId?: string, onWarning?: StateWarningSink): Promise<Record<string, unknown>>;
|
|
39
|
+
/**
|
|
40
|
+
* A user-origin execution choice is deliberately kept outside the workflow
|
|
41
|
+
* envelope. The envelope is agent/runtime state and therefore cannot itself
|
|
42
|
+
* be evidence that a human selected the execution path. This record is the
|
|
43
|
+
* short-lived bridge from the structured ask surface to the explicit
|
|
44
|
+
* `approve-execution` command.
|
|
45
|
+
*/
|
|
46
|
+
export declare const DEEP_INTERVIEW_EXECUTION_APPROVAL_RECORD_FILE = "deep-interview-execution-approval.json";
|
|
47
|
+
export declare const DEEP_INTERVIEW_EXECUTION_APPROVAL_MAX_AGE_MS: number;
|
|
48
|
+
export interface ExecutionApprovalTranscriptBoundary {
|
|
49
|
+
byte_length: number;
|
|
50
|
+
device: string;
|
|
51
|
+
inode: string;
|
|
52
|
+
leaf_id: string | null;
|
|
53
|
+
approval_tool_call_id: string;
|
|
54
|
+
}
|
|
55
|
+
export declare function captureExecutionApprovalTranscriptBoundary(cwd: string, sessionId: string, transcriptPath: string, transcriptSha256: string, approvalToolCallId: string): Promise<ExecutionApprovalTranscriptBoundary>;
|
|
56
|
+
export declare function assertExecutionApprovalTranscriptBoundary(cwd: string, sessionId: string, transcriptPath: string, transcriptSha256: string, boundary: unknown): Promise<void>;
|
|
57
|
+
export type ExecutionApprovalStage = "deep-interview" | "ralplan";
|
|
58
|
+
/** Select lineage before validation; malformed Crystal evidence must never fall back. */
|
|
59
|
+
export declare function executionApprovalLineage(cwd: string, sessionId: string, stage: ExecutionApprovalStage): Promise<"crystal" | "ordinary">;
|
|
60
|
+
export interface ExecutionApprovalPresentation {
|
|
61
|
+
state_path: string;
|
|
62
|
+
state_revision: number;
|
|
63
|
+
artifact_path: string;
|
|
64
|
+
artifact_sha256: string;
|
|
65
|
+
run_id: string | null;
|
|
66
|
+
}
|
|
67
|
+
export declare function nonCrystalExecutionApprovalRecordPath(cwd: string, sessionId: string, stage: ExecutionApprovalStage): string;
|
|
68
|
+
/** Capture the exact publication shown by an execution approval gate. */
|
|
69
|
+
export declare function captureExecutionApprovalPresentation(cwd: string, sessionId: string, stage: ExecutionApprovalStage): Promise<ExecutionApprovalPresentation>;
|
|
70
|
+
export declare function recordNonCrystalExecutionApproval(options: {
|
|
71
|
+
cwd: string;
|
|
72
|
+
sessionId: string;
|
|
73
|
+
approvalStage: ExecutionApprovalStage;
|
|
74
|
+
questionId: string;
|
|
75
|
+
gateId: string;
|
|
76
|
+
target: "ultragoal";
|
|
77
|
+
selectedOptions: string[];
|
|
78
|
+
transcriptPath: string;
|
|
79
|
+
transcriptSha256: string;
|
|
80
|
+
toolCallId: string;
|
|
81
|
+
presentation: ExecutionApprovalPresentation;
|
|
82
|
+
}): Promise<void>;
|
|
83
|
+
export declare function revokeNonCrystalExecutionApproval(cwd: string, sessionId: string, stage: ExecutionApprovalStage): Promise<void>;
|
|
84
|
+
export interface DeepInterviewExecutionApprovalRecord {
|
|
85
|
+
schema_version: 1;
|
|
86
|
+
status: "pending" | "consumed";
|
|
87
|
+
session_id: string;
|
|
88
|
+
target: "ultragoal";
|
|
89
|
+
state_path: string;
|
|
90
|
+
state_revision: number;
|
|
91
|
+
spec_path: string;
|
|
92
|
+
spec_sha256: string;
|
|
93
|
+
crystal_spec_version: number;
|
|
94
|
+
crystal_source_digest: string;
|
|
95
|
+
crystal_digest: string;
|
|
96
|
+
question_id: string;
|
|
97
|
+
gate_id: string;
|
|
98
|
+
answer_hash: string;
|
|
99
|
+
transcript_path: string;
|
|
100
|
+
transcript_sha256: string;
|
|
101
|
+
transcript_boundary: ExecutionApprovalTranscriptBoundary;
|
|
102
|
+
approval_stage?: "deep-interview" | "ralplan";
|
|
103
|
+
ralplan_state_path?: string;
|
|
104
|
+
ralplan_state_revision?: number;
|
|
105
|
+
ralplan_run_id?: string;
|
|
106
|
+
ralplan_final_path?: string;
|
|
107
|
+
ralplan_final_sha256?: string;
|
|
108
|
+
created_at: string;
|
|
109
|
+
expires_at: string;
|
|
110
|
+
consumed_at?: string;
|
|
111
|
+
consumed_mutation_id?: string;
|
|
112
|
+
}
|
|
113
|
+
export declare function deepInterviewExecutionApprovalRecordPath(cwd: string, sessionId: string): string;
|
|
114
|
+
export declare function recordDeepInterviewExecutionApproval(options: {
|
|
115
|
+
cwd: string;
|
|
116
|
+
sessionId: string;
|
|
117
|
+
questionId: string;
|
|
118
|
+
gateId?: string;
|
|
119
|
+
target: string;
|
|
120
|
+
selectedOptions: readonly string[];
|
|
121
|
+
customInput?: string;
|
|
122
|
+
transcriptPath: string;
|
|
123
|
+
transcriptSha256: string;
|
|
124
|
+
toolCallId: string;
|
|
125
|
+
approvalStage?: "deep-interview" | "ralplan";
|
|
126
|
+
presentation: ExecutionApprovalPresentation;
|
|
127
|
+
}): Promise<{
|
|
128
|
+
path: string;
|
|
129
|
+
record: DeepInterviewExecutionApprovalRecord;
|
|
130
|
+
}>;
|
|
131
|
+
export declare function revokeDeepInterviewExecutionApproval(cwd: string, sessionId: string): Promise<void>;
|
|
132
|
+
/** Whether a verified automatic Ultragoal admission already authorizes handoff. */
|
|
133
|
+
export declare function hasSanctionedRalplanFinalAdmissionForHandoff(cwd: string, sessionId: string): Promise<boolean>;
|
|
39
134
|
export declare function runNativeStateCommand(args: string[], cwd?: string): Promise<StateCommandResult>;
|
|
40
135
|
export {};
|
|
@@ -56,6 +56,7 @@ export interface WorkflowTransactionJournal {
|
|
|
56
56
|
callee?: CanonicalGjcWorkflowSkill;
|
|
57
57
|
paths: string[];
|
|
58
58
|
steps: string[];
|
|
59
|
+
approval_audit_offset?: number;
|
|
59
60
|
}
|
|
60
61
|
export type StateWritePolicy = "source" | "cache";
|
|
61
62
|
export interface GuardedStateWriterOptions extends StateWriterOptions {
|
|
@@ -167,6 +168,9 @@ export type StrictMutationReadResult = {
|
|
|
167
168
|
export declare function readExistingStateForMutation(filePath: string): Promise<StrictMutationReadResult>;
|
|
168
169
|
export declare function workflowEnvelopeContentSha256(value: unknown): string;
|
|
169
170
|
export declare function stampWorkflowEnvelopeChecksum<T>(value: T, filePath: string, computedAt?: string): T;
|
|
171
|
+
export type WorkflowEnvelopeChecksumStatus = "absent" | "match" | "mismatch";
|
|
172
|
+
/** Compare a parsed envelope to its writer-stamped `content_sha256`, when one is present. */
|
|
173
|
+
export declare function workflowEnvelopeChecksumStatus(value: unknown): WorkflowEnvelopeChecksumStatus;
|
|
170
174
|
export declare function detectWorkflowEnvelopeIntegrityMismatch(filePath: string): Promise<WorkflowEnvelopeIntegrityMismatch | undefined>;
|
|
171
175
|
type ActiveStateCacheInvalidator = (cwd?: string, sessionId?: string) => void;
|
|
172
176
|
export declare function setActiveStateCacheInvalidator(invalidator: ActiveStateCacheInvalidator): void;
|
|
@@ -247,6 +251,12 @@ export declare function removeFileAudited(targetPath: string, options?: StateWri
|
|
|
247
251
|
export declare function writeActiveEntry(cwd: string, sessionScope: string | ActiveSessionScope | undefined, skill: string, entry: SkillActiveEntry, options?: StateWriterOptions): Promise<GuardedWriteResult>;
|
|
248
252
|
export declare function removeActiveEntry(cwd: string, sessionScope: string | ActiveSessionScope | undefined, skill: string, options?: StateWriterOptions): Promise<DeleteResult>;
|
|
249
253
|
export declare function readActiveEntries(cwd: string, sessionScope?: string | ActiveSessionScope): Promise<SkillActiveEntry[]>;
|
|
254
|
+
/**
|
|
255
|
+
* Failure-observable counterpart of `readActiveEntries`: an entry file that exists
|
|
256
|
+
* but holds no usable skill entry throws instead of being skipped, so its absence
|
|
257
|
+
* from the result always means the entry does not exist.
|
|
258
|
+
*/
|
|
259
|
+
export declare function readActiveEntriesStrict(cwd: string, sessionScope?: string | ActiveSessionScope): Promise<SkillActiveEntry[]>;
|
|
250
260
|
export declare function rebuildActiveSnapshot(cwd: string, sessionScope?: string | ActiveSessionScope, options?: StateWriterOptions): Promise<string>;
|
|
251
261
|
export declare function mergeActiveState(cwd: string, sessionScope: string | ActiveSessionScope | undefined, skill: string, entry: SkillActiveEntry, options?: StateWriterOptions): Promise<ActiveEntryWriteResult>;
|
|
252
262
|
export declare function writeArtifact(targetPath: string, content: string, options?: StateWriterOptions): Promise<string>;
|
|
@@ -256,7 +266,10 @@ export declare function softDelete(targetPath: string, meta: Record<string, unkn
|
|
|
256
266
|
export declare function hardPruneJson(targetPaths: readonly string[], selector: HardPruneSelector, options?: StateWriterOptions): Promise<string[]>;
|
|
257
267
|
export declare function hardPrune(targets: readonly GenericHardPruneTarget[], selector: GenericHardPruneSelector, options?: StateWriterOptions): Promise<string[]>;
|
|
258
268
|
export declare function forceOverwrite(targetPath: string, rawValue: unknown, options?: ForceOverwriteOptions): Promise<string>;
|
|
259
|
-
export declare function appendAuditEntry(cwd: string, sessionIdOrEntry: string | AuditEntry, maybeEntry?: AuditEntry
|
|
269
|
+
export declare function appendAuditEntry(cwd: string, sessionIdOrEntry: string | AuditEntry, maybeEntry?: AuditEntry, options?: {
|
|
270
|
+
lockHeld?: boolean;
|
|
271
|
+
beforeAppend?: (offset: number) => Promise<unknown>;
|
|
272
|
+
}): Promise<string>;
|
|
260
273
|
export declare function readWorkflowTransactionJournal(cwd: string, sessionId: string, mutationId: string): Promise<WorkflowTransactionJournal | undefined>;
|
|
261
274
|
export declare function beginWorkflowTransactionJournal(input: {
|
|
262
275
|
cwd: string;
|
|
@@ -40,11 +40,14 @@ export declare function envDisabled(value: string | undefined): boolean;
|
|
|
40
40
|
* failure mode where `gjc --tmux` creates a psmux-backed session and then
|
|
41
41
|
* `gjc session status` fails because it queries literal `tmux` is closed off.
|
|
42
42
|
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
43
|
+
* An operator `GJC_TMUX_COMMAND` is honored on every platform. A value that
|
|
44
|
+
* matches the project dotenv snapshot, including a dynamic declaration, is
|
|
45
|
+
* ignored so a repository cannot choose the binary, and the resolver uses the
|
|
46
|
+
* same default as when the variable is unset. On native Windows without an
|
|
47
|
+
* override the resolver walks `psmux`, then `pmux`, then `tmux` and uses the
|
|
48
|
+
* first binary present on PATH. On POSIX the resolver returns `tmux` (the
|
|
49
|
+
* historical default) and only falls through to the platform-aware walker if
|
|
50
|
+
* the caller opts in.
|
|
48
51
|
*/
|
|
49
52
|
export declare function resolveGjcTmuxCommand(env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform): string;
|
|
50
53
|
export type { PsmuxProbe, ResolvedTmuxBinary, ResolveGjcTmuxBinaryOptions } from "./psmux-detect";
|
|
@@ -251,6 +251,14 @@ export declare function createUltragoalPlan(input: {
|
|
|
251
251
|
validationBatches?: UltragoalValidationBatchInput[];
|
|
252
252
|
validationBatchJson?: string;
|
|
253
253
|
}): Promise<UltragoalPlan>;
|
|
254
|
+
/**
|
|
255
|
+
* Scheduler order shared with read-only projections: active, then pending, then failed
|
|
256
|
+
* only when the caller explicitly opts into retrying failed goals. Blocked,
|
|
257
|
+
* review_blocked, complete, and superseded goals are never schedulable.
|
|
258
|
+
*/
|
|
259
|
+
export declare function selectNextSchedulableGoal<T extends {
|
|
260
|
+
status: UltragoalGoalStatus;
|
|
261
|
+
}>(goals: readonly T[], retryFailed: boolean): T | undefined;
|
|
254
262
|
export interface UltragoalRunCompletionState {
|
|
255
263
|
requiredGoals: UltragoalGoal[];
|
|
256
264
|
incompleteGoals: UltragoalGoal[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function realSkillPath(baseDir: string, targetPath: string): Promise<string>;
|
|
@@ -9,13 +9,16 @@ export interface LspConfig {
|
|
|
9
9
|
*/
|
|
10
10
|
export declare function hasRootMarkers(cwd: string, markers: string[]): boolean;
|
|
11
11
|
/**
|
|
12
|
-
* Resolve a
|
|
13
|
-
*
|
|
12
|
+
* Resolve a host-spawn executable from $PATH without consulting project-controlled bin directories.
|
|
13
|
+
* LSP auto-detection and DAP adapter launch both use this rule.
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
15
|
+
* Trust is evaluated on both the discovered and canonical paths, but the returned
|
|
16
|
+
* path is the discovered one: multiplexed launchers such as rustup pick the proxied
|
|
17
|
+
* tool from argv[0], so `~/.cargo/bin/rust-analyzer -> rustup` must be spawned as
|
|
18
|
+
* `rust-analyzer`, not as the resolved `rustup` binary.
|
|
18
19
|
*/
|
|
20
|
+
export declare function resolveTrustedCommand(command: string, cwd: string): string | null;
|
|
21
|
+
/** Same rule as `resolveTrustedCommand`: project-local bin directories are never searched. */
|
|
19
22
|
export declare function resolveCommand(command: string, cwd: string): string | null;
|
|
20
23
|
/**
|
|
21
24
|
* Load LSP configuration.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function assertInsideWorkspace(cwd: string, filePath: string): Promise<void>;
|
|
@@ -390,6 +390,13 @@ export declare function acpSkillInvocation(blocks: PromptRequest["prompt"]): {
|
|
|
390
390
|
name: string;
|
|
391
391
|
args: string;
|
|
392
392
|
} | undefined;
|
|
393
|
+
/**
|
|
394
|
+
* Recognize the builtin `/progress` command only when it is the complete, single text
|
|
395
|
+
* prompt. Like the TUI (`allowArgs: false`), `/progress <args>` is not the command.
|
|
396
|
+
*/
|
|
397
|
+
export declare function isAcpProgressCommand(blocks: PromptRequest["prompt"]): boolean;
|
|
398
|
+
/** Render the `session.progress` query result as the plain-text `/progress` view. */
|
|
399
|
+
export declare function acpProgressReportText(query: unknown): string;
|
|
393
400
|
/** Convert every ACP prompt block the agent advertises without silently discarding context. */
|
|
394
401
|
export declare function acpPromptPayload(blocks: PromptRequest["prompt"]): {
|
|
395
402
|
text: string;
|
|
@@ -49,6 +49,12 @@ export declare class CustomEditor extends Editor {
|
|
|
49
49
|
onQueue?: () => void;
|
|
50
50
|
/** Called when Caps Lock is pressed. */
|
|
51
51
|
onCapsLock?: () => void;
|
|
52
|
+
/**
|
|
53
|
+
* Called when typed text is what macOS composes for a bound Option chord
|
|
54
|
+
* (for example `œ` for a bound `alt+q`), meaning the terminal sent Option as
|
|
55
|
+
* text. The text is still inserted; the callback only explains the miss.
|
|
56
|
+
*/
|
|
57
|
+
onUnforwardedOptionChord?: (key: KeyId, text: string) => void;
|
|
52
58
|
/** Called when PageUp/PageDown should scroll the transcript viewport instead of prompt history. */
|
|
53
59
|
onViewportPageScroll?: (direction: -1 | 1) => void;
|
|
54
60
|
/** Called before regular composer input should return the transcript viewport to the live bottom. */
|
|
@@ -24,6 +24,7 @@ import { type CustomizationSurface, type GjcScope } from "../../../customization
|
|
|
24
24
|
/** Minimal settings slice the dashboard reads and writes. */
|
|
25
25
|
export interface CustomizationSettingsSlice {
|
|
26
26
|
get(key: string): unknown;
|
|
27
|
+
getGlobal?(key: string): unknown;
|
|
27
28
|
set?(key: string, value: unknown): void;
|
|
28
29
|
}
|
|
29
30
|
export declare class CustomizationDashboard extends Container {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Settings } from "../../../config/settings";
|
|
1
2
|
import type { DashboardState, Extension, FlatTreeItem, ProviderTab, TreeNode } from "./types";
|
|
2
3
|
/**
|
|
3
4
|
* Settings manager interface for granular toggle persistence.
|
|
@@ -9,7 +10,7 @@ export interface ExtensionSettingsManager {
|
|
|
9
10
|
/**
|
|
10
11
|
* Load all extensions from all capabilities.
|
|
11
12
|
*/
|
|
12
|
-
export declare function loadAllExtensions(cwd?: string, disabledIds?: string[]): Promise<Extension[]>;
|
|
13
|
+
export declare function loadAllExtensions(cwd?: string, disabledIds?: string[], settings?: Settings): Promise<Extension[]>;
|
|
13
14
|
/**
|
|
14
15
|
* Build sidebar tree from extensions.
|
|
15
16
|
* Groups by provider → kind.
|
|
@@ -39,7 +40,7 @@ export declare function applyDisabledExtensionsToState(state: DashboardState, di
|
|
|
39
40
|
/**
|
|
40
41
|
* Create initial dashboard state.
|
|
41
42
|
*/
|
|
42
|
-
export declare function createInitialState(cwd?: string, disabledIds?: string[]): Promise<DashboardState>;
|
|
43
|
+
export declare function createInitialState(cwd?: string, disabledIds?: string[], settings?: Settings): Promise<DashboardState>;
|
|
43
44
|
/**
|
|
44
45
|
* Toggle provider enabled state.
|
|
45
46
|
*/
|
|
@@ -47,4 +48,4 @@ export declare function toggleProvider(providerId: string): boolean;
|
|
|
47
48
|
/**
|
|
48
49
|
* Refresh state after toggle.
|
|
49
50
|
*/
|
|
50
|
-
export declare function refreshState(state: DashboardState, cwd?: string, disabledIds?: string[]): Promise<DashboardState>;
|
|
51
|
+
export declare function refreshState(state: DashboardState, cwd?: string, disabledIds?: string[], settings?: Settings): Promise<DashboardState>;
|
|
@@ -37,6 +37,15 @@ export declare class InputController {
|
|
|
37
37
|
toggleQueuePane(): void;
|
|
38
38
|
sendNow(): Promise<void>;
|
|
39
39
|
handleDequeue(): void;
|
|
40
|
+
/**
|
|
41
|
+
* Generate the automatic session title from the first user message. Called
|
|
42
|
+
* from the editor submit and queue-shortcut paths (idle and streaming) and
|
|
43
|
+
* from interactive startup messages; it is a no-op once the session has a
|
|
44
|
+
* user message, a name, or a title request already in flight. The result is
|
|
45
|
+
* bound to the session that requested it: a completion that lands after the
|
|
46
|
+
* session was replaced (New Session, switch, resume) is discarded.
|
|
47
|
+
*/
|
|
48
|
+
maybeGenerateSessionTitle(text: string): void;
|
|
40
49
|
/** Send editor text as a follow-up message (queued behind current stream). */
|
|
41
50
|
handleFollowUp(): Promise<void>;
|
|
42
51
|
/** Send editor text explicitly as a queued next-turn message. */
|
|
@@ -307,6 +307,7 @@ export declare class InteractiveMode implements InteractiveModeContext {
|
|
|
307
307
|
handleCtrlZ(): void;
|
|
308
308
|
handleDequeue(): void;
|
|
309
309
|
handleBackgroundCommand(): void;
|
|
310
|
+
maybeGenerateSessionTitle(text: string): void;
|
|
310
311
|
handleImagePaste(): Promise<boolean>;
|
|
311
312
|
handleBtwCommand(question: string): Promise<void>;
|
|
312
313
|
hasActiveBtw(): boolean;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { InteractiveModeContext } from "../types";
|
|
2
|
+
/** Ordinary focused UI owns interrupt/back before background work does. */
|
|
3
|
+
export declare function focusedUiOwnsInterrupt(ctx: Pick<InteractiveModeContext, "ui" | "editor" | "hookSelector" | "hookInput" | "hookEditor">): boolean;
|
|
@@ -6,5 +6,6 @@
|
|
|
6
6
|
* keybindings registered. In that case, fall back to raw Escape matching.
|
|
7
7
|
*/
|
|
8
8
|
export declare function matchesAppInterrupt(data: string): boolean;
|
|
9
|
+
export declare function matchesAppClear(data: string): boolean;
|
|
9
10
|
export declare function matchesSelectCancel(data: string): boolean;
|
|
10
11
|
export declare function matchesAppExternalEditor(data: string): boolean;
|