@layernorm/overlay-agent-host 0.3.11 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/README.md +50 -27
  2. package/dist/cli.js +90 -199
  3. package/dist/cli.js.map +1 -1
  4. package/dist/config.d.ts +15 -166
  5. package/dist/config.d.ts.map +1 -1
  6. package/dist/config.js +21 -35
  7. package/dist/config.js.map +1 -1
  8. package/dist/connection.d.ts +10 -10
  9. package/dist/connection.d.ts.map +1 -1
  10. package/dist/connection.js +1 -1
  11. package/dist/connection.js.map +1 -1
  12. package/dist/doctor.d.ts +2 -2
  13. package/dist/doctor.d.ts.map +1 -1
  14. package/dist/doctor.js +7 -23
  15. package/dist/doctor.js.map +1 -1
  16. package/dist/enrollment.d.ts +4 -4
  17. package/dist/enrollment.d.ts.map +1 -1
  18. package/dist/enrollment.js +4 -16
  19. package/dist/enrollment.js.map +1 -1
  20. package/dist/host-capabilities.d.ts +8 -0
  21. package/dist/host-capabilities.d.ts.map +1 -0
  22. package/dist/host-capabilities.js +14 -0
  23. package/dist/host-capabilities.js.map +1 -0
  24. package/dist/host-heartbeat.d.ts +14 -0
  25. package/dist/host-heartbeat.d.ts.map +1 -0
  26. package/dist/host-heartbeat.js +41 -0
  27. package/dist/host-heartbeat.js.map +1 -0
  28. package/dist/index.d.ts +2 -10
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +2 -10
  31. package/dist/index.js.map +1 -1
  32. package/dist/local-tools-browser.d.ts +54 -0
  33. package/dist/local-tools-browser.d.ts.map +1 -0
  34. package/dist/local-tools-browser.js +360 -0
  35. package/dist/local-tools-browser.js.map +1 -0
  36. package/dist/local-tools-errors.d.ts +8 -0
  37. package/dist/local-tools-errors.d.ts.map +1 -0
  38. package/dist/local-tools-errors.js +14 -0
  39. package/dist/local-tools-errors.js.map +1 -0
  40. package/dist/local-tools-exec.d.ts +27 -0
  41. package/dist/local-tools-exec.d.ts.map +1 -0
  42. package/dist/local-tools-exec.js +128 -0
  43. package/dist/local-tools-exec.js.map +1 -0
  44. package/dist/local-tools-macos.d.ts +20 -0
  45. package/dist/local-tools-macos.d.ts.map +1 -0
  46. package/dist/local-tools-macos.js +217 -0
  47. package/dist/local-tools-macos.js.map +1 -0
  48. package/dist/local-tools-paths.d.ts +13 -0
  49. package/dist/local-tools-paths.d.ts.map +1 -0
  50. package/dist/local-tools-paths.js +76 -0
  51. package/dist/local-tools-paths.js.map +1 -0
  52. package/dist/local-tools-terminal.d.ts +19 -0
  53. package/dist/local-tools-terminal.d.ts.map +1 -0
  54. package/dist/local-tools-terminal.js +201 -0
  55. package/dist/local-tools-terminal.js.map +1 -0
  56. package/dist/local-tools.d.ts +53 -0
  57. package/dist/local-tools.d.ts.map +1 -0
  58. package/dist/local-tools.js +219 -0
  59. package/dist/local-tools.js.map +1 -0
  60. package/dist/preview-hosting-access.d.ts +18 -0
  61. package/dist/preview-hosting-access.d.ts.map +1 -0
  62. package/dist/preview-hosting-access.js +48 -0
  63. package/dist/preview-hosting-access.js.map +1 -0
  64. package/dist/preview-hosting.d.ts +3 -0
  65. package/dist/preview-hosting.d.ts.map +1 -0
  66. package/dist/preview-hosting.js +10 -0
  67. package/dist/preview-hosting.js.map +1 -0
  68. package/dist/runtime.d.ts +12 -61
  69. package/dist/runtime.d.ts.map +1 -1
  70. package/dist/runtime.js +39 -386
  71. package/dist/runtime.js.map +1 -1
  72. package/dist/transport.d.ts +19 -32
  73. package/dist/transport.d.ts.map +1 -1
  74. package/dist/transport.js +40 -59
  75. package/dist/transport.js.map +1 -1
  76. package/docker-compose.example.yml +1 -1
  77. package/package.json +4 -8
  78. package/dist/acp-adapter.d.ts +0 -60
  79. package/dist/acp-adapter.d.ts.map +0 -1
  80. package/dist/acp-adapter.js +0 -326
  81. package/dist/acp-adapter.js.map +0 -1
  82. package/dist/acpx-adapter.d.ts +0 -104
  83. package/dist/acpx-adapter.d.ts.map +0 -1
  84. package/dist/acpx-adapter.js +0 -328
  85. package/dist/acpx-adapter.js.map +0 -1
  86. package/dist/adapter-manifests.d.ts +0 -47
  87. package/dist/adapter-manifests.d.ts.map +0 -1
  88. package/dist/adapter-manifests.js +0 -30
  89. package/dist/adapter-manifests.js.map +0 -1
  90. package/dist/adapter.d.ts +0 -40
  91. package/dist/adapter.d.ts.map +0 -1
  92. package/dist/adapter.js +0 -2
  93. package/dist/adapter.js.map +0 -1
  94. package/dist/eve-adapter.d.ts +0 -75
  95. package/dist/eve-adapter.d.ts.map +0 -1
  96. package/dist/eve-adapter.js +0 -332
  97. package/dist/eve-adapter.js.map +0 -1
  98. package/dist/export-config.d.ts +0 -20
  99. package/dist/export-config.d.ts.map +0 -1
  100. package/dist/export-config.js +0 -128
  101. package/dist/export-config.js.map +0 -1
  102. package/dist/fake-adapter.d.ts +0 -43
  103. package/dist/fake-adapter.d.ts.map +0 -1
  104. package/dist/fake-adapter.js +0 -43
  105. package/dist/fake-adapter.js.map +0 -1
  106. package/dist/filesystem-policy.d.ts +0 -7
  107. package/dist/filesystem-policy.d.ts.map +0 -1
  108. package/dist/filesystem-policy.js +0 -23
  109. package/dist/filesystem-policy.js.map +0 -1
  110. package/dist/hermes-readiness.d.ts +0 -6
  111. package/dist/hermes-readiness.d.ts.map +0 -1
  112. package/dist/hermes-readiness.js +0 -21
  113. package/dist/hermes-readiness.js.map +0 -1
  114. package/dist/image-check.d.ts +0 -29
  115. package/dist/image-check.d.ts.map +0 -1
  116. package/dist/image-check.js +0 -61
  117. package/dist/image-check.js.map +0 -1
  118. package/dist/state.d.ts +0 -60
  119. package/dist/state.d.ts.map +0 -1
  120. package/dist/state.js +0 -217
  121. package/dist/state.js.map +0 -1
@@ -1,328 +0,0 @@
1
- import { randomUUID } from 'node:crypto';
2
- import { join } from 'node:path';
3
- import { createAcpRuntime, createAgentRegistry, createFileSessionStore, } from 'acpx/runtime';
4
- import { emitToolContent, overlayMcpServers } from './acp-adapter.js';
5
- /**
6
- * Overlay adapter ids → acpx agent names. acpx resolves each name to a pinned
7
- * ACP adapter launch (an installed binary first, `npx` otherwise).
8
- */
9
- export const ACPX_AGENT_NAMES = {
10
- 'claude-code': 'claude',
11
- codex: 'codex',
12
- };
13
- /**
14
- * Experimental agents whose own CLI is on the machine (Overlay Cloud's system layer) instead of being bundled and
15
- * pinned in the Overlay image, so `image-check` does not require them. Bring-your-own-key only.
16
- */
17
- export const ACPX_SYSTEM_AGENT_NAMES = {
18
- opencode: 'opencode',
19
- cursor: 'cursor',
20
- hermes: 'hermes',
21
- };
22
- /** Agents acpx has no built-in launch for: how to start them speaking ACP. */
23
- export const ACPX_AGENT_LAUNCH_OVERRIDES = {
24
- hermes: ['hermes', 'acp'],
25
- };
26
- export const ACPX_AGENT_DISPLAY_NAMES = {
27
- 'claude-code': 'Claude Code',
28
- codex: 'Codex',
29
- opencode: 'OpenCode',
30
- cursor: 'Cursor',
31
- hermes: 'Hermes',
32
- };
33
- /** The acpx agent name for an Overlay adapter id, or undefined when acpx does not run it. */
34
- export function acpxAgentNameFor(adapterId) {
35
- return ACPX_AGENT_NAMES[adapterId] ?? ACPX_SYSTEM_AGENT_NAMES[adapterId];
36
- }
37
- /**
38
- * ACP sessions run through acpx's runtime (`acpx/runtime`): process lifecycle,
39
- * session persistence and resume, queueing, permission and elicitation
40
- * plumbing. This adapter only maps acpx's events to Overlay's bridge events.
41
- *
42
- * Overlay issues a fresh MCP token for every run, and acpx keeps a connection's
43
- * MCP servers fixed, so the connection is closed after each turn (the session
44
- * record stays) and the next turn reconnects with that run's servers.
45
- */
46
- export class AcpxAgentAdapter {
47
- options;
48
- capability;
49
- registry;
50
- mcpBySession = new Map();
51
- constructor(options) {
52
- this.options = options;
53
- this.capability = {
54
- id: options.id, displayName: options.displayName, protocol: 'acp',
55
- supports: { prompt: true, approval: true, cancel: true, resume: true },
56
- recovery: { liveReattachment: true, sessionLoading: true, interruptedTurnContinuation: false, approvalRestoration: false, providerCheckpoints: false },
57
- };
58
- this.registry = createAgentRegistry(options.registryOverrides ? { overrides: options.registryOverrides } : {});
59
- }
60
- async discover() {
61
- if (!this.registry.list().includes(this.options.agent)) {
62
- throw new Error(`acpx does not know the agent "${this.options.agent}"`);
63
- }
64
- return this.capability;
65
- }
66
- /**
67
- * A runtime per session: the agent process environment is fixed when a
68
- * runtime is created, and each run brings its own credentials. Session
69
- * records live on disk, so a later run's runtime resumes the same session.
70
- */
71
- runtimeFor(cwd, credentials) {
72
- const env = { ...this.options.env, ...credentials };
73
- return createAcpRuntime({
74
- cwd,
75
- sessionStore: createFileSessionStore({ stateDir: join(this.options.stateDirectory, 'acpx') }),
76
- agentRegistry: this.registry,
77
- ...(Object.keys(env).length > 0 ? { agentProcessEnv: env } : {}),
78
- mcpServers: (session) => this.mcpBySession.get(session.sessionKey) ?? [],
79
- // Overlay decides every permission request through the bridge.
80
- permissionMode: 'deny-all',
81
- nonInteractivePermissions: 'deny',
82
- elicitationModes: ['form'],
83
- });
84
- }
85
- async start(input, emit) {
86
- const runtime = this.runtimeFor(input.workingDirectory, input.credentials);
87
- const sessionKey = input.remoteSessionId ?? `overlay-${randomUUID()}`;
88
- this.mcpBySession.set(sessionKey, overlayMcpServers(input.metadata, true));
89
- const ensure = () => runtime.ensureSession({
90
- sessionKey, agent: this.options.agent, mode: 'persistent', cwd: input.workingDirectory,
91
- });
92
- const requestedModel = typeof input.metadata?.model === 'string' && input.metadata.model.trim() ? input.metadata.model.trim() : null;
93
- // The model an agent's owner chose, in the agent's own id (Claude Code `sonnet`, Codex `gpt-6-sol[high]`). A model the
94
- // agent does not offer fails the run with the agent's own message instead of silently running another model.
95
- const applyModel = async (target) => {
96
- if (requestedModel)
97
- await applyRequestedModel(runtime, target, requestedModel);
98
- };
99
- let handle = await ensure();
100
- await applyModel(handle);
101
- let activeTurn;
102
- const permissions = new Map();
103
- const elicitations = new Map();
104
- let textCheckpoint = '';
105
- let connected = true;
106
- const onPermissionRequest = async (request) => {
107
- const raw = request.raw;
108
- const requestKey = raw.toolCall.toolCallId || randomUUID();
109
- const response = deferred();
110
- permissions.set(requestKey, {
111
- options: new Map(raw.options.map((option) => [option.optionId, option.kind])),
112
- response,
113
- });
114
- await emit({
115
- type: 'approval_requested',
116
- payload: {
117
- requestKey,
118
- prompt: raw.toolCall.title ?? 'Agent permission request',
119
- options: raw.options.map((option) => ({ id: option.optionId, label: option.name })),
120
- context: { toolCallId: raw.toolCall.toolCallId },
121
- },
122
- });
123
- const decision = await response.promise;
124
- permissions.delete(requestKey);
125
- return decision;
126
- };
127
- const onElicitation = async (request) => {
128
- if (request.mode !== 'form')
129
- return { action: 'decline' };
130
- const requestKey = randomUUID();
131
- const response = deferred();
132
- elicitations.set(requestKey, { response });
133
- await emit({ type: 'elicitation_requested', payload: {
134
- requestKey, prompt: request.message, requestedSchema: (request.requestedSchema ?? {}), context: {},
135
- } });
136
- const result = await response.promise;
137
- elicitations.delete(requestKey);
138
- return result;
139
- };
140
- const disconnect = async (reason) => {
141
- if (!connected)
142
- return;
143
- connected = false;
144
- await runtime.close({ handle, reason }).catch(() => undefined);
145
- };
146
- return {
147
- remoteSessionId: sessionKey,
148
- prompt: async (prompt) => {
149
- if (!connected) {
150
- handle = await ensure();
151
- await applyModel(handle);
152
- connected = true;
153
- }
154
- textCheckpoint = '';
155
- const turn = runtime.startTurn({
156
- handle, text: prompt, mode: 'prompt', requestId: randomUUID(),
157
- onPermissionRequest, onElicitation: onElicitation,
158
- });
159
- activeTurn = turn;
160
- try {
161
- for await (const event of turn.events) {
162
- await normalizeAcpxEvent(event, emit, {
163
- appendText(chunk) {
164
- textCheckpoint += chunk;
165
- return textCheckpoint;
166
- },
167
- });
168
- }
169
- await emitTurnResult(await turn.result, emit, this.options.id);
170
- }
171
- finally {
172
- activeTurn = undefined;
173
- await disconnect('overlay turn finished');
174
- }
175
- },
176
- approve: async (requestKey, optionId) => {
177
- const pending = permissions.get(requestKey);
178
- if (!pending)
179
- throw new Error(`ACP approval request is not pending: ${requestKey}`);
180
- const kind = pending.options.get(optionId);
181
- if (!kind)
182
- throw new Error(`ACP approval option is invalid: ${optionId}`);
183
- pending.response.resolve(permissionDecision(kind));
184
- },
185
- elicit: async (requestKey, action, content) => {
186
- const pending = elicitations.get(requestKey);
187
- if (!pending)
188
- throw new Error(`ACP elicitation request is not pending: ${requestKey}`);
189
- pending.response.resolve(action === 'accept'
190
- ? { action, content: content }
191
- : { action });
192
- },
193
- cancel: async (reason) => {
194
- if (activeTurn)
195
- await activeTurn.cancel({ reason: reason ?? 'cancelled from Overlay' });
196
- else
197
- await runtime.cancel({ handle, reason: reason ?? 'cancelled from Overlay' });
198
- },
199
- observe: async () => activeTurn ? 'live' : 'unknown',
200
- resume: async () => {
201
- if (!activeTurn)
202
- throw new Error('acpx session loading does not restore an interrupted turn; inspect the previous process before continuing');
203
- },
204
- stop: async (reason) => {
205
- for (const pending of permissions.values())
206
- pending.response.resolve({ outcome: 'cancel' });
207
- for (const pending of elicitations.values())
208
- pending.response.resolve({ action: 'cancel' });
209
- await disconnect(reason ?? 'overlay session stopped');
210
- this.mcpBySession.delete(sessionKey);
211
- },
212
- };
213
- }
214
- }
215
- function permissionDecision(kind) {
216
- if (kind === 'allow_always')
217
- return { outcome: 'allow_always' };
218
- if (kind === 'reject_once')
219
- return { outcome: 'reject_once' };
220
- if (kind === 'reject_always')
221
- return { outcome: 'reject_always' };
222
- return { outcome: 'allow_once' };
223
- }
224
- /** Failure code for an agent that rejected its credentials; the control plane flags the account for reconnecting. */
225
- export const AGENT_AUTH_FAILURE_CODE = 'auth_required';
226
- const AUTH_FAILURE_PATTERN = /auth(entication)? (required|failed)|not logged in|invalid (api[- ]?key|x-api-key|token|credentials?)|unauthori[sz]ed|\b401\b|oauth token.*(expired|revoked|invalid)|please run \/login/i;
227
- const REAUTH_MESSAGE = {
228
- 'claude-code': 'Claude Code could not sign in. Reconnect your Claude account in Settings → Agent accounts.',
229
- codex: 'Codex could not sign in. Reconnect your OpenAI account in Settings → Agent accounts.',
230
- };
231
- export function isAuthFailureMessage(message) {
232
- return AUTH_FAILURE_PATTERN.test(message);
233
- }
234
- async function emitTurnResult(result, emit, adapterId) {
235
- if (result.status === 'completed') {
236
- await emit({ type: 'completed', payload: { summary: `ACP turn stopped: ${result.stopReason ?? 'end_turn'}`, usage: {} } });
237
- }
238
- else if (result.status === 'cancelled') {
239
- await emit({ type: 'cancelled', payload: {} });
240
- }
241
- else if (isAuthFailureMessage(result.error.message)) {
242
- await emit({ type: 'failed', payload: {
243
- code: AGENT_AUTH_FAILURE_CODE,
244
- message: REAUTH_MESSAGE[adapterId] ?? 'The agent could not sign in. Reconnect its account in Settings → Agent accounts.',
245
- retryable: false,
246
- } });
247
- }
248
- else {
249
- await emit({ type: 'failed', payload: {
250
- code: result.error.code ?? 'acp_turn_failed',
251
- message: result.error.message.slice(0, 2_000),
252
- retryable: result.error.retryable ?? false,
253
- } });
254
- }
255
- }
256
- /**
257
- * Applies the model an agent's owner chose. The id is tried as given. Codex on a ChatGPT sign-in advertises plain model
258
- * names (`gpt-6-sol`) while an API key advertises `gpt-6-sol[high]`; so when a `name[level]` id is not offered, the
259
- * name is applied and the level is set as the reasoning effort (best effort: an agent without that setting keeps its
260
- * own). A model the agent does not offer at all still fails the run, with the agent's own message.
261
- */
262
- export async function applyRequestedModel(runtime, handle, model) {
263
- if (!runtime.setModel)
264
- return;
265
- try {
266
- await runtime.setModel({ handle, model });
267
- return;
268
- }
269
- catch (error) {
270
- const split = /^(.+)\[([^\]]+)\]$/.exec(model);
271
- if (!split)
272
- throw error;
273
- await runtime.setModel({ handle, model: split[1] });
274
- for (const key of ['reasoning_effort', 'effort']) {
275
- try {
276
- await runtime.setConfigOption?.({ handle, key, value: split[2] });
277
- return;
278
- }
279
- catch (_error) {
280
- // Try the next name; an agent with no such setting keeps its own level.
281
- }
282
- }
283
- }
284
- }
285
- /** Maps acpx runtime events to Overlay's normalized bridge events. */
286
- export async function normalizeAcpxEvent(event, emit, checkpoint) {
287
- if (event.type === 'text_delta') {
288
- if (event.stream === 'thought')
289
- return;
290
- await emit({ type: 'text_checkpoint', payload: { text: checkpoint.appendText(event.text) } });
291
- return;
292
- }
293
- if (event.type === 'tool_call') {
294
- const actionId = event.toolCallId ?? randomUUID();
295
- const title = event.title ?? event.text ?? 'Tool call';
296
- await emit({ type: 'action', payload: { actionId, title, status: normalizeStatus(event.status) } });
297
- await emitToolContent(actionId, title, event.content, emit);
298
- return;
299
- }
300
- if (event.type === 'status') {
301
- if (event.entries) {
302
- await emit({ type: 'plan', payload: { entries: event.entries.map((entry, index) => ({
303
- id: `plan-${index}`, title: entry.content, status: entry.status,
304
- })) } });
305
- }
306
- if (event.availableCommands) {
307
- await emit({ type: 'commands_update', payload: { commands: event.availableCommands.slice(0, 100).map((command) => ({
308
- name: command.name,
309
- ...(command.description ? { description: command.description } : {}),
310
- })) } });
311
- }
312
- }
313
- }
314
- function normalizeStatus(status) {
315
- if (status === 'completed')
316
- return 'completed';
317
- if (status === 'failed')
318
- return 'failed';
319
- if (status === 'in_progress' || status === 'pending')
320
- return 'started';
321
- return 'updated';
322
- }
323
- function deferred() {
324
- let resolve;
325
- const promise = new Promise((accept) => { resolve = accept; });
326
- return { promise, resolve };
327
- }
328
- //# sourceMappingURL=acpx-adapter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"acpx-adapter.js","sourceRoot":"","sources":["../src/acpx-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,sBAAsB,GAUvB,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAGrE;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAA2B;IACtD,aAAa,EAAE,QAAQ;IACvB,KAAK,EAAE,OAAO;CACf,CAAA;AAED;;;GAG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P_PACKAGE_VERSION = "0.70.0";
3
- export declare const HERMES_AGENT_MINIMUM_VERSION = "0.20.6";
4
- export declare const ACP_ADAPTER_MANIFESTS: {
5
- readonly codex: {
6
- readonly id: "codex";
7
- readonly displayName: "Codex";
8
- readonly protocol: "acp";
9
- readonly command: "npx";
10
- readonly args: readonly ["-y", "@agentclientprotocol/codex-acp@1.7.0"];
11
- };
12
- readonly 'claude-code': {
13
- readonly id: "claude-code";
14
- readonly displayName: "Claude Code";
15
- readonly protocol: "acp";
16
- readonly command: "npx";
17
- readonly args: readonly ["-y", "@agentclientprotocol/claude-agent-acp@0.70.0"];
18
- };
19
- readonly hermes: {
20
- readonly id: "hermes";
21
- readonly displayName: "Hermes";
22
- readonly protocol: "acp";
23
- readonly command: "hermes";
24
- readonly args: readonly ["acp"];
25
- };
26
- };
27
- export type AcpAdapterManifestId = keyof typeof ACP_ADAPTER_MANIFESTS;
28
- export declare function resolveAcpAdapterManifest(id: string): {
29
- readonly id: "codex";
30
- readonly displayName: "Codex";
31
- readonly protocol: "acp";
32
- readonly command: "npx";
33
- readonly args: readonly ["-y", "@agentclientprotocol/codex-acp@1.7.0"];
34
- } | {
35
- readonly id: "claude-code";
36
- readonly displayName: "Claude Code";
37
- readonly protocol: "acp";
38
- readonly command: "npx";
39
- readonly args: readonly ["-y", "@agentclientprotocol/claude-agent-acp@0.70.0"];
40
- } | {
41
- readonly id: "hermes";
42
- readonly displayName: "Hermes";
43
- readonly protocol: "acp";
44
- readonly command: "hermes";
45
- readonly args: readonly ["acp"];
46
- };
47
- //# sourceMappingURL=adapter-manifests.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"adapter-manifests.d.ts","sourceRoot":"","sources":["../src/adapter-manifests.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,UAAU,CAAA;AAChD,eAAO,MAAM,gCAAgC,WAAW,CAAA;AACxD,eAAO,MAAM,4BAA4B,WAAW,CAAA;AAEpD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;CAsBxB,CAAA;AAEV,MAAM,MAAM,oBAAoB,GAAG,MAAM,OAAO,qBAAqB,CAAA;AAErE,wBAAgB,yBAAyB,CAAC,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;EAEnD"}
@@ -1,30 +0,0 @@
1
- export const CODEX_ACP_PACKAGE_VERSION = '1.7.0';
2
- export const CLAUDE_AGENT_ACP_PACKAGE_VERSION = '0.70.0';
3
- export const HERMES_AGENT_MINIMUM_VERSION = '0.20.6';
4
- export const ACP_ADAPTER_MANIFESTS = {
5
- codex: {
6
- id: 'codex',
7
- displayName: 'Codex',
8
- protocol: 'acp',
9
- command: 'npx',
10
- args: ['-y', `@agentclientprotocol/codex-acp@${CODEX_ACP_PACKAGE_VERSION}`],
11
- },
12
- 'claude-code': {
13
- id: 'claude-code',
14
- displayName: 'Claude Code',
15
- protocol: 'acp',
16
- command: 'npx',
17
- args: ['-y', `@agentclientprotocol/claude-agent-acp@${CLAUDE_AGENT_ACP_PACKAGE_VERSION}`],
18
- },
19
- hermes: {
20
- id: 'hermes',
21
- displayName: 'Hermes',
22
- protocol: 'acp',
23
- command: 'hermes',
24
- args: ['acp'],
25
- },
26
- };
27
- export function resolveAcpAdapterManifest(id) {
28
- return ACP_ADAPTER_MANIFESTS[id];
29
- }
30
- //# sourceMappingURL=adapter-manifests.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"adapter-manifests.js","sourceRoot":"","sources":["../src/adapter-manifests.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,yBAAyB,GAAG,OAAO,CAAA;AAChD,MAAM,CAAC,MAAM,gCAAgC,GAAG,QAAQ,CAAA;AACxD,MAAM,CAAC,MAAM,4BAA4B,GAAG,QAAQ,CAAA;AAEpD,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,KAAK,EAAE;QACL,EAAE,EAAE,OAAO;QACX,WAAW,EAAE,OAAO;QACpB,QAAQ,EAAE,KAAc;QACxB,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,CAAC,IAAI,EAAE,kCAAkC,yBAAyB,EAAE,CAAC;KAC5E;IACD,aAAa,EAAE;QACb,EAAE,EAAE,aAAa;QACjB,WAAW,EAAE,aAAa;QAC1B,QAAQ,EAAE,KAAc;QACxB,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,CAAC,IAAI,EAAE,yCAAyC,gCAAgC,EAAE,CAAC;KAC1F;IACD,MAAM,EAAE;QACN,EAAE,EAAE,QAAQ;QACZ,WAAW,EAAE,QAAQ;QACrB,QAAQ,EAAE,KAAc;QACxB,OAAO,EAAE,QAAQ;QACjB,IAAI,EAAE,CAAC,KAAK,CAAC;KACd;CACO,CAAA;AAIV,MAAM,UAAU,yBAAyB,CAAC,EAAU;IAClD,OAAO,qBAAqB,CAAC,EAA0B,CAAC,CAAA;AAC1D,CAAC"}
package/dist/adapter.d.ts DELETED
@@ -1,40 +0,0 @@
1
- import type { AdapterCapability, AgentHostEvent } from '@layernorm/overlay-agent-bridge-protocol';
2
- type NormalizeEvent<Event> = Event extends AgentHostEvent ? Pick<Event, 'type' | 'payload'> : never;
3
- export type NormalizedAgentEvent = NormalizeEvent<AgentHostEvent>;
4
- export type EmitAgentEvent = (event: NormalizedAgentEvent) => Promise<void>;
5
- export type StartAdapterSessionInput = {
6
- runId: string;
7
- workingDirectory: string;
8
- additionalDirectories: string[];
9
- prompt: string;
10
- remoteSessionId?: string;
11
- metadata: Record<string, unknown>;
12
- adapterState?: Record<string, unknown>;
13
- persistAdapterState?: (state: Record<string, unknown>) => void;
14
- /**
15
- * Environment variables for this run's agent process only (a person's
16
- * provider credentials on Overlay Cloud). Held in memory; never written to
17
- * the host's state or logs.
18
- */
19
- credentials?: Record<string, string>;
20
- };
21
- export interface AgentAdapterSession {
22
- readonly remoteSessionId: string;
23
- /** The adapter dispatched the first prompt while creating the remote session. */
24
- readonly initialPromptHandled?: boolean;
25
- prompt(prompt: string): Promise<void>;
26
- approve(requestKey: string, optionId: string): Promise<void>;
27
- elicit(requestKey: string, action: 'accept' | 'decline' | 'cancel', content?: Record<string, unknown>): Promise<void>;
28
- cancel(reason?: string): Promise<void>;
29
- /** Must describe a specific executing process, not just a loaded session record. */
30
- observe?(): Promise<'live' | 'lost' | 'unknown'>;
31
- resume(): Promise<void>;
32
- stop(reason?: string): Promise<void>;
33
- }
34
- export interface AgentAdapter {
35
- readonly capability: AdapterCapability;
36
- discover(): Promise<AdapterCapability>;
37
- start(input: StartAdapterSessionInput, emit: EmitAgentEvent): Promise<AgentAdapterSession>;
38
- }
39
- export {};
40
- //# sourceMappingURL=adapter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAA;AAEjG,KAAK,cAAc,CAAC,KAAK,IAAI,KAAK,SAAS,cAAc,GAAG,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,KAAK,CAAA;AACnG,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAA;AACjE,MAAM,MAAM,cAAc,GAAG,CAAC,KAAK,EAAE,oBAAoB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;AAE3E,MAAM,MAAM,wBAAwB,GAAG;IACrC,KAAK,EAAE,MAAM,CAAA;IACb,gBAAgB,EAAE,MAAM,CAAA;IACxB,qBAAqB,EAAE,MAAM,EAAE,CAAA;IAC/B,MAAM,EAAE,MAAM,CAAA;IACd,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACtC,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,C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- {"version":3,"file":"adapter.js","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":""}
@@ -1,75 +0,0 @@
1
- import { type ClientSession, type MessageResponse, type MessageStreamEvent } from 'eve/client';
2
- import type { AgentAdapter, AgentAdapterSession, EmitAgentEvent, StartAdapterSessionInput } from './adapter.js';
3
- type EveSessionLike = Pick<ClientSession, 'state' | 'send' | 'respond' | 'cancel' | 'stream'> & Partial<Pick<ClientSession, 'snapshot'>>;
4
- type EveResponseLike = Pick<MessageResponse, 'cancel'> & AsyncIterable<MessageStreamEvent>;
5
- type EveClientLike = {
6
- sessions: {
7
- create(input: {
8
- message: string;
9
- }): Promise<{
10
- session: EveSessionLike;
11
- response: EveResponseLike;
12
- }>;
13
- attach(sessionId: string, options?: {
14
- streamIndex?: number;
15
- }): EveSessionLike;
16
- };
17
- };
18
- export type EveAgentAdapterOptions = {
19
- id?: string;
20
- displayName?: string;
21
- host: string;
22
- bearerToken?: string | (() => string | Promise<string>);
23
- clientFactory?: () => EveClientLike;
24
- };
25
- /**
26
- * A deliberately narrow bridge over Eve's supported client/session surface.
27
- * Overlay remains authoritative for commands, approvals, transcript projection,
28
- * billing, and audit; the Eve service owns only its durable agent session.
29
- */
30
- export declare class EveAgentAdapter implements AgentAdapter {
31
- private readonly options;
32
- readonly capability: {
33
- id: string;
34
- displayName: string;
35
- protocol: "eve";
36
- version: string;
37
- recovery: {
38
- liveReattachment: boolean;
39
- sessionLoading: boolean;
40
- interruptedTurnContinuation: boolean;
41
- approvalRestoration: boolean;
42
- providerCheckpoints: boolean;
43
- };
44
- supports: {
45
- prompt: boolean;
46
- approval: boolean;
47
- cancel: boolean;
48
- resume: boolean;
49
- };
50
- };
51
- private readonly createClient;
52
- constructor(options: EveAgentAdapterOptions);
53
- discover(): Promise<{
54
- id: string;
55
- displayName: string;
56
- protocol: "eve";
57
- version: string;
58
- recovery: {
59
- liveReattachment: boolean;
60
- sessionLoading: boolean;
61
- interruptedTurnContinuation: boolean;
62
- approvalRestoration: boolean;
63
- providerCheckpoints: boolean;
64
- };
65
- supports: {
66
- prompt: boolean;
67
- approval: boolean;
68
- cancel: boolean;
69
- resume: boolean;
70
- };
71
- }>;
72
- start(input: StartAdapterSessionInput, emit: EmitAgentEvent): Promise<AgentAdapterSession>;
73
- }
74
- export {};
75
- //# sourceMappingURL=eve-adapter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"eve-adapter.d.ts","sourceRoot":"","sources":["../src/eve-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,aAAa,EAAyC,KAAK,eAAe,EAAE,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAA;AACzK,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAA;AAE/G,KAAK,cAAc,GAAG,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC,CAAA;AACxI,KAAK,eAAe,GAAG,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC,GAAG,aAAa,CAAC,kBAAkB,CAAC,CAAA;AAC1F,KAAK,aAAa,GAAG;IACnB,QAAQ,EAAE;QACR,MAAM,CAAC,KAAK,EAAE;YAAE,OAAO,EAAE,MAAM,CAAA;SAAE,GAAG,OAAO,CAAC;YAAE,OAAO,EAAE,cAAc,CAAC;YAAC,QAAQ,EAAE,eAAe,CAAA;SAAE,CAAC,CAAA;QACnG,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;YAAE,WAAW,CAAC,EAAE,MAAM,CAAA;SAAE,GAAG,cAAc,CAAA;KAC9E,CAAA;CACF,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,WAAW,CAAC,EAAE,MAAM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