@gajae-code/coding-agent 0.12.19 → 0.12.21
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 +27 -9
- package/dist/types/commands/gc.d.ts +4 -0
- package/dist/types/commands/sdk.d.ts +66 -0
- package/dist/types/config/settings-schema.d.ts +34 -0
- package/dist/types/gjc-runtime/gc-runtime.d.ts +97 -1
- package/dist/types/modes/acp/acp-agent.d.ts +33 -1
- package/dist/types/modes/components/bash-execution.d.ts +7 -0
- package/dist/types/modes/components/eval-execution.d.ts +7 -0
- package/dist/types/modes/utils/ui-helpers.d.ts +10 -1
- package/dist/types/sdk/acp/adapter.d.ts +9 -17
- package/dist/types/sdk/acp/index.d.ts +1 -1
- package/dist/types/sdk/broker/broker.d.ts +93 -1
- package/dist/types/sdk/broker/ensure.d.ts +17 -0
- package/dist/types/sdk/broker/index.d.ts +1 -0
- package/dist/types/sdk/broker/lifecycle-ledger.d.ts +10 -1
- package/dist/types/sdk/broker/lifecycle.d.ts +81 -2
- package/dist/types/sdk/broker/startup-budget.d.ts +44 -0
- package/dist/types/sdk/bus/chat-daemon-control.d.ts +7 -1
- package/dist/types/sdk/bus/chat-daemon-runtime.d.ts +11 -1
- package/dist/types/sdk/bus/discord-daemon.d.ts +1 -0
- package/dist/types/sdk/bus/index.d.ts +20 -9
- package/dist/types/sdk/bus/prompt-reconciliation.d.ts +2 -6
- package/dist/types/sdk/bus/slack-daemon.d.ts +2 -2
- package/dist/types/sdk/host/query/revision-store.d.ts +5 -0
- package/dist/types/sdk/host/session-runtime.d.ts +4 -0
- package/dist/types/sdk/lifecycle-session.d.ts +13 -2
- package/dist/types/sdk/prompt-failure.d.ts +13 -0
- package/dist/types/sdk/prompt-watchdog.d.ts +82 -0
- package/dist/types/sdk/session-reconnect.d.ts +20 -0
- package/dist/types/sdk/startup-capability.d.ts +1 -1
- package/dist/types/session/agent-session.d.ts +14 -4
- package/dist/types/session/blob-store.d.ts +32 -0
- package/dist/types/session/internal/managed-session-storage.d.ts +40 -2
- package/dist/types/session/internal/session-memory-sidecar.d.ts +881 -0
- package/dist/types/session/session-manager.d.ts +302 -27
- package/dist/types/session/session-storage.d.ts +170 -0
- package/dist/types/task/executor.d.ts +2 -1
- package/dist/types/tools/bash.d.ts +1 -0
- package/dist/types/tools/todo-contract.d.ts +10 -1
- package/dist/types/tui/output-block.d.ts +6 -0
- package/package.json +8 -8
- package/src/cli/args.ts +75 -34
- package/src/commands/acp.ts +7 -1
- package/src/commands/gc.ts +31 -2
- package/src/commands/sdk.ts +141 -7
- package/src/config/settings-schema.ts +43 -0
- package/src/coordinator-mcp/server.ts +6 -1
- package/src/export/html/index.ts +83 -39
- package/src/gjc-runtime/gc-runtime.ts +1283 -4
- package/src/internal-urls/docs-index.generated.ts +1 -1
- package/src/internal-urls/local-protocol.ts +14 -0
- package/src/main.ts +40 -9
- package/src/modes/acp/acp-agent.ts +564 -37
- package/src/modes/acp/terminal-auth.ts +2 -2
- package/src/modes/components/bash-execution.ts +14 -0
- package/src/modes/components/eval-execution.ts +14 -0
- package/src/modes/controllers/command-controller.ts +63 -8
- package/src/modes/utils/ui-helpers.ts +81 -11
- package/src/sdk/acp/adapter.ts +46 -45
- package/src/sdk/acp/index.ts +1 -1
- package/src/sdk/broker/broker.ts +392 -11
- package/src/sdk/broker/ensure.ts +131 -61
- package/src/sdk/broker/index.ts +1 -0
- package/src/sdk/broker/lifecycle-ledger.ts +59 -5
- package/src/sdk/broker/lifecycle.ts +278 -63
- package/src/sdk/broker/startup-budget.ts +103 -0
- package/src/sdk/bus/chat-daemon-control.ts +9 -3
- package/src/sdk/bus/chat-daemon-runtime.ts +565 -29
- package/src/sdk/bus/conversation-store.ts +1 -1
- package/src/sdk/bus/discord-daemon.ts +2 -1
- package/src/sdk/bus/discord-live-provider.ts +34 -6
- package/src/sdk/bus/index.ts +118 -20
- package/src/sdk/bus/kind-aware-reconciliation.ts +2 -1
- package/src/sdk/bus/prompt-reconciliation.ts +4 -9
- package/src/sdk/bus/slack-daemon.ts +91 -18
- package/src/sdk/cli/session-cli.ts +8 -1
- package/src/sdk/host/query/handlers.ts +1 -1
- package/src/sdk/host/query/revision-store.ts +48 -12
- package/src/sdk/host/session-runtime.test.ts +50 -0
- package/src/sdk/host/session-runtime.ts +12 -2
- package/src/sdk/lifecycle-session.ts +26 -3
- package/src/sdk/mcp/server.ts +6 -1
- package/src/sdk/prompt-failure.ts +42 -0
- package/src/sdk/prompt-watchdog.ts +162 -0
- package/src/sdk/session-reconnect.ts +43 -0
- package/src/sdk/startup-capability.ts +13 -4
- package/src/session/agent-session.ts +541 -226
- package/src/session/blob-store.ts +89 -0
- package/src/session/internal/managed-session-scope.ts +36 -26
- package/src/session/internal/managed-session-storage.ts +303 -32
- package/src/session/internal/session-memory-sidecar.ts +2160 -0
- package/src/session/session-manager.ts +7057 -399
- package/src/session/session-storage.ts +1134 -11
- package/src/task/executor.ts +17 -4
- package/src/tools/bash.ts +109 -7
- package/src/tools/descriptors.test.ts +51 -0
- package/src/tools/find.ts +55 -26
- package/src/tools/todo-contract.ts +82 -13
- package/src/tools/todo-write.ts +2 -5
- package/src/tui/output-block.ts +11 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { NativeDirectoryTreeSnapshot, NativeExactUnlinkResult, NativeOwnerOnlySecurityResult, RecoveryFsRoot } from "@gajae-code/natives";
|
|
2
|
+
import type { SessionStorageStat } from "../session-storage";
|
|
2
3
|
import { type NativePublishOutcome } from "./native-publish-outcome";
|
|
3
4
|
export declare const MANAGED_ARTIFACT_MAX_DEPTH = 32;
|
|
4
5
|
export declare const MANAGED_ARTIFACT_MAX_FILES = 50000;
|
|
@@ -50,6 +51,38 @@ export interface ManagedFileSnapshot {
|
|
|
50
51
|
sha256: string;
|
|
51
52
|
};
|
|
52
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* Descriptor identity of one managed file object. Deliberately excludes the
|
|
56
|
+
* content sha256: append receipts must bind the post-operation object without
|
|
57
|
+
* re-reading the whole payload.
|
|
58
|
+
*/
|
|
59
|
+
export interface ManagedFileIdentity {
|
|
60
|
+
dev: bigint;
|
|
61
|
+
ino: bigint;
|
|
62
|
+
nlink: bigint;
|
|
63
|
+
size: number;
|
|
64
|
+
mtimeNs: bigint;
|
|
65
|
+
ctimeNs: bigint;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Post-operation evidence for one managed append. `descriptor` is the
|
|
69
|
+
* `SessionStorageStat`-shaped snapshot of the retained/successor object captured
|
|
70
|
+
* AFTER the append has been synchronized (never a pathname `statSync`); `identity`
|
|
71
|
+
* carries the same fields as the object identity. The SessionManager feeds
|
|
72
|
+
* `descriptor` directly into the commit-marker snapshot.
|
|
73
|
+
*/
|
|
74
|
+
export interface ManagedAppendReceipt {
|
|
75
|
+
descriptor: SessionStorageStat;
|
|
76
|
+
identity: ManagedFileIdentity;
|
|
77
|
+
}
|
|
78
|
+
export interface ManagedBoundedAppendExpectation {
|
|
79
|
+
readonly dev: string;
|
|
80
|
+
readonly ino: string;
|
|
81
|
+
readonly size: string;
|
|
82
|
+
readonly mtimeNs: string;
|
|
83
|
+
readonly ctimeNs: string;
|
|
84
|
+
readonly sha256: string;
|
|
85
|
+
}
|
|
53
86
|
export declare function validateNativeSecurityResult(value: unknown, operation: "apply" | "verify", kind: "directory" | "file"): NativeOwnerOnlySecurityResult;
|
|
54
87
|
export interface ManagedLockRetirementTestEvent {
|
|
55
88
|
readonly path: string;
|
|
@@ -111,7 +144,11 @@ export declare class ManagedSessionDescendantStore {
|
|
|
111
144
|
replace(relativePath: string, bytes: Uint8Array): Promise<void>;
|
|
112
145
|
replaceExpected(relativePath: string, bytes: Uint8Array, expected: ManagedFileSnapshot): void;
|
|
113
146
|
replaceSync(relativePath: string, bytes: Uint8Array): void;
|
|
114
|
-
|
|
147
|
+
captureBoundedAppendExpectation(relativePath: string): ManagedBoundedAppendExpectation | undefined;
|
|
148
|
+
appendExpectedSync(relativePath: string, bytes: Uint8Array, expected: ManagedBoundedAppendExpectation): ManagedAppendReceipt;
|
|
149
|
+
appendSync(relativePath: string, bytes: Uint8Array): ManagedAppendReceipt;
|
|
150
|
+
/** Capture descriptor identity without copying file bytes when retained authority is available. */
|
|
151
|
+
descriptorExpected(relativePath: string): SessionStorageStat | null;
|
|
115
152
|
/** Read an exact managed file without exposing its pathname as authority. */
|
|
116
153
|
readExpected(relativePath: string): ManagedFileSnapshot | null;
|
|
117
154
|
/** Remove an exact captured file without reopening its pathname as authority. */
|
|
@@ -135,10 +172,11 @@ export declare function ensureManagedDirectory(pathname: string, root?: ManagedD
|
|
|
135
172
|
export declare function captureManagedFilePrefixNoFollow(pathname: string, maxBytes: number): ManagedFileSnapshot;
|
|
136
173
|
/** Captures header/hash/copy input from one no-follow descriptor and rechecks the pathname before use. */
|
|
137
174
|
export declare function captureManagedFileNoFollow(pathname: string): ManagedFileSnapshot;
|
|
175
|
+
/** Streams a managed file once while retaining only a bounded header prefix and the full descriptor-bound digest. */
|
|
176
|
+
export declare function inspectManagedFileNoFollow(pathname: string, prefixLimit: number): ManagedFileSnapshot;
|
|
138
177
|
/** Atomically publishes bytes without replacing an existing destination. */
|
|
139
178
|
export declare function publishManagedFileNoReplace(destination: string, bytes: Uint8Array, assertOwned?: () => void, root?: ManagedDirectoryRoot, policy?: ManagedSessionSecurityPolicy): Promise<void>;
|
|
140
179
|
export declare function publishManagedFileNoReplaceSync(destination: string, bytes: Uint8Array, root?: ManagedDirectoryRoot, policy?: ManagedSessionSecurityPolicy): ManagedFileSnapshot["identity"];
|
|
141
|
-
/** Replace one managed regular file while retaining the secured staging fd through publication. */
|
|
142
180
|
export declare function replaceManagedFileSync(destination: string, bytes: Uint8Array, root: ManagedDirectoryRoot, policy?: ManagedSessionSecurityPolicy, assertFence?: () => void, expectedDestination?: ManagedFileSnapshot["identity"]): void;
|
|
143
181
|
export declare function replaceManagedFile(destination: string, bytes: Uint8Array, root: ManagedDirectoryRoot, policy?: ManagedSessionSecurityPolicy): Promise<void>;
|
|
144
182
|
/** Copy the exact bytes captured from one no-follow source descriptor. */
|