@xenosystem/acp-agent 0.2.1 → 0.2.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/acpAgentServer.d.ts +1 -0
- package/dist/acpAgentServer.d.ts.map +1 -1
- package/dist/acpAgentServer.js +108 -3
- package/dist/acpAgentServer.js.map +1 -1
- package/dist/cli.js +22 -1
- package/dist/cli.js.map +1 -1
- package/dist/config/providerPolicySchema.d.ts.map +1 -1
- package/dist/config/providerPolicySchema.js +3 -1
- package/dist/config/providerPolicySchema.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/providers/claudeLocalProvider.d.ts +3 -1
- package/dist/providers/claudeLocalProvider.d.ts.map +1 -1
- package/dist/providers/claudeLocalProvider.js +48 -5
- package/dist/providers/claudeLocalProvider.js.map +1 -1
- package/dist/providers/claudeStreamJsonParser.d.ts +36 -0
- package/dist/providers/claudeStreamJsonParser.d.ts.map +1 -1
- package/dist/providers/claudeStreamJsonParser.js +117 -3
- package/dist/providers/claudeStreamJsonParser.js.map +1 -1
- package/dist/providers/codexExecJsonParser.d.ts +2 -0
- package/dist/providers/codexExecJsonParser.d.ts.map +1 -1
- package/dist/providers/codexExecJsonParser.js +26 -3
- package/dist/providers/codexExecJsonParser.js.map +1 -1
- package/dist/providers/codexLocalProvider.d.ts +4 -1
- package/dist/providers/codexLocalProvider.d.ts.map +1 -1
- package/dist/providers/codexLocalProvider.js +74 -10
- package/dist/providers/codexLocalProvider.js.map +1 -1
- package/dist/providers/fixtureProvider.d.ts.map +1 -1
- package/dist/providers/fixtureProvider.js +69 -0
- package/dist/providers/fixtureProvider.js.map +1 -1
- package/dist/providers/providerEvents.d.ts +29 -0
- package/dist/providers/providerEvents.d.ts.map +1 -1
- package/dist/providers/providerEvents.js +15 -1
- package/dist/providers/providerEvents.js.map +1 -1
- package/dist/providers/providerRegistry.d.ts +24 -1
- package/dist/providers/providerRegistry.d.ts.map +1 -1
- package/dist/providers/providerRegistry.js +314 -1
- package/dist/providers/providerRegistry.js.map +1 -1
- package/dist/providers/providerTypes.d.ts +96 -1
- package/dist/providers/providerTypes.d.ts.map +1 -1
- package/dist/providers/residentContextTokens.d.ts +41 -0
- package/dist/providers/residentContextTokens.d.ts.map +1 -0
- package/dist/providers/residentContextTokens.js +55 -0
- package/dist/providers/residentContextTokens.js.map +1 -0
- package/dist/providers/xenoLocalProvider.d.ts.map +1 -1
- package/dist/providers/xenoLocalProvider.js +23 -0
- package/dist/providers/xenoLocalProvider.js.map +1 -1
- package/dist/providers/xenoSdkProvider.d.ts.map +1 -1
- package/dist/providers/xenoSdkProvider.js +23 -0
- package/dist/providers/xenoSdkProvider.js.map +1 -1
- package/dist/security/authPolicy.d.ts.map +1 -1
- package/dist/security/authPolicy.js +4 -1
- package/dist/security/authPolicy.js.map +1 -1
- package/dist/security/secretBinding.d.ts.map +1 -1
- package/dist/security/secretBinding.js +3 -1
- package/dist/security/secretBinding.js.map +1 -1
- package/dist/security/securityTypes.d.ts +13 -1
- package/dist/security/securityTypes.d.ts.map +1 -1
- package/dist/security/securityTypes.js +13 -0
- package/dist/security/securityTypes.js.map +1 -1
- package/dist/types.d.ts +9 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +14 -28
- package/dist/fixtureProvider.d.ts +0 -13
- package/dist/fixtureProvider.d.ts.map +0 -1
- package/dist/fixtureProvider.js +0 -86
- package/dist/fixtureProvider.js.map +0 -1
- package/dist/hosted/xeno-agents-client.d.ts +0 -306
- package/dist/hosted/xeno-agents-client.d.ts.map +0 -1
- package/dist/hosted/xeno-agents-client.js +0 -520
- package/dist/hosted/xeno-agents-client.js.map +0 -1
- package/dist/providers/xenoAgentsApiEventMapper.d.ts +0 -52
- package/dist/providers/xenoAgentsApiEventMapper.d.ts.map +0 -1
- package/dist/providers/xenoAgentsApiEventMapper.js +0 -152
- package/dist/providers/xenoAgentsApiEventMapper.js.map +0 -1
- package/dist/providers/xenoAgentsApiProvider.d.ts +0 -60
- package/dist/providers/xenoAgentsApiProvider.d.ts.map +0 -1
- package/dist/providers/xenoAgentsApiProvider.js +0 -302
- package/dist/providers/xenoAgentsApiProvider.js.map +0 -1
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Event mapper: hosted `xeno-agents-api` run events → normalized `ProviderEvent` payloads.
|
|
3
|
-
*
|
|
4
|
-
* The hosted run stream (see `../hosted/xeno-agents-client.ts`) yields `RunEvent`s whose `type`
|
|
5
|
-
* is either an SDK runtime-event kind (`model.text.delta`, `tool.started`, `tool.completed`,
|
|
6
|
-
* `turn.completed`, …) or a run-lifecycle kind (`run.completed` / `run.failed` / `run.cancelled`).
|
|
7
|
-
* This module is a PURE, side-effect-free translator from a single `RunEvent` to zero-or-more
|
|
8
|
-
* `{ kind, payload }` pairs that the provider runtime wraps with its event factory and emits
|
|
9
|
-
* through `ProviderRuntimeContext.emit`. The ACP server then maps the streamable ones to ACP
|
|
10
|
-
* `session/update` notifications via `providerEventToAcpUpdate`.
|
|
11
|
-
*
|
|
12
|
-
* IMPLEMENTED mappings (streamed to ACP today):
|
|
13
|
-
* - `model.text.delta` → `message_delta` → ACP `agent_message_chunk`
|
|
14
|
-
* - `tool.started` → `tool_started` → ACP `tool_call` (pending)
|
|
15
|
-
* - `tool.completed` → `tool_completed` → ACP `tool_call_update` (completed)
|
|
16
|
-
* - `tool.failed` → `tool_failed` → ACP `tool_call_update` (failed)
|
|
17
|
-
* - `run.completed` / `run.failed` / `run.cancelled` → terminal disposition (NOT an ACP update;
|
|
18
|
-
* it is the prompt's return disposition, exactly like the fixture/local adapters).
|
|
19
|
-
* - token usage on `turn.completed` / `run.usage` → captured for `ProviderPromptResult.usage`.
|
|
20
|
-
*
|
|
21
|
-
* DOCUMENTED-FOR-LATER (see docs/XACP_XENO_AGENTS_API_PROVIDER.md §"Mapping coverage"):
|
|
22
|
-
* - `tool.permission` — the hosted run may block awaiting a permission decision. ACP has a
|
|
23
|
-
* first-class `session/request_permission` round-trip; wiring the hosted permission gate to it
|
|
24
|
-
* (and relaying the client's decision back via a control call) is a follow-up. Today such an
|
|
25
|
-
* event is surfaced as a `diagnostic` so nothing is silently dropped.
|
|
26
|
-
* - `plan` — the hosted SDK does not emit ACP-style plan entries in the canonical set; if/when it
|
|
27
|
-
* does they map 1:1 to `plan` → ACP `plan`.
|
|
28
|
-
*/
|
|
29
|
-
const TERMINAL_RUN_EVENTS = {
|
|
30
|
-
"run.completed": "completed",
|
|
31
|
-
"run.cancelled": "cancelled",
|
|
32
|
-
"run.failed": "failed",
|
|
33
|
-
};
|
|
34
|
-
/** The terminal disposition a run-lifecycle event implies, or undefined for a non-terminal event. */
|
|
35
|
-
export function terminalDispositionFor(eventType) {
|
|
36
|
-
return TERMINAL_RUN_EVENTS[eventType];
|
|
37
|
-
}
|
|
38
|
-
function asRecord(value) {
|
|
39
|
-
return value && typeof value === "object" && !Array.isArray(value) ? value : undefined;
|
|
40
|
-
}
|
|
41
|
-
function firstString(...values) {
|
|
42
|
-
for (const v of values) {
|
|
43
|
-
if (typeof v === "string" && v.trim())
|
|
44
|
-
return v;
|
|
45
|
-
}
|
|
46
|
-
return undefined;
|
|
47
|
-
}
|
|
48
|
-
/** Resolve a stable tool-call id from the many places the SDK may carry it. */
|
|
49
|
-
function toolCallIdOf(ev) {
|
|
50
|
-
const p = asRecord(ev.payload) ?? {};
|
|
51
|
-
return (firstString(ev.toolCallId, p.toolCallId, p.toolCallID, p.callId, p.id, p.toolId) ?? `run-tool-${typeof ev.sequence === "number" ? ev.sequence : "unknown"}`);
|
|
52
|
-
}
|
|
53
|
-
/** Best-effort ACP tool-kind classification from the tool name (defaults to undefined → "other"). */
|
|
54
|
-
function toolKindOf(name) {
|
|
55
|
-
if (!name)
|
|
56
|
-
return undefined;
|
|
57
|
-
const n = name.toLowerCase();
|
|
58
|
-
if (/(read|grep|glob|search|find|ls|cat|view)/.test(n))
|
|
59
|
-
return "read";
|
|
60
|
-
if (/(edit|write|apply|patch|replace|create)/.test(n))
|
|
61
|
-
return "edit";
|
|
62
|
-
if (/(delete|rm|remove)/.test(n))
|
|
63
|
-
return "delete";
|
|
64
|
-
if (/(move|rename|mv)/.test(n))
|
|
65
|
-
return "move";
|
|
66
|
-
if (/(bash|shell|exec|run|terminal|cmd)/.test(n))
|
|
67
|
-
return "execute";
|
|
68
|
-
if (/(fetch|http|web|curl|download)/.test(n))
|
|
69
|
-
return "fetch";
|
|
70
|
-
return undefined;
|
|
71
|
-
}
|
|
72
|
-
function textFrom(ev) {
|
|
73
|
-
const p = asRecord(ev.payload);
|
|
74
|
-
return firstString(ev.text, p?.text, p?.delta, p?.chunk);
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Capture run/turn token usage from a `RunEvent`. Prefers the authoritative `run.usage` totals;
|
|
78
|
-
* falls back to per-turn `turn.completed` token usage. Returns undefined when the event carries no
|
|
79
|
-
* usage.
|
|
80
|
-
*/
|
|
81
|
-
export function extractRunUsage(ev) {
|
|
82
|
-
const usage = ev.usage ?? ev.tokenUsage;
|
|
83
|
-
if (usage && typeof usage === "object") {
|
|
84
|
-
const u = usage;
|
|
85
|
-
const input = typeof u.input === "number" ? u.input : undefined;
|
|
86
|
-
const output = typeof u.output === "number" ? u.output : undefined;
|
|
87
|
-
const total = typeof u.total === "number" ? u.total : undefined;
|
|
88
|
-
if (input !== undefined || output !== undefined || total !== undefined) {
|
|
89
|
-
return {
|
|
90
|
-
...(input !== undefined ? { inputTokens: input } : {}),
|
|
91
|
-
...(output !== undefined ? { outputTokens: output } : {}),
|
|
92
|
-
...(total !== undefined ? { totalTokens: total } : {}),
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
return undefined;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Translate one hosted `RunEvent` into zero-or-more provider-event payloads. Terminal
|
|
100
|
-
* lifecycle events return `[]` here (their effect is the prompt disposition, resolved by the
|
|
101
|
-
* runtime via `terminalDispositionFor`); token-usage-only events also return `[]` (captured via
|
|
102
|
-
* `extractRunUsage`).
|
|
103
|
-
*/
|
|
104
|
-
export function mapRunEventToProviderPayloads(ev) {
|
|
105
|
-
switch (ev.type) {
|
|
106
|
-
case "model.text.delta": {
|
|
107
|
-
const text = textFrom(ev);
|
|
108
|
-
return text ? [{ kind: "message_delta", payload: { text } }] : [];
|
|
109
|
-
}
|
|
110
|
-
case "tool.started": {
|
|
111
|
-
const title = firstString(ev.toolName, asRecord(ev.payload)?.title) ?? "Tool";
|
|
112
|
-
const kind = toolKindOf(ev.toolName ?? title);
|
|
113
|
-
const payload = {
|
|
114
|
-
toolCallId: toolCallIdOf(ev),
|
|
115
|
-
title,
|
|
116
|
-
...(kind ? { kind } : {}),
|
|
117
|
-
status: "in_progress",
|
|
118
|
-
...(ev.inputPreview !== undefined ? { rawInput: ev.inputPreview } : {}),
|
|
119
|
-
};
|
|
120
|
-
return [{ kind: "tool_started", payload }];
|
|
121
|
-
}
|
|
122
|
-
case "tool.completed": {
|
|
123
|
-
const payload = {
|
|
124
|
-
toolCallId: toolCallIdOf(ev),
|
|
125
|
-
status: "completed",
|
|
126
|
-
outcome: "succeeded",
|
|
127
|
-
...(ev.resultPreview !== undefined ? { rawOutput: ev.resultPreview } : {}),
|
|
128
|
-
};
|
|
129
|
-
return [{ kind: "tool_completed", payload }];
|
|
130
|
-
}
|
|
131
|
-
case "tool.failed": {
|
|
132
|
-
const payload = {
|
|
133
|
-
toolCallId: toolCallIdOf(ev),
|
|
134
|
-
status: "failed",
|
|
135
|
-
outcome: "failed",
|
|
136
|
-
...(ev.resultPreview !== undefined ? { rawOutput: ev.resultPreview } : {}),
|
|
137
|
-
};
|
|
138
|
-
return [{ kind: "tool_failed", payload }];
|
|
139
|
-
}
|
|
140
|
-
case "tool.permission": {
|
|
141
|
-
// DOCUMENTED-FOR-LATER: hosted permission gate → ACP request_permission round-trip.
|
|
142
|
-
// Surface as a diagnostic so the block is observable and never silently dropped.
|
|
143
|
-
const name = firstString(ev.toolName) ?? "tool";
|
|
144
|
-
return [{ kind: "diagnostic", payload: { message: `hosted run is awaiting a permission decision for ${name} (not yet wired to ACP request_permission)` } }];
|
|
145
|
-
}
|
|
146
|
-
default:
|
|
147
|
-
// thread.started / turn.started / turn.completed / query.state / run.status / run.usage
|
|
148
|
-
// and unknown additive kinds carry no ACP session/update. Usage is captured separately.
|
|
149
|
-
return [];
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
//# sourceMappingURL=xenoAgentsApiEventMapper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"xenoAgentsApiEventMapper.js","sourceRoot":"","sources":["../../src/providers/xenoAgentsApiEventMapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAYH,MAAM,mBAAmB,GAAyD;IAChF,eAAe,EAAE,WAAW;IAC5B,eAAe,EAAE,WAAW;IAC5B,YAAY,EAAE,QAAQ;CACvB,CAAC;AAEF,qGAAqG;AACrG,MAAM,UAAU,sBAAsB,CAAC,SAAiB;IACtD,OAAO,mBAAmB,CAAC,SAAS,CAAC,CAAC;AACxC,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAE,KAAiC,CAAC,CAAC,CAAC,SAAS,CAAC;AACtH,CAAC;AAED,SAAS,WAAW,CAAC,GAAG,MAAiB;IACvC,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE,CAAC;QACvB,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,EAAE;YAAE,OAAO,CAAC,CAAC;IAClD,CAAC;IACD,OAAO,SAAS,CAAC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C,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aAC3E,CAAC;YACF,OAAO,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,CAAC,CAAC;QAC/C,CAAC;QACD,KAAK,aAAa,CAAC,CAAC,CAAC;YACnB,MAAM,OAAO,GAAgB;gBAC3B,UAAU,EAAE,YAAY,CAAC,EAAE,CAAC;gBAC5B,MAAM,EAAE,QAAQ;gBAChB,OAAO,EAAE,QAAQ;gBACjB,GAAG,CAAC,EAAE,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aAC3E,CAAC;YACF,OAAO,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC,CAAC;QAC5C,CAAC;QACD,KAAK,iBAAiB,CAAC,CAAC,CAAC;YACvB,oFAAoF;YACpF,iFAAiF;YACjF,MAAM,IAAI,GAAG,WAAW,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,MAAM,CAAC;YAChD,OAAO,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,oDAAoD,IAAI,4CAA4C,EAAE,EAAE,CAAC,CAAC;QAC9J,CAAC;QACD;YACE,wFAAwF;YACxF,wFAAwF;YACxF,OAAO,EAAE,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `xeno-agents-api` — drive a XENO **hosted agent run** through the ACP provider contract.
|
|
3
|
-
*
|
|
4
|
-
* Unlike every other provider in this package, this one does NOT spawn a local CLI/process. It
|
|
5
|
-
* maps the frozen v1 provider-runtime contract (definition → session → prompt → cancel) onto the
|
|
6
|
-
* hosted-runs wire client (`../hosted/xeno-agents-client.ts`, the vendored `@xeno/agents-client`):
|
|
7
|
-
*
|
|
8
|
-
* - `createSession()` → allocates an ACP-local session id; run creation is deferred to prompt.
|
|
9
|
-
* - `prompt(request, ctx)` → `client.createRun({ prompt })` + `client.attach(runId)`, translating
|
|
10
|
-
* each hosted `RunEvent` to `ProviderEvent`s (see
|
|
11
|
-
* `xenoAgentsApiEventMapper.ts`) which the ACP server maps to
|
|
12
|
-
* `session/update` notifications. Token usage is returned in the result.
|
|
13
|
-
* - `cancel(sessionId)` → `client.stopRun(runId)` (graceful) + the prompt AbortSignal breaks attach.
|
|
14
|
-
*
|
|
15
|
-
* The run executes in the CLOUD (api.xenostudio.ai); this provider is a thin, streaming bridge. It
|
|
16
|
-
* therefore truthfully declares `authRequirement`/`networkRequirement: required` and carries no
|
|
17
|
-
* LOCAL filesystem/terminal authority (the hosted run does its own I/O server-side). Consequently
|
|
18
|
-
* the capability gate classifies it `requires_approval` — it never runs "just because it exists";
|
|
19
|
-
* the CLI's `resolveProviderStatus` (policy + approval) is the authoritative run-gate, exactly like
|
|
20
|
-
* `claude-local`.
|
|
21
|
-
*
|
|
22
|
-
* AUTH/CONFIG INTEGRATION POINT (xeno-acp has NO account layer): the platform bearer token + base
|
|
23
|
-
* URL are supplied via provider `options` — `{ token, baseUrl?, workspace?, fetchImpl?, client? }` —
|
|
24
|
-
* or, as a fallback, the `XENO_AGENTS_API_TOKEN` / `XENO_AGENTS_API_BASE_URL` /
|
|
25
|
-
* `XENO_AGENTS_API_WORKSPACE` environment variables. An embedder (e.g. XENO Hub) that already holds
|
|
26
|
-
* a token injects it directly through `options.token`; tests inject a mock `options.client`.
|
|
27
|
-
*/
|
|
28
|
-
import { type AgentsClient, type CreateRunInput, type TokenProvider } from "../hosted/xeno-agents-client.js";
|
|
29
|
-
import type { ProviderCapabilitySet, ProviderDefinition } from "./providerTypes.js";
|
|
30
|
-
export declare const XENO_AGENTS_API_ID = "xeno-agents-api";
|
|
31
|
-
export declare const XENO_AGENTS_API_DEFAULT_HOST = "api.xenostudio.ai";
|
|
32
|
-
/** Truthful capability declaration: streams text + tool calls, needs auth + network, no LOCAL I/O. */
|
|
33
|
-
export declare const XENO_AGENTS_API_CAPABILITIES: ProviderCapabilitySet;
|
|
34
|
-
/** Env fallbacks used only when the corresponding option is not supplied. */
|
|
35
|
-
export declare const XENO_AGENTS_API_TOKEN_ENV = "XENO_AGENTS_API_TOKEN";
|
|
36
|
-
export declare const XENO_AGENTS_API_BASE_URL_ENV = "XENO_AGENTS_API_BASE_URL";
|
|
37
|
-
export declare const XENO_AGENTS_API_WORKSPACE_ENV = "XENO_AGENTS_API_WORKSPACE";
|
|
38
|
-
export interface XenoAgentsApiOptions {
|
|
39
|
-
/** Pre-built client (tests inject a mock; embedders may share a configured client). */
|
|
40
|
-
client?: AgentsClient;
|
|
41
|
-
/** Platform bearer — an OIDC JWT or (once the server accepts it) a platform API key. */
|
|
42
|
-
token?: TokenProvider;
|
|
43
|
-
/** Base of the agents API. Defaults to the client's default (https://api.xenostudio.ai/v1/agents). */
|
|
44
|
-
baseUrl?: string;
|
|
45
|
-
/** Optional workspace selector → `x-xeno-workspace`. */
|
|
46
|
-
workspace?: string;
|
|
47
|
-
/** Optional fetch impl (custom / testing). */
|
|
48
|
-
fetchImpl?: typeof fetch;
|
|
49
|
-
/** Default model for created runs when the prompt does not specify one. */
|
|
50
|
-
model?: string;
|
|
51
|
-
/** Extra `createRun` fields (effort, budget, previousRunId, repo, …) applied to every run. */
|
|
52
|
-
runDefaults?: Partial<Omit<CreateRunInput, "prompt" | "model">>;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* The `xeno-agents-api` provider definition: a REAL, enabled, XENO-owned, **approval-gated**
|
|
56
|
-
* hosted bridge. `authRequirement`/`networkRequirement` are `required` (truthful), so the capability
|
|
57
|
-
* gate returns `requires_approval` — never runnable without a current policy + approval.
|
|
58
|
-
*/
|
|
59
|
-
export declare function createXenoAgentsApiDefinition(): ProviderDefinition;
|
|
60
|
-
//# sourceMappingURL=xenoAgentsApiProvider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"xenoAgentsApiProvider.d.ts","sourceRoot":"","sources":["../../src/providers/xenoAgentsApiProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAwC,KAAK,YAAY,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,iCAAiC,CAAC;AASnJ,OAAO,KAAK,EACV,qBAAqB,EACrB,kBAAkB,EAQnB,MAAM,oBAAoB,CAAC;AAG5B,eAAO,MAAM,kBAAkB,oBAAoB,CAAC;AACpD,eAAO,MAAM,4BAA4B,sBAAsB,CAAC;AAEhE,sGAAsG;AACtG,eAAO,MAAM,4BAA4B,EAAE,qBAY1C,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,yBAAyB,0BAA0B,CAAC;AACjE,eAAO,MAAM,4BAA4B,6BAA6B,CAAC;AACvE,eAAO,MAAM,6BAA6B,8BAA8B,CAAC;AAEzE,MAAM,WAAW,oBAAoB;IACnC,uFAAuF;IACvF,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,wFAAwF;IACxF,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,sGAAsG;IACtG,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8FAA8F;IAC9F,WAAW,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC;CACjE;AA4ND;;;;GAIG;AACH,wBAAgB,6BAA6B,IAAI,kBAAkB,CA4ClE"}
|
|
@@ -1,302 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `xeno-agents-api` — drive a XENO **hosted agent run** through the ACP provider contract.
|
|
3
|
-
*
|
|
4
|
-
* Unlike every other provider in this package, this one does NOT spawn a local CLI/process. It
|
|
5
|
-
* maps the frozen v1 provider-runtime contract (definition → session → prompt → cancel) onto the
|
|
6
|
-
* hosted-runs wire client (`../hosted/xeno-agents-client.ts`, the vendored `@xeno/agents-client`):
|
|
7
|
-
*
|
|
8
|
-
* - `createSession()` → allocates an ACP-local session id; run creation is deferred to prompt.
|
|
9
|
-
* - `prompt(request, ctx)` → `client.createRun({ prompt })` + `client.attach(runId)`, translating
|
|
10
|
-
* each hosted `RunEvent` to `ProviderEvent`s (see
|
|
11
|
-
* `xenoAgentsApiEventMapper.ts`) which the ACP server maps to
|
|
12
|
-
* `session/update` notifications. Token usage is returned in the result.
|
|
13
|
-
* - `cancel(sessionId)` → `client.stopRun(runId)` (graceful) + the prompt AbortSignal breaks attach.
|
|
14
|
-
*
|
|
15
|
-
* The run executes in the CLOUD (api.xenostudio.ai); this provider is a thin, streaming bridge. It
|
|
16
|
-
* therefore truthfully declares `authRequirement`/`networkRequirement: required` and carries no
|
|
17
|
-
* LOCAL filesystem/terminal authority (the hosted run does its own I/O server-side). Consequently
|
|
18
|
-
* the capability gate classifies it `requires_approval` — it never runs "just because it exists";
|
|
19
|
-
* the CLI's `resolveProviderStatus` (policy + approval) is the authoritative run-gate, exactly like
|
|
20
|
-
* `claude-local`.
|
|
21
|
-
*
|
|
22
|
-
* AUTH/CONFIG INTEGRATION POINT (xeno-acp has NO account layer): the platform bearer token + base
|
|
23
|
-
* URL are supplied via provider `options` — `{ token, baseUrl?, workspace?, fetchImpl?, client? }` —
|
|
24
|
-
* or, as a fallback, the `XENO_AGENTS_API_TOKEN` / `XENO_AGENTS_API_BASE_URL` /
|
|
25
|
-
* `XENO_AGENTS_API_WORKSPACE` environment variables. An embedder (e.g. XENO Hub) that already holds
|
|
26
|
-
* a token injects it directly through `options.token`; tests inject a mock `options.client`.
|
|
27
|
-
*/
|
|
28
|
-
import { createAgentsClient, isAgentsApiError } from "../hosted/xeno-agents-client.js";
|
|
29
|
-
import { createEventFactory } from "./providerEvents.js";
|
|
30
|
-
import { ProviderConfigurationError, ProviderInternalError } from "./providerErrors.js";
|
|
31
|
-
import { renderPromptText } from "./claudeLocalProvider.js";
|
|
32
|
-
import { extractRunUsage, mapRunEventToProviderPayloads, terminalDispositionFor, } from "./xenoAgentsApiEventMapper.js";
|
|
33
|
-
export const XENO_AGENTS_API_ID = "xeno-agents-api";
|
|
34
|
-
export const XENO_AGENTS_API_DEFAULT_HOST = "api.xenostudio.ai";
|
|
35
|
-
/** Truthful capability declaration: streams text + tool calls, needs auth + network, no LOCAL I/O. */
|
|
36
|
-
export const XENO_AGENTS_API_CAPABILITIES = {
|
|
37
|
-
streamsText: true,
|
|
38
|
-
emitsPlan: false,
|
|
39
|
-
emitsToolCalls: true,
|
|
40
|
-
emitsUsage: true,
|
|
41
|
-
supportsCancel: true,
|
|
42
|
-
supportsMultipleSessions: true,
|
|
43
|
-
requiresAuth: true, // a platform bearer token
|
|
44
|
-
usesNetwork: true, // calls api.xenostudio.ai
|
|
45
|
-
canReadFiles: false, // the hosted run does its own I/O in the cloud, not on this machine
|
|
46
|
-
canWriteFiles: false,
|
|
47
|
-
canRunTerminal: false,
|
|
48
|
-
};
|
|
49
|
-
/** Env fallbacks used only when the corresponding option is not supplied. */
|
|
50
|
-
export const XENO_AGENTS_API_TOKEN_ENV = "XENO_AGENTS_API_TOKEN";
|
|
51
|
-
export const XENO_AGENTS_API_BASE_URL_ENV = "XENO_AGENTS_API_BASE_URL";
|
|
52
|
-
export const XENO_AGENTS_API_WORKSPACE_ENV = "XENO_AGENTS_API_WORKSPACE";
|
|
53
|
-
class XenoAgentsApiRuntime {
|
|
54
|
-
definition;
|
|
55
|
-
options;
|
|
56
|
-
client;
|
|
57
|
-
sessionSeq = 0;
|
|
58
|
-
promptCount = 0;
|
|
59
|
-
/** Active hosted run id per ACP session, so `cancel` can stop the right run. */
|
|
60
|
-
activeRuns = new Map();
|
|
61
|
-
constructor(definition, config) {
|
|
62
|
-
this.definition = definition;
|
|
63
|
-
this.options = (config?.options ?? {});
|
|
64
|
-
}
|
|
65
|
-
initialize() { }
|
|
66
|
-
createSession() {
|
|
67
|
-
this.sessionSeq += 1;
|
|
68
|
-
return { sessionId: `${XENO_AGENTS_API_ID}-session-${this.sessionSeq}`, createdAt: new Date().toISOString() };
|
|
69
|
-
}
|
|
70
|
-
cancel(sessionId) {
|
|
71
|
-
const runId = this.activeRuns.get(sessionId);
|
|
72
|
-
if (!runId)
|
|
73
|
-
return;
|
|
74
|
-
// Fire-and-forget graceful stop; the prompt's AbortSignal also breaks the attach loop.
|
|
75
|
-
const client = this.client;
|
|
76
|
-
if (client) {
|
|
77
|
-
void client.stopRun(runId).catch(() => {
|
|
78
|
-
/* best-effort; the run may already be terminal */
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
dispose() {
|
|
83
|
-
this.activeRuns.clear();
|
|
84
|
-
}
|
|
85
|
-
diagnostics() {
|
|
86
|
-
return {
|
|
87
|
-
provider: this.definition.id,
|
|
88
|
-
sessionsCreated: this.sessionSeq,
|
|
89
|
-
promptsRun: this.promptCount,
|
|
90
|
-
activeRuns: this.activeRuns.size,
|
|
91
|
-
baseUrl: this.client?.baseUrl,
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
/** Resolve (once) the hosted-runs client from an injected client, options, or env. */
|
|
95
|
-
resolveClient() {
|
|
96
|
-
if (this.client)
|
|
97
|
-
return this.client;
|
|
98
|
-
if (this.options.client) {
|
|
99
|
-
this.client = this.options.client;
|
|
100
|
-
return this.client;
|
|
101
|
-
}
|
|
102
|
-
const token = this.options.token ?? envToken();
|
|
103
|
-
if (!token) {
|
|
104
|
-
throw new ProviderConfigurationError({
|
|
105
|
-
safeMessage: `${XENO_AGENTS_API_ID} requires a platform token (options.token or ${XENO_AGENTS_API_TOKEN_ENV})`,
|
|
106
|
-
providerId: this.definition.id,
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
const baseUrl = this.options.baseUrl ?? envString(XENO_AGENTS_API_BASE_URL_ENV);
|
|
110
|
-
const workspace = this.options.workspace ?? envString(XENO_AGENTS_API_WORKSPACE_ENV);
|
|
111
|
-
this.client = createAgentsClient({
|
|
112
|
-
token,
|
|
113
|
-
...(baseUrl ? { baseUrl } : {}),
|
|
114
|
-
...(workspace ? { workspace } : {}),
|
|
115
|
-
...(this.options.fetchImpl ? { fetchImpl: this.options.fetchImpl } : {}),
|
|
116
|
-
});
|
|
117
|
-
return this.client;
|
|
118
|
-
}
|
|
119
|
-
async prompt(request, ctx) {
|
|
120
|
-
this.promptCount += 1;
|
|
121
|
-
let client;
|
|
122
|
-
try {
|
|
123
|
-
client = this.resolveClient();
|
|
124
|
-
}
|
|
125
|
-
catch (err) {
|
|
126
|
-
const error = err instanceof ProviderConfigurationError
|
|
127
|
-
? err
|
|
128
|
-
: new ProviderConfigurationError({ safeMessage: "failed to configure hosted client", providerId: this.definition.id });
|
|
129
|
-
ctx.emit(factoryFor(this.definition.id, request).next("failed", { disposition: "failed", message: error.safeMessage }));
|
|
130
|
-
return { disposition: "failed", error };
|
|
131
|
-
}
|
|
132
|
-
const promptText = renderPromptText(request.prompt, request.systemPrompt) || "Reply concisely.";
|
|
133
|
-
const factory = factoryFor(this.definition.id, request);
|
|
134
|
-
const emit = (kind, payload) => ctx.emit(factory.next(kind, payload));
|
|
135
|
-
const model = request.model ?? this.options.model;
|
|
136
|
-
const createInput = {
|
|
137
|
-
prompt: promptText,
|
|
138
|
-
...(model ? { model } : {}),
|
|
139
|
-
...(request.cwd ? { cwd: request.cwd } : {}),
|
|
140
|
-
// This provider forwards `cwd`: an ACP client asks it to work IN a
|
|
141
|
-
// directory, so file work is the expected outcome, not an edge case.
|
|
142
|
-
// The server ENFORCES permissionMode and reads an omitted one as
|
|
143
|
-
// `default` — Read/Glob/Grep allowed, Write/Edit REFUSED — which would
|
|
144
|
-
// leave this provider able to read files it can never change, and fail
|
|
145
|
-
// silently at that. Say what we need explicitly.
|
|
146
|
-
//
|
|
147
|
-
// `acceptEdits` is the NARROWEST mode that permits edits inside the run's
|
|
148
|
-
// jail. `bypassPermissions` would also work and is deliberately NOT used:
|
|
149
|
-
// it is blanket autonomy that ignores deny rules, which is more authority
|
|
150
|
-
// than "edit the workspace you were pointed at" requires.
|
|
151
|
-
//
|
|
152
|
-
// Overridable: `runDefaults` spreads last, so an embedder can still pin
|
|
153
|
-
// this to `plan`/`default` for a read-only deployment.
|
|
154
|
-
permissionMode: "acceptEdits",
|
|
155
|
-
...(this.options.runDefaults ?? {}),
|
|
156
|
-
};
|
|
157
|
-
let usage;
|
|
158
|
-
let disposition = "completed";
|
|
159
|
-
let saw = false;
|
|
160
|
-
try {
|
|
161
|
-
const run = await client.createRun(createInput, { signal: ctx.signal });
|
|
162
|
-
this.activeRuns.set(request.sessionId, run.runId);
|
|
163
|
-
ctx.log(`hosted run created: ${run.runId} (status=${run.status})`);
|
|
164
|
-
for await (const ev of client.attach(run.runId, { signal: ctx.signal, reconnect: true })) {
|
|
165
|
-
const u = extractRunUsage(ev);
|
|
166
|
-
if (u)
|
|
167
|
-
usage = u;
|
|
168
|
-
for (const mapped of mapRunEventToProviderPayloads(ev)) {
|
|
169
|
-
emit(mapped.kind, mapped.payload);
|
|
170
|
-
}
|
|
171
|
-
const terminal = terminalDispositionFor(ev.type);
|
|
172
|
-
if (terminal) {
|
|
173
|
-
disposition = terminal;
|
|
174
|
-
saw = true;
|
|
175
|
-
if (terminal === "failed") {
|
|
176
|
-
const message = ev.error ?? ev.reason ?? "hosted run failed";
|
|
177
|
-
emit("failed", { disposition: "failed", message });
|
|
178
|
-
}
|
|
179
|
-
break;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
catch (err) {
|
|
184
|
-
// A caller-driven abort surfaces as an aborted signal → treat as cancelled, not failed.
|
|
185
|
-
if (ctx.signal.aborted) {
|
|
186
|
-
emit("cancelled", { disposition: "cancelled" });
|
|
187
|
-
return { disposition: "cancelled", ...(usage ? { usage } : {}) };
|
|
188
|
-
}
|
|
189
|
-
const safeMessage = isAgentsApiError(err)
|
|
190
|
-
? `hosted run error: ${err.code} (HTTP ${err.status})`
|
|
191
|
-
: `hosted run error: ${err?.message ?? String(err)}`;
|
|
192
|
-
const error = new ProviderInternalError({ safeMessage, providerId: this.definition.id });
|
|
193
|
-
emit("failed", { disposition: "failed", message: safeMessage });
|
|
194
|
-
return { disposition: "failed", error, ...(usage ? { usage } : {}) };
|
|
195
|
-
}
|
|
196
|
-
finally {
|
|
197
|
-
this.activeRuns.delete(request.sessionId);
|
|
198
|
-
}
|
|
199
|
-
if (ctx.signal.aborted && !saw) {
|
|
200
|
-
emit("cancelled", { disposition: "cancelled" });
|
|
201
|
-
return { disposition: "cancelled", ...(usage ? { usage } : {}) };
|
|
202
|
-
}
|
|
203
|
-
if (disposition === "cancelled") {
|
|
204
|
-
emit("cancelled", { disposition: "cancelled" });
|
|
205
|
-
}
|
|
206
|
-
else if (disposition === "completed") {
|
|
207
|
-
emit("completed", { disposition: "completed" });
|
|
208
|
-
}
|
|
209
|
-
return { disposition, ...(usage ? { usage } : {}) };
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
function factoryFor(providerId, request) {
|
|
213
|
-
return createEventFactory({
|
|
214
|
-
providerId,
|
|
215
|
-
sessionId: request.sessionId,
|
|
216
|
-
requestId: request.requestId,
|
|
217
|
-
now: () => new Date().toISOString(),
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
function envToken() {
|
|
221
|
-
return envString(XENO_AGENTS_API_TOKEN_ENV);
|
|
222
|
-
}
|
|
223
|
-
function envString(key) {
|
|
224
|
-
const v = typeof process !== "undefined" && process.env ? process.env[key] : undefined;
|
|
225
|
-
return typeof v === "string" && v.trim() ? v : undefined;
|
|
226
|
-
}
|
|
227
|
-
/** Default auth policy: a single required platform-token secret reference (metadata only). */
|
|
228
|
-
function defaultAuthPolicy() {
|
|
229
|
-
return {
|
|
230
|
-
requirement: "required",
|
|
231
|
-
allowedSecretRefs: [
|
|
232
|
-
{ id: XENO_AGENTS_API_TOKEN_ENV, kind: "manual", label: "XENO platform token (OIDC JWT / platform API key)", required: true, redactionHint: "credential" },
|
|
233
|
-
],
|
|
234
|
-
allowPlainEnv: false,
|
|
235
|
-
allowProcessEnv: false,
|
|
236
|
-
allowCredentialFiles: false,
|
|
237
|
-
allowInteractiveLogin: false,
|
|
238
|
-
};
|
|
239
|
-
}
|
|
240
|
-
/** Default egress policy: HTTPS to the XENO agents-api host only (metadata only). */
|
|
241
|
-
function defaultEgressPolicy() {
|
|
242
|
-
return {
|
|
243
|
-
mode: "allowlist",
|
|
244
|
-
allowedHosts: [XENO_AGENTS_API_DEFAULT_HOST],
|
|
245
|
-
blockedHosts: [],
|
|
246
|
-
allowLocalhost: false,
|
|
247
|
-
allowPrivateNetwork: false,
|
|
248
|
-
allowHttp: false,
|
|
249
|
-
allowHttps: true,
|
|
250
|
-
maxRedirects: 0,
|
|
251
|
-
};
|
|
252
|
-
}
|
|
253
|
-
/**
|
|
254
|
-
* The `xeno-agents-api` provider definition: a REAL, enabled, XENO-owned, **approval-gated**
|
|
255
|
-
* hosted bridge. `authRequirement`/`networkRequirement` are `required` (truthful), so the capability
|
|
256
|
-
* gate returns `requires_approval` — never runnable without a current policy + approval.
|
|
257
|
-
*/
|
|
258
|
-
export function createXenoAgentsApiDefinition() {
|
|
259
|
-
const definition = {
|
|
260
|
-
id: XENO_AGENTS_API_ID,
|
|
261
|
-
displayName: "XENO Hosted Agents API",
|
|
262
|
-
description: "Drives a XENO hosted agent run (api.xenostudio.ai/v1/agents) through the ACP provider contract — no local process. XENO-owned, approval-gated; needs a platform token + network; no local filesystem or terminal authority.",
|
|
263
|
-
kind: "gateway",
|
|
264
|
-
trustClass: "xeno-owned",
|
|
265
|
-
authRequirement: "required",
|
|
266
|
-
networkRequirement: "required",
|
|
267
|
-
ioAuthority: { filesystem: "none", terminal: "none" },
|
|
268
|
-
capabilities: XENO_AGENTS_API_CAPABILITIES,
|
|
269
|
-
enabled: true,
|
|
270
|
-
authPolicy: defaultAuthPolicy(),
|
|
271
|
-
egressPolicy: defaultEgressPolicy(),
|
|
272
|
-
metadata: {
|
|
273
|
-
acpEntrypoint: "none",
|
|
274
|
-
installedLocally: false,
|
|
275
|
-
displayAlias: "XENO Hosted Agents",
|
|
276
|
-
note: "Hosted-runs bridge: maps createRun/attach/stopRun onto the ACP provider-runtime contract. Executes in the cloud.",
|
|
277
|
-
streaming: {
|
|
278
|
-
mode: "streaming",
|
|
279
|
-
safeMessage: "Streams the hosted run's model text + tool events as ACP updates over the attach channel.",
|
|
280
|
-
},
|
|
281
|
-
setupHints: [
|
|
282
|
-
`Provide a platform token via options.token or ${XENO_AGENTS_API_TOKEN_ENV}.`,
|
|
283
|
-
"Review policy.",
|
|
284
|
-
"Approve provider.",
|
|
285
|
-
"Run providers test.",
|
|
286
|
-
],
|
|
287
|
-
},
|
|
288
|
-
modelDiscovery: {
|
|
289
|
-
status: "available",
|
|
290
|
-
source: "operator_config",
|
|
291
|
-
defaultModelId: null,
|
|
292
|
-
allowCustomModel: true, // the hosted API accepts any model id it recognizes (e.g. gpt-5.5)
|
|
293
|
-
models: [],
|
|
294
|
-
safeMessage: "Model selection is passed through to the hosted run; any model id the server accepts is allowed.",
|
|
295
|
-
},
|
|
296
|
-
createRuntime(config) {
|
|
297
|
-
return new XenoAgentsApiRuntime(definition, config);
|
|
298
|
-
},
|
|
299
|
-
};
|
|
300
|
-
return definition;
|
|
301
|
-
}
|
|
302
|
-
//# sourceMappingURL=xenoAgentsApiProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"xenoAgentsApiProvider.js","sourceRoot":"","sources":["../../src/providers/xenoAgentsApiProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OA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