@xenosystem/agent-interface-runtime 0.1.12
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/LICENSE +67 -0
- package/dist/cloudOptions.d.ts +28 -0
- package/dist/cloudOptions.d.ts.map +1 -0
- package/dist/cloudOptions.js +37 -0
- package/dist/cloudOptions.js.map +1 -0
- package/dist/composeHost.d.ts +171 -0
- package/dist/composeHost.d.ts.map +1 -0
- package/dist/composeHost.js +877 -0
- package/dist/composeHost.js.map +1 -0
- package/dist/detachedHostEntry.d.ts +51 -0
- package/dist/detachedHostEntry.d.ts.map +1 -0
- package/dist/detachedHostEntry.js +185 -0
- package/dist/detachedHostEntry.js.map +1 -0
- package/dist/hostLanePolicy.d.ts +122 -0
- package/dist/hostLanePolicy.d.ts.map +1 -0
- package/dist/hostLanePolicy.js +86 -0
- package/dist/hostLanePolicy.js.map +1 -0
- package/dist/hostServices.d.ts +56 -0
- package/dist/hostServices.d.ts.map +1 -0
- package/dist/hostServices.js +74 -0
- package/dist/hostServices.js.map +1 -0
- package/dist/hostSupervisorAdapter.d.ts +31 -0
- package/dist/hostSupervisorAdapter.d.ts.map +1 -0
- package/dist/hostSupervisorAdapter.js +59 -0
- package/dist/hostSupervisorAdapter.js.map +1 -0
- package/dist/node.d.ts +7 -0
- package/dist/node.d.ts.map +1 -0
- package/dist/node.js +7 -0
- package/dist/node.js.map +1 -0
- package/dist/observationConfig.d.ts +45 -0
- package/dist/observationConfig.d.ts.map +1 -0
- package/dist/observationConfig.js +78 -0
- package/dist/observationConfig.js.map +1 -0
- package/package.json +44 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composeHost.js","sourceRoot":"","sources":["../src/composeHost.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,OAAO,EACL,oCAAoC,EACpC,gCAAgC,GACjC,MAAM,sCAAs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YAAY,CAAC,EAAE;QAC5D,mBAAmB,EAAE,YAAY,CAAC,YAAY;QAC9C,MAAM;QACN,GAAG,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,qBAAqB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC5D,CAAC,CAAA;IACF,OAAO,CAAC,WAAW,EAAE,aAAa,EAAE,GAAG,YAAY,CAAC,CAAA;AACtD,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shared detached Agent host, as a process โ ADE ยง9 step 3.
|
|
3
|
+
*
|
|
4
|
+
* This is the piece the plan called "the child ENTRY POINT", and it is the last
|
|
5
|
+
* thing standing between a built-and-tested detached host and a running one.
|
|
6
|
+
* Everything it composes already existed: `runDetachedAgentHost` owns election
|
|
7
|
+
* and lifecycle, `composeAgentHost` builds the host, and
|
|
8
|
+
* `DetachedHostSupervisor` spawns and watches. Nothing called them together.
|
|
9
|
+
*
|
|
10
|
+
* ๐ด **It composes with NO Electron surface at all** โ `surface: {}`. That is
|
|
11
|
+
* not a limitation being worked around; it is the reason a detached host is
|
|
12
|
+
* possible. `HostSurfaceCapabilities` has no required fields, so an absent
|
|
13
|
+
* capability becomes a lane declared unrunnable WITH A REASON rather than a
|
|
14
|
+
* lane that accepts work and fails at turn time. A user told "sdk-native is not
|
|
15
|
+
* available in the background host" can act on that; one whose turn dies
|
|
16
|
+
* halfway cannot.
|
|
17
|
+
*
|
|
18
|
+
* ๐ด **Demotion is a FAILURE here, not a fallback.** `startLocalAgentHostAuthority`
|
|
19
|
+
* is deliberately forgiving โ become a client if someone else holds the lease โ
|
|
20
|
+
* which is right for a GUI and catastrophic for a service whose only purpose is
|
|
21
|
+
* to BE the host: it would start cleanly, report healthy, own nothing, serve
|
|
22
|
+
* nothing, and be restarted forever by a supervisor that believed it.
|
|
23
|
+
*
|
|
24
|
+
* Adopted 2026-08-27. The standalone build emits this entry and Hub/Shell emit
|
|
25
|
+
* the same package entry as a second main-process artifact. The shared adapter
|
|
26
|
+
* starts it only when attachment proves no compatible owner is already live.
|
|
27
|
+
*
|
|
28
|
+
* @unwired-by-design This is a process entry point, not an imported library
|
|
29
|
+
* module. Electron Vite resolves the package's `detached-entry` export and
|
|
30
|
+
* emits it as a second main-process artifact in the standalone app, Hub, and
|
|
31
|
+
* Shell; `ensureSharedAgentHost` then spawns that built file by path. The
|
|
32
|
+
* source import graph therefore cannot reach this module by construction.
|
|
33
|
+
*
|
|
34
|
+
* ## Protocol
|
|
35
|
+
*
|
|
36
|
+
* One JSON object per line on stdout. The supervisor reads line-delimited
|
|
37
|
+
* precisely so this process may log freely; only the `โฆ-ready` line is
|
|
38
|
+
* significant, and only the first one.
|
|
39
|
+
*/
|
|
40
|
+
interface EntryConfig {
|
|
41
|
+
homeDirectory: string;
|
|
42
|
+
hostVersion: string;
|
|
43
|
+
hostInstanceId: string;
|
|
44
|
+
fixtureBaseDirectory: string;
|
|
45
|
+
}
|
|
46
|
+
export declare function readEntryConfig(env: NodeJS.ProcessEnv): EntryConfig | {
|
|
47
|
+
error: string;
|
|
48
|
+
};
|
|
49
|
+
export declare function runDetachedHostEntry(env: NodeJS.ProcessEnv, write: (line: string) => void): Promise<number>;
|
|
50
|
+
export {};
|
|
51
|
+
//# sourceMappingURL=detachedHostEntry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detachedHostEntry.d.ts","sourceRoot":"","sources":["../src/detachedHostEntry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAcH,UAAU,WAAW;IACnB,aAAa,EAAE,MAAM,CAAA;IACrB,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,EAAE,MAAM,CAAA;IACtB,oBAAoB,EAAE,MAAM,CAAA;CAC7B;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,WAAW,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAwBvF;AAED,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,MAAM,CAAC,UAAU,EACtB,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC5B,OAAO,CAAC,MAAM,CAAC,CA6EjB"}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shared detached Agent host, as a process โ ADE ยง9 step 3.
|
|
3
|
+
*
|
|
4
|
+
* This is the piece the plan called "the child ENTRY POINT", and it is the last
|
|
5
|
+
* thing standing between a built-and-tested detached host and a running one.
|
|
6
|
+
* Everything it composes already existed: `runDetachedAgentHost` owns election
|
|
7
|
+
* and lifecycle, `composeAgentHost` builds the host, and
|
|
8
|
+
* `DetachedHostSupervisor` spawns and watches. Nothing called them together.
|
|
9
|
+
*
|
|
10
|
+
* ๐ด **It composes with NO Electron surface at all** โ `surface: {}`. That is
|
|
11
|
+
* not a limitation being worked around; it is the reason a detached host is
|
|
12
|
+
* possible. `HostSurfaceCapabilities` has no required fields, so an absent
|
|
13
|
+
* capability becomes a lane declared unrunnable WITH A REASON rather than a
|
|
14
|
+
* lane that accepts work and fails at turn time. A user told "sdk-native is not
|
|
15
|
+
* available in the background host" can act on that; one whose turn dies
|
|
16
|
+
* halfway cannot.
|
|
17
|
+
*
|
|
18
|
+
* ๐ด **Demotion is a FAILURE here, not a fallback.** `startLocalAgentHostAuthority`
|
|
19
|
+
* is deliberately forgiving โ become a client if someone else holds the lease โ
|
|
20
|
+
* which is right for a GUI and catastrophic for a service whose only purpose is
|
|
21
|
+
* to BE the host: it would start cleanly, report healthy, own nothing, serve
|
|
22
|
+
* nothing, and be restarted forever by a supervisor that believed it.
|
|
23
|
+
*
|
|
24
|
+
* Adopted 2026-08-27. The standalone build emits this entry and Hub/Shell emit
|
|
25
|
+
* the same package entry as a second main-process artifact. The shared adapter
|
|
26
|
+
* starts it only when attachment proves no compatible owner is already live.
|
|
27
|
+
*
|
|
28
|
+
* @unwired-by-design This is a process entry point, not an imported library
|
|
29
|
+
* module. Electron Vite resolves the package's `detached-entry` export and
|
|
30
|
+
* emits it as a second main-process artifact in the standalone app, Hub, and
|
|
31
|
+
* Shell; `ensureSharedAgentHost` then spawns that built file by path. The
|
|
32
|
+
* source import graph therefore cannot reach this module by construction.
|
|
33
|
+
*
|
|
34
|
+
* ## Protocol
|
|
35
|
+
*
|
|
36
|
+
* One JSON object per line on stdout. The supervisor reads line-delimited
|
|
37
|
+
* precisely so this process may log freely; only the `โฆ-ready` line is
|
|
38
|
+
* significant, and only the first one.
|
|
39
|
+
*/
|
|
40
|
+
import { resolveLocalAgentHostPaths, runDetachedAgentHost, } from '@xenosystem/agent-interface-host/node';
|
|
41
|
+
import { realpathSync } from 'node:fs';
|
|
42
|
+
import { fileURLToPath } from 'node:url';
|
|
43
|
+
import { composeAgentHost } from './composeHost.js';
|
|
44
|
+
/** Exactly the shape `DetachedHostSupervisor` parses. Do not improvise it. */
|
|
45
|
+
const READY = 'xeno-agent-detached-host-ready';
|
|
46
|
+
export function readEntryConfig(env) {
|
|
47
|
+
const homeDirectory = env.XENO_AGENT_DETACHED_HOME;
|
|
48
|
+
const hostVersion = env.XENO_AGENT_DETACHED_VERSION;
|
|
49
|
+
const hostInstanceId = env.XENO_AGENT_DETACHED_INSTANCE;
|
|
50
|
+
// Named individually. "bad config" sends a reader to read the source; naming
|
|
51
|
+
// the variable is the difference between a two-minute fix and an hour.
|
|
52
|
+
const missing = [
|
|
53
|
+
homeDirectory ? null : 'XENO_AGENT_DETACHED_HOME',
|
|
54
|
+
hostVersion ? null : 'XENO_AGENT_DETACHED_VERSION',
|
|
55
|
+
hostInstanceId ? null : 'XENO_AGENT_DETACHED_INSTANCE',
|
|
56
|
+
].filter((name) => name !== null);
|
|
57
|
+
if (missing.length > 0) {
|
|
58
|
+
return { error: `The detached Agent host needs ${missing.join(', ')} in its environment.` };
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
homeDirectory: homeDirectory,
|
|
62
|
+
hostVersion: hostVersion,
|
|
63
|
+
hostInstanceId: hostInstanceId,
|
|
64
|
+
// Only consulted when the fixture is enabled; defaulting to the home
|
|
65
|
+
// directory keeps the required set to the three that always matter.
|
|
66
|
+
fixtureBaseDirectory: env.XENO_AGENT_DETACHED_FIXTURE_BASE || homeDirectory,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export async function runDetachedHostEntry(env, write) {
|
|
70
|
+
const config = readEntryConfig(env);
|
|
71
|
+
if ('error' in config) {
|
|
72
|
+
write(JSON.stringify({ type: 'xeno-agent-detached-host-failed', reason: config.error }));
|
|
73
|
+
return 1;
|
|
74
|
+
}
|
|
75
|
+
let composition;
|
|
76
|
+
try {
|
|
77
|
+
// The authority needs its root BEFORE it can elect an owner, and the
|
|
78
|
+
// composition resolves the same paths from the same inputs. Resolving twice
|
|
79
|
+
// from one function is deliberate: passing a second, independently computed
|
|
80
|
+
// root is how a service ends up holding a lease in one directory while
|
|
81
|
+
// writing its state to another.
|
|
82
|
+
const paths = resolveLocalAgentHostPaths({
|
|
83
|
+
homeDirectory: config.homeDirectory,
|
|
84
|
+
...(env.XENO_AGENT_HOST_ROOT ? { hostRootDirectory: env.XENO_AGENT_HOST_ROOT } : {}),
|
|
85
|
+
});
|
|
86
|
+
const handle = await runDetachedAgentHost({
|
|
87
|
+
rootDirectory: paths.hostRootDirectory,
|
|
88
|
+
instanceId: config.hostInstanceId,
|
|
89
|
+
// Composed lazily, INSIDE the authority: losing the election must not
|
|
90
|
+
// leave a fully built host โ with its SQLite handle open โ belonging to a
|
|
91
|
+
// process that is about to refuse to run.
|
|
92
|
+
createHostTransport: async () => {
|
|
93
|
+
composition = await composeAgentHost({ ...config, surface: {}, env });
|
|
94
|
+
// Created HERE and nowhere else: this callback runs only for the process
|
|
95
|
+
// that won the lease, which is exactly the contract `createCoordinator`
|
|
96
|
+
// states. Composing is safe anywhere; opening the durable state is not.
|
|
97
|
+
const coordinator = await composition.createCoordinator();
|
|
98
|
+
// Whoever OWNS the host reports what the previous owner left running.
|
|
99
|
+
// In-process, `index.ts` does this; detached, `ownedHost` there is null
|
|
100
|
+
// and nobody would - so a crash would leave turns marked in-flight
|
|
101
|
+
// forever, which is exactly the state this call exists to clear.
|
|
102
|
+
await coordinator.reportInterruptedTurns();
|
|
103
|
+
return coordinator;
|
|
104
|
+
},
|
|
105
|
+
onReady: (info) => {
|
|
106
|
+
write(JSON.stringify({
|
|
107
|
+
type: READY,
|
|
108
|
+
endpoint: info.endpoint,
|
|
109
|
+
instanceId: info.instanceId,
|
|
110
|
+
protocolVersion: info.protocolVersion,
|
|
111
|
+
}));
|
|
112
|
+
},
|
|
113
|
+
onStopped: (reason) => {
|
|
114
|
+
write(JSON.stringify({ type: 'xeno-agent-detached-host-stopped', reason }));
|
|
115
|
+
},
|
|
116
|
+
});
|
|
117
|
+
const reason = await handle.stopped;
|
|
118
|
+
// ๐ด Dispose AFTER the lease is released, and always.
|
|
119
|
+
//
|
|
120
|
+
// The composition holds a SQLite handle. On Windows the next owner cannot
|
|
121
|
+
// open the same state directory while this process holds it, so a host that
|
|
122
|
+
// stopped without disposing would block the very handover the lease exists
|
|
123
|
+
// to arrange. Relying on process exit to release it is only correct in the
|
|
124
|
+
// case where the process exits โ which is not the interesting one.
|
|
125
|
+
await composition?.dispose();
|
|
126
|
+
// Losing the authority is not a clean stop: continuing as though still
|
|
127
|
+
// authoritative is the split-brain the lease prevents, so a supervisor
|
|
128
|
+
// should see a non-zero exit and decide, rather than read "finished".
|
|
129
|
+
return reason === 'authority-lost' ? 1 : 0;
|
|
130
|
+
}
|
|
131
|
+
catch (error) {
|
|
132
|
+
await composition?.dispose();
|
|
133
|
+
write(JSON.stringify({
|
|
134
|
+
type: 'xeno-agent-detached-host-failed',
|
|
135
|
+
// `DetachedAgentHostDemotedError` arrives here by name, which is what
|
|
136
|
+
// makes "someone else already owns the lease" a diagnosable outcome
|
|
137
|
+
// instead of a process that simply never reported ready.
|
|
138
|
+
name: error instanceof Error ? error.name : 'Error',
|
|
139
|
+
reason: error instanceof Error ? error.message : String(error),
|
|
140
|
+
}));
|
|
141
|
+
return 1;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* ESM has no `require.main`, and comparing `process.argv[1]` lexically is what
|
|
146
|
+
* broke `xeno-agent-cli` on every Linux and macOS install: npm installs a
|
|
147
|
+
* SYMLINK into `.bin`, so the invoked path and the module path are different
|
|
148
|
+
* strings for the same file. `realpath` both, and treat an unresolvable path as
|
|
149
|
+
* "not the entry" rather than guessing.
|
|
150
|
+
*/
|
|
151
|
+
function isDirectInvocation() {
|
|
152
|
+
const invoked = process.argv[1];
|
|
153
|
+
if (!invoked)
|
|
154
|
+
return false;
|
|
155
|
+
try {
|
|
156
|
+
const resolve = (value) => {
|
|
157
|
+
try {
|
|
158
|
+
return realpathSync(value);
|
|
159
|
+
}
|
|
160
|
+
catch {
|
|
161
|
+
return value;
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
return resolve(invoked) === resolve(fileURLToPath(import.meta.url));
|
|
165
|
+
}
|
|
166
|
+
catch {
|
|
167
|
+
return false;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
if (isDirectInvocation()) {
|
|
171
|
+
// A surface may exit after launching this persistent host, closing its pipe.
|
|
172
|
+
// EPIPE is therefore a normal transport teardown, not a host crash.
|
|
173
|
+
process.stdout.on('error', (error) => {
|
|
174
|
+
if (error.code !== 'EPIPE')
|
|
175
|
+
process.exitCode = 1;
|
|
176
|
+
});
|
|
177
|
+
void runDetachedHostEntry(process.env, (line) => { process.stdout.write(`${line}\n`); })
|
|
178
|
+
.then((code) => {
|
|
179
|
+
// Not `process.exit(code)` on success: an immediate exit can truncate a
|
|
180
|
+
// pending stdout write on a pipe, and the last line is the one a
|
|
181
|
+
// supervisor is reading.
|
|
182
|
+
process.exitCode = code;
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
//# sourceMappingURL=detached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A;AACN,CAAC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which execution lanes the shared composition can actually run, and what to say when it
|
|
3
|
+
* cannot โ ADE ยง9 step 3, ยง7.1 capability honesty.
|
|
4
|
+
*
|
|
5
|
+
* Its own module, with NO imports, and that is the point rather than tidiness.
|
|
6
|
+
* `composeHost.ts` cannot be imported without `@xenosystem/acp-*` โ the ACP
|
|
7
|
+
* registry is fundamental to the composition โ so a rule living there is a rule
|
|
8
|
+
* that cannot be tested in an environment where those packages are absent.
|
|
9
|
+
* Pulling the decisions out is what makes them verifiable at all.
|
|
10
|
+
*
|
|
11
|
+
* Same split as `updaterPolicy.ts` and `detachedHostPolicy.ts` beside it: the
|
|
12
|
+
* decision is the part worth testing; constructing services is not.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* โ ๏ธ CORRECTED 2026-08-18, and the correction is the interesting part.
|
|
16
|
+
*
|
|
17
|
+
* This used to read "the SDK-native tools are written against a live BrowserWindow". That was
|
|
18
|
+
* true when written and is now false, so it is an OBSERVATION that went stale rather than a
|
|
19
|
+
* promise being retired โ observations get corrected.
|
|
20
|
+
*
|
|
21
|
+
* What changed: the agent loop no longer takes a `BrowserWindow`, it takes an `SdkAgentSurface`
|
|
22
|
+
* (`send` + `isDestroyed`), and it loads in a plain Node process. The surface TOOLS were never
|
|
23
|
+
* the obstacle either โ they act through `SdkAgentSurfaceRuntimeAdapter`, whose unregistered
|
|
24
|
+
* default already answers "this host has not registered an interactive browser surface" instead
|
|
25
|
+
* of pretending to succeed.
|
|
26
|
+
*
|
|
27
|
+
* What remains, and it is narrower and real: two of the loop's ten channels โ
|
|
28
|
+
* `agent:permission-request` and `agent:ask-user-request` โ BLOCK the turn until a human answers,
|
|
29
|
+
* and a host with nobody to ask cannot answer them. Not slowly: never. That is a missing route to
|
|
30
|
+
* a person, not a missing window, and stating it as a window sends an operator to run the GUI
|
|
31
|
+
* when what they actually need is an attached client.
|
|
32
|
+
*/
|
|
33
|
+
export declare const SDK_NEEDS_ELICITATION_ROUTE = "This host cannot resolve a permission or ask-user prompt \u2014 it can neither present one to a person nor refuse it \u2014 so an SDK-native turn that asked would wait forever. Run the app in-process, or compose a host that routes elicitations.";
|
|
34
|
+
/** @deprecated Use {@link SDK_NEEDS_ELICITATION_ROUTE}. */
|
|
35
|
+
export declare const SDK_NEEDS_SOMEONE_TO_ASK = "This host cannot resolve a permission or ask-user prompt \u2014 it can neither present one to a person nor refuse it \u2014 so an SDK-native turn that asked would wait forever. Run the app in-process, or compose a host that routes elicitations.";
|
|
36
|
+
/** @deprecated Use {@link SDK_NEEDS_SOMEONE_TO_ASK}. Kept so a stale import fails loudly at the
|
|
37
|
+
* type level rather than silently reporting the wrong reason. */
|
|
38
|
+
export declare const SDK_NEEDS_A_WINDOW = "This host cannot resolve a permission or ask-user prompt \u2014 it can neither present one to a person nor refuse it \u2014 so an SDK-native turn that asked would wait forever. Run the app in-process, or compose a host that routes elicitations.";
|
|
39
|
+
export declare const SDK_NEEDS_A_CREDENTIAL = "SDK-native engineering execution requires the host-managed direct credential. The text-only relay is intentionally not used as a fallback.";
|
|
40
|
+
/**
|
|
41
|
+
* Why the SDK-native lane is unavailable, when it is.
|
|
42
|
+
*
|
|
43
|
+
* ๐ด **The missing window outranks a missing credential.** Both can be true at
|
|
44
|
+
* once. The first reason a person is given is the one they act on, so it has to
|
|
45
|
+
* be the one actually blocking them โ fixing a credential would not make this
|
|
46
|
+
* lane run in a process that has no windows, and reporting it first sends an
|
|
47
|
+
* operator to fix the wrong thing and conclude the product is broken.
|
|
48
|
+
*/
|
|
49
|
+
export declare function sdkUnavailableReasonFor(input: {
|
|
50
|
+
/**
|
|
51
|
+
* Whether this composition can actually run an SDK-native turn end to end โ which now means
|
|
52
|
+
* "can reach a person if the turn asks", not "has a window". See
|
|
53
|
+
* {@link SDK_NEEDS_SOMEONE_TO_ASK}.
|
|
54
|
+
*/
|
|
55
|
+
sdkRunnable: boolean;
|
|
56
|
+
directCredentialAvailable: boolean;
|
|
57
|
+
/** `null` as well as `undefined`: cloud discovery reports "no error" as null,
|
|
58
|
+
* and a caller should not have to normalise that before asking. */
|
|
59
|
+
modelCatalogError?: string | null | undefined;
|
|
60
|
+
}): string | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* What a composition gives up for want of a surface capability.
|
|
63
|
+
*
|
|
64
|
+
* ๐ด Returns a DECLARATION, never an omission. A lane that vanishes from a
|
|
65
|
+
* catalog reads as a configuration error โ an operator sees a shorter list and
|
|
66
|
+
* goes looking for what they broke. A lane that is present and reports why it
|
|
67
|
+
* cannot run has told them the truth, and the descriptor already carries
|
|
68
|
+
* `safeUnavailableReason` for exactly that, so honesty costs a string.
|
|
69
|
+
*/
|
|
70
|
+
/**
|
|
71
|
+
* The minimum a host must offer for an elicitation to be deliverable. Structural on purpose โ
|
|
72
|
+
* this module imports nothing, which is what makes its decisions testable without Electron, ACP
|
|
73
|
+
* or a real coordinator.
|
|
74
|
+
*/
|
|
75
|
+
export interface ElicitationTarget {
|
|
76
|
+
hasElicitationCapableClient(): boolean;
|
|
77
|
+
createElicitationSurfaceMessenger(): {
|
|
78
|
+
send(channel: string, payload: Record<string, unknown>): void;
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Deliver one elicitation, and report HONESTLY whether anyone received it.
|
|
83
|
+
*
|
|
84
|
+
* ๐ด The return value is the safety property, not a convenience. The headless SDK-native runner
|
|
85
|
+
* refuses a prompt that reached nobody, and it decides that from this boolean โ so a `true` here
|
|
86
|
+
* that nobody can act on produces precisely the hang the refusal exists to prevent, and does it
|
|
87
|
+
* silently, because publishing to zero subscribers looks exactly like publishing to ten.
|
|
88
|
+
*
|
|
89
|
+
* โ ๏ธ "Someone is subscribed" is NOT the question, which is the trap this function exists to
|
|
90
|
+
* avoid: the local RPC server subscribes exactly ONE listener and fans out to however many
|
|
91
|
+
* sockets it holds, so a listener count is equally consistent with a full house and an empty
|
|
92
|
+
* room. Only a completed handshake carrying `canPresentElicitations` says a human can be reached.
|
|
93
|
+
*
|
|
94
|
+
* โ ๏ธ It is also asked FRESH each time rather than captured once. A composition-time answer would
|
|
95
|
+
* be wrong the moment the last client detached, and detaching is normal.
|
|
96
|
+
*/
|
|
97
|
+
export declare function deliverElicitationThrough(target: ElicitationTarget | undefined, channel: string, payload: Record<string, unknown>): boolean;
|
|
98
|
+
export declare function declaredUnavailableLanes(surface: {
|
|
99
|
+
hasWindow: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Whether this composition can RESOLVE an elicitation โ present it to a person and return their
|
|
102
|
+
* answer, or refuse it โ so that a turn which asks always continues.
|
|
103
|
+
*
|
|
104
|
+
* ๐ด "Resolve", not "prompt", and the distinction is the whole point. A detached host with no
|
|
105
|
+
* client attached cannot prompt anyone; it can still resolve, by refusing. That is what makes
|
|
106
|
+
* the lane runnable there, and calling the parameter `canPromptAHuman` (as it was for one
|
|
107
|
+
* cycle) invited exactly the wrong conclusion โ that a headless host must find a human before
|
|
108
|
+
* it may run a turn.
|
|
109
|
+
*
|
|
110
|
+
* What must never happen is a prompt that is neither answered nor refused:
|
|
111
|
+
* `requestSurfacePermission` has no timeout, so that is a turn stuck forever.
|
|
112
|
+
*
|
|
113
|
+
* ๐ด Optional, defaulting to `hasWindow` โ the CONSERVATIVE answer. A composition written
|
|
114
|
+
* before this existed keeps its exact behaviour, and a new one must SAY it can resolve before
|
|
115
|
+
* the lane is offered. Defaulting to `true` would silently enable a lane that hangs.
|
|
116
|
+
*/
|
|
117
|
+
canResolveElicitations?: boolean;
|
|
118
|
+
}): Array<{
|
|
119
|
+
lane: string;
|
|
120
|
+
reason: string;
|
|
121
|
+
}>;
|
|
122
|
+
//# sourceMappingURL=hostLanePolicy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hostLanePolicy.d.ts","sourceRoot":"","sources":["../src/hostLanePolicy.ts"],"names":[],"mappings":"AAAA;;;;;;;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ually run, and what to say when it
|
|
3
|
+
* cannot โ ADE ยง9 step 3, ยง7.1 capability honesty.
|
|
4
|
+
*
|
|
5
|
+
* Its own module, with NO imports, and that is the point rather than tidiness.
|
|
6
|
+
* `composeHost.ts` cannot be imported without `@xenosystem/acp-*` โ the ACP
|
|
7
|
+
* registry is fundamental to the composition โ so a rule living there is a rule
|
|
8
|
+
* that cannot be tested in an environment where those packages are absent.
|
|
9
|
+
* Pulling the decisions out is what makes them verifiable at all.
|
|
10
|
+
*
|
|
11
|
+
* Same split as `updaterPolicy.ts` and `detachedHostPolicy.ts` beside it: the
|
|
12
|
+
* decision is the part worth testing; constructing services is not.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* โ ๏ธ CORRECTED 2026-08-18, and the correction is the interesting part.
|
|
16
|
+
*
|
|
17
|
+
* This used to read "the SDK-native tools are written against a live BrowserWindow". That was
|
|
18
|
+
* true when written and is now false, so it is an OBSERVATION that went stale rather than a
|
|
19
|
+
* promise being retired โ observations get corrected.
|
|
20
|
+
*
|
|
21
|
+
* What changed: the agent loop no longer takes a `BrowserWindow`, it takes an `SdkAgentSurface`
|
|
22
|
+
* (`send` + `isDestroyed`), and it loads in a plain Node process. The surface TOOLS were never
|
|
23
|
+
* the obstacle either โ they act through `SdkAgentSurfaceRuntimeAdapter`, whose unregistered
|
|
24
|
+
* default already answers "this host has not registered an interactive browser surface" instead
|
|
25
|
+
* of pretending to succeed.
|
|
26
|
+
*
|
|
27
|
+
* What remains, and it is narrower and real: two of the loop's ten channels โ
|
|
28
|
+
* `agent:permission-request` and `agent:ask-user-request` โ BLOCK the turn until a human answers,
|
|
29
|
+
* and a host with nobody to ask cannot answer them. Not slowly: never. That is a missing route to
|
|
30
|
+
* a person, not a missing window, and stating it as a window sends an operator to run the GUI
|
|
31
|
+
* when what they actually need is an attached client.
|
|
32
|
+
*/
|
|
33
|
+
export const SDK_NEEDS_ELICITATION_ROUTE = 'This host cannot resolve a permission or ask-user prompt โ it can neither present one to a person nor refuse it โ so an SDK-native turn that asked would wait forever. Run the app in-process, or compose a host that routes elicitations.';
|
|
34
|
+
/** @deprecated Use {@link SDK_NEEDS_ELICITATION_ROUTE}. */
|
|
35
|
+
export const SDK_NEEDS_SOMEONE_TO_ASK = SDK_NEEDS_ELICITATION_ROUTE;
|
|
36
|
+
/** @deprecated Use {@link SDK_NEEDS_SOMEONE_TO_ASK}. Kept so a stale import fails loudly at the
|
|
37
|
+
* type level rather than silently reporting the wrong reason. */
|
|
38
|
+
export const SDK_NEEDS_A_WINDOW = SDK_NEEDS_SOMEONE_TO_ASK;
|
|
39
|
+
export const SDK_NEEDS_A_CREDENTIAL = 'SDK-native engineering execution requires the host-managed direct credential. The text-only relay is intentionally not used as a fallback.';
|
|
40
|
+
/**
|
|
41
|
+
* Why the SDK-native lane is unavailable, when it is.
|
|
42
|
+
*
|
|
43
|
+
* ๐ด **The missing window outranks a missing credential.** Both can be true at
|
|
44
|
+
* once. The first reason a person is given is the one they act on, so it has to
|
|
45
|
+
* be the one actually blocking them โ fixing a credential would not make this
|
|
46
|
+
* lane run in a process that has no windows, and reporting it first sends an
|
|
47
|
+
* operator to fix the wrong thing and conclude the product is broken.
|
|
48
|
+
*/
|
|
49
|
+
export function sdkUnavailableReasonFor(input) {
|
|
50
|
+
if (!input.sdkRunnable)
|
|
51
|
+
return SDK_NEEDS_SOMEONE_TO_ASK;
|
|
52
|
+
if (!input.directCredentialAvailable)
|
|
53
|
+
return SDK_NEEDS_A_CREDENTIAL;
|
|
54
|
+
return input.modelCatalogError ?? undefined;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Deliver one elicitation, and report HONESTLY whether anyone received it.
|
|
58
|
+
*
|
|
59
|
+
* ๐ด The return value is the safety property, not a convenience. The headless SDK-native runner
|
|
60
|
+
* refuses a prompt that reached nobody, and it decides that from this boolean โ so a `true` here
|
|
61
|
+
* that nobody can act on produces precisely the hang the refusal exists to prevent, and does it
|
|
62
|
+
* silently, because publishing to zero subscribers looks exactly like publishing to ten.
|
|
63
|
+
*
|
|
64
|
+
* โ ๏ธ "Someone is subscribed" is NOT the question, which is the trap this function exists to
|
|
65
|
+
* avoid: the local RPC server subscribes exactly ONE listener and fans out to however many
|
|
66
|
+
* sockets it holds, so a listener count is equally consistent with a full house and an empty
|
|
67
|
+
* room. Only a completed handshake carrying `canPresentElicitations` says a human can be reached.
|
|
68
|
+
*
|
|
69
|
+
* โ ๏ธ It is also asked FRESH each time rather than captured once. A composition-time answer would
|
|
70
|
+
* be wrong the moment the last client detached, and detaching is normal.
|
|
71
|
+
*/
|
|
72
|
+
export function deliverElicitationThrough(target, channel, payload) {
|
|
73
|
+
// No coordinator yet: the adapters are built before it exists. A prompt raised in that window
|
|
74
|
+
// has nowhere to go, and saying so lets it be refused rather than lost.
|
|
75
|
+
if (!target)
|
|
76
|
+
return false;
|
|
77
|
+
if (!target.hasElicitationCapableClient())
|
|
78
|
+
return false;
|
|
79
|
+
target.createElicitationSurfaceMessenger().send(channel, payload);
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
export function declaredUnavailableLanes(surface) {
|
|
83
|
+
const canResolve = surface.canResolveElicitations ?? surface.hasWindow;
|
|
84
|
+
return canResolve ? [] : [{ lane: 'sdk-native', reason: SDK_NEEDS_ELICITATION_ROUTE }];
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=hostLanePolicy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hostLanePolicy.js","sourceRoot":"","sources":["../src/hostLanePolicy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,2BAA2B,GACtC,4OAA4O,CAAA;AAE9O,2DAA2D;AAC3D,MAAM,CAAC,MAAM,wBAAwB,GAAG,2BAA2B,CAAA;AAEnE;kEACkE;AAClE,MAAM,CAAC,MAAM,kBAAkB,GAAG,wBAAwB,CAAA;AAE1D,MAAM,CAAC,MAAM,sBAAsB,GACjC,4IAA4I,CAAA;AAE9I;;;;;;;;GAQG;AACH,MAAM,UAAU,uBAAuB,CAAC,KAWvC;IACC,IAAI,CAAC,KAAK,CAAC,WAAW;QAAE,OAAO,wBAAwB,CAAA;IACvD,IAAI,CAAC,KAAK,CAAC,yBAAyB;QAAE,OAAO,sBAAsB,CAAA;IACnE,OAAO,KAAK,CAAC,iBAAiB,IAAI,SAAS,CAAA;AAC7C,CAAC;AAqBD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,yBAAyB,CACvC,MAAqC,EACrC,OAAe,EACf,OAAgC;IAEhC,8FAA8F;IAC9F,wEAAwE;IACxE,IAAI,CAAC,MAAM;QAAE,OAAO,KAAK,CAAA;IACzB,IAAI,CAAC,MAAM,CAAC,2BAA2B,EAAE;QAAE,OAAO,KAAK,CAAA;IACvD,MAAM,CAAC,iCAAiC,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;IACjE,OAAO,IAAI,CAAA;AACb,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,OAoBxC;IACC,MAAM,UAAU,GAAG,OAAO,CAAC,sBAAsB,IAAI,OAAO,CAAC,SAAS,CAAA;IACtE,OAAO,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,2BAA2B,EAAE,CAAC,CAAA;AACxF,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The host services every composition must build the same way.
|
|
3
|
+
*
|
|
4
|
+
* ## ๐ด Why this module exists
|
|
5
|
+
*
|
|
6
|
+
* `composeHost.ts` is the shared composition ADE ยง9 step 3 is heading for, and
|
|
7
|
+
* `index.ts` โ the Electron main the user actually launches โ still builds its
|
|
8
|
+
* own `AgentHostCoordinator`. That fork is real and is being closed in one
|
|
9
|
+
* deliberate commit, not as a side effect of feature work.
|
|
10
|
+
*
|
|
11
|
+
* Meanwhile the four ยง5 services were mounted in `composeHost` only, which
|
|
12
|
+
* meant they reached the DETACHED host and nobody who starts the app. The gate
|
|
13
|
+
* in `packages/host/src/serviceMounting.test.ts` now asks the sharper question
|
|
14
|
+
* โ "does this reach the SHIPPED app" โ and named them as an adoption gap.
|
|
15
|
+
*
|
|
16
|
+
* Closing that gap by pasting the constructions into `index.ts` would answer
|
|
17
|
+
* the gate and create a worse defect: two spellings of the same decision, in
|
|
18
|
+
* the two files least likely to be read together. The ecosystem rule is that a
|
|
19
|
+
* rule belongs in the shared callee and there must be exactly ONE spelling of
|
|
20
|
+
* it, so the decisions live here and both compositions call this.
|
|
21
|
+
*
|
|
22
|
+
* ## What is a decision, and what is glue
|
|
23
|
+
*
|
|
24
|
+
* Only choices that must not diverge are here. `onRunActivity` is NOT: it binds
|
|
25
|
+
* to the coordinator that composition builds, so the two are genuinely
|
|
26
|
+
* different values rather than one rule written twice.
|
|
27
|
+
*/
|
|
28
|
+
import { AgentSessionService, CoordinationService, IntakeService, WorkspaceKnowledgeService, type CoordinationLanePort } from '@xenosystem/agent-interface-host/node';
|
|
29
|
+
export interface SharedHostServiceOptions {
|
|
30
|
+
/**
|
|
31
|
+
* The directories intake may scan.
|
|
32
|
+
*
|
|
33
|
+
* Injected rather than resolved here because the answer is the WORKSPACE
|
|
34
|
+
* AUTHORITY's, and it changes as the user grants more: reading it once at
|
|
35
|
+
* construction would freeze a fresh install's empty list forever.
|
|
36
|
+
*/
|
|
37
|
+
resolveIntakeRoots: () => string[];
|
|
38
|
+
}
|
|
39
|
+
export interface SharedHostServices {
|
|
40
|
+
knowledgeService: WorkspaceKnowledgeService;
|
|
41
|
+
intakeService: IntakeService;
|
|
42
|
+
sessionService: AgentSessionService;
|
|
43
|
+
coordinationService: CoordinationService;
|
|
44
|
+
/**
|
|
45
|
+
* The exact calls a turn-execution lane may make.
|
|
46
|
+
*
|
|
47
|
+
* ๐ด A PORT, not the service. `endRun` and `setInboundPolicy` are the host's,
|
|
48
|
+
* and a lane holding the whole object could call them. And exactly one port
|
|
49
|
+
* per composition, shared by every lane: an ACP agent and an SDK agent must
|
|
50
|
+
* reach the same implementation, or a claim granted in one lane and refused
|
|
51
|
+
* in the other leaves an agent with two answers and no way to choose.
|
|
52
|
+
*/
|
|
53
|
+
coordinationPort: CoordinationLanePort;
|
|
54
|
+
}
|
|
55
|
+
export declare function createSharedHostServices(options: SharedHostServiceOptions): SharedHostServices;
|
|
56
|
+
//# sourceMappingURL=hostServices.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hostServices.d.ts","sourceRoot":"","sources":["../src/hostServices.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EAEnB,aAAa,EACb,yBAAyB,EAEzB,KAAK,oBAAoB,EAC1B,MAAM,uCAAuC,CAAA;AAE9C,MAAM,WAAW,wBAAwB;IACvC;;;;;;OAMG;IACH,kBAAkB,EAAE,MAAM,MAAM,EAAE,CAAA;CACnC;AAED,MAAM,WAAW,kBAAkB;IACjC,gBAAgB,EAAE,yBAAyB,CAAA;IAC3C,aAAa,EAAE,aAAa,CAAA;IAC5B,cAAc,EAAE,mBAAmB,CAAA;IACnC,mBAAmB,EAAE,mBAAmB,CAAA;IACxC;;;;;;;;OAQG;IACH,gBAAgB,EAAE,oBAAoB,CAAA;CACvC;AAED,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,wBAAwB,GAChC,kBAAkB,CAgDpB"}
|