@tangle-network/cli-agent-registry 0.0.0-stage → 0.15.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 (37) hide show
  1. package/LICENSE +11 -0
  2. package/README.md +175 -2
  3. package/dist/backend-types-CNo_Zj_K.mjs +36 -0
  4. package/dist/backend-types-DRmLR1e0.d.mts +47 -0
  5. package/dist/backend-types.d.mts +2 -0
  6. package/dist/backend-types.mjs +2 -0
  7. package/dist/cli-auth-bundle-C6DtK7GX.mjs +95 -0
  8. package/dist/cli-auth-bundle-CwAaH0Ap.d.mts +51 -0
  9. package/dist/cli-auth-bundle.d.mts +2 -0
  10. package/dist/cli-auth-bundle.mjs +2 -0
  11. package/dist/cli-auth-placeholder.d.mts +54 -0
  12. package/dist/cli-auth-placeholder.mjs +200 -0
  13. package/dist/cli-backend-auth-env.d.mts +6 -0
  14. package/dist/cli-backend-auth-env.mjs +44 -0
  15. package/dist/default-backend.d.mts +24 -0
  16. package/dist/default-backend.mjs +31 -0
  17. package/dist/harness-D1fTxnDD.mjs +199 -0
  18. package/dist/harness-contracts-BZoECCMc.mjs +1076 -0
  19. package/dist/host-contracts.d.mts +30 -0
  20. package/dist/host-contracts.json +422 -0
  21. package/dist/host-contracts.mjs +63 -0
  22. package/dist/index.d.mts +1397 -0
  23. package/dist/index.mjs +151 -0
  24. package/dist/local-cli-auth.d.mts +14 -0
  25. package/dist/local-cli-auth.mjs +31 -0
  26. package/dist/native-session-contracts.d.mts +349 -0
  27. package/dist/native-session-contracts.mjs +40 -0
  28. package/dist/servable-models.d.mts +103 -0
  29. package/dist/servable-models.mjs +131 -0
  30. package/dist/session-contract-BhzcbPRW.d.mts +97 -0
  31. package/dist/session-contract.d.mts +2 -0
  32. package/dist/session-contract.mjs +142 -0
  33. package/dist/spec-CcvTM7-j.d.mts +346 -0
  34. package/dist/specs-BBF55TnM.mjs +735 -0
  35. package/dist/specs.d.mts +72 -0
  36. package/dist/specs.mjs +3 -0
  37. package/package.json +87 -3
@@ -0,0 +1,1397 @@
1
+ import { a as isBackendType, i as backendTypeSchema, n as BACKEND_TYPE, o as parseBackendType, r as BackendType, t as ALL_BACKEND_TYPES } from "./backend-types-DRmLR1e0.mjs";
2
+ import { i as LocalCliAuthFile, s as materializeCliAuthBundle } from "./cli-auth-bundle-CwAaH0Ap.mjs";
3
+ import { C as mergeCliDirLayout, S as DEFAULT_CLI_DIR_LAYOUT, _ as harnessModelSupportFor, a as CliAgentEnvExtraRole, b as CliDirLayout, c as CliAgentRuntimeSpec, d as HarnessSpecCapabilities, f as ProviderLogger, g as cliAgentEnvRoleName, h as cliAgentClaimEnvVarNames, i as CliAgentEnvExtraParser, l as CliAgentSpec, m as canonicalModelSlug, n as CliAgentBuiltinTool, o as CliAgentEnvVars, p as ProviderPhase, r as CliAgentEnvExtra, s as CliAgentModelWire, t as AdapterFactory, u as CliAuthHome, v as harnessModelWire, x as CliDirLayoutAdditions, y as SYNTHETIC_ROUTER_MODEL } from "./spec-CcvTM7-j.mjs";
4
+ import { _ as substituteNativeSessionId, a as NativeSessionIdentity, c as SessionFormatId, d as assertStoreLocationHonoursSessionContract, f as compileSessionStoreGlob, g as sessionStoreForPath, h as sessionContractProblems, i as HarnessSessionEvidence, l as assertArgvHonoursSessionContract, m as normalizePosixPath, n as HarnessSessionContractError, o as NativeSessionStore, p as forbiddenArgViolations, r as HarnessSessionContractErrorCode, s as SESSION_FORMAT_IDS, t as HarnessSessionContract, u as assertFlagsHonourSessionContract } from "./session-contract-BhzcbPRW.mjs";
5
+ import { AGENT_BACKEND_ENV_VAR, CLI_AGENT_SPECS, MANAGED_MODEL_KEY_ENV_VAR, MANAGED_MODEL_KEY_NAME_ENV_VAR, agentProfileSchema, claimDeliverableEnvVarNames, cliAgentEnvVarNamesByRole, cliAgentHostPassthroughEnvVarNames, getSpec, messageStorageDirOf } from "./specs.mjs";
6
+ import { resolveDefaultBackend } from "./default-backend.mjs";
7
+ import { describeLocalCliAuthExpectation, discoverLocalCliAuthFiles } from "./local-cli-auth.mjs";
8
+ import { HARNESS_SESSION_UNSUPPORTED, NATIVE_SESSION_CONTRACTS, configDirHomeEnv } from "./native-session-contracts.mjs";
9
+ import { MANAGED_MODEL_LADDER, ManagedModelChain, ManagedModelChainOptions, ManagedModelRung, SkippedManagedModel, bareModelId, isServableManagedModel, managedModelChain } from "./servable-models.mjs";
10
+ import * as _$_tangle_network_agent_interface0 from "@tangle-network/agent-interface";
11
+ import { z } from "zod";
12
+
13
+ //#region src/adapter-bindings.d.ts
14
+ interface AdapterRegistry {
15
+ registerAdapterFactory(name: string, factory: AdapterFactory, options?: {
16
+ force?: boolean;
17
+ }): void;
18
+ unregisterAdapterFactory(name: string): boolean;
19
+ getAdapterFactory(name: string): AdapterFactory | undefined;
20
+ listRegisteredAdapters(): string[];
21
+ assertAdaptersWired(): void;
22
+ }
23
+ /**
24
+ * A composition-owned factory map. Wiring requirements come from this selected
25
+ * catalog, not every harness known elsewhere. No provider implementation is
26
+ * imported here, and separate registries cannot overwrite each other's bindings.
27
+ *
28
+ * Registration itself does not authorize execution. As with the existing API,
29
+ * factories may be staged before catalog admission; callers must still resolve
30
+ * a selected spec and enforce its capabilities before dispatching a request.
31
+ * Unregistering a required factory is not retirement: select a new composition
32
+ * after draining its sessions rather than weakening the wiring invariant.
33
+ */
34
+ declare function createAdapterRegistry(specs: readonly CliAgentSpec[]): AdapterRegistry;
35
+ declare function registerAdapterFactory(name: string, factory: AdapterFactory, options?: {
36
+ force?: boolean;
37
+ }): void;
38
+ declare function unregisterAdapterFactory(name: string): boolean;
39
+ declare function getAdapterFactory(name: string): AdapterFactory | undefined;
40
+ declare function listRegisteredAdapters(): string[];
41
+ declare function assertAdaptersWired(): void;
42
+ //#endregion
43
+ //#region src/agent-run-request.d.ts
44
+ type AgentRunBackend<Shape extends z.ZodRawShape> = z.infer<z.ZodObject<Shape>> & {
45
+ profile?: z.infer<typeof agentProfileSchema>;
46
+ profileSha256?: string;
47
+ };
48
+ /** A backend carries an inline profile, a profile digest, or neither. */
49
+ declare function agentRunBackendVariants<Shape extends z.ZodRawShape>(base: Shape): z.ZodUnion<readonly [z.ZodObject<Shape & {
50
+ profile: z.ZodObject<{
51
+ name: z.ZodOptional<z.ZodString>;
52
+ description: z.ZodOptional<z.ZodString>;
53
+ version: z.ZodOptional<z.ZodString>;
54
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
55
+ prompt: z.ZodOptional<z.ZodObject<{
56
+ systemPrompt: z.ZodOptional<z.ZodString>;
57
+ appendSystemPrompt: z.ZodOptional<z.ZodString>;
58
+ instructions: z.ZodOptional<z.ZodArray<z.ZodString>>;
59
+ }, z.core.$strict>>;
60
+ model: z.ZodOptional<z.ZodObject<{
61
+ default: z.ZodOptional<z.ZodString>;
62
+ small: z.ZodOptional<z.ZodString>;
63
+ provider: z.ZodOptional<z.ZodString>;
64
+ reasoningEffort: z.ZodOptional<z.ZodEnum<{
65
+ none: "none";
66
+ minimal: "minimal";
67
+ low: "low";
68
+ medium: "medium";
69
+ high: "high";
70
+ xhigh: "xhigh";
71
+ ultracode: "ultracode";
72
+ }>>;
73
+ maxVisibleOutputTokens: z.ZodOptional<z.ZodNumber>;
74
+ maxReasoningTokens: z.ZodOptional<z.ZodNumber>;
75
+ maxTotalOutputTokens: z.ZodOptional<z.ZodNumber>;
76
+ metadata: z.ZodOptional<z.ZodType<Record<string, unknown>, unknown, z.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
77
+ }, z.core.$strict>>;
78
+ harness: z.ZodOptional<z.ZodEnum<{
79
+ "claude-code": "claude-code";
80
+ nanoclaw: "nanoclaw";
81
+ codex: "codex";
82
+ opencode: "opencode";
83
+ "kimi-code": "kimi-code";
84
+ pi: "pi";
85
+ prime: "prime";
86
+ gemini: "gemini";
87
+ hermes: "hermes";
88
+ openclaw: "openclaw";
89
+ amp: "amp";
90
+ "factory-droids": "factory-droids";
91
+ forge: "forge";
92
+ cursor: "cursor";
93
+ grok: "grok";
94
+ acp: "acp";
95
+ "cli-base": "cli-base";
96
+ }>>;
97
+ seats: z.ZodOptional<z.ZodArray<z.ZodObject<{
98
+ harness: z.ZodEnum<{
99
+ "claude-code": "claude-code";
100
+ nanoclaw: "nanoclaw";
101
+ codex: "codex";
102
+ opencode: "opencode";
103
+ "kimi-code": "kimi-code";
104
+ pi: "pi";
105
+ prime: "prime";
106
+ gemini: "gemini";
107
+ hermes: "hermes";
108
+ openclaw: "openclaw";
109
+ amp: "amp";
110
+ "factory-droids": "factory-droids";
111
+ forge: "forge";
112
+ cursor: "cursor";
113
+ grok: "grok";
114
+ acp: "acp";
115
+ "cli-base": "cli-base";
116
+ }>;
117
+ provider: z.ZodString;
118
+ model: z.ZodString;
119
+ reasoningEffort: z.ZodOptional<z.ZodEnum<{
120
+ none: "none";
121
+ minimal: "minimal";
122
+ low: "low";
123
+ medium: "medium";
124
+ high: "high";
125
+ xhigh: "xhigh";
126
+ ultracode: "ultracode";
127
+ }>>;
128
+ selector: z.ZodUnion<readonly [z.ZodObject<{
129
+ kind: z.ZodLiteral<"all-eligible">;
130
+ }, z.core.$strict>, z.ZodObject<{
131
+ kind: z.ZodLiteral<"seat">;
132
+ id: z.ZodString;
133
+ }, z.core.$strict>]>;
134
+ tools: z.ZodOptional<z.ZodType<Record<string, boolean>, unknown, z.core.$ZodTypeInternals<Record<string, boolean>, unknown>>>;
135
+ permissions: z.ZodOptional<z.ZodType<Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">>, unknown, z.core.$ZodTypeInternals<Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">>, unknown>>>;
136
+ }, z.core.$strict>>>;
137
+ proxySecrets: z.ZodOptional<z.ZodArray<z.ZodObject<{
138
+ hosts: z.ZodReadonly<z.ZodArray<z.ZodString>>;
139
+ methods: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
140
+ paths: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
141
+ envName: z.ZodString;
142
+ secretRef: z.ZodObject<{
143
+ key: z.ZodString;
144
+ kind: z.ZodLiteral<"secret-ref">;
145
+ }, z.core.$strict>;
146
+ presentation: z.ZodDiscriminatedUnion<[z.ZodObject<{
147
+ type: z.ZodLiteral<"bearer">;
148
+ }, z.core.$strict>, z.ZodObject<{
149
+ type: z.ZodLiteral<"basic">;
150
+ username: z.ZodString;
151
+ }, z.core.$strict>, z.ZodObject<{
152
+ type: z.ZodLiteral<"header">;
153
+ name: z.ZodString;
154
+ }, z.core.$strict>, z.ZodObject<{
155
+ type: z.ZodLiteral<"query">;
156
+ name: z.ZodString;
157
+ }, z.core.$strict>], "type">;
158
+ placeholderFormat: z.ZodOptional<z.ZodEnum<{
159
+ jwt: "jwt";
160
+ opaque: "opaque";
161
+ }>>;
162
+ ttlSeconds: z.ZodOptional<z.ZodNumber>;
163
+ }, z.core.$strict>>>;
164
+ permissions: z.ZodOptional<z.ZodType<Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">>, unknown, z.core.$ZodTypeInternals<Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">>, unknown>>>;
165
+ tools: z.ZodOptional<z.ZodType<Record<string, boolean>, unknown, z.core.$ZodTypeInternals<Record<string, boolean>, unknown>>>;
166
+ mcp: z.ZodOptional<z.ZodType<Record<string, _$_tangle_network_agent_interface0.AgentProfileMcpServer>, unknown, z.core.$ZodTypeInternals<Record<string, _$_tangle_network_agent_interface0.AgentProfileMcpServer>, unknown>>>;
167
+ connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
168
+ connectionId: z.ZodString;
169
+ capabilities: z.ZodArray<z.ZodString>;
170
+ alias: z.ZodOptional<z.ZodString>;
171
+ }, z.core.$strict>>>;
172
+ subagents: z.ZodOptional<z.ZodType<Record<string, {
173
+ description?: string | undefined;
174
+ prompt?: string | undefined;
175
+ model?: string | undefined;
176
+ tools?: Record<string, boolean> | undefined;
177
+ permissions?: Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">> | undefined;
178
+ maxSteps?: number | undefined;
179
+ metadata?: Record<string, unknown> | undefined;
180
+ }>, unknown, z.core.$ZodTypeInternals<Record<string, {
181
+ description?: string | undefined;
182
+ prompt?: string | undefined;
183
+ model?: string | undefined;
184
+ tools?: Record<string, boolean> | undefined;
185
+ permissions?: Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">> | undefined;
186
+ maxSteps?: number | undefined;
187
+ metadata?: Record<string, unknown> | undefined;
188
+ }>, unknown>>>;
189
+ resources: z.ZodOptional<z.ZodObject<{
190
+ knowledge: z.ZodOptional<z.ZodArray<z.ZodObject<{
191
+ sourceId: z.ZodString;
192
+ generation: z.ZodString;
193
+ }, z.core.$strict>>>;
194
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
195
+ path: z.ZodString;
196
+ resource: z.ZodUnion<readonly [z.ZodObject<{
197
+ kind: z.ZodLiteral<"inline">;
198
+ name: z.ZodString;
199
+ content: z.ZodString;
200
+ }, z.core.$strict>, z.ZodObject<{
201
+ kind: z.ZodLiteral<"github">;
202
+ repository: z.ZodOptional<z.ZodString>;
203
+ path: z.ZodString;
204
+ ref: z.ZodOptional<z.ZodString>;
205
+ name: z.ZodOptional<z.ZodString>;
206
+ }, z.core.$strict>]>;
207
+ executable: z.ZodOptional<z.ZodBoolean>;
208
+ }, z.core.$strict>>>;
209
+ tools: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
210
+ kind: z.ZodLiteral<"inline">;
211
+ name: z.ZodString;
212
+ content: z.ZodString;
213
+ }, z.core.$strict>, z.ZodObject<{
214
+ kind: z.ZodLiteral<"github">;
215
+ repository: z.ZodOptional<z.ZodString>;
216
+ path: z.ZodString;
217
+ ref: z.ZodOptional<z.ZodString>;
218
+ name: z.ZodOptional<z.ZodString>;
219
+ }, z.core.$strict>]>>>;
220
+ skills: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
221
+ kind: z.ZodLiteral<"inline">;
222
+ name: z.ZodString;
223
+ content: z.ZodString;
224
+ }, z.core.$strict>, z.ZodObject<{
225
+ kind: z.ZodLiteral<"github">;
226
+ repository: z.ZodOptional<z.ZodString>;
227
+ path: z.ZodString;
228
+ ref: z.ZodOptional<z.ZodString>;
229
+ name: z.ZodOptional<z.ZodString>;
230
+ }, z.core.$strict>]>>>;
231
+ agents: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
232
+ kind: z.ZodLiteral<"inline">;
233
+ name: z.ZodString;
234
+ content: z.ZodString;
235
+ }, z.core.$strict>, z.ZodObject<{
236
+ kind: z.ZodLiteral<"github">;
237
+ repository: z.ZodOptional<z.ZodString>;
238
+ path: z.ZodString;
239
+ ref: z.ZodOptional<z.ZodString>;
240
+ name: z.ZodOptional<z.ZodString>;
241
+ }, z.core.$strict>]>>>;
242
+ commands: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
243
+ kind: z.ZodLiteral<"inline">;
244
+ name: z.ZodString;
245
+ content: z.ZodString;
246
+ }, z.core.$strict>, z.ZodObject<{
247
+ kind: z.ZodLiteral<"github">;
248
+ repository: z.ZodOptional<z.ZodString>;
249
+ path: z.ZodString;
250
+ ref: z.ZodOptional<z.ZodString>;
251
+ name: z.ZodOptional<z.ZodString>;
252
+ }, z.core.$strict>]>>>;
253
+ instructions: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
254
+ kind: z.ZodLiteral<"inline">;
255
+ name: z.ZodString;
256
+ content: z.ZodString;
257
+ }, z.core.$strict>, z.ZodObject<{
258
+ kind: z.ZodLiteral<"github">;
259
+ repository: z.ZodOptional<z.ZodString>;
260
+ path: z.ZodString;
261
+ ref: z.ZodOptional<z.ZodString>;
262
+ name: z.ZodOptional<z.ZodString>;
263
+ }, z.core.$strict>]>]>>;
264
+ failOnError: z.ZodOptional<z.ZodBoolean>;
265
+ }, z.core.$strict>>;
266
+ hooks: z.ZodOptional<z.ZodType<Record<string, {
267
+ command: string;
268
+ timeoutMs?: number | undefined;
269
+ blocking?: boolean | undefined;
270
+ matcher?: string | undefined;
271
+ env?: Record<string, {
272
+ kind: "secret-ref";
273
+ key: string;
274
+ format?: "raw" | "bearer" | undefined;
275
+ } | {
276
+ kind: "public";
277
+ value: string;
278
+ }> | undefined;
279
+ }[]>, unknown, z.core.$ZodTypeInternals<Record<string, {
280
+ command: string;
281
+ timeoutMs?: number | undefined;
282
+ blocking?: boolean | undefined;
283
+ matcher?: string | undefined;
284
+ env?: Record<string, {
285
+ kind: "secret-ref";
286
+ key: string;
287
+ format?: "raw" | "bearer" | undefined;
288
+ } | {
289
+ kind: "public";
290
+ value: string;
291
+ }> | undefined;
292
+ }[]>, unknown>>>;
293
+ modes: z.ZodOptional<z.ZodType<Record<string, {
294
+ description?: string | undefined;
295
+ model?: string | undefined;
296
+ prompt?: string | undefined;
297
+ tools?: Record<string, boolean> | undefined;
298
+ permissions?: Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">> | undefined;
299
+ metadata?: Record<string, unknown> | undefined;
300
+ }>, unknown, z.core.$ZodTypeInternals<Record<string, {
301
+ description?: string | undefined;
302
+ model?: string | undefined;
303
+ prompt?: string | undefined;
304
+ tools?: Record<string, boolean> | undefined;
305
+ permissions?: Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">> | undefined;
306
+ metadata?: Record<string, unknown> | undefined;
307
+ }>, unknown>>>;
308
+ confidential: z.ZodOptional<z.ZodObject<{
309
+ tee: z.ZodOptional<z.ZodString>;
310
+ attestationNonce: z.ZodOptional<z.ZodString>;
311
+ sealed: z.ZodOptional<z.ZodBoolean>;
312
+ attestationRefresh: z.ZodOptional<z.ZodBoolean>;
313
+ }, z.core.$strict>>;
314
+ metadata: z.ZodOptional<z.ZodType<_$_tangle_network_agent_interface0.AgentProfileMetadata, unknown, z.core.$ZodTypeInternals<_$_tangle_network_agent_interface0.AgentProfileMetadata, unknown>>>;
315
+ extensions: z.ZodOptional<z.ZodType<Record<string, Record<string, unknown> | undefined>, unknown, z.core.$ZodTypeInternals<Record<string, Record<string, unknown> | undefined>, unknown>>>;
316
+ }, z.core.$strict>;
317
+ } extends infer T ? { -readonly [P in keyof T]: T[P] } : never, z.core.$strict>, z.ZodObject<Shape & {
318
+ profileSha256: z.ZodString;
319
+ } extends infer T_1 ? { -readonly [P_1 in keyof T_1]: T_1[P_1] } : never, z.core.$strict>, z.ZodObject<{ -readonly [P_2 in keyof Shape]: Shape[P_2] }, z.core.$strict>]>;
320
+ declare const agentRunWorkspaceSchema: z.ZodObject<{
321
+ rootPath: z.ZodOptional<z.ZodString>;
322
+ debugDirectory: z.ZodOptional<z.ZodString>;
323
+ skipInitialization: z.ZodOptional<z.ZodBoolean>;
324
+ cleanupOnShutdown: z.ZodOptional<z.ZodBoolean>;
325
+ }, z.core.$strip>;
326
+ /** The shared request fields, in wire order around each end's workspace and backend. */
327
+ declare function agentRunRequestSharedShape<Workspace extends z.ZodType, Backend extends z.ZodType>(workspace: Workspace, backend: Backend): {
328
+ sessionId: z.ZodOptional<z.ZodString>;
329
+ displayName: z.ZodOptional<z.ZodString>;
330
+ description: z.ZodOptional<z.ZodString>;
331
+ domains: z.ZodOptional<z.ZodArray<z.ZodString>>;
332
+ workspace: Workspace;
333
+ backend: Backend;
334
+ expectedPublicProfileRequestDigest: z.ZodOptional<z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>>;
335
+ expectedPublicProfileRevision: z.ZodOptional<z.ZodObject<{
336
+ workspacePlanDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
337
+ materializedDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
338
+ launchDigest: z.ZodString;
339
+ }, z.core.$strict>>;
340
+ expectedSecretProfileReceipt: z.ZodOptional<z.ZodString>;
341
+ githubToken: z.ZodOptional<z.ZodString>;
342
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
343
+ };
344
+ //#endregion
345
+ //#region src/harness-contracts/contract.d.ts
346
+ type HarnessBackendId = BackendType;
347
+ type KeySource = "managed" | "api-key" | "api-key-env" | "cli-auth";
348
+ /** A defect is evidence of missing proof, never a passing scenario. */
349
+ interface HarnessDefect {
350
+ issue: string;
351
+ reason: string;
352
+ }
353
+ type SessionContract = {
354
+ kind: "native";
355
+ contract: HarnessSessionContract; /** Observe the installed CLI; pending defects still prevent recovery claims. */
356
+ processProbe: {
357
+ versionCommand: string; /** pgrep selector and expression, scoped to the fixture-owned sandbox. */
358
+ kill: readonly [string, string];
359
+ };
360
+ defect: HarnessDefect | null;
361
+ } | {
362
+ kind: "unsupported";
363
+ defect: HarnessDefect;
364
+ } | {
365
+ kind: "no-agent";
366
+ reason: string;
367
+ };
368
+ /** Serializable requirements; production policy and validators retain their owners. */
369
+ type HarnessConfigAssertion = "managed-full-ladder" | "operator-model-first" | "named-model-exact" | "responses-config-model-id";
370
+ type HarnessConfigContract = {
371
+ kind: "model";
372
+ providerRequiresModel: true;
373
+ assertions?: readonly HarnessConfigAssertion[];
374
+ keySources: readonly [KeySource, ...KeySource[]];
375
+ baseUrl: "caller-or-managed" | "vendor-only";
376
+ envVars: CliAgentEnvVars;
377
+ modelWire: CliAgentModelWire;
378
+ } | {
379
+ kind: "no-agent";
380
+ envVars: CliAgentEnvVars;
381
+ reason: string;
382
+ };
383
+ type LifecycleCapability = {
384
+ kind: "required";
385
+ } | {
386
+ kind: "unsupported";
387
+ reason: string;
388
+ };
389
+ interface HarnessLifecycleContract {
390
+ /** Runtime consumers and probes read the same capability declaration. */
391
+ runtime: CliAgentRuntimeSpec | undefined;
392
+ coldCreate: LifecycleCapability;
393
+ warmClaim: LifecycleCapability;
394
+ parkResume: LifecycleCapability;
395
+ branchChild: LifecycleCapability;
396
+ killResume: LifecycleCapability;
397
+ }
398
+ interface HarnessContract {
399
+ session: SessionContract;
400
+ config: HarnessConfigContract;
401
+ lifecycle: HarnessLifecycleContract;
402
+ }
403
+ //#endregion
404
+ //#region src/harness-contracts/index.d.ts
405
+ declare const HARNESSES: {
406
+ "claude-code": {
407
+ session: {
408
+ kind: "native";
409
+ processProbe: {
410
+ versionCommand: string;
411
+ kill: [string, string];
412
+ };
413
+ contract: {
414
+ version: 1;
415
+ stores: [NativeSessionStore];
416
+ identity: {
417
+ kind: "pre-minted";
418
+ args: string[];
419
+ };
420
+ resume: {
421
+ kind: "args";
422
+ args: string[];
423
+ };
424
+ forbiddenArgs: string[];
425
+ storeEnv: {
426
+ CLAUDE_CONFIG_DIR: string;
427
+ };
428
+ evidence: {
429
+ servedModel: "provider-response";
430
+ usage: "per-response";
431
+ endingError: "session-record";
432
+ };
433
+ cliVersion: "2.1.311";
434
+ };
435
+ defect: null;
436
+ };
437
+ config: {
438
+ kind: "model";
439
+ providerRequiresModel: true;
440
+ assertions: ("managed-full-ladder" | "operator-model-first" | "named-model-exact")[];
441
+ keySources: ["managed", "api-key", "api-key-env", "cli-auth"];
442
+ baseUrl: "caller-or-managed";
443
+ modelWire: "anthropic-messages";
444
+ envVars: {
445
+ apiKey: string;
446
+ model: string;
447
+ authMode: string;
448
+ authFiles: string;
449
+ oauthToken: string;
450
+ baseUrl: string;
451
+ };
452
+ };
453
+ lifecycle: {
454
+ runtime: {};
455
+ coldCreate: {
456
+ kind: "required";
457
+ };
458
+ warmClaim: {
459
+ kind: "required";
460
+ };
461
+ parkResume: {
462
+ kind: "required";
463
+ };
464
+ branchChild: {
465
+ kind: "required";
466
+ };
467
+ killResume: {
468
+ kind: "required";
469
+ };
470
+ };
471
+ };
472
+ codex: {
473
+ session: {
474
+ kind: "native";
475
+ processProbe: {
476
+ versionCommand: string;
477
+ kill: [string, string];
478
+ };
479
+ contract: {
480
+ version: 1;
481
+ stores: [NativeSessionStore, NativeSessionStore];
482
+ identity: {
483
+ kind: "first-event";
484
+ event: string;
485
+ deadlineMs: number;
486
+ };
487
+ resume: {
488
+ kind: "args";
489
+ args: string[];
490
+ };
491
+ forbiddenArgs: string[];
492
+ storeEnv: {
493
+ CODEX_HOME: string;
494
+ };
495
+ evidence: {
496
+ servedModel: "turn-context";
497
+ usage: "cumulative";
498
+ endingError: "session-record";
499
+ };
500
+ cliVersion: "0.164.0";
501
+ };
502
+ defect: null;
503
+ };
504
+ config: {
505
+ kind: "model";
506
+ providerRequiresModel: true;
507
+ assertions: ("managed-full-ladder" | "operator-model-first" | "named-model-exact" | "responses-config-model-id")[];
508
+ keySources: ["managed", "api-key", "api-key-env", "cli-auth"];
509
+ baseUrl: "caller-or-managed";
510
+ modelWire: "openai-responses";
511
+ envVars: {
512
+ apiKey: string;
513
+ model: string;
514
+ authMode: string;
515
+ authFiles: string;
516
+ baseUrl: string;
517
+ };
518
+ };
519
+ lifecycle: {
520
+ runtime: {
521
+ secretProfileIsolation: true;
522
+ };
523
+ coldCreate: {
524
+ kind: "required";
525
+ };
526
+ warmClaim: {
527
+ kind: "required";
528
+ };
529
+ parkResume: {
530
+ kind: "required";
531
+ };
532
+ branchChild: {
533
+ kind: "required";
534
+ };
535
+ killResume: {
536
+ kind: "required";
537
+ };
538
+ };
539
+ };
540
+ opencode: {
541
+ session: {
542
+ kind: "native";
543
+ processProbe: {
544
+ versionCommand: string;
545
+ kill: [string, string];
546
+ };
547
+ contract: {
548
+ version: 1;
549
+ stores: [{
550
+ root: string;
551
+ files: string[];
552
+ write: "sqlite-wal";
553
+ shared: true;
554
+ format: "opencode.sqlite";
555
+ }];
556
+ identity: {
557
+ kind: "first-event";
558
+ event: string;
559
+ deadlineMs: number;
560
+ };
561
+ resume: {
562
+ kind: "args";
563
+ args: string[];
564
+ };
565
+ forbiddenArgs: never[];
566
+ storeEnv: {
567
+ XDG_DATA_HOME: string;
568
+ };
569
+ evidence: {
570
+ servedModel: "turn-context";
571
+ usage: "per-response";
572
+ endingError: "session-record";
573
+ };
574
+ cliVersion: "1.19.4";
575
+ };
576
+ defect: null;
577
+ };
578
+ config: {
579
+ kind: "model";
580
+ providerRequiresModel: true;
581
+ keySources: ["managed", "api-key", "api-key-env"];
582
+ baseUrl: "caller-or-managed";
583
+ modelWire: "openai-compat";
584
+ envVars: {
585
+ apiKey: string;
586
+ model: string;
587
+ baseUrl: string;
588
+ extras: {
589
+ OPENCODE_MODEL_PROVIDER: {
590
+ parser: "string";
591
+ role: "provider";
592
+ };
593
+ OPENCODE_MODEL_MODE: {
594
+ parser: "string";
595
+ role: "mode";
596
+ };
597
+ };
598
+ };
599
+ };
600
+ lifecycle: {
601
+ runtime: {
602
+ secretProfileIsolation: true;
603
+ redactsHostEnv: true;
604
+ supportsToolDisabledTurns: true;
605
+ };
606
+ coldCreate: {
607
+ kind: "required";
608
+ };
609
+ warmClaim: {
610
+ kind: "required";
611
+ };
612
+ parkResume: {
613
+ kind: "required";
614
+ };
615
+ branchChild: {
616
+ kind: "required";
617
+ };
618
+ killResume: {
619
+ kind: "required";
620
+ };
621
+ };
622
+ };
623
+ pi: {
624
+ session: {
625
+ kind: "native";
626
+ processProbe: {
627
+ versionCommand: string;
628
+ kill: [string, string];
629
+ };
630
+ contract: {
631
+ version: 1;
632
+ stores: [{
633
+ root: string;
634
+ files: string[];
635
+ write: "jsonl-append";
636
+ shared: false;
637
+ format: "pi.session-jsonl";
638
+ }];
639
+ identity: {
640
+ kind: "pre-minted";
641
+ args: string[];
642
+ };
643
+ resume: {
644
+ kind: "args";
645
+ args: string[];
646
+ };
647
+ forbiddenArgs: string[];
648
+ storeEnv: {
649
+ PI_CODING_AGENT_DIR: string;
650
+ PI_CODING_AGENT_SESSION_DIR: string;
651
+ "--session-dir": string;
652
+ };
653
+ evidence: {
654
+ servedModel: "session-record";
655
+ usage: "per-response";
656
+ endingError: "session-record";
657
+ };
658
+ cliVersion: "1.4.0";
659
+ };
660
+ defect: null;
661
+ };
662
+ config: {
663
+ kind: "model";
664
+ providerRequiresModel: true;
665
+ keySources: ["managed", "api-key", "api-key-env", "cli-auth"];
666
+ baseUrl: "caller-or-managed";
667
+ modelWire: "openai-compat";
668
+ envVars: {
669
+ apiKey: string;
670
+ model: string;
671
+ baseUrl: string;
672
+ };
673
+ };
674
+ lifecycle: {
675
+ runtime: {};
676
+ coldCreate: {
677
+ kind: "required";
678
+ };
679
+ warmClaim: {
680
+ kind: "required";
681
+ };
682
+ parkResume: {
683
+ kind: "required";
684
+ };
685
+ branchChild: {
686
+ kind: "required";
687
+ };
688
+ killResume: {
689
+ kind: "required";
690
+ };
691
+ };
692
+ };
693
+ "kimi-code": {
694
+ session: {
695
+ kind: "native";
696
+ processProbe: {
697
+ versionCommand: string;
698
+ kill: [string, string];
699
+ };
700
+ contract: {
701
+ version: 1;
702
+ stores: [NativeSessionStore];
703
+ identity: {
704
+ kind: "pre-minted";
705
+ args: string[];
706
+ };
707
+ resume: {
708
+ kind: "args";
709
+ args: string[];
710
+ };
711
+ forbiddenArgs: never[];
712
+ storeEnv: {};
713
+ evidence: {
714
+ servedModel: "none";
715
+ usage: "per-response";
716
+ endingError: "session-record";
717
+ };
718
+ cliVersion: "1.49.0";
719
+ };
720
+ defect: null;
721
+ };
722
+ config: {
723
+ kind: "model";
724
+ providerRequiresModel: true;
725
+ keySources: ["managed", "api-key", "api-key-env", "cli-auth"];
726
+ baseUrl: "caller-or-managed";
727
+ modelWire: "openai-compat";
728
+ envVars: {
729
+ apiKey: string;
730
+ model: string;
731
+ authMode: string;
732
+ authFiles: string;
733
+ extras: {
734
+ OPENAI_BASE_URL: {
735
+ parser: "string";
736
+ };
737
+ };
738
+ };
739
+ };
740
+ lifecycle: {
741
+ runtime: {
742
+ warmRetention: {
743
+ envVar: string;
744
+ enabledByDefault: false;
745
+ };
746
+ };
747
+ coldCreate: {
748
+ kind: "required";
749
+ };
750
+ warmClaim: {
751
+ kind: "required";
752
+ };
753
+ parkResume: {
754
+ kind: "required";
755
+ };
756
+ branchChild: {
757
+ kind: "required";
758
+ };
759
+ killResume: {
760
+ kind: "required";
761
+ };
762
+ };
763
+ };
764
+ "factory-droids": {
765
+ session: {
766
+ kind: "native";
767
+ processProbe: {
768
+ versionCommand: string;
769
+ kill: [string, string];
770
+ };
771
+ contract: {
772
+ version: 1;
773
+ stores: [{
774
+ root: string;
775
+ files: string[];
776
+ write: "jsonl-append";
777
+ shared: false;
778
+ format: "factory.session-jsonl";
779
+ }, {
780
+ root: string;
781
+ files: string[];
782
+ write: "json-rewrite";
783
+ shared: false;
784
+ format: "factory.session-jsonl";
785
+ }];
786
+ identity: {
787
+ kind: "first-event";
788
+ event: string;
789
+ deadlineMs: number;
790
+ };
791
+ resume: {
792
+ kind: "args";
793
+ args: string[];
794
+ };
795
+ forbiddenArgs: never[];
796
+ storeEnv: {};
797
+ evidence: {
798
+ servedModel: "turn-context";
799
+ usage: "session-total";
800
+ endingError: "none";
801
+ };
802
+ cliVersion: "0.250.0";
803
+ };
804
+ defect: null;
805
+ };
806
+ config: {
807
+ kind: "model";
808
+ providerRequiresModel: true;
809
+ keySources: ["managed", "api-key", "api-key-env"];
810
+ baseUrl: "caller-or-managed";
811
+ modelWire: "openai-compat";
812
+ envVars: {
813
+ apiKey: string;
814
+ model: string;
815
+ };
816
+ };
817
+ lifecycle: {
818
+ runtime: undefined;
819
+ coldCreate: {
820
+ kind: "required";
821
+ };
822
+ warmClaim: {
823
+ kind: "required";
824
+ };
825
+ parkResume: {
826
+ kind: "required";
827
+ };
828
+ branchChild: {
829
+ kind: "required";
830
+ };
831
+ killResume: {
832
+ kind: "required";
833
+ };
834
+ };
835
+ };
836
+ grok: {
837
+ session: {
838
+ kind: "native";
839
+ processProbe: {
840
+ versionCommand: string;
841
+ kill: [string, string];
842
+ };
843
+ contract: {
844
+ version: 1;
845
+ stores: [{
846
+ root: string;
847
+ files: string[];
848
+ write: "jsonl-append";
849
+ shared: false;
850
+ format: "grok.acp-session-dir";
851
+ }];
852
+ identity: {
853
+ kind: "first-event";
854
+ event: string;
855
+ deadlineMs: number;
856
+ };
857
+ resume: {
858
+ kind: "args";
859
+ args: string[];
860
+ };
861
+ forbiddenArgs: never[];
862
+ storeEnv: {
863
+ GROK_HOME: string;
864
+ };
865
+ evidence: {
866
+ servedModel: "session-record";
867
+ usage: "none";
868
+ endingError: "none";
869
+ };
870
+ cliVersion: "0.1.220";
871
+ };
872
+ defect: null;
873
+ };
874
+ config: {
875
+ kind: "model";
876
+ providerRequiresModel: true;
877
+ keySources: ["api-key", "api-key-env"];
878
+ baseUrl: "caller-or-managed";
879
+ modelWire: "openai-compat";
880
+ envVars: {
881
+ apiKey: string;
882
+ model: string;
883
+ };
884
+ };
885
+ lifecycle: {
886
+ runtime: undefined;
887
+ coldCreate: {
888
+ kind: "required";
889
+ };
890
+ warmClaim: {
891
+ kind: "required";
892
+ };
893
+ parkResume: {
894
+ kind: "required";
895
+ };
896
+ branchChild: {
897
+ kind: "required";
898
+ };
899
+ killResume: {
900
+ kind: "required";
901
+ };
902
+ };
903
+ };
904
+ amp: {
905
+ session: {
906
+ kind: "native";
907
+ processProbe: {
908
+ versionCommand: string;
909
+ kill: [string, string];
910
+ };
911
+ contract: {
912
+ version: 1;
913
+ stores: [{
914
+ root: string;
915
+ files: string[];
916
+ write: "json-rewrite";
917
+ shared: false;
918
+ format: "amp.thread-json";
919
+ }];
920
+ identity: {
921
+ kind: "first-event";
922
+ event: string;
923
+ deadlineMs: number;
924
+ };
925
+ resume: {
926
+ kind: "args";
927
+ args: string[];
928
+ };
929
+ forbiddenArgs: never[];
930
+ storeEnv: {
931
+ XDG_DATA_HOME: string;
932
+ };
933
+ evidence: {
934
+ servedModel: "session-record";
935
+ usage: "per-response";
936
+ endingError: "none";
937
+ };
938
+ cliVersion: "0.0.1793104576-gc52692";
939
+ };
940
+ defect: {
941
+ issue: string;
942
+ reason: string;
943
+ };
944
+ };
945
+ config: {
946
+ kind: "model";
947
+ providerRequiresModel: true;
948
+ keySources: ["api-key", "api-key-env", "cli-auth"];
949
+ baseUrl: "vendor-only";
950
+ modelWire: "openai-compat";
951
+ envVars: {
952
+ apiKey: string;
953
+ model: string;
954
+ authMode: string;
955
+ authFiles: string;
956
+ };
957
+ };
958
+ lifecycle: {
959
+ runtime: undefined;
960
+ coldCreate: {
961
+ kind: "required";
962
+ };
963
+ warmClaim: {
964
+ kind: "required";
965
+ };
966
+ parkResume: {
967
+ kind: "required";
968
+ };
969
+ branchChild: {
970
+ kind: "required";
971
+ };
972
+ killResume: {
973
+ kind: "required";
974
+ };
975
+ };
976
+ };
977
+ prime: {
978
+ session: {
979
+ kind: "native";
980
+ processProbe: {
981
+ versionCommand: string;
982
+ kill: [string, string];
983
+ };
984
+ contract: {
985
+ version: 1;
986
+ stores: [{
987
+ root: string;
988
+ files: string[];
989
+ write: "jsonl-append";
990
+ shared: true;
991
+ format: "prime.session-jsonl";
992
+ }];
993
+ identity: {
994
+ kind: "api-created";
995
+ call: "acp session/new";
996
+ };
997
+ resume: {
998
+ kind: "api";
999
+ };
1000
+ forbiddenArgs: string[];
1001
+ storeEnv: {};
1002
+ evidence: {
1003
+ servedModel: "session-record";
1004
+ usage: "per-response";
1005
+ endingError: "session-record";
1006
+ };
1007
+ cliVersion: "0.10.1";
1008
+ };
1009
+ defect: null;
1010
+ };
1011
+ config: {
1012
+ kind: "model";
1013
+ providerRequiresModel: true;
1014
+ keySources: ["managed", "api-key", "api-key-env"];
1015
+ baseUrl: "caller-or-managed";
1016
+ modelWire: "openai-compat";
1017
+ envVars: {
1018
+ apiKey: string;
1019
+ model: string;
1020
+ baseUrl: string;
1021
+ };
1022
+ };
1023
+ lifecycle: {
1024
+ runtime: undefined;
1025
+ coldCreate: {
1026
+ kind: "required";
1027
+ };
1028
+ warmClaim: {
1029
+ kind: "required";
1030
+ };
1031
+ parkResume: {
1032
+ kind: "required";
1033
+ };
1034
+ branchChild: {
1035
+ kind: "required";
1036
+ };
1037
+ killResume: {
1038
+ kind: "required";
1039
+ };
1040
+ };
1041
+ };
1042
+ hermes: {
1043
+ session: {
1044
+ kind: "native";
1045
+ processProbe: {
1046
+ versionCommand: string;
1047
+ kill: [string, string];
1048
+ };
1049
+ contract: {
1050
+ version: 1;
1051
+ stores: [NativeSessionStore];
1052
+ identity: {
1053
+ kind: "first-event";
1054
+ event: string;
1055
+ deadlineMs: number;
1056
+ };
1057
+ resume: {
1058
+ kind: "args";
1059
+ args: string[];
1060
+ };
1061
+ forbiddenArgs: never[];
1062
+ storeEnv: {
1063
+ HERMES_HOME: string;
1064
+ };
1065
+ evidence: {
1066
+ servedModel: "session-record";
1067
+ usage: "session-total";
1068
+ endingError: "none";
1069
+ };
1070
+ cliVersion: "0.22.4";
1071
+ };
1072
+ defect: null;
1073
+ };
1074
+ config: {
1075
+ kind: "model";
1076
+ providerRequiresModel: true;
1077
+ keySources: ["managed", "api-key", "api-key-env", "cli-auth"];
1078
+ baseUrl: "caller-or-managed";
1079
+ modelWire: "openai-compat";
1080
+ envVars: {
1081
+ apiKey: string;
1082
+ model: string;
1083
+ authMode: string;
1084
+ authFiles: string;
1085
+ baseUrl: string;
1086
+ extras: {
1087
+ HERMES_INFERENCE_PROVIDER: {
1088
+ parser: "string";
1089
+ };
1090
+ };
1091
+ };
1092
+ };
1093
+ lifecycle: {
1094
+ runtime: undefined;
1095
+ coldCreate: {
1096
+ kind: "required";
1097
+ };
1098
+ warmClaim: {
1099
+ kind: "required";
1100
+ };
1101
+ parkResume: {
1102
+ kind: "required";
1103
+ };
1104
+ branchChild: {
1105
+ kind: "required";
1106
+ };
1107
+ killResume: {
1108
+ kind: "required";
1109
+ };
1110
+ };
1111
+ };
1112
+ openclaw: {
1113
+ session: {
1114
+ kind: "native";
1115
+ processProbe: {
1116
+ versionCommand: string;
1117
+ kill: [string, string];
1118
+ };
1119
+ contract: {
1120
+ version: 1;
1121
+ stores: [{
1122
+ root: string;
1123
+ files: string[];
1124
+ write: "sqlite-wal";
1125
+ shared: true;
1126
+ format: "openclaw.session-jsonl";
1127
+ }];
1128
+ identity: {
1129
+ kind: "pre-minted";
1130
+ args: string[];
1131
+ };
1132
+ resume: {
1133
+ kind: "args";
1134
+ args: string[];
1135
+ };
1136
+ forbiddenArgs: never[];
1137
+ storeEnv: {};
1138
+ evidence: {
1139
+ servedModel: "session-record";
1140
+ usage: "per-response";
1141
+ endingError: "none";
1142
+ };
1143
+ cliVersion: "2026.10.8";
1144
+ };
1145
+ defect: null;
1146
+ };
1147
+ config: {
1148
+ kind: "model";
1149
+ providerRequiresModel: true;
1150
+ keySources: ["managed", "api-key", "api-key-env", "cli-auth"];
1151
+ baseUrl: "caller-or-managed";
1152
+ modelWire: "openai-compat";
1153
+ envVars: {
1154
+ apiKey: string;
1155
+ model: string;
1156
+ baseUrl: string;
1157
+ authMode: string;
1158
+ authFiles: string;
1159
+ };
1160
+ };
1161
+ lifecycle: {
1162
+ runtime: undefined;
1163
+ coldCreate: {
1164
+ kind: "required";
1165
+ };
1166
+ warmClaim: {
1167
+ kind: "required";
1168
+ };
1169
+ parkResume: {
1170
+ kind: "required";
1171
+ };
1172
+ branchChild: {
1173
+ kind: "required";
1174
+ };
1175
+ killResume: {
1176
+ kind: "required";
1177
+ };
1178
+ };
1179
+ };
1180
+ nanoclaw: {
1181
+ session: {
1182
+ kind: "native";
1183
+ processProbe: {
1184
+ versionCommand: string;
1185
+ kill: [string, string];
1186
+ };
1187
+ contract: {
1188
+ version: 1;
1189
+ stores: [{
1190
+ root: string;
1191
+ files: string[];
1192
+ write: "sqlite-wal";
1193
+ shared: false;
1194
+ format: "nanoclaw.session-sqlite";
1195
+ }];
1196
+ identity: {
1197
+ kind: "first-event";
1198
+ event: string;
1199
+ deadlineMs: number;
1200
+ };
1201
+ resume: {
1202
+ kind: "api";
1203
+ };
1204
+ forbiddenArgs: never[];
1205
+ storeEnv: {
1206
+ NANOCLAW_RUNTIME_ROOT: string;
1207
+ };
1208
+ evidence: {
1209
+ servedModel: "none";
1210
+ usage: "per-response";
1211
+ endingError: "none";
1212
+ };
1213
+ cliVersion: "2.1.54";
1214
+ };
1215
+ defect: null;
1216
+ };
1217
+ config: {
1218
+ kind: "model";
1219
+ providerRequiresModel: true;
1220
+ keySources: ["managed", "api-key", "api-key-env"];
1221
+ baseUrl: "caller-or-managed";
1222
+ modelWire: "openai-compat";
1223
+ envVars: {
1224
+ apiKey: string;
1225
+ model: string;
1226
+ authMode: string;
1227
+ baseUrl: string;
1228
+ extras: {
1229
+ NANOCLAW_PROJECT_ROOT: {
1230
+ parser: "string";
1231
+ };
1232
+ NANOCLAW_NATIVE_CREDENTIALS: {
1233
+ parser: "string";
1234
+ };
1235
+ OPENCODE_MODEL_PROVIDER: {
1236
+ parser: "string";
1237
+ role: "provider";
1238
+ };
1239
+ };
1240
+ };
1241
+ };
1242
+ lifecycle: {
1243
+ runtime: undefined;
1244
+ coldCreate: {
1245
+ kind: "required";
1246
+ };
1247
+ warmClaim: {
1248
+ kind: "required";
1249
+ };
1250
+ parkResume: {
1251
+ kind: "required";
1252
+ };
1253
+ branchChild: {
1254
+ kind: "required";
1255
+ };
1256
+ killResume: {
1257
+ kind: "required";
1258
+ };
1259
+ };
1260
+ };
1261
+ acp: {
1262
+ session: {
1263
+ kind: "native";
1264
+ processProbe: {
1265
+ versionCommand: string;
1266
+ kill: [string, string];
1267
+ };
1268
+ contract: {
1269
+ version: 1;
1270
+ stores: [NativeSessionStore, NativeSessionStore, NativeSessionStore, NativeSessionStore, NativeSessionStore];
1271
+ identity: {
1272
+ kind: "api-created";
1273
+ call: "acp session/new";
1274
+ };
1275
+ resume: {
1276
+ kind: "api";
1277
+ };
1278
+ forbiddenArgs: never[];
1279
+ storeEnv: {};
1280
+ evidence: {
1281
+ servedModel: "session-record";
1282
+ usage: "session-total";
1283
+ endingError: "none";
1284
+ };
1285
+ cliVersion: "claude-agent-acp 0.97.0; codex-acp 0.16.0; gemini-cli 0.65.0";
1286
+ };
1287
+ defect: null;
1288
+ };
1289
+ config: {
1290
+ kind: "model";
1291
+ providerRequiresModel: true;
1292
+ keySources: ["managed", "api-key", "api-key-env", "cli-auth"];
1293
+ baseUrl: "caller-or-managed";
1294
+ modelWire: "openai-compat";
1295
+ envVars: {
1296
+ apiKey: string;
1297
+ model: string;
1298
+ baseUrl: string;
1299
+ authFiles: string;
1300
+ };
1301
+ };
1302
+ lifecycle: {
1303
+ runtime: undefined;
1304
+ coldCreate: {
1305
+ kind: "required";
1306
+ };
1307
+ warmClaim: {
1308
+ kind: "required";
1309
+ };
1310
+ parkResume: {
1311
+ kind: "required";
1312
+ };
1313
+ branchChild: {
1314
+ kind: "required";
1315
+ };
1316
+ killResume: {
1317
+ kind: "required";
1318
+ };
1319
+ };
1320
+ };
1321
+ cursor: {
1322
+ session: {
1323
+ kind: "unsupported";
1324
+ defect: {
1325
+ issue: string;
1326
+ reason: string;
1327
+ };
1328
+ };
1329
+ config: {
1330
+ kind: "model";
1331
+ providerRequiresModel: true;
1332
+ keySources: ["api-key", "api-key-env"];
1333
+ baseUrl: "vendor-only";
1334
+ modelWire: "openai-compat";
1335
+ envVars: {
1336
+ apiKey: string;
1337
+ model: string;
1338
+ };
1339
+ };
1340
+ lifecycle: {
1341
+ runtime: undefined;
1342
+ coldCreate: {
1343
+ kind: "required";
1344
+ };
1345
+ warmClaim: {
1346
+ kind: "required";
1347
+ };
1348
+ parkResume: {
1349
+ kind: "required";
1350
+ };
1351
+ branchChild: {
1352
+ kind: "required";
1353
+ };
1354
+ killResume: {
1355
+ kind: "unsupported";
1356
+ reason: string;
1357
+ };
1358
+ };
1359
+ };
1360
+ "cli-base": {
1361
+ session: {
1362
+ kind: "no-agent";
1363
+ reason: string;
1364
+ };
1365
+ config: {
1366
+ kind: "no-agent";
1367
+ envVars: {};
1368
+ reason: string;
1369
+ };
1370
+ lifecycle: {
1371
+ runtime: undefined;
1372
+ coldCreate: {
1373
+ kind: "unsupported";
1374
+ reason: string;
1375
+ };
1376
+ warmClaim: {
1377
+ kind: "unsupported";
1378
+ reason: string;
1379
+ };
1380
+ parkResume: {
1381
+ kind: "unsupported";
1382
+ reason: string;
1383
+ };
1384
+ branchChild: {
1385
+ kind: "unsupported";
1386
+ reason: string;
1387
+ };
1388
+ killResume: {
1389
+ kind: "unsupported";
1390
+ reason: string;
1391
+ };
1392
+ };
1393
+ };
1394
+ };
1395
+ //#endregion
1396
+ export { AGENT_BACKEND_ENV_VAR, ALL_BACKEND_TYPES, type AdapterFactory, type AdapterRegistry, type AgentRunBackend, BACKEND_TYPE, type BackendType, CLI_AGENT_SPECS, type CliAgentBuiltinTool, type CliAgentEnvExtra, type CliAgentEnvExtraParser, type CliAgentEnvExtraRole, type CliAgentEnvVars, type CliAgentModelWire, type CliAgentRuntimeSpec, type CliAgentSpec, type CliAuthHome, CliDirLayout, CliDirLayoutAdditions, DEFAULT_CLI_DIR_LAYOUT, HARNESSES, HARNESS_SESSION_UNSUPPORTED, type HarnessBackendId, type HarnessContract, HarnessSessionContract, HarnessSessionContractError, HarnessSessionContractErrorCode, HarnessSessionEvidence, type HarnessSpecCapabilities, type LocalCliAuthFile, MANAGED_MODEL_KEY_ENV_VAR, MANAGED_MODEL_KEY_NAME_ENV_VAR, MANAGED_MODEL_LADDER, type ManagedModelChain, type ManagedModelChainOptions, type ManagedModelRung, NATIVE_SESSION_CONTRACTS, NativeSessionIdentity, NativeSessionStore, type ProviderLogger, type ProviderPhase, SESSION_FORMAT_IDS, SYNTHETIC_ROUTER_MODEL, SessionFormatId, type SkippedManagedModel, agentProfileSchema, agentRunBackendVariants, agentRunRequestSharedShape, agentRunWorkspaceSchema, assertAdaptersWired, assertArgvHonoursSessionContract, assertFlagsHonourSessionContract, assertStoreLocationHonoursSessionContract, backendTypeSchema, bareModelId, canonicalModelSlug, claimDeliverableEnvVarNames, cliAgentClaimEnvVarNames, cliAgentEnvRoleName, cliAgentEnvVarNamesByRole, cliAgentHostPassthroughEnvVarNames, compileSessionStoreGlob, configDirHomeEnv, createAdapterRegistry, describeLocalCliAuthExpectation, discoverLocalCliAuthFiles, forbiddenArgViolations, getAdapterFactory, getSpec, harnessModelSupportFor, harnessModelWire, isBackendType, isServableManagedModel, listRegisteredAdapters, managedModelChain, materializeCliAuthBundle, mergeCliDirLayout, messageStorageDirOf, normalizePosixPath, parseBackendType, registerAdapterFactory, resolveDefaultBackend, sessionContractProblems, sessionStoreForPath, substituteNativeSessionId, unregisterAdapterFactory };
1397
+ //# sourceMappingURL=index.d.mts.map