@gajae-code/coding-agent 0.18.12 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +467 -0
- package/dist/types/capability/rule.d.ts +7 -2
- package/dist/types/cli/append-system-prompt.d.ts +6 -0
- package/dist/types/cli/args.d.ts +7 -2
- package/dist/types/cli/customize-doctor-precedence.d.ts +16 -0
- package/dist/types/cli/customize-doctor.d.ts +4 -3
- package/dist/types/cli/public-command-errors.d.ts +1 -0
- package/dist/types/cli/root-flags.d.ts +0 -12
- package/dist/types/cli/update-cli.d.ts +7 -2
- package/dist/types/cli-main.d.ts +0 -6
- package/dist/types/commands/launch.d.ts +0 -6
- package/dist/types/commands/migrate.d.ts +1 -1
- package/dist/types/commands/sdk.d.ts +8 -0
- package/dist/types/commit/map-reduce/index.d.ts +4 -4
- package/dist/types/config/autorouting-tier-map.d.ts +23 -1
- package/dist/types/config/config-hot-reload.d.ts +5 -0
- package/dist/types/config/file-lock.d.ts +44 -2
- package/dist/types/config/model-profile-activation.d.ts +19 -5
- package/dist/types/config/model-registry.d.ts +16 -3
- package/dist/types/config/model-resolver.d.ts +5 -4
- package/dist/types/config/settings-schema.d.ts +11 -1
- package/dist/types/coordinator-mcp/server.d.ts +4 -0
- package/dist/types/customization/import.d.ts +2 -0
- package/dist/types/customization/types.d.ts +1 -1
- package/dist/types/dap/session.d.ts +11 -2
- package/dist/types/discovery/helpers.d.ts +7 -2
- package/dist/types/edit/index.d.ts +5 -0
- package/dist/types/edit/modes/patch.d.ts +9 -0
- package/dist/types/eval/py/runtime.d.ts +9 -0
- package/dist/types/export/ttsr.d.ts +19 -0
- package/dist/types/extensibility/extensions/types.d.ts +5 -1
- package/dist/types/extensibility/slash-commands.d.ts +1 -0
- package/dist/types/gjc-runtime/ralplan-current-final.d.ts +54 -0
- package/dist/types/gjc-runtime/ralplan-runtime.d.ts +5 -0
- package/dist/types/gjc-runtime/tmux-sessions.d.ts +24 -0
- package/dist/types/gjc-runtime/ultragoal-change-set.d.ts +6 -0
- package/dist/types/gjc-runtime/ultragoal-runtime.d.ts +1 -0
- package/dist/types/harness-control-plane/receipt-spool.d.ts +4 -0
- package/dist/types/hindsight/content.d.ts +5 -6
- package/dist/types/internal-urls/types.d.ts +2 -0
- package/dist/types/lsp/clients/swiftlint-client.d.ts +0 -4
- package/dist/types/main.d.ts +23 -18
- package/dist/types/migrate/action-planner.d.ts +10 -1
- package/dist/types/migrate/adapters/codex.d.ts +1 -1
- package/dist/types/migrate/adapters/index.d.ts +35 -3
- package/dist/types/migrate/hook-module.d.ts +23 -0
- package/dist/types/migrate/report.d.ts +2 -1
- package/dist/types/migrate/types.d.ts +69 -2
- package/dist/types/modes/components/agent-dashboard.d.ts +1 -1
- package/dist/types/modes/components/model-selector.d.ts +43 -0
- package/dist/types/modes/prompt-suggestion-controller.d.ts +1 -1
- package/dist/types/modes/utils/host-status.d.ts +15 -11
- package/dist/types/runtime-mcp/project-host-values.d.ts +11 -5
- package/dist/types/sdk/broker/broker-exit.d.ts +1 -1
- package/dist/types/sdk/broker/broker.d.ts +22 -1
- package/dist/types/sdk/broker/ensure.d.ts +5 -2
- package/dist/types/sdk/broker/hop.d.ts +9 -0
- package/dist/types/sdk/broker/lifecycle.d.ts +22 -0
- package/dist/types/sdk/broker/session-index.d.ts +2 -0
- package/dist/types/sdk/broker/transport.d.ts +2 -0
- package/dist/types/sdk/bus/index.d.ts +21 -0
- package/dist/types/sdk/bus/telegram-daemon-contract.d.ts +7 -1
- package/dist/types/sdk/bus/telegram-daemon.d.ts +2 -0
- package/dist/types/sdk/bus/threaded-render.d.ts +2 -1
- package/dist/types/sdk/host/control/operations.d.ts +5 -1
- package/dist/types/sdk/host/events.d.ts +4 -0
- package/dist/types/sdk/host/host.d.ts +2 -1
- package/dist/types/sdk/host/prompt-image-upload.d.ts +43 -0
- package/dist/types/sdk/host/session-runtime.d.ts +8 -8
- package/dist/types/sdk/host/surface-policy.d.ts +2 -1
- package/dist/types/sdk/lifecycle/service.d.ts +12 -0
- package/dist/types/sdk/prompt-status.d.ts +11 -4
- package/dist/types/session/agent-session.d.ts +50 -8
- package/dist/types/session/session-manager.d.ts +16 -0
- package/dist/types/skill-state/workflow-mutation-guard.d.ts +13 -1
- package/dist/types/slash-commands/helpers/mcp.d.ts +5 -0
- package/dist/types/ssh/ssh-executor.d.ts +8 -1
- package/dist/types/system-prompt.d.ts +3 -2
- package/dist/types/task/role-body.d.ts +11 -0
- package/dist/types/tools/awaiting-input.d.ts +28 -0
- package/dist/types/tools/bash-allowed-prefixes.d.ts +6 -0
- package/dist/types/tools/bash-skill-urls.d.ts +4 -0
- package/dist/types/tools/bash.d.ts +7 -0
- package/dist/types/tools/descriptors.d.ts +13 -2
- package/dist/types/tools/fetch.d.ts +6 -0
- package/dist/types/tools/irc.d.ts +5 -3
- package/dist/types/tools/tmux-self-injection-guard.d.ts +2 -0
- package/dist/types/tools/ultragoal-ask-guard.d.ts +1 -1
- package/dist/types/tools/write.d.ts +2 -0
- package/dist/types/utils/file-mentions.d.ts +5 -0
- package/dist/types/utils/image-limits.d.ts +7 -0
- package/dist/types/utils/image-loading.d.ts +0 -1
- package/dist/types/utils/open.d.ts +0 -1
- package/dist/types/utils/pasted-image-loading.d.ts +1 -5
- package/dist/types/utils/prompt-suggestion.d.ts +2 -2
- package/dist/types/utils/shell-snapshot.d.ts +2 -0
- package/dist/types/utils/title-generator.d.ts +13 -3
- package/dist/types/web/search/providers/codex.d.ts +6 -7
- package/package.json +9 -8
- package/scripts/acp-conformance-agent.ts +12 -2
- package/scripts/generate-sdk-operation-inventory.ts +16 -0
- package/src/capability/fs.ts +31 -3
- package/src/capability/rule.ts +11 -2
- package/src/cli/append-system-prompt.ts +12 -0
- package/src/cli/args.ts +11 -7
- package/src/cli/customize-doctor-precedence.ts +31 -0
- package/src/cli/customize-doctor.ts +49 -39
- package/src/cli/fast-help.ts +0 -2
- package/src/cli/migrate-cli.ts +14 -3
- package/src/cli/public-command-errors.ts +2 -0
- package/src/cli/root-flags.ts +0 -2
- package/src/cli/update-cli.ts +247 -6
- package/src/commands/harness.ts +25 -15
- package/src/commands/migrate.ts +3 -3
- package/src/commands/sdk.ts +81 -11
- package/src/commit/agentic/agent.ts +6 -6
- package/src/commit/analysis/conventional.ts +14 -5
- package/src/commit/map-reduce/index.ts +7 -7
- package/src/commit/pipeline.ts +12 -12
- package/src/config/autorouting-tier-map.ts +20 -1
- package/src/config/config-file.ts +106 -3
- package/src/config/config-hot-reload.ts +8 -0
- package/src/config/file-lock.ts +1431 -304
- package/src/config/keybindings.ts +154 -7
- package/src/config/model-profile-activation.ts +177 -39
- package/src/config/model-registry.ts +380 -55
- package/src/config/model-resolver.ts +49 -21
- package/src/config/settings-schema.ts +13 -1
- package/src/config/settings.ts +2 -0
- package/src/coordinator-mcp/server.ts +37 -2
- package/src/crash/sanitize.ts +3 -1
- package/src/customization/import.ts +276 -7
- package/src/customization/inventory.ts +24 -8
- package/src/customization/types.ts +1 -0
- package/src/dap/client.ts +3 -2
- package/src/dap/session.ts +161 -36
- package/src/debug/crash-diagnostics.ts +87 -5
- package/src/debug/report-bundle.ts +71 -2
- package/src/discovery/builtin.ts +4 -3
- package/src/discovery/helpers.ts +24 -14
- package/src/edit/index.ts +191 -5
- package/src/edit/modes/patch.ts +27 -0
- package/src/eval/py/runtime.ts +44 -4
- package/src/exec/non-interactive-env.ts +0 -1
- package/src/export/html/index.ts +60 -20
- package/src/export/ttsr.ts +176 -1
- package/src/extensibility/extensions/loader.ts +2 -0
- package/src/extensibility/extensions/ouroboros-ooo-bridge.ts +63 -1
- package/src/extensibility/extensions/types.ts +5 -1
- package/src/extensibility/hooks/loader.ts +10 -2
- package/src/extensibility/plugins/marketplace/manager.ts +36 -10
- package/src/extensibility/slash-commands.ts +5 -0
- package/src/gjc-runtime/gc-runtime.ts +4 -1
- package/src/gjc-runtime/launch-tmux.ts +23 -13
- package/src/gjc-runtime/ralplan-current-final.ts +294 -0
- package/src/gjc-runtime/ralplan-runtime.ts +95 -1
- package/src/gjc-runtime/state-writer.ts +109 -5
- package/src/gjc-runtime/tmux-sessions.ts +93 -13
- package/src/gjc-runtime/ultragoal-change-set.ts +90 -11
- package/src/gjc-runtime/ultragoal-guard.ts +9 -1
- package/src/gjc-runtime/ultragoal-runtime.ts +15 -5
- package/src/harness-control-plane/finalize.ts +11 -0
- package/src/harness-control-plane/receipt-spool.ts +105 -28
- package/src/harness-control-plane/storage.ts +124 -6
- package/src/hindsight/content.ts +116 -16
- package/src/hindsight/mental-models.ts +22 -10
- package/src/hindsight/state.ts +7 -4
- package/src/hooks/native-skill-hook.ts +3 -1
- package/src/internal-urls/artifact-protocol.ts +3 -1
- package/src/internal-urls/docs-index.generated.ts +14 -14
- package/src/internal-urls/local-protocol.ts +28 -3
- package/src/internal-urls/types.ts +2 -0
- package/src/lsp/client.ts +2 -1
- package/src/lsp/clients/biome-client.ts +2 -0
- package/src/lsp/clients/swiftlint-client.ts +2 -0
- package/src/main.ts +330 -92
- package/src/memories/index.ts +25 -2
- package/src/migrate/action-planner.ts +517 -2
- package/src/migrate/adapters/claude-code.ts +141 -3
- package/src/migrate/adapters/codex.ts +57 -5
- package/src/migrate/adapters/index.ts +240 -5
- package/src/migrate/adapters/opencode.ts +4 -0
- package/src/migrate/executor.ts +141 -3
- package/src/migrate/hook-module.ts +193 -0
- package/src/migrate/report.ts +45 -1
- package/src/migrate/types.ts +73 -3
- package/src/modes/acp/acp-agent.ts +10 -1
- package/src/modes/components/agent-dashboard.ts +20 -4
- package/src/modes/components/customization/customization-dashboard.ts +7 -0
- package/src/modes/components/customization/import-wizard.ts +29 -3
- package/src/modes/components/model-selector.ts +157 -103
- package/src/modes/components/welcome.ts +3 -1
- package/src/modes/controllers/command-controller.ts +271 -16
- package/src/modes/controllers/event-controller.ts +1 -1
- package/src/modes/controllers/extension-ui-controller.ts +31 -1
- package/src/modes/controllers/goal-mode-controller.ts +79 -10
- package/src/modes/controllers/input-controller.ts +2 -0
- package/src/modes/controllers/plan-mode-controller.ts +49 -4
- package/src/modes/controllers/runtime-mcp-command-controller.ts +7 -6
- package/src/modes/controllers/selector-controller.ts +14 -1
- package/src/modes/interactive-mode.ts +55 -4
- package/src/modes/prompt-suggestion-controller.ts +1 -1
- package/src/modes/runtime-init.ts +5 -1
- package/src/modes/utils/host-status.ts +21 -10
- package/src/prompts/agent-fragments/browser-aside.md +2 -2
- package/src/prompts/system/irc-incoming.md +3 -1
- package/src/prompts/tools/irc.md +1 -1
- package/src/runtime-mcp/manager.ts +8 -3
- package/src/runtime-mcp/project-host-values.ts +12 -8
- package/src/runtime-mcp/tool-bridge.ts +68 -4
- package/src/runtime-mcp/transports/stdio.ts +2 -1
- package/src/sdk/broker/broker-exit.ts +2 -0
- package/src/sdk/broker/broker.ts +143 -4
- package/src/sdk/broker/ensure.ts +74 -6
- package/src/sdk/broker/hop.ts +13 -1
- package/src/sdk/broker/lifecycle-ledger.ts +3 -0
- package/src/sdk/broker/lifecycle.ts +102 -6
- package/src/sdk/broker/session-index.ts +29 -4
- package/src/sdk/broker/transport.ts +17 -1
- package/src/sdk/bus/chat-daemon-control.ts +2 -2
- package/src/sdk/bus/index.ts +408 -14
- package/src/sdk/bus/session-control.ts +2 -0
- package/src/sdk/bus/slack-daemon.ts +105 -9
- package/src/sdk/bus/telegram-daemon-contract.ts +7 -1
- package/src/sdk/bus/telegram-daemon.ts +10 -2
- package/src/sdk/bus/threaded-render.ts +20 -1
- package/src/sdk/cli/session-cli.ts +2 -0
- package/src/sdk/host/control/dispatch.ts +13 -1
- package/src/sdk/host/control/operations.ts +10 -1
- package/src/sdk/host/events.ts +67 -4
- package/src/sdk/host/host.ts +8 -2
- package/src/sdk/host/prompt-image-upload.ts +438 -0
- package/src/sdk/host/sdk-surface-parity.test.ts +15 -0
- package/src/sdk/host/session-runtime.test.ts +1537 -24
- package/src/sdk/host/session-runtime.ts +332 -36
- package/src/sdk/host/surface-policy.ts +4 -0
- package/src/sdk/host/websocket-transport.lifecycle.test.ts +90 -2
- package/src/sdk/host/websocket-transport.ts +19 -7
- package/src/sdk/lifecycle/service.ts +14 -1
- package/src/sdk/prompt-status.ts +6 -4
- package/src/sdk/protocol/adapter-validation.ts +28 -1
- package/src/sdk/protocol/operation-inventory.generated.json +160 -0
- package/src/sdk/protocol/operation-registry.ts +33 -3
- package/src/sdk/session.ts +123 -36
- package/src/session/agent-session.ts +1614 -329
- package/src/session/history-storage.ts +182 -12
- package/src/session/internal/managed-session-scope.ts +47 -18
- package/src/session/internal/managed-session-storage.ts +71 -1
- package/src/session/session-manager.ts +90 -5
- package/src/session-import/redact.ts +53 -2
- package/src/skill-state/workflow-mutation-guard.ts +1498 -18
- package/src/slash-commands/builtin-registry.ts +6 -3
- package/src/slash-commands/helpers/mcp.ts +11 -3
- package/src/ssh/ssh-executor.ts +9 -2
- package/src/stt/recorder.ts +26 -9
- package/src/system-prompt.ts +61 -16
- package/src/task/executor.ts +12 -8
- package/src/task/role-body.ts +84 -0
- package/src/task/token-log-mode.test.ts +162 -0
- package/src/task/token-log.ts +91 -2
- package/src/tools/archive-reader.ts +650 -37
- package/src/tools/ask.ts +1 -0
- package/src/tools/ast-grep.ts +7 -2
- package/src/tools/auto-generated-guard.ts +12 -3
- package/src/tools/awaiting-input.ts +114 -0
- package/src/tools/bash-allowed-prefixes.ts +61 -1
- package/src/tools/bash-skill-urls.ts +58 -5
- package/src/tools/bash.ts +99 -26
- package/src/tools/browser/tab-worker.ts +39 -13
- package/src/tools/browser.ts +17 -7
- package/src/tools/cron.ts +10 -1
- package/src/tools/debug.ts +9 -2
- package/src/tools/descriptors.test.ts +4 -4
- package/src/tools/descriptors.ts +16 -4
- package/src/tools/eval.ts +15 -0
- package/src/tools/fetch.ts +90 -2
- package/src/tools/gh.ts +27 -12
- package/src/tools/image-gen.ts +20 -6
- package/src/tools/irc.ts +5 -3
- package/src/tools/monitor.ts +9 -1
- package/src/tools/output-meta.ts +51 -3
- package/src/tools/read.ts +9 -2
- package/src/tools/recipe/runner.ts +23 -12
- package/src/tools/render-utils.ts +2 -2
- package/src/tools/search.ts +3 -2
- package/src/tools/ssh.ts +274 -8
- package/src/tools/subagent.ts +10 -4
- package/src/tools/tmux-self-injection-guard.ts +3301 -122
- package/src/tools/tool-catalog.generated.ts +1 -1
- package/src/tools/ultragoal-ask-guard.ts +13 -1
- package/src/tools/write.ts +7 -0
- package/src/tui/tree-list.ts +15 -1
- package/src/utils/commit-message-generator.ts +3 -2
- package/src/utils/external-editor.ts +21 -7
- package/src/utils/file-mentions.ts +46 -6
- package/src/utils/git.ts +38 -7
- package/src/utils/image-limits.ts +8 -0
- package/src/utils/image-loading.ts +1 -1
- package/src/utils/open.ts +73 -4
- package/src/utils/pasted-image-loading.ts +9 -8
- package/src/utils/prompt-suggestion.ts +5 -4
- package/src/utils/shell-snapshot.ts +9 -1
- package/src/utils/title-generator.ts +65 -20
- package/src/web/search/index.ts +2 -1
- package/src/web/search/providers/codex.ts +29 -32
|
@@ -11,6 +11,13 @@ export interface TtsrMatchContext {
|
|
|
11
11
|
/** Stable key to isolate buffering (for example a tool call ID). */
|
|
12
12
|
streamKey?: string;
|
|
13
13
|
}
|
|
14
|
+
/** An astCondition pattern parse issue observed while checking a target language. */
|
|
15
|
+
export interface TtsrAstConditionDiagnostic {
|
|
16
|
+
ruleName: string;
|
|
17
|
+
lang: string;
|
|
18
|
+
patterns: string[];
|
|
19
|
+
parseErrors: string[];
|
|
20
|
+
}
|
|
14
21
|
/** Tracks when a rule was last injected (for repeat gating). */
|
|
15
22
|
export interface TtsrInjectionRecord {
|
|
16
23
|
name: string;
|
|
@@ -36,6 +43,12 @@ export declare class TtsrManager {
|
|
|
36
43
|
markInjectedByNames(ruleNames: string[]): void;
|
|
37
44
|
/** Get names of all injected rules (for persistence). */
|
|
38
45
|
getInjectedRuleNames(): string[];
|
|
46
|
+
/**
|
|
47
|
+
* Undo a provisional claim whose reminder was never delivered: restore the
|
|
48
|
+
* record the rule had before the claim, or forget it when it had none, so the
|
|
49
|
+
* rule is eligible again exactly as before.
|
|
50
|
+
*/
|
|
51
|
+
releaseInjected(ruleName: string, previous: TtsrInjectionRecord | undefined): void;
|
|
39
52
|
/** Get full injected rule records (for persistence). */
|
|
40
53
|
getInjectedRecords(): TtsrInjectionRecord[];
|
|
41
54
|
/** Restore injected state from legacy rule names or persisted records. */
|
|
@@ -52,4 +65,10 @@ export declare class TtsrManager {
|
|
|
52
65
|
restoreMessageCount(messageCount: number): void;
|
|
53
66
|
/** Get settings. */
|
|
54
67
|
getSettings(): Required<TtsrSettings>;
|
|
68
|
+
/** Check if any registered rule carries an `astCondition`. */
|
|
69
|
+
hasAstRules(): boolean;
|
|
70
|
+
/** Get observed astCondition pattern parse issues for rule diagnostics. */
|
|
71
|
+
getAstConditionDiagnostics(): TtsrAstConditionDiagnostic[];
|
|
72
|
+
/** Match the source introduced by finalized tool arguments, before execution. */
|
|
73
|
+
checkAstSnapshot(snapshot: string, context: TtsrMatchContext, signal?: AbortSignal): Promise<Rule[]>;
|
|
55
74
|
}
|
|
@@ -28,7 +28,7 @@ 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
30
|
import type { ProjectProgressSnapshot } from "../../progress/progress-contract";
|
|
31
|
-
import type { AgentSessionEventListener } from "../../session/agent-session";
|
|
31
|
+
import type { AgentSessionEventListener, QueuedRunStartFailure } from "../../session/agent-session";
|
|
32
32
|
import type { ClientBridge, ClientBridgePermissionOption, ClientBridgePermissionOutcome, ClientBridgePermissionToolCall } from "../../session/client-bridge";
|
|
33
33
|
import type { CustomMessage } from "../../session/messages";
|
|
34
34
|
import type { ReadonlySessionManager, SessionManager } from "../../session/session-manager";
|
|
@@ -864,6 +864,8 @@ export interface ExtensionAPI {
|
|
|
864
864
|
startsOwnRun?: boolean;
|
|
865
865
|
removed?: boolean;
|
|
866
866
|
}) => void;
|
|
867
|
+
/** Internal positive refusal before an exact queued invocation can start. */
|
|
868
|
+
onQueuedRunStartFailed?: (failure: QueuedRunStartFailure) => void;
|
|
867
869
|
onDispatchDisposition?: (promotion: {
|
|
868
870
|
startsOwnRun: boolean;
|
|
869
871
|
}) => void;
|
|
@@ -1052,6 +1054,8 @@ export type SendUserMessageHandler = (content: string | (TextContent | ImageCont
|
|
|
1052
1054
|
startsOwnRun?: boolean;
|
|
1053
1055
|
removed?: boolean;
|
|
1054
1056
|
}) => void;
|
|
1057
|
+
/** Internal positive refusal, not an inference from a dispatch error or missing event. */
|
|
1058
|
+
onQueuedRunStartFailed?: (failure: QueuedRunStartFailure) => void;
|
|
1055
1059
|
/**
|
|
1056
1060
|
* Fired synchronously when a plain prompt's dispatch resolves at queue
|
|
1057
1061
|
* time instead of run end (diverted into an in-flight run's steering).
|
|
@@ -18,6 +18,7 @@ export declare const BUILTIN_SLASH_COMMANDS: ReadonlyArray<BuiltinSlashCommand &
|
|
|
18
18
|
getArgumentCompletions?: (prefix: string) => AutocompleteItem[] | null;
|
|
19
19
|
getInlineHint?: (argumentText: string) => string | null;
|
|
20
20
|
}>;
|
|
21
|
+
export declare function getBuiltinSlashCommandsForSession(hasExactMcpControls: boolean): typeof BUILTIN_SLASH_COMMANDS;
|
|
21
22
|
/**
|
|
22
23
|
* Represents a custom slash command loaded from a file
|
|
23
24
|
*/
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export interface RalplanIndexRow {
|
|
2
|
+
stage: string;
|
|
3
|
+
stageN: number;
|
|
4
|
+
path: string;
|
|
5
|
+
sha256: string;
|
|
6
|
+
}
|
|
7
|
+
export interface RalplanCurrentFinalDescriptor {
|
|
8
|
+
/** Run id the final belongs to. */
|
|
9
|
+
runId: string;
|
|
10
|
+
/** Absolute path of the final artifact. */
|
|
11
|
+
finalPath: string;
|
|
12
|
+
/** sha256 recorded for the final and re-verified against its bytes. */
|
|
13
|
+
finalSha256: string;
|
|
14
|
+
/** sha256 of the iteration-opening planner (or revision) artifact. */
|
|
15
|
+
plannerSha256: string;
|
|
16
|
+
/** Reviewer verdict hashes that joined this iteration. */
|
|
17
|
+
reviewerSha256: Record<string, string>;
|
|
18
|
+
/** Session that owns the run; a foreign session can never be granted. */
|
|
19
|
+
sessionId: string;
|
|
20
|
+
}
|
|
21
|
+
export type RalplanCurrentFinalRefusalCode = "missing_state" | "run_not_final" | "auto_handoff_enabled" | "missing_index" | "malformed_index" | "no_iteration_opener" | "final_not_last" | "missing_reviewers" | "artifact_missing" | "artifact_outside_run" | "hash_mismatch";
|
|
22
|
+
export interface RalplanCurrentFinalRefusal {
|
|
23
|
+
code: RalplanCurrentFinalRefusalCode;
|
|
24
|
+
/** Human-readable reason suitable for a guard error message. */
|
|
25
|
+
reason: string;
|
|
26
|
+
}
|
|
27
|
+
export type RalplanCurrentFinalResolution = {
|
|
28
|
+
ok: true;
|
|
29
|
+
descriptor: RalplanCurrentFinalDescriptor;
|
|
30
|
+
} | {
|
|
31
|
+
ok: false;
|
|
32
|
+
refusal: RalplanCurrentFinalRefusal;
|
|
33
|
+
};
|
|
34
|
+
export interface RalplanCurrentFinalInput {
|
|
35
|
+
cwd: string;
|
|
36
|
+
/** Caller session id; the run must belong to it. */
|
|
37
|
+
sessionId: string;
|
|
38
|
+
/** Optional agent dir for settings resolution. */
|
|
39
|
+
agentDir?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Whether the pending `ask` payload selects the ralplan execution-approval gate.
|
|
43
|
+
*
|
|
44
|
+
* This is a selector, not authority: it only decides which validation runs. The
|
|
45
|
+
* descriptor it leads to is the proof.
|
|
46
|
+
*/
|
|
47
|
+
export declare function selectsRalplanApprovalGate(pendingQuestions: unknown): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Resolve and verify the current ralplan final for `sessionId`.
|
|
50
|
+
*
|
|
51
|
+
* Fails closed: every check returns a refusal instead of degrading to a weaker
|
|
52
|
+
* proof, because the caller uses a success to lift the Ultragoal ask guard.
|
|
53
|
+
*/
|
|
54
|
+
export declare function resolveRalplanCurrentFinal(input: RalplanCurrentFinalInput): Promise<RalplanCurrentFinalResolution>;
|
|
@@ -160,6 +160,11 @@ interface RalplanTargetRoot {
|
|
|
160
160
|
}
|
|
161
161
|
export declare function resolveRalplanTargetRoot(args: readonly string[], invocationCwd: string): Promise<RalplanTargetRoot>;
|
|
162
162
|
export declare function assertExplicitTargetGjcNotSymlinked(root: string): Promise<void>;
|
|
163
|
+
/**
|
|
164
|
+
* Credential scrub for a ralplan stage body. The result is what
|
|
165
|
+
* `gjc ralplan --write` hashes and stores.
|
|
166
|
+
*/
|
|
167
|
+
export declare function scrubRalplanPersistedBody(stage: string, content: string): string;
|
|
163
168
|
export declare function runNativeRalplanCommand(args: string[], cwd?: string, options?: {
|
|
164
169
|
agentDir?: string;
|
|
165
170
|
}): Promise<RalplanCommandResult>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ProjectEnvSnapshot } from "@gajae-code/utils/env-file";
|
|
1
2
|
import { type ProviderAuthority } from "./tmux-common";
|
|
2
3
|
import { type OwnerIsolationProbeSync, type OwnerVerdict, type PlanResponse, type TmuxOwnerIsolationExecutionDependencies, type TmuxOwnerIsolationExecutionResult } from "./tmux-owner-isolation";
|
|
3
4
|
export interface ManagedTmuxLaunchSpec {
|
|
@@ -106,6 +107,29 @@ export type CreateOwnerIsolationTestDependencies = {
|
|
|
106
107
|
export declare function __setCreateOwnerIsolationForTests(dependencies: CreateOwnerIsolationTestDependencies | null): void;
|
|
107
108
|
/** @internal Test-only seam; production mutations always use live fail-closed proofs. */
|
|
108
109
|
export declare function __setMutationServerProofForTests(dependency: ((tmuxCommand: string, env: NodeJS.ProcessEnv) => unknown) | null): void;
|
|
110
|
+
/**
|
|
111
|
+
* Drop project-dotenv copies of the tmux session name, coordinator id, and
|
|
112
|
+
* state-file path. A pin is kept only when every snapshot accepts it, so a
|
|
113
|
+
* declaration Bun loaded before `chdir` is refused even if the launch cwd no
|
|
114
|
+
* longer contains that file. Acceptance uses the shared helper, but the
|
|
115
|
+
* original string stays: callers trim at use, and a later check must see the
|
|
116
|
+
* same value that was accepted.
|
|
117
|
+
*/
|
|
118
|
+
export declare function trustedTmuxLaunchIdentityEnv(env: NodeJS.ProcessEnv, snapshots: readonly ProjectEnvSnapshot[]): NodeJS.ProcessEnv;
|
|
119
|
+
export declare function tmuxLaunchIdentityEnv(env: NodeJS.ProcessEnv, cwd: string): NodeJS.ProcessEnv;
|
|
120
|
+
/**
|
|
121
|
+
* Session id the launched child must see. A trusted pin is passed through.
|
|
122
|
+
* A rejected project pin is replaced by the same fallback the launch plan uses
|
|
123
|
+
* for the session root, which also stops Bun from reloading that dotenv value
|
|
124
|
+
* (`GJC_TMUX_LAUNCHED=1` skips the planner filter). An omitted id stays omitted.
|
|
125
|
+
*/
|
|
126
|
+
export declare function resolvedChildGjcSessionId(input: {
|
|
127
|
+
trusted: string | undefined;
|
|
128
|
+
inherited: string | undefined;
|
|
129
|
+
projectDeclared: boolean;
|
|
130
|
+
fallback: string;
|
|
131
|
+
}): string | undefined;
|
|
132
|
+
export declare function childGjcSessionIdAssignment(env: NodeJS.ProcessEnv, identityEnv: NodeJS.ProcessEnv, cwd: string, fallbackSessionId: string): Record<string, string>;
|
|
109
133
|
export declare function listGjcTmuxSessions(env?: NodeJS.ProcessEnv): GjcTmuxSessionStatus[];
|
|
110
134
|
/** @internal */
|
|
111
135
|
export declare function listTmuxSessionsForGc(env?: NodeJS.ProcessEnv): GjcTmuxSessionsForGc;
|
|
@@ -28,11 +28,17 @@ export declare function computeUltragoalReviewSourceHash(changeSet: UltragoalCha
|
|
|
28
28
|
export declare function spawnText(command: string[], options: {
|
|
29
29
|
cwd: string;
|
|
30
30
|
timeoutMs?: number;
|
|
31
|
+
stdin?: string;
|
|
31
32
|
}): Promise<{
|
|
32
33
|
ok: boolean;
|
|
33
34
|
stdout: string;
|
|
34
35
|
stderr: string;
|
|
35
36
|
}>;
|
|
37
|
+
/**
|
|
38
|
+
* The canonical empty tree object for SHA-1 repositories. Use getEmptyTreeId()
|
|
39
|
+
* to derive the format-specific ID for a given repository.
|
|
40
|
+
*/
|
|
41
|
+
export declare const GIT_EMPTY_TREE_SHA = "4b825dc642cb6eb9a060e54bf8d69288fbee4904";
|
|
36
42
|
export declare function resolveGitBase(cwd: string, branch?: string): Promise<string>;
|
|
37
43
|
export declare function parseGitNameStatus(output: string): UltragoalChangeSetPath[];
|
|
38
44
|
export declare function parseGitUntrackedPaths(output: string): UltragoalChangeSetPath[];
|
|
@@ -191,6 +191,7 @@ export declare function resolveUltragoalNudgeBudget(cwd: string, agentDir?: stri
|
|
|
191
191
|
export declare function selectUltragoalNudgeTarget(plan: UltragoalPlan, options?: {
|
|
192
192
|
currentGoalObjective?: string;
|
|
193
193
|
retryFailed?: boolean;
|
|
194
|
+
excludedGoalIds?: readonly string[];
|
|
194
195
|
}): UltragoalNudgeTarget | null;
|
|
195
196
|
/**
|
|
196
197
|
* Atomic consuming writer. Locks the ledger path, rereads + counts nudge rows for the
|
|
@@ -10,6 +10,10 @@ export interface ReceiptSpoolAppendResult {
|
|
|
10
10
|
cursor: string;
|
|
11
11
|
path: string;
|
|
12
12
|
}
|
|
13
|
+
/** True only when an exception's `code` is `ENOENT`. Other codes propagate. */
|
|
14
|
+
export declare function isEnoent(error: unknown): boolean;
|
|
15
|
+
/** A spool directory the startup project snapshot does not declare. */
|
|
16
|
+
export declare function trustedReceiptSpoolDir(raw: string | undefined): string | undefined;
|
|
13
17
|
/** @internal Test-only instrumentation for steady-state spool scan coverage. */
|
|
14
18
|
export declare function receiptSpoolFullScanCountForTesting(): number;
|
|
15
19
|
/** @internal Test-only cache reset. */
|
|
@@ -20,12 +20,11 @@ export interface RecallResultLike {
|
|
|
20
20
|
/**
|
|
21
21
|
* Strip `<memories>`, `<mental_models>`, and legacy memory blocks.
|
|
22
22
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* retaining.
|
|
23
|
+
* Matching is case-insensitive and allows whitespace inside the tag.
|
|
24
|
+
* Both per-turn recall and curated mental models are injected around the
|
|
25
|
+
* prompt. If a closer, a case variant, or an early-ended frame leaks into
|
|
26
|
+
* the retention transcript, the next retain stores the breakout as a new
|
|
27
|
+
* memory. Always strip before retaining.
|
|
29
28
|
*/
|
|
30
29
|
export declare function stripMemoryTags(content: string): string;
|
|
31
30
|
/** Format recall results into a bullet list for context injection. */
|
|
@@ -20,6 +20,8 @@ export interface InternalResource {
|
|
|
20
20
|
size?: number;
|
|
21
21
|
/** Underlying filesystem path (for debugging, not exposed to agent) */
|
|
22
22
|
sourcePath?: string;
|
|
23
|
+
/** True when model-facing reads must wrap the selected content as untrusted. */
|
|
24
|
+
untrusted?: boolean;
|
|
23
25
|
/** Additional notes about resolution */
|
|
24
26
|
notes?: string[];
|
|
25
27
|
/**
|
package/dist/types/main.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { ImageContent } from "@gajae-code/ai/core";
|
|
8
8
|
import { postmortem } from "@gajae-code/utils";
|
|
9
|
-
import type
|
|
9
|
+
import { type Args } from "./cli/args";
|
|
10
10
|
import { ModelRegistry } from "./config/model-registry";
|
|
11
11
|
import { Settings } from "./config/settings";
|
|
12
12
|
import type { ExtensionUIContext } from "./extensibility/extensions/types";
|
|
@@ -45,7 +45,7 @@ export declare function initializeInteractiveModeWithStartupUpdate(mode: Startup
|
|
|
45
45
|
* Every other local-session flag is rejected so the broker-backed ACP host
|
|
46
46
|
* never appears to accept options it cannot apply to its remote session.
|
|
47
47
|
*/
|
|
48
|
-
export declare function resolveAcpStartupOptions(parsed: Pick<Args, "allowHome" | "apiKey" | "appendSystemPrompt" | "credential" | "preferCredential" | "continue" | "default" | "cwd" | "fileArgs" | "fork" | "hooks" | "messages" | "mpreset" | "mcpConfig" | "model" | "models" | "noLsp" | "noMcp" | "noPty" | "noRules" | "noSession" | "noSkills" | "noTitle" | "noTools" | "pluginDirs" | "print" | "provider" | "providerSessionId" | "resume" | "sessionDir" | "skills" | "
|
|
48
|
+
export declare function resolveAcpStartupOptions(parsed: Pick<Args, "allowHome" | "apiKey" | "appendSystemPrompt" | "credential" | "preferCredential" | "continue" | "default" | "cwd" | "fileArgs" | "fork" | "hooks" | "messages" | "mpreset" | "mcpConfig" | "model" | "models" | "noLsp" | "noMcp" | "noPty" | "noRules" | "noSession" | "noSkills" | "noTitle" | "noTools" | "pluginDirs" | "print" | "provider" | "providerSessionId" | "resume" | "sessionDir" | "skills" | "plan" | "systemPrompt" | "thinking" | "tmux" | "tools" | "extensions" | "unknownFlags">, sessionOptions: Pick<CreateAgentSessionOptions, "model" | "modelPattern" | "thinkingLevel">): AcpStartupOptions;
|
|
49
49
|
declare function readPipedInput(): Promise<string | undefined>;
|
|
50
50
|
export interface InteractiveModeNotify {
|
|
51
51
|
kind: "warn" | "error" | "info";
|
|
@@ -130,6 +130,7 @@ type RunPrintMode = (session: AgentSession, options: PrintModeOptions) => Promis
|
|
|
130
130
|
export interface RunRootCommandDependencies {
|
|
131
131
|
createAgentSession?: typeof createAgentSession;
|
|
132
132
|
createSessionManager?: typeof createSessionManager;
|
|
133
|
+
registerDirectSession?: typeof registerDirectSession;
|
|
133
134
|
discoverAuthStorage?: typeof discoverAuthStorage;
|
|
134
135
|
resolveStartupAuthConfig?: typeof resolveStartupAuthConfig;
|
|
135
136
|
runAcpMode?: (options?: {
|
|
@@ -173,25 +174,29 @@ interface DirectSessionRegistrationDependencies {
|
|
|
173
174
|
attestationEpoch: string;
|
|
174
175
|
};
|
|
175
176
|
}
|
|
176
|
-
/** Register a durable direct CLI session while leaving ephemeral sessions lock-free. */
|
|
177
|
-
export declare function registerDirectSession(sessionManager: DirectSessionManager | undefined, agentDir: string, lifecycleRequestId: string | undefined, dependencies?: DirectSessionRegistrationDependencies): Promise<void>;
|
|
178
|
-
export interface ModelRoleOverrides {
|
|
179
|
-
smol?: string;
|
|
180
|
-
slow?: string;
|
|
181
|
-
plan?: string;
|
|
182
|
-
}
|
|
183
177
|
/**
|
|
184
|
-
*
|
|
178
|
+
* Handle for a direct CLI session's broker-index registration.
|
|
185
179
|
*
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
* invocation never inherits an earlier one's values.
|
|
180
|
+
* A direct session registers once at startup, but `/new`, `/resume` and forks
|
|
181
|
+
* replace the manager's session id inside the same process. The index row is
|
|
182
|
+
* keyed on that id, so without a follow-up the successor is never indexed and the
|
|
183
|
+
* predecessor stays live for as long as this pid is alive (the broker keeps
|
|
184
|
+
* heartbeating a live pid). `syncIdentity` moves the registration to whichever
|
|
185
|
+
* id the manager the session has adopted currently reports.
|
|
193
186
|
*/
|
|
194
|
-
export
|
|
187
|
+
export interface DirectSessionRegistration {
|
|
188
|
+
/**
|
|
189
|
+
* Register the current manager's session id and release the one it replaced.
|
|
190
|
+
*
|
|
191
|
+
* `adoptedManager` rebinds the registration to the manager the session now
|
|
192
|
+
* owns: a bounded cold-sidecar fork adopts its own forked manager before it
|
|
193
|
+
* emits `session_switch`, so the wired handler must hand that manager over or
|
|
194
|
+
* the sync keeps reading the startup manager's predecessor id.
|
|
195
|
+
*/
|
|
196
|
+
syncIdentity(adoptedManager?: DirectSessionManager): Promise<void>;
|
|
197
|
+
}
|
|
198
|
+
/** Register a durable direct CLI session while leaving ephemeral sessions lock-free. */
|
|
199
|
+
export declare function registerDirectSession(sessionManager: DirectSessionManager | undefined, agentDir: string, lifecycleRequestId: string | undefined, dependencies?: DirectSessionRegistrationDependencies): Promise<DirectSessionRegistration>;
|
|
195
200
|
/**
|
|
196
201
|
* Apply the `--no-pty` / `--no-title` terminal-control flags to the environment.
|
|
197
202
|
*
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Central migration action planner.
|
|
3
|
+
*
|
|
4
|
+
* Reads destination state ONCE and produces an immutable list of actions that
|
|
5
|
+
* both dry-run and live execution consume unchanged. This is the single place
|
|
6
|
+
* that decides add/update/skip/fail, destinations, and warnings, guaranteeing
|
|
7
|
+
* dry-run/live parity.
|
|
8
|
+
*/
|
|
9
|
+
import type { AdapterResult, ManualAction, MigrateAction, MigrateDestinations, MigrateWarning } from "./types";
|
|
2
10
|
export interface PlanInput {
|
|
3
11
|
results: AdapterResult[];
|
|
4
12
|
destinations: MigrateDestinations;
|
|
@@ -7,5 +15,6 @@ export interface PlanInput {
|
|
|
7
15
|
export interface PlanOutput {
|
|
8
16
|
actions: MigrateAction[];
|
|
9
17
|
warnings: MigrateWarning[];
|
|
18
|
+
manualActions: ManualAction[];
|
|
10
19
|
}
|
|
11
20
|
export declare function planMigration(input: PlanInput): Promise<PlanOutput>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Codex adapter: reads `~/.codex/config.toml` ([mcp_servers]),
|
|
2
|
+
* Codex adapter: reads `~/.codex/config.toml` ([mcp_servers]), user prompts,
|
|
3
3
|
* and user-level `~/.codex/AGENTS.md` instructions. Project AGENTS.md is native GJC input.
|
|
4
4
|
*/
|
|
5
5
|
import { type Adapter } from "./index";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { AdapterResult, InstructionCandidate, MigrateSource, SkillCandidate, SourceDiagnostic } from "../types";
|
|
1
|
+
import type { AdapterResult, AgentCandidate, InstructionCandidate, MigrateSource, SkillCandidate, SlashCommandCandidate, SourceDiagnostic } from "../types";
|
|
2
2
|
export interface AdapterOptions {
|
|
3
3
|
/** Home directory root; overridable for tests. */
|
|
4
4
|
homeDir: string;
|
|
5
|
-
/** Source scope for instructions
|
|
5
|
+
/** Source scope for instructions and Claude Code commands. */
|
|
6
6
|
scope: "project" | "user";
|
|
7
|
-
/** Project root used when importing project instructions. */
|
|
7
|
+
/** Project root used when importing project instructions and commands. */
|
|
8
8
|
cwd: string;
|
|
9
9
|
}
|
|
10
10
|
export interface Adapter {
|
|
@@ -23,6 +23,17 @@ export declare function readSourceText(filePath: string, source: MigrateSource,
|
|
|
23
23
|
} | {
|
|
24
24
|
diagnostic: SourceDiagnostic;
|
|
25
25
|
}>;
|
|
26
|
+
/**
|
|
27
|
+
* Read an optional settings file. A missing file is expected (most setups do not
|
|
28
|
+
* have every settings file), so unlike `readSourceText` it produces no diagnostic.
|
|
29
|
+
*/
|
|
30
|
+
export declare function readOptionalJson(filePath: string, source: MigrateSource, type: SourceDiagnostic["type"]): Promise<{
|
|
31
|
+
data: Record<string, unknown>;
|
|
32
|
+
} | {
|
|
33
|
+
diagnostic: SourceDiagnostic;
|
|
34
|
+
} | {
|
|
35
|
+
absent: true;
|
|
36
|
+
}>;
|
|
26
37
|
/** Parse JSON text, classifying parse errors into a `failed_invalid_source` diagnostic. */
|
|
27
38
|
export declare function parseSourceJson(text: string, filePath: string, source: MigrateSource, type: SourceDiagnostic["type"]): {
|
|
28
39
|
data: Record<string, unknown>;
|
|
@@ -44,6 +55,27 @@ export declare function collectMarkdownPrompts(dir: string, source: MigrateSourc
|
|
|
44
55
|
candidates: SkillCandidate[];
|
|
45
56
|
diagnostics: SourceDiagnostic[];
|
|
46
57
|
}>;
|
|
58
|
+
/** Bundled agent names an imported agent must never shadow. */
|
|
59
|
+
export declare const PROTECTED_AGENT_NAMES: ReadonlySet<string>;
|
|
60
|
+
/**
|
|
61
|
+
* Collect subagents from a flat `<agentsDir>/*.md` directory. Frontmatter is
|
|
62
|
+
* rewritten so the loaded name matches the destination file name, and tool lists
|
|
63
|
+
* are translated to GJC tools.
|
|
64
|
+
*/
|
|
65
|
+
export declare function collectMarkdownAgents(dir: string, source: MigrateSource): Promise<{
|
|
66
|
+
candidates: AgentCandidate[];
|
|
67
|
+
diagnostics: SourceDiagnostic[];
|
|
68
|
+
}>;
|
|
69
|
+
/**
|
|
70
|
+
* Collect Markdown slash commands. Nested command directories are represented
|
|
71
|
+
* with colon-separated names, matching Claude Code's `/group:command` syntax.
|
|
72
|
+
*/
|
|
73
|
+
export declare function collectMarkdownCommands(dir: string, source: MigrateSource, options?: {
|
|
74
|
+
recursive?: boolean;
|
|
75
|
+
}): Promise<{
|
|
76
|
+
candidates: SlashCommandCandidate[];
|
|
77
|
+
diagnostics: SourceDiagnostic[];
|
|
78
|
+
}>;
|
|
47
79
|
/**
|
|
48
80
|
* Recursively collect skill candidates from any `**/SKILL.md` under `root`.
|
|
49
81
|
* The slug derives from the directory that directly contains the `SKILL.md`.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Render a gjc hook module from imported foreign hook commands.
|
|
3
|
+
*
|
|
4
|
+
* Claude Code hooks are shell commands: the runtime writes a JSON payload to
|
|
5
|
+
* stdin and reads the exit code. `PreToolUse` blocks on exit 2 with stderr as the
|
|
6
|
+
* reason; every other event is observational. gjc hooks are TypeScript modules
|
|
7
|
+
* that subscribe to events in-process, so the importer reproduces the foreign
|
|
8
|
+
* contract rather than rewriting the commands.
|
|
9
|
+
*
|
|
10
|
+
* Only events whose semantics are unambiguous are translated. The payload keeps
|
|
11
|
+
* the foreign field names so an existing script that reads its JSON keeps working;
|
|
12
|
+
* fields this host cannot supply are omitted instead of guessed, which the module
|
|
13
|
+
* header states.
|
|
14
|
+
*/
|
|
15
|
+
import type { HookCandidate, MigrateSource } from "./types";
|
|
16
|
+
export declare function isSupportedHookEvent(event: string): boolean;
|
|
17
|
+
/** Foreign events this importer translates, for user-facing messages. */
|
|
18
|
+
export declare const SUPPORTED_HOOK_EVENTS: readonly string[];
|
|
19
|
+
/**
|
|
20
|
+
* Build the module source. The result is deterministic for a given candidate
|
|
21
|
+
* list, so a dry-run report and a live write describe the same file.
|
|
22
|
+
*/
|
|
23
|
+
export declare function renderHookModule(source: MigrateSource, candidates: readonly HookCandidate[]): string;
|
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
* Secret values are never read upstream, so the report only ever contains field
|
|
5
5
|
* names in warnings — but rendering still treats action/warning text as opaque.
|
|
6
6
|
*/
|
|
7
|
-
import { type MigrateAction, type MigrateDestinations, type MigrateReport, type MigrateSource, type MigrateWarning } from "./types";
|
|
7
|
+
import { type ManualAction, type MigrateAction, type MigrateDestinations, type MigrateReport, type MigrateSource, type MigrateWarning } from "./types";
|
|
8
8
|
export interface BuildReportInput {
|
|
9
9
|
actions: MigrateAction[];
|
|
10
10
|
warnings: MigrateWarning[];
|
|
11
11
|
sources: MigrateSource[];
|
|
12
12
|
destinations: MigrateDestinations;
|
|
13
|
+
manualActions: ManualAction[];
|
|
13
14
|
dryRun: boolean;
|
|
14
15
|
project: boolean;
|
|
15
16
|
force: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared types for `gjc migrate`.
|
|
3
3
|
*
|
|
4
|
-
* Imports MCP servers, skills, and instruction files from other coding agents
|
|
4
|
+
* Imports MCP servers, skills, slash commands, and instruction files from other coding agents
|
|
5
5
|
* (Claude Code, Codex, OpenCode) into native GJC config. See the consensus plan under
|
|
6
6
|
* `.gjc/plans/ralplan/` for the full taxonomy and force/collision semantics.
|
|
7
7
|
*/
|
|
@@ -12,7 +12,7 @@ export declare const MIGRATE_SOURCES: readonly MigrateSource[];
|
|
|
12
12
|
/** Canonical, deterministic ordering used when expanding `--from all` / repeated `--from`. */
|
|
13
13
|
export declare const CANONICAL_SOURCE_ORDER: readonly MigrateSource[];
|
|
14
14
|
/** What kind of thing an action/coverage row is about. */
|
|
15
|
-
export type MigrateItemType = "mcp" | "skill" | "instruction" | "source";
|
|
15
|
+
export type MigrateItemType = "mcp" | "skill" | "command" | "agent" | "hook" | "instruction" | "source";
|
|
16
16
|
/**
|
|
17
17
|
* Per-item outcome taxonomy.
|
|
18
18
|
*
|
|
@@ -48,6 +48,22 @@ export interface InstructionCandidate {
|
|
|
48
48
|
name: string;
|
|
49
49
|
content: string;
|
|
50
50
|
}
|
|
51
|
+
/** A Markdown subagent collected from a foreign coding-agent setup. */
|
|
52
|
+
export interface AgentCandidate {
|
|
53
|
+
source: MigrateSource;
|
|
54
|
+
/** Agent name exactly as it will be loaded from `<agentsDir>/<name>.md`. */
|
|
55
|
+
name: string;
|
|
56
|
+
/** Full Markdown content with normalized GJC frontmatter. */
|
|
57
|
+
content: string;
|
|
58
|
+
warnings: string[];
|
|
59
|
+
}
|
|
60
|
+
/** A Markdown slash command collected from a foreign coding-agent setup. */
|
|
61
|
+
export interface SlashCommandCandidate {
|
|
62
|
+
source: MigrateSource;
|
|
63
|
+
/** Name without the leading slash; nested path components use `:`. */
|
|
64
|
+
name: string;
|
|
65
|
+
content: string;
|
|
66
|
+
}
|
|
51
67
|
/**
|
|
52
68
|
* Source-level diagnostic for a single source/type pair (e.g. "codex mcp config
|
|
53
69
|
* was malformed"). Distinct from per-item actions so absent/unreadable sources
|
|
@@ -59,12 +75,46 @@ export interface SourceDiagnostic {
|
|
|
59
75
|
status: Extract<MigrationStatus, "skipped_absent_source" | "failed_invalid_source" | "failed_io">;
|
|
60
76
|
message: string;
|
|
61
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* A foreign hook command that maps onto a gjc hook event.
|
|
80
|
+
*
|
|
81
|
+
* Claude Code hooks are shell commands that receive a JSON payload on stdin and
|
|
82
|
+
* signal a block with exit code 2; gjc hooks are TypeScript modules. The
|
|
83
|
+
* importer generates a module that reproduces that contract for the events whose
|
|
84
|
+
* semantics are unambiguous.
|
|
85
|
+
*/
|
|
86
|
+
export interface HookCandidate {
|
|
87
|
+
source: MigrateSource;
|
|
88
|
+
/** Foreign event name, e.g. `PreToolUse`. */
|
|
89
|
+
event: string;
|
|
90
|
+
/** Tool-name matcher; empty or absent means every tool. */
|
|
91
|
+
matcher?: string;
|
|
92
|
+
/** Shell command exactly as the source declared it. */
|
|
93
|
+
command: string;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* A source setting the migration cannot express in gjc. Reported instead of
|
|
97
|
+
* guessed at: silently translating an approval or hook policy would change what
|
|
98
|
+
* the agent is allowed to do. Secret values are never read, so detail may name
|
|
99
|
+
* keys but never their contents.
|
|
100
|
+
*/
|
|
101
|
+
export interface ManualAction {
|
|
102
|
+
source: MigrateSource;
|
|
103
|
+
/** Setting area, e.g. `hooks`, `settings.model`, `env`. */
|
|
104
|
+
area: string;
|
|
105
|
+
/** One-line instruction naming the concrete follow-up. */
|
|
106
|
+
detail: string;
|
|
107
|
+
}
|
|
62
108
|
/** Normalized candidates + diagnostics returned by an adapter. */
|
|
63
109
|
export interface AdapterResult {
|
|
64
110
|
mcpCandidates: McpCandidate[];
|
|
65
111
|
skillCandidates: SkillCandidate[];
|
|
112
|
+
slashCommandCandidates: SlashCommandCandidate[];
|
|
113
|
+
agentCandidates: AgentCandidate[];
|
|
114
|
+
hookCandidates: HookCandidate[];
|
|
66
115
|
instructionCandidates: InstructionCandidate[];
|
|
67
116
|
diagnostics: SourceDiagnostic[];
|
|
117
|
+
manualActions: ManualAction[];
|
|
68
118
|
}
|
|
69
119
|
/** A single planned action consumed identically by dry-run and live execution. */
|
|
70
120
|
export interface MigrateAction {
|
|
@@ -87,6 +137,15 @@ export interface MigrateAction {
|
|
|
87
137
|
skill?: {
|
|
88
138
|
content: string;
|
|
89
139
|
};
|
|
140
|
+
command?: {
|
|
141
|
+
content: string;
|
|
142
|
+
};
|
|
143
|
+
agent?: {
|
|
144
|
+
content: string;
|
|
145
|
+
};
|
|
146
|
+
hook?: {
|
|
147
|
+
content: string;
|
|
148
|
+
};
|
|
90
149
|
instruction?: {
|
|
91
150
|
content: string;
|
|
92
151
|
};
|
|
@@ -101,6 +160,10 @@ export type StatusCounts = Record<MigrationStatus, number>;
|
|
|
101
160
|
export interface MigrateDestinations {
|
|
102
161
|
mcpConfigPath: string;
|
|
103
162
|
skillsDir: string;
|
|
163
|
+
commandsDir: string;
|
|
164
|
+
agentsDir: string;
|
|
165
|
+
/** Directory that receives generated hook modules. */
|
|
166
|
+
hooksDir: string;
|
|
104
167
|
instructionsPath: string;
|
|
105
168
|
}
|
|
106
169
|
/** The full machine-readable report emitted with `--json`. */
|
|
@@ -116,6 +179,9 @@ export interface MigrateReport {
|
|
|
116
179
|
byType: {
|
|
117
180
|
mcp: StatusCounts;
|
|
118
181
|
skill: StatusCounts;
|
|
182
|
+
command: StatusCounts;
|
|
183
|
+
agent: StatusCounts;
|
|
184
|
+
hook: StatusCounts;
|
|
119
185
|
instruction: StatusCounts;
|
|
120
186
|
source: StatusCounts;
|
|
121
187
|
};
|
|
@@ -133,6 +199,7 @@ export interface MigrateReport {
|
|
|
133
199
|
warnings?: string[];
|
|
134
200
|
}>;
|
|
135
201
|
warnings: MigrateWarning[];
|
|
202
|
+
manualActions: ManualAction[];
|
|
136
203
|
}
|
|
137
204
|
/** Create a zeroed status-count record. */
|
|
138
205
|
export declare function emptyStatusCounts(): StatusCounts;
|
|
@@ -8,7 +8,7 @@ interface AgentDashboardModelContext {
|
|
|
8
8
|
defaultModelPattern?: string;
|
|
9
9
|
credentialSessionId?: string;
|
|
10
10
|
}
|
|
11
|
-
export declare function resolveAgentCreationModel(modelPatterns: string[], modelRegistry: ModelRegistry, settings: Settings | undefined): import("@gajae-code/ai").Model<import("@gajae-code/ai").Api>;
|
|
11
|
+
export declare function resolveAgentCreationModel(modelPatterns: string[], modelRegistry: ModelRegistry, settings: Settings | undefined, credentialSessionId?: string): import("@gajae-code/ai").Model<import("@gajae-code/ai").Api>;
|
|
12
12
|
export declare function updateAgentModelOverride(overrides: Record<string, ModelSelectorValue>, agentName: string, rawValue: string): Record<string, ModelSelectorValue>;
|
|
13
13
|
export declare class AgentDashboard extends Container {
|
|
14
14
|
#private;
|