@gajae-code/coding-agent 0.18.0 → 0.18.5
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 +95 -0
- package/dist/types/cli/stats-cli.d.ts +0 -5
- package/dist/types/config/autorouting-tier-map.d.ts +29 -2
- package/dist/types/config/model-registry.d.ts +16 -1
- package/dist/types/config/settings-schema.d.ts +2 -2
- package/dist/types/exa/mcp-client.d.ts +1 -5
- package/dist/types/exec/bash-shell-guardian.d.ts +26 -0
- package/dist/types/gjc-runtime/session-state-sidecar.d.ts +1 -0
- package/dist/types/hashline/parser.d.ts +28 -5
- package/dist/types/modes/acp/acp-agent.d.ts +6 -1
- package/dist/types/sdk/acp/adapter.d.ts +3 -1
- package/dist/types/sdk/broker/lifecycle.d.ts +6 -1
- package/dist/types/sdk/broker/recovery-backoff.d.ts +62 -0
- package/dist/types/sdk/broker/runtime.d.ts +20 -0
- package/dist/types/sdk/broker/startup-budget.d.ts +5 -1
- package/dist/types/sdk/bus/index.d.ts +1 -0
- package/dist/types/sdk/bus/telegram-daemon-contract.d.ts +1 -1
- package/dist/types/sdk/client/client.d.ts +5 -1
- package/dist/types/sdk/host/session-runtime.d.ts +7 -0
- package/dist/types/sdk/prompt-watchdog.d.ts +1 -1
- package/dist/types/session/agent-session.d.ts +2 -0
- package/dist/types/task/index.d.ts +0 -1
- package/dist/types/tools/bash.d.ts +1 -0
- package/dist/types/tools/descriptors.d.ts +5 -0
- package/dist/types/tools/eval-backends.d.ts +37 -0
- package/dist/types/tools/eval.d.ts +1 -6
- package/dist/types/tools/index.d.ts +1 -36
- package/dist/types/tools/session-descriptions.d.ts +22 -0
- package/package.json +7 -7
- package/scripts/generate-sdk-operation-inventory.ts +2 -0
- package/src/cli/doctor/managed-link.ts +4 -4
- package/src/cli/doctor/repairs.ts +9 -1
- package/src/cli/stats-cli.ts +4 -36
- package/src/cli-main.ts +4 -8
- package/src/cli.ts +4 -8
- package/src/commands/commit.ts +2 -2
- package/src/commands/sdk.ts +1 -2
- package/src/config/autorouting-tier-map.ts +20 -2
- package/src/config/model-preset-registry.ts +17 -2
- package/src/config/model-profile-activation.ts +3 -1
- package/src/config/model-profiles.ts +11 -3
- package/src/config/model-registry.ts +45 -17
- package/src/config/settings-schema.ts +8 -2
- package/src/exa/mcp-client.ts +41 -8
- package/src/exec/bash-shell-guardian.ts +214 -48
- package/src/gjc-runtime/session-state-sidecar.ts +88 -58
- package/src/hashline/execute.ts +51 -3
- package/src/hashline/parser.ts +63 -16
- package/src/internal-urls/docs-index.generated.ts +25 -25
- package/src/modes/acp/acp-agent.ts +136 -20
- package/src/modes/controllers/ssh-command-controller.ts +3 -1
- package/src/modes/interactive-mode.ts +10 -0
- package/src/modes/utils/context-usage.ts +2 -6
- package/src/prompts/tools/task.md +8 -27
- package/src/sdk/acp/adapter.ts +38 -3
- package/src/sdk/broker/doctor-restart.ts +38 -3
- package/src/sdk/broker/lifecycle.ts +408 -218
- package/src/sdk/broker/recovery-backoff.ts +135 -0
- package/src/sdk/broker/runtime.ts +83 -0
- package/src/sdk/broker/startup-budget.ts +6 -1
- package/src/sdk/bus/chat-daemon-control.ts +2 -2
- package/src/sdk/bus/index.ts +308 -22
- package/src/sdk/bus/telegram-daemon-contract.ts +1 -1
- package/src/sdk/client/client.ts +53 -35
- package/src/sdk/host/session-runtime.ts +99 -3
- package/src/sdk/prompt-watchdog.ts +17 -4
- package/src/sdk/protocol/operation-inventory.generated.json +11 -0
- package/src/session/agent-session.ts +79 -17
- package/src/session/internal/managed-session-storage.ts +23 -0
- package/src/task/index.ts +21 -66
- package/src/tools/bash.ts +39 -0
- package/src/tools/descriptors.ts +27 -1
- package/src/tools/eval-backends.ts +95 -0
- package/src/tools/eval.ts +3 -15
- package/src/tools/index.ts +9 -88
- package/src/tools/search.ts +2 -7
- package/src/tools/session-descriptions.ts +135 -0
- package/src/tools/tool-catalog.generated.ts +1 -1
- package/dist/types/cli/grep-cli.d.ts +0 -17
- package/dist/types/cli/shell-cli.d.ts +0 -8
- package/dist/types/commands/grep.d.ts +0 -42
- package/dist/types/commands/shell.d.ts +0 -21
- package/src/cli/grep-cli.ts +0 -160
- package/src/cli/shell-cli.ts +0 -176
- package/src/commands/grep.ts +0 -48
- package/src/commands/shell.ts +0 -29
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,101 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.18.5] - 2026-09-30
|
|
6
|
+
|
|
7
|
+
## [0.18.4] - 2026-09-30
|
|
8
|
+
|
|
9
|
+
## [0.18.3] - 2026-09-30
|
|
10
|
+
|
|
11
|
+
## [0.18.2] - 2026-09-30
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- Added the additive `codex-sol61` built-in model profile for GPT-6.1 Sol.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- Built-in `claude-opus` and `claude-fable` executor roles and the `opus-codex` planner role now use `anthropic/claude-sonnet-5-5` instead of `anthropic/claude-sonnet-5` (#6111).
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- Bare line-number and hash-only hashline anchors now fail with actionable, copy-ready full-anchor suggestions; edits remain unapplied until a full anchor is supplied.
|
|
24
|
+
|
|
25
|
+
- On macOS, the shell runtime no longer exits with code 70 when spawning fast-exiting child processes or entitled/setuid children (like `/bin/ps`, `/usr/bin/top`, `sudo`) that cannot be queried for unique identity. When a child is confirmed absent or terminated before observation, the process identity is recorded like on Linux. Only genuine integrity failures (ledger write failures, HMAC errors) trigger exit 70 on a live child (#6085).
|
|
26
|
+
|
|
27
|
+
- Exa MCP tool-call responses are formatted in bounded time. `formatGenericResponse` re-indents the entire formatted subtree at every object level, so cost grew super-linearly with nesting depth: 500/1000/2000/4000/8000 levels cost 60ms/227ms/730ms/5.9s/94s, and 20000 levels exhausted the call stack. The payload is whatever the remote MCP server returned, and the 16 MiB content cap does not bound depth — 8000 levels of `{"a":` is under 47 KB. Depth is now limited to 64, matching the session-import walker, and output for payloads within that limit is unchanged.
|
|
28
|
+
|
|
29
|
+
- Preserve the one-line hashline retry hint when copied text contains literal `..`, while keeping ambiguous range edits rejected without modifying the file (#6112).
|
|
30
|
+
|
|
31
|
+
- Nested `gjc` commands run through the Bash tool inside a managed-owner (tmux-supervised) session no longer fail with `managed_owner_admission_metadata_invalid`: the Bash boundary now scrubs the whole managed-owner env family, including the tmux owner server key and `GJC_TMUX_LAUNCHED`, instead of leaving a partial owner context behind (#6140).
|
|
32
|
+
|
|
33
|
+
- Keep the ACP prompt watchdog on its awaiting-model bound until a streamed tool call actually begins executing.
|
|
34
|
+
|
|
35
|
+
- Sessions without explicit `retry.*` settings now retry a content-free "socket connection was closed unexpectedly" (`ECONNRESET`) failure when the attempt is replay-safe, bounded by `retry.maxRetries`. Previously the bare-default gate only admitted stream-timeout watchdog errors, so a transient connection reset before any response ended the turn even though it was classified as transient.
|
|
36
|
+
|
|
37
|
+
- Fixed sessions intermittently hanging after a tool call on long contexts (seen with OpenGateway `-ultrafast` models). The CLI no longer routes `fetch()` through Bun's HTTP/2 client, which could stall a pooled connection on large request bodies until the process restarted.
|
|
38
|
+
|
|
39
|
+
- A long-running session whose `gjc` binary was replaced on disk no longer respawns the shared SDK broker over and over. Broker recovery now stops and asks for a session restart when this process's runtime image was replaced (same path, new file identity) or removed, and repeated recovery failures back off exponentially up to a cap instead of retrying every 30–60 seconds. Other clients sharing the broker are no longer disrupted by the churn (#6040).
|
|
40
|
+
|
|
41
|
+
- Model registry refreshes no longer rescan and re-lowercase the whole model catalog for every registry-profile selector; selector matching uses a prebuilt index.
|
|
42
|
+
|
|
43
|
+
- Validating cached model-preset registry documents is about a third faster: canonical JSON serialization no longer calls `JSON.stringify` for strings that need no escaping and checks surrogates with the native well-formedness test.
|
|
44
|
+
|
|
45
|
+
- A session sharing its managed scope with another `gjc` process (for example a master session and the SDK session it spawned) no longer stops persisting with `managed_replace_receipt_cleanup_pending:quarantine_collision` when both processes try to retire the same replacement cleanup receipt at the same time. The process that loses the race to claim the retirement slot now leaves the receipt for a later reconciliation, and its own session write continues.
|
|
46
|
+
|
|
47
|
+
- Keep SDK prompts alive when transient directed delivery back-pressure (`writer_backlog_full`) drops a correlated progress frame. Previously the prompt was abandoned while the run kept executing, so the final `agent_end` was dropped and ACP clients only settled the prompt when the prompt watchdog expired. Terminal frames now retry briefly under back-pressure so the prompt settles normally.
|
|
48
|
+
- Release the prompt submission and work lease when terminal delivery still fails after the retry window, while preserving the `delivery_failed` terminal outcome.
|
|
49
|
+
|
|
50
|
+
- Keep SDK and ACP prompts alive when a streaming message snapshot exceeds the directed frame limit, and report a correlated delivery failure to the requester only when the undeliverable frame is the run's own terminal, so a prompt is never reported failed while its execution is still running.
|
|
51
|
+
- Preserve assistant text shape and terminal truncation metadata when bounding oversized correlated frames.
|
|
52
|
+
- Preserve as much aggregate assistant message_end text as fits, including ordered text blocks.
|
|
53
|
+
|
|
54
|
+
- Give broker-admitted lifecycle launches without a worktree a fresh child readiness budget after bounded pre-spawn bookkeeping, while preserving caller-supplied exact deadlines.
|
|
55
|
+
- Bound broker-derived non-worktree pre-spawn preparation by the unused admission window (10s without queueing at default readiness), so fresh readiness still finishes inside the unchanged caller deadline.
|
|
56
|
+
|
|
57
|
+
- Exit lifecycle session hosts cleanly after publishing a complete rollback receipt at the readiness cutoff.
|
|
58
|
+
|
|
59
|
+
- Prove broker-owned session hosts have exited at readiness cutoff before returning retryable startup failures, including hosts blocked during extension initialization.
|
|
60
|
+
|
|
61
|
+
- `gjc stats --json` now writes only the JSON document to stdout, so `gjc stats --json | jq ...` works. The `Synced N new entries ...` summary goes to stderr in JSON mode, alongside the sync progress. The dashboard and `--summary` output are unchanged.
|
|
62
|
+
|
|
63
|
+
- Interactive `/ssh add ... --port` rejects a port with trailing or non-digit characters (for example `22oops` or `2222.5`) instead of saving the digits before them, matching the ACP `/ssh add` parser.
|
|
64
|
+
|
|
65
|
+
## [0.18.1] - 2026-09-29
|
|
66
|
+
|
|
67
|
+
### Fixed
|
|
68
|
+
|
|
69
|
+
- `./install.sh --dev` and `gjc doctor` no longer treat this checkout's own `gjc` and `가재씨` links as foreign after a macOS reboot. The ownership receipt still binds the link by inode, but no longer compares the recorded `st_dev`, which APFS changes across boots. A receipt left behind after its link was removed by hand is recognized as this checkout's and replaced, while a receipt that names another checkout is refused before either link is touched.
|
|
70
|
+
|
|
71
|
+
- Loading `search` or `eval` for the first time no longer changes its advertised tool description, so the provider-visible `tools` block and the prompt-cache prefix stay stable. Before the implementation loads, the description is now rendered from the session (hashline or line-number display for `search`, the allowed Python/JavaScript backends for `eval`), instead of taking the stub-session text from the generated catalog.
|
|
72
|
+
|
|
73
|
+
- Keep the provider-visible `task` description stable before and after the tool loads by rendering it from session settings without listing configured agent names; unknown-agent errors continue to list all visible agents. IRC guidance is now independent of whether the IRC tool becomes available mid-session.
|
|
74
|
+
|
|
75
|
+
- Windows binary update via exactReplaceRetained now succeeds with owner-only ACL enforcement. The retained update path required READ_CONTROL on both the staged source and current destination handles to query ACL ownership, but the handles were opened without READ_CONTROL, causing every real Windows update to fail with acl_unavailable. (#6096)
|
|
76
|
+
|
|
77
|
+
- Reduced macOS idle CPU from the bash shell guardian: the Darwin ancestry poll now reads kernel process identities first and validates only new descendants with `Process.fromPid`, instead of querying every process on each scan. A descendant whose validation fails transiently is retried on the next poll rather than dropped from cleanup.
|
|
78
|
+
|
|
79
|
+
- User-cancelled turns (ACP session/cancel, SDK turn.abort) settle as `cancelled` again instead of a failed terminal (regression from 0.18.0).
|
|
80
|
+
|
|
81
|
+
- ACP cancels received before SDK prompt admission now stay attached to the waiter: the prompt is not dispatched, or a real terminal abort is retried after admission, rather than letting the turn continue.
|
|
82
|
+
|
|
83
|
+
- ACP MCP launch failures now retain the broker lifecycle cause and a bounded, credential-free diagnostic, while SDK transport failures keep their original retry code.
|
|
84
|
+
|
|
85
|
+
- `gjc doctor --fix --repair service.restart-owned` on the SDK broker now reports a broker refusal, such as `restart_busy` while any session is live, as `blocked` with reason `prepare_refused:<code>` and no side effect. It was previously reported as `uncertain` / `repair_execution_unverified` with `sideEffectStarted: true`. A refused commit now also cancels its prepared reservation instead of leaving new work refused until the lease expires.
|
|
86
|
+
|
|
87
|
+
- Treat cooperative SDK prompt pauses as successful terminal stops instead of unreported failures.
|
|
88
|
+
|
|
89
|
+
- A displayed extension message sent from `session_start` (such as a handoff summary) now appears once at startup instead of twice, and startup notices shown before the first paint are no longer wiped. Transcript rebuilds requested before the initial transcript paint are skipped; the first paint renders the full session.
|
|
90
|
+
|
|
91
|
+
### Documentation
|
|
92
|
+
|
|
93
|
+
- Updated: Clarified that human reviewers only need to approve the current head on GitHub; body verdict lines are required only for agent reviewers and owner self-approval.
|
|
94
|
+
|
|
95
|
+
### Bug fixes
|
|
96
|
+
|
|
97
|
+
- Fixed: Human approval now works when a PR has no verdict line in its body. GJC checks GitHub reviews for human approval on the current head instead.
|
|
98
|
+
- Fixed: A valid PR contract with no approval yet now shows a "Waiting for approval" notice instead of an error.
|
|
99
|
+
|
|
5
100
|
## [0.18.0] - 2026-09-27
|
|
6
101
|
|
|
7
102
|
### Added
|
|
@@ -8,10 +8,5 @@ export interface StatsCommandArgs {
|
|
|
8
8
|
json: boolean;
|
|
9
9
|
summary: boolean;
|
|
10
10
|
}
|
|
11
|
-
/**
|
|
12
|
-
* Parse stats subcommand arguments.
|
|
13
|
-
* Returns undefined if not a stats command.
|
|
14
|
-
*/
|
|
15
|
-
export declare function parseStatsArgs(args: string[]): StatsCommandArgs | undefined;
|
|
16
11
|
export declare function runStatsCommand(cmd: StatsCommandArgs): Promise<void>;
|
|
17
12
|
export declare function printStatsHelp(): void;
|
|
@@ -33,14 +33,18 @@ export declare const CURATED_TIER_LABELS: {
|
|
|
33
33
|
readonly tier: "fast";
|
|
34
34
|
readonly rank: 1;
|
|
35
35
|
}];
|
|
36
|
-
readonly "anthropic/claude-sonnet-5": readonly [{
|
|
36
|
+
readonly "anthropic/claude-sonnet-5-5": readonly [{
|
|
37
37
|
readonly tier: "balanced";
|
|
38
38
|
readonly rank: 1;
|
|
39
39
|
}];
|
|
40
|
-
readonly "anthropic/claude-sonnet-
|
|
40
|
+
readonly "anthropic/claude-sonnet-5": readonly [{
|
|
41
41
|
readonly tier: "balanced";
|
|
42
42
|
readonly rank: 2;
|
|
43
43
|
}];
|
|
44
|
+
readonly "anthropic/claude-sonnet-4-6": readonly [{
|
|
45
|
+
readonly tier: "balanced";
|
|
46
|
+
readonly rank: 3;
|
|
47
|
+
}];
|
|
44
48
|
readonly "anthropic/claude-opus-5-5": readonly [{
|
|
45
49
|
readonly tier: "strong";
|
|
46
50
|
readonly effort: "high";
|
|
@@ -70,6 +74,11 @@ export declare const CURATED_TIER_LABELS: {
|
|
|
70
74
|
readonly effort: "high";
|
|
71
75
|
readonly rank: 1;
|
|
72
76
|
}];
|
|
77
|
+
readonly "openai-codex/gpt-6.1-sol": readonly [{
|
|
78
|
+
readonly tier: "strong";
|
|
79
|
+
readonly effort: "high";
|
|
80
|
+
readonly rank: 2;
|
|
81
|
+
}];
|
|
73
82
|
readonly "google/gemini-3.5-flash-lite": readonly [{
|
|
74
83
|
readonly tier: "fast";
|
|
75
84
|
readonly rank: 1;
|
|
@@ -123,6 +132,24 @@ export declare const CURATED_TIER_LABELS: {
|
|
|
123
132
|
};
|
|
124
133
|
/** Generated from packages/ai/src/models.json at feature land: 3936 in-scope baseline skips. */
|
|
125
134
|
export declare const TIER_MAP_SKIP_LIST: {
|
|
135
|
+
readonly "amazon-bedrock/anthropic.claude-sonnet-5-5": {
|
|
136
|
+
readonly rationale: "Sonnet 5.5 catalog addition (#6111); not yet curated";
|
|
137
|
+
};
|
|
138
|
+
readonly "amazon-bedrock/au.anthropic.claude-sonnet-5-5": {
|
|
139
|
+
readonly rationale: "Sonnet 5.5 catalog addition (#6111); not yet curated";
|
|
140
|
+
};
|
|
141
|
+
readonly "amazon-bedrock/eu.anthropic.claude-sonnet-5-5": {
|
|
142
|
+
readonly rationale: "Sonnet 5.5 catalog addition (#6111); not yet curated";
|
|
143
|
+
};
|
|
144
|
+
readonly "amazon-bedrock/global.anthropic.claude-sonnet-5-5": {
|
|
145
|
+
readonly rationale: "Sonnet 5.5 catalog addition (#6111); not yet curated";
|
|
146
|
+
};
|
|
147
|
+
readonly "amazon-bedrock/jp.anthropic.claude-sonnet-5-5": {
|
|
148
|
+
readonly rationale: "Sonnet 5.5 catalog addition (#6111); not yet curated";
|
|
149
|
+
};
|
|
150
|
+
readonly "amazon-bedrock/us.anthropic.claude-sonnet-5-5": {
|
|
151
|
+
readonly rationale: "Sonnet 5.5 catalog addition (#6111); not yet curated";
|
|
152
|
+
};
|
|
126
153
|
readonly "kiro/claude-opus-5-5": {
|
|
127
154
|
readonly rationale: "post-rebase catalog addition from dev; not yet curated";
|
|
128
155
|
};
|
|
@@ -327,7 +327,22 @@ interface ProviderOverride {
|
|
|
327
327
|
cacheRetention?: CacheRetention;
|
|
328
328
|
isOAuth?: boolean;
|
|
329
329
|
}
|
|
330
|
-
|
|
330
|
+
/**
|
|
331
|
+
* Lowercased lookup keys for a model catalog, so selector resolution is a set
|
|
332
|
+
* lookup instead of a scan that re-lowercases every model id per selector.
|
|
333
|
+
*/
|
|
334
|
+
export interface RegistrySelectorIndex {
|
|
335
|
+
/** `id` and `provider/id`. */
|
|
336
|
+
exact: ReadonlySet<string>;
|
|
337
|
+
/** `id` alone. */
|
|
338
|
+
ids: ReadonlySet<string>;
|
|
339
|
+
/** Model ids per provider, for parsed `provider/id` selectors (nested, so no delimiter can collide). */
|
|
340
|
+
providerIds: ReadonlyMap<string, ReadonlySet<string>>;
|
|
341
|
+
/** Every `/`-delimited suffix of each id (`a/b/c` → `b/c`, `c`). */
|
|
342
|
+
idSuffixes: ReadonlySet<string>;
|
|
343
|
+
}
|
|
344
|
+
export declare function createRegistrySelectorIndex(models: readonly Model<Api>[]): RegistrySelectorIndex;
|
|
345
|
+
export declare function registrySelectorResolvesToModel(selector: string, index: RegistrySelectorIndex): boolean;
|
|
331
346
|
/**
|
|
332
347
|
* Merge a freshly discovered model with the matching bundled/configured entry
|
|
333
348
|
* (or a runtime provider override when no bundled entry exists).
|
|
@@ -2183,11 +2183,11 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
2183
2183
|
readonly ui: {
|
|
2184
2184
|
readonly tab: "context";
|
|
2185
2185
|
readonly label: "Compaction Threshold";
|
|
2186
|
-
readonly description: "Percent threshold for context maintenance;
|
|
2186
|
+
readonly description: "Percent threshold for context maintenance; the 300,000-token default cap applies only with adaptive mode disabled (except during context promotion)";
|
|
2187
2187
|
readonly options: readonly [{
|
|
2188
2188
|
readonly value: "default";
|
|
2189
2189
|
readonly label: "Default";
|
|
2190
|
-
readonly description: "
|
|
2190
|
+
readonly description: "300,000-token default cap applies only with adaptive mode disabled (except during context promotion)";
|
|
2191
2191
|
}, {
|
|
2192
2192
|
readonly value: "10";
|
|
2193
2193
|
readonly label: "10%";
|
|
@@ -22,11 +22,7 @@ export declare function callExaTool(toolName: string, args: Record<string, unkno
|
|
|
22
22
|
export declare function callWebsetsTool(apiKey: string, toolName: string, args: Record<string, unknown>): Promise<unknown>;
|
|
23
23
|
/** Format search results for LLM */
|
|
24
24
|
export declare function formatSearchResults(data: ExaSearchResponse): string;
|
|
25
|
-
|
|
26
|
-
* Format a non-search MCP response as human-readable text.
|
|
27
|
-
* Handles objects, arrays, primitives, and common MCP response shapes.
|
|
28
|
-
*/
|
|
29
|
-
export declare function formatGenericResponse(data: unknown): string;
|
|
25
|
+
export declare function formatGenericResponse(data: unknown, depth?: number): string;
|
|
30
26
|
/** Check if result is a search response */
|
|
31
27
|
export declare function isSearchResponse(data: unknown): data is ExaSearchResponse;
|
|
32
28
|
/** Fetch and cache MCP tool schema */
|
|
@@ -11,5 +11,31 @@ export declare function extendOwnedDarwinAncestry<T extends {
|
|
|
11
11
|
uniqueId: bigint;
|
|
12
12
|
parentUniqueId: bigint;
|
|
13
13
|
}>(knownUniqueIds: Set<bigint>, candidates: ReadonlyMap<number, T>): number[];
|
|
14
|
+
export declare function authenticateOwnershipRecord(line: string, ledgerToken: string): {
|
|
15
|
+
processRef?: NativeProcess;
|
|
16
|
+
darwinUniqueId?: bigint;
|
|
17
|
+
pending?: true;
|
|
18
|
+
} | undefined;
|
|
19
|
+
export type DarwinAncestryTracker = {
|
|
20
|
+
seed(uniqueId: bigint): void;
|
|
21
|
+
track(processRef: NativeProcess, uniqueId?: bigint): boolean;
|
|
22
|
+
trackGuardian(processRef: NativeProcess, uniqueId?: bigint): boolean;
|
|
23
|
+
poll(): boolean;
|
|
24
|
+
close(): void;
|
|
25
|
+
};
|
|
26
|
+
export type DarwinIdentity = {
|
|
27
|
+
uniqueId: bigint;
|
|
28
|
+
parentUniqueId: bigint;
|
|
29
|
+
};
|
|
30
|
+
/** Test seams for the Darwin tracker; production uses libproc and the natives binding. */
|
|
31
|
+
export type DarwinAncestryTrackerDeps = {
|
|
32
|
+
uniqueIdentity?: (pid: number) => DarwinIdentity | undefined;
|
|
33
|
+
fromPid?: (pid: number) => NativeProcess | null | undefined;
|
|
34
|
+
observe?: (pid: number) => {
|
|
35
|
+
status: "present" | "absent" | "unknown";
|
|
36
|
+
incarnation?: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export declare function createDarwinAncestryTracker(owned: Map<string, NativeProcess>, deps?: DarwinAncestryTrackerDeps): DarwinAncestryTracker | undefined;
|
|
14
40
|
export declare function runBashShellGuardian(): Promise<void>;
|
|
15
41
|
export {};
|
|
@@ -39,6 +39,7 @@ export declare const __sessionStateSidecarTestHooks: {
|
|
|
39
39
|
beforeRescopeJournalWrite?: (cwd: string) => void | Promise<void>;
|
|
40
40
|
beforePersistFromEvent?: (eventType: string, cwd: string) => void | Promise<void>;
|
|
41
41
|
beforeRescopePublish?: () => void | Promise<void>;
|
|
42
|
+
disableCoordinatorFileSyncForTests?: boolean;
|
|
42
43
|
};
|
|
43
44
|
interface RuntimeStateEvent {
|
|
44
45
|
type: string;
|
|
@@ -1,19 +1,41 @@
|
|
|
1
|
+
import { HL_OP_INSERT_AFTER, HL_OP_INSERT_BEFORE, HL_OP_REPLACE } from "./hash";
|
|
1
2
|
import type { HashlineCursor, HashlineEdit } from "./types";
|
|
3
|
+
type HashlineOpSigil = typeof HL_OP_INSERT_BEFORE | typeof HL_OP_INSERT_AFTER | typeof HL_OP_REPLACE;
|
|
2
4
|
/**
|
|
3
|
-
* An op referenced lines by number alone
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* extra read.
|
|
5
|
+
* An op referenced lines by number alone. The edit is never applied on a line
|
|
6
|
+
* number alone; the executor answers with the current full anchors so the model
|
|
7
|
+
* can retry without another read.
|
|
7
8
|
*/
|
|
8
9
|
export declare class HashlineMissingHashError extends Error {
|
|
9
10
|
readonly lines: {
|
|
10
11
|
start: number;
|
|
11
12
|
end: number;
|
|
12
13
|
};
|
|
14
|
+
readonly opSigil: HashlineOpSigil;
|
|
15
|
+
readonly rangeRaw?: {
|
|
16
|
+
start: string;
|
|
17
|
+
end: string;
|
|
18
|
+
} | undefined;
|
|
13
19
|
constructor(message: string, lines: {
|
|
14
20
|
start: number;
|
|
15
21
|
end: number;
|
|
16
|
-
}
|
|
22
|
+
}, opSigil: HashlineOpSigil, rangeRaw?: {
|
|
23
|
+
start: string;
|
|
24
|
+
end: string;
|
|
25
|
+
} | undefined);
|
|
26
|
+
}
|
|
27
|
+
export declare class HashlineMissingLineError extends Error {
|
|
28
|
+
readonly hash: string;
|
|
29
|
+
readonly lineNum: number | undefined;
|
|
30
|
+
readonly opSigil: HashlineOpSigil;
|
|
31
|
+
readonly rangeRaw?: {
|
|
32
|
+
start: string;
|
|
33
|
+
end: string;
|
|
34
|
+
} | undefined;
|
|
35
|
+
constructor(hash: string, lineNum: number | undefined, opSigil: HashlineOpSigil, rangeRaw?: {
|
|
36
|
+
start: string;
|
|
37
|
+
end: string;
|
|
38
|
+
} | undefined);
|
|
17
39
|
}
|
|
18
40
|
export declare function cloneCursor(cursor: HashlineCursor): HashlineCursor;
|
|
19
41
|
export declare function parseHashline(diff: string): HashlineEdit[];
|
|
@@ -21,3 +43,4 @@ export declare function parseHashlineWithWarnings(diff: string): {
|
|
|
21
43
|
edits: HashlineEdit[];
|
|
22
44
|
warnings: string[];
|
|
23
45
|
};
|
|
46
|
+
export {};
|
|
@@ -46,7 +46,12 @@ export declare function paginateAcpSessions(listed: unknown[], cwd: string | und
|
|
|
46
46
|
export declare function acpAvailableCommandsFromSkills(query: unknown): AvailableCommand[];
|
|
47
47
|
type SdkPromptFailedOutcome = Extract<SdkPromptTerminalOutcome, {
|
|
48
48
|
kind: "failed";
|
|
49
|
-
}
|
|
49
|
+
}> & {
|
|
50
|
+
deliveryFailure?: {
|
|
51
|
+
cause: string;
|
|
52
|
+
frameBytes: number;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
50
55
|
/**
|
|
51
56
|
* A prompt rejection that still carries the terminal's structured failure classification.
|
|
52
57
|
* The ACP client sees only the code and message, but the first-turn retry gate must decide on
|
|
@@ -61,7 +61,9 @@ export declare class AcpSdkAdapterError extends Error {
|
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
63
|
* The error an ACP session launch must throw once a lifecycle request that carried MCP
|
|
64
|
-
* servers has failed.
|
|
64
|
+
* servers has failed. Broker transport failures from the SDK client are preserved verbatim;
|
|
65
|
+
* other failures keep the adapter's `unavailable` code while carrying a bounded, credential-free
|
|
66
|
+
* copy of the original code and message as their cause diagnostic.
|
|
65
67
|
*/
|
|
66
68
|
export declare function acpMcpLaunchFailure(error: unknown, mcpServers: SessionLifecycleMcpServer[]): unknown;
|
|
67
69
|
export type AcpReconnectFailedHandler = (error: SdkClientError) => void;
|
|
@@ -4,7 +4,7 @@ import type { SessionWorkLease } from "../../session/session-work-lease";
|
|
|
4
4
|
import type { SessionLifecycleMcpServer } from "../acp/mcp";
|
|
5
5
|
import { type SdkStartupFailure, type SdkStartupRollbackResult } from "../startup-capability";
|
|
6
6
|
import type { Broker, BrokerCleanupEvidence, BrokerResponse } from "./broker";
|
|
7
|
-
import type { LifecycleDurableEffectsReceipt, LifecycleStartupFailureReceipt } from "./lifecycle-ledger";
|
|
7
|
+
import type { LifecycleDurableEffectsReceipt, LifecycleEffectIntent, LifecycleStartupFailureReceipt } from "./lifecycle-ledger";
|
|
8
8
|
import { type ProcessIncarnationCommandRunner, type ProcessIncarnationOptions, parseDarwinProcessIncarnation, processIncarnation } from "./process-incarnation";
|
|
9
9
|
import { type SdkInternalSpawnCommand } from "./runtime";
|
|
10
10
|
import { type IndexedSession } from "./session-index";
|
|
@@ -52,6 +52,10 @@ export declare function setLifecycleHostPlatformForTest(platform: NodeJS.Platfor
|
|
|
52
52
|
export declare function readyThenExitToleranceEnabledForTest(): boolean;
|
|
53
53
|
export declare function hasValidLifecycleDeadlines(value: LifecycleDeadlines, now?: number): boolean;
|
|
54
54
|
type Input = Record<string, unknown>;
|
|
55
|
+
type LifecycleEffectIntentWithDeadline = LifecycleEffectIntent & {
|
|
56
|
+
lifecycleCleanupDeadlineAt?: number;
|
|
57
|
+
admissionCleanupDeadlineAt?: number;
|
|
58
|
+
};
|
|
55
59
|
export declare const isCanonicalSessionId: (value: string) => boolean;
|
|
56
60
|
export interface SessionLifecycleWorktreeTarget {
|
|
57
61
|
enabled: true;
|
|
@@ -260,6 +264,7 @@ export interface LifecycleExecutionOutcome {
|
|
|
260
264
|
startupFailure?: LifecycleStartupFailureReceipt;
|
|
261
265
|
deferredArtifactCleanup?: () => Promise<void>;
|
|
262
266
|
}
|
|
267
|
+
export declare function classifyLateAdmissionSpawnFailure(response: BrokerResponse, effectIntent: LifecycleEffectIntentWithDeadline | undefined, now: number, messageSource: BrokerResponse): BrokerResponse;
|
|
263
268
|
/** Returns the response together with every durable lifecycle fact needed for truthful replay. */
|
|
264
269
|
export declare function executeLifecycle(broker: Broker, operation: string, input: Input, identity: string, cleanup?: CleanupEvidence): Promise<LifecycleExecutionOutcome>;
|
|
265
270
|
/**
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bounded exponential backoff tracker for broker recovery failures per agent dir.
|
|
3
|
+
* Tracks repeated recovery failures and implements exponential backoff with a cap
|
|
4
|
+
* to prevent repeated spawns from destabilizing the system.
|
|
5
|
+
*/
|
|
6
|
+
/** Configuration for recovery backoff behavior. */
|
|
7
|
+
export interface RecoveryBackoffConfig {
|
|
8
|
+
/** Initial backoff delay in milliseconds (default: 1000ms). */
|
|
9
|
+
initialDelayMs: number;
|
|
10
|
+
/** Maximum backoff delay in milliseconds (default: 30000ms = 30s). */
|
|
11
|
+
maxDelayMs: number;
|
|
12
|
+
/** Backoff multiplier applied each retry (default: 2). */
|
|
13
|
+
multiplier: number;
|
|
14
|
+
/** Maximum number of recovery attempts per session (default: 5). */
|
|
15
|
+
maxAttempts: number;
|
|
16
|
+
}
|
|
17
|
+
/** State for a single agent dir's recovery backoff. */
|
|
18
|
+
export interface RecoveryBackoffState {
|
|
19
|
+
/** Timestamp of the last recovery failure. */
|
|
20
|
+
lastFailureAt: number;
|
|
21
|
+
/** Current backoff delay in milliseconds. */
|
|
22
|
+
currentDelayMs: number;
|
|
23
|
+
/** Number of consecutive failures. */
|
|
24
|
+
failureCount: number;
|
|
25
|
+
/** Whether recovery has been permanently stopped due to max attempts. */
|
|
26
|
+
stopped: boolean;
|
|
27
|
+
}
|
|
28
|
+
/** Manages per-agent-dir recovery backoff state. */
|
|
29
|
+
export declare class RecoveryBackoffTracker {
|
|
30
|
+
#private;
|
|
31
|
+
constructor(config?: Partial<RecoveryBackoffConfig>);
|
|
32
|
+
/** Test hook: inject a custom clock. */
|
|
33
|
+
setClockForTest(clock: {
|
|
34
|
+
now(): number;
|
|
35
|
+
}): void;
|
|
36
|
+
/**
|
|
37
|
+
* Check if recovery should proceed now, considering backoff.
|
|
38
|
+
* Returns true if sufficient time has elapsed since the last failure.
|
|
39
|
+
*/
|
|
40
|
+
canAttemptRecovery(agentDir: string): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Record a recovery failure and update backoff state.
|
|
43
|
+
* Returns true if recovery should continue to be attempted, false if max attempts reached.
|
|
44
|
+
*/
|
|
45
|
+
recordFailure(agentDir: string): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Record a successful recovery and reset backoff state.
|
|
48
|
+
*/
|
|
49
|
+
recordSuccess(agentDir: string): void;
|
|
50
|
+
/**
|
|
51
|
+
* Get the current backoff state for an agent dir (for testing/diagnostics).
|
|
52
|
+
*/
|
|
53
|
+
getState(agentDir: string): RecoveryBackoffState | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Get milliseconds until the next recovery attempt can proceed.
|
|
56
|
+
*/
|
|
57
|
+
getBackoffWaitMs(agentDir: string): number;
|
|
58
|
+
/**
|
|
59
|
+
* Reset all backoff state (for testing).
|
|
60
|
+
*/
|
|
61
|
+
resetForTest(): void;
|
|
62
|
+
}
|
|
@@ -40,6 +40,14 @@ export interface SdkInternalRuntimeDescriptorTestOptions {
|
|
|
40
40
|
* must not hide behind it.
|
|
41
41
|
*/
|
|
42
42
|
export declare function sdkInternalRuntimeImage(): string | undefined;
|
|
43
|
+
/** Identity of a runtime image: enough to detect replacement at the same path. */
|
|
44
|
+
export interface SdkInternalRuntimeImageIdentity {
|
|
45
|
+
path: string;
|
|
46
|
+
dev: number;
|
|
47
|
+
ino: number;
|
|
48
|
+
mtimeMs: number;
|
|
49
|
+
size: number;
|
|
50
|
+
}
|
|
43
51
|
/**
|
|
44
52
|
* Whether a published runtime image is still a regular file on disk. A resident broker keeps
|
|
45
53
|
* answering requests after the executable it was started from is deleted (a
|
|
@@ -50,6 +58,18 @@ export declare function sdkInternalRuntimeImage(): string | undefined;
|
|
|
50
58
|
* its bound: a false retirement kills a healthy broker.
|
|
51
59
|
*/
|
|
52
60
|
export declare function isSdkInternalRuntimeImagePresent(file: string): Promise<boolean>;
|
|
61
|
+
/**
|
|
62
|
+
* Capture the runtime image identity (dev, ino, mtimeMs, size) at startup.
|
|
63
|
+
* Used to detect if the binary at the same path has been replaced.
|
|
64
|
+
*/
|
|
65
|
+
export declare function captureRuntimeImageIdentity(file: string): Promise<SdkInternalRuntimeImageIdentity | undefined>;
|
|
66
|
+
/**
|
|
67
|
+
* Check if the runtime image has been replaced since startup.
|
|
68
|
+
* Returns `true` if the path is gone, its dev/ino differ from the startup identity,
|
|
69
|
+
* or its size or modification time changed (an in-place rewrite keeps the inode).
|
|
70
|
+
* Returns `false` (inconclusive) if the file exists and matches, or on any error.
|
|
71
|
+
*/
|
|
72
|
+
export declare function isSdkInternalRuntimeImageReplaced(startupIdentity: SdkInternalRuntimeImageIdentity | undefined): Promise<boolean>;
|
|
53
73
|
/** Resolve the production descriptor from the statically imported marker and current Bun runtime evidence. */
|
|
54
74
|
export declare function resolveSdkInternalSpawnCommand(action: SdkInternalAction): SdkInternalSpawnCommand;
|
|
55
75
|
/** Test hook: injects runtime evidence without weakening the production marker authority. */
|
|
@@ -8,6 +8,8 @@ export declare const MIN_PREPARATION_TIMEOUT_MS = 1000;
|
|
|
8
8
|
export declare const MAX_PREPARATION_TIMEOUT_MS = 120000;
|
|
9
9
|
/** Bounded workspace install window; independent of child semantic readiness. */
|
|
10
10
|
export declare const DEFAULT_DEPENDENCY_PREPARATION_TIMEOUT_MS = 30000;
|
|
11
|
+
/** Non-worktree broker pre-spawn cap, also limited by the admission window remaining since receipt. */
|
|
12
|
+
export declare const DEFAULT_BROKER_PRESPAWN_PREPARATION_TIMEOUT_MS = 30000;
|
|
11
13
|
export declare function isValidReadinessTimeoutMs(value: unknown): value is number;
|
|
12
14
|
export declare function isValidPreparationTimeoutMs(value: unknown): value is number;
|
|
13
15
|
export declare const READINESS_TIMEOUT_INVALID_MESSAGE = "readinessTimeoutMs must be an integer between 4000 and 60000.";
|
|
@@ -51,7 +53,9 @@ export declare function lifecycleStartupBudgetMs(requestedReadinessTimeoutMs: nu
|
|
|
51
53
|
*
|
|
52
54
|
* Worktree launches add independent preparation budgets so git add / install cannot
|
|
53
55
|
* cut the caller while the broker still owns the request. One-arg
|
|
54
|
-
* {@link lifecycleStartupBudgetMs} stays queue+readiness for no-worktree callers
|
|
56
|
+
* {@link lifecycleStartupBudgetMs} stays queue+readiness for no-worktree callers:
|
|
57
|
+
* broker-derived pre-spawn work uses only the unspent admission window from receipt,
|
|
58
|
+
* and the fresh readiness window ends within that unchanged caller budget.
|
|
55
59
|
*/
|
|
56
60
|
export declare function lifecycleRequestTimeoutMs(operation: string, input: Record<string, unknown>): number | undefined;
|
|
57
61
|
/**
|
|
@@ -602,6 +602,7 @@ export declare function shouldAwaitNotificationStartup(event: {
|
|
|
602
602
|
origin: string;
|
|
603
603
|
};
|
|
604
604
|
}): boolean;
|
|
605
|
+
export declare function boundedCorrelatedAgentEndFrame(frame: Record<string, unknown>): Record<string, unknown>;
|
|
605
606
|
export declare function createNotificationsExtension(api: ExtensionAPI, options?: {
|
|
606
607
|
settings?: Settings;
|
|
607
608
|
ensureTelegramDaemon?: (input: {
|
|
@@ -292,7 +292,7 @@ export declare const SDK_LIFECYCLE_ROUTER_PROTOCOL_VERSION = 1;
|
|
|
292
292
|
* Generation 193 gates streamed content on negotiated observer capabilities,
|
|
293
293
|
* so existing owners are replaced before exposing the new observer path.
|
|
294
294
|
*/
|
|
295
|
-
export declare const DAEMON_GENERATION =
|
|
295
|
+
export declare const DAEMON_GENERATION = 199;
|
|
296
296
|
/**
|
|
297
297
|
* Serving-compatibility boundary for daemon lifecycle requests. Epoch 7
|
|
298
298
|
* requires durable publication receipts and acknowledged attachment dispatch,
|
|
@@ -2,6 +2,8 @@ export type SdkErrorCode = "invalid_input" | "unknown_operation" | "not_found" |
|
|
|
2
2
|
export declare class SdkClientError extends Error {
|
|
3
3
|
readonly code: SdkErrorCode;
|
|
4
4
|
readonly details: unknown;
|
|
5
|
+
/** True only when the SDK client itself reported a transport failure, never for a server error frame. */
|
|
6
|
+
readonly transport: boolean;
|
|
5
7
|
/**
|
|
6
8
|
* Reconnect-cycle diagnostics, separate from `details` because `details` is an
|
|
7
9
|
* established contract: callers read the terminating transport error straight off
|
|
@@ -10,7 +12,9 @@ export declare class SdkClientError extends Error {
|
|
|
10
12
|
* break every such reader, so the new attribution rides alongside it instead.
|
|
11
13
|
*/
|
|
12
14
|
readonly reconnect?: SdkReconnectExhaustedDetails;
|
|
13
|
-
constructor(code: SdkErrorCode, message: string, details?: unknown, reconnect?: SdkReconnectExhaustedDetails
|
|
15
|
+
constructor(code: SdkErrorCode, message: string, details?: unknown, reconnect?: SdkReconnectExhaustedDetails, options?: {
|
|
16
|
+
transport?: boolean;
|
|
17
|
+
});
|
|
14
18
|
}
|
|
15
19
|
/** A prepared transport operation failed before any wire handoff. */
|
|
16
20
|
export declare class SdkPreparedDispatchError extends SdkClientError {
|
|
@@ -3,6 +3,7 @@ import { type Settings } from "../../config/settings";
|
|
|
3
3
|
import type { ExtensionAPI, ExtensionContext } from "../../extensibility/extensions";
|
|
4
4
|
import type { AgentEndEvent } from "../../extensibility/shared-events";
|
|
5
5
|
import { ensureBroker } from "../broker/ensure";
|
|
6
|
+
import { captureRuntimeImageIdentity } from "../broker/runtime";
|
|
6
7
|
import { type MasterRoleAttestationV2, SessionIndex, type SessionLocatorV2 } from "../broker/session-index";
|
|
7
8
|
import type { SdkPromptTerminalOutcome } from "../prompt-status";
|
|
8
9
|
import { type ReceiptState } from "../receipt-state";
|
|
@@ -286,6 +287,12 @@ export interface CreateSdkSessionRuntimeOptions {
|
|
|
286
287
|
onFailureDiagnosticKeyCountForTests?: (count: number) => void;
|
|
287
288
|
/** Test-only observation after a resolved invocation completion is reconciled. */
|
|
288
289
|
onInvocationCompletionReconciledForTests?: (kind: InvocationKind, correlation: InvocationCorrelation) => void;
|
|
290
|
+
/** Test hook: provides a function to inject a controlled clock for broker recovery backoff assertions. */
|
|
291
|
+
setRecoveryBackoffClockForTest?: (inject: (clock: {
|
|
292
|
+
now(): number;
|
|
293
|
+
}) => void) => void;
|
|
294
|
+
/** Test hook: inject mock runtime image identity and replacement detection for broker recovery tests. */
|
|
295
|
+
setRuntimeImageIdentityForTest?: (register: (captureFn: () => Awaited<ReturnType<typeof captureRuntimeImageIdentity>> | undefined, isReplacedFn: () => Promise<boolean>) => void) => void;
|
|
289
296
|
}
|
|
290
297
|
export interface InvocationCorrelation {
|
|
291
298
|
commandId: string;
|
|
@@ -65,7 +65,7 @@ export declare const ACP_PROMPT_INFERENCE_TIMEOUT_MS: number;
|
|
|
65
65
|
export declare class PromptActivity {
|
|
66
66
|
#private;
|
|
67
67
|
/** Folds one inbound frame's lifecycle event into the in-flight tool and model state. */
|
|
68
|
-
observe(eventType: string | undefined, toolCallId: string | undefined, messageRole: string | undefined): void;
|
|
68
|
+
observe(eventType: string | undefined, toolCallId: string | undefined, messageRole: string | undefined, messageHasToolCall?: boolean): void;
|
|
69
69
|
/** True while at least one started tool call has not reported an end. */
|
|
70
70
|
get running(): boolean;
|
|
71
71
|
/** True while a dispatched model call has not produced the first frame of its response. */
|
|
@@ -1940,6 +1940,8 @@ export declare class AgentSession {
|
|
|
1940
1940
|
* Get session statistics.
|
|
1941
1941
|
*/
|
|
1942
1942
|
getSessionStats(): SessionStats;
|
|
1943
|
+
/** Current auto-compaction threshold, including active model-promotion policy. */
|
|
1944
|
+
getAutoCompactionThresholdTokens(contextTokens?: number): number;
|
|
1943
1945
|
/**
|
|
1944
1946
|
* Get current context usage statistics.
|
|
1945
1947
|
* Uses the last assistant message's usage data when available,
|
|
@@ -51,7 +51,6 @@ export declare class TaskTool implements AgentTool<TaskToolSchemaInstance, TaskT
|
|
|
51
51
|
*/
|
|
52
52
|
get parameters(): TaskToolSchemaInstance;
|
|
53
53
|
renderCall(args: unknown, options: Parameters<typeof renderTaskCall>[1], theme: Theme): import("@gajae-code/tui").Component;
|
|
54
|
-
/** Dynamic description that reflects current disabled-agent settings */
|
|
55
54
|
get description(): string;
|
|
56
55
|
private constructor();
|
|
57
56
|
/**
|
|
@@ -10,6 +10,7 @@ import type { ToolSession } from ".";
|
|
|
10
10
|
import { type OutputMeta } from "./output-meta";
|
|
11
11
|
export { STEER_FOLD_GRACE_MS, steerFoldReasonLine } from "./steer-fold";
|
|
12
12
|
export declare const BASH_DEFAULT_PREVIEW_LINES = 10;
|
|
13
|
+
export declare const MANAGED_OWNER_BASH_ENV: readonly ["GJC_TMUX_OWNER_STATE_DIR", "GJC_TMUX_OWNER_GENERATION", "GJC_MANAGED_OWNER_RUN_ID", "GJC_MANAGED_OWNER_INCARNATION", "GJC_MANAGED_OWNER_CHILD_TOKEN", "GJC_MANAGED_OWNER_PREDECESSOR_TOKEN", "GJC_MANAGED_OWNER_PREDECESSOR_GENERATION", "GJC_MANAGED_OWNER_PREDECESSOR_RUN_ID", "GJC_MANAGED_OWNER_PREDECESSOR_INCARNATION", "GJC_MANAGED_OWNER_TRANSCRIPT_PATH", "GJC_TMUX_OWNER_SERVER_KEY", "GJC_TMUX_LAUNCHED"];
|
|
13
14
|
export type BashOriginalArtifactSaveResult = BashArtifactSaveResult;
|
|
14
15
|
/**
|
|
15
16
|
* Lift a leading `cd <dir> &&` into the tool cwd only when `<dir>` is exactly
|
|
@@ -17,6 +17,11 @@ export interface ToolDescriptorMetadata {
|
|
|
17
17
|
readonly intent?: AgentTool<any, any, any>["intent"];
|
|
18
18
|
readonly parametersForSession?: (session?: ToolSession) => TSchema;
|
|
19
19
|
readonly parameters?: TSchema;
|
|
20
|
+
/**
|
|
21
|
+
* Renders the description the loaded tool will report for this session. Tools whose prompt text
|
|
22
|
+
* depends on session settings need it, or the advertised text changes on first load (#5992).
|
|
23
|
+
*/
|
|
24
|
+
readonly descriptionForSession?: (session: ToolSession) => string;
|
|
20
25
|
readonly description?: string;
|
|
21
26
|
readonly label?: string;
|
|
22
27
|
readonly customWireName?: string;
|