@corenel/harness 0.1.0 → 0.3.2
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/dist/acp/agentMap.d.ts +34 -0
- package/dist/acp/agentMap.d.ts.map +1 -0
- package/dist/acp/agentMap.js +110 -0
- package/dist/acp/agentMap.js.map +1 -0
- package/dist/acp/index.d.ts +4 -0
- package/dist/acp/index.d.ts.map +1 -0
- package/dist/acp/index.js +6 -0
- package/dist/acp/index.js.map +1 -0
- package/dist/acp/policyMap.d.ts +55 -0
- package/dist/acp/policyMap.d.ts.map +1 -0
- package/dist/acp/policyMap.js +121 -0
- package/dist/acp/policyMap.js.map +1 -0
- package/dist/acp/types.d.ts +41 -0
- package/dist/acp/types.d.ts.map +1 -0
- package/dist/acp/types.js +14 -0
- package/dist/acp/types.js.map +1 -0
- package/dist/api/backend.d.ts +39 -0
- package/dist/api/backend.d.ts.map +1 -0
- package/dist/api/backend.js +126 -0
- package/dist/api/backend.js.map +1 -0
- package/dist/api/client.d.ts +95 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +212 -0
- package/dist/api/client.js.map +1 -0
- package/dist/api/fileMirrorSource.d.ts +24 -0
- package/dist/api/fileMirrorSource.d.ts.map +1 -0
- package/dist/api/fileMirrorSource.js +59 -0
- package/dist/api/fileMirrorSource.js.map +1 -0
- package/dist/api/mirror.d.ts +102 -0
- package/dist/api/mirror.d.ts.map +1 -0
- package/dist/api/mirror.js +204 -0
- package/dist/api/mirror.js.map +1 -0
- package/dist/api/mirrorScheduler.d.ts +56 -0
- package/dist/api/mirrorScheduler.d.ts.map +1 -0
- package/dist/api/mirrorScheduler.js +167 -0
- package/dist/api/mirrorScheduler.js.map +1 -0
- package/dist/conversation.d.ts +0 -11
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +1 -24
- package/dist/conversation.js.map +1 -1
- package/dist/core/budget.d.ts +40 -0
- package/dist/core/budget.d.ts.map +1 -0
- package/dist/core/budget.js +62 -0
- package/dist/core/budget.js.map +1 -0
- package/dist/core/loop.d.ts +11 -0
- package/dist/core/loop.d.ts.map +1 -1
- package/dist/core/loop.js +89 -20
- package/dist/core/loop.js.map +1 -1
- package/dist/core/pricing.d.ts +8 -0
- package/dist/core/pricing.d.ts.map +1 -0
- package/dist/core/pricing.js +12 -0
- package/dist/core/pricing.js.map +1 -0
- package/dist/core/recovery.d.ts +60 -0
- package/dist/core/recovery.d.ts.map +1 -0
- package/dist/core/recovery.js +128 -0
- package/dist/core/recovery.js.map +1 -0
- package/dist/guardrail/builtins.js +6 -6
- package/dist/guardrail/builtins.js.map +1 -1
- package/dist/guardrail/permission-service.js +1 -1
- package/dist/guardrail/permission-service.js.map +1 -1
- package/dist/guardrail/serialize.d.ts.map +1 -1
- package/dist/guardrail/serialize.js +6 -0
- package/dist/guardrail/serialize.js.map +1 -1
- package/dist/guardrail/validate.d.ts.map +1 -1
- package/dist/guardrail/validate.js +13 -0
- package/dist/guardrail/validate.js.map +1 -1
- package/dist/install/lockfile.d.ts +79 -0
- package/dist/install/lockfile.d.ts.map +1 -0
- package/dist/install/lockfile.js +155 -0
- package/dist/install/lockfile.js.map +1 -0
- package/dist/install/store.d.ts +13 -0
- package/dist/install/store.d.ts.map +1 -0
- package/dist/install/store.js +38 -0
- package/dist/install/store.js.map +1 -0
- package/dist/log.d.ts.map +1 -1
- package/dist/log.js +6 -1
- package/dist/log.js.map +1 -1
- package/dist/prompts/host.d.ts +4 -0
- package/dist/prompts/host.d.ts.map +1 -1
- package/dist/prompts/host.js.map +1 -1
- package/dist/prompts/index.d.ts +6 -0
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +16 -6
- package/dist/prompts/index.js.map +1 -1
- package/dist/prompts/library/defaults.generated.d.ts.map +1 -1
- package/dist/prompts/library/defaults.generated.js +22 -4
- package/dist/prompts/library/defaults.generated.js.map +1 -1
- package/dist/prompts/toolsMarker.d.ts +13 -0
- package/dist/prompts/toolsMarker.d.ts.map +1 -0
- package/dist/prompts/toolsMarker.js +21 -0
- package/dist/prompts/toolsMarker.js.map +1 -0
- package/dist/providers/gateway.d.ts +19 -1
- package/dist/providers/gateway.d.ts.map +1 -1
- package/dist/providers/gateway.js +33 -4
- package/dist/providers/gateway.js.map +1 -1
- package/dist/services.d.ts +13 -0
- package/dist/services.d.ts.map +1 -1
- package/dist/services.js +2 -0
- package/dist/services.js.map +1 -1
- package/dist/sessions/apiLeaseStore.d.ts +10 -0
- package/dist/sessions/apiLeaseStore.d.ts.map +1 -0
- package/dist/sessions/apiLeaseStore.js +41 -0
- package/dist/sessions/apiLeaseStore.js.map +1 -0
- package/dist/sessions/fileRecallStore.d.ts +33 -0
- package/dist/sessions/fileRecallStore.d.ts.map +1 -0
- package/dist/sessions/fileRecallStore.js +112 -0
- package/dist/sessions/fileRecallStore.js.map +1 -0
- package/dist/sessions/fileSessionStore.d.ts +20 -0
- package/dist/sessions/fileSessionStore.d.ts.map +1 -0
- package/dist/sessions/fileSessionStore.js +151 -0
- package/dist/sessions/fileSessionStore.js.map +1 -0
- package/dist/sessions/head.d.ts +90 -0
- package/dist/sessions/head.d.ts.map +1 -0
- package/dist/sessions/head.js +82 -0
- package/dist/sessions/head.js.map +1 -0
- package/dist/sessions/inflight.d.ts +58 -0
- package/dist/sessions/inflight.d.ts.map +1 -0
- package/dist/sessions/inflight.js +0 -0
- package/dist/sessions/inflight.js.map +1 -0
- package/dist/sessions/jsonl.d.ts +23 -0
- package/dist/sessions/jsonl.d.ts.map +1 -0
- package/dist/sessions/jsonl.js +52 -0
- package/dist/sessions/jsonl.js.map +1 -0
- package/dist/sessions/lease.d.ts +59 -0
- package/dist/sessions/lease.d.ts.map +1 -0
- package/dist/sessions/lease.js +115 -0
- package/dist/sessions/lease.js.map +1 -0
- package/dist/sessions/leaseStore.d.ts +46 -0
- package/dist/sessions/leaseStore.d.ts.map +1 -0
- package/dist/sessions/leaseStore.js +58 -0
- package/dist/sessions/leaseStore.js.map +1 -0
- package/dist/sessions/testFs.d.ts +5 -0
- package/dist/sessions/testFs.d.ts.map +1 -0
- package/dist/sessions/testFs.js +85 -0
- package/dist/sessions/testFs.js.map +1 -0
- package/dist/sessions/timeline.d.ts +134 -0
- package/dist/sessions/timeline.d.ts.map +1 -0
- package/dist/sessions/timeline.js +127 -0
- package/dist/sessions/timeline.js.map +1 -0
- package/dist/sidecar/host.d.ts +284 -2
- package/dist/sidecar/host.d.ts.map +1 -1
- package/dist/sidecar/host.js +725 -1
- package/dist/sidecar/host.js.map +1 -1
- package/dist/sidecar/server.d.ts +217 -2
- package/dist/sidecar/server.d.ts.map +1 -1
- package/dist/sidecar/server.js +828 -3
- package/dist/sidecar/server.js.map +1 -1
- package/dist/skills.d.ts +8 -3
- package/dist/skills.d.ts.map +1 -1
- package/dist/skills.js +71 -35
- package/dist/skills.js.map +1 -1
- package/dist/snapshot/effects.d.ts +69 -0
- package/dist/snapshot/effects.d.ts.map +1 -0
- package/dist/snapshot/effects.js +67 -0
- package/dist/snapshot/effects.js.map +1 -0
- package/dist/snapshot/manifest.d.ts +73 -0
- package/dist/snapshot/manifest.d.ts.map +1 -0
- package/dist/snapshot/manifest.js +141 -0
- package/dist/snapshot/manifest.js.map +1 -0
- package/dist/snapshot/tree.d.ts +62 -0
- package/dist/snapshot/tree.d.ts.map +1 -0
- package/dist/snapshot/tree.js +147 -0
- package/dist/snapshot/tree.js.map +1 -0
- package/dist/tools/builtins.d.ts +1 -0
- package/dist/tools/builtins.d.ts.map +1 -1
- package/dist/tools/builtins.js +150 -5
- package/dist/tools/builtins.js.map +1 -1
- package/dist/tools/files.d.ts.map +1 -1
- package/dist/tools/files.js +13 -0
- package/dist/tools/files.js.map +1 -1
- package/dist/tools/http.d.ts.map +1 -1
- package/dist/tools/http.js.map +1 -1
- package/dist/tools/namespaces.d.ts +1 -1
- package/dist/tools/namespaces.d.ts.map +1 -1
- package/dist/tools/namespaces.js +24 -0
- package/dist/tools/namespaces.js.map +1 -1
- package/dist/tools/todo.d.ts.map +1 -1
- package/dist/tools/todo.js +12 -0
- package/dist/tools/todo.js.map +1 -1
- package/package.json +26 -34
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
export const TOOL_STATUSES = ['executing', 'completed', 'failed', 'refused', 'unknown'];
|
|
2
|
+
/** The `k` these lines carry in SESSION.jsonl. Distinct from 'meta'/'turn' so the
|
|
3
|
+
* chat fold and this one can share a file and ignore each other. */
|
|
4
|
+
export const TIMELINE_KIND = 'tl';
|
|
5
|
+
export function encodeEntry(entry) {
|
|
6
|
+
return JSON.stringify({ k: TIMELINE_KIND, e: entry }) + '\n';
|
|
7
|
+
}
|
|
8
|
+
/** Payloads at or under this go inline; larger ones become a blob ref. Keeps a
|
|
9
|
+
* line bounded and the file readable (spec s4.3.1, decision 6). */
|
|
10
|
+
export const INLINE_LIMIT_BYTES = 4096;
|
|
11
|
+
/**
|
|
12
|
+
* Decide where a tool result lives.
|
|
13
|
+
*
|
|
14
|
+
* Measured in UTF-8 bytes, not characters: a 3000-character CJK result is ~9 KB
|
|
15
|
+
* on disk, and a limit that counts characters would quietly blow the bound it
|
|
16
|
+
* exists to hold.
|
|
17
|
+
*/
|
|
18
|
+
export function fitsInline(text, limit = INLINE_LIMIT_BYTES) {
|
|
19
|
+
return utf8Bytes(text) <= limit;
|
|
20
|
+
}
|
|
21
|
+
function utf8Bytes(s) {
|
|
22
|
+
// TextEncoder is present in node >= 11 and every browser we target; the manual
|
|
23
|
+
// fallback keeps this module usable in a bare test environment.
|
|
24
|
+
if (typeof TextEncoder !== 'undefined')
|
|
25
|
+
return new TextEncoder().encode(s).length;
|
|
26
|
+
let n = 0;
|
|
27
|
+
for (const ch of s) {
|
|
28
|
+
const c = ch.codePointAt(0) ?? 0;
|
|
29
|
+
n += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;
|
|
30
|
+
}
|
|
31
|
+
return n;
|
|
32
|
+
}
|
|
33
|
+
/** A tool call carrying its result in the right place. Throws rather than
|
|
34
|
+
* silently storing both, because "exactly one is non-null" is the invariant every
|
|
35
|
+
* reader depends on. */
|
|
36
|
+
export function withResult(entry, result) {
|
|
37
|
+
if ('inline' in result && 'ref' in result)
|
|
38
|
+
throw new Error('a tool result is inline or a ref, never both');
|
|
39
|
+
return 'inline' in result
|
|
40
|
+
? { ...entry, resultInline: result.inline, resultRef: null }
|
|
41
|
+
: { ...entry, resultRef: result.ref, resultInline: null };
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Fold a SESSION.jsonl text into the timeline.
|
|
45
|
+
*
|
|
46
|
+
* Unparseable lines are skipped, exactly as the chat fold does, so a crash
|
|
47
|
+
* mid-append costs the final line and nothing else. Later lines at the same index
|
|
48
|
+
* supersede earlier ones, which is how a tool call moves
|
|
49
|
+
* executing -> completed without ever editing a byte.
|
|
50
|
+
*
|
|
51
|
+
* Compaction is applied on READ: entries covered by a `summary` are dropped from
|
|
52
|
+
* the result, while their indices stay reserved. The raw span is still in the
|
|
53
|
+
* file and still in the blob store, so nothing is lost — the fold just stops
|
|
54
|
+
* handing it to the model.
|
|
55
|
+
*/
|
|
56
|
+
export function foldTimeline(text) {
|
|
57
|
+
const byIndex = new Map();
|
|
58
|
+
let highest = -1;
|
|
59
|
+
for (const raw of text.split('\n')) {
|
|
60
|
+
const s = raw.trim();
|
|
61
|
+
if (!s)
|
|
62
|
+
continue;
|
|
63
|
+
let line;
|
|
64
|
+
try {
|
|
65
|
+
line = JSON.parse(s);
|
|
66
|
+
}
|
|
67
|
+
catch {
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
if (line.k !== TIMELINE_KIND)
|
|
71
|
+
continue;
|
|
72
|
+
const e = line.e;
|
|
73
|
+
if (!e || typeof e !== 'object')
|
|
74
|
+
continue;
|
|
75
|
+
if (!Number.isInteger(e.index) || e.index < 0 || typeof e.type !== 'string')
|
|
76
|
+
continue;
|
|
77
|
+
byIndex.set(e.index, e);
|
|
78
|
+
if (e.index > highest)
|
|
79
|
+
highest = e.index;
|
|
80
|
+
}
|
|
81
|
+
// Compaction is applied last, so a summary can supersede entries that were
|
|
82
|
+
// themselves superseded earlier in the file.
|
|
83
|
+
const covered = new Set();
|
|
84
|
+
for (const e of byIndex.values()) {
|
|
85
|
+
if (e.type !== 'summary')
|
|
86
|
+
continue;
|
|
87
|
+
const { from, to } = e.replaces;
|
|
88
|
+
if (!Number.isInteger(from) || !Number.isInteger(to) || to < from)
|
|
89
|
+
continue;
|
|
90
|
+
for (let i = from; i <= to; i++)
|
|
91
|
+
if (i !== e.index)
|
|
92
|
+
covered.add(i);
|
|
93
|
+
}
|
|
94
|
+
const entries = [...byIndex.entries()]
|
|
95
|
+
.filter(([i]) => !covered.has(i))
|
|
96
|
+
.sort((a, b) => a[0] - b[0])
|
|
97
|
+
.map(([, e]) => e);
|
|
98
|
+
return { entries, nextIndex: highest + 1 };
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Build the summary entry that compacts a span.
|
|
102
|
+
*
|
|
103
|
+
* Refuses to swallow a `tool_call`: those carry replay semantics (s4.4), and a
|
|
104
|
+
* compaction that dropped one would make resume unable to tell whether the call
|
|
105
|
+
* ran. Summarizing prose is a size optimization; summarizing away a side effect
|
|
106
|
+
* is data loss.
|
|
107
|
+
*/
|
|
108
|
+
export function compactSpan(input) {
|
|
109
|
+
const swallowed = input.entries.filter((e) => e.index >= input.from && e.index <= input.to && e.type === 'tool_call');
|
|
110
|
+
if (swallowed.length) {
|
|
111
|
+
throw new Error(`compaction would drop ${swallowed.length} tool_call entr${swallowed.length === 1 ? 'y' : 'ies'}; they carry replay semantics`);
|
|
112
|
+
}
|
|
113
|
+
if (input.index <= input.to) {
|
|
114
|
+
// The summary must sit after the span it replaces, or the fold would see it
|
|
115
|
+
// covering itself and the indices would stop being monotonic.
|
|
116
|
+
throw new Error('a summary must take an index after the span it replaces');
|
|
117
|
+
}
|
|
118
|
+
return {
|
|
119
|
+
index: input.index,
|
|
120
|
+
at: input.at,
|
|
121
|
+
type: 'summary',
|
|
122
|
+
replaces: { from: input.from, to: input.to },
|
|
123
|
+
spanRef: input.spanRef,
|
|
124
|
+
content: input.content,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
//# sourceMappingURL=timeline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeline.js","sourceRoot":"","sources":["../../sessions/timeline.ts"],"names":[],"mappings":"AAyCA,MAAM,CAAC,MAAM,aAAa,GAA0B,CAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;AAmC/G;oEACoE;AACpE,MAAM,CAAC,MAAM,aAAa,GAAG,IAAa,CAAC;AAI3C,MAAM,UAAU,WAAW,CAAC,KAAoB;IAC9C,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;AAC/D,CAAC;AAED;mEACmE;AACnE,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAEvC;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,KAAK,GAAG,kBAAkB;IACjE,OAAO,SAAS,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC;AAClC,CAAC;AAED,SAAS,SAAS,CAAC,CAAS;IAC1B,+EAA+E;IAC/E,gEAAgE;IAChE,IAAI,OAAO,WAAW,KAAK,WAAW;QAAE,OAAO,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IAClF,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,KAAK,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC;QACnB,MAAM,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC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entTool, IMemoryProvider, IKeyValueStore, ISearchProvider, ISessionStore, PermissionRequest, AskQuestion, AskAnswers } from '@corenel/protocol';
|
|
1
|
+
import type { AgentTool, IMemoryProvider, IKeyValueStore, ISearchProvider, ISessionStore, PermissionRequest, AskQuestion, AskAnswers, AgentEvent, PermissionDecision, DaemonRunActivity, DaemonRegistration, ProcInfo, RunRecordInfo, SessionInfo, SessionRepoSpec, SessionSnapshotInfo } from '@corenel/protocol';
|
|
2
2
|
import type { FileService } from '@corenel/protocol';
|
|
3
|
-
import { type SidecarChannel } from '@corenel/protocol';
|
|
3
|
+
import { type SidecarChannel, type SidecarInfo, type AcpPromptPart, type AcpModeInfo, type AcpStartOptions } from '@corenel/protocol';
|
|
4
4
|
/** The host's live capabilities a connected sidecar may proxy into. Only the ones
|
|
5
5
|
* provided are reachable; a proxy call to a missing one is rejected. */
|
|
6
6
|
export interface HostProviders {
|
|
@@ -20,6 +20,21 @@ export interface SidecarHostOptions {
|
|
|
20
20
|
/** Pairing token presented to the sidecar (surface B — authenticates the
|
|
21
21
|
* connection; does NOT grant policy authority, which stays with the host). */
|
|
22
22
|
token: string;
|
|
23
|
+
/** The host's dot-dir name (e.g. '.corenel', '.prompd'), sent informationally in
|
|
24
|
+
* `hello` so the sidecar knows it for future workspace-state features. */
|
|
25
|
+
stateDir?: string;
|
|
26
|
+
/** The sidecar's working-directory set changed (a client added one). Carries the
|
|
27
|
+
* COMPLETE set, which REPLACES what the host holds -- never append. Fires on any
|
|
28
|
+
* connected client's add, not just this one's, so two browsers stay in agreement. */
|
|
29
|
+
onRoots?: (s: {
|
|
30
|
+
root: string;
|
|
31
|
+
roots: string[];
|
|
32
|
+
}) => void;
|
|
33
|
+
/** This client's durable identity, sent in `hello` so the sidecar can record
|
|
34
|
+
* who connected (routing Slice-2 sync). Additive: omitting them just means the
|
|
35
|
+
* sidecar records no host entry for this connection. */
|
|
36
|
+
clientId?: string;
|
|
37
|
+
clientName?: string;
|
|
23
38
|
/** The host's live stores. Only the ones provided are reachable; a proxy call
|
|
24
39
|
* to a missing provider is rejected. */
|
|
25
40
|
providers: HostProviders;
|
|
@@ -27,6 +42,54 @@ export interface SidecarHostOptions {
|
|
|
27
42
|
registerTool: (tool: AgentTool) => void;
|
|
28
43
|
/** Remove a proxy tool on disconnect (wire to `unregisterTool`). */
|
|
29
44
|
unregisterTool?: (name: string) => void;
|
|
45
|
+
/** The daemon relayed a permission ask from its attendance registry — surface it
|
|
46
|
+
* to the app so it can prompt the user. */
|
|
47
|
+
onPermissionAsk?: (ask: {
|
|
48
|
+
id: number;
|
|
49
|
+
runId: string;
|
|
50
|
+
agent: string;
|
|
51
|
+
tool: string;
|
|
52
|
+
input: unknown;
|
|
53
|
+
deadline: number;
|
|
54
|
+
}) => void;
|
|
55
|
+
/** The daemon resolved an outstanding ask — server-driven, so this fires
|
|
56
|
+
* whether THIS client answered, another connected client answered first, or the
|
|
57
|
+
* daemon timed/unattended it out. The app must drop the prompt on this event,
|
|
58
|
+
* not on its own click. */
|
|
59
|
+
onPermissionResolved?: (e: {
|
|
60
|
+
id: number;
|
|
61
|
+
decision: PermissionDecision;
|
|
62
|
+
by: 'client' | 'timeout' | 'unattended';
|
|
63
|
+
}) => void;
|
|
64
|
+
/** A daemon-side run started (no `endedAt`) or settled. Broadcast to every
|
|
65
|
+
* connected client, like a permission ask: a trigger-fired run has nobody
|
|
66
|
+
* watching, so this is the ONLY way a browser learns it happened. */
|
|
67
|
+
onRunActivity?: (activity: DaemonRunActivity) => void;
|
|
68
|
+
/** The COMPLETE set of agents the daemon will fire. Replaces the receiver's
|
|
69
|
+
* previous set - never merge, or an agent deleted on the daemon would live
|
|
70
|
+
* forever in a client that was connected when it went. */
|
|
71
|
+
onRegistrations?: (list: DaemonRegistration[]) => void;
|
|
72
|
+
}
|
|
73
|
+
/** What a caller wants to hear about one process. Both handlers are optional:
|
|
74
|
+
* a client that only wants to know when a build finishes should not have to
|
|
75
|
+
* accept its output. */
|
|
76
|
+
/** What a caller wants to hear about one session. Both optional: a client that
|
|
77
|
+
* only wants metrics should not have to accept logs. */
|
|
78
|
+
export interface SessionWatcher {
|
|
79
|
+
onMetrics?: (sample: unknown) => void;
|
|
80
|
+
onLog?: (line: string) => void;
|
|
81
|
+
}
|
|
82
|
+
export interface ProcWatcher {
|
|
83
|
+
onOut?: (chunk: {
|
|
84
|
+
seq: number;
|
|
85
|
+
stream: 'out' | 'err';
|
|
86
|
+
text: string;
|
|
87
|
+
}) => void;
|
|
88
|
+
/** Fires exactly once, then the watcher is dropped. */
|
|
89
|
+
onExit?: (end: {
|
|
90
|
+
code: number | null;
|
|
91
|
+
signal?: string;
|
|
92
|
+
}) => void;
|
|
30
93
|
}
|
|
31
94
|
export declare class SidecarHost {
|
|
32
95
|
private readonly ch;
|
|
@@ -35,7 +98,27 @@ export declare class SidecarHost {
|
|
|
35
98
|
private readonly invokePending;
|
|
36
99
|
private httpSeq;
|
|
37
100
|
private readonly httpPending;
|
|
101
|
+
private runSeq;
|
|
102
|
+
private readonly runPending;
|
|
103
|
+
private acpSeq;
|
|
104
|
+
private readonly acpPending;
|
|
105
|
+
private syncSeq;
|
|
106
|
+
private readonly syncPending;
|
|
107
|
+
private rootsSeq;
|
|
108
|
+
private readonly rootsPending;
|
|
109
|
+
private procSeq;
|
|
110
|
+
private readonly procPending;
|
|
111
|
+
/** Watchers by procId, NOT by request id: a process outlives the request that
|
|
112
|
+
* spawned it, and the same process can be watched by a spawn and later by a
|
|
113
|
+
* reattach. Keyed by the only durable identity there is. */
|
|
114
|
+
private readonly procWatchers;
|
|
115
|
+
private sessionSeq;
|
|
116
|
+
private readonly sessionPending;
|
|
117
|
+
/** Per-session stream handlers, keyed by session because a session outlives
|
|
118
|
+
* the request that started watching it. */
|
|
119
|
+
private readonly sessionWatchers;
|
|
38
120
|
private features;
|
|
121
|
+
private info;
|
|
39
122
|
private readonly imported;
|
|
40
123
|
private welcome;
|
|
41
124
|
constructor(opts: SidecarHostOptions);
|
|
@@ -47,6 +130,141 @@ export declare class SidecarHost {
|
|
|
47
130
|
private onMessage;
|
|
48
131
|
/** Whether the connected sidecar advertised the loopback HTTP proxy. */
|
|
49
132
|
supportsHttpProxy(): boolean;
|
|
133
|
+
/** Everything the sidecar advertised. A copy — the internal list must not be
|
|
134
|
+
* mutable from outside. For surfaces that SHOW capabilities; code that DEPENDS
|
|
135
|
+
* on one should use the specific supportsX() so the feature name lives here. */
|
|
136
|
+
advertisedFeatures(): string[];
|
|
137
|
+
/** Whether the connected sidecar advertised a wired crew runner — i.e. it can
|
|
138
|
+
* actually fire daemon-tier triggers (schedule/continuous/self-directed) on its
|
|
139
|
+
* own clock, not just serve tools. */
|
|
140
|
+
supportsRunner(): boolean;
|
|
141
|
+
/** True when the daemon was started with --acp and can proxy an external
|
|
142
|
+
* agent. A client must check this before offering the surface: a daemon
|
|
143
|
+
* without it answers acp-start with an error. */
|
|
144
|
+
supportsAcp(): boolean;
|
|
145
|
+
/** True when the daemon can run long-lived processes - i.e. the operator
|
|
146
|
+
* allowed shell. A client MUST check this before offering the surface: a
|
|
147
|
+
* daemon without it answers every proc message with an error. */
|
|
148
|
+
supportsProcs(): boolean;
|
|
149
|
+
/** Start a long-running command on the sidecar and stream its output.
|
|
150
|
+
*
|
|
151
|
+
* This is the counterpart to the one-shot `sidecar_shell_exec` tool, not a
|
|
152
|
+
* replacement: use the tool when you want the result of something that
|
|
153
|
+
* finishes, and this when you want to WATCH something that may not.
|
|
154
|
+
*
|
|
155
|
+
* The returned promise settles on the spawn, not on the exit - the process is
|
|
156
|
+
* still running when it resolves. `watch` keeps receiving output until
|
|
157
|
+
* `onExit`, which fires exactly once.
|
|
158
|
+
*/
|
|
159
|
+
procSpawn(command: string, watch?: ProcWatcher, opts?: {
|
|
160
|
+
cwd?: string;
|
|
161
|
+
root?: string;
|
|
162
|
+
label?: string;
|
|
163
|
+
}): Promise<ProcInfo>;
|
|
164
|
+
/** Re-attach to a process the daemon is already running - after a reload, or
|
|
165
|
+
* from a second tab. `sinceSeq` is the last chunk this client already has, so
|
|
166
|
+
* the replay is exactly the rest; omit it to replay the whole buffered tail.
|
|
167
|
+
*
|
|
168
|
+
* `truncated` in the result means the daemon's tail no longer reaches back to
|
|
169
|
+
* where you were: there is a GAP, and a UI that renders the replay as if it
|
|
170
|
+
* were continuous would be lying about what the process printed. */
|
|
171
|
+
procAttach(procId: string, watch?: ProcWatcher, sinceSeq?: number): Promise<{
|
|
172
|
+
proc: ProcInfo;
|
|
173
|
+
truncated: boolean;
|
|
174
|
+
}>;
|
|
175
|
+
/** Everything the daemon is running, or recently ran. Called on attach: a
|
|
176
|
+
* process nobody can see is worse than one that died. */
|
|
177
|
+
procList(): Promise<ProcInfo[]>;
|
|
178
|
+
/** Write to a running process's stdin. */
|
|
179
|
+
procInput(procId: string, text: string): Promise<void>;
|
|
180
|
+
/** Stop a process. Idempotent on the daemon side. */
|
|
181
|
+
procKill(procId: string): Promise<void>;
|
|
182
|
+
/** Stop receiving a process's output without stopping the process. */
|
|
183
|
+
procUnwatch(procId: string, watch: ProcWatcher): void;
|
|
184
|
+
private addProcWatcher;
|
|
185
|
+
/** True when the daemon runs sessions at all. A client MUST check this before
|
|
186
|
+
* offering the surface: a daemon without it answers every session message
|
|
187
|
+
* with an error. */
|
|
188
|
+
supportsSessions(): boolean;
|
|
189
|
+
/**
|
|
190
|
+
* Whether the OPERATOR allowed run transcripts to be kept at all.
|
|
191
|
+
*
|
|
192
|
+
* False means no run on this daemon can be recorded however it asks, so a
|
|
193
|
+
* surface must not offer the choice — a control that cannot be honoured is
|
|
194
|
+
* worse than an absent one. True does NOT mean recording is on: each run
|
|
195
|
+
* still opts in (`run(..., { keepTranscript: true })`).
|
|
196
|
+
*/
|
|
197
|
+
supportsKeepTranscripts(): boolean;
|
|
198
|
+
/** Every session the daemon knows about. */
|
|
199
|
+
sessionList(): Promise<SessionInfo[]>;
|
|
200
|
+
/**
|
|
201
|
+
* Create a session on a directory, or FROM a repository.
|
|
202
|
+
*
|
|
203
|
+
* Exactly one of `workdir` and `repo`. With `repo` the daemon clones on its
|
|
204
|
+
* own host, using its own git credentials, and mounts the result — which is
|
|
205
|
+
* why the caller cannot name the directory: it does not exist yet. The
|
|
206
|
+
* returned SessionInfo carries `source` with the resolved commit.
|
|
207
|
+
*/
|
|
208
|
+
sessionCreate(spec: {
|
|
209
|
+
workdir?: string;
|
|
210
|
+
repo?: SessionRepoSpec;
|
|
211
|
+
owner?: string;
|
|
212
|
+
fromSnapshot?: string;
|
|
213
|
+
}): Promise<SessionInfo>;
|
|
214
|
+
/**
|
|
215
|
+
* Whether this daemon can create a session FROM a repository.
|
|
216
|
+
*
|
|
217
|
+
* False means the operator declared no `--clone-under` directory, so there is
|
|
218
|
+
* nowhere a checkout could be written and the option must not be offered.
|
|
219
|
+
*/
|
|
220
|
+
supportsSessionClone(): boolean;
|
|
221
|
+
/**
|
|
222
|
+
* Pause a session, and learn whether it actually drained.
|
|
223
|
+
*
|
|
224
|
+
* `drained: false` means work was STILL RUNNING when the wait gave up. A
|
|
225
|
+
* caller about to capture needs that: it is the difference between a snapshot
|
|
226
|
+
* and a torn one.
|
|
227
|
+
*/
|
|
228
|
+
sessionPause(sessionId: string, drainMs?: number): Promise<{
|
|
229
|
+
drained: boolean;
|
|
230
|
+
remaining: string[];
|
|
231
|
+
}>;
|
|
232
|
+
sessionResume(sessionId: string): Promise<void>;
|
|
233
|
+
sessionDestroy(sessionId: string): Promise<void>;
|
|
234
|
+
sessionCommit(sessionId: string, name?: string): Promise<SessionSnapshotInfo>;
|
|
235
|
+
/**
|
|
236
|
+
* One agent's finished runs, newest first, as the DAEMON recorded them.
|
|
237
|
+
*
|
|
238
|
+
* The durable counterpart to the live `run-activity` broadcasts: those say
|
|
239
|
+
* what is happening while this browser is attached and are lost on
|
|
240
|
+
* disconnect, this says what happened at all. Scoped to this client by the
|
|
241
|
+
* daemon, from the identity the connection authenticated with.
|
|
242
|
+
*
|
|
243
|
+
* An empty list means no record, which a caller renders rather than treats
|
|
244
|
+
* as an error — a daemon that keeps none is a normal daemon.
|
|
245
|
+
*/
|
|
246
|
+
runHistory(agent: string, limit?: number): Promise<RunRecordInfo[]>;
|
|
247
|
+
/**
|
|
248
|
+
* One run's kept events, as the daemon stored them.
|
|
249
|
+
*
|
|
250
|
+
* Empty means the words were never kept — the default, since transcripts are
|
|
251
|
+
* opt-in. A caller decides what to show from `RunRecordInfo.transcript`,
|
|
252
|
+
* which says whether there was ever anything to fetch.
|
|
253
|
+
*/
|
|
254
|
+
runTranscript(agent: string, runId: string): Promise<unknown[]>;
|
|
255
|
+
/** Every capture this daemon could restore from, newest first.
|
|
256
|
+
*
|
|
257
|
+
* An empty list is a real answer — a daemon whose backend cannot capture has
|
|
258
|
+
* nothing to restore from — so a caller uses the length to decide whether to
|
|
259
|
+
* offer the choice, not to detect a failure. */
|
|
260
|
+
sessionSnapshots(): Promise<SessionSnapshotInfo[]>;
|
|
261
|
+
/** Start receiving a session's metrics and logs. */
|
|
262
|
+
sessionWatch(sessionId: string, watch: SessionWatcher): Promise<void>;
|
|
263
|
+
sessionUnwatch(sessionId: string): Promise<void>;
|
|
264
|
+
private sessionCall;
|
|
265
|
+
/** The sidecar's advertised self-description (root/platform), or {} if it sent
|
|
266
|
+
* none. Valid only after connect() resolves. */
|
|
267
|
+
sidecarInfo(): SidecarInfo;
|
|
50
268
|
/** Fetch a (loopback) URL THROUGH the sidecar — a server-side fetch on the user's
|
|
51
269
|
* machine, so the browser dodges CORS. Returns a streaming Response: it resolves
|
|
52
270
|
* as soon as headers arrive (http-res) and the body streams in via http-chunk. */
|
|
@@ -56,6 +274,70 @@ export declare class SidecarHost {
|
|
|
56
274
|
headers: Record<string, string>;
|
|
57
275
|
body?: string;
|
|
58
276
|
}): Promise<Response>;
|
|
277
|
+
/** Command the sidecar to run a crew agent, streaming its lifecycle events to
|
|
278
|
+
* `onEvent` as they arrive. Resolves once the run completes (`run-done`) with
|
|
279
|
+
* the daemon-assigned runId, final text, and stop reason; rejects on
|
|
280
|
+
* `run-error` or if the connection drops while the run is in flight. */
|
|
281
|
+
run(agent: string, input: string, onEvent: (e: AgentEvent) => void, opts?: {
|
|
282
|
+
sessionId?: string;
|
|
283
|
+
/** Ask the daemon to KEEP this run's words. A request inside the
|
|
284
|
+
* operator's boundary: a daemon that did not permit transcripts keeps
|
|
285
|
+
* nothing regardless, so this can only ever narrow, never widen. Check
|
|
286
|
+
* `supportsKeepTranscripts()` before offering the choice. */
|
|
287
|
+
keepTranscript?: boolean;
|
|
288
|
+
}): Promise<{
|
|
289
|
+
runId: string;
|
|
290
|
+
text: string;
|
|
291
|
+
stopReason: string;
|
|
292
|
+
}>;
|
|
293
|
+
/** Start a proxied external ACP agent on the sidecar. The returned promise
|
|
294
|
+
* settles on the handshake; `onUpdate` keeps receiving the agent's stream for
|
|
295
|
+
* the life of the session. Permission asks do NOT come through here — they use
|
|
296
|
+
* the existing permission-ask broadcast, the same path a crew run uses. */
|
|
297
|
+
acpStart(target: string, onUpdate: (update: unknown) => void, opts?: AcpStartOptions): Promise<{
|
|
298
|
+
runId: string;
|
|
299
|
+
sessionId: string;
|
|
300
|
+
agent: string;
|
|
301
|
+
modes?: AcpModeInfo[];
|
|
302
|
+
currentModeId?: string;
|
|
303
|
+
resumed?: boolean;
|
|
304
|
+
}>;
|
|
305
|
+
/** Send one turn to the proxied agent. */
|
|
306
|
+
acpPrompt(text: string, content?: readonly AcpPromptPart[]): Promise<{
|
|
307
|
+
stopReason: string;
|
|
308
|
+
}>;
|
|
309
|
+
/** Switch the proxied agent's mode. Rejects when it does not offer that mode. */
|
|
310
|
+
acpSetMode(modeId: string): Promise<{
|
|
311
|
+
modeId: string;
|
|
312
|
+
}>;
|
|
313
|
+
/** Interrupt the current turn. Fire-and-forget, like cancel in ACP itself. */
|
|
314
|
+
acpCancel(): void;
|
|
315
|
+
/** Answer an outstanding permission ask. Fire-and-forget over the wire — the
|
|
316
|
+
* actual drop of the prompt is driven by the server's `permission-resolved`
|
|
317
|
+
* broadcast (`onPermissionResolved`), not by this call returning. */
|
|
318
|
+
answerPermission(id: number, decision: PermissionDecision): void;
|
|
319
|
+
/** Push one definition file's content to the daemon, to be persisted under
|
|
320
|
+
* this client's own `<stateDir>/hosts/<dirName>/` (Slice 2 host sync).
|
|
321
|
+
* Resolves on `host-sync-result { ok: true }`; rejects with the daemon's
|
|
322
|
+
* error, or on disconnect while in flight. */
|
|
323
|
+
hostSyncPut(path: string, content: string): Promise<void>;
|
|
324
|
+
/** Delete one definition file on the daemon side (reconcile). Same
|
|
325
|
+
* resolve/reject contract as `hostSyncPut`. Callers are responsible for
|
|
326
|
+
* confining `path` to definition, non-state paths BEFORE calling this --
|
|
327
|
+
* this method has no opinion on what `path` is. */
|
|
328
|
+
hostSyncDelete(path: string): Promise<void>;
|
|
329
|
+
/** True when the operator started the sidecar with --allow-add-under, so a client
|
|
330
|
+
* may add a working directory this session. Feature-detected from the welcome --
|
|
331
|
+
* an older sidecar simply never advertises it. */
|
|
332
|
+
canAddRoots(): boolean;
|
|
333
|
+
/** Directory NAMES under `path`, or the declared areas themselves when `path` is
|
|
334
|
+
* omitted. Names only: never files, contents or stats. Rejects with the sidecar's
|
|
335
|
+
* message (e.g. outside every allowed area). */
|
|
336
|
+
browseRoots(path?: string): Promise<string[]>;
|
|
337
|
+
/** Promote `path` to a working directory for the rest of the session. Resolves on
|
|
338
|
+
* acceptance -- the resulting set arrives separately via `onRoots`, broadcast to
|
|
339
|
+
* every connected client -- and rejects with the sidecar's refusal message. */
|
|
340
|
+
addRoot(path: string): Promise<void>;
|
|
59
341
|
private invoke;
|
|
60
342
|
/** Answer a sidecar's proxy-provider call from the host's live store. The
|
|
61
343
|
* allowlist (HOST_METHODS) is the least-privilege boundary — a sidecar can
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../sidecar/host.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,SAAS,EAAE,eAAe,EAAE,cAAc,EAAE,e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