@gajae-code/coding-agent 0.11.10 → 0.12.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 +86 -2
- package/dist/types/cli/read-cli.d.ts +1 -0
- package/dist/types/cli.d.ts +8 -1
- package/dist/types/commands/deep-interview.d.ts +9 -0
- package/dist/types/commands/harness.d.ts +22 -0
- package/dist/types/commands/read.d.ts +6 -0
- package/dist/types/config/model-profile-activation.d.ts +1 -0
- package/dist/types/config/model-profile-contract.d.ts +2 -0
- package/dist/types/config/model-registry.d.ts +4 -0
- package/dist/types/config/provider-auth-health.d.ts +14 -0
- package/dist/types/config/provider-ranking.d.ts +59 -0
- package/dist/types/config/settings-schema.d.ts +86 -3
- package/dist/types/config/settings.d.ts +3 -0
- package/dist/types/extensibility/extensions/types.d.ts +43 -2
- package/dist/types/extensibility/shared-events.d.ts +6 -0
- package/dist/types/gjc-runtime/deep-interview-ambiguity.d.ts +5 -12
- package/dist/types/gjc-runtime/deep-interview-recorder.d.ts +17 -32
- package/dist/types/gjc-runtime/deep-interview-stage.d.ts +37 -0
- package/dist/types/gjc-runtime/deep-interview-state.d.ts +4 -135
- package/dist/types/gjc-runtime/gc-runtime.d.ts +1 -1
- package/dist/types/gjc-runtime/linux-proc.d.ts +22 -14
- package/dist/types/gjc-runtime/memory-guard-owner-claims.d.ts +47 -0
- package/dist/types/gjc-runtime/ralplan-runtime.d.ts +112 -1
- package/dist/types/gjc-runtime/state-runtime.d.ts +3 -1
- package/dist/types/gjc-runtime/state-writer.d.ts +5 -46
- package/dist/types/gjc-runtime/team-launch.d.ts +1 -1
- package/dist/types/gjc-runtime/team-runtime.d.ts +2 -1
- package/dist/types/gjc-runtime/team-store.d.ts +12 -0
- package/dist/types/gjc-runtime/team-worker-memory-guard.d.ts +92 -0
- package/dist/types/gjc-runtime/tmux-owner-isolation.d.ts +7 -0
- package/dist/types/gjc-runtime/ultragoal-receipt-freshness.d.ts +8 -0
- package/dist/types/gjc-runtime/workflow-manifest.d.ts +3 -5
- package/dist/types/internal-urls/local-root-gc.d.ts +2 -0
- package/dist/types/main.d.ts +1 -1
- package/dist/types/memories/index.d.ts +2 -0
- package/dist/types/modes/acp/acp-agent.d.ts +22 -9
- package/dist/types/modes/components/assistant-message.d.ts +3 -1
- package/dist/types/modes/components/irc-sidebar.d.ts +41 -0
- package/dist/types/modes/components/queue-pane.d.ts +8 -0
- package/dist/types/modes/components/queued-message-selector.d.ts +6 -0
- package/dist/types/modes/components/read-tool-group.d.ts +4 -4
- package/dist/types/modes/components/session-observer-overlay.d.ts +4 -0
- package/dist/types/modes/components/settings-selector.d.ts +2 -0
- package/dist/types/modes/components/tool-execution.d.ts +8 -0
- package/dist/types/modes/components/welcome.d.ts +1 -0
- package/dist/types/modes/controllers/event-controller.d.ts +3 -0
- package/dist/types/modes/interactive-mode.d.ts +7 -1
- package/dist/types/modes/irc-observation-ledger.d.ts +17 -1
- package/dist/types/modes/types.d.ts +2 -0
- package/dist/types/modes/utils/ui-helpers.d.ts +16 -0
- package/dist/types/runtime/memory-domain.d.ts +9 -0
- package/dist/types/runtime/memory-guard-contract.d.ts +71 -0
- package/dist/types/runtime/memory-guard.d.ts +39 -0
- package/dist/types/runtime/memory-limit.d.ts +11 -0
- package/dist/types/runtime-mcp/manager.d.ts +8 -0
- package/dist/types/runtime-mcp/smithery-auth.d.ts +5 -0
- package/dist/types/sdk/acp/final-text.d.ts +19 -0
- package/dist/types/sdk/acp/mcp.d.ts +23 -0
- package/dist/types/sdk/broker/lifecycle.d.ts +7 -0
- package/dist/types/sdk/bus/chat-daemon-control.d.ts +2 -1
- package/dist/types/sdk/bus/control-drain-lease.d.ts +52 -0
- package/dist/types/sdk/bus/index.d.ts +18 -2
- package/dist/types/sdk/bus/kind-aware-reconciliation.d.ts +37 -0
- package/dist/types/sdk/bus/prompt-reconciliation.d.ts +2 -1
- package/dist/types/sdk/bus/rate-limit-pool.d.ts +2 -0
- package/dist/types/sdk/bus/reconciliation-store.d.ts +65 -0
- package/dist/types/sdk/bus/telegram-daemon-contract.d.ts +6 -4
- package/dist/types/sdk/bus/telegram-daemon.d.ts +23 -3
- package/dist/types/sdk/host/control/operations.d.ts +2 -1
- package/dist/types/sdk/host/host.d.ts +2 -0
- package/dist/types/sdk/host/query/handlers.d.ts +5 -0
- package/dist/types/sdk/lifecycle-session.d.ts +10 -1
- package/dist/types/sdk/startup-capability.d.ts +6 -0
- package/dist/types/session/agent-session.d.ts +51 -19
- package/dist/types/session/fallback-chain-controller.d.ts +18 -2
- package/dist/types/session/internal/managed-session-scope.d.ts +27 -0
- package/dist/types/session/memory-guard-checkpoint-participant.d.ts +69 -0
- package/dist/types/session/session-manager.d.ts +59 -13
- package/dist/types/session/streaming-output.d.ts +60 -5
- package/dist/types/skill-state/active-state.d.ts +0 -4
- package/dist/types/skill-state/workflow-hud.d.ts +3 -0
- package/dist/types/task/executor.d.ts +6 -0
- package/dist/types/task/types.d.ts +36 -0
- package/dist/types/task/ultragoal-redteam-activation.d.ts +33 -0
- package/dist/types/tools/browser/launch.d.ts +7 -0
- package/dist/types/tools/fetch.d.ts +17 -1
- package/dist/types/tools/output-meta.d.ts +21 -1
- package/dist/types/tools/read-internals.d.ts +12 -0
- package/dist/types/tools/read.d.ts +45 -1
- package/dist/types/tools/resource-gc.d.ts +23 -0
- package/dist/types/tools/tool-result.d.ts +7 -1
- package/package.json +9 -13
- package/scripts/benchmark-sticky-viewport-pr1.ts +239 -0
- package/scripts/capture-sticky-viewport-showcase.ts +292 -0
- package/scripts/generate-sdk-operation-inventory.ts +4 -0
- package/scripts/run-test-manifest.ts +6 -4
- package/scripts/verify-gjc-sdk-canonicalization.ts +122 -18
- package/scripts/verify-sticky-viewport-showcase.ts +611 -0
- package/src/capability/index.ts +8 -0
- package/src/cli/args.ts +14 -8
- package/src/cli/fast-help.ts +1 -1
- package/src/cli/read-cli.ts +2 -1
- package/src/cli.ts +49 -2
- package/src/commands/deep-interview.ts +29 -9
- package/src/commands/harness.ts +35 -12
- package/src/commands/read.ts +11 -2
- package/src/commands/sdk.ts +91 -7
- package/src/commands/team.ts +1 -1
- package/src/config/model-profile-activation.ts +1 -0
- package/src/config/model-profile-contract.ts +13 -0
- package/src/config/model-profiles.ts +24 -0
- package/src/config/model-registry.ts +21 -2
- package/src/config/provider-auth-health.ts +42 -0
- package/src/config/provider-ranking.ts +119 -0
- package/src/config/settings-schema.ts +84 -3
- package/src/config/settings.ts +254 -108
- package/src/defaults/gjc/skills/deep-interview/SKILL.md +229 -82
- package/src/defaults/gjc/skills/ralplan/SKILL.md +78 -26
- package/src/defaults/gjc/skills/team/SKILL.md +1 -1
- package/src/defaults/gjc/skills/ultragoal/SKILL.md +26 -16
- package/src/eval/py/executor.ts +7 -2
- package/src/extensibility/extensions/runner.ts +4 -0
- package/src/extensibility/extensions/types.ts +42 -4
- package/src/extensibility/shared-events.ts +5 -0
- package/src/gjc-runtime/deep-interview-ambiguity.ts +47 -68
- package/src/gjc-runtime/deep-interview-recorder.ts +227 -310
- package/src/gjc-runtime/deep-interview-runtime.ts +109 -270
- package/src/gjc-runtime/deep-interview-stage.ts +1016 -0
- package/src/gjc-runtime/deep-interview-state.ts +12 -921
- package/src/gjc-runtime/gc-render.ts +1 -0
- package/src/gjc-runtime/gc-runtime.ts +11 -1
- package/src/gjc-runtime/linux-proc.ts +70 -36
- package/src/gjc-runtime/memory-guard-owner-claims.ts +389 -0
- package/src/gjc-runtime/ralplan-runtime.ts +979 -71
- package/src/gjc-runtime/state-runtime.ts +50 -12
- package/src/gjc-runtime/state-writer.ts +70 -222
- package/src/gjc-runtime/team-launch.ts +34 -5
- package/src/gjc-runtime/team-runtime.ts +970 -33
- package/src/gjc-runtime/team-store.ts +32 -0
- package/src/gjc-runtime/team-worker-memory-guard.ts +363 -0
- package/src/gjc-runtime/team-workers.ts +1 -0
- package/src/gjc-runtime/tmux-owner-isolation.ts +18 -0
- package/src/gjc-runtime/ultragoal-receipt-freshness.ts +20 -0
- package/src/gjc-runtime/ultragoal-runtime.ts +13 -7
- package/src/gjc-runtime/workflow-manifest.generated.json +97 -350
- package/src/gjc-runtime/workflow-manifest.ts +34 -179
- package/src/hooks/native-skill-hook.ts +17 -4
- package/src/hooks/skill-state.ts +1 -23
- package/src/internal-urls/docs-index.generated.ts +10 -11
- package/src/internal-urls/local-protocol.ts +23 -4
- package/src/internal-urls/local-root-gc.ts +127 -0
- package/src/main.ts +9 -5
- package/src/memories/index.ts +10 -0
- package/src/modes/DESIGN.md +47 -0
- package/src/modes/acp/acp-agent.ts +597 -67
- package/src/modes/acp/acp-event-mapper.ts +106 -12
- package/src/modes/acp/acp-mode.ts +39 -3
- package/src/modes/components/assistant-message.ts +123 -22
- package/src/modes/components/irc-sidebar.ts +176 -62
- package/src/modes/components/model-selector.ts +76 -5
- package/src/modes/components/notifications-settings-editor.ts +1 -1
- package/src/modes/components/oauth-selector.ts +42 -12
- package/src/modes/components/queue-pane.ts +55 -9
- package/src/modes/components/queued-message-selector.ts +53 -10
- package/src/modes/components/read-tool-group.ts +82 -14
- package/src/modes/components/session-observer-overlay.ts +187 -32
- package/src/modes/components/settings-selector.ts +60 -18
- package/src/modes/components/tool-execution.ts +138 -27
- package/src/modes/components/tool-status-header.ts +1 -4
- package/src/modes/components/welcome.ts +18 -3
- package/src/modes/controllers/command-controller.ts +4 -0
- package/src/modes/controllers/event-controller.ts +109 -27
- package/src/modes/controllers/extension-ui-controller.ts +23 -12
- package/src/modes/controllers/input-controller.ts +62 -6
- package/src/modes/controllers/selector-controller.ts +83 -37
- package/src/modes/interactive-mode.ts +127 -29
- package/src/modes/irc-observation-ledger.ts +71 -15
- package/src/modes/runtime-init.ts +20 -2
- package/src/modes/types.ts +2 -0
- package/src/modes/utils/ui-helpers.ts +94 -1
- package/src/prompts/agents/architect.md +9 -1
- package/src/prompts/agents/critic.md +9 -0
- package/src/prompts/agents/executor.md +1 -1
- package/src/prompts/system/system-prompt.md +0 -1
- package/src/prompts/tools/read.md +4 -2
- package/src/runtime/memory-domain.ts +66 -0
- package/src/runtime/memory-guard-contract.ts +73 -0
- package/src/runtime/memory-guard.ts +292 -0
- package/src/runtime/memory-limit.ts +50 -0
- package/src/runtime-mcp/manager.ts +26 -6
- package/src/runtime-mcp/smithery-auth.ts +17 -2
- package/src/runtime-mcp/smithery-connect.ts +11 -1
- package/src/sdk/acp/adapter.ts +8 -1
- package/src/sdk/acp/final-text.ts +40 -0
- package/src/sdk/acp/mcp.ts +26 -0
- package/src/sdk/broker/lifecycle.ts +107 -7
- package/src/sdk/bus/chat-daemon-cli.ts +2 -2
- package/src/sdk/bus/chat-daemon-control.ts +4 -3
- package/src/sdk/bus/config.ts +1 -1
- package/src/sdk/bus/control-drain-lease.ts +104 -0
- package/src/sdk/bus/index.ts +503 -60
- package/src/sdk/bus/kind-aware-reconciliation.ts +242 -0
- package/src/sdk/bus/prompt-reconciliation.ts +2 -1
- package/src/sdk/bus/rate-limit-pool.ts +8 -0
- package/src/sdk/bus/reconciliation-store.ts +224 -0
- package/src/sdk/bus/telegram-daemon-contract.ts +6 -4
- package/src/sdk/bus/telegram-daemon.ts +531 -53
- package/src/sdk/host/control/dispatch.ts +7 -1
- package/src/sdk/host/control/operations.ts +2 -1
- package/src/sdk/host/host.ts +25 -3
- package/src/sdk/host/query/handlers.ts +55 -0
- package/src/sdk/lifecycle-session.ts +19 -3
- package/src/sdk/mcp/server.ts +46 -18
- package/src/sdk/protocol/operation-inventory.generated.json +76 -0
- package/src/sdk/protocol/operation-registry.ts +8 -2
- package/src/sdk/session.ts +25 -2
- package/src/sdk/startup-capability.ts +6 -0
- package/src/session/agent-session.ts +720 -190
- package/src/session/fallback-chain-controller.ts +47 -8
- package/src/session/internal/managed-session-scope.ts +40 -10
- package/src/session/internal/native-publish-outcome.ts +8 -3
- package/src/session/memory-guard-checkpoint-participant.ts +131 -0
- package/src/session/session-manager.ts +1372 -42
- package/src/session/streaming-output.ts +262 -43
- package/src/setup/provider-onboarding.ts +19 -4
- package/src/skill-state/active-state.ts +0 -10
- package/src/skill-state/workflow-hud.ts +25 -2
- package/src/skill-state/workflow-mutation-guard.ts +65 -7
- package/src/task/executor.ts +11 -3
- package/src/task/index.ts +2 -0
- package/src/task/types.ts +22 -11
- package/src/task/ultragoal-redteam-activation.ts +75 -0
- package/src/tools/ask.ts +89 -69
- package/src/tools/browser/launch.ts +41 -6
- package/src/tools/fetch.ts +114 -23
- package/src/tools/output-meta.ts +176 -9
- package/src/tools/path-utils.ts +5 -1
- package/src/tools/read-internals.ts +44 -0
- package/src/tools/read.ts +1542 -310
- package/src/tools/resource-gc.ts +665 -125
- package/src/tools/tool-result.ts +14 -1
- package/src/web/search/providers/codex.ts +1 -1
- package/src/workflow/workflow-intent-diff.ts +4 -1
- package/dist/types/gjc-runtime/deep-interview-draft.d.ts +0 -8
- package/dist/types/gjc-runtime/deep-interview-payload.d.ts +0 -41
- package/dist/types/gjc-runtime/deep-interview-repair.d.ts +0 -17
- package/src/gjc-runtime/deep-interview-draft.ts +0 -843
- package/src/gjc-runtime/deep-interview-payload.ts +0 -262
- package/src/gjc-runtime/deep-interview-repair.ts +0 -1674
|
@@ -2,7 +2,7 @@ import type { GjcTeamConfig, GjcTeamSnapshot, GjcTeamStartOptions, GjcTeamTask,
|
|
|
2
2
|
/** Launch-specific option wiring kept separate from runtime dispatch. */
|
|
3
3
|
export declare function withTeamLaunchTransport(options: GjcTeamStartOptions, mailboxDeliveryTransport: GjcTeamStartOptions["mailboxDeliveryTransport"]): GjcTeamStartOptions;
|
|
4
4
|
/** @internal Exported for unit tests. */
|
|
5
|
-
export declare function buildWorkerCommand(config: GjcTeamConfig, worker: GjcTeamWorker, platform?: NodeJS.Platform): string;
|
|
5
|
+
export declare function buildWorkerCommand(config: GjcTeamConfig, worker: GjcTeamWorker, platform?: NodeJS.Platform, promptOverride?: string): string;
|
|
6
6
|
interface GjcTmuxBinary {
|
|
7
7
|
command: string;
|
|
8
8
|
isPsmux: boolean;
|
|
@@ -186,6 +186,7 @@ export interface WorkerHeartbeatFile {
|
|
|
186
186
|
last_turn_at: string;
|
|
187
187
|
turn_count: number;
|
|
188
188
|
alive: boolean;
|
|
189
|
+
process_start_time?: string;
|
|
189
190
|
}
|
|
190
191
|
export interface GjcWorkerIntegrationAttemptRequestResult {
|
|
191
192
|
requested: boolean;
|
|
@@ -199,7 +200,7 @@ export interface GjcWorkerIntegrationAttemptRequestResult {
|
|
|
199
200
|
export interface GjcWorkerIntegrationAttemptOptions {
|
|
200
201
|
signal?: AbortSignal;
|
|
201
202
|
}
|
|
202
|
-
export declare const GJC_TEAM_API_OPERATIONS: readonly ["send-message", "broadcast", "mailbox-list", "mailbox-mark-delivered", "mailbox-mark-notified", "notification-list", "notification-read", "notification-replay", "notification-mark-pane-attempt", "worker-startup-ack", "create-task", "read-task", "list-tasks", "update-task", "claim-task", "transition-task-status", "transition-task", "release-task-claim", "read-config", "read-manifest", "read-worker-status", "update-worker-status", "read-worker-heartbeat", "recover-stale-claims", "update-worker-heartbeat", "write-worker-inbox", "write-worker-identity", "append-event", "read-events", "read-traces", "await-event", "write-shutdown-request", "read-shutdown-ack", "read-monitor-snapshot", "write-monitor-snapshot", "read-task-approval", "write-task-approval"];
|
|
203
|
+
export declare const GJC_TEAM_API_OPERATIONS: readonly ["send-message", "broadcast", "mailbox-list", "mailbox-mark-delivered", "mailbox-mark-notified", "notification-list", "notification-read", "notification-replay", "notification-mark-pane-attempt", "worker-startup-ack", "create-task", "read-task", "list-tasks", "update-task", "claim-task", "transition-task-status", "transition-task", "release-task-claim", "read-config", "read-manifest", "read-worker-status", "update-worker-status", "read-worker-heartbeat", "recover-stale-claims", "update-worker-heartbeat", "read-worker-memory-guard", "update-worker-memory-guard", "apply-worker-memory-guard", "write-worker-inbox", "write-worker-identity", "append-event", "read-events", "read-traces", "await-event", "write-shutdown-request", "read-shutdown-ack", "read-monitor-snapshot", "write-monitor-snapshot", "read-task-approval", "write-task-approval"];
|
|
203
204
|
export interface GjcTeamRuntimeTestSeams {
|
|
204
205
|
nowMs?: () => number;
|
|
205
206
|
continuationTmuxDispatch?: (command: string, args: readonly string[]) => {
|
|
@@ -107,6 +107,18 @@ export interface GjcTeamApiClaimResult {
|
|
|
107
107
|
claim_token?: string;
|
|
108
108
|
reason?: string;
|
|
109
109
|
}
|
|
110
|
+
export type GjcTeamWorkerClaimSelection = {
|
|
111
|
+
kind: "none";
|
|
112
|
+
} | {
|
|
113
|
+
kind: "exact";
|
|
114
|
+
task: GjcTeamTask;
|
|
115
|
+
claim: GjcTeamTaskClaim;
|
|
116
|
+
} | {
|
|
117
|
+
kind: "ambiguous";
|
|
118
|
+
tasks: GjcTeamTask[];
|
|
119
|
+
};
|
|
120
|
+
export declare function selectCurrentClaimedTaskForWorker(tasks: readonly GjcTeamTask[], workerId: string): GjcTeamWorkerClaimSelection;
|
|
121
|
+
export declare function findGjcTeamClaimedTaskForWorker(tasks: readonly GjcTeamTask[], workerId: string): GjcTeamTask | undefined;
|
|
110
122
|
type EventAppender = (event: {
|
|
111
123
|
type: string;
|
|
112
124
|
task_id?: string;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { type StateWriterOptions } from "./state-writer";
|
|
2
|
+
export type GjcTeamWorkerMemoryGuardState = "idle" | "advisory" | "retrying" | "checkpointed" | "replaced" | "blocked";
|
|
3
|
+
export type GjcTeamWorkerMemoryGuardCheckpointKind = "clean" | "eligible" | "protected_only" | "conflicted" | "git_error";
|
|
4
|
+
export type GjcTeamWorkerMemoryGuardPidProbe = {
|
|
5
|
+
kind: "live";
|
|
6
|
+
start_time: string;
|
|
7
|
+
} | {
|
|
8
|
+
kind: "absent";
|
|
9
|
+
} | {
|
|
10
|
+
kind: "unverifiable";
|
|
11
|
+
reason: string;
|
|
12
|
+
};
|
|
13
|
+
export interface GjcTeamWorkerMemoryGuardCheckpoint {
|
|
14
|
+
kind: GjcTeamWorkerMemoryGuardCheckpointKind;
|
|
15
|
+
files: string[];
|
|
16
|
+
head?: string | null;
|
|
17
|
+
commit?: string | null;
|
|
18
|
+
recorded_at: string;
|
|
19
|
+
}
|
|
20
|
+
export interface GjcTeamWorkerMemoryGuardReplacement {
|
|
21
|
+
old_pane_id?: string;
|
|
22
|
+
new_pane_id?: string;
|
|
23
|
+
recorded_at: string;
|
|
24
|
+
}
|
|
25
|
+
export interface GjcTeamWorkerMemoryGuardLedger {
|
|
26
|
+
schema_version: 1;
|
|
27
|
+
worker_id: string;
|
|
28
|
+
platform: string;
|
|
29
|
+
state: GjcTeamWorkerMemoryGuardState;
|
|
30
|
+
automatic_action_allowed: boolean;
|
|
31
|
+
retry_count: number;
|
|
32
|
+
retry_limit: number;
|
|
33
|
+
current_task_id?: string;
|
|
34
|
+
last_incident_id?: string;
|
|
35
|
+
last_reason?: string;
|
|
36
|
+
last_pid_probe?: GjcTeamWorkerMemoryGuardPidProbe;
|
|
37
|
+
last_checkpoint?: GjcTeamWorkerMemoryGuardCheckpoint;
|
|
38
|
+
last_replacement?: GjcTeamWorkerMemoryGuardReplacement;
|
|
39
|
+
updated_at: string;
|
|
40
|
+
}
|
|
41
|
+
export interface GjcTeamWorkerMemoryGuardSelectionCandidate {
|
|
42
|
+
worker_id: string;
|
|
43
|
+
platform: string;
|
|
44
|
+
excess_bytes: number;
|
|
45
|
+
retry_count: number;
|
|
46
|
+
retry_limit: number;
|
|
47
|
+
blocked?: boolean;
|
|
48
|
+
current_task_id?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface GjcTeamWorkerMemoryGuardSelection {
|
|
51
|
+
worker_id: string;
|
|
52
|
+
excess_bytes: number;
|
|
53
|
+
retry_count: number;
|
|
54
|
+
current_task_id?: string;
|
|
55
|
+
}
|
|
56
|
+
export declare function workerMemoryGuardLedgerPath(dir: string, workerId: string): string;
|
|
57
|
+
export declare function normalizeGjcTeamWorkerMemoryGuardPidProbe(value: unknown): GjcTeamWorkerMemoryGuardPidProbe | undefined;
|
|
58
|
+
export declare function isCanonicalGjcTeamWorkerMemoryGuardCheckpoint(value: unknown): value is GjcTeamWorkerMemoryGuardCheckpoint;
|
|
59
|
+
export declare function isCanonicalGjcTeamWorkerMemoryGuardReplacement(value: unknown): value is GjcTeamWorkerMemoryGuardReplacement;
|
|
60
|
+
export declare function isCanonicalGjcTeamWorkerMemoryGuardPidProbe(value: unknown): value is GjcTeamWorkerMemoryGuardPidProbe;
|
|
61
|
+
export declare function isCanonicalGjcTeamWorkerMemoryGuardLedger(value: unknown): value is GjcTeamWorkerMemoryGuardLedger;
|
|
62
|
+
export declare function createInitialGjcTeamWorkerMemoryGuardLedger(input: {
|
|
63
|
+
workerId: string;
|
|
64
|
+
platform: string;
|
|
65
|
+
now: string;
|
|
66
|
+
retryLimit?: number;
|
|
67
|
+
}): GjcTeamWorkerMemoryGuardLedger;
|
|
68
|
+
export declare function selectGjcTeamWorkerMemoryGuardCandidate(candidates: readonly GjcTeamWorkerMemoryGuardSelectionCandidate[]): GjcTeamWorkerMemoryGuardSelection | undefined;
|
|
69
|
+
export type TeamWorkerMemoryGuardAction = "advisory" | "replace" | "blocked";
|
|
70
|
+
export type TeamWorkerMemoryGuardResult = "noop" | "scheduled" | "succeeded" | "failed" | "blocked";
|
|
71
|
+
export interface TeamWorkerMemoryGuardLedgerEntry {
|
|
72
|
+
schema_version: 1;
|
|
73
|
+
recorded_at: string;
|
|
74
|
+
incident_id: string;
|
|
75
|
+
team_name: string;
|
|
76
|
+
worker_id: string;
|
|
77
|
+
task_id: string;
|
|
78
|
+
claim_token: string;
|
|
79
|
+
attempt: number;
|
|
80
|
+
platform: NodeJS.Platform;
|
|
81
|
+
action: TeamWorkerMemoryGuardAction;
|
|
82
|
+
result: TeamWorkerMemoryGuardResult;
|
|
83
|
+
reason: string;
|
|
84
|
+
}
|
|
85
|
+
export declare function isCanonicalTeamWorkerMemoryGuardLedgerEntry(value: unknown): value is TeamWorkerMemoryGuardLedgerEntry;
|
|
86
|
+
export declare function teamWorkerMemoryGuardDir(workerDirPath: string): string;
|
|
87
|
+
export declare function teamWorkerMemoryGuardLedgerPath(workerDirPath: string): string;
|
|
88
|
+
export declare function canMutateTeamWorkerMemoryGuard(platform: NodeJS.Platform): boolean;
|
|
89
|
+
export declare function advisoryReasonForTeamWorkerMemoryGuard(platform: NodeJS.Platform): string | undefined;
|
|
90
|
+
export declare function appendTeamWorkerMemoryGuardLedgerEntry(workerDirPath: string, entry: TeamWorkerMemoryGuardLedgerEntry, options?: StateWriterOptions): Promise<string>;
|
|
91
|
+
export declare function readTeamWorkerMemoryGuardLedger(workerDirPath: string): Promise<TeamWorkerMemoryGuardLedgerEntry[]>;
|
|
92
|
+
export declare function nextTeamWorkerMemoryGuardAttempt(entries: readonly TeamWorkerMemoryGuardLedgerEntry[], incidentId: string): number;
|
|
@@ -267,6 +267,13 @@ export interface LifecyclePaths {
|
|
|
267
267
|
journalFile: string;
|
|
268
268
|
}
|
|
269
269
|
export declare function lifecyclePaths(stateDir: string, sessionId: string, generation: string): LifecyclePaths;
|
|
270
|
+
export interface MemoryGuardClaimPaths {
|
|
271
|
+
root: string;
|
|
272
|
+
databaseFile: string;
|
|
273
|
+
walFile: string;
|
|
274
|
+
shmFile: string;
|
|
275
|
+
}
|
|
276
|
+
export declare function memoryGuardClaimPaths(stateDir: string, sessionId: string): MemoryGuardClaimPaths;
|
|
270
277
|
export declare function replaceOwnerGeneration(stateDir: string, sessionId: string, generation?: string, expectedBaseline?: OwnerGenerationBaseline): Promise<string>;
|
|
271
278
|
export type OwnerGenerationBaseline = {
|
|
272
279
|
state: "absent";
|
|
@@ -39,6 +39,14 @@ export declare function computeUltragoalPlanGeneration(input: {
|
|
|
39
39
|
basis: UltragoalCompletionVerification["basis"];
|
|
40
40
|
};
|
|
41
41
|
export declare function findLedgerReceiptEvent(ledger: readonly UltragoalLedgerEvent[], receipt: UltragoalCompletionVerification): UltragoalLedgerEvent | null;
|
|
42
|
+
/**
|
|
43
|
+
* A final-aggregate receipt whose recorded ledger checkpoint quality gate is
|
|
44
|
+
* missing a clean `criticReview` OKAY can never satisfy the completion guard,
|
|
45
|
+
* yet is not "stale" under {@link validateReceiptFreshBase}. Detect it so an
|
|
46
|
+
* identical-evidence complete replay can re-verify and re-mint with a
|
|
47
|
+
* corrected gate instead of no-opping into a permanently blocked run.
|
|
48
|
+
*/
|
|
49
|
+
export declare function finalAggregateReceiptMissingCriticOkay(ledger: readonly UltragoalLedgerEvent[], receipt: UltragoalCompletionVerification): boolean;
|
|
42
50
|
export declare function validateReceiptFreshBase(input: {
|
|
43
51
|
plan: UltragoalPlan;
|
|
44
52
|
ledger: readonly UltragoalLedgerEvent[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* TypeScript is the authoritative source of truth for GJC workflow manifests.
|
|
3
|
-
*
|
|
3
|
+
* Any JSON manifest projection is derived from this module and must never be
|
|
4
|
+
* hand-edited.
|
|
4
5
|
*/
|
|
5
6
|
import { type CanonicalGjcWorkflowSkill } from "../skill-state/canonical-skills";
|
|
6
7
|
export interface WorkflowState {
|
|
@@ -17,9 +18,7 @@ export interface WorkflowVerb {
|
|
|
17
18
|
name: string;
|
|
18
19
|
planned?: boolean;
|
|
19
20
|
/** Invocation surface that exposes this verb in the real CLI parser. */
|
|
20
|
-
surface?: "state-action" | "command-positional" | "command-flag"
|
|
21
|
-
/** Legacy surface retained for callers that have not migrated to normal typed commands. */
|
|
22
|
-
compatibilityOnly?: boolean;
|
|
21
|
+
surface?: "state-action" | "command-positional" | "command-flag";
|
|
23
22
|
}
|
|
24
23
|
export interface TypedArgSpec {
|
|
25
24
|
name: string;
|
|
@@ -27,7 +26,6 @@ export interface TypedArgSpec {
|
|
|
27
26
|
enumValues?: string[];
|
|
28
27
|
required?: boolean;
|
|
29
28
|
appliesToVerbs?: string[];
|
|
30
|
-
compatibilityOnly?: boolean;
|
|
31
29
|
planned?: boolean;
|
|
32
30
|
}
|
|
33
31
|
export interface RetentionPolicy {
|
package/dist/types/main.d.ts
CHANGED
|
@@ -96,7 +96,7 @@ export declare const BARE_RESUME_INTERACTIVE_ERROR = "--resume requires an inter
|
|
|
96
96
|
export declare function resolveManagedAgentDirForScope(_cwd: string): string;
|
|
97
97
|
export declare const BARE_RESUME_OPEN_ERROR = "Could not open the selected session. Use --resume <id>.";
|
|
98
98
|
export declare function runInteractiveMode(session: AgentSession, version: string, changelogMarkdown: string | undefined, notifs: (InteractiveModeNotify | null)[], startupUpdate: StartupUpdateOrchestrator, initialMessages: string[], setExtensionUIContext: (uiContext: ExtensionUIContext, hasUI: boolean) => void, lspServers: LspStartupServerInfo[] | undefined, mcpManager: MCPManager | undefined, eventBus?: EventBus, initialMessage?: string, initialImages?: ImageContent[], createInteractiveMode?: CreateInteractiveMode, resumeAction?: "continue-tail" | "open-idle"): Promise<void>;
|
|
99
|
-
declare function getChangelogForDisplay(parsed: Args): Promise<string | undefined>;
|
|
99
|
+
export declare function getChangelogForDisplay(parsed: Args): Promise<string | undefined>;
|
|
100
100
|
export declare function createSessionManager(parsed: Args, cwd: string, activeSettings?: Settings): Promise<SessionManager | undefined>;
|
|
101
101
|
/**
|
|
102
102
|
* Research-mode (RLM) preset hook. Lets `gjc rlm` augment the session options
|
|
@@ -25,4 +25,6 @@ export declare function clearMemoryData(agentDir: string, cwd: string): Promise<
|
|
|
25
25
|
* Force-enqueue global consolidation maintenance work.
|
|
26
26
|
*/
|
|
27
27
|
export declare function enqueueMemoryConsolidation(agentDir: string, cwd: string, sourceUpdatedAt?: number): void;
|
|
28
|
+
/** Secret scrubbing applied to every phase-2 consolidation output. Test seam. */
|
|
29
|
+
export declare function redactMemorySecretsForTesting(input: string): string;
|
|
28
30
|
export declare function getMemoryRoot(agentDir: string, cwd: string): string;
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import { type Agent, type AgentSideConnection, type AuthenticateRequest, type AuthenticateResponse, type ClientCapabilities, type CloseSessionRequest, type CloseSessionResponse, type DeleteSessionRequest, type DeleteSessionResponse, type ForkSessionRequest, type ForkSessionResponse, type InitializeRequest, type InitializeResponse, type ListSessionsRequest, type ListSessionsResponse, type LoadSessionRequest, type LoadSessionResponse, type NewSessionRequest, type NewSessionResponse, type PromptRequest, type PromptResponse, type ResumeSessionRequest, type ResumeSessionResponse, type SetSessionConfigOptionRequest, type SetSessionConfigOptionResponse, type SetSessionModeRequest, type SetSessionModeResponse } from "@agentclientprotocol/sdk";
|
|
1
|
+
import { type Agent, type AgentSideConnection, type AuthenticateRequest, type AuthenticateResponse, type AvailableCommand, type ClientCapabilities, type CloseSessionRequest, type CloseSessionResponse, type DeleteSessionRequest, type DeleteSessionResponse, type ForkSessionRequest, type ForkSessionResponse, type InitializeRequest, type InitializeResponse, type ListSessionsRequest, type ListSessionsResponse, type LoadSessionRequest, type LoadSessionResponse, type NewSessionRequest, type NewSessionResponse, type PromptRequest, type PromptResponse, type ResumeSessionRequest, type ResumeSessionResponse, type SetSessionConfigOptionRequest, type SetSessionConfigOptionResponse, type SetSessionModeRequest, type SetSessionModeResponse } from "@agentclientprotocol/sdk";
|
|
2
2
|
import { type AcpProviderRegistration, AcpSdkAdapter } from "../../sdk/acp";
|
|
3
3
|
import type { AcpStartupOptions } from "./startup-options";
|
|
4
4
|
export declare const ACP_BOOTSTRAP_RACE_GUARD_MS = 50;
|
|
5
5
|
type JsonObject = Record<string, unknown>;
|
|
6
6
|
/** Applies ACP's offset cursor after narrowing the broker listing to the requested cwd. */
|
|
7
|
-
export declare function paginateAcpSessions(listed: unknown[], cwd: string | undefined, offset: number
|
|
7
|
+
export declare function paginateAcpSessions(listed: unknown[], cwd: string | undefined, offset: number, sessionMetadata?: ReadonlyMap<string, {
|
|
8
|
+
title?: string;
|
|
9
|
+
updatedAt?: string;
|
|
10
|
+
}>): ListSessionsResponse;
|
|
11
|
+
/** Build the ACP command palette from the shared builtins and live SDK skill state. */
|
|
12
|
+
export declare function acpAvailableCommandsFromSkills(query: unknown): AvailableCommand[];
|
|
8
13
|
export type TranscriptReplayBlock = {
|
|
9
14
|
type: "text";
|
|
10
15
|
text: string;
|
|
@@ -27,8 +32,8 @@ export interface TranscriptReplayContent {
|
|
|
27
32
|
};
|
|
28
33
|
}
|
|
29
34
|
export declare function transcriptReplayContent(entry: unknown): TranscriptReplayContent;
|
|
30
|
-
/** Maps live canonical SDK config and model
|
|
31
|
-
export declare function acpSessionStateFromConfig(query: unknown,
|
|
35
|
+
/** Maps live canonical SDK config and the selected model catalog into the ACP 1.2.1 session state surface. */
|
|
36
|
+
export declare function acpSessionStateFromConfig(query: unknown, modelCatalogQuery?: unknown, modelPreset?: string): {
|
|
32
37
|
configOptions: ({
|
|
33
38
|
id: string;
|
|
34
39
|
name: string;
|
|
@@ -40,7 +45,7 @@ export declare function acpSessionStateFromConfig(query: unknown, modelsQuery?:
|
|
|
40
45
|
}[];
|
|
41
46
|
} | {
|
|
42
47
|
id: "model";
|
|
43
|
-
name:
|
|
48
|
+
name: string;
|
|
44
49
|
type: "select";
|
|
45
50
|
currentValue: string;
|
|
46
51
|
options: {
|
|
@@ -67,7 +72,7 @@ export declare function acpSessionStateFromConfig(query: unknown, modelsQuery?:
|
|
|
67
72
|
})[];
|
|
68
73
|
} | {
|
|
69
74
|
id: "thinking";
|
|
70
|
-
name:
|
|
75
|
+
name: string;
|
|
71
76
|
type: "select";
|
|
72
77
|
currentValue: string;
|
|
73
78
|
options: {
|
|
@@ -94,7 +99,7 @@ export declare function acpSessionStateFromConfig(query: unknown, modelsQuery?:
|
|
|
94
99
|
})[];
|
|
95
100
|
} | {
|
|
96
101
|
id: "steeringMode";
|
|
97
|
-
name:
|
|
102
|
+
name: string;
|
|
98
103
|
type: "select";
|
|
99
104
|
currentValue: string;
|
|
100
105
|
options: {
|
|
@@ -121,7 +126,7 @@ export declare function acpSessionStateFromConfig(query: unknown, modelsQuery?:
|
|
|
121
126
|
})[];
|
|
122
127
|
} | {
|
|
123
128
|
id: "followUpMode";
|
|
124
|
-
name:
|
|
129
|
+
name: string;
|
|
125
130
|
type: "select";
|
|
126
131
|
currentValue: string;
|
|
127
132
|
options: {
|
|
@@ -148,7 +153,7 @@ export declare function acpSessionStateFromConfig(query: unknown, modelsQuery?:
|
|
|
148
153
|
})[];
|
|
149
154
|
} | {
|
|
150
155
|
id: "interruptMode";
|
|
151
|
-
name:
|
|
156
|
+
name: string;
|
|
152
157
|
type: "select";
|
|
153
158
|
currentValue: string;
|
|
154
159
|
options: {
|
|
@@ -190,6 +195,14 @@ export declare function acpPromptPayload(blocks: PromptRequest["prompt"]): {
|
|
|
190
195
|
mimeType: string;
|
|
191
196
|
}>;
|
|
192
197
|
};
|
|
198
|
+
/**
|
|
199
|
+
* `AcpSdkAdapterError.code` is an internal string, but the SDK only derives a
|
|
200
|
+
* JSON-RPC code from a `RequestError`. Everything else collapses to an opaque
|
|
201
|
+
* `-32603 Internal error`, which hides the reason and defeats client-side
|
|
202
|
+
* recovery (an ACP client cannot see that it must authenticate). Map the codes
|
|
203
|
+
* that have a defined ACP/JSON-RPC counterpart onto a real `RequestError`.
|
|
204
|
+
*/
|
|
205
|
+
export declare function acpRequestFailure(error: unknown): unknown;
|
|
193
206
|
/** Registers a permission provider only when the ACP client requires prompts. */
|
|
194
207
|
export declare function acpProviderRegistrations(capabilities: ClientCapabilities | undefined, env?: NodeJS.ProcessEnv): AcpProviderRegistration[];
|
|
195
208
|
/** Maps ACP permission handling to the session's canonical SDK policy. */
|
|
@@ -10,11 +10,13 @@ export declare class AssistantMessageComponent extends Container {
|
|
|
10
10
|
#private;
|
|
11
11
|
private hideThinkingBlock;
|
|
12
12
|
private readonly onImageUpdate?;
|
|
13
|
-
|
|
13
|
+
private readonly onVisibleMutation?;
|
|
14
|
+
constructor(message?: AssistantMessage, hideThinkingBlock?: boolean, onImageUpdate?: (() => void) | undefined, viewportAnchorId?: string, onVisibleMutation?: (() => void) | undefined);
|
|
14
15
|
invalidate(): void;
|
|
15
16
|
setHideThinkingBlock(hide: boolean): void;
|
|
16
17
|
setToolResultImages(toolCallId: string, images: ImageContent[]): void;
|
|
17
18
|
setUsageInfo(usage: Usage): void;
|
|
18
19
|
updateContent(message: AssistantMessage, options?: AssistantMessageUpdateOptions): void;
|
|
20
|
+
dispose(): void;
|
|
19
21
|
}
|
|
20
22
|
export {};
|
|
@@ -2,12 +2,50 @@ import { type Component, type ViewportAnchorProvider, type ViewportAnchorRender
|
|
|
2
2
|
import type { IrcObservationLedger } from "../irc-observation-ledger";
|
|
3
3
|
export declare const IRC_SIDEBAR_WIDTH_RATIO = 0.3;
|
|
4
4
|
export declare const IRC_SIDEBAR_MAX_RENDER_ROWS = 2048;
|
|
5
|
+
export declare const __ircSidebarPerfCounters: {
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
projectionMemoHits: number;
|
|
8
|
+
projectionMemoMisses: number;
|
|
9
|
+
recordsVisited: number;
|
|
10
|
+
sourceBytes: number;
|
|
11
|
+
rows: number;
|
|
12
|
+
styledCacheHits: number;
|
|
13
|
+
styledCacheMisses: number;
|
|
14
|
+
wrapCalls: number;
|
|
15
|
+
snapshot(): {
|
|
16
|
+
projectionMemoHits: number;
|
|
17
|
+
projectionMemoMisses: number;
|
|
18
|
+
recordsVisited: number;
|
|
19
|
+
sourceBytes: number;
|
|
20
|
+
rows: number;
|
|
21
|
+
styledCacheHits: number;
|
|
22
|
+
styledCacheMisses: number;
|
|
23
|
+
wrapCalls: number;
|
|
24
|
+
};
|
|
25
|
+
enable(): void;
|
|
26
|
+
disable(): void;
|
|
27
|
+
reset(): void;
|
|
28
|
+
};
|
|
5
29
|
/** Computes transcript/sidebar widths while preserving at least half the terminal for the transcript. */
|
|
6
30
|
export declare function computeIrcSplitWidths(width: number): {
|
|
7
31
|
leftWidth: number;
|
|
8
32
|
separatorWidth: number;
|
|
9
33
|
rightWidth: number;
|
|
10
34
|
};
|
|
35
|
+
type SemanticLine = Readonly<{
|
|
36
|
+
kind: "header" | "body" | "elision" | "blank";
|
|
37
|
+
text: string;
|
|
38
|
+
sender?: string;
|
|
39
|
+
recipient?: string;
|
|
40
|
+
time?: string;
|
|
41
|
+
}>;
|
|
42
|
+
export type IrcSidebarSemanticProjection = Readonly<{
|
|
43
|
+
token: string;
|
|
44
|
+
lines: readonly SemanticLine[];
|
|
45
|
+
}>;
|
|
46
|
+
/** The authoritative bounded, display-neutral IRC sidebar projection. */
|
|
47
|
+
export declare function getIrcSidebarSemanticProjection(ledger: IrcObservationLedger, width: number): IrcSidebarSemanticProjection;
|
|
48
|
+
export declare function getIrcSidebarSemanticToken(ledger: IrcObservationLedger, width: number): string;
|
|
11
49
|
export interface IrcSidebarTheme {
|
|
12
50
|
fg(color: "dim" | "accent", text: string): string;
|
|
13
51
|
bold(text: string): string;
|
|
@@ -26,7 +64,10 @@ export declare class IrcSplitViewComponent implements ViewportAnchorProvider {
|
|
|
26
64
|
get visible(): boolean;
|
|
27
65
|
effectiveSidebarVisible(width?: number): boolean;
|
|
28
66
|
setVisible(visible: boolean): void;
|
|
67
|
+
invalidateTheme(): void;
|
|
68
|
+
resetSource(): void;
|
|
29
69
|
render(width: number): string[];
|
|
30
70
|
renderWithViewportAnchors(width: number): ViewportAnchorRender;
|
|
31
71
|
invalidate(): void;
|
|
32
72
|
}
|
|
73
|
+
export {};
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { Container } from "@gajae-code/tui";
|
|
2
2
|
import type { QueuedMessageEditEntry } from "../../session/agent-session";
|
|
3
|
+
type QueueSelectorAction = "tui.select.confirm" | "tui.select.cancel";
|
|
4
|
+
type QueueSelectorNavigationAction = "tui.select.up" | "tui.select.down" | "tui.select.pageUp" | "tui.select.pageDown";
|
|
3
5
|
export declare class QueuePaneComponent extends Container {
|
|
4
6
|
#private;
|
|
5
7
|
constructor(entries: QueuedMessageEditEntry[], options: {
|
|
6
8
|
selectedIndex?: number;
|
|
9
|
+
formatKeyHint?: (key: string) => string;
|
|
10
|
+
formatSelectAction?: (action: QueueSelectorAction) => string;
|
|
11
|
+
matchesSelectAction?: (keyData: string, action: QueueSelectorAction) => boolean;
|
|
12
|
+
resolveSelectNavigation?: (keyData: string) => QueueSelectorNavigationAction | undefined;
|
|
13
|
+
onSelect: (entry: QueuedMessageEditEntry) => void;
|
|
7
14
|
onDelete: (entry: QueuedMessageEditEntry, index: number) => void;
|
|
8
15
|
onMove: (entry: QueuedMessageEditEntry, index: number, direction: "up" | "down") => void;
|
|
9
16
|
onClose: () => void;
|
|
10
17
|
});
|
|
11
18
|
handleInput(keyData: string): void;
|
|
12
19
|
}
|
|
20
|
+
export {};
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { Container, SelectList } from "@gajae-code/tui";
|
|
2
2
|
import type { QueuedMessageEditEntry } from "../../session/agent-session";
|
|
3
3
|
type QueuedMessageMoveDirection = "up" | "down";
|
|
4
|
+
type QueueSelectorAction = "tui.select.confirm" | "tui.select.cancel";
|
|
5
|
+
type QueueSelectorNavigationAction = "tui.select.up" | "tui.select.down" | "tui.select.pageUp" | "tui.select.pageDown";
|
|
4
6
|
export type { QueuedMessageMoveDirection };
|
|
5
7
|
export declare class QueuedMessageSelectorComponent extends Container {
|
|
6
8
|
#private;
|
|
7
9
|
constructor(entries: QueuedMessageEditEntry[], onSelect: (entry: QueuedMessageEditEntry) => void, onDelete: (entry: QueuedMessageEditEntry, selectedIndex: number) => void, onMove: (entry: QueuedMessageEditEntry, selectedIndex: number, direction: QueuedMessageMoveDirection) => void, onCancel: () => void, options?: {
|
|
8
10
|
selectedIndex?: number;
|
|
11
|
+
formatKeyHint?: (key: string) => string;
|
|
12
|
+
formatSelectAction?: (action: QueueSelectorAction) => string;
|
|
13
|
+
matchesSelectAction?: (keyData: string, action: QueueSelectorAction) => boolean;
|
|
14
|
+
resolveSelectNavigation?: (keyData: string) => QueueSelectorNavigationAction | undefined;
|
|
9
15
|
});
|
|
10
16
|
handleInput(keyData: string): void;
|
|
11
17
|
getSelectList(): SelectList;
|
|
@@ -8,12 +8,11 @@ type ReadRenderArgs = {
|
|
|
8
8
|
file_path?: string;
|
|
9
9
|
sel?: string;
|
|
10
10
|
};
|
|
11
|
-
type ReadToolGroupOptions = {
|
|
12
|
-
showContentPreview?: boolean;
|
|
13
|
-
};
|
|
14
11
|
export declare class ReadToolGroupComponent extends Container implements ToolExecutionHandle {
|
|
15
12
|
#private;
|
|
16
|
-
constructor(options?:
|
|
13
|
+
constructor(options?: {
|
|
14
|
+
showContentPreview?: boolean;
|
|
15
|
+
});
|
|
17
16
|
updateArgs(args: ReadRenderArgs, toolCallId?: string): void;
|
|
18
17
|
updateResult(result: {
|
|
19
18
|
content: Array<{
|
|
@@ -32,5 +31,6 @@ export declare class ReadToolGroupComponent extends Container implements ToolExe
|
|
|
32
31
|
*/
|
|
33
32
|
setManuallyExpanded(expanded: boolean): void;
|
|
34
33
|
getComponent(): Component;
|
|
34
|
+
consumeVisibleTranscriptChange(): boolean;
|
|
35
35
|
}
|
|
36
36
|
export {};
|
|
@@ -9,4 +9,8 @@ export declare class SessionObserverOverlayComponent extends TranscriptViewerOve
|
|
|
9
9
|
refreshFromRegistry(): void;
|
|
10
10
|
handleInput(keyData: string): void;
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* This deliberately remains the eager full-history projection. PR2 owns projection
|
|
14
|
+
* virtualization/incrementalization; source acquisition above only controls snapshot safety.
|
|
15
|
+
*/
|
|
12
16
|
export declare function entriesFromMessages(entries: readonly SessionMessageEntry[]): TranscriptViewerEntry[];
|
|
@@ -58,6 +58,8 @@ export interface SettingsCallbacks {
|
|
|
58
58
|
getStatusLinePreview?: (width?: number) => string;
|
|
59
59
|
/** Called when plugins change */
|
|
60
60
|
onPluginsChanged?: () => void;
|
|
61
|
+
/** Called when an interactive setting cannot be committed. */
|
|
62
|
+
onError?: (message: string) => void;
|
|
61
63
|
/** Called when settings panel is closed */
|
|
62
64
|
onCancel: () => void;
|
|
63
65
|
}
|
|
@@ -5,6 +5,8 @@ export interface ToolExecutionOptions {
|
|
|
5
5
|
editFuzzyThreshold?: number;
|
|
6
6
|
editAllowFuzzy?: boolean;
|
|
7
7
|
hashlineAutoDropPureInsertDuplicates?: boolean;
|
|
8
|
+
/** Internal observer for visible asynchronous renderer mutations. */
|
|
9
|
+
onVisibleTranscriptMutation?: () => void;
|
|
8
10
|
}
|
|
9
11
|
export interface ToolExecutionHandle {
|
|
10
12
|
updateArgs(args: any, toolCallId?: string): void;
|
|
@@ -29,6 +31,11 @@ export interface ToolExecutionHandle {
|
|
|
29
31
|
* back to {@link setExpanded}.
|
|
30
32
|
*/
|
|
31
33
|
setManuallyExpanded?(expanded: boolean): void;
|
|
34
|
+
/**
|
|
35
|
+
* Internal capability for dispatchers that need exact synchronous visible-output
|
|
36
|
+
* detection. Optional so existing structural handles remain source compatible.
|
|
37
|
+
*/
|
|
38
|
+
consumeVisibleTranscriptChange?(): boolean;
|
|
32
39
|
}
|
|
33
40
|
/**
|
|
34
41
|
* Component that renders a tool call with its result (updateable)
|
|
@@ -52,6 +59,7 @@ export declare class ToolExecutionComponent extends Container {
|
|
|
52
59
|
details?: any;
|
|
53
60
|
isError?: boolean;
|
|
54
61
|
}, isPartial?: boolean, _toolCallId?: string): void;
|
|
62
|
+
consumeVisibleTranscriptChange(): boolean;
|
|
55
63
|
/**
|
|
56
64
|
* Stop spinner animation and cleanup resources.
|
|
57
65
|
*/
|
|
@@ -14,6 +14,7 @@ export interface WelcomeComponentOptions {
|
|
|
14
14
|
getViewportRows?: () => number | undefined;
|
|
15
15
|
getReservedBottomRows?: (termWidth: number) => number;
|
|
16
16
|
changelogMarkdown?: string;
|
|
17
|
+
rightGutterWidth?: number;
|
|
17
18
|
collapseChangelog?: boolean;
|
|
18
19
|
buildLabel?: string;
|
|
19
20
|
keyDisplayContext?: KeyDisplayContext;
|
|
@@ -3,7 +3,10 @@ import type { InteractiveModeContext } from "../../modes/types";
|
|
|
3
3
|
import type { AgentSessionEvent } from "../../session/agent-session";
|
|
4
4
|
/** Test-only performance counters for advisory baseline tests. */
|
|
5
5
|
export declare const __eventControllerPerfCounters: {
|
|
6
|
+
enabled: boolean;
|
|
6
7
|
messageUpdateContentVisits: number;
|
|
8
|
+
enable(): void;
|
|
9
|
+
disable(): void;
|
|
7
10
|
reset(): void;
|
|
8
11
|
};
|
|
9
12
|
export declare class EventController {
|
|
@@ -34,8 +34,12 @@ import { PromptSuggestionController } from "./prompt-suggestion-controller";
|
|
|
34
34
|
import type { Theme } from "./theme/theme";
|
|
35
35
|
import { type CompactionQueuedMessage, type ComposerSubmissionOptions, type InteractiveModeContext, type IrcArrivalSnapshot, type SubmittedUserInput, type TodoItem, type TodoPhase, type TranscriptRebuildPolicy } from "./types";
|
|
36
36
|
import type { ParsedIrcMessage } from "./utils/irc-message";
|
|
37
|
-
export declare function getDefaultComposerPlaceholder(context?: KeyDisplayContext): string;
|
|
37
|
+
export declare function getDefaultComposerPlaceholder(context?: KeyDisplayContext, keybindings?: Pick<KeybindingsManager, "getDisplayString">): string;
|
|
38
38
|
export declare const DEFAULT_COMPOSER_PLACEHOLDER: string;
|
|
39
|
+
export declare function getComposerPlaceholder(keybindings: Pick<KeybindingsManager, "getDisplayString">, context: KeyDisplayContext, options: {
|
|
40
|
+
readonly busy: boolean;
|
|
41
|
+
readonly busyPromptMode: "steer" | "queue";
|
|
42
|
+
}): string;
|
|
39
43
|
export declare function getWelcomeTranscriptReservedRows(chatContainer: Container, width: number): number;
|
|
40
44
|
export type WelcomeBannerSettingMode = "auto" | "unicode" | "square" | "ascii";
|
|
41
45
|
export declare function resolveWelcomeLogoMode(mode: WelcomeBannerSettingMode, env?: Record<string, string | undefined>, platform?: NodeJS.Platform): WelcomeLogoMode;
|
|
@@ -177,6 +181,8 @@ export declare class InteractiveMode implements InteractiveModeContext {
|
|
|
177
181
|
}): Promise<void>;
|
|
178
182
|
flushPendingBashComponents(): void;
|
|
179
183
|
isKnownSlashCommand(text: string): boolean;
|
|
184
|
+
/** Advances the sticky-viewport source only for semantic transcript output. */
|
|
185
|
+
recordVisibleTranscriptMutation(): void;
|
|
180
186
|
addMessageToChat(message: AgentMessage, options?: {
|
|
181
187
|
populateHistory?: boolean;
|
|
182
188
|
}): Component[];
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import type { ParsedIrcMessage } from "./utils/irc-message";
|
|
2
2
|
type InlineMode = "persistent" | "ephemeral";
|
|
3
|
+
export declare const IRC_OBSERVATION_LEDGER_MAX_RECORDS = 10000;
|
|
4
|
+
export declare const IRC_OBSERVATION_LEDGER_MAX_RETAINED_UTF8_BYTES: number;
|
|
5
|
+
export declare const IRC_OBSERVATION_LEDGER_MAX_SEEN_IDENTITIES = 100000;
|
|
6
|
+
export declare const __ircLedgerPerfCounters: {
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
epochAdvances: number;
|
|
9
|
+
snapshot(): {
|
|
10
|
+
epochAdvances: number;
|
|
11
|
+
};
|
|
12
|
+
enable(): void;
|
|
13
|
+
disable(): void;
|
|
14
|
+
reset(): void;
|
|
15
|
+
};
|
|
3
16
|
export type IrcObservationRecord = Readonly<ParsedIrcMessage & {
|
|
4
17
|
mode: InlineMode;
|
|
5
18
|
observedAt: number;
|
|
@@ -10,6 +23,7 @@ export type IrcObservationRecord = Readonly<ParsedIrcMessage & {
|
|
|
10
23
|
/** Runtime-only IRC observations. This intentionally has no persistence layer. */
|
|
11
24
|
export declare class IrcObservationLedger {
|
|
12
25
|
#private;
|
|
26
|
+
get mutationEpoch(): number;
|
|
13
27
|
/** Inline observations expire after 10 seconds; closed-panel observations persist inline. */
|
|
14
28
|
observe(message: ParsedIrcMessage, panelVisibleAtObservation: boolean): IrcObservationRecord | undefined;
|
|
15
29
|
getRecord(observationId: string): IrcObservationRecord | undefined;
|
|
@@ -17,6 +31,8 @@ export declare class IrcObservationLedger {
|
|
|
17
31
|
getInlineProjection(now: number): readonly IrcObservationRecord[];
|
|
18
32
|
/** Returns and clears IDs whose retained payload was released. */
|
|
19
33
|
drainEvictedObservationIds(): readonly string[];
|
|
20
|
-
reset(
|
|
34
|
+
reset(options?: {
|
|
35
|
+
retireCurrentSessionIdentities?: boolean;
|
|
36
|
+
}): void;
|
|
21
37
|
}
|
|
22
38
|
export {};
|
|
@@ -218,6 +218,8 @@ export interface InteractiveModeContext {
|
|
|
218
218
|
getAssistantViewportAnchorId?(message: AssistantMessage): string;
|
|
219
219
|
findLastAssistantMessage(): AssistantMessage | undefined;
|
|
220
220
|
extractAssistantText(message: AssistantMessage): string;
|
|
221
|
+
/** Records one semantic visible-transcript mutation for the sticky viewport. */
|
|
222
|
+
recordVisibleTranscriptMutation?(): void;
|
|
221
223
|
updateEditorTopBorder(): void;
|
|
222
224
|
updateEditorBorderColor(): void;
|
|
223
225
|
rebuildChatFromMessages(policy: TranscriptRebuildPolicy): void;
|
|
@@ -6,6 +6,22 @@ import { type SessionContext } from "../../session/session-manager";
|
|
|
6
6
|
import { type ParsedIrcMessage } from "./irc-message";
|
|
7
7
|
export type { TranscriptRebuildPolicy } from "../../modes/types";
|
|
8
8
|
export declare function prepareTranscriptRebuild(ui: TUI, policy: TranscriptRebuildPolicy): void;
|
|
9
|
+
export declare const RESUME_PROGRESS_COMMIT_TIMEOUT_MS = 250;
|
|
10
|
+
export interface ResumeProgressLease {
|
|
11
|
+
readonly committed: Promise<boolean>;
|
|
12
|
+
clear(): void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Mount a resume loader on the live status rail and wait for its render generation
|
|
16
|
+
* to commit before session I/O begins. The commit is advisory: a stopped or
|
|
17
|
+
* unavailable terminal resolves false and callers continue without blocking.
|
|
18
|
+
*
|
|
19
|
+
* Fail open (no-op lease, committed=false) when the status rail or UI lacks the
|
|
20
|
+
* child-mutation/render-commit surface required to mount progress. Headless and
|
|
21
|
+
* minimal controller contexts keep resume/migration semantics; full interactive
|
|
22
|
+
* TUI containers retain progress-before-switch.
|
|
23
|
+
*/
|
|
24
|
+
export declare function acquireResumeProgressLease(ctx: Pick<InteractiveModeContext, "ui" | "statusContainer">): ResumeProgressLease;
|
|
9
25
|
interface RenderInitialMessagesOptions {
|
|
10
26
|
preserveExistingChat?: boolean;
|
|
11
27
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { MemoryGuardDomainSnapshot, MemoryGuardWorkerSample } from "./memory-guard-contract";
|
|
2
|
+
export interface MemoryGuardDomainInput {
|
|
3
|
+
effectiveLimitBytes: number;
|
|
4
|
+
totalUsageBytes: number;
|
|
5
|
+
parentBytes: number;
|
|
6
|
+
parentReserveBytes: number;
|
|
7
|
+
workers: readonly MemoryGuardWorkerSample[];
|
|
8
|
+
}
|
|
9
|
+
export declare function computeMemoryGuardDomain(input: MemoryGuardDomainInput): MemoryGuardDomainSnapshot;
|