@gajae-code/coding-agent 0.18.6 → 0.18.8
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 +318 -1
- package/dist/types/async/job-manager.d.ts +1 -1
- 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 +6 -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/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/settings.d.ts +4 -0
- 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 +8 -3
- package/dist/types/export/html/css-color.d.ts +2 -0
- package/dist/types/export/html/template.generated.d.ts +1 -1
- 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 +3 -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/ralplan-runtime.d.ts +0 -5
- 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 +11 -1
- 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/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/elicitation.d.ts +12 -0
- package/dist/types/runtime-mcp/oauth-public-url.d.ts +1 -0
- package/dist/types/runtime-mcp/plugin-network-boundary.d.ts +1 -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 +18 -1
- package/dist/types/sdk/broker/lifecycle.d.ts +9 -0
- package/dist/types/sdk/broker/session-index.d.ts +12 -6
- package/dist/types/sdk/broker/task-artifact-owner-validation.d.ts +55 -0
- 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/bus/telegram-daemon.d.ts +3 -2
- package/dist/types/sdk/client/client.d.ts +2 -0
- package/dist/types/sdk/host/host.d.ts +6 -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 +9 -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 +36 -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 +19 -0
- package/dist/types/session/internal/task-artifact-owner-transcript.d.ts +11 -0
- package/dist/types/session/session-manager.d.ts +31 -5
- package/dist/types/session/session-retirement.d.ts +71 -0
- package/dist/types/session/session-storage.d.ts +62 -48
- package/dist/types/session/session-transcript-header.d.ts +2 -0
- package/dist/types/session/task-artifact-owner-codec.d.ts +109 -0
- package/dist/types/session/task-artifact-owner-retirement.d.ts +7 -0
- package/dist/types/session/task-artifact-owner.d.ts +10 -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/slash-commands/helpers/progress-report.d.ts +8 -0
- package/dist/types/task/executor.d.ts +3 -0
- package/dist/types/tools/bash-skill-urls.d.ts +1 -1
- package/dist/types/tools/index.d.ts +3 -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/resident-memory-bench.ts +174 -20
- package/scripts/verify-managed-empty-stop.ts +28 -0
- package/src/async/job-manager.ts +228 -122
- package/src/capability/index.ts +18 -0
- package/src/capability/mcp.ts +2 -0
- package/src/capability/skill.ts +2 -0
- package/src/capability/types.ts +6 -0
- package/src/cli/auth-broker-cli.ts +1 -1
- package/src/cli/config-cli.ts +8 -18
- package/src/cli/customize-doctor.ts +15 -2
- package/src/cli/public-command-errors.ts +21 -1
- package/src/cli/setup-cli.ts +4 -4
- package/src/cli/skills-cli.ts +5 -0
- package/src/cli-main.ts +7 -8
- package/src/commands/deep-interview.ts +47 -8
- package/src/commands/sdk.ts +140 -29
- package/src/config/autorouting-tier-map.ts +117 -7
- package/src/config/file-lock.ts +307 -68
- 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/settings.ts +44 -4
- package/src/config/skill-settings-defaults.ts +7 -0
- package/src/coordinator-mcp/policy.ts +3 -2
- 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 +3 -0
- 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/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 +10 -0
- package/src/discovery/helpers.ts +168 -23
- package/src/discovery/mcp-json.ts +6 -0
- package/src/discovery/ssh.ts +9 -4
- package/src/discovery/substitute-plugin-root.ts +3 -1
- package/src/edit/file-read-cache.ts +1 -1
- package/src/eval/py/executor.ts +380 -120
- package/src/export/html/css-color.ts +9 -0
- package/src/export/html/index.ts +5 -4
- package/src/export/html/template.generated.ts +1 -1
- package/src/extensibility/extensions/runner.ts +4 -0
- package/src/extensibility/extensions/types.ts +7 -0
- package/src/extensibility/gjc-plugins/runtime-adapters.ts +73 -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 +6 -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 -8
- package/src/gjc-runtime/launch-worktree.ts +14 -4
- package/src/gjc-runtime/ralplan-runtime.ts +447 -52
- 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 +83 -8
- 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/hindsight/config.ts +9 -3
- package/src/internal-urls/docs-index.generated.ts +19 -18
- package/src/internal-urls/skill-path.ts +19 -0
- package/src/internal-urls/skill-protocol.ts +2 -0
- package/src/lsp/edits.ts +6 -0
- package/src/lsp/workspace-path.ts +51 -0
- package/src/main.ts +195 -31
- package/src/modes/acp/acp-agent.ts +163 -7
- 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/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 +74 -29
- package/src/modes/controllers/runtime-mcp-command-controller.ts +8 -3
- package/src/modes/controllers/selector-controller.ts +28 -15
- package/src/modes/interactive-mode.ts +4 -0
- 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 +13 -4
- package/src/runtime-mcp/config-writer.ts +10 -6
- package/src/runtime-mcp/config.ts +1 -0
- package/src/runtime-mcp/elicitation.ts +142 -0
- package/src/runtime-mcp/oauth-flow.ts +5 -0
- package/src/runtime-mcp/oauth-public-url.ts +8 -0
- package/src/runtime-mcp/plugin-network-boundary.ts +4 -0
- package/src/runtime-mcp/smithery-registry.ts +22 -3
- package/src/runtime-mcp/transports/http.ts +2 -2
- package/src/runtime-mcp/types.ts +6 -0
- package/src/sdk/acp/adapter.ts +93 -8
- package/src/sdk/broker/broker-exit.ts +52 -23
- package/src/sdk/broker/broker.ts +83 -7
- package/src/sdk/broker/ensure.ts +2 -0
- package/src/sdk/broker/lifecycle.ts +820 -73
- package/src/sdk/broker/session-index.ts +191 -81
- package/src/sdk/broker/task-artifact-owner-validation.ts +259 -0
- package/src/sdk/bus/chat-daemon-cli.ts +38 -1
- package/src/sdk/bus/chat-daemon-control.ts +2 -2
- package/src/sdk/bus/chat-daemon-runtime.ts +3 -0
- package/src/sdk/bus/index.ts +241 -46
- package/src/sdk/bus/telegram-daemon-contract.ts +6 -1
- package/src/sdk/bus/telegram-daemon.ts +4 -2
- package/src/sdk/cli/session-cli.ts +17 -3
- package/src/sdk/client/client.ts +28 -8
- package/src/sdk/host/host.ts +6 -0
- package/src/sdk/host/query/handlers.ts +9 -1
- package/src/sdk/host/session-runtime.test.ts +2805 -411
- package/src/sdk/host/session-runtime.ts +428 -111
- 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/mcp/server.ts +15 -3
- 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 +94 -14
- package/src/sdk/session-list.ts +1 -0
- package/src/sdk/session.ts +81 -38
- package/src/session/agent-session.ts +674 -224
- package/src/session/artifacts.ts +174 -70
- package/src/session/internal/managed-gc-retirement-codec.ts +319 -0
- package/src/session/internal/managed-session-scope.ts +3457 -462
- package/src/session/internal/managed-session-storage.ts +482 -61
- package/src/session/internal/managed-task-owner-cleanup.ts +473 -0
- package/src/session/internal/task-artifact-owner-access.ts +245 -0
- package/src/session/internal/task-artifact-owner-transcript.ts +614 -0
- package/src/session/session-manager.ts +939 -133
- package/src/session/session-retirement.ts +714 -0
- package/src/session/session-storage.ts +418 -174
- package/src/session/session-transcript-header.ts +17 -0
- package/src/session/task-artifact-owner-codec.ts +641 -0
- package/src/session/task-artifact-owner-retirement.ts +477 -0
- package/src/session/task-artifact-owner.ts +289 -0
- 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 +132 -2
- package/src/slash-commands/builtin-registry.ts +39 -9
- 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/tools/ask.ts +205 -6
- package/src/tools/ast-edit.ts +4 -0
- 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/descriptors.ts +5 -1
- package/src/tools/eval.ts +56 -36
- package/src/tools/image-gen.ts +1 -1
- package/src/tools/index.ts +3 -0
- package/src/tools/python.ts +187 -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/tools-checksum.ts +34 -0
- package/src/utils/tools-manager.ts +24 -6
- package/src/web/search/providers/codex.ts +3 -2
|
@@ -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 {};
|
|
@@ -80,8 +80,10 @@ export declare function listNativeSkillsForManagement(options: {
|
|
|
80
80
|
cwd: string;
|
|
81
81
|
home?: string;
|
|
82
82
|
agentDir?: string;
|
|
83
|
-
/** Resolver-owned profile classification; unlike path comparison, this survives HOME refreshes. */
|
|
83
|
+
/** Resolver-owned profile classification; unlike path comparison, this survives HOME/config refreshes. */
|
|
84
84
|
profileAuthority?: "default" | "custom";
|
|
85
|
+
/** User-owned permission to follow symlinks outside user skill scan roots. */
|
|
86
|
+
allowExternalUserSkillSymlinks?: boolean;
|
|
85
87
|
policy?: SkillManagementPolicy;
|
|
86
88
|
}): Promise<ManagedSkillRecord[]>;
|
|
87
89
|
/**
|
|
@@ -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. */
|
|
@@ -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;
|
|
@@ -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 {
|
|
@@ -247,6 +248,12 @@ export declare function removeFileAudited(targetPath: string, options?: StateWri
|
|
|
247
248
|
export declare function writeActiveEntry(cwd: string, sessionScope: string | ActiveSessionScope | undefined, skill: string, entry: SkillActiveEntry, options?: StateWriterOptions): Promise<GuardedWriteResult>;
|
|
248
249
|
export declare function removeActiveEntry(cwd: string, sessionScope: string | ActiveSessionScope | undefined, skill: string, options?: StateWriterOptions): Promise<DeleteResult>;
|
|
249
250
|
export declare function readActiveEntries(cwd: string, sessionScope?: string | ActiveSessionScope): Promise<SkillActiveEntry[]>;
|
|
251
|
+
/**
|
|
252
|
+
* Failure-observable counterpart of `readActiveEntries`: an entry file that exists
|
|
253
|
+
* but holds no usable skill entry throws instead of being skipped, so its absence
|
|
254
|
+
* from the result always means the entry does not exist.
|
|
255
|
+
*/
|
|
256
|
+
export declare function readActiveEntriesStrict(cwd: string, sessionScope?: string | ActiveSessionScope): Promise<SkillActiveEntry[]>;
|
|
250
257
|
export declare function rebuildActiveSnapshot(cwd: string, sessionScope?: string | ActiveSessionScope, options?: StateWriterOptions): Promise<string>;
|
|
251
258
|
export declare function mergeActiveState(cwd: string, sessionScope: string | ActiveSessionScope | undefined, skill: string, entry: SkillActiveEntry, options?: StateWriterOptions): Promise<ActiveEntryWriteResult>;
|
|
252
259
|
export declare function writeArtifact(targetPath: string, content: string, options?: StateWriterOptions): Promise<string>;
|
|
@@ -256,7 +263,10 @@ export declare function softDelete(targetPath: string, meta: Record<string, unkn
|
|
|
256
263
|
export declare function hardPruneJson(targetPaths: readonly string[], selector: HardPruneSelector, options?: StateWriterOptions): Promise<string[]>;
|
|
257
264
|
export declare function hardPrune(targets: readonly GenericHardPruneTarget[], selector: GenericHardPruneSelector, options?: StateWriterOptions): Promise<string[]>;
|
|
258
265
|
export declare function forceOverwrite(targetPath: string, rawValue: unknown, options?: ForceOverwriteOptions): Promise<string>;
|
|
259
|
-
export declare function appendAuditEntry(cwd: string, sessionIdOrEntry: string | AuditEntry, maybeEntry?: AuditEntry
|
|
266
|
+
export declare function appendAuditEntry(cwd: string, sessionIdOrEntry: string | AuditEntry, maybeEntry?: AuditEntry, options?: {
|
|
267
|
+
lockHeld?: boolean;
|
|
268
|
+
beforeAppend?: (offset: number) => Promise<unknown>;
|
|
269
|
+
}): Promise<string>;
|
|
260
270
|
export declare function readWorkflowTransactionJournal(cwd: string, sessionId: string, mutationId: string): Promise<WorkflowTransactionJournal | undefined>;
|
|
261
271
|
export declare function beginWorkflowTransactionJournal(input: {
|
|
262
272
|
cwd: string;
|
|
@@ -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>;
|
|
@@ -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;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { KeyId } from "@gajae-code/tui";
|
|
2
|
+
/** The Option chord that composes `text` on the macOS US/ABC layout, if any. */
|
|
3
|
+
export declare function macosOptionChordForComposedText(text: string): KeyId | undefined;
|
|
4
|
+
/** Terminal-specific instruction for sending Option as Alt/Meta, when the terminal is known. */
|
|
5
|
+
export declare function macosOptionForwardingInstruction(terminalProgram: string | undefined): string | undefined;
|
|
6
|
+
export interface UnforwardedOptionChordWarnerOptions {
|
|
7
|
+
platform: NodeJS.Platform;
|
|
8
|
+
terminalProgram: string | undefined;
|
|
9
|
+
formatKeyHint: (key: KeyId) => string;
|
|
10
|
+
showWarning: (message: string) => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Builds the composer callback that explains, once, why a bound Option shortcut
|
|
14
|
+
* produced a character instead of firing. Returns undefined off macOS, where the
|
|
15
|
+
* composition table does not apply.
|
|
16
|
+
*/
|
|
17
|
+
export declare function createUnforwardedOptionChordWarner(options: UnforwardedOptionChordWarnerOptions): ((key: KeyId, text: string) => void) | undefined;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { SubagentLifecycle } from "../async/job-manager";
|
|
2
|
+
import type { Goal, GoalModeState } from "../goals/state";
|
|
3
|
+
import type { SessionManager } from "../session/session-manager";
|
|
4
|
+
import { type TodoPhase } from "../tools/todo-write";
|
|
5
|
+
import { type ProjectProgressInput, type ProjectProgressReport } from "./project-progress";
|
|
6
|
+
/** Session-owned state the overview reads; everything else comes from durable `.gjc` files. */
|
|
7
|
+
export interface ProjectProgressSessionView {
|
|
8
|
+
cwd: string;
|
|
9
|
+
/** GJC session id that scopes `.gjc/_session-{id}` state; without it no workflow state is read. */
|
|
10
|
+
sessionId: string | undefined;
|
|
11
|
+
goal: Goal | undefined;
|
|
12
|
+
todoPhases: readonly TodoPhase[];
|
|
13
|
+
subagents: readonly SubagentLifecycle[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Gather progress input strictly by reading state. A source that fails to read
|
|
17
|
+
* is reported as unreadable and excluded; it never aborts the overview and is
|
|
18
|
+
* never replaced by a guess. A source rebuilt from authoritative per-entry
|
|
19
|
+
* records after its snapshot failed to read is reported as recovered; one whose
|
|
20
|
+
* readable derived snapshot listed stale rows is reported as discarded; one whose
|
|
21
|
+
* rows could not be attributed to an authority is reported as unresolved.
|
|
22
|
+
*/
|
|
23
|
+
export declare function collectProjectProgressInput(view: ProjectProgressSessionView): Promise<ProjectProgressInput>;
|
|
24
|
+
/** The live session state `/progress` and `session.progress` read; satisfied by `AgentSession`. */
|
|
25
|
+
export interface ProjectProgressSessionSource {
|
|
26
|
+
getGoalModeState(): GoalModeState | undefined;
|
|
27
|
+
getTodoPhases(): TodoPhase[];
|
|
28
|
+
getSubagentLifecycleStatuses(): SubagentLifecycle[];
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Single entry point shared by the human view and the machine snapshot.
|
|
32
|
+
*
|
|
33
|
+
* Todos come from the persisted branch history, as `/todo` reads them: the live
|
|
34
|
+
* list drops completed and abandoned items when a session is resumed, so it is
|
|
35
|
+
* only the fallback when no todo state was ever persisted. A persisted empty
|
|
36
|
+
* list is authoritative and is not replaced by live state.
|
|
37
|
+
*/
|
|
38
|
+
export declare function buildSessionProjectProgress(session: ProjectProgressSessionSource, sessionManager: Pick<SessionManager, "getCwd" | "getSessionId" | "getBranch">): Promise<ProjectProgressReport>;
|