@alpacakit/agents 0.1.0-beta.35 → 0.1.0-beta.37
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/README.md +39 -10
- package/dist/agents/claude.d.ts +9 -2
- package/dist/agents/claude.d.ts.map +1 -1
- package/dist/agents/claude.js +46 -5
- package/dist/agents/codex.d.ts +1 -1
- package/dist/agents/codex.js +1 -1
- package/dist/agents/openai-compatible/engine.d.ts +5 -4
- package/dist/agents/openai-compatible/engine.d.ts.map +1 -1
- package/dist/agents/openai-compatible/engine.js +5 -4
- package/dist/config/agent-configs.d.ts +3 -1
- package/dist/config/agent-configs.d.ts.map +1 -1
- package/dist/config/agent-configs.js +23 -2
- package/dist/config/compose.d.ts.map +1 -1
- package/dist/config/compose.js +1 -0
- package/dist/config/index.d.ts +2 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +1 -1
- package/dist/config/model.d.ts +6 -0
- package/dist/config/model.d.ts.map +1 -1
- package/dist/config/values.d.ts +19 -0
- package/dist/config/values.d.ts.map +1 -1
- package/dist/config/values.js +18 -0
- package/dist/core/error.d.ts +25 -0
- package/dist/core/error.d.ts.map +1 -1
- package/dist/core/error.js +15 -0
- package/dist/core/node-controlled-exec.d.ts.map +1 -1
- package/dist/core/node-controlled-exec.js +31 -8
- package/dist/core/node-ports.d.ts.map +1 -1
- package/dist/core/node-ports.js +20 -0
- package/dist/core/ports.d.ts +5 -0
- package/dist/core/ports.d.ts.map +1 -1
- package/dist/fleet/policy.d.ts.map +1 -1
- package/dist/fleet/policy.js +3 -0
- package/dist/index.d.ts +5 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -5
- package/dist/internal/controlled-process/host-controller.d.ts +3 -2
- package/dist/internal/controlled-process/host-controller.d.ts.map +1 -1
- package/dist/internal/controlled-process/host-controller.js +63 -23
- package/dist/internal/controlled-process/input-transport.d.ts +17 -0
- package/dist/internal/controlled-process/input-transport.d.ts.map +1 -0
- package/dist/internal/controlled-process/input-transport.js +188 -0
- package/dist/internal/controlled-process/lifecycle.d.ts +1 -1
- package/dist/internal/controlled-process/lifecycle.d.ts.map +1 -1
- package/dist/internal/controlled-process/lifecycle.js +1 -0
- package/dist/internal/controlled-process/schema.d.ts +2 -2
- package/dist/internal/controlled-process/schema.js +1 -1
- package/dist/internal/controlled-process/shim-runtime.d.ts.map +1 -1
- package/dist/internal/controlled-process/shim-runtime.js +43 -4
- package/dist/internal/controlled-process/supervisor-coordinator.d.ts.map +1 -1
- package/dist/internal/controlled-process/supervisor-coordinator.js +4 -2
- package/dist/internal/controlled-process/supervisor-model.d.ts +24 -2
- package/dist/internal/controlled-process/supervisor-model.d.ts.map +1 -1
- package/dist/internal/controlled-process/supervisor-runtime.d.ts.map +1 -1
- package/dist/internal/controlled-process/supervisor-runtime.js +116 -15
- package/dist/internal/controlled-process/supervisor-schema.d.ts +66 -3
- package/dist/internal/controlled-process/supervisor-schema.d.ts.map +1 -1
- package/dist/internal/controlled-process/supervisor-schema.js +31 -3
- package/dist/internal/controlled-process/supervisor-values.d.ts +5 -0
- package/dist/internal/controlled-process/supervisor-values.d.ts.map +1 -1
- package/dist/internal/controlled-process/supervisor-values.js +5 -0
- package/dist/internal/controlled-process/values.d.ts +4 -4
- package/dist/internal/controlled-process/values.js +4 -4
- package/dist/structured/run-structured.d.ts.map +1 -1
- package/dist/structured/run-structured.js +2 -5
- package/package.json +3 -11
package/README.md
CHANGED
|
@@ -8,8 +8,9 @@ Design: [`src/v2/design/l_agents_library.md`](https://github.com/alpacakit/alpac
|
|
|
8
8
|
|
|
9
9
|
The whole runtime surface — including extension points — ships from one
|
|
10
10
|
root entry. Only genuine isolation lives on a subpath: dev fakes
|
|
11
|
-
(`/testing`), the codex app-server client (`/codex`),
|
|
12
|
-
|
|
11
|
+
(`/testing`), the codex app-server client (`/codex`), and machine-local
|
|
12
|
+
config storage (`/config`). The OS keychain is not here at all: it belongs
|
|
13
|
+
to `@alpacakit/core/keyring`, the single keychain owner of the workspace.
|
|
13
14
|
|
|
14
15
|
Most apps need only a handful of root exports: `runAgent`,
|
|
15
16
|
`createAgentRuntime`, `processEnv`, the built-in `claude` / `codex`
|
|
@@ -65,6 +66,13 @@ for await (const event of handle.events) {
|
|
|
65
66
|
const result = await handle; // await handle === await handle.result
|
|
66
67
|
```
|
|
67
68
|
|
|
69
|
+
For an isolated Claude Code invocation, construct the adapter with
|
|
70
|
+
`claude({ customizations: "disabled" })`. It passes `--safe-mode`,
|
|
71
|
+
`--strict-mcp-config`, and `--no-session-persistence`, so Claude does not load
|
|
72
|
+
the user's CLAUDE.md, skills, plugins, hooks, MCP servers, or custom commands;
|
|
73
|
+
authentication remains available and the session is not persisted. Plain
|
|
74
|
+
`claude()` keeps the CLI's inherited customization behavior.
|
|
75
|
+
|
|
68
76
|
### Controlled child lifecycle
|
|
69
77
|
|
|
70
78
|
Embedding hosts that need durable custody of CLI workers create a
|
|
@@ -114,6 +122,21 @@ termination through that controller exactly once. The supervisor owns signal
|
|
|
114
122
|
escalation and reports either authenticated absence or a typed unkillable
|
|
115
123
|
reason, so the runtime never falls back to direct process signaling.
|
|
116
124
|
|
|
125
|
+
Prompt bytes use the v2 controlled-process protocol. The bounded control
|
|
126
|
+
frame carries only a UTF-8 byte length and SHA-256 digest; a dedicated data FD
|
|
127
|
+
streams the bytes through the supervisor and shim to worker stdin with
|
|
128
|
+
backpressure. A process is not ready until the shim has verified the exact
|
|
129
|
+
length and digest and worker stdin has closed successfully. The old protocol
|
|
130
|
+
that embedded stdin in the JSON bootstrap is not accepted. Launch transfer
|
|
131
|
+
uses the configured host-idle timeout as its deadline, so a peer that never
|
|
132
|
+
consumes stdin cannot leave the launch pending indefinitely.
|
|
133
|
+
|
|
134
|
+
Launch transport failures throw `AgentError` with code
|
|
135
|
+
`controlled_process_launch`. Its data contains the stable `failureCode`,
|
|
136
|
+
`retryability`, transfer `stage`, and declared/observed byte counts, so hosts
|
|
137
|
+
can route permanent contract failures separately from transient pipe or early
|
|
138
|
+
exit failures without parsing messages.
|
|
139
|
+
|
|
117
140
|
A naturally completed worker includes its exact `{ code, signal }` as
|
|
118
141
|
`workerExit`. Abort-driven termination may complete with `workerExit: null`;
|
|
119
142
|
pre-exec lifecycle failure rejects `spawn` before a process handle is returned.
|
|
@@ -144,6 +167,9 @@ const { output } = await runtime.agent("claude").run({
|
|
|
144
167
|
`agent.run({ ..., contract })` returns an awaitable handle: `await` it
|
|
145
168
|
for the result, or iterate `.events` to stream every repair attempt's run
|
|
146
169
|
events as they happen (`for await (const event of handle.events) …`).
|
|
170
|
+
Default repair attempts send only the invalid block, concise diagnostics, and
|
|
171
|
+
a request for the original required shape; they do not repeat the original
|
|
172
|
+
task or contract text.
|
|
147
173
|
|
|
148
174
|
## Failover across credentials and agents
|
|
149
175
|
|
|
@@ -251,7 +277,9 @@ const config = await loadAgentsRuntimeConfig(
|
|
|
251
277
|
|
|
252
278
|
Family-specific conventions (a fixed path env var + a keyring service)
|
|
253
279
|
belong in the consumer's own convention module, not in this package — they
|
|
254
|
-
are a plain instance of the same preset shape.
|
|
280
|
+
are a plain instance of the same preset shape. Secret resolvers backed by the
|
|
281
|
+
OS keychain come from `@alpacakit/core/keyring`; this package only consumes
|
|
282
|
+
the `SecretResolver` port.
|
|
255
283
|
|
|
256
284
|
## Host plane: execution availability, skills & MCP (operator)
|
|
257
285
|
|
|
@@ -276,16 +304,17 @@ installed skills and MCP servers remains in progress.
|
|
|
276
304
|
| `/config/extension` | custom agent-config kinds (`defineAgentConfigType`) |
|
|
277
305
|
| `/testing` | `fakeExec`, `fakeClock`, `fakeAgent`, `fakeSecretResolver` — no subprocess ever spawns |
|
|
278
306
|
| `/codex` | codex app-server JSON-RPC client (advanced) |
|
|
279
|
-
| `/keyring` | `keyringResolver` (loads the optional `@napi-rs/keyring` peer) |
|
|
280
307
|
|
|
281
308
|
## Status
|
|
282
309
|
|
|
283
310
|
Implemented: kernel (runtime, run handle, guards, classification), CLI
|
|
284
311
|
blueprint with built-in `claude()` / `codex()`, ambient execution availability,
|
|
285
312
|
structured output with repair, fleet with cooldown / auth-mark stores, auth
|
|
286
|
-
materials and secret resolvers, `openaiCompatible` (engine port; the built-in
|
|
287
|
-
chat-completions engine is the dependency-free default
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
313
|
+
materials and secret resolvers, `openaiCompatible` (engine port; the built-in
|
|
314
|
+
HTTP chat-completions engine is the dependency-free default and the in-process
|
|
315
|
+
`piSessionEngine` ships behind an optional peer, selected per agent config by
|
|
316
|
+
`engine: "pi"`), CLI sign-in for `codex` (oauth, device) and `claude` (oauth —
|
|
317
|
+
the CLI has no device flow), and the first host-plane skill / MCP
|
|
318
|
+
implementations (Claude local-dir skills plus Claude / Codex stdio MCP
|
|
319
|
+
registration). Not yet implemented: GitHub / plugin skill installers and
|
|
320
|
+
availability listing for installed skills / MCP servers.
|
package/dist/agents/claude.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Built-in claude
|
|
2
|
+
* Built-in claude CLI contract:
|
|
3
3
|
* `claude -p [--model m] [--effort e] --output-format stream-json
|
|
4
4
|
* --permission-mode <mode> [tool args] --verbose`, prompt on stdin.
|
|
5
5
|
* Read-only grants map to `--allowedTools` (`Bash(cmd:*)` for shell
|
|
@@ -16,5 +16,12 @@ export declare const CLAUDE_API_KEY_ENV_VAR = "ANTHROPIC_API_KEY";
|
|
|
16
16
|
* the same stream format.
|
|
17
17
|
*/
|
|
18
18
|
export declare function structuredQuotaMatcher(): FailureMatcher;
|
|
19
|
-
export
|
|
19
|
+
export type ClaudeOptions = {
|
|
20
|
+
/**
|
|
21
|
+
* `disabled` prevents loading user customizations while retaining auth and
|
|
22
|
+
* disables session persistence. The default `inherit` preserves CLI behavior.
|
|
23
|
+
*/
|
|
24
|
+
readonly customizations?: "inherit" | "disabled";
|
|
25
|
+
};
|
|
26
|
+
export declare function claude(options?: ClaudeOptions): AgentDefinition<"claude">;
|
|
20
27
|
//# sourceMappingURL=claude.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../src/agents/claude.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../src/agents/claude.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA+CH,OAAO,EACL,KAAK,cAAc,EAEpB,MAAM,uBAAuB,CAAC;AAO/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG/D,eAAO,MAAM,yBAAyB,sBAAsB,CAAC;AAC7D,eAAO,MAAM,sBAAsB,sBAAsB,CAAC;AAsK1D;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,cAAc,CA0CvD;AA6TD,MAAM,MAAM,aAAa,GAAG;IAC1B;;;OAGG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;CAClD,CAAC;AAEF,wBAAgB,MAAM,CAAC,OAAO,GAAE,aAAkB,GAAG,eAAe,CAAC,QAAQ,CAAC,CAgF7E"}
|
package/dist/agents/claude.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Built-in claude
|
|
2
|
+
* Built-in claude CLI contract:
|
|
3
3
|
* `claude -p [--model m] [--effort e] --output-format stream-json
|
|
4
4
|
* --permission-mode <mode> [tool args] --verbose`, prompt on stdin.
|
|
5
5
|
* Read-only grants map to `--allowedTools` (`Bash(cmd:*)` for shell
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { cp, mkdir, readdir, readFile, rm, stat } from "node:fs/promises";
|
|
9
9
|
import path from "node:path";
|
|
10
|
+
import { LOGIN_METHOD } from "../auth/login.js";
|
|
10
11
|
import { cliLoginProbe } from "../auth/login-probe.js";
|
|
11
12
|
import { AUTH_MATERIAL_KIND, envVarAuthMaterial } from "../auth/material.js";
|
|
12
13
|
import { requireSecret } from "../auth/secrets.js";
|
|
@@ -22,6 +23,7 @@ import { listMcpServersViaCli } from "../host/mcp-list.js";
|
|
|
22
23
|
import { hostCommandFailedError, runHostCommand, runHostCommandResult, } from "../host/run-command.js";
|
|
23
24
|
import { parseEpochTimestamp, } from "../kernel/classify.js";
|
|
24
25
|
import { defineCliAgent, } from "../kernel/cli-agent.js";
|
|
26
|
+
import { cliLoginCommand } from "../kernel/cli-login.js";
|
|
25
27
|
import { GRANT_KIND, SANDBOX_MODE } from "../kernel/options.js";
|
|
26
28
|
export const CLAUDE_CONFIG_DIR_ENV_VAR = "CLAUDE_CONFIG_DIR";
|
|
27
29
|
export const CLAUDE_API_KEY_ENV_VAR = "ANTHROPIC_API_KEY";
|
|
@@ -40,6 +42,9 @@ const CLAUDE = {
|
|
|
40
42
|
verbose: "--verbose",
|
|
41
43
|
tools: "--tools",
|
|
42
44
|
allowedTools: "--allowedTools",
|
|
45
|
+
safeMode: "--safe-mode",
|
|
46
|
+
strictMcpConfig: "--strict-mcp-config",
|
|
47
|
+
noSessionPersistence: "--no-session-persistence",
|
|
43
48
|
},
|
|
44
49
|
auth: {
|
|
45
50
|
statusArgs: ["auth", "status", "--json"],
|
|
@@ -99,13 +104,20 @@ function grantToToolArg(grant) {
|
|
|
99
104
|
? `Bash(${grant.command}:*)`
|
|
100
105
|
: grant.name;
|
|
101
106
|
}
|
|
102
|
-
function sharedArgs(ctx) {
|
|
107
|
+
function sharedArgs(ctx, customizations) {
|
|
103
108
|
return [
|
|
104
109
|
CLAUDE.cli.prompt,
|
|
105
110
|
...(ctx.model === null ? [] : [CLAUDE.cli.model, ctx.model]),
|
|
106
111
|
...(ctx.effort === null ? [] : [CLAUDE.cli.effort, ctx.effort]),
|
|
107
112
|
CLAUDE.cli.outputFormat,
|
|
108
113
|
CLAUDE.cli.streamJson,
|
|
114
|
+
...(customizations === "disabled"
|
|
115
|
+
? [
|
|
116
|
+
CLAUDE.cli.safeMode,
|
|
117
|
+
CLAUDE.cli.strictMcpConfig,
|
|
118
|
+
CLAUDE.cli.noSessionPersistence,
|
|
119
|
+
]
|
|
120
|
+
: []),
|
|
109
121
|
];
|
|
110
122
|
}
|
|
111
123
|
function parseClaudeLine(line) {
|
|
@@ -214,6 +226,29 @@ const homeDirHandler = envVarAuthMaterial({
|
|
|
214
226
|
ctx,
|
|
215
227
|
}),
|
|
216
228
|
});
|
|
229
|
+
/**
|
|
230
|
+
* `claude auth login --claudeai` writes its credential into
|
|
231
|
+
* `CLAUDE_CONFIG_DIR`, so pointing that at the requested home is the whole
|
|
232
|
+
* isolation mechanism — the competing token variables are unset for the same
|
|
233
|
+
* reason `homeDirHandler` unsets them: an inherited token would authenticate
|
|
234
|
+
* the CLI without ever populating the home we are creating.
|
|
235
|
+
*
|
|
236
|
+
* Only `oauth` is offered. The CLI has no device-code flow (`--console` /
|
|
237
|
+
* `--sso` are still browser flows), and declaring an unimplemented method
|
|
238
|
+
* would make `agent.login.supports("device")` lie.
|
|
239
|
+
*/
|
|
240
|
+
function claudeLogin(args) {
|
|
241
|
+
return (request, ctx) => cliLoginCommand({
|
|
242
|
+
command: CLAUDE.command,
|
|
243
|
+
args,
|
|
244
|
+
envPatch: {
|
|
245
|
+
set: { [CLAUDE_CONFIG_DIR_ENV_VAR]: request.homeDir },
|
|
246
|
+
unset: COMPETING_TOKEN_VARS,
|
|
247
|
+
},
|
|
248
|
+
request,
|
|
249
|
+
ctx,
|
|
250
|
+
});
|
|
251
|
+
}
|
|
217
252
|
/** Install/list roots in priority order; the first is the install target. */
|
|
218
253
|
function claudeSkillRoots(ctx) {
|
|
219
254
|
const userRoot = {
|
|
@@ -428,19 +463,20 @@ async function removeClaudeMcp(ctx, name, options) {
|
|
|
428
463
|
async function listClaudeMcp(ctx) {
|
|
429
464
|
return listMcpServersViaCli(ctx, { command: CLAUDE.command });
|
|
430
465
|
}
|
|
431
|
-
export function claude() {
|
|
466
|
+
export function claude(options = {}) {
|
|
467
|
+
const customizations = options.customizations ?? "inherit";
|
|
432
468
|
return defineCliAgent({
|
|
433
469
|
id: CLAUDE.id,
|
|
434
470
|
command: CLAUDE.command,
|
|
435
471
|
args: {
|
|
436
472
|
[SANDBOX_MODE.full]: (_sandbox, ctx) => [
|
|
437
|
-
...sharedArgs(ctx),
|
|
473
|
+
...sharedArgs(ctx, customizations),
|
|
438
474
|
CLAUDE.cli.permissionMode,
|
|
439
475
|
CLAUDE.cli.bypassPermissions,
|
|
440
476
|
CLAUDE.cli.verbose,
|
|
441
477
|
],
|
|
442
478
|
[SANDBOX_MODE.readOnly]: (sandbox, ctx) => [
|
|
443
|
-
...sharedArgs(ctx),
|
|
479
|
+
...sharedArgs(ctx, customizations),
|
|
444
480
|
CLAUDE.cli.permissionMode,
|
|
445
481
|
CLAUDE.cli.defaultPermissionMode,
|
|
446
482
|
...(sandbox.grants.length === 0
|
|
@@ -483,6 +519,11 @@ export function claude() {
|
|
|
483
519
|
unset: COMPETING_CONFIG_VARS,
|
|
484
520
|
}),
|
|
485
521
|
},
|
|
522
|
+
login: {
|
|
523
|
+
methods: {
|
|
524
|
+
[LOGIN_METHOD.oauth]: claudeLogin(CLAUDE.auth.loginArgs),
|
|
525
|
+
},
|
|
526
|
+
},
|
|
486
527
|
skills: {
|
|
487
528
|
list: listClaudeSkills,
|
|
488
529
|
install: {
|
package/dist/agents/codex.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Built-in codex
|
|
2
|
+
* Built-in codex CLI contract:
|
|
3
3
|
* `codex exec [--model m] [-c model_reasoning_effort="e"] --json
|
|
4
4
|
* --skip-git-repo-check --sandbox <mode> -C <workspace>`, prompt on
|
|
5
5
|
* stdin. Codex sandboxing is filesystem-level, so read-only grants have
|
package/dist/agents/codex.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Built-in codex
|
|
2
|
+
* Built-in codex CLI contract:
|
|
3
3
|
* `codex exec [--model m] [-c model_reasoning_effort="e"] --json
|
|
4
4
|
* --skip-git-repo-check --sandbox <mode> -C <workspace>`, prompt on
|
|
5
5
|
* stdin. Codex sandboxing is filesystem-level, so read-only grants have
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
* The engine port: how a resolved OpenAI-compatible config is turned
|
|
3
3
|
* into an AgentRun. The engine owns its own availability — its doctor
|
|
4
4
|
* checks describe requirements of the engine itself (peer packages,
|
|
5
|
-
* node floor), never of the config (the resolver owns those).
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* node floor), never of the config (the resolver owns those). Two
|
|
6
|
+
* implementations ship: the dependency-free fetch chat-completions engine
|
|
7
|
+
* (the default), and the in-process pi-session engine (`piSessionEngine`
|
|
8
|
+
* in `pi/engine.ts`, which needs pi installed as an optional peer),
|
|
9
|
+
* selected per agent config with `engine: "pi"`.
|
|
9
10
|
*/
|
|
10
11
|
import type { DoctorCheck } from "../../host/capabilities.js";
|
|
11
12
|
import type { AgentRun, RunContext } from "../../kernel/definition.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../../src/agents/openai-compatible/engine.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../../src/agents/openai-compatible/engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,YAAY,CAAC;AAEjE,MAAM,WAAW,sBAAsB;IACrC,YAAY,IAAI,OAAO,CAAC,SAAS,WAAW,EAAE,CAAC,CAAC;IAChD,GAAG,CACD,MAAM,EAAE,8BAA8B,EACtC,OAAO,EAAE,kBAAkB,EAC3B,GAAG,EAAE,UAAU,GACd,QAAQ,CAAC;CACb"}
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
* The engine port: how a resolved OpenAI-compatible config is turned
|
|
3
3
|
* into an AgentRun. The engine owns its own availability — its doctor
|
|
4
4
|
* checks describe requirements of the engine itself (peer packages,
|
|
5
|
-
* node floor), never of the config (the resolver owns those).
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* node floor), never of the config (the resolver owns those). Two
|
|
6
|
+
* implementations ship: the dependency-free fetch chat-completions engine
|
|
7
|
+
* (the default), and the in-process pi-session engine (`piSessionEngine`
|
|
8
|
+
* in `pi/engine.ts`, which needs pi installed as an optional peer),
|
|
9
|
+
* selected per agent config with `engine: "pi"`.
|
|
9
10
|
*/
|
|
10
11
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type JsonObject } from "@alpacakit/core";
|
|
2
2
|
import { type AgentConfigKind } from "./ids.js";
|
|
3
3
|
import type { AgentConfig, AgentConfigType, AgentConfigTypeRegistry } from "./model.js";
|
|
4
|
-
import { AGENT_CONFIG_KIND } from "./values.js";
|
|
4
|
+
import { AGENT_CONFIG_KIND, type OpenAiCompatibleEngineKind } from "./values.js";
|
|
5
5
|
type BuiltinAgentConfigPayload = {
|
|
6
6
|
readonly model: string | null;
|
|
7
7
|
readonly effort: string | null;
|
|
@@ -12,6 +12,7 @@ type OpenAiCompatibleAgentConfigPayload = {
|
|
|
12
12
|
readonly apiKey: string | null;
|
|
13
13
|
readonly headers: Readonly<Record<string, string>>;
|
|
14
14
|
readonly requestParams: JsonObject;
|
|
15
|
+
readonly engine: OpenAiCompatibleEngineKind;
|
|
15
16
|
};
|
|
16
17
|
export type BuiltinAgentConfigOptions = {
|
|
17
18
|
readonly id: string;
|
|
@@ -27,6 +28,7 @@ export type OpenAiCompatibleAgentConfigOptions = {
|
|
|
27
28
|
readonly apiKey?: string;
|
|
28
29
|
readonly headers?: Readonly<Record<string, string>>;
|
|
29
30
|
readonly requestParams?: JsonObject;
|
|
31
|
+
readonly engine?: OpenAiCompatibleEngineKind;
|
|
30
32
|
};
|
|
31
33
|
export declare function codexAgentConfig(options: BuiltinAgentConfigOptions): AgentConfig<typeof AGENT_CONFIG_KIND.codex, BuiltinAgentConfigPayload>;
|
|
32
34
|
export declare function claudeAgentConfig(options: BuiltinAgentConfigOptions): AgentConfig<typeof AGENT_CONFIG_KIND.claude, BuiltinAgentConfigPayload>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-configs.d.ts","sourceRoot":"","sources":["../../src/config/agent-configs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agent-configs.d.ts","sourceRoot":"","sources":["../../src/config/agent-configs.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,UAAU,EAEhB,MAAM,iBAAiB,CAAC;AAUzB,OAAO,EAAE,KAAK,eAAe,EAAiB,MAAM,UAAU,CAAC;AAC/D,OAAO,KAAK,EACV,WAAW,EACX,eAAe,EAGf,uBAAuB,EAGxB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,iBAAiB,EAKjB,KAAK,0BAA0B,EAChC,MAAM,aAAa,CAAC;AAQrB,KAAK,yBAAyB,GAAG;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC,CAAC;AAOF,KAAK,kCAAkC,GAAG;IACxC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAA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I,uBAAuB,CAoB9E;AAED,wBAAgB,qBAAqB,CACnC,IAAI,SAAS,eAAe,EAC5B,OAAO,SAAS,UAAU,EAC1B,OAAO,SAAS,MAAM,EAEtB,UAAU,EAAE,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,GAClD,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAEzC"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
import path from "node:path";
|
|
1
2
|
import { createKeyedRegistry, createSchemaRuntimeCodec, jsonValueSchema, } from "@alpacakit/core";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
import { claude } from "../agents/claude.js";
|
|
4
5
|
import { codex } from "../agents/codex.js";
|
|
5
6
|
import { openaiCompatible } from "../agents/openai-compatible.js";
|
|
7
|
+
import { piSessionEngine } from "../agents/openai-compatible/pi/engine.js";
|
|
6
8
|
import { agentConfigId } from "./ids.js";
|
|
7
9
|
import { formatFieldPath, ZOD_ISSUE_CODE } from "./support.js";
|
|
8
|
-
import { AGENT_CONFIG_KIND, BUILTIN_AGENT_ID, CANDIDATE_SOURCE_KIND, } from "./values.js";
|
|
10
|
+
import { AGENT_CONFIG_KIND, AGENTS_CONFIG_DIRECTORY, BUILTIN_AGENT_ID, CANDIDATE_SOURCE_KIND, OPENAI_COMPATIBLE_ENGINE, } from "./values.js";
|
|
9
11
|
const ENV_TEMPLATE_EXPRESSION_START = "${";
|
|
10
12
|
const OPENAI_COMPATIBLE_PAYLOAD_FIELD = {
|
|
11
13
|
apiKey: "apiKey",
|
|
@@ -44,6 +46,7 @@ export function openAiCompatibleAgentConfig(options) {
|
|
|
44
46
|
apiKey: options.apiKey ?? null,
|
|
45
47
|
headers: options.headers ?? {},
|
|
46
48
|
requestParams: options.requestParams ?? {},
|
|
49
|
+
engine: options.engine ?? OPENAI_COMPATIBLE_ENGINE.fetch,
|
|
47
50
|
},
|
|
48
51
|
};
|
|
49
52
|
}
|
|
@@ -61,6 +64,11 @@ const openAiCompatibleAgentConfigPayloadCodec = createSchemaRuntimeCodec(z
|
|
|
61
64
|
apiKey: z.string().min(1).nullable(),
|
|
62
65
|
headers: z.record(z.string(), z.string().min(1)).readonly(),
|
|
63
66
|
requestParams: z.record(z.string(), jsonValueSchema).readonly(),
|
|
67
|
+
// Defaulted, not required: an agent-settings file written before the
|
|
68
|
+
// engine choice existed reads back as the `fetch` it was running on.
|
|
69
|
+
engine: z
|
|
70
|
+
.enum(Object.values(OPENAI_COMPATIBLE_ENGINE))
|
|
71
|
+
.default(OPENAI_COMPATIBLE_ENGINE.fetch),
|
|
64
72
|
})
|
|
65
73
|
.strict()
|
|
66
74
|
.readonly()
|
|
@@ -164,8 +172,9 @@ function createOpenAiCompatibleAgentConfig() {
|
|
|
164
172
|
headers: input.record.payload.headers,
|
|
165
173
|
requestParams: input.record.payload.requestParams,
|
|
166
174
|
};
|
|
175
|
+
const engine = resolveOpenAiCompatibleEngine(input.record.payload.engine, input.rootDir);
|
|
167
176
|
return {
|
|
168
|
-
agents: [openaiCompatible(config)],
|
|
177
|
+
agents: [openaiCompatible(config, engine === null ? {} : { engine })],
|
|
169
178
|
candidates: [
|
|
170
179
|
{
|
|
171
180
|
candidate: { agentId, model: input.record.payload.model },
|
|
@@ -181,6 +190,18 @@ function createOpenAiCompatibleAgentConfig() {
|
|
|
181
190
|
},
|
|
182
191
|
});
|
|
183
192
|
}
|
|
193
|
+
/**
|
|
194
|
+
* `null` selects `openaiCompatible`'s own dependency-free default rather than
|
|
195
|
+
* naming it twice. The pi engine's agent home is derived from the config root
|
|
196
|
+
* so the persisted payload stays machine-independent.
|
|
197
|
+
*/
|
|
198
|
+
function resolveOpenAiCompatibleEngine(kind, rootDir) {
|
|
199
|
+
return kind === OPENAI_COMPATIBLE_ENGINE.pi
|
|
200
|
+
? piSessionEngine({
|
|
201
|
+
agentDir: path.join(rootDir, AGENTS_CONFIG_DIRECTORY.piAgentHome),
|
|
202
|
+
})
|
|
203
|
+
: null;
|
|
204
|
+
}
|
|
184
205
|
function rejectDirectSecretIfPresent(value, field, context) {
|
|
185
206
|
if (value === null) {
|
|
186
207
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src/config/compose.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,uBAAuB,EACvB,mBAAmB,EACnB,UAAU,EAEV,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAwBpB,KAAK,iCAAiC,GAAG;IACvC,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,eAAe,EAAE,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;IACjE,QAAQ,CAAC,gBAAgB,EAAE,uBAAuB,CAAC;IACnD,QAAQ,CAAC,eAAe,EAAE,SAAS,mBAAmB,EAAE,CAAC;CAC1D,CAAC;AAEF,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,iCAAiC,GACvC,mBAAmB,
|
|
1
|
+
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src/config/compose.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,uBAAuB,EACvB,mBAAmB,EACnB,UAAU,EAEV,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAwBpB,KAAK,iCAAiC,GAAG;IACvC,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,eAAe,EAAE,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;IACjE,QAAQ,CAAC,gBAAgB,EAAE,uBAAuB,CAAC;IACnD,QAAQ,CAAC,eAAe,EAAE,SAAS,mBAAmB,EAAE,CAAC;CAC1D,CAAC;AAEF,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,iCAAiC,GACvC,mBAAmB,CA4CrB"}
|
package/dist/config/compose.js
CHANGED
|
@@ -37,6 +37,7 @@ export function composeRuntimeConfig(input) {
|
|
|
37
37
|
record: validation.record,
|
|
38
38
|
profiles: input.data.profiles,
|
|
39
39
|
ambientBuiltinAuth: input.data.agentConfigs.ambientBuiltinAuth.enabled,
|
|
40
|
+
rootDir: input.data.paths.rootDir,
|
|
40
41
|
});
|
|
41
42
|
for (const agent of projection.agents) {
|
|
42
43
|
addAgentDefinition(agentDefinitions, agent);
|
package/dist/config/index.d.ts
CHANGED
|
@@ -8,5 +8,6 @@ export type { AgentConfigId, AgentConfigKind, ProfileId } from "./ids.js";
|
|
|
8
8
|
export { agentConfigId, agentConfigKind, profileId } from "./ids.js";
|
|
9
9
|
export type { AgentConfig, AgentConfigManager, AgentConfigPatch, AgentConfigSettings, AgentsConfigPaths, AgentsRuntimeConfig, ApiKeyProfileInput, CandidateSource, CandidateSourceInfo, CandidateWithSource, HomeDirProfileInput, NamedSecretResolver, ProfileInputBase, ProfileManager, ProfileRecord, } from "./model.js";
|
|
10
10
|
export { DEFAULT_AGENTS_CONFIG_AGENT_SETTINGS } from "./store.js";
|
|
11
|
-
export {
|
|
11
|
+
export type { OpenAiCompatibleEngineKind } from "./values.js";
|
|
12
|
+
export { AGENT_CONFIG_KIND, AGENTS_CONFIG_DIRECTORY, AGENTS_CONFIG_FILE, BUILTIN_AGENT_ID, CANDIDATE_SOURCE_KIND, DEFAULT_AGENT_CONFIG_ID, OPENAI_COMPATIBLE_ENGINE, } from "./values.js";
|
|
12
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,yBAAyB,EACzB,kCAAkC,GACnC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,2BAA2B,GAC5B,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,wBAAwB,EACxB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,YAAY,EACZ,uBAAuB,GACxB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrE,YAAY,EACV,WAAW,EACX,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACd,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,oCAAoC,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,yBAAyB,EACzB,kCAAkC,GACnC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,2BAA2B,GAC5B,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,wBAAwB,EACxB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,YAAY,EACZ,uBAAuB,GACxB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrE,YAAY,EACV,WAAW,EACX,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACd,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,oCAAoC,EAAE,MAAM,YAAY,CAAC;AAClE,YAAY,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,kBAAkB,EAClB,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,aAAa,CAAC"}
|
package/dist/config/index.js
CHANGED
|
@@ -3,4 +3,4 @@ export { AGENTS_CONFIG_ERROR_CODE, AgentsConfigError, isAgentsConfigError, } fro
|
|
|
3
3
|
export { loadAgentsRuntimeConfig, openAgentsConfig, candidatesForFleet, secretsForRuntime, } from "./config.js";
|
|
4
4
|
export { agentConfigId, agentConfigKind, profileId } from "./ids.js";
|
|
5
5
|
export { DEFAULT_AGENTS_CONFIG_AGENT_SETTINGS } from "./store.js";
|
|
6
|
-
export { AGENT_CONFIG_KIND, AGENTS_CONFIG_FILE, BUILTIN_AGENT_ID, CANDIDATE_SOURCE_KIND, DEFAULT_AGENT_CONFIG_ID, } from "./values.js";
|
|
6
|
+
export { AGENT_CONFIG_KIND, AGENTS_CONFIG_DIRECTORY, AGENTS_CONFIG_FILE, BUILTIN_AGENT_ID, CANDIDATE_SOURCE_KIND, DEFAULT_AGENT_CONFIG_ID, OPENAI_COMPATIBLE_ENGINE, } from "./values.js";
|
package/dist/config/model.d.ts
CHANGED
|
@@ -68,6 +68,12 @@ export type AgentConfigProjectionInput<Kind extends AgentConfigKind, Payload ext
|
|
|
68
68
|
readonly record: AgentConfig<Kind, Payload>;
|
|
69
69
|
readonly profiles: readonly ProfileRecord[];
|
|
70
70
|
readonly ambientBuiltinAuth: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* The machine-local config root. An agent config whose engine keeps state
|
|
73
|
+
* on disk (the pi session engine's agent home) hangs it off this root
|
|
74
|
+
* rather than putting a machine path in the persisted payload.
|
|
75
|
+
*/
|
|
76
|
+
readonly rootDir: string;
|
|
71
77
|
};
|
|
72
78
|
export interface AgentConfigType<Kind extends AgentConfigKind, Payload extends JsonObject, AgentId extends string> {
|
|
73
79
|
readonly kind: Kind;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/config/model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEzD,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;AAE3D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,OAAO,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AAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC;IACnC,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;IAC3D,OAAO,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,SAAS,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC5E,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,IAAI,OAAO,CAAC,SAAS,WAAW,EAAE,CAAC,CAAC;IACxC,WAAW,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC5C,GAAG,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAC/C,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACzE,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAChD,OAAO,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,SAAS,WAAW,EAAE,CAAC,CAAC;IACjE,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACvE"}
|
package/dist/config/values.d.ts
CHANGED
|
@@ -18,4 +18,23 @@ export declare const CANDIDATE_SOURCE_KIND: {
|
|
|
18
18
|
readonly ambient: "ambient";
|
|
19
19
|
readonly configured: "configured";
|
|
20
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* Which engine an `openai-compatible` agent config runs on: the
|
|
23
|
+
* dependency-free HTTP chat-completions default, or the in-process pi
|
|
24
|
+
* session, which needs pi installed as an optional peer.
|
|
25
|
+
*/
|
|
26
|
+
export declare const OPENAI_COMPATIBLE_ENGINE: {
|
|
27
|
+
readonly fetch: "fetch";
|
|
28
|
+
readonly pi: "pi";
|
|
29
|
+
};
|
|
30
|
+
export type OpenAiCompatibleEngineKind = (typeof OPENAI_COMPATIBLE_ENGINE)[keyof typeof OPENAI_COMPATIBLE_ENGINE];
|
|
31
|
+
/**
|
|
32
|
+
* Directories the config root owns beyond its files. `pi` is the agent home
|
|
33
|
+
* the pi engine loads resources and skills from; it is shared by every
|
|
34
|
+
* `openai-compatible` agent config in one root, so installing a skill there
|
|
35
|
+
* is a property of the machine's agents home, not of one agent.
|
|
36
|
+
*/
|
|
37
|
+
export declare const AGENTS_CONFIG_DIRECTORY: {
|
|
38
|
+
readonly piAgentHome: "pi";
|
|
39
|
+
};
|
|
21
40
|
//# sourceMappingURL=values.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"values.d.ts","sourceRoot":"","sources":["../../src/config/values.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,eAAO,MAAM,kBAAkB;;;;CAIrB,CAAC;AAEX,eAAO,MAAM,iBAAiB;;;;CAIpB,CAAC;AAEX,eAAO,MAAM,uBAAuB;;;CAG1B,CAAC;AAEX,eAAO,MAAM,qBAAqB;;;;CAIxB,CAAC"}
|
|
1
|
+
{"version":3,"file":"values.d.ts","sourceRoot":"","sources":["../../src/config/values.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,eAAO,MAAM,kBAAkB;;;;CAIrB,CAAC;AAEX,eAAO,MAAM,iBAAiB;;;;CAIpB,CAAC;AAEX,eAAO,MAAM,uBAAuB;;;CAG1B,CAAC;AAEX,eAAO,MAAM,qBAAqB;;;;CAIxB,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;;CAG3B,CAAC;AAEX,MAAM,MAAM,0BAA0B,GACpC,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,OAAO,wBAAwB,CAAC,CAAC;AAE3E;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB;;CAE1B,CAAC"}
|
package/dist/config/values.js
CHANGED
|
@@ -20,3 +20,21 @@ export const CANDIDATE_SOURCE_KIND = {
|
|
|
20
20
|
ambient: "ambient",
|
|
21
21
|
configured: "configured",
|
|
22
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* Which engine an `openai-compatible` agent config runs on: the
|
|
25
|
+
* dependency-free HTTP chat-completions default, or the in-process pi
|
|
26
|
+
* session, which needs pi installed as an optional peer.
|
|
27
|
+
*/
|
|
28
|
+
export const OPENAI_COMPATIBLE_ENGINE = {
|
|
29
|
+
fetch: "fetch",
|
|
30
|
+
pi: "pi",
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Directories the config root owns beyond its files. `pi` is the agent home
|
|
34
|
+
* the pi engine loads resources and skills from; it is shared by every
|
|
35
|
+
* `openai-compatible` agent config in one root, so installing a skill there
|
|
36
|
+
* is a property of the machine's agents home, not of one agent.
|
|
37
|
+
*/
|
|
38
|
+
export const AGENTS_CONFIG_DIRECTORY = {
|
|
39
|
+
piAgentHome: "pi",
|
|
40
|
+
};
|
package/dist/core/error.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export declare const AGENT_ERROR_CODE: {
|
|
|
13
13
|
readonly limit: "limit";
|
|
14
14
|
readonly cancelled: "cancelled";
|
|
15
15
|
readonly outputRejected: "output_rejected";
|
|
16
|
+
readonly controlledProcessLaunch: "controlled_process_launch";
|
|
16
17
|
readonly failed: "failed";
|
|
17
18
|
};
|
|
18
19
|
export type AgentErrorCode = (typeof AGENT_ERROR_CODE)[keyof typeof AGENT_ERROR_CODE];
|
|
@@ -23,6 +24,7 @@ export declare const AGENT_FAILURE_CLASS: {
|
|
|
23
24
|
export type AgentFailureClass = (typeof AGENT_FAILURE_CLASS)[keyof typeof AGENT_FAILURE_CLASS];
|
|
24
25
|
export declare const AGENT_INFRASTRUCTURE_FAILURE_CODE: {
|
|
25
26
|
readonly controlledProcessLifecycle: "controlled_process_lifecycle";
|
|
27
|
+
readonly controlledProcessLaunch: "controlled_process_launch";
|
|
26
28
|
};
|
|
27
29
|
export type AgentInfrastructureFailureCode = (typeof AGENT_INFRASTRUCTURE_FAILURE_CODE)[keyof typeof AGENT_INFRASTRUCTURE_FAILURE_CODE];
|
|
28
30
|
export type AgentFailureCode = AgentErrorCode | AgentInfrastructureFailureCode;
|
|
@@ -69,6 +71,28 @@ export type Issue = {
|
|
|
69
71
|
code: string;
|
|
70
72
|
message: string;
|
|
71
73
|
};
|
|
74
|
+
export declare const CONTROLLED_PROCESS_LAUNCH_FAILURE_CODE: {
|
|
75
|
+
readonly inputEarlyEof: "input_early_eof";
|
|
76
|
+
readonly inputOverrun: "input_overrun";
|
|
77
|
+
readonly inputDigestMismatch: "input_digest_mismatch";
|
|
78
|
+
readonly inputWriteFailed: "input_write_failed";
|
|
79
|
+
readonly inputTransferTimeout: "input_transfer_timeout";
|
|
80
|
+
readonly workerExited: "worker_exited_during_launch";
|
|
81
|
+
readonly protocolViolation: "protocol_violation";
|
|
82
|
+
};
|
|
83
|
+
export type ControlledProcessLaunchFailureCode = (typeof CONTROLLED_PROCESS_LAUNCH_FAILURE_CODE)[keyof typeof CONTROLLED_PROCESS_LAUNCH_FAILURE_CODE];
|
|
84
|
+
export declare const CONTROLLED_PROCESS_LAUNCH_FAILURE_RETRYABILITY: {
|
|
85
|
+
readonly permanent: "permanent";
|
|
86
|
+
readonly transient: "transient";
|
|
87
|
+
};
|
|
88
|
+
export type ControlledProcessLaunchFailureRetryability = (typeof CONTROLLED_PROCESS_LAUNCH_FAILURE_RETRYABILITY)[keyof typeof CONTROLLED_PROCESS_LAUNCH_FAILURE_RETRYABILITY];
|
|
89
|
+
export type ControlledProcessLaunchFailureData = {
|
|
90
|
+
readonly failureCode: ControlledProcessLaunchFailureCode;
|
|
91
|
+
readonly retryability: ControlledProcessLaunchFailureRetryability;
|
|
92
|
+
readonly stage: "host_to_supervisor" | "supervisor_to_shim" | "shim_to_worker" | "control_protocol";
|
|
93
|
+
readonly expectedBytes: number | null;
|
|
94
|
+
readonly actualBytes: number | null;
|
|
95
|
+
};
|
|
72
96
|
export type AgentErrorData = {
|
|
73
97
|
[AGENT_ERROR_CODE.invalidInput]: {
|
|
74
98
|
reason: string;
|
|
@@ -100,6 +124,7 @@ export type AgentErrorData = {
|
|
|
100
124
|
issues: Issue[];
|
|
101
125
|
attempts: number;
|
|
102
126
|
};
|
|
127
|
+
[AGENT_ERROR_CODE.controlledProcessLaunch]: ControlledProcessLaunchFailureData;
|
|
103
128
|
[AGENT_ERROR_CODE.failed]: {
|
|
104
129
|
exitCode: number | null;
|
|
105
130
|
stdoutTail: string | null;
|
package/dist/core/error.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/core/error.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/core/error.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;CAYnB,CAAC;AAEX,MAAM,MAAM,cAAc,GACxB,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAE3D,eAAO,MAAM,mBAAmB;;;CAGtB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAC3B,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAEjE,eAAO,MAAM,iCAAiC;;;CAGpC,CAAC;AAEX,MAAM,MAAM,8BAA8B,GACxC,CAAC,OAAO,iCAAiC,CAAC,CAAC,MAAM,OAAO,iCAAiC,CAAC,CAAC;AAE7F,MAAM,MAAM,gBAAgB,GAAG,cAAc,GAAG,8BAA8B,CAAC;AAE/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