@alineo-labs/schema 0.2.0 → 0.3.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.
- package/dist/{agent-spec-iZ9p1pjI.mjs → agent-spec-BiNRKcYr.mjs} +144 -11
- package/dist/{agent-spec-BeNVCYXF.d.mts → agent-spec-C7UBd_R2.d.mts} +67 -9
- package/dist/alineod.d.mts +52 -7
- package/dist/alineod.mjs +2 -1
- package/dist/{index-DJ7T_9Z-.d.mts → index-BnrIUYdM.d.mts} +29 -2
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +8 -2
- package/dist/types.d.mts +1 -1
- package/package.json +1 -1
|
@@ -25,6 +25,10 @@ import { z } from "zod";
|
|
|
25
25
|
* (`GET /agents/:id/transcript`, `GET /runs/:id/events`): they were vocabulary in use, just not
|
|
26
26
|
* written down.
|
|
27
27
|
*
|
|
28
|
+
* `provider` joined with the `SandboxProvider` interface: the thing a sandbox runs on and is
|
|
29
|
+
* owned by (`sandbox.created` records which one). No event or route is named after it yet; it
|
|
30
|
+
* is registered so the first one is not a surprise.
|
|
31
|
+
*
|
|
28
32
|
* `memory` and `fact` joined with alineod's memory routes (`GET /agents/:id/memory`,
|
|
29
33
|
* `POST /agents/:id/facts`): `memory` is an agent's durable working memory, `fact` one item of
|
|
30
34
|
* its semantic memory.
|
|
@@ -33,6 +37,7 @@ const SUBJECTS = [
|
|
|
33
37
|
"run",
|
|
34
38
|
"agent",
|
|
35
39
|
"sandbox",
|
|
40
|
+
"provider",
|
|
36
41
|
"session",
|
|
37
42
|
"turn",
|
|
38
43
|
"message",
|
|
@@ -190,7 +195,13 @@ const SandboxCreated = defineEvent({
|
|
|
190
195
|
resourceId: z.string().optional(),
|
|
191
196
|
teamId: z.string().optional(),
|
|
192
197
|
/** Set when this session came from `sb.fork()`; absent for a top-level `client.sandbox()`. */
|
|
193
|
-
parentSandboxId: z.string().optional()
|
|
198
|
+
parentSandboxId: z.string().optional(),
|
|
199
|
+
/**
|
|
200
|
+
* The sandbox provider that owns `sandboxId`. Absent on rows written before this field
|
|
201
|
+
* existed, and an absent value means `"opensandbox"` (the only provider there was). Readers
|
|
202
|
+
* apply that default; there is no migration.
|
|
203
|
+
*/
|
|
204
|
+
provider: z.string().optional()
|
|
194
205
|
})
|
|
195
206
|
});
|
|
196
207
|
const SandboxClosed = defineEvent({
|
|
@@ -252,7 +263,15 @@ const ExecCompleted = defineEvent({
|
|
|
252
263
|
schema: z.object({
|
|
253
264
|
exitCode: z.number().int().optional(),
|
|
254
265
|
stdout: z.string().optional(),
|
|
255
|
-
stderr: z.string().optional()
|
|
266
|
+
stderr: z.string().optional(),
|
|
267
|
+
/** How long the command ran, in milliseconds, as the client measured it. */
|
|
268
|
+
durationMs: z.number().int().optional(),
|
|
269
|
+
/** Present and true when a signal ended the command. */
|
|
270
|
+
killed: z.boolean().optional(),
|
|
271
|
+
/** The signal, as the server reported it. Set with `killed`. */
|
|
272
|
+
signal: z.string().optional(),
|
|
273
|
+
/** Present and true when the command was killed after running for `timeoutMs`. */
|
|
274
|
+
timedOut: z.boolean().optional()
|
|
256
275
|
})
|
|
257
276
|
});
|
|
258
277
|
const EgressRuleAdded = defineEvent({
|
|
@@ -331,10 +350,12 @@ const AgentCheckpointed = defineEvent({
|
|
|
331
350
|
type: "agent.checkpointed",
|
|
332
351
|
durable: true,
|
|
333
352
|
version: 1,
|
|
334
|
-
description: "A turn-level checkpoint (workspace + session-file tarball) was captured and durably stored, after the tarball itself was confirmed written — a snapshot with no event pointing at it is unreachable garbage.",
|
|
353
|
+
description: "A turn-level checkpoint (workspace + session-file tarball) was captured and durably stored, after the tarball itself was confirmed written — a snapshot with no event pointing at it is unreachable garbage. `snapshotRef` is the file on the host. `remoteRef` is the same tarball in object storage and is absent when no store is configured or the upload failed (`uploadError` says why). A checkpoint without `remoteRef` does not survive the loss of the host's disk.",
|
|
335
354
|
schema: z.object({
|
|
336
355
|
turn: z.number(),
|
|
337
|
-
snapshotRef: z.string()
|
|
356
|
+
snapshotRef: z.string(),
|
|
357
|
+
remoteRef: z.string().optional(),
|
|
358
|
+
uploadError: z.string().optional()
|
|
338
359
|
})
|
|
339
360
|
});
|
|
340
361
|
//#endregion
|
|
@@ -636,12 +657,14 @@ var alineod_exports = /* @__PURE__ */ __exportAll({
|
|
|
636
657
|
AgentEnded: () => AgentEnded,
|
|
637
658
|
AgentProvisioned: () => AgentProvisioned,
|
|
638
659
|
AgentReleased: () => AgentReleased,
|
|
660
|
+
AgentRestored: () => AgentRestored,
|
|
639
661
|
AgentSpawned: () => AgentSpawned,
|
|
640
662
|
AgentStateChanged: () => AgentStateChanged,
|
|
641
663
|
AgentSteered: () => AgentSteered,
|
|
642
664
|
AgentSupervisionNeeded: () => AgentSupervisionNeeded,
|
|
643
665
|
AgentTurnFailed: () => AgentTurnFailed,
|
|
644
666
|
AgentTurnInterrupted: () => AgentTurnInterrupted,
|
|
667
|
+
AgentTurnRetried: () => AgentTurnRetried,
|
|
645
668
|
BudgetDenied: () => BudgetDenied,
|
|
646
669
|
HandleSettled: () => HandleSettled,
|
|
647
670
|
InboxDelivered: () => InboxDelivered,
|
|
@@ -713,7 +736,23 @@ const AgentProvisioned = defineEvent({
|
|
|
713
736
|
description: "The sandbox exists and the bridge is up — backfills what `agent.spawned` could not know yet.",
|
|
714
737
|
schema: z.object({
|
|
715
738
|
agentId: z.string().nullable(),
|
|
716
|
-
sandboxId: z.string()
|
|
739
|
+
sandboxId: z.string(),
|
|
740
|
+
/**
|
|
741
|
+
* The sandbox provider that owns `sandboxId`. Absent on events written before this field
|
|
742
|
+
* existed, which all came from OpenSandbox.
|
|
743
|
+
*/
|
|
744
|
+
provider: z.string().optional()
|
|
745
|
+
})
|
|
746
|
+
});
|
|
747
|
+
const AgentRestored = defineEvent({
|
|
748
|
+
type: "agent.restored",
|
|
749
|
+
durable: true,
|
|
750
|
+
version: 1,
|
|
751
|
+
description: "The agent's sandbox was gone, so a fresh one replaced it. `checkpointTurn` is the turn its workspace and session were restored from, or `null` when it had no checkpoint and came back blank. Follows `agent.provisioned`, which carries the new `sandboxId`.",
|
|
752
|
+
schema: z.object({
|
|
753
|
+
agentId: z.string().nullable(),
|
|
754
|
+
oldSandboxId: z.string(),
|
|
755
|
+
checkpointTurn: z.number().int().nullable()
|
|
717
756
|
})
|
|
718
757
|
});
|
|
719
758
|
const AgentStateChanged = defineEvent({
|
|
@@ -762,7 +801,9 @@ const AgentEnded = defineEvent({
|
|
|
762
801
|
agentId: z.string().nullable(),
|
|
763
802
|
outcome: z.string(),
|
|
764
803
|
endedAt: z.number(),
|
|
765
|
-
error: z.string().optional()
|
|
804
|
+
error: z.string().optional(),
|
|
805
|
+
/** A stable `ErrorCode` for `error`, when one is known. See `@alineo-labs/errors`. */
|
|
806
|
+
errorCode: z.string().optional()
|
|
766
807
|
})
|
|
767
808
|
});
|
|
768
809
|
const HandleSettled = defineEvent({
|
|
@@ -908,9 +949,27 @@ const AgentTurnFailed = defineEvent({
|
|
|
908
949
|
schema: z.object({
|
|
909
950
|
agentId: z.string().nullable(),
|
|
910
951
|
error: z.string(),
|
|
952
|
+
/** A stable `ErrorCode` for `error`, when one is known. See `@alineo-labs/errors`. */
|
|
953
|
+
errorCode: z.string().optional(),
|
|
911
954
|
consecutiveFailures: z.number().int()
|
|
912
955
|
})
|
|
913
956
|
});
|
|
957
|
+
const AgentTurnRetried = defineEvent({
|
|
958
|
+
type: "agent.turn_retried",
|
|
959
|
+
durable: true,
|
|
960
|
+
version: 1,
|
|
961
|
+
description: "A turn failed with a transient model-provider error (a 429 or a 5xx) and alineod is re-sending it after a backoff. This is not a supervision failure: it does not count toward the circuit breaker. After `maxAttempts` the failure is recorded as `agent.turn_failed`.",
|
|
962
|
+
schema: z.object({
|
|
963
|
+
agentId: z.string().nullable(),
|
|
964
|
+
error: z.string(),
|
|
965
|
+
errorCode: z.string(),
|
|
966
|
+
/** 1-based number of this retry. */
|
|
967
|
+
attempt: z.number().int(),
|
|
968
|
+
maxAttempts: z.number().int(),
|
|
969
|
+
/** The wait before the turn is re-sent, in milliseconds. */
|
|
970
|
+
delayMs: z.number().int()
|
|
971
|
+
})
|
|
972
|
+
});
|
|
914
973
|
const AgentTurnInterrupted = defineEvent({
|
|
915
974
|
type: "agent.turn_interrupted",
|
|
916
975
|
durable: true,
|
|
@@ -930,7 +989,9 @@ const AgentSupervisionNeeded = defineEvent({
|
|
|
930
989
|
"retries-exhausted",
|
|
931
990
|
"circuit-tripped"
|
|
932
991
|
]),
|
|
933
|
-
error: z.string()
|
|
992
|
+
error: z.string(),
|
|
993
|
+
/** A stable `ErrorCode` for `error`, when one is known. See `@alineo-labs/errors`. */
|
|
994
|
+
errorCode: z.string().optional()
|
|
934
995
|
})
|
|
935
996
|
});
|
|
936
997
|
//#endregion
|
|
@@ -1017,6 +1078,51 @@ const PermissionsSchema = z$1.union([z$1.enum([
|
|
|
1017
1078
|
"ask",
|
|
1018
1079
|
"readonly"
|
|
1019
1080
|
]), PermissionPolicySchema]);
|
|
1081
|
+
/** The provider a non-Pi harness runs on. A spec that names another one is wrong. */
|
|
1082
|
+
const NATIVE_PROVIDER = {
|
|
1083
|
+
"claude-code": "anthropic",
|
|
1084
|
+
codex: "openai"
|
|
1085
|
+
};
|
|
1086
|
+
/** Turn an authored spec into the flat shape the runtime reads. Run it on a validated spec. */
|
|
1087
|
+
function normalizeAgentSpec(input) {
|
|
1088
|
+
const { harness, model, ...rest } = input;
|
|
1089
|
+
const harnessId = typeof harness === "string" ? harness : harness.id;
|
|
1090
|
+
const harnessVersion = (typeof harness === "string" ? void 0 : harness.version) ?? input.harnessVersion;
|
|
1091
|
+
const modelId = typeof model === "string" ? model : model.id;
|
|
1092
|
+
const provider = (typeof model === "string" ? void 0 : model.provider) ?? input.provider;
|
|
1093
|
+
const out = {
|
|
1094
|
+
...rest,
|
|
1095
|
+
harness: harnessId,
|
|
1096
|
+
model: modelId
|
|
1097
|
+
};
|
|
1098
|
+
if (harnessVersion !== void 0) out.harnessVersion = harnessVersion;
|
|
1099
|
+
else delete out.harnessVersion;
|
|
1100
|
+
if (provider !== void 0) out.provider = provider;
|
|
1101
|
+
else delete out.provider;
|
|
1102
|
+
return out;
|
|
1103
|
+
}
|
|
1104
|
+
/** The deprecated top-level fields a spec still uses, and what replaces each. */
|
|
1105
|
+
function deprecatedSpecFields(input) {
|
|
1106
|
+
const out = [];
|
|
1107
|
+
if (input.provider !== void 0) out.push({
|
|
1108
|
+
field: "provider",
|
|
1109
|
+
use: "model.provider"
|
|
1110
|
+
});
|
|
1111
|
+
if (input.harnessVersion !== void 0) out.push({
|
|
1112
|
+
field: "harnessVersion",
|
|
1113
|
+
use: "harness.version"
|
|
1114
|
+
});
|
|
1115
|
+
return out;
|
|
1116
|
+
}
|
|
1117
|
+
/** The harness id inside `{ id }`, so an error names `cursor` and not `{"id":"cursor"}`. */
|
|
1118
|
+
function harnessIdOf(input) {
|
|
1119
|
+
return typeof input === "object" && input !== null && "id" in input ? input.id : input;
|
|
1120
|
+
}
|
|
1121
|
+
const HarnessIdSchema = z$1.enum([
|
|
1122
|
+
"pi",
|
|
1123
|
+
"claude-code",
|
|
1124
|
+
"codex"
|
|
1125
|
+
], { error: (issue) => issue.input === void 0 ? "Agent spec must have a 'harness' field. Supported values: pi, claude-code, codex" : `Unsupported harness: '${describeValue(harnessIdOf(issue.input))}'. Supported values: pi, claude-code, codex` });
|
|
1020
1126
|
const nonNegativeIntSpecField = (fieldName) => z$1.number({ error: `Agent spec '${fieldName}' must be a non-negative integer if set` }).int(`Agent spec '${fieldName}' must be a non-negative integer if set`).nonnegative(`Agent spec '${fieldName}' must be a non-negative integer if set`).optional();
|
|
1021
1127
|
const AgentSpecSchema = z$1.object({
|
|
1022
1128
|
$schema: z$1.string().optional(),
|
|
@@ -1025,10 +1131,16 @@ const AgentSpecSchema = z$1.object({
|
|
|
1025
1131
|
description: z$1.string().optional(),
|
|
1026
1132
|
author: z$1.string().optional(),
|
|
1027
1133
|
categories: z$1.array(z$1.string()).optional(),
|
|
1028
|
-
harness: z$1.
|
|
1134
|
+
harness: z$1.union([HarnessIdSchema, z$1.object({
|
|
1135
|
+
id: HarnessIdSchema,
|
|
1136
|
+
version: z$1.string().optional()
|
|
1137
|
+
})], { error: (issue) => issue.input === void 0 ? "Agent spec must have a 'harness' field. Supported values: pi, claude-code, codex" : `Unsupported harness: '${describeValue(harnessIdOf(issue.input))}'. Supported values: pi, claude-code, codex` }),
|
|
1029
1138
|
harnessVersion: z$1.string().optional(),
|
|
1030
1139
|
provider: z$1.string().optional(),
|
|
1031
|
-
model: z$1.
|
|
1140
|
+
model: z$1.union([z$1.string().min(1, "Agent spec must have a 'model' string — name the model this agent runs on"), z$1.object({
|
|
1141
|
+
provider: z$1.string().optional(),
|
|
1142
|
+
id: z$1.string().min(1, "Agent spec 'model.id' must name the model this agent runs on")
|
|
1143
|
+
})], { error: (issue) => issue.input === void 0 ? "Agent spec must have a 'model' string — name the model this agent runs on" : "Agent spec 'model' must be a string, or an object with an 'id'" }),
|
|
1032
1144
|
packages: z$1.array(z$1.string()).optional(),
|
|
1033
1145
|
env: z$1.record(z$1.string(), z$1.union([z$1.string(), CredentialEnvBindingSchema])).optional(),
|
|
1034
1146
|
resources: z$1.object({
|
|
@@ -1052,6 +1164,27 @@ const AgentSpecSchema = z$1.object({
|
|
|
1052
1164
|
maxRetries: nonNegativeIntSpecField("maxRetries"),
|
|
1053
1165
|
maxConsecutiveFailures: nonNegativeIntSpecField("maxConsecutiveFailures"),
|
|
1054
1166
|
checkpoint: z$1.boolean().optional()
|
|
1055
|
-
}).loose()
|
|
1167
|
+
}).loose().superRefine((spec, ctx) => {
|
|
1168
|
+
const harnessId = typeof spec.harness === "string" ? spec.harness : spec.harness.id;
|
|
1169
|
+
const nested = typeof spec.harness === "string" ? void 0 : spec.harness.version;
|
|
1170
|
+
if (nested !== void 0 && spec.harnessVersion !== void 0 && nested !== spec.harnessVersion) ctx.addIssue({
|
|
1171
|
+
code: "custom",
|
|
1172
|
+
path: ["harnessVersion"],
|
|
1173
|
+
message: `'harnessVersion' (${spec.harnessVersion}) conflicts with 'harness.version' (${nested}). Set only 'harness.version'.`
|
|
1174
|
+
});
|
|
1175
|
+
const modelProvider = typeof spec.model === "string" ? void 0 : spec.model.provider;
|
|
1176
|
+
if (modelProvider !== void 0 && spec.provider !== void 0 && modelProvider !== spec.provider) ctx.addIssue({
|
|
1177
|
+
code: "custom",
|
|
1178
|
+
path: ["provider"],
|
|
1179
|
+
message: `'provider' (${spec.provider}) conflicts with 'model.provider' (${modelProvider}). Set only 'model.provider'.`
|
|
1180
|
+
});
|
|
1181
|
+
const provider = modelProvider ?? spec.provider;
|
|
1182
|
+
const native = NATIVE_PROVIDER[harnessId];
|
|
1183
|
+
if (native !== void 0 && provider !== void 0 && provider !== native) ctx.addIssue({
|
|
1184
|
+
code: "custom",
|
|
1185
|
+
path: ["model", "provider"],
|
|
1186
|
+
message: `The ${harnessId} harness runs on ${native} models, but the provider is '${provider}'. Remove the provider, or use the pi harness.`
|
|
1187
|
+
});
|
|
1188
|
+
});
|
|
1056
1189
|
//#endregion
|
|
1057
|
-
export {
|
|
1190
|
+
export { parseName as _, workflow_exports as a, sandbox_exports as c, durableEvents as d, getEvent as f, isVerb as g, isSubject as h, alineod_exports as i, allEvents as l, VERBS as m, deprecatedSpecFields as n, harness_exports as o, SUBJECTS as p, normalizeAgentSpec as r, agent_exports as s, AgentSpecSchema as t, defineEvent as u };
|
|
@@ -23,11 +23,15 @@ import * as z$1 from "zod";
|
|
|
23
23
|
* (`GET /agents/:id/transcript`, `GET /runs/:id/events`): they were vocabulary in use, just not
|
|
24
24
|
* written down.
|
|
25
25
|
*
|
|
26
|
+
* `provider` joined with the `SandboxProvider` interface: the thing a sandbox runs on and is
|
|
27
|
+
* owned by (`sandbox.created` records which one). No event or route is named after it yet; it
|
|
28
|
+
* is registered so the first one is not a surprise.
|
|
29
|
+
*
|
|
26
30
|
* `memory` and `fact` joined with alineod's memory routes (`GET /agents/:id/memory`,
|
|
27
31
|
* `POST /agents/:id/facts`): `memory` is an agent's durable working memory, `fact` one item of
|
|
28
32
|
* its semantic memory.
|
|
29
33
|
*/
|
|
30
|
-
declare const SUBJECTS: readonly ["run", "agent", "sandbox", "session", "turn", "message", "tool", "handle", "wait", "inbox", "notify", "budget", "exec", "egress", "credential", "permission", "workflow", "step", "compaction", "retry", "extension", "queue", "spec", "environment", "event", "result", "transcript", "memory", "fact"];
|
|
34
|
+
declare const SUBJECTS: readonly ["run", "agent", "sandbox", "provider", "session", "turn", "message", "tool", "handle", "wait", "inbox", "notify", "budget", "exec", "egress", "credential", "permission", "workflow", "step", "compaction", "retry", "extension", "queue", "spec", "environment", "event", "result", "transcript", "memory", "fact"];
|
|
31
35
|
/**
|
|
32
36
|
* What alineo does to a subject. A name's second segment is one of these — in the imperative
|
|
33
37
|
* for a command, method, route or tool, and in the past tense for an event (`agent.spawned`).
|
|
@@ -264,17 +268,18 @@ interface AgentSpec {
|
|
|
264
268
|
author?: string;
|
|
265
269
|
categories?: string[];
|
|
266
270
|
/**
|
|
267
|
-
* Agent-loop driver to run inside the sandbox
|
|
271
|
+
* Agent-loop driver to run inside the sandbox: `"pi"`, `"claude-code"` or `"codex"`.
|
|
268
272
|
*
|
|
269
273
|
* Not `cli`: that said the driver *is* a CLI, which is true of Pi and accidental in
|
|
270
|
-
* general.
|
|
271
|
-
*
|
|
274
|
+
* general. `claude-code` runs through the Claude Agent SDK, so `cli: "claude-code"` would
|
|
275
|
+
* have read as a category error.
|
|
272
276
|
*/
|
|
273
|
-
harness: "pi";
|
|
277
|
+
harness: "pi" | "claude-code" | "codex";
|
|
274
278
|
/**
|
|
275
279
|
* npm version specifier for the harness, e.g. `"1.2.3"`, `"^1.2.0"`, or a
|
|
276
280
|
* dist-tag like `"latest"`. Passed directly to
|
|
277
|
-
* `npm install -g
|
|
281
|
+
* `npm install -g <harness package>@<harnessVersion>`: Pi's package for `"pi"`, the Claude
|
|
282
|
+
* Agent SDK for `"claude-code"`, `@openai/codex` for `"codex"`. When
|
|
278
283
|
* omitted, `install()` runs the bare package name and npm resolves
|
|
279
284
|
* whatever it considers latest. Included in the setup-hash cache key, so
|
|
280
285
|
* changing it forces a fresh snapshot rebuild.
|
|
@@ -428,6 +433,45 @@ interface AgentSpec {
|
|
|
428
433
|
*/
|
|
429
434
|
checkpoint?: boolean;
|
|
430
435
|
}
|
|
436
|
+
/** The harnesses an agent can run on. */
|
|
437
|
+
type HarnessId = "pi" | "claude-code" | "codex";
|
|
438
|
+
/**
|
|
439
|
+
* A harness with its version pinned, as an object. `"pi"` and `{ id: "pi" }` mean the same.
|
|
440
|
+
* `version` is what the top-level `harnessVersion` was.
|
|
441
|
+
*/
|
|
442
|
+
interface HarnessRef {
|
|
443
|
+
id: HarnessId;
|
|
444
|
+
/** npm version specifier for the harness package, e.g. `"1.2.3"` or `"latest"`. */
|
|
445
|
+
version?: string;
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* A model with the provider that serves it, as an object. `"gpt-5-codex"` and
|
|
449
|
+
* `{ id: "gpt-5-codex" }` mean the same. `provider` is what the top-level `provider` was.
|
|
450
|
+
*/
|
|
451
|
+
interface ModelRef {
|
|
452
|
+
/** For Pi, passed as `--provider`. The other harnesses have one native provider. */
|
|
453
|
+
provider?: string;
|
|
454
|
+
id: string;
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* What an author may write. Same as {@link AgentSpec}, except `harness` and `model` may each be
|
|
458
|
+
* an object that carries its own version or provider. `validateAgentSpec()` turns this into
|
|
459
|
+
* an `AgentSpec`, which is what the runtime reads.
|
|
460
|
+
*
|
|
461
|
+
* The top-level `provider` and `harnessVersion` still work and are deprecated: they say which
|
|
462
|
+
* harness or model they belong to only by sitting next to it.
|
|
463
|
+
*/
|
|
464
|
+
interface AgentSpecInput extends Omit<AgentSpec, "harness" | "model"> {
|
|
465
|
+
harness: HarnessId | HarnessRef;
|
|
466
|
+
model: string | ModelRef;
|
|
467
|
+
}
|
|
468
|
+
/** Turn an authored spec into the flat shape the runtime reads. Run it on a validated spec. */
|
|
469
|
+
declare function normalizeAgentSpec(input: AgentSpecInput): AgentSpec;
|
|
470
|
+
/** The deprecated top-level fields a spec still uses, and what replaces each. */
|
|
471
|
+
declare function deprecatedSpecFields(input: Pick<AgentSpecInput, "provider" | "harnessVersion">): Array<{
|
|
472
|
+
field: string;
|
|
473
|
+
use: string;
|
|
474
|
+
}>;
|
|
431
475
|
declare const AgentSpecSchema: z$1.ZodObject<{
|
|
432
476
|
$schema: z$1.ZodOptional<z$1.ZodString>;
|
|
433
477
|
name: z$1.ZodString;
|
|
@@ -435,10 +479,24 @@ declare const AgentSpecSchema: z$1.ZodObject<{
|
|
|
435
479
|
description: z$1.ZodOptional<z$1.ZodString>;
|
|
436
480
|
author: z$1.ZodOptional<z$1.ZodString>;
|
|
437
481
|
categories: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
438
|
-
harness: z$1.
|
|
482
|
+
harness: z$1.ZodUnion<readonly [z$1.ZodEnum<{
|
|
483
|
+
pi: "pi";
|
|
484
|
+
"claude-code": "claude-code";
|
|
485
|
+
codex: "codex";
|
|
486
|
+
}>, z$1.ZodObject<{
|
|
487
|
+
id: z$1.ZodEnum<{
|
|
488
|
+
pi: "pi";
|
|
489
|
+
"claude-code": "claude-code";
|
|
490
|
+
codex: "codex";
|
|
491
|
+
}>;
|
|
492
|
+
version: z$1.ZodOptional<z$1.ZodString>;
|
|
493
|
+
}, z$1.core.$strip>]>;
|
|
439
494
|
harnessVersion: z$1.ZodOptional<z$1.ZodString>;
|
|
440
495
|
provider: z$1.ZodOptional<z$1.ZodString>;
|
|
441
|
-
model: z$1.ZodString
|
|
496
|
+
model: z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodObject<{
|
|
497
|
+
provider: z$1.ZodOptional<z$1.ZodString>;
|
|
498
|
+
id: z$1.ZodString;
|
|
499
|
+
}, z$1.core.$strip>]>;
|
|
442
500
|
packages: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
443
501
|
env: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodObject<{
|
|
444
502
|
credential: z$1.ZodString;
|
|
@@ -515,4 +573,4 @@ declare const AgentSpecSchema: z$1.ZodObject<{
|
|
|
515
573
|
checkpoint: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
516
574
|
}, z$1.core.$loose>;
|
|
517
575
|
//#endregion
|
|
518
|
-
export { VERBS as _,
|
|
576
|
+
export { VERBS as C, parseName as D, isVerb as E, Subject as S, isSubject as T, EventRef as _, HarnessId as a, isPersisted as b, SetupStep as c, NormalizedPermissionPolicy as d, PermissionAction as f, DurableRef as g, PermissionRule as h, CredentialEnvBinding as i, deprecatedSpecFields as l, PermissionPolicy as m, AgentSpecInput as n, HarnessRef as o, PermissionMode as p, AgentSpecSchema as r, ModelRef as s, AgentSpec as t, normalizeAgentSpec as u, LedgerEnvelope as v, Verb as w, SUBJECTS as x, PersistedEnvelope as y };
|
package/dist/alineod.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./index-
|
|
1
|
+
import "./index-BnrIUYdM.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/alineod.d.ts
|
|
4
4
|
/** The real spec, not a re-model. See `agent-spec.ts`. */
|
|
@@ -9,10 +9,24 @@ export declare const AgentSpec: z.ZodObject<{
|
|
|
9
9
|
description: z.ZodOptional<z.ZodString>;
|
|
10
10
|
author: z.ZodOptional<z.ZodString>;
|
|
11
11
|
categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
12
|
-
harness: z.
|
|
12
|
+
harness: z.ZodUnion<readonly [z.ZodEnum<{
|
|
13
|
+
pi: "pi";
|
|
14
|
+
"claude-code": "claude-code";
|
|
15
|
+
codex: "codex";
|
|
16
|
+
}>, z.ZodObject<{
|
|
17
|
+
id: z.ZodEnum<{
|
|
18
|
+
pi: "pi";
|
|
19
|
+
"claude-code": "claude-code";
|
|
20
|
+
codex: "codex";
|
|
21
|
+
}>;
|
|
22
|
+
version: z.ZodOptional<z.ZodString>;
|
|
23
|
+
}, z.core.$strip>]>;
|
|
13
24
|
harnessVersion: z.ZodOptional<z.ZodString>;
|
|
14
25
|
provider: z.ZodOptional<z.ZodString>;
|
|
15
|
-
model: z.ZodString
|
|
26
|
+
model: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
27
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
28
|
+
id: z.ZodString;
|
|
29
|
+
}, z.core.$strip>]>;
|
|
16
30
|
packages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
17
31
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
18
32
|
credential: z.ZodString;
|
|
@@ -105,10 +119,24 @@ export declare const CreateRunBody: z.ZodObject<{
|
|
|
105
119
|
description: z.ZodOptional<z.ZodString>;
|
|
106
120
|
author: z.ZodOptional<z.ZodString>;
|
|
107
121
|
categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
108
|
-
harness: z.
|
|
122
|
+
harness: z.ZodUnion<readonly [z.ZodEnum<{
|
|
123
|
+
pi: "pi";
|
|
124
|
+
"claude-code": "claude-code";
|
|
125
|
+
codex: "codex";
|
|
126
|
+
}>, z.ZodObject<{
|
|
127
|
+
id: z.ZodEnum<{
|
|
128
|
+
pi: "pi";
|
|
129
|
+
"claude-code": "claude-code";
|
|
130
|
+
codex: "codex";
|
|
131
|
+
}>;
|
|
132
|
+
version: z.ZodOptional<z.ZodString>;
|
|
133
|
+
}, z.core.$strip>]>;
|
|
109
134
|
harnessVersion: z.ZodOptional<z.ZodString>;
|
|
110
135
|
provider: z.ZodOptional<z.ZodString>;
|
|
111
|
-
model: z.ZodString
|
|
136
|
+
model: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
137
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
138
|
+
id: z.ZodString;
|
|
139
|
+
}, z.core.$strip>]>;
|
|
112
140
|
packages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
113
141
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
114
142
|
credential: z.ZodString;
|
|
@@ -275,10 +303,24 @@ export declare const SpawnAgentBody: z.ZodObject<{
|
|
|
275
303
|
description: z.ZodOptional<z.ZodString>;
|
|
276
304
|
author: z.ZodOptional<z.ZodString>;
|
|
277
305
|
categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
278
|
-
harness: z.
|
|
306
|
+
harness: z.ZodUnion<readonly [z.ZodEnum<{
|
|
307
|
+
pi: "pi";
|
|
308
|
+
"claude-code": "claude-code";
|
|
309
|
+
codex: "codex";
|
|
310
|
+
}>, z.ZodObject<{
|
|
311
|
+
id: z.ZodEnum<{
|
|
312
|
+
pi: "pi";
|
|
313
|
+
"claude-code": "claude-code";
|
|
314
|
+
codex: "codex";
|
|
315
|
+
}>;
|
|
316
|
+
version: z.ZodOptional<z.ZodString>;
|
|
317
|
+
}, z.core.$strip>]>;
|
|
279
318
|
harnessVersion: z.ZodOptional<z.ZodString>;
|
|
280
319
|
provider: z.ZodOptional<z.ZodString>;
|
|
281
|
-
model: z.ZodString
|
|
320
|
+
model: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
321
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
322
|
+
id: z.ZodString;
|
|
323
|
+
}, z.core.$strip>]>;
|
|
282
324
|
packages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
283
325
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
284
326
|
credential: z.ZodString;
|
|
@@ -396,6 +438,7 @@ export declare const AgentView: z.ZodObject<{
|
|
|
396
438
|
state: z.ZodString;
|
|
397
439
|
specName: z.ZodString;
|
|
398
440
|
sandboxId: z.ZodNullable<z.ZodString>;
|
|
441
|
+
provider: z.ZodNullable<z.ZodString>;
|
|
399
442
|
createdAt: z.ZodNumber;
|
|
400
443
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
401
444
|
outcome: z.ZodNullable<z.ZodString>;
|
|
@@ -414,6 +457,7 @@ export declare const TreeView: z.ZodObject<{
|
|
|
414
457
|
state: z.ZodString;
|
|
415
458
|
specName: z.ZodString;
|
|
416
459
|
sandboxId: z.ZodNullable<z.ZodString>;
|
|
460
|
+
provider: z.ZodNullable<z.ZodString>;
|
|
417
461
|
createdAt: z.ZodNumber;
|
|
418
462
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
419
463
|
outcome: z.ZodNullable<z.ZodString>;
|
|
@@ -438,6 +482,7 @@ export declare const AgentDetail: z.ZodObject<{
|
|
|
438
482
|
state: z.ZodString;
|
|
439
483
|
specName: z.ZodString;
|
|
440
484
|
sandboxId: z.ZodNullable<z.ZodString>;
|
|
485
|
+
provider: z.ZodNullable<z.ZodString>;
|
|
441
486
|
createdAt: z.ZodNumber;
|
|
442
487
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
443
488
|
outcome: z.ZodNullable<z.ZodString>;
|
package/dist/alineod.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { l as allEvents, t as AgentSpecSchema } from "./agent-spec-BiNRKcYr.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/alineod.ts
|
|
4
4
|
/**
|
|
@@ -103,6 +103,7 @@ const AgentView = z.object({
|
|
|
103
103
|
state: z.string(),
|
|
104
104
|
specName: z.string(),
|
|
105
105
|
sandboxId: z.string().nullable(),
|
|
106
|
+
provider: z.string().nullable().describe("The sandbox provider that owns sandboxId, or null before the agent has a sandbox. Absent in the ledger means OpenSandbox."),
|
|
106
107
|
createdAt: z.number(),
|
|
107
108
|
endedAt: z.number().nullable(),
|
|
108
109
|
outcome: z.string().nullable(),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as AgentSpec, v as LedgerEnvelope } from "./agent-spec-C7UBd_R2.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/define.d.ts
|
|
4
4
|
/**
|
|
@@ -58,6 +58,7 @@ declare function resourceRefOf(spec: Pick<AgentSpec, "name" | "resourceId" | "te
|
|
|
58
58
|
//#endregion
|
|
59
59
|
//#region src/project.d.ts
|
|
60
60
|
declare const ProjectConfigObject: z.ZodObject<{
|
|
61
|
+
provider: z.ZodDefault<z.ZodString>;
|
|
61
62
|
serverUrl: z.ZodDefault<z.ZodString>;
|
|
62
63
|
apiKey: z.ZodDefault<z.ZodString>;
|
|
63
64
|
useServerProxy: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -72,6 +73,7 @@ declare const ProjectConfigObject: z.ZodObject<{
|
|
|
72
73
|
}, z.core.$strip>;
|
|
73
74
|
/** The project config schema, with nulls treated as absent. */
|
|
74
75
|
declare const ProjectConfigSchema: z.ZodPreprocess<z.ZodObject<{
|
|
76
|
+
provider: z.ZodDefault<z.ZodString>;
|
|
75
77
|
serverUrl: z.ZodDefault<z.ZodString>;
|
|
76
78
|
apiKey: z.ZodDefault<z.ZodString>;
|
|
77
79
|
useServerProxy: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -86,6 +88,7 @@ declare const ProjectConfigSchema: z.ZodPreprocess<z.ZodObject<{
|
|
|
86
88
|
}, z.core.$strip>>;
|
|
87
89
|
/** The underlying object schema, for JSON Schema emit (preprocess has no JSON Schema form). */
|
|
88
90
|
declare const ProjectConfigObjectSchema: z.ZodObject<{
|
|
91
|
+
provider: z.ZodDefault<z.ZodString>;
|
|
89
92
|
serverUrl: z.ZodDefault<z.ZodString>;
|
|
90
93
|
apiKey: z.ZodDefault<z.ZodString>;
|
|
91
94
|
useServerProxy: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -133,6 +136,7 @@ declare const SandboxCreated: EventDefinition<"sandbox.created", z.ZodObject<{
|
|
|
133
136
|
resourceId: z.ZodOptional<z.ZodString>;
|
|
134
137
|
teamId: z.ZodOptional<z.ZodString>;
|
|
135
138
|
parentSandboxId: z.ZodOptional<z.ZodString>;
|
|
139
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
136
140
|
}, z.core.$strip>>;
|
|
137
141
|
declare const SandboxClosed: EventDefinition<"sandbox.closed", z.ZodObject<{
|
|
138
142
|
sandboxId: z.ZodString;
|
|
@@ -162,6 +166,10 @@ declare const ExecCompleted: EventDefinition<"exec.completed", z.ZodObject<{
|
|
|
162
166
|
exitCode: z.ZodOptional<z.ZodNumber>;
|
|
163
167
|
stdout: z.ZodOptional<z.ZodString>;
|
|
164
168
|
stderr: z.ZodOptional<z.ZodString>;
|
|
169
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
170
|
+
killed: z.ZodOptional<z.ZodBoolean>;
|
|
171
|
+
signal: z.ZodOptional<z.ZodString>;
|
|
172
|
+
timedOut: z.ZodOptional<z.ZodBoolean>;
|
|
165
173
|
}, z.core.$strip>>;
|
|
166
174
|
declare const EgressRuleAdded: EventDefinition<"egress.rule_added", z.ZodObject<{
|
|
167
175
|
rules: z.ZodArray<z.ZodUnknown>;
|
|
@@ -193,6 +201,8 @@ declare const PermissionResolved: EventDefinition<"permission.resolved", z.ZodOb
|
|
|
193
201
|
declare const AgentCheckpointed: EventDefinition<"agent.checkpointed", z.ZodObject<{
|
|
194
202
|
turn: z.ZodNumber;
|
|
195
203
|
snapshotRef: z.ZodString;
|
|
204
|
+
remoteRef: z.ZodOptional<z.ZodString>;
|
|
205
|
+
uploadError: z.ZodOptional<z.ZodString>;
|
|
196
206
|
}, z.core.$strip>>;
|
|
197
207
|
declare namespace harness_d_exports {
|
|
198
208
|
export { CompactionEnded, CompactionStarted, ExtensionError, ExtensionUi, MessageEnded, MessageStarted, MessageUpdated, QueueUpdated, RetryEnded, RetryStarted, SessionEnded, SessionStarted, ToolEnded, ToolStarted, ToolUpdated, TurnEnded, TurnStarted };
|
|
@@ -307,7 +317,7 @@ declare const StepFailed: EventDefinition<"step.failed", z.ZodObject<{
|
|
|
307
317
|
}, z.core.$strip>>;
|
|
308
318
|
declare const StepRolledBack: EventDefinition<"step.rolled_back", z.ZodObject<{}, z.core.$strip>>;
|
|
309
319
|
declare namespace alineod_d_exports {
|
|
310
|
-
export { AgentAdmissionGranted, AgentAdmissionQueued, AgentAdmissionTimeout, AgentEnded, AgentProvisioned, AgentReleased, AgentSpawned, AgentStateChanged, AgentSteered, AgentSupervisionNeeded, AgentTurnFailed, AgentTurnInterrupted, BudgetDenied, HandleSettled, InboxDelivered, InboxDropped, InboxQueued, NotifyRegistered, RunClosed, RunQuiescent, RunStarted, WaitBlocked, WaitResolved };
|
|
320
|
+
export { AgentAdmissionGranted, AgentAdmissionQueued, AgentAdmissionTimeout, AgentEnded, AgentProvisioned, AgentReleased, AgentRestored, AgentSpawned, AgentStateChanged, AgentSteered, AgentSupervisionNeeded, AgentTurnFailed, AgentTurnInterrupted, AgentTurnRetried, BudgetDenied, HandleSettled, InboxDelivered, InboxDropped, InboxQueued, NotifyRegistered, RunClosed, RunQuiescent, RunStarted, WaitBlocked, WaitResolved };
|
|
311
321
|
}
|
|
312
322
|
declare const RunStarted: EventDefinition<"run.started", z.ZodObject<{
|
|
313
323
|
runId: z.ZodString;
|
|
@@ -342,6 +352,12 @@ declare const AgentSpawned: EventDefinition<"agent.spawned", z.ZodObject<{
|
|
|
342
352
|
declare const AgentProvisioned: EventDefinition<"agent.provisioned", z.ZodObject<{
|
|
343
353
|
agentId: z.ZodNullable<z.ZodString>;
|
|
344
354
|
sandboxId: z.ZodString;
|
|
355
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
356
|
+
}, z.core.$strip>>;
|
|
357
|
+
declare const AgentRestored: EventDefinition<"agent.restored", z.ZodObject<{
|
|
358
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
359
|
+
oldSandboxId: z.ZodString;
|
|
360
|
+
checkpointTurn: z.ZodNullable<z.ZodNumber>;
|
|
345
361
|
}, z.core.$strip>>;
|
|
346
362
|
declare const AgentStateChanged: EventDefinition<"agent.state_changed", z.ZodObject<{
|
|
347
363
|
agentId: z.ZodNullable<z.ZodString>;
|
|
@@ -376,6 +392,7 @@ declare const AgentEnded: EventDefinition<"agent.ended", z.ZodObject<{
|
|
|
376
392
|
outcome: z.ZodString;
|
|
377
393
|
endedAt: z.ZodNumber;
|
|
378
394
|
error: z.ZodOptional<z.ZodString>;
|
|
395
|
+
errorCode: z.ZodOptional<z.ZodString>;
|
|
379
396
|
}, z.core.$strip>>;
|
|
380
397
|
declare const HandleSettled: EventDefinition<"handle.settled", z.ZodObject<{
|
|
381
398
|
agentId: z.ZodNullable<z.ZodString>;
|
|
@@ -462,8 +479,17 @@ declare const AgentAdmissionTimeout: EventDefinition<"agent.admission_timeout",
|
|
|
462
479
|
declare const AgentTurnFailed: EventDefinition<"agent.turn_failed", z.ZodObject<{
|
|
463
480
|
agentId: z.ZodNullable<z.ZodString>;
|
|
464
481
|
error: z.ZodString;
|
|
482
|
+
errorCode: z.ZodOptional<z.ZodString>;
|
|
465
483
|
consecutiveFailures: z.ZodNumber;
|
|
466
484
|
}, z.core.$strip>>;
|
|
485
|
+
declare const AgentTurnRetried: EventDefinition<"agent.turn_retried", z.ZodObject<{
|
|
486
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
487
|
+
error: z.ZodString;
|
|
488
|
+
errorCode: z.ZodString;
|
|
489
|
+
attempt: z.ZodNumber;
|
|
490
|
+
maxAttempts: z.ZodNumber;
|
|
491
|
+
delayMs: z.ZodNumber;
|
|
492
|
+
}, z.core.$strip>>;
|
|
467
493
|
declare const AgentTurnInterrupted: EventDefinition<"agent.turn_interrupted", z.ZodObject<{
|
|
468
494
|
agentId: z.ZodNullable<z.ZodString>;
|
|
469
495
|
}, z.core.$strip>>;
|
|
@@ -475,6 +501,7 @@ declare const AgentSupervisionNeeded: EventDefinition<"agent.supervision_needed"
|
|
|
475
501
|
"circuit-tripped": "circuit-tripped";
|
|
476
502
|
}>;
|
|
477
503
|
error: z.ZodString;
|
|
504
|
+
errorCode: z.ZodOptional<z.ZodString>;
|
|
478
505
|
}, z.core.$strip>>;
|
|
479
506
|
//#endregion
|
|
480
507
|
export { defineEvent as _, sandbox_d_exports as a, PROJECT_CONFIG_SCHEMA_URL as c, ProjectConfigSchema as d, resourceRefOf as f, allEvents as g, EventDefinition as h, agent_d_exports as i, ProjectConfig as l, EventData as m, workflow_d_exports as n, RENAMED_EVENTS as o, EnvelopeOf as p, harness_d_exports as r, renamedEventType as s, alineod_d_exports as t, ProjectConfigObjectSchema as u, durableEvents as v, getEvent as y };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as defineEvent, a as sandbox_d_exports, c as PROJECT_CONFIG_SCHEMA_URL, d as ProjectConfigSchema, f as resourceRefOf, g as allEvents, h as EventDefinition, i as agent_d_exports, l as ProjectConfig, m as EventData, n as workflow_d_exports, o as RENAMED_EVENTS, p as EnvelopeOf, r as harness_d_exports, s as renamedEventType, t as alineod_d_exports, u as ProjectConfigObjectSchema, v as durableEvents, y as getEvent } from "./index-
|
|
3
|
-
export { agent_d_exports as AgentEvents, type AgentSpec, AgentSpecSchema, alineod_d_exports as AlineodEvents, type CredentialEnvBinding, type DurableRef, type EnvelopeOf, type EventData, type EventDefinition, type EventRef, harness_d_exports as HarnessEvents, type LedgerEnvelope, type NormalizedPermissionPolicy, PROJECT_CONFIG_SCHEMA_URL, type PermissionAction, type PermissionMode, type PermissionPolicy, type PermissionRule, type PersistedEnvelope, type ProjectConfig, ProjectConfigObjectSchema, ProjectConfigSchema, RENAMED_EVENTS, SUBJECTS, sandbox_d_exports as SandboxEvents, type SetupStep, type Subject, VERBS, type Verb, workflow_d_exports as WorkflowEvents, allEvents, defineEvent, durableEvents, getEvent, isPersisted, isSubject, isVerb, parseName, renamedEventType, resourceRefOf };
|
|
1
|
+
import { C as VERBS, D as parseName, E as isVerb, S as Subject, T as isSubject, _ as EventRef, a as HarnessId, b as isPersisted, c as SetupStep, d as NormalizedPermissionPolicy, f as PermissionAction, g as DurableRef, h as PermissionRule, i as CredentialEnvBinding, l as deprecatedSpecFields, m as PermissionPolicy, n as AgentSpecInput, o as HarnessRef, p as PermissionMode, r as AgentSpecSchema, s as ModelRef, t as AgentSpec, u as normalizeAgentSpec, v as LedgerEnvelope, w as Verb, x as SUBJECTS, y as PersistedEnvelope } from "./agent-spec-C7UBd_R2.mjs";
|
|
2
|
+
import { _ as defineEvent, a as sandbox_d_exports, c as PROJECT_CONFIG_SCHEMA_URL, d as ProjectConfigSchema, f as resourceRefOf, g as allEvents, h as EventDefinition, i as agent_d_exports, l as ProjectConfig, m as EventData, n as workflow_d_exports, o as RENAMED_EVENTS, p as EnvelopeOf, r as harness_d_exports, s as renamedEventType, t as alineod_d_exports, u as ProjectConfigObjectSchema, v as durableEvents, y as getEvent } from "./index-BnrIUYdM.mjs";
|
|
3
|
+
export { agent_d_exports as AgentEvents, type AgentSpec, type AgentSpecInput, AgentSpecSchema, alineod_d_exports as AlineodEvents, type CredentialEnvBinding, type DurableRef, type EnvelopeOf, type EventData, type EventDefinition, type EventRef, harness_d_exports as HarnessEvents, type HarnessId, type HarnessRef, type LedgerEnvelope, type ModelRef, type NormalizedPermissionPolicy, PROJECT_CONFIG_SCHEMA_URL, type PermissionAction, type PermissionMode, type PermissionPolicy, type PermissionRule, type PersistedEnvelope, type ProjectConfig, ProjectConfigObjectSchema, ProjectConfigSchema, RENAMED_EVENTS, SUBJECTS, sandbox_d_exports as SandboxEvents, type SetupStep, type Subject, VERBS, type Verb, workflow_d_exports as WorkflowEvents, allEvents, defineEvent, deprecatedSpecFields, durableEvents, getEvent, isPersisted, isSubject, isVerb, normalizeAgentSpec, parseName, renamedEventType, resourceRefOf };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { _ as parseName, a as workflow_exports, c as sandbox_exports, d as durableEvents, f as getEvent, g as isVerb, h as isSubject, i as alineod_exports, l as allEvents, m as VERBS, n as deprecatedSpecFields, o as harness_exports, p as SUBJECTS, r as normalizeAgentSpec, s as agent_exports, t as AgentSpecSchema, u as defineEvent } from "./agent-spec-BiNRKcYr.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/envelope.ts
|
|
4
4
|
function isPersisted(envelope) {
|
|
@@ -43,6 +43,12 @@ function resourceRefOf(spec) {
|
|
|
43
43
|
* and use `defineEnv`/`loadConfig` directly.
|
|
44
44
|
*/
|
|
45
45
|
const ProjectConfigObject = z.object({
|
|
46
|
+
/**
|
|
47
|
+
* Which sandbox provider to run on. Only `"opensandbox"` exists today, and it is what a file
|
|
48
|
+
* without this key means, so every config written before the key existed keeps working.
|
|
49
|
+
* `serverUrl`, `apiKey` and `useServerProxy` below are that provider's settings.
|
|
50
|
+
*/
|
|
51
|
+
provider: z.string().min(1).default("opensandbox"),
|
|
46
52
|
/**
|
|
47
53
|
* 127.0.0.1, not "localhost" — some hosts resolve "localhost" to ::1 first, and OpenSandbox
|
|
48
54
|
* typically only listens on IPv4.
|
|
@@ -176,4 +182,4 @@ function renamedEventType(old) {
|
|
|
176
182
|
return RENAMED_EVENTS[old];
|
|
177
183
|
}
|
|
178
184
|
//#endregion
|
|
179
|
-
export { agent_exports as AgentEvents, AgentSpecSchema, alineod_exports as AlineodEvents, harness_exports as HarnessEvents, PROJECT_CONFIG_SCHEMA_URL, ProjectConfigObjectSchema, ProjectConfigSchema, RENAMED_EVENTS, SUBJECTS, sandbox_exports as SandboxEvents, VERBS, workflow_exports as WorkflowEvents, allEvents, defineEvent, durableEvents, getEvent, isPersisted, isSubject, isVerb, parseName, renamedEventType, resourceRefOf };
|
|
185
|
+
export { agent_exports as AgentEvents, AgentSpecSchema, alineod_exports as AlineodEvents, harness_exports as HarnessEvents, PROJECT_CONFIG_SCHEMA_URL, ProjectConfigObjectSchema, ProjectConfigSchema, RENAMED_EVENTS, SUBJECTS, sandbox_exports as SandboxEvents, VERBS, workflow_exports as WorkflowEvents, allEvents, defineEvent, deprecatedSpecFields, durableEvents, getEvent, isPersisted, isSubject, isVerb, normalizeAgentSpec, parseName, renamedEventType, resourceRefOf };
|
package/dist/types.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as Subject, _ as EventRef, c as SetupStep, d as NormalizedPermissionPolicy, f as PermissionAction, g as DurableRef, h as PermissionRule, i as CredentialEnvBinding, m as PermissionPolicy, p as PermissionMode, t as AgentSpec, v as LedgerEnvelope, w as Verb, y as PersistedEnvelope } from "./agent-spec-C7UBd_R2.mjs";
|
|
2
2
|
export type { AgentSpec, CredentialEnvBinding, DurableRef, EventRef, LedgerEnvelope, NormalizedPermissionPolicy, PermissionAction, PermissionMode, PermissionPolicy, PermissionRule, PersistedEnvelope, SetupStep, Subject, Verb };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alineo-labs/schema",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "The shapes of the system: the ledger envelope, every event definition, and the subjects and verbs that CLI commands, SDK methods, HTTP routes, MCP tools and event names are built out of. Types and Zod schemas only — no behaviour.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|