@gajae-code/coding-agent 0.11.4 → 0.11.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 +23 -0
- package/dist/types/cli/notify-cli.d.ts +5 -1
- package/dist/types/config/settings-schema.d.ts +20 -0
- package/dist/types/export/html/template.generated.d.ts +1 -1
- package/dist/types/gjc-runtime/deep-interview-state.d.ts +28 -0
- package/dist/types/gjc-runtime/launch-tmux.d.ts +3 -0
- package/dist/types/gjc-runtime/managed-owner-admission.d.ts +42 -0
- package/dist/types/gjc-runtime/managed-owner-supervisor.d.ts +41 -0
- package/dist/types/gjc-runtime/tmux-owner-isolation.d.ts +9 -0
- package/dist/types/gjc-runtime/ultragoal-owner-loss-recovery.d.ts +94 -0
- package/dist/types/gjc-runtime/ultragoal-runtime.d.ts +1 -0
- package/dist/types/harness-control-plane/owner.d.ts +3 -1
- package/dist/types/internal-urls/local-protocol.d.ts +18 -0
- package/dist/types/main.d.ts +2 -2
- package/dist/types/modes/components/ansi-display-validator.d.ts +2 -0
- package/dist/types/modes/components/notifications-settings-editor.d.ts +4 -0
- package/dist/types/modes/components/session-observer-overlay.d.ts +3 -1
- package/dist/types/modes/components/settings-selector.d.ts +2 -0
- package/dist/types/modes/components/tool-transcript-format.d.ts +58 -0
- package/dist/types/modes/components/transcript-viewer-overlay.d.ts +3 -0
- package/dist/types/modes/controllers/goal-mode-controller.d.ts +8 -1
- package/dist/types/modes/controllers/selector-controller.d.ts +15 -0
- package/dist/types/modes/shared/agent-wire/workflow-gate-broker.d.ts +3 -0
- package/dist/types/modes/shared/agent-wire/workflow-gate-types.d.ts +16 -0
- package/dist/types/plan-mode/approved-plan.d.ts +1 -0
- package/dist/types/runtime-mcp/manager.d.ts +2 -0
- package/dist/types/runtime-mcp/oauth-discovery.d.ts +12 -1
- package/dist/types/sdk/bus/chat-daemon-cli.d.ts +3 -1
- package/dist/types/sdk/bus/chat-daemon-control.d.ts +39 -4
- package/dist/types/sdk/bus/config-commands.d.ts +8 -0
- package/dist/types/sdk/bus/config.d.ts +22 -0
- package/dist/types/sdk/bus/index.d.ts +162 -2
- package/dist/types/sdk/bus/notification-service.d.ts +71 -8
- package/dist/types/sdk/bus/session-control.d.ts +11 -8
- package/dist/types/sdk/bus/telegram-daemon-cli.d.ts +5 -0
- package/dist/types/sdk/bus/telegram-daemon-contract.d.ts +6 -3
- package/dist/types/sdk/bus/telegram-daemon-control.d.ts +23 -4
- package/dist/types/sdk/bus/telegram-daemon.d.ts +214 -20
- package/dist/types/sdk/session.d.ts +16 -1
- package/dist/types/secrets/index.d.ts +4 -2
- package/dist/types/secrets/obfuscator.d.ts +1 -1
- package/dist/types/session/agent-session.d.ts +31 -2
- package/dist/types/session/artifacts.d.ts +30 -8
- package/dist/types/session/internal/managed-session-scope.d.ts +7 -0
- package/dist/types/session/internal/managed-session-storage.d.ts +63 -6
- package/dist/types/session/session-manager.d.ts +88 -18
- package/dist/types/session/session-storage.d.ts +27 -0
- package/dist/types/session/streaming-output.d.ts +4 -0
- package/dist/types/task/executor.d.ts +9 -0
- package/dist/types/tool-discovery/tool-index.d.ts +2 -0
- package/dist/types/tools/ask.d.ts +48 -0
- package/dist/types/tools/bash-skill-urls.d.ts +2 -2
- package/dist/types/tools/index.d.ts +4 -0
- package/package.json +9 -9
- package/scripts/generate-sdk-operation-inventory.ts +2 -0
- package/src/cli/notify-cli.ts +40 -18
- package/src/commands/sdk.ts +7 -2
- package/src/config/settings-schema.ts +17 -0
- package/src/daemon/runtime.ts +2 -2
- package/src/defaults/gjc/skills/deep-interview/SKILL.md +70 -49
- package/src/defaults/gjc/skills/ralplan/SKILL.md +0 -6
- package/src/defaults/gjc/skills/team/SKILL.md +7 -9
- package/src/defaults/gjc/skills/ultragoal/SKILL.md +0 -2
- package/src/eval/py/index.ts +2 -2
- package/src/export/html/template.generated.ts +1 -1
- package/src/extensibility/plugins/marketplace/manager.ts +94 -10
- package/src/gjc-runtime/deep-interview-recorder.ts +7 -0
- package/src/gjc-runtime/deep-interview-runtime.ts +10 -0
- package/src/gjc-runtime/deep-interview-state.ts +127 -3
- package/src/gjc-runtime/launch-tmux.ts +61 -6
- package/src/gjc-runtime/managed-owner-admission.ts +352 -0
- package/src/gjc-runtime/managed-owner-supervisor.ts +162 -0
- package/src/gjc-runtime/state-runtime.ts +38 -12
- package/src/gjc-runtime/team-runtime.ts +1 -1
- package/src/gjc-runtime/tmux-owner-isolation.ts +117 -0
- package/src/gjc-runtime/ultragoal-owner-loss-recovery.ts +328 -0
- package/src/gjc-runtime/ultragoal-runtime.ts +14 -0
- package/src/harness-control-plane/owner.ts +59 -3
- package/src/hindsight/client.ts +65 -2
- package/src/internal-urls/agent-protocol.ts +76 -5
- package/src/internal-urls/docs-index.generated.ts +7 -6
- package/src/internal-urls/local-protocol.ts +416 -18
- package/src/lsp/index.ts +4 -88
- package/src/main.ts +37 -13
- package/src/modes/acp/acp-agent.ts +8 -0
- package/src/modes/components/ansi-display-validator.ts +54 -0
- package/src/modes/components/notifications-settings-editor.ts +26 -2
- package/src/modes/components/session-observer-overlay.ts +40 -24
- package/src/modes/components/settings-selector.ts +3 -1
- package/src/modes/components/tool-transcript-format.ts +321 -0
- package/src/modes/components/transcript-viewer-overlay.ts +39 -17
- package/src/modes/controllers/goal-mode-controller.ts +20 -1
- package/src/modes/controllers/plan-mode-controller.ts +2 -0
- package/src/modes/controllers/runtime-mcp-command-controller.ts +3 -0
- package/src/modes/controllers/selector-controller.ts +70 -8
- package/src/modes/interactive-mode.ts +1 -0
- package/src/modes/shared/agent-wire/deep-interview-gate.ts +31 -1
- package/src/modes/shared/agent-wire/workflow-gate-broker.ts +17 -1
- package/src/modes/shared/agent-wire/workflow-gate-schema.ts +4 -2
- package/src/modes/shared/agent-wire/workflow-gate-types.ts +120 -3
- package/src/plan-mode/approved-plan.ts +3 -1
- package/src/prompts/agents/architect.md +1 -0
- package/src/prompts/agents/critic.md +1 -0
- package/src/prompts/system/custom-system-prompt.md +1 -1
- package/src/prompts/system/system-prompt.md +2 -1
- package/src/prompts/tools/lsp.md +3 -3
- package/src/runtime-mcp/manager.ts +16 -1
- package/src/runtime-mcp/oauth-discovery.ts +116 -26
- package/src/sdk/broker/session-index.ts +122 -64
- package/src/sdk/bus/chat-daemon-cli.ts +72 -10
- package/src/sdk/bus/chat-daemon-control.ts +526 -130
- package/src/sdk/bus/chat-daemon-runtime.ts +1 -0
- package/src/sdk/bus/config-commands.ts +22 -0
- package/src/sdk/bus/config.ts +37 -0
- package/src/sdk/bus/index.ts +384 -92
- package/src/sdk/bus/lifecycle-control-runtime.ts +53 -3
- package/src/sdk/bus/notification-service.ts +284 -62
- package/src/sdk/bus/recent-activity.ts +14 -5
- package/src/sdk/bus/session-control.ts +150 -44
- package/src/sdk/bus/telegram-daemon-cli.ts +20 -14
- package/src/sdk/bus/telegram-daemon-contract.ts +6 -3
- package/src/sdk/bus/telegram-daemon-control.ts +294 -76
- package/src/sdk/bus/telegram-daemon.ts +1788 -267
- package/src/sdk/protocol/operation-inventory.generated.json +11 -0
- package/src/sdk/session.ts +155 -27
- package/src/secrets/index.ts +53 -10
- package/src/secrets/obfuscator.ts +21 -18
- package/src/secrets/regex.ts +2 -0
- package/src/session/agent-session.ts +495 -253
- package/src/session/artifacts.ts +188 -23
- package/src/session/context-estimation.ts +7 -2
- package/src/session/internal/managed-session-scope.ts +200 -38
- package/src/session/internal/managed-session-storage.ts +1152 -46
- package/src/session/session-manager.ts +1055 -148
- package/src/session/session-storage.ts +109 -11
- package/src/session/streaming-output.ts +6 -0
- package/src/task/executor.ts +71 -26
- package/src/task/index.ts +63 -20
- package/src/tool-discovery/tool-index.ts +18 -0
- package/src/tools/ask.ts +129 -32
- package/src/tools/bash-skill-urls.ts +14 -3
- package/src/tools/bash.ts +2 -2
- package/src/tools/index.ts +4 -0
- package/src/tools/plan-mode-guard.ts +1 -0
- package/src/tools/sqlite-reader.ts +3 -2
- package/src/tools/subagent.ts +2 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type NativeDirectoryTreeSnapshot, type NativeOwnerOnlySecurityResult, type RecoveryFsRoot } from "@gajae-code/natives";
|
|
1
2
|
export declare const MANAGED_ARTIFACT_MAX_DEPTH = 32;
|
|
2
3
|
export declare const MANAGED_ARTIFACT_MAX_FILES = 10000;
|
|
3
4
|
export declare const MANAGED_ARTIFACT_MAX_FILE_BYTES: number;
|
|
@@ -16,23 +17,79 @@ export interface ManagedFileSnapshot {
|
|
|
16
17
|
ino: bigint;
|
|
17
18
|
size: number;
|
|
18
19
|
mtimeNs: bigint;
|
|
20
|
+
ctimeNs: bigint;
|
|
21
|
+
sha256: string;
|
|
19
22
|
};
|
|
20
23
|
}
|
|
24
|
+
export declare function validateNativeSecurityResult(value: unknown, operation: "apply" | "verify", kind: "directory" | "file"): NativeOwnerOnlySecurityResult;
|
|
25
|
+
/** Captured configured-root authority for managed paths only. */
|
|
26
|
+
export interface ManagedDirectoryRoot {
|
|
27
|
+
readonly canonicalPath: string;
|
|
28
|
+
readonly dev: bigint;
|
|
29
|
+
readonly ino: bigint;
|
|
30
|
+
}
|
|
31
|
+
export declare function managedDirectoryRoot(configuredRoot: string): ManagedDirectoryRoot;
|
|
32
|
+
export declare function retainManagedDirectoryAuthority(root: ManagedDirectoryRoot, directory: string, expected?: {
|
|
33
|
+
dev: bigint;
|
|
34
|
+
ino: bigint;
|
|
35
|
+
}): RecoveryFsRoot | undefined;
|
|
36
|
+
export declare function assertManagedDirectoryRoot(root: ManagedDirectoryRoot): void;
|
|
37
|
+
/** Internal retained-root capability for one managed descendant subtree. */
|
|
38
|
+
export declare class ManagedSessionDescendantStore {
|
|
39
|
+
#private;
|
|
40
|
+
constructor(root: ManagedDirectoryRoot, baseDir: string, retained?: {
|
|
41
|
+
authority: RecoveryFsRoot;
|
|
42
|
+
authorityBaseDir: string;
|
|
43
|
+
});
|
|
44
|
+
get dir(): string;
|
|
45
|
+
get rootAuthority(): ManagedDirectoryRoot;
|
|
46
|
+
get subtreeRootAuthority(): ManagedDirectoryRoot;
|
|
47
|
+
deriveSubtree(relativePath: string): ManagedSessionDescendantStore;
|
|
48
|
+
retainAuthority(): RecoveryFsRoot | undefined;
|
|
49
|
+
assertBound(): void;
|
|
50
|
+
verifyRootSecurity(): void;
|
|
51
|
+
ensureDirectory(relativePath?: string): ManagedDirectoryRoot;
|
|
52
|
+
publishNoReplace(relativePath: string, bytes: Uint8Array): Promise<void>;
|
|
53
|
+
publishNoReplaceSync(relativePath: string, bytes: Uint8Array): void;
|
|
54
|
+
replace(relativePath: string, bytes: Uint8Array): Promise<void>;
|
|
55
|
+
replaceSync(relativePath: string, bytes: Uint8Array): void;
|
|
56
|
+
appendSync(relativePath: string, bytes: Uint8Array): void;
|
|
57
|
+
/** Read an exact managed file without exposing its pathname as authority. */
|
|
58
|
+
readExpected(relativePath: string): ManagedFileSnapshot | null;
|
|
59
|
+
/** Remove an exact captured file without reopening its pathname as authority. */
|
|
60
|
+
removeExpected(relativePath: string, expected: ManagedFileSnapshot): void;
|
|
61
|
+
/** Read and remove one managed descendant through retained authority. */
|
|
62
|
+
consume(relativePath: string): Promise<Uint8Array | null>;
|
|
63
|
+
/** Remove one managed descendant through retained authority when it exists. */
|
|
64
|
+
remove(relativePath: string): Promise<void>;
|
|
65
|
+
/** Capture a complete descendant tree through this retained root. */
|
|
66
|
+
captureTree(relativePath: string): NativeDirectoryTreeSnapshot;
|
|
67
|
+
/** Copy an exact captured tree into an absent managed destination. */
|
|
68
|
+
importTree(sourceRelativePath: string, destinationRelativePath: string, snapshot: NativeDirectoryTreeSnapshot): Promise<void>;
|
|
69
|
+
moveTreeNoReplace(sourceRelativePath: string, destinationRelativePath: string, expected: NativeDirectoryTreeSnapshot): void;
|
|
70
|
+
removeTreeExpected(relativePath: string, expected: NativeDirectoryTreeSnapshot): void;
|
|
71
|
+
fsyncTree(): NativeDirectoryTreeSnapshot;
|
|
72
|
+
}
|
|
21
73
|
export declare function shouldFsyncManagedDirectory(platform?: NodeJS.Platform): boolean;
|
|
22
74
|
/** Create a managed directory and fail closed unless its owner-only mode/ACL verifies. */
|
|
23
|
-
export declare function ensureManagedDirectory(pathname: string): void;
|
|
75
|
+
export declare function ensureManagedDirectory(pathname: string, root?: ManagedDirectoryRoot): void;
|
|
76
|
+
/** Captures a bounded prefix from one no-follow descriptor and rechecks the pathname before use. */
|
|
77
|
+
export declare function captureManagedFilePrefixNoFollow(pathname: string, maxBytes: number): ManagedFileSnapshot;
|
|
24
78
|
/** Captures header/hash/copy input from one no-follow descriptor and rechecks the pathname before use. */
|
|
25
79
|
export declare function captureManagedFileNoFollow(pathname: string): ManagedFileSnapshot;
|
|
26
80
|
/** Atomically publishes bytes without replacing an existing destination. */
|
|
27
|
-
export declare function publishManagedFileNoReplace(destination: string, bytes: Uint8Array, assertOwned?: () => void): Promise<void>;
|
|
28
|
-
export declare function publishManagedFileNoReplaceSync(destination: string, bytes: Uint8Array): void;
|
|
81
|
+
export declare function publishManagedFileNoReplace(destination: string, bytes: Uint8Array, assertOwned?: () => void, root?: ManagedDirectoryRoot): Promise<void>;
|
|
82
|
+
export declare function publishManagedFileNoReplaceSync(destination: string, bytes: Uint8Array, root?: ManagedDirectoryRoot): void;
|
|
83
|
+
/** Replace one managed regular file while retaining the secured staging fd through publication. */
|
|
84
|
+
export declare function replaceManagedFileSync(destination: string, bytes: Uint8Array, root: ManagedDirectoryRoot): void;
|
|
85
|
+
export declare function replaceManagedFile(destination: string, bytes: Uint8Array, root: ManagedDirectoryRoot): Promise<void>;
|
|
29
86
|
/** Copy the exact bytes captured from one no-follow source descriptor. */
|
|
30
|
-
export declare function copyManagedFileNoReplace(source: string, destination: string, snapshot?: ManagedFileSnapshot): Promise<void>;
|
|
87
|
+
export declare function copyManagedFileNoReplace(source: string, destination: string, snapshot?: ManagedFileSnapshot, root?: ManagedDirectoryRoot): Promise<void>;
|
|
31
88
|
/** Acquire a lease lock with bounded wait, heartbeats, conservative stale reclaim, and fencing. */
|
|
32
|
-
export declare function acquireManagedLock(locksDirectory: string, name: string): Promise<ManagedStorageLock>;
|
|
89
|
+
export declare function acquireManagedLock(locksDirectory: string, name: string, root?: ManagedDirectoryRoot): Promise<ManagedStorageLock>;
|
|
33
90
|
/** Bounds a no-follow artifact tree before it can be copied or deleted. */
|
|
34
91
|
export declare function validateManagedArtifactTree(root: string): void;
|
|
35
92
|
/** Flush a copied managed artifact tree, including empty directories, before publishing its receipt. */
|
|
36
|
-
export declare function fsyncManagedArtifactTree(root: string):
|
|
93
|
+
export declare function fsyncManagedArtifactTree(root: string): NativeDirectoryTreeSnapshot;
|
|
37
94
|
export declare function publishManagedTombstone(destination: string, record: Record<string, unknown>, assertOwned?: () => void): Promise<void>;
|
|
38
95
|
export declare function unlinkManagedFileVerified(pathname: string, expected: ManagedFileSnapshot["identity"]): Promise<void>;
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { type AgentMessage } from "@gajae-code/agent-core";
|
|
2
2
|
import type { ConfiguredModelChainEntry as SharedConfiguredModelChainEntry } from "@gajae-code/agent-core/compaction";
|
|
3
3
|
import type { ImageContent, Message, MessageAttribution, ServiceTier, TextContent } from "@gajae-code/ai";
|
|
4
|
+
import * as native from "@gajae-code/natives";
|
|
4
5
|
import type { TtsrInjectionRecord } from "../export/ttsr";
|
|
6
|
+
import type { ManagedLegacyLocalMigrationSource } from "../internal-urls/local-protocol";
|
|
5
7
|
import { ArtifactManager } from "./artifacts";
|
|
6
8
|
import { type BlobPutResult, BlobStore } from "./blob-store";
|
|
7
9
|
import { type ManagedMigrationPolicy } from "./internal/managed-session-scope";
|
|
10
|
+
import { type ManagedDirectoryRoot, ManagedSessionDescendantStore } from "./internal/managed-session-storage";
|
|
8
11
|
import { type BashExecutionMessage, type CustomMessage, type FileMentionMessage, type HookMessage, type PythonExecutionMessage } from "./messages";
|
|
9
12
|
import { type SessionManagerReadAccess, sessionManagerReadCapability } from "./session-manager-internal";
|
|
10
|
-
import type { SessionStorage, SessionStorageStat, VerifiedSessionDeleteResult, VerifiedSessionDeleteTarget } from "./session-storage";
|
|
11
|
-
export declare const CURRENT_SESSION_VERSION =
|
|
13
|
+
import type { ManagedSessionSecurityContext, SessionStorage, SessionStorageStat, VerifiedSessionDeleteResult, VerifiedSessionDeleteTarget } from "./session-storage";
|
|
14
|
+
export declare const CURRENT_SESSION_VERSION = 5;
|
|
12
15
|
export interface SessionHeader {
|
|
13
16
|
type: "session";
|
|
14
17
|
version?: number;
|
|
@@ -167,6 +170,17 @@ export interface MCPToolSelectionEntry extends SessionEntryBase {
|
|
|
167
170
|
type: "mcp_tool_selection";
|
|
168
171
|
/** MCP tool names selected for visibility in discovery mode. */
|
|
169
172
|
selectedToolNames: string[];
|
|
173
|
+
/** Legacy v4 combined built-in authority, retained for read compatibility. */
|
|
174
|
+
selectedDiscoveredBuiltinToolNames?: string[];
|
|
175
|
+
/** Correlates the ordered MCP and built-in entries emitted by one combined activation. */
|
|
176
|
+
mutationCorrelationId?: string;
|
|
177
|
+
}
|
|
178
|
+
/** Persisted discovered-built-in selection state, independent of MCP authority. */
|
|
179
|
+
export interface DiscoveredBuiltinToolSelectionEntry extends SessionEntryBase {
|
|
180
|
+
type: "discovered_builtin_tool_selection";
|
|
181
|
+
selectedToolNames: string[];
|
|
182
|
+
/** Correlates the ordered MCP and built-in entries emitted by one combined activation. */
|
|
183
|
+
mutationCorrelationId?: string;
|
|
170
184
|
}
|
|
171
185
|
/** Session init entry - captures initial context for subagent sessions (debugging/replay). */
|
|
172
186
|
export interface SessionInitEntry extends SessionEntryBase {
|
|
@@ -214,7 +228,7 @@ export interface CustomMessageEntry<T = unknown> extends SessionEntryBase {
|
|
|
214
228
|
evictedContent?: EvictedContentMarker;
|
|
215
229
|
}
|
|
216
230
|
/** Session entry - has id/parentId for tree structure (returned by "read" methods in SessionManager) */
|
|
217
|
-
export type SessionEntry = SessionMessageEntry | ThinkingLevelChangeEntry | ModelChangeEntry | ServiceTierChangeEntry | CompactionEntry | BranchSummaryEntry | CustomEntry | CustomMessageEntry | LabelEntry | TtsrInjectionEntry | MCPToolSelectionEntry | SessionInitEntry | ModeChangeEntry | ConfiguredModelChainEntry;
|
|
231
|
+
export type SessionEntry = SessionMessageEntry | ThinkingLevelChangeEntry | ModelChangeEntry | ServiceTierChangeEntry | CompactionEntry | BranchSummaryEntry | CustomEntry | CustomMessageEntry | LabelEntry | TtsrInjectionEntry | MCPToolSelectionEntry | DiscoveredBuiltinToolSelectionEntry | SessionInitEntry | ModeChangeEntry | ConfiguredModelChainEntry;
|
|
218
232
|
/** Append-only replacement for mutable fields on the session header. */
|
|
219
233
|
export interface HeaderPatchRecord {
|
|
220
234
|
type: "header_patch";
|
|
@@ -270,8 +284,12 @@ export interface SessionContext {
|
|
|
270
284
|
ttsrMessageCount?: number;
|
|
271
285
|
/** MCP tool names selected through discovery for this session branch. */
|
|
272
286
|
selectedMCPToolNames: string[];
|
|
287
|
+
/** Built-in discoverable tool names activated through discovery, when explicitly persisted. */
|
|
288
|
+
selectedDiscoveredBuiltinToolNames?: string[];
|
|
273
289
|
/** Whether this branch contains an explicit persisted MCP selection entry. */
|
|
274
290
|
hasPersistedMCPToolSelection: boolean;
|
|
291
|
+
/** Whether this branch contains an explicit persisted discovered-built-in selection entry. */
|
|
292
|
+
hasPersistedDiscoveredBuiltinToolSelection?: boolean;
|
|
275
293
|
/** Active mode (e.g. "plan") or "none" if no special mode is active */
|
|
276
294
|
mode: string;
|
|
277
295
|
/** Mode-specific data from the last mode_change entry */
|
|
@@ -316,7 +334,7 @@ export interface StrictSessionOpenSuccess {
|
|
|
316
334
|
}
|
|
317
335
|
export interface StrictSessionOpenFailure {
|
|
318
336
|
kind: "error";
|
|
319
|
-
reason: ResumeTailError["reason"] | "identity-mismatch";
|
|
337
|
+
reason: ResumeTailError["reason"] | "identity-mismatch" | "migration-required";
|
|
320
338
|
}
|
|
321
339
|
/** Exact transcript bytes and authority captured from one descriptor-bound read. */
|
|
322
340
|
export interface CapturedSessionTranscriptSnapshot {
|
|
@@ -335,6 +353,23 @@ export type StrictSessionForkResult = {
|
|
|
335
353
|
} | StrictSessionOpenFailure;
|
|
336
354
|
/** Result of opening an inspected session without create-or-rewrite fallback. */
|
|
337
355
|
export type StrictSessionOpenResult = StrictSessionOpenSuccess | StrictSessionOpenFailure;
|
|
356
|
+
/**
|
|
357
|
+
* Capability returned only by a strict recovery hydration open. It represents
|
|
358
|
+
* immutable transcript authority and is consumed by the promotion seam.
|
|
359
|
+
*/
|
|
360
|
+
export interface RecoveryHydrationContext {
|
|
361
|
+
readonly identity: ResumeSessionIdentity;
|
|
362
|
+
}
|
|
363
|
+
export interface RecoveryHydrationOpenSuccess {
|
|
364
|
+
readonly kind: "hydrated";
|
|
365
|
+
readonly manager: SessionManager;
|
|
366
|
+
readonly context: RecoveryHydrationContext;
|
|
367
|
+
}
|
|
368
|
+
export type RecoveryHydrationOpenResult = RecoveryHydrationOpenSuccess | StrictSessionOpenFailure;
|
|
369
|
+
export interface RecoveryHydrationPromotionFence {
|
|
370
|
+
/** The caller has durably published ownership and acquired its writer lease. */
|
|
371
|
+
readonly ownershipReady: true;
|
|
372
|
+
}
|
|
338
373
|
export interface SessionInfo {
|
|
339
374
|
path: string;
|
|
340
375
|
id: string;
|
|
@@ -434,6 +469,22 @@ export declare function getLatestCompactionEntry(entries: SessionEntry[]): Compa
|
|
|
434
469
|
* Handles compaction and branch summaries along the path.
|
|
435
470
|
*/
|
|
436
471
|
export declare function buildSessionContext(entries: SessionEntry[], leafId?: string | null, byId?: Map<string, SessionEntry>, sessionIdentityNamespace?: string): SessionContext;
|
|
472
|
+
/** A session directory's authority is distinct from its string path. */
|
|
473
|
+
export type SessionDestination = {
|
|
474
|
+
readonly kind: "managed";
|
|
475
|
+
readonly directory: string;
|
|
476
|
+
readonly securityContext: ManagedSessionSecurityContext;
|
|
477
|
+
} | {
|
|
478
|
+
readonly kind: "explicit";
|
|
479
|
+
readonly directory: string;
|
|
480
|
+
};
|
|
481
|
+
export type SessionDestinationInput = string | SessionDestination | undefined;
|
|
482
|
+
interface ForkArtifactPublication {
|
|
483
|
+
readonly snapshot: native.NativeDirectoryTreeSnapshot;
|
|
484
|
+
readonly store: ManagedSessionDescendantStore;
|
|
485
|
+
readonly cleanupStore: ManagedSessionDescendantStore;
|
|
486
|
+
readonly cleanupRelativePath: string;
|
|
487
|
+
}
|
|
437
488
|
/** Exported for testing */
|
|
438
489
|
export declare function loadEntriesFromFile(filePath: string, storage?: SessionStorage): Promise<FileEntry[]>;
|
|
439
490
|
declare class RecentSessionInfo {
|
|
@@ -520,6 +571,7 @@ export declare class SessionManager {
|
|
|
520
571
|
private sessionDir;
|
|
521
572
|
private readonly persist;
|
|
522
573
|
private readonly storage;
|
|
574
|
+
private destination;
|
|
523
575
|
private constructor();
|
|
524
576
|
/**
|
|
525
577
|
* Snapshot of the five cache-invalidation revision domains (plan: Lane 1
|
|
@@ -552,6 +604,7 @@ export declare class SessionManager {
|
|
|
552
604
|
oldSessionFile: string;
|
|
553
605
|
newSessionFile: string;
|
|
554
606
|
} | undefined>;
|
|
607
|
+
copyArtifactsForFork(oldSessionFile: string, newSessionFile: string): Promise<ForkArtifactPublication | undefined>;
|
|
555
608
|
/**
|
|
556
609
|
* Move the session to a new working directory.
|
|
557
610
|
* Moves session files and artifacts on disk, updates all internal references,
|
|
@@ -592,10 +645,13 @@ export declare class SessionManager {
|
|
|
592
645
|
* Returns the session artifacts directory path (session file path without .jsonl).
|
|
593
646
|
* Returns null when the session is not persisted to a file.
|
|
594
647
|
* When this session has adopted an external ArtifactManager (subagent case),
|
|
595
|
-
*
|
|
596
|
-
*
|
|
648
|
+
* never exposes that managed directory as a pathname. Reads and writes use the
|
|
649
|
+
* adopted manager capability directly.
|
|
597
650
|
*/
|
|
598
651
|
getArtifactsDir(): string | null;
|
|
652
|
+
isManagedDestination(): boolean;
|
|
653
|
+
/** Supplies opaque retained authority for mandatory managed legacy local migration. */
|
|
654
|
+
getManagedLegacyLocalMigrationSource(): ManagedLegacyLocalMigrationSource | null;
|
|
599
655
|
/**
|
|
600
656
|
* Adopt an externally-owned ArtifactManager. Used by subagents to share
|
|
601
657
|
* the parent session's artifact directory and ID counter.
|
|
@@ -716,12 +772,10 @@ export declare class SessionManager {
|
|
|
716
772
|
* @returns Entry id
|
|
717
773
|
*/
|
|
718
774
|
appendCustomMessageEntry<T = unknown>(customType: string, content: string | (TextContent | ImageContent)[], display: boolean, details?: T, attribution?: MessageAttribution, observationId?: string): string;
|
|
719
|
-
/**
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
*/
|
|
724
|
-
appendMCPToolSelection(selectedToolNames: string[]): string;
|
|
775
|
+
/** Append MCP discovery selection authority without altering discovered built-in authority. */
|
|
776
|
+
appendMCPToolSelection(selectedToolNames: string[], mutationCorrelationId?: string): string;
|
|
777
|
+
/** Append discovered built-in selection authority without altering MCP authority. */
|
|
778
|
+
appendDiscoveredBuiltinToolSelection(selectedToolNames: string[], mutationCorrelationId?: string): string;
|
|
725
779
|
/**
|
|
726
780
|
* Append a TTSR injection entry recording which rules were injected.
|
|
727
781
|
* @param ruleNames Names of rules that were injected
|
|
@@ -833,20 +887,24 @@ export declare class SessionManager {
|
|
|
833
887
|
* @param cwd Working directory (stored in session header)
|
|
834
888
|
* @param sessionDir Optional session directory. If omitted, uses default (~/.gjc/agent/sessions/<encoded-cwd>/).
|
|
835
889
|
*/
|
|
836
|
-
static
|
|
890
|
+
static nestedManagedDestination(authority: ManagedDirectoryRoot | ManagedSessionDescendantStore, directory: string): SessionDestination;
|
|
891
|
+
static managedDestination(cwd: string, agentDir?: string, storage?: SessionStorage): SessionDestination;
|
|
892
|
+
static explicitDestination(directory: string): SessionDestination;
|
|
893
|
+
static create(cwd: string, destinationInput?: SessionDestinationInput, storage?: SessionStorage): SessionManager;
|
|
837
894
|
/** Resolve a default-managed candidate through binding validation and copy-retain migration before mutation. */
|
|
838
895
|
static prepareManagedCandidateForWrite(filePath: string, migrationPolicy: SessionDirectoryMigrationPolicy): Promise<string>;
|
|
839
896
|
/**
|
|
840
897
|
* Fork a session into the current project directory.
|
|
841
898
|
* Copies history from another session file while creating a new session file in the current sessionDir.
|
|
842
899
|
*/
|
|
843
|
-
static forkFrom(sourcePath: string, cwd: string,
|
|
900
|
+
static forkFrom(sourcePath: string, cwd: string, destinationInput?: SessionDestinationInput, storage?: SessionStorage, migrationPolicy?: SessionDirectoryMigrationPolicy): Promise<SessionManager>;
|
|
844
901
|
/**
|
|
845
902
|
* Open a specific session file.
|
|
846
903
|
* @param path Path to session file
|
|
847
904
|
* @param sessionDir Optional session directory for /new or /branch. If omitted, derives from file's parent.
|
|
848
905
|
*/
|
|
849
|
-
static open(filePath: string,
|
|
906
|
+
static open(filePath: string, destinationInput?: SessionDestinationInput, storage?: SessionStorage, migrationPolicy?: SessionDirectoryMigrationPolicy): Promise<SessionManager>;
|
|
907
|
+
static openNestedManaged(filePath: string, destination: SessionDestination, store: ManagedSessionDescendantStore, storage?: SessionStorage): Promise<SessionManager>;
|
|
850
908
|
/**
|
|
851
909
|
* List sessions for the resume picker without recovery or other maintenance writes.
|
|
852
910
|
*/
|
|
@@ -860,21 +918,33 @@ export declare class SessionManager {
|
|
|
860
918
|
* revalidate captured authority before destination initialization and transcript
|
|
861
919
|
* persistence; destination history always comes from the captured bytes.
|
|
862
920
|
*/
|
|
863
|
-
static forkFromCaptured(snapshot: CapturedSessionTranscriptSnapshot, cwd: string,
|
|
921
|
+
static forkFromCaptured(snapshot: CapturedSessionTranscriptSnapshot, cwd: string, destinationInput?: SessionDestinationInput, _migrationPolicy?: SessionDirectoryMigrationPolicy): Promise<StrictSessionForkResult>;
|
|
864
922
|
/** Inspect a selected session without acquiring write-capable ownership. */
|
|
865
923
|
static inspectSessionTailReadOnly(filePath: string, storage?: SessionStorage): Promise<ResumeTailInspection>;
|
|
924
|
+
/**
|
|
925
|
+
* Hydrate an existing predecessor transcript for recovery without taking any
|
|
926
|
+
* write-capable action. The caller must retain the returned context and use
|
|
927
|
+
* the explicit promotion seam only after its ownership-ready fence and writer
|
|
928
|
+
* lease are durable.
|
|
929
|
+
*/
|
|
930
|
+
static openExistingForRecoveryHydrationStrict(identity: ResumeSessionIdentity, destinationInput?: SessionDestinationInput, storage?: SessionStorage): Promise<RecoveryHydrationOpenResult>;
|
|
931
|
+
/**
|
|
932
|
+
* Allows the normal post-open metadata sanitation only after the caller has
|
|
933
|
+
* fsynced its external ownership-ready fence and acquired the writer lease.
|
|
934
|
+
*/
|
|
935
|
+
promoteRecoveryHydrationAfterOwnershipReadyFence(context: RecoveryHydrationContext, fence: RecoveryHydrationPromotionFence): Promise<void>;
|
|
866
936
|
/**
|
|
867
937
|
* Main startup code MUST retain the consented inspection identity and branch on
|
|
868
938
|
* the returned discriminant; an error result never creates, rewrites, or adopts
|
|
869
939
|
* the selected path. Breadcrumb ownership begins only after `kind: "opened"`.
|
|
870
940
|
*/
|
|
871
|
-
static openExistingStrict(identity: ResumeSessionIdentity,
|
|
941
|
+
static openExistingStrict(identity: ResumeSessionIdentity, destinationInput?: SessionDestinationInput, storage?: SessionStorage, migrationPolicy?: SessionDirectoryMigrationPolicy): Promise<StrictSessionOpenResult>;
|
|
872
942
|
/**
|
|
873
943
|
* Continue the most recent session, or create new if none.
|
|
874
944
|
* @param cwd Working directory
|
|
875
945
|
* @param sessionDir Optional session directory. If omitted, uses default (~/.gjc/agent/sessions/<encoded-cwd>/).
|
|
876
946
|
*/
|
|
877
|
-
static continueRecent(cwd: string,
|
|
947
|
+
static continueRecent(cwd: string, destinationInput?: SessionDestinationInput, storage?: SessionStorage, migrationPolicy?: SessionDirectoryMigrationPolicy): Promise<SessionManager>;
|
|
878
948
|
/** Create an in-memory session (no file persistence) */
|
|
879
949
|
static inMemory(cwd?: string, storage?: SessionStorage): SessionManager;
|
|
880
950
|
/**
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import * as native from "@gajae-code/natives";
|
|
2
|
+
import { type ManagedDirectoryRoot } from "./internal/managed-session-storage";
|
|
1
3
|
export interface SessionStorageStat {
|
|
2
4
|
dev: bigint;
|
|
3
5
|
ino: bigint;
|
|
@@ -48,7 +50,31 @@ export interface SessionStorageWriterOpenOptions {
|
|
|
48
50
|
onError?: (err: Error) => void;
|
|
49
51
|
/** Injectable OS-close dispatcher; defaults to `fs.closeSync`. */
|
|
50
52
|
closeAdapter?: SessionStorageWriterCloseAdapter;
|
|
53
|
+
/** Opaque authority for default-computed managed destinations only. */
|
|
54
|
+
securityContext?: SessionStorageSecurityContext;
|
|
51
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Immutable authority attached only to a computed managed session destination.
|
|
58
|
+
* A caller-supplied pathname never receives this capability, even when it
|
|
59
|
+
* happens to equal the current default session directory.
|
|
60
|
+
*/
|
|
61
|
+
export interface ManagedSessionSecurityContext {
|
|
62
|
+
readonly kind: "managed";
|
|
63
|
+
readonly agentDir: string;
|
|
64
|
+
readonly sessionsRoot: string;
|
|
65
|
+
readonly sessionDir: string;
|
|
66
|
+
readonly rootAuthority: ManagedDirectoryRoot;
|
|
67
|
+
readonly retainedAuthority?: native.RecoveryFsRoot;
|
|
68
|
+
}
|
|
69
|
+
/** @internal Create the only accepted managed writer authority object. */
|
|
70
|
+
export declare function createManagedSessionSecurityContext(input: {
|
|
71
|
+
agentDir: string;
|
|
72
|
+
sessionsRoot: string;
|
|
73
|
+
sessionDir: string;
|
|
74
|
+
rootAuthority: ManagedDirectoryRoot;
|
|
75
|
+
retainedAuthority?: native.RecoveryFsRoot;
|
|
76
|
+
}): ManagedSessionSecurityContext;
|
|
77
|
+
export type SessionStorageSecurityContext = ManagedSessionSecurityContext | undefined;
|
|
52
78
|
export interface SessionStorageWriter {
|
|
53
79
|
writeLine(line: string): Promise<void>;
|
|
54
80
|
/**
|
|
@@ -205,6 +231,7 @@ type NativeDirectoryTreeEntry = {
|
|
|
205
231
|
ino: string;
|
|
206
232
|
size: string;
|
|
207
233
|
mtimeNs: string;
|
|
234
|
+
ctimeNs: string;
|
|
208
235
|
sha256?: string;
|
|
209
236
|
};
|
|
210
237
|
export type NativeDirectoryTreeSnapshot = {
|
|
@@ -24,6 +24,10 @@ export interface OutputSummary {
|
|
|
24
24
|
artifactTruncatedBytes?: number;
|
|
25
25
|
}
|
|
26
26
|
export interface OutputSinkOptions {
|
|
27
|
+
/**
|
|
28
|
+
* Deprecated managed artifact pathname. Bare paths are deliberately ignored:
|
|
29
|
+
* streaming output must be terminally published through ArtifactManager.
|
|
30
|
+
*/
|
|
27
31
|
artifactPath?: string;
|
|
28
32
|
artifactId?: string;
|
|
29
33
|
/** Tail buffer budget (bytes). Default DEFAULT_MAX_BYTES. */
|
|
@@ -15,6 +15,7 @@ import { AgentRegistry } from "../registry/agent-registry";
|
|
|
15
15
|
import type { ForkContextSeed } from "../session/agent-session";
|
|
16
16
|
import type { ArtifactManager } from "../session/artifacts";
|
|
17
17
|
import type { AuthStorage } from "../session/auth-storage";
|
|
18
|
+
import { SessionManager } from "../session/session-manager";
|
|
18
19
|
import type { ContextFileEntry } from "../tools";
|
|
19
20
|
import type { EventBus } from "../utils/event-bus";
|
|
20
21
|
import type { WorkspaceTree } from "../workspace-tree";
|
|
@@ -80,6 +81,7 @@ export interface ExecutorOptions {
|
|
|
80
81
|
* artifacts directory (no per-subagent subdir).
|
|
81
82
|
*/
|
|
82
83
|
parentArtifactManager?: ArtifactManager;
|
|
84
|
+
managedPersistence?: ManagedTaskPersistence;
|
|
83
85
|
parentHindsightSessionState?: HindsightSessionState;
|
|
84
86
|
/**
|
|
85
87
|
* Parent agent's OpenTelemetry configuration. When defined, the subagent's
|
|
@@ -94,6 +96,13 @@ export interface ExecutorOptions {
|
|
|
94
96
|
autoloadSkills?: Skill[];
|
|
95
97
|
forkContextSeed?: ForkContextSeed;
|
|
96
98
|
}
|
|
99
|
+
export declare class ManagedTaskPersistence {
|
|
100
|
+
#private;
|
|
101
|
+
constructor(artifacts: ArtifactManager, taskId: string);
|
|
102
|
+
openSession(): Promise<SessionManager>;
|
|
103
|
+
publishOutput(rawOutput: string, metadata: Uint8Array): Promise<void>;
|
|
104
|
+
}
|
|
105
|
+
export declare function createManagedTaskPersistence(artifacts: ArtifactManager, taskId: string): ManagedTaskPersistence;
|
|
97
106
|
export declare function renderSubagentUserPrompt(assignment: string, independentMode: boolean): string;
|
|
98
107
|
export interface YieldItem {
|
|
99
108
|
data?: unknown;
|
|
@@ -36,6 +36,8 @@ export interface DiscoverableToolSearchResult {
|
|
|
36
36
|
score: number;
|
|
37
37
|
}
|
|
38
38
|
export declare function isMCPToolName(name: string): boolean;
|
|
39
|
+
/** Select persisted built-in discoveries that remain eligible in the current registry, allowlist, and baseline policy. */
|
|
40
|
+
export declare function selectRestorableDiscoveredBuiltinToolNames(toolNames: Iterable<string>, toolRegistry: ReadonlyMap<string, AgentTool>, allowedNames?: ReadonlySet<string>, excludedNames?: ReadonlySet<string>): string[];
|
|
39
41
|
export declare function isMCPBridgeTool(tool: {
|
|
40
42
|
name: string;
|
|
41
43
|
mcpServerName?: unknown;
|
|
@@ -36,9 +36,25 @@ export declare const askSchema: z.ZodObject<{
|
|
|
36
36
|
component: z.ZodString;
|
|
37
37
|
dimension: z.ZodString;
|
|
38
38
|
ambiguity: z.ZodNumber;
|
|
39
|
+
confused_terms: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
40
|
+
references: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
41
|
+
reference_id: z.ZodString;
|
|
42
|
+
label: z.ZodString;
|
|
43
|
+
origin: z.ZodString;
|
|
44
|
+
url: z.ZodOptional<z.ZodString>;
|
|
45
|
+
excerpt: z.ZodOptional<z.ZodString>;
|
|
46
|
+
}, z.core.$strict>>>;
|
|
39
47
|
}, z.core.$strict>, z.ZodObject<{
|
|
40
48
|
round_id: z.ZodOptional<z.ZodString>;
|
|
41
49
|
ambiguity: z.ZodNumber;
|
|
50
|
+
confused_terms: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
51
|
+
references: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
52
|
+
reference_id: z.ZodString;
|
|
53
|
+
label: z.ZodString;
|
|
54
|
+
origin: z.ZodString;
|
|
55
|
+
url: z.ZodOptional<z.ZodString>;
|
|
56
|
+
excerpt: z.ZodOptional<z.ZodString>;
|
|
57
|
+
}, z.core.$strict>>>;
|
|
42
58
|
round: z.ZodLiteral<0>;
|
|
43
59
|
component: z.ZodLiteral<"review-topology">;
|
|
44
60
|
dimension: z.ZodLiteral<"topology">;
|
|
@@ -60,6 +76,14 @@ export declare const askSchema: z.ZodObject<{
|
|
|
60
76
|
component: z.ZodString;
|
|
61
77
|
dimension: z.ZodString;
|
|
62
78
|
ambiguity: z.ZodNumber;
|
|
79
|
+
confused_terms: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
80
|
+
references: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
81
|
+
reference_id: z.ZodString;
|
|
82
|
+
label: z.ZodString;
|
|
83
|
+
origin: z.ZodString;
|
|
84
|
+
url: z.ZodOptional<z.ZodString>;
|
|
85
|
+
excerpt: z.ZodOptional<z.ZodString>;
|
|
86
|
+
}, z.core.$strict>>>;
|
|
63
87
|
round: z.ZodNumber;
|
|
64
88
|
intent_review: z.ZodObject<{
|
|
65
89
|
observed_items: z.ZodArray<z.ZodObject<{
|
|
@@ -169,9 +193,25 @@ export declare class AskTool implements AgentTool<typeof askSchema, AskToolDetai
|
|
|
169
193
|
component: z.ZodString;
|
|
170
194
|
dimension: z.ZodString;
|
|
171
195
|
ambiguity: z.ZodNumber;
|
|
196
|
+
confused_terms: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
197
|
+
references: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
198
|
+
reference_id: z.ZodString;
|
|
199
|
+
label: z.ZodString;
|
|
200
|
+
origin: z.ZodString;
|
|
201
|
+
url: z.ZodOptional<z.ZodString>;
|
|
202
|
+
excerpt: z.ZodOptional<z.ZodString>;
|
|
203
|
+
}, z.core.$strict>>>;
|
|
172
204
|
}, z.core.$strict>, z.ZodObject<{
|
|
173
205
|
round_id: z.ZodOptional<z.ZodString>;
|
|
174
206
|
ambiguity: z.ZodNumber;
|
|
207
|
+
confused_terms: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
208
|
+
references: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
209
|
+
reference_id: z.ZodString;
|
|
210
|
+
label: z.ZodString;
|
|
211
|
+
origin: z.ZodString;
|
|
212
|
+
url: z.ZodOptional<z.ZodString>;
|
|
213
|
+
excerpt: z.ZodOptional<z.ZodString>;
|
|
214
|
+
}, z.core.$strict>>>;
|
|
175
215
|
round: z.ZodLiteral<0>;
|
|
176
216
|
component: z.ZodLiteral<"review-topology">;
|
|
177
217
|
dimension: z.ZodLiteral<"topology">;
|
|
@@ -193,6 +233,14 @@ export declare class AskTool implements AgentTool<typeof askSchema, AskToolDetai
|
|
|
193
233
|
component: z.ZodString;
|
|
194
234
|
dimension: z.ZodString;
|
|
195
235
|
ambiguity: z.ZodNumber;
|
|
236
|
+
confused_terms: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
237
|
+
references: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
238
|
+
reference_id: z.ZodString;
|
|
239
|
+
label: z.ZodString;
|
|
240
|
+
origin: z.ZodString;
|
|
241
|
+
url: z.ZodOptional<z.ZodString>;
|
|
242
|
+
excerpt: z.ZodOptional<z.ZodString>;
|
|
243
|
+
}, z.core.$strict>>>;
|
|
196
244
|
round: z.ZodNumber;
|
|
197
245
|
intent_review: z.ZodObject<{
|
|
198
246
|
observed_items: z.ZodArray<z.ZodObject<{
|
|
@@ -24,8 +24,8 @@ export declare function resolveSkillUrlToPath(url: string, skills: readonly Skil
|
|
|
24
24
|
*/
|
|
25
25
|
export declare function expandSkillUrls(command: string, skills: readonly Skill[]): string;
|
|
26
26
|
/**
|
|
27
|
-
* Expand
|
|
28
|
-
*
|
|
27
|
+
* Expand filesystem-safe internal URLs in a bash command string. `agent://` and
|
|
28
|
+
* `artifact://` remain internal-reader-only and are rejected before resolution.
|
|
29
29
|
*/
|
|
30
30
|
export declare function expandInternalUrls(command: string, options: InternalUrlExpansionOptions): Promise<string>;
|
|
31
31
|
export {};
|
|
@@ -139,6 +139,8 @@ export interface ToolSession {
|
|
|
139
139
|
cwd: string;
|
|
140
140
|
/** Whether UI is available */
|
|
141
141
|
hasUI: boolean;
|
|
142
|
+
/** Whether this session will bind a workflow-gate emitter after tool construction. */
|
|
143
|
+
workflowGateEligible?: boolean;
|
|
142
144
|
/** Skip Python kernel availability check and warmup */
|
|
143
145
|
skipPythonPreflight?: boolean;
|
|
144
146
|
/** Pre-loaded context files (AGENTS.md, etc) */
|
|
@@ -185,6 +187,8 @@ export interface ToolSession {
|
|
|
185
187
|
requestForegroundBashBackground?: () => boolean;
|
|
186
188
|
/** Get session ID */
|
|
187
189
|
getSessionId?: () => string | null;
|
|
190
|
+
/** Whether local:// must use external managed scratch instead of artifacts/local. */
|
|
191
|
+
isManagedSessionDestination?: () => boolean;
|
|
188
192
|
/** Get Hindsight runtime state for this agent session. */
|
|
189
193
|
getHindsightSessionState?: () => HindsightSessionState | undefined;
|
|
190
194
|
/** Agent identity used for IRC routing. Returns the registry id (e.g. "0-Main", "0-AuthLoader"). */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@gajae-code/coding-agent",
|
|
4
|
-
"version": "0.11.
|
|
4
|
+
"version": "0.11.5",
|
|
5
5
|
"description": "Gajae Code CLI with read, bash, edit, write tools and session management",
|
|
6
6
|
"homepage": "https://gajae-code.com",
|
|
7
7
|
"author": "Yeachan-Heo and Gajae Code Contributors",
|
|
@@ -47,19 +47,19 @@
|
|
|
47
47
|
"install:defaults": "bun src/cli.ts setup defaults",
|
|
48
48
|
"verify:insane-vendor": "bun scripts/verify-insane-vendor.ts",
|
|
49
49
|
"verify:sdk-canonicalization": "bun scripts/verify-gjc-sdk-canonicalization.ts",
|
|
50
|
-
"check:sdk-closure": "bun scripts/generate-sdk-operation-inventory.ts --check && bun scripts/generate-sdk-adapter-parity-manifest.ts --check && bun scripts/run-test-manifest.ts test/manifests/sdk-adapter-parity-v1.json && bun scripts/generate-telegram-baseline-manifest.ts --check && bun scripts/run-test-manifest.ts test/manifests/telegram-baseline-v1.json && bun test test/sdk-downgrade-rollback.test.ts test/sdk-downgrade-unknown-version.test.ts && bun scripts/verify-gjc-sdk-canonicalization.ts --self-test && bun scripts/verify-gjc-sdk-canonicalization.ts && bun scripts/verify-gjc-sdk-rename.ts"
|
|
50
|
+
"check:sdk-closure": "bun ../../scripts/telegram-daemon-generation-guard.ts --validate-current-tree && bun test ../../scripts/telegram-daemon-generation-guard.test.ts && bun scripts/generate-sdk-operation-inventory.ts --check && bun scripts/generate-sdk-adapter-parity-manifest.ts --check && bun scripts/run-test-manifest.ts test/manifests/sdk-adapter-parity-v1.json && bun scripts/generate-telegram-baseline-manifest.ts --check && bun scripts/run-test-manifest.ts test/manifests/telegram-baseline-v1.json && bun test test/sdk-downgrade-rollback.test.ts test/sdk-downgrade-unknown-version.test.ts && bun scripts/verify-gjc-sdk-canonicalization.ts --self-test && bun scripts/verify-gjc-sdk-canonicalization.ts && bun scripts/verify-gjc-sdk-rename.ts"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@agentclientprotocol/sdk": "1.2.1",
|
|
54
54
|
"@babel/parser": "^7.29.3",
|
|
55
55
|
"@mozilla/readability": "^0.6.0",
|
|
56
|
-
"@gajae-code/stats": "0.11.
|
|
57
|
-
"@gajae-code/agent-core": "0.11.
|
|
58
|
-
"@gajae-code/ai": "0.11.
|
|
59
|
-
"@gajae-code/bridge-client": "0.11.
|
|
60
|
-
"@gajae-code/natives": "0.11.
|
|
61
|
-
"@gajae-code/tui": "0.11.
|
|
62
|
-
"@gajae-code/utils": "0.11.
|
|
56
|
+
"@gajae-code/stats": "0.11.5",
|
|
57
|
+
"@gajae-code/agent-core": "0.11.5",
|
|
58
|
+
"@gajae-code/ai": "0.11.5",
|
|
59
|
+
"@gajae-code/bridge-client": "0.11.5",
|
|
60
|
+
"@gajae-code/natives": "0.11.5",
|
|
61
|
+
"@gajae-code/tui": "0.11.5",
|
|
62
|
+
"@gajae-code/utils": "0.11.5",
|
|
63
63
|
"@puppeteer/browsers": "^2.13.0",
|
|
64
64
|
"@types/turndown": "5.0.6",
|
|
65
65
|
"@xterm/headless": "^6.0.0",
|
|
@@ -113,6 +113,8 @@ const LOCKED_EXCLUSIONS: Readonly<Record<string, string>> = {
|
|
|
113
113
|
"agent_session:cancelAndSubmit": "interactive queue transaction plumbing, not an independent SDK control seam",
|
|
114
114
|
"agent_session:applyCompactionPostAppendForTests": "internal accessor/plumbing, not a user-facing control seam",
|
|
115
115
|
"agent_session:continuePersistedHistory": "internal startup lifecycle plumbing, not a user-facing control seam",
|
|
116
|
+
"agent_session:promoteRecoveryHydrationAfterOwnershipReadyFence":
|
|
117
|
+
"internal owner-recovery authority transition after a durable writer fence, never a user-facing SDK operation",
|
|
116
118
|
"agent_session:setActiveModelProfile": "internal accessor/plumbing, not a user-facing control seam",
|
|
117
119
|
"agent_session:getActiveModelProfile": "internal accessor/plumbing, not a user-facing control seam",
|
|
118
120
|
"agent_session:getSessionDefaultModelSelector": "internal accessor/plumbing, not a user-facing control seam",
|