spawnfile 0.1.29 → 0.1.31
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/auth/index.d.ts +1 -0
- package/dist/auth/index.js +1 -0
- package/dist/auth/trainingAuth.js +3 -0
- package/dist/auth/trainingCodexAuthority.d.ts +8 -0
- package/dist/auth/trainingCodexAuthority.js +40 -0
- package/dist/compiler/containerDaimonGrokWorkerRender.js +4 -0
- package/dist/compiler/containerDaimonUidEntrypointRender.js +3 -1
- package/dist/compiler/training/container/launch.js +7 -0
- package/dist/compiler/training/execution.d.ts +3 -3
- package/dist/compiler/training/plan/contract.d.ts +7 -7
- package/dist/compiler/training/preparation/assets/package-lock.json +10 -10
- package/dist/compiler/training/repair/contract.d.ts +8 -8
- package/dist/compiler/training/rewind/contract.d.ts +16 -16
- package/dist/compiler/training/rewind/memorySchemas.d.ts +1 -1
- package/dist/compiler/training/rewind/snapshotManifest.d.ts +1 -1
- package/dist/compiler/training/subjectLease.d.ts +1 -1
- package/dist/compiler/training/subjectLease.js +11 -11
- package/dist/deployment/organizationReady.d.ts +1 -1
- package/dist/deployment/record.d.ts +5 -5
- package/dist/deployment/record.js +2 -2
- package/dist/deployment/resourceLog.d.ts +3 -3
- package/dist/deployment/resourceLog.js +4 -3
- package/dist/deployment/upReceiptTypes.d.ts +2 -2
- package/dist/distribution/consumeImage.js +4 -3
- package/dist/distribution/consumeImageDaimonContract.d.ts +432 -0
- package/dist/distribution/consumeImageDaimonContract.js +36 -0
- package/dist/distribution/consumeImageDaimonDocker.d.ts +5 -1
- package/dist/distribution/consumeImageDaimonDocker.js +10 -9
- package/dist/distribution/daimonImageContract.test-fixtures.d.ts +2 -0
- package/dist/distribution/daimonImageContract.test-fixtures.js +16 -0
- package/dist/distribution/imageRuntimeAuth.d.ts +3 -1
- package/dist/distribution/imageRuntimeAuth.js +20 -13
- package/dist/manifest/trainingDataSchemas.d.ts +2 -2
- package/dist/manifest/trainingDataSchemas.js +2 -1
- package/dist/recording/moment.d.ts +6 -6
- package/dist/recording/parse.js +2 -1
- package/dist/runtime/daimon/adapter.js +1 -1
- package/dist/runtime/daimon/config.js +5 -2
- package/dist/runtime/daimon/contract-manifest.json +1 -1
- package/dist/runtime/daimon/contract-manifest.sha256 +1 -1
- package/dist/runtime/daimon/contractManifest.d.ts +13 -3
- package/dist/runtime/daimon/contractManifest.js +29 -11
- package/dist/runtime/daimon/contractManifest.js.map +1 -1
- package/dist/runtime/daimon/contractManifestSchema.d.ts +1555 -1
- package/dist/runtime/daimon/contractManifestSchema.js +10 -1
- package/dist/runtime/daimon/contractManifestSchema.js.map +1 -1
- package/dist/runtime/daimon/engineDescriptorSchema.d.ts +44 -2
- package/dist/runtime/daimon/engineDescriptorSchema.js +4 -2
- package/dist/runtime/daimon/engineDescriptorSchema.js.map +1 -1
- package/dist/runtime/daimon/engineDescriptors.generated.d.ts +11 -3
- package/dist/runtime/daimon/engineDescriptors.generated.js +2 -2
- package/dist/runtime/daimon/engineDescriptors.generated.js.map +1 -1
- package/dist/runtime/daimon/engines.d.ts +25 -1
- package/dist/runtime/daimon/engines.js +2 -1
- package/dist/runtime/daimon/engines.js.map +1 -1
- package/dist/runtime/daimon/runAuth.d.ts +3 -2
- package/dist/runtime/daimon/runAuth.js +16 -12
- package/dist/runtime/daimon/subscriptionRealms.d.ts +9 -0
- package/dist/runtime/daimon/subscriptionRealms.js +18 -0
- package/dist/runtime/daimon/training/native/adapter.js +28 -7
- package/dist/runtime/daimon/training/native/adapter.js.map +1 -1
- package/dist/runtime/daimon/training/native/child/arguments.js +3 -2
- package/dist/runtime/daimon/training/native/child/arguments.js.map +1 -1
- package/dist/runtime/daimon/training/native/child/fixture.js +2 -0
- package/dist/runtime/daimon/training/native/child/fixture.js.map +1 -1
- package/dist/runtime/daimon/training/native/child/lifecycle.js +14 -5
- package/dist/runtime/daimon/training/native/child/lifecycle.js.map +1 -1
- package/dist/runtime/daimon/training/native/container/lifecycle.js +2 -1
- package/dist/runtime/daimon/training/native/container/lifecycle.js.map +1 -1
- package/dist/runtime/daimon/training/native/container/manifest.d.ts +2 -2
- package/dist/runtime/daimon/training/native/container/manifest.js +25 -5
- package/dist/runtime/daimon/training/native/container/manifest.js.map +1 -1
- package/dist/runtime/daimon/training/native/preparation/fixtures.js +4 -2
- package/dist/runtime/daimon/training/native/preparation/fixtures.js.map +1 -1
- package/dist/runtime/daimon/training/native/receipt/grok.d.ts +1 -1
- package/dist/runtime/daimon/training/native/receipt/index.d.ts +1 -0
- package/dist/runtime/daimon/training/native/receipt/index.js +1 -0
- package/dist/runtime/daimon/training/native/receipt/index.js.map +1 -1
- package/dist/runtime/daimon/training/native/receipt/sandbox.d.ts +1 -1
- package/dist/runtime/daimon/training/native/receipt/schema.d.ts +8 -4
- package/dist/runtime/daimon/training/native/receipt/schema.js +1 -1
- package/dist/runtime/daimon/training/native/receipt/schema.js.map +1 -1
- package/dist/runtime/daimon/training/native/receipt/subscription.d.ts +13 -0
- package/dist/runtime/daimon/training/native/receipt/subscription.js +13 -0
- package/dist/runtime/daimon/training/native/receipt/subscription.js.map +1 -0
- package/dist/runtime/daimon/training/native/test-fixtures.js +6 -2
- package/dist/runtime/daimon/training/native/test-fixtures.js.map +1 -1
- package/dist/runtime/daimon/training/native/worker/public.d.ts +12 -0
- package/dist/runtime/daimon/training/native/worker/public.js.map +1 -1
- package/dist/runtime/daimon/training/native/worker/sandbox.js +4 -2
- package/dist/runtime/daimon/training/native/worker/sandbox.js.map +1 -1
- package/dist/runtime/daimon/training/native/worker/worker.js +4 -2
- package/dist/runtime/daimon/training/native/worker/worker.js.map +1 -1
- package/dist/runtime/daimon/training/services/account-lease.d.ts +7 -0
- package/dist/runtime/daimon/training/services/account-lease.js +76 -0
- package/dist/runtime/daimon/training/services/account-lease.js.map +1 -0
- package/dist/runtime/daimon/training/services/index.d.ts +1 -0
- package/dist/runtime/daimon/training/services/index.js +1 -0
- package/dist/runtime/daimon/training/services/index.js.map +1 -1
- package/dist/shared/trainingLegacy/index.d.ts +1 -0
- package/dist/shared/trainingLegacy/index.js +1 -0
- package/dist/shared/trainingLegacy/index.js.map +1 -1
- package/dist/shared/trainingLegacy/trainingLegacyDateTime.d.ts +5 -0
- package/dist/shared/trainingLegacy/trainingLegacyDateTime.js +7 -0
- package/dist/shared/trainingLegacy/trainingLegacyDateTime.js.map +1 -0
- package/dist/shared/trainingLegacy/trainingLegacyWire.d.ts +1 -1
- package/dist/training/cli/grader/atomic/files.d.ts +3 -3
- package/dist/training/cli/spawnfile/moments.d.ts +2 -2
- package/dist/training/cli/spawnfile/moments.js +2 -1
- package/dist/training/cli/spawnfile/moments.js.map +1 -1
- package/dist/training/experiments/repair/receipt.d.ts +1 -1
- package/dist/training/experiments/replay/schema.d.ts +1 -1
- package/dist/training/graders/atomic/format.d.ts +1 -1
- package/dist/training/graders/decomposition/format.d.ts +10 -10
- package/dist/training/graders/decomposition/format.js +3 -3
- package/dist/training/graders/decomposition/format.js.map +1 -1
- package/dist/training/graders/decomposition/transport.d.ts +2 -2
- package/dist/training/graders/format/grader.d.ts +2 -2
- package/dist/training/graders/format/label-import.d.ts +1 -1
- package/dist/training/graders/format/labels.d.ts +1 -1
- package/dist/training/graders/identity.d.ts +1 -1
- package/dist/training/inference/evaluator/ledger.d.ts +2 -2
- package/dist/training/inference/evaluator/ledger.js +2 -1
- package/dist/training/inference/evaluator/ledger.js.map +1 -1
- package/dist/training/optimization/protocol.d.ts +11 -11
- package/package.json +4 -4
- package/runtimes.yaml +6 -6
package/dist/auth/index.d.ts
CHANGED
|
@@ -13,3 +13,4 @@ export * from "./targetSecretSourceResolver.js";
|
|
|
13
13
|
export { stageTrainingAuth } from "./trainingAuth.js";
|
|
14
14
|
export type { TrainingAuthStageOptions, TrainingAuthProvider } from "./trainingAuth.js";
|
|
15
15
|
export { writeBackTrainingGrokCredential } from "./trainingGrokWriteback.js";
|
|
16
|
+
export { prepareTrainingCodexAuthority } from './trainingCodexAuthority.js';
|
package/dist/auth/index.js
CHANGED
|
@@ -12,3 +12,4 @@ export * from "./targetSecretSourceLifecycle.js";
|
|
|
12
12
|
export * from "./targetSecretSourceResolver.js";
|
|
13
13
|
export { stageTrainingAuth } from "./trainingAuth.js";
|
|
14
14
|
export { writeBackTrainingGrokCredential } from "./trainingGrokWriteback.js";
|
|
15
|
+
export { prepareTrainingCodexAuthority } from './trainingCodexAuthority.js';
|
|
@@ -2,6 +2,7 @@ import { randomUUID } from "node:crypto";
|
|
|
2
2
|
import { constants } from "node:fs";
|
|
3
3
|
import { link, lstat, mkdir, open, realpath, unlink } from "node:fs/promises";
|
|
4
4
|
import path from "node:path";
|
|
5
|
+
import { verifyTrainingCodexBootstrap } from './trainingCodexAuthority.js';
|
|
5
6
|
const targets = {
|
|
6
7
|
codex: [".daimon-inbound", "codex-auth"],
|
|
7
8
|
claude: [".claude", ".credentials.json"]
|
|
@@ -13,6 +14,8 @@ export const stageTrainingAuth = async (options) => {
|
|
|
13
14
|
const home = path.resolve(options.home), source = options.source ?? `/run/spawnfile-training-auth/${options.provider}`;
|
|
14
15
|
if (!path.isAbsolute(options.home) || await realpath(home) !== home || !(await lstat(home)).isDirectory())
|
|
15
16
|
throw Error("Training home must be a canonical existing directory");
|
|
17
|
+
if (options.provider === 'codex')
|
|
18
|
+
return { version: 'spawnfile.training-auth-stage.v1', provider: 'codex', destination: await verifyTrainingCodexBootstrap(source) };
|
|
16
19
|
if (!path.isAbsolute(source) || await realpath(source) !== path.resolve(source))
|
|
17
20
|
throw Error("Training auth source must be a canonical regular leaf");
|
|
18
21
|
const input = await open(source, constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Stable host state for a declared subscription bootstrap, retained across runs.
|
|
2
|
+
* No credential bytes are copied here; the mounted Daimon authority owns them.
|
|
3
|
+
*/
|
|
4
|
+
export declare function prepareTrainingCodexAuthority(source: string, dockerContext: string): Promise<string>;
|
|
5
|
+
/** Compatibility call for per-trial preparers: validate the one container ingress.
|
|
6
|
+
* It never creates a home-local snapshot or overwrites the rotating authority.
|
|
7
|
+
*/
|
|
8
|
+
export declare function verifyTrainingCodexBootstrap(source: string): Promise<string>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { lstat, mkdir, realpath } from 'node:fs/promises';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { resolveSpawnfileHome } from './paths.js';
|
|
5
|
+
import { DAIMON_CODEX_SUBSCRIPTION_REALM } from '../runtime/daimon/contractManifest.js';
|
|
6
|
+
/** Stable host state for a declared subscription bootstrap, retained across runs.
|
|
7
|
+
* No credential bytes are copied here; the mounted Daimon authority owns them.
|
|
8
|
+
*/
|
|
9
|
+
export async function prepareTrainingCodexAuthority(source, dockerContext) {
|
|
10
|
+
const input = await lstat(source);
|
|
11
|
+
if (await realpath(source) !== path.resolve(source) || !input.isFile() || input.isSymbolicLink() || input.nlink !== 1
|
|
12
|
+
|| input.uid !== process.getuid?.() || (input.mode & 0o777) !== 0o600 || input.size < 1
|
|
13
|
+
|| input.size > DAIMON_CODEX_SUBSCRIPTION_REALM.maxCredentialBytes)
|
|
14
|
+
throw new Error('Unsafe training Codex bootstrap');
|
|
15
|
+
const identity = createHash('sha256').update(source).update('\0').update(dockerContext).digest('hex');
|
|
16
|
+
const root = path.join(resolveSpawnfileHome(), 'training', 'subscription-accounts', `codex-${identity}`);
|
|
17
|
+
await mkdir(root, { recursive: true, mode: 0o700 });
|
|
18
|
+
const entry = await lstat(root);
|
|
19
|
+
if (await realpath(root) !== root || !entry.isDirectory() || entry.isSymbolicLink() || entry.uid !== process.getuid?.()
|
|
20
|
+
|| (entry.mode & 0o777) !== 0o700)
|
|
21
|
+
throw new Error('Unsafe training Codex account state');
|
|
22
|
+
return root;
|
|
23
|
+
}
|
|
24
|
+
/** Compatibility call for per-trial preparers: validate the one container ingress.
|
|
25
|
+
* It never creates a home-local snapshot or overwrites the rotating authority.
|
|
26
|
+
*/
|
|
27
|
+
export async function verifyTrainingCodexBootstrap(source) {
|
|
28
|
+
const destination = DAIMON_CODEX_SUBSCRIPTION_REALM.bootstrapMountPath;
|
|
29
|
+
const [before, mounted] = await Promise.all([lstat(source), lstat(destination)]);
|
|
30
|
+
for (const entry of [before, mounted]) {
|
|
31
|
+
if (!entry.isFile() || entry.isSymbolicLink() || entry.nlink !== 1 || entry.uid !== process.getuid?.()
|
|
32
|
+
|| (entry.mode & 0o777) !== 0o600 || entry.size < 1 || entry.size > DAIMON_CODEX_SUBSCRIPTION_REALM.maxCredentialBytes) {
|
|
33
|
+
throw new Error('Training Codex requires its container-owned shared bootstrap');
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
if (await realpath(source) !== path.resolve(source) || await realpath(destination) !== destination
|
|
37
|
+
|| before.dev !== mounted.dev || before.ino !== mounted.ino)
|
|
38
|
+
throw new Error('Training Codex bootstrap differs from its declared ingress');
|
|
39
|
+
return destination;
|
|
40
|
+
}
|
|
@@ -124,6 +124,10 @@ export const resolveDaimonGrokWorkerDenyPaths = (plans, plan, agentId, workerHom
|
|
|
124
124
|
const ownRuntimeHome = path.posix.join(instanceRoot, DAIMON_RUNTIME_HOMES_DIRECTORY, nodeSlug(agentId));
|
|
125
125
|
const peers = agents.filter(([id]) => id !== agentId).map(([id]) => nodeSlug(id));
|
|
126
126
|
const daimonOwn = [
|
|
127
|
+
...[...new Set(agents.map(([, engine]) => engine))].flatMap((engine) => {
|
|
128
|
+
const auth = getDaimonEngineDescriptor(engine)?.auth;
|
|
129
|
+
return auth?.staging === "portable-realm" ? [auth.realm.bootstrapMountPath, auth.realm.durableMountPath] : [];
|
|
130
|
+
}),
|
|
127
131
|
DAIMON_GROK_SUBSCRIPTION_REALM.bootstrapMountPath,
|
|
128
132
|
DAIMON_GROK_SUBSCRIPTION_REALM.durableMountPath,
|
|
129
133
|
...(agents.some(([, engine]) => getDaimonEngineDescriptor(engine)?.auth.staging === "secret-service") ? [DAIMON_AGY_SUBSCRIPTION_REALM.unlockMountPath, DAIMON_AGY_SUBSCRIPTION_REALM.durableMountPath] : []),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DAIMON_SECRET_SERVICE_ENGINE_ID, getDaimonEngineDescriptor } from "../runtime/daimon/index.js";
|
|
1
|
+
import { DAIMON_ENGINE_DESCRIPTORS, DAIMON_SECRET_SERVICE_ENGINE_ID, getDaimonEngineDescriptor } from "../runtime/daimon/index.js";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { DAIMON_RUNTIME_ACCEPTANCE_STORE_MOUNT_ID, DAIMON_WAKE_FUSE_DIRECTORY } from "../runtime/daimon/config.js";
|
|
4
4
|
import { DAIMON_GROK_TURN_USAGE_LEDGER } from "../runtime/daimon/contractManifest.js";
|
|
@@ -114,6 +114,8 @@ const privateModeDirectories = (runtimePlans, moltnet) => [
|
|
|
114
114
|
.flatMap((plan) => plan.persistentMounts ?? [])
|
|
115
115
|
.filter((mount) => mount.id === DAIMON_RUNTIME_ACCEPTANCE_STORE_MOUNT_ID
|
|
116
116
|
|| mount.id === DAIMON_AGY_SUBSCRIPTION_REALM_MOUNT_ID
|
|
117
|
+
|| Object.values(DAIMON_ENGINE_DESCRIPTORS).some(({ id, auth }) => auth.staging === "portable-realm"
|
|
118
|
+
&& mount.id === `daimon-${id}-subscription-realm` && mount.mount_path === auth.realm.durableMountPath)
|
|
117
119
|
|| mount.id.startsWith(DAIMON_AGY_RUNTIME_HOME_MOUNT_ID_PREFIX)
|
|
118
120
|
|| mount.id.startsWith(DAIMON_RECORDING_MOUNT_ID_PREFIX)
|
|
119
121
|
|| mount.id.startsWith(DAIMON_PORTABLE_ENGINE_HOME_MOUNT_ID_PREFIX))
|
|
@@ -21,6 +21,8 @@ import { parseTrainingMappedPreparation } from "../preparation/contract.js";
|
|
|
21
21
|
import { persistTrainingGrokCredential } from "./grokWriteback.js";
|
|
22
22
|
import { nativeTrainingSlotsDocument } from "./nativeSlots.js";
|
|
23
23
|
import { createTrainingOutputVolume, trainingOutputVolumeEnabled } from "./outputVolume.js";
|
|
24
|
+
import { prepareTrainingCodexAuthority } from '../../../auth/index.js';
|
|
25
|
+
import { DAIMON_CODEX_SUBSCRIPTION_REALM } from '../../../runtime/daimon/contractManifest.js';
|
|
24
26
|
// The image bakes /run/training/inputs as 0:2000 0750 for brokered worker isolation; the
|
|
25
27
|
// non-brokered host-uid evaluator joins that group so it can still traverse its own inputs.
|
|
26
28
|
export const TRAINING_INPUTS_GID = 2_000;
|
|
@@ -137,6 +139,11 @@ export const launchTrainingContainer = async (options) => {
|
|
|
137
139
|
...options.repairPath ? [`type=bind,src=${options.repairPath},dst=/run/spawnfile-training/repair.json,readonly`] : [],
|
|
138
140
|
...prepared.config.auth.map((entry) => `type=bind,src=${entry.source},dst=/run/spawnfile-training-auth/${entry.provider},readonly`)];
|
|
139
141
|
const broker = prepared.config.broker;
|
|
142
|
+
const codex = prepared.config.auth.find(entry => entry.provider === 'codex');
|
|
143
|
+
if (codex && !broker) {
|
|
144
|
+
const account = await prepareTrainingCodexAuthority(codex.source, prepared.config.dockerContext);
|
|
145
|
+
mounts.push(`type=bind,src=${account},dst=${DAIMON_CODEX_SUBSCRIPTION_REALM.durableMountPath}`, `type=bind,src=${codex.source},dst=${DAIMON_CODEX_SUBSCRIPTION_REALM.bootstrapMountPath},readonly`);
|
|
146
|
+
}
|
|
140
147
|
if (broker) {
|
|
141
148
|
mounts.push(trainingRunRequestMount(prepared.config.output.source, prepared.args));
|
|
142
149
|
const slotsFile = path.join(privateRoot, "slots.json");
|
|
@@ -63,7 +63,7 @@ export declare const trainingExecutionSchema: z.ZodObject<{
|
|
|
63
63
|
path: z.ZodString;
|
|
64
64
|
examples: z.ZodArray<z.ZodObject<{
|
|
65
65
|
id: z.ZodString;
|
|
66
|
-
at: z.ZodISODateTime
|
|
66
|
+
at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>;
|
|
67
67
|
wake: z.ZodObject<{
|
|
68
68
|
surface: z.ZodLiteral<"moltnet">;
|
|
69
69
|
room: z.ZodString;
|
|
@@ -86,7 +86,7 @@ export declare const trainingExecutionSchema: z.ZodObject<{
|
|
|
86
86
|
path: z.ZodString;
|
|
87
87
|
examples: z.ZodArray<z.ZodObject<{
|
|
88
88
|
id: z.ZodString;
|
|
89
|
-
at: z.ZodISODateTime
|
|
89
|
+
at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>;
|
|
90
90
|
wake: z.ZodObject<{
|
|
91
91
|
surface: z.ZodLiteral<"moltnet">;
|
|
92
92
|
room: z.ZodString;
|
|
@@ -109,7 +109,7 @@ export declare const trainingExecutionSchema: z.ZodObject<{
|
|
|
109
109
|
path: z.ZodString;
|
|
110
110
|
examples: z.ZodArray<z.ZodObject<{
|
|
111
111
|
id: z.ZodString;
|
|
112
|
-
at: z.ZodISODateTime
|
|
112
|
+
at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>;
|
|
113
113
|
wake: z.ZodObject<{
|
|
114
114
|
surface: z.ZodLiteral<"moltnet">;
|
|
115
115
|
room: z.ZodString;
|
|
@@ -5,7 +5,7 @@ export declare const trainingPlanDatasetSchema: z.ZodObject<{
|
|
|
5
5
|
path: z.ZodString;
|
|
6
6
|
examples: z.ZodArray<z.ZodObject<{
|
|
7
7
|
id: z.ZodString;
|
|
8
|
-
at: z.ZodISODateTime
|
|
8
|
+
at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>;
|
|
9
9
|
wake: z.ZodObject<{
|
|
10
10
|
surface: z.ZodLiteral<"moltnet">;
|
|
11
11
|
room: z.ZodString;
|
|
@@ -90,7 +90,7 @@ export declare const trainingPlanSchema: z.ZodObject<{
|
|
|
90
90
|
path: z.ZodString;
|
|
91
91
|
examples: z.ZodArray<z.ZodObject<{
|
|
92
92
|
id: z.ZodString;
|
|
93
|
-
at: z.ZodISODateTime
|
|
93
|
+
at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>;
|
|
94
94
|
wake: z.ZodObject<{
|
|
95
95
|
surface: z.ZodLiteral<"moltnet">;
|
|
96
96
|
room: z.ZodString;
|
|
@@ -113,7 +113,7 @@ export declare const trainingPlanSchema: z.ZodObject<{
|
|
|
113
113
|
path: z.ZodString;
|
|
114
114
|
examples: z.ZodArray<z.ZodObject<{
|
|
115
115
|
id: z.ZodString;
|
|
116
|
-
at: z.ZodISODateTime
|
|
116
|
+
at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>;
|
|
117
117
|
wake: z.ZodObject<{
|
|
118
118
|
surface: z.ZodLiteral<"moltnet">;
|
|
119
119
|
room: z.ZodString;
|
|
@@ -136,7 +136,7 @@ export declare const trainingPlanSchema: z.ZodObject<{
|
|
|
136
136
|
path: z.ZodString;
|
|
137
137
|
examples: z.ZodArray<z.ZodObject<{
|
|
138
138
|
id: z.ZodString;
|
|
139
|
-
at: z.ZodISODateTime
|
|
139
|
+
at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>;
|
|
140
140
|
wake: z.ZodObject<{
|
|
141
141
|
surface: z.ZodLiteral<"moltnet">;
|
|
142
142
|
room: z.ZodString;
|
|
@@ -218,7 +218,7 @@ export declare const trainingPlanJsonSchema: z.core.ZodStandardJSONSchemaPayload
|
|
|
218
218
|
path: z.ZodString;
|
|
219
219
|
examples: z.ZodArray<z.ZodObject<{
|
|
220
220
|
id: z.ZodString;
|
|
221
|
-
at: z.ZodISODateTime
|
|
221
|
+
at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>;
|
|
222
222
|
wake: z.ZodObject<{
|
|
223
223
|
surface: z.ZodLiteral<"moltnet">;
|
|
224
224
|
room: z.ZodString;
|
|
@@ -241,7 +241,7 @@ export declare const trainingPlanJsonSchema: z.core.ZodStandardJSONSchemaPayload
|
|
|
241
241
|
path: z.ZodString;
|
|
242
242
|
examples: z.ZodArray<z.ZodObject<{
|
|
243
243
|
id: z.ZodString;
|
|
244
|
-
at: z.ZodISODateTime
|
|
244
|
+
at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>;
|
|
245
245
|
wake: z.ZodObject<{
|
|
246
246
|
surface: z.ZodLiteral<"moltnet">;
|
|
247
247
|
room: z.ZodString;
|
|
@@ -264,7 +264,7 @@ export declare const trainingPlanJsonSchema: z.core.ZodStandardJSONSchemaPayload
|
|
|
264
264
|
path: z.ZodString;
|
|
265
265
|
examples: z.ZodArray<z.ZodObject<{
|
|
266
266
|
id: z.ZodString;
|
|
267
|
-
at: z.ZodISODateTime
|
|
267
|
+
at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>;
|
|
268
268
|
wake: z.ZodObject<{
|
|
269
269
|
surface: z.ZodLiteral<"moltnet">;
|
|
270
270
|
room: z.ZodString;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spawnfile",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.31",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "spawnfile",
|
|
9
|
-
"version": "0.1.
|
|
9
|
+
"version": "0.1.31",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@huggingface/jinja": "0.5.10",
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"commander": "^14.0.1",
|
|
17
17
|
"mdast-util-from-markdown": "2.0.3",
|
|
18
18
|
"mdast-util-to-string": "4.0.0",
|
|
19
|
-
"undici": "7.
|
|
19
|
+
"undici": "7.30.1",
|
|
20
20
|
"yaml": "^2.8.1",
|
|
21
|
-
"zod": "^4.
|
|
21
|
+
"zod": "^4.6.7"
|
|
22
22
|
},
|
|
23
23
|
"bin": {
|
|
24
24
|
"spawnfile": "dist/cli/index.js"
|
|
@@ -5055,9 +5055,9 @@
|
|
|
5055
5055
|
}
|
|
5056
5056
|
},
|
|
5057
5057
|
"node_modules/undici": {
|
|
5058
|
-
"version": "7.
|
|
5059
|
-
"resolved": "https://registry.npmjs.org/undici/-/undici-7.
|
|
5060
|
-
"integrity": "sha512-
|
|
5058
|
+
"version": "7.30.1",
|
|
5059
|
+
"resolved": "https://registry.npmjs.org/undici/-/undici-7.30.1.tgz",
|
|
5060
|
+
"integrity": "sha512-03KrMbjIFDWQR5RNPrSw3bd1r12JpyFQl9/yxjUbJtqkjmllqC5lFjZh6ujeuJCKr8EOQvRW872Oy/az+nLYxg==",
|
|
5061
5061
|
"license": "MIT",
|
|
5062
5062
|
"engines": {
|
|
5063
5063
|
"node": ">=20.18.1"
|
|
@@ -5461,9 +5461,9 @@
|
|
|
5461
5461
|
}
|
|
5462
5462
|
},
|
|
5463
5463
|
"node_modules/zod": {
|
|
5464
|
-
"version": "4.
|
|
5465
|
-
"resolved": "https://registry.npmjs.org/zod/-/zod-4.
|
|
5466
|
-
"integrity": "sha512-
|
|
5464
|
+
"version": "4.6.7",
|
|
5465
|
+
"resolved": "https://registry.npmjs.org/zod/-/zod-4.6.7.tgz",
|
|
5466
|
+
"integrity": "sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==",
|
|
5467
5467
|
"license": "MIT",
|
|
5468
5468
|
"funding": {
|
|
5469
5469
|
"url": "https://github.com/sponsors/colinhacks"
|
|
@@ -254,7 +254,7 @@ export declare const witnessSchema: z.ZodObject<{
|
|
|
254
254
|
path: z.ZodString;
|
|
255
255
|
examples: z.ZodArray<z.ZodObject<{
|
|
256
256
|
id: z.ZodString;
|
|
257
|
-
at: z.ZodISODateTime
|
|
257
|
+
at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>;
|
|
258
258
|
wake: z.ZodObject<{
|
|
259
259
|
surface: z.ZodLiteral<"moltnet">;
|
|
260
260
|
room: z.ZodString;
|
|
@@ -277,7 +277,7 @@ export declare const witnessSchema: z.ZodObject<{
|
|
|
277
277
|
path: z.ZodString;
|
|
278
278
|
examples: z.ZodArray<z.ZodObject<{
|
|
279
279
|
id: z.ZodString;
|
|
280
|
-
at: z.ZodISODateTime
|
|
280
|
+
at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>;
|
|
281
281
|
wake: z.ZodObject<{
|
|
282
282
|
surface: z.ZodLiteral<"moltnet">;
|
|
283
283
|
room: z.ZodString;
|
|
@@ -300,7 +300,7 @@ export declare const witnessSchema: z.ZodObject<{
|
|
|
300
300
|
path: z.ZodString;
|
|
301
301
|
examples: z.ZodArray<z.ZodObject<{
|
|
302
302
|
id: z.ZodString;
|
|
303
|
-
at: z.ZodISODateTime
|
|
303
|
+
at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>;
|
|
304
304
|
wake: z.ZodObject<{
|
|
305
305
|
surface: z.ZodLiteral<"moltnet">;
|
|
306
306
|
room: z.ZodString;
|
|
@@ -636,7 +636,7 @@ export declare const witnessEnvelopeSchema: z.ZodObject<{
|
|
|
636
636
|
path: z.ZodString;
|
|
637
637
|
examples: z.ZodArray<z.ZodObject<{
|
|
638
638
|
id: z.ZodString;
|
|
639
|
-
at: z.ZodISODateTime
|
|
639
|
+
at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>;
|
|
640
640
|
wake: z.ZodObject<{
|
|
641
641
|
surface: z.ZodLiteral<"moltnet">;
|
|
642
642
|
room: z.ZodString;
|
|
@@ -659,7 +659,7 @@ export declare const witnessEnvelopeSchema: z.ZodObject<{
|
|
|
659
659
|
path: z.ZodString;
|
|
660
660
|
examples: z.ZodArray<z.ZodObject<{
|
|
661
661
|
id: z.ZodString;
|
|
662
|
-
at: z.ZodISODateTime
|
|
662
|
+
at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>;
|
|
663
663
|
wake: z.ZodObject<{
|
|
664
664
|
surface: z.ZodLiteral<"moltnet">;
|
|
665
665
|
room: z.ZodString;
|
|
@@ -682,7 +682,7 @@ export declare const witnessEnvelopeSchema: z.ZodObject<{
|
|
|
682
682
|
path: z.ZodString;
|
|
683
683
|
examples: z.ZodArray<z.ZodObject<{
|
|
684
684
|
id: z.ZodString;
|
|
685
|
-
at: z.ZodISODateTime
|
|
685
|
+
at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>;
|
|
686
686
|
wake: z.ZodObject<{
|
|
687
687
|
surface: z.ZodLiteral<"moltnet">;
|
|
688
688
|
room: z.ZodString;
|
|
@@ -771,7 +771,7 @@ export declare const witnessEnvelopeSchema: z.ZodObject<{
|
|
|
771
771
|
digest: z.ZodString;
|
|
772
772
|
}, z.core.$strict>;
|
|
773
773
|
export declare const repairReceiptSchema: z.ZodObject<{
|
|
774
|
-
version: z.ZodPreprocess<z.ZodLiteral<"spawnfile.training.measurement-repair.v1"
|
|
774
|
+
version: z.ZodPreprocess<z.ZodLiteral<"spawnfile.training.measurement-repair.v1">, unknown>;
|
|
775
775
|
parent: z.ZodObject<{
|
|
776
776
|
root: z.ZodLiteral<"/run/training/inputs/repair-parent">;
|
|
777
777
|
imageId: z.ZodString;
|
|
@@ -800,7 +800,7 @@ export declare const repairReceiptSchema: z.ZodObject<{
|
|
|
800
800
|
}, z.core.$strict>;
|
|
801
801
|
export declare const repairEnvelopeSchema: z.ZodObject<{
|
|
802
802
|
receipt: z.ZodObject<{
|
|
803
|
-
version: z.ZodPreprocess<z.ZodLiteral<"spawnfile.training.measurement-repair.v1"
|
|
803
|
+
version: z.ZodPreprocess<z.ZodLiteral<"spawnfile.training.measurement-repair.v1">, unknown>;
|
|
804
804
|
parent: z.ZodObject<{
|
|
805
805
|
root: z.ZodLiteral<"/run/training/inputs/repair-parent">;
|
|
806
806
|
imageId: z.ZodString;
|
|
@@ -44,8 +44,8 @@ export declare const materializedInputSchema: z.ZodObject<{
|
|
|
44
44
|
agentSlug: z.ZodOptional<z.ZodString>;
|
|
45
45
|
snapshot: z.ZodOptional<z.ZodString>;
|
|
46
46
|
cursor: z.ZodOptional<z.ZodString>;
|
|
47
|
-
switchingAt: z.ZodOptional<z.ZodISODateTime
|
|
48
|
-
landedAt: z.ZodOptional<z.ZodISODateTime
|
|
47
|
+
switchingAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>>;
|
|
48
|
+
landedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>>;
|
|
49
49
|
prepared: z.ZodOptional<z.ZodLiteral<true>>;
|
|
50
50
|
}, z.core.$strict>;
|
|
51
51
|
path: z.ZodNullable<z.ZodString>;
|
|
@@ -70,8 +70,8 @@ export declare const materializedMomentSchema: z.ZodObject<{
|
|
|
70
70
|
}>;
|
|
71
71
|
dataset: z.ZodString;
|
|
72
72
|
}, z.core.$strict>;
|
|
73
|
-
at: z.ZodISODateTime
|
|
74
|
-
effectiveAt: z.ZodISODateTime
|
|
73
|
+
at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>;
|
|
74
|
+
effectiveAt: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>;
|
|
75
75
|
inputs: z.ZodArray<z.ZodObject<{
|
|
76
76
|
section: z.ZodEnum<{
|
|
77
77
|
networks: "networks";
|
|
@@ -108,8 +108,8 @@ export declare const materializedMomentSchema: z.ZodObject<{
|
|
|
108
108
|
agentSlug: z.ZodOptional<z.ZodString>;
|
|
109
109
|
snapshot: z.ZodOptional<z.ZodString>;
|
|
110
110
|
cursor: z.ZodOptional<z.ZodString>;
|
|
111
|
-
switchingAt: z.ZodOptional<z.ZodISODateTime
|
|
112
|
-
landedAt: z.ZodOptional<z.ZodISODateTime
|
|
111
|
+
switchingAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>>;
|
|
112
|
+
landedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>>;
|
|
113
113
|
prepared: z.ZodOptional<z.ZodLiteral<true>>;
|
|
114
114
|
}, z.core.$strict>;
|
|
115
115
|
path: z.ZodNullable<z.ZodString>;
|
|
@@ -120,7 +120,7 @@ export declare const materializedMomentSchema: z.ZodObject<{
|
|
|
120
120
|
record: z.ZodObject<{
|
|
121
121
|
matched: z.ZodBoolean;
|
|
122
122
|
attempts: z.ZodOptional<z.ZodNumber>;
|
|
123
|
-
selectedStartedAt: z.ZodOptional<z.ZodISODateTime
|
|
123
|
+
selectedStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>>;
|
|
124
124
|
executionId: z.ZodOptional<z.ZodString>;
|
|
125
125
|
selection: z.ZodOptional<z.ZodLiteral<"earliest-startedAt">>;
|
|
126
126
|
}, z.core.$strict>;
|
|
@@ -158,7 +158,7 @@ export declare const leakFindingSchema: z.ZodObject<{
|
|
|
158
158
|
}, z.core.$strict>;
|
|
159
159
|
export declare const leakCheckSchema: z.ZodObject<{
|
|
160
160
|
version: z.ZodLiteral<"spawnfile.leak-check.v1">;
|
|
161
|
-
at: z.ZodISODateTime
|
|
161
|
+
at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>;
|
|
162
162
|
ok: z.ZodBoolean;
|
|
163
163
|
checked: z.ZodObject<{
|
|
164
164
|
files: z.ZodNumber;
|
|
@@ -199,7 +199,7 @@ export type LeakCheck = z.infer<typeof leakCheckSchema>;
|
|
|
199
199
|
export type LeakFinding = z.infer<typeof leakFindingSchema>;
|
|
200
200
|
export declare const taskClockSchema: z.ZodObject<{
|
|
201
201
|
version: z.ZodLiteral<"spawnfile.task-clock.v1">;
|
|
202
|
-
origin: z.ZodISODateTime
|
|
202
|
+
origin: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>;
|
|
203
203
|
}, z.core.$strict>;
|
|
204
204
|
export declare const materializedMomentJsonSchema: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
205
205
|
version: z.ZodLiteral<"spawnfile.materialized-moment.v1">;
|
|
@@ -217,8 +217,8 @@ export declare const materializedMomentJsonSchema: z.core.ZodStandardJSONSchemaP
|
|
|
217
217
|
}>;
|
|
218
218
|
dataset: z.ZodString;
|
|
219
219
|
}, z.core.$strict>;
|
|
220
|
-
at: z.ZodISODateTime
|
|
221
|
-
effectiveAt: z.ZodISODateTime
|
|
220
|
+
at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>;
|
|
221
|
+
effectiveAt: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>;
|
|
222
222
|
inputs: z.ZodArray<z.ZodObject<{
|
|
223
223
|
section: z.ZodEnum<{
|
|
224
224
|
networks: "networks";
|
|
@@ -255,8 +255,8 @@ export declare const materializedMomentJsonSchema: z.core.ZodStandardJSONSchemaP
|
|
|
255
255
|
agentSlug: z.ZodOptional<z.ZodString>;
|
|
256
256
|
snapshot: z.ZodOptional<z.ZodString>;
|
|
257
257
|
cursor: z.ZodOptional<z.ZodString>;
|
|
258
|
-
switchingAt: z.ZodOptional<z.ZodISODateTime
|
|
259
|
-
landedAt: z.ZodOptional<z.ZodISODateTime
|
|
258
|
+
switchingAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>>;
|
|
259
|
+
landedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>>;
|
|
260
260
|
prepared: z.ZodOptional<z.ZodLiteral<true>>;
|
|
261
261
|
}, z.core.$strict>;
|
|
262
262
|
path: z.ZodNullable<z.ZodString>;
|
|
@@ -267,7 +267,7 @@ export declare const materializedMomentJsonSchema: z.core.ZodStandardJSONSchemaP
|
|
|
267
267
|
record: z.ZodObject<{
|
|
268
268
|
matched: z.ZodBoolean;
|
|
269
269
|
attempts: z.ZodOptional<z.ZodNumber>;
|
|
270
|
-
selectedStartedAt: z.ZodOptional<z.ZodISODateTime
|
|
270
|
+
selectedStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>>;
|
|
271
271
|
executionId: z.ZodOptional<z.ZodString>;
|
|
272
272
|
selection: z.ZodOptional<z.ZodLiteral<"earliest-startedAt">>;
|
|
273
273
|
}, z.core.$strict>;
|
|
@@ -278,7 +278,7 @@ export declare const materializedMomentJsonSchema: z.core.ZodStandardJSONSchemaP
|
|
|
278
278
|
}, z.core.$strict>>;
|
|
279
279
|
export declare const leakCheckJsonSchema: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
280
280
|
version: z.ZodLiteral<"spawnfile.leak-check.v1">;
|
|
281
|
-
at: z.ZodISODateTime
|
|
281
|
+
at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>;
|
|
282
282
|
ok: z.ZodBoolean;
|
|
283
283
|
checked: z.ZodObject<{
|
|
284
284
|
files: z.ZodNumber;
|
|
@@ -317,5 +317,5 @@ export declare const leakCheckJsonSchema: z.core.ZodStandardJSONSchemaPayload<z.
|
|
|
317
317
|
}, z.core.$strict>>;
|
|
318
318
|
export declare const taskClockJsonSchema: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
319
319
|
version: z.ZodLiteral<"spawnfile.task-clock.v1">;
|
|
320
|
-
origin: z.ZodISODateTime
|
|
320
|
+
origin: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>;
|
|
321
321
|
}, z.core.$strict>>;
|
|
@@ -14,7 +14,7 @@ export declare const memoryEventSchema: z.ZodObject<{
|
|
|
14
14
|
"memory.promoted": "memory.promoted";
|
|
15
15
|
"memory.consolidated": "memory.consolidated";
|
|
16
16
|
}>;
|
|
17
|
-
createdAt: z.ZodISODateTime
|
|
17
|
+
createdAt: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>;
|
|
18
18
|
principal: z.ZodObject<{
|
|
19
19
|
agentId: z.ZodString;
|
|
20
20
|
scope: z.ZodEnum<{
|
|
@@ -5,7 +5,7 @@ export declare const snapshotManifestSchema: z.ZodObject<{
|
|
|
5
5
|
version: z.ZodLiteral<"noopolis.daimon.wake-moment.v1">;
|
|
6
6
|
id: z.ZodString;
|
|
7
7
|
snapshot: z.ZodString;
|
|
8
|
-
started_at: z.ZodISODateTime
|
|
8
|
+
started_at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>;
|
|
9
9
|
sourcePath: z.ZodString;
|
|
10
10
|
entries: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
11
11
|
type: z.ZodEnum<{
|
|
@@ -3,7 +3,7 @@ import { DAIMON_PACKAGE_NAME } from '../../runtime/daimon/packageName.js';
|
|
|
3
3
|
import { readFile } from "node:fs/promises";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { SpawnfileError } from "../../shared/index.js";
|
|
6
|
-
import { DAIMON_GROK_ENGINE_BROKER } from "../../runtime/daimon/contractManifest.js";
|
|
6
|
+
import { DAIMON_CODEX_SUBSCRIPTION_REALM, DAIMON_GROK_ENGINE_BROKER } from "../../runtime/daimon/contractManifest.js";
|
|
7
7
|
import { parseTrainingBrokerDeclaration } from "./broker/declaration.js";
|
|
8
8
|
import { TRAINING_BROKER_DECLARATION_FILE, TRAINING_ROOT, TRAINING_SLOTS_FILE, trainingSlotDescriptors } from "./broker/paths.js";
|
|
9
9
|
import { loadDaimonProjectionModule, resolveTrainingSlotProjection } from "./broker/projection.js";
|
|
@@ -107,7 +107,7 @@ const loadDaimonRuntime = async () => {
|
|
|
107
107
|
return import(packageName);
|
|
108
108
|
};
|
|
109
109
|
/** The Codex credential leaf Daimon reads, from its public export, refused unless it equals the vendored manifest. */
|
|
110
|
-
const
|
|
110
|
+
const codexSubscriptionRealm = async (load = loadDaimonRuntime) => {
|
|
111
111
|
let daimon;
|
|
112
112
|
try {
|
|
113
113
|
daimon = await load();
|
|
@@ -115,11 +115,10 @@ const codexCredentialRelativePath = async (load = loadDaimonRuntime) => {
|
|
|
115
115
|
catch {
|
|
116
116
|
return refused(`The training image must install ${DAIMON_PACKAGE_NAME} with its public /runtime export`);
|
|
117
117
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
return refused("The installed Daimon Codex credential material differs from this compiler's vendored manifest");
|
|
118
|
+
if (!daimon?.CODEX_SUBSCRIPTION_REALM || Object.entries(DAIMON_CODEX_SUBSCRIPTION_REALM).some(([key, value]) => daimon.CODEX_SUBSCRIPTION_REALM[key] !== value)) {
|
|
119
|
+
return refused("The installed Daimon Codex subscription realm differs from this compiler's vendored manifest");
|
|
121
120
|
}
|
|
122
|
-
return
|
|
121
|
+
return DAIMON_CODEX_SUBSCRIPTION_REALM;
|
|
123
122
|
};
|
|
124
123
|
/** Ports from the leased slot's own `slots.json` block (offsets 0=Moltnet, 1=worker control, 2=bridge), refused outside it. */
|
|
125
124
|
const leasedSlotPorts = async (slot, file) => {
|
|
@@ -152,7 +151,7 @@ const leaseCodexSubject = async (options) => {
|
|
|
152
151
|
const workspace = canonical("workspace", options.trialRoots.workspace);
|
|
153
152
|
const runtimeHome = canonical("runtime home", options.trialRoots.runtimeHome);
|
|
154
153
|
const ports = await leasedSlotPorts(options.slot, options.slotsFile ?? TRAINING_SLOTS_FILE);
|
|
155
|
-
const
|
|
154
|
+
const realm = await codexSubscriptionRealm(options.loadDaimon);
|
|
156
155
|
options.signal.throwIfAborted();
|
|
157
156
|
// Codex's writable data sits beside the workspace, disjoint from the evaluator runtime and its controls.
|
|
158
157
|
const parent = path.posix.dirname(workspace);
|
|
@@ -168,10 +167,11 @@ const leaseCodexSubject = async (options) => {
|
|
|
168
167
|
agent: { id: options.agentId, engine: DAIMON_PORTABLE_ENGINE_ID, model: options.model },
|
|
169
168
|
workspace: { source: workspace, target: workspace },
|
|
170
169
|
projections: [{ role: "home", source: home, target: home }, { role: "memory", source: memory, target: memory },
|
|
171
|
-
{ role: "transport", source: transport, target: transport }
|
|
172
|
-
|
|
173
|
-
//
|
|
174
|
-
credentials
|
|
170
|
+
{ role: "transport", source: transport, target: transport },
|
|
171
|
+
{ role: "subscription", source: realm.durableMountPath, target: realm.durableMountPath }],
|
|
172
|
+
// The container owns one persistent authority for every trial. The runtime
|
|
173
|
+
// stages credentials during each serialized host lifecycle and promotes refreshes.
|
|
174
|
+
credentials: [{ source: TRAINING_CODEX_CREDENTIAL_INGRESS, target: realm.bootstrapMountPath }],
|
|
175
175
|
roots,
|
|
176
176
|
ports,
|
|
177
177
|
env: {}
|
|
@@ -46,7 +46,7 @@ export declare const organizationReadinessSchema: z.ZodPreprocess<z.ZodObject<{
|
|
|
46
46
|
version: z.ZodLiteral<"spawnfile.organization-ready.v1">;
|
|
47
47
|
world_binding_digest: z.ZodNullable<z.ZodString>;
|
|
48
48
|
reason: z.ZodOptional<z.ZodString>;
|
|
49
|
-
}, z.core.$strict
|
|
49
|
+
}, z.core.$strict>, unknown>;
|
|
50
50
|
export declare const createOrganizationReadinessPending: (evidence: OrganizationReadinessEvidence, record: ReconcileOrganizationReadinessInput["record"]) => OrganizationReadiness;
|
|
51
51
|
export declare const parseOrganizationReadiness: (value: unknown) => OrganizationReadiness;
|
|
52
52
|
export declare const reconcileOrganizationReadiness: (input: ReconcileOrganizationReadinessInput) => OrganizationReadiness;
|
|
@@ -12,7 +12,7 @@ declare const recordSourceSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
12
12
|
}, z.core.$strict>]>;
|
|
13
13
|
export type DeploymentRecordSource = z.infer<typeof recordSourceSchema>;
|
|
14
14
|
export declare const deploymentRecordSchema: z.ZodObject<{
|
|
15
|
-
activated_at: z.ZodOptional<z.ZodISODateTime
|
|
15
|
+
activated_at: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>>;
|
|
16
16
|
activation_exact: z.ZodOptional<z.ZodBoolean>;
|
|
17
17
|
activation_note: z.ZodOptional<z.ZodString>;
|
|
18
18
|
recording: z.ZodOptional<z.ZodObject<{
|
|
@@ -48,12 +48,12 @@ export declare const deploymentRecordSchema: z.ZodObject<{
|
|
|
48
48
|
version: z.ZodLiteral<"spawnfile.deploy-resources.v1">;
|
|
49
49
|
deployment: z.ZodString;
|
|
50
50
|
deployment_id: z.ZodString;
|
|
51
|
-
activated_at: z.ZodISODateTime
|
|
51
|
+
activated_at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>;
|
|
52
52
|
activation_exact: z.ZodBoolean;
|
|
53
53
|
activation_note: z.ZodOptional<z.ZodString>;
|
|
54
|
-
rolled_back_at: z.ZodOptional<z.ZodISODateTime
|
|
54
|
+
rolled_back_at: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>>;
|
|
55
55
|
exact: z.ZodOptional<z.ZodLiteral<false>>;
|
|
56
|
-
deployed_at: z.ZodISODateTime
|
|
56
|
+
deployed_at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>;
|
|
57
57
|
report_sha256: z.ZodString;
|
|
58
58
|
resources: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
59
59
|
id: z.ZodString;
|
|
@@ -167,7 +167,7 @@ export declare const deploymentRecordSchema: z.ZodObject<{
|
|
|
167
167
|
version: z.ZodLiteral<"spawnfile.organization-ready.v1">;
|
|
168
168
|
world_binding_digest: z.ZodNullable<z.ZodString>;
|
|
169
169
|
reason: z.ZodOptional<z.ZodString>;
|
|
170
|
-
}, z.core.$strict
|
|
170
|
+
}, z.core.$strict>, unknown>>;
|
|
171
171
|
}, z.core.$strict>;
|
|
172
172
|
export type DeploymentRecord = Omit<z.infer<typeof deploymentRecordSchema>, "organization_handoff" | "organization_handoff_handle" | "organization_ready"> & {
|
|
173
173
|
organization_handoff?: OrganizationHandoff;
|
|
@@ -4,7 +4,7 @@ import { z } from "zod";
|
|
|
4
4
|
import { ensureDirectory, readUtf8File } from "../filesystem/index.js";
|
|
5
5
|
import { deployResourcesSchema } from "./resourceLog.js";
|
|
6
6
|
import { publishDeploymentRecord } from "./recordPublication.js";
|
|
7
|
-
import { SpawnfileError } from "../shared/index.js";
|
|
7
|
+
import { compatibleIsoDateTimeSchema, SpawnfileError } from "../shared/index.js";
|
|
8
8
|
import { recordingReportSchema } from "../report/index.js";
|
|
9
9
|
import { parseOrganizationHandoff } from "./organizationHandoffTypes.js";
|
|
10
10
|
import { parseOpaqueTargetHandle } from "../target/index.js";
|
|
@@ -82,7 +82,7 @@ const deploymentRecordV1Schema = z.object({
|
|
|
82
82
|
version: z.literal("spawnfile.deployment.v1")
|
|
83
83
|
}).strict();
|
|
84
84
|
export const deploymentRecordSchema = z.object({
|
|
85
|
-
activated_at:
|
|
85
|
+
activated_at: compatibleIsoDateTimeSchema({ offset: true }).optional(),
|
|
86
86
|
activation_exact: z.boolean().optional(),
|
|
87
87
|
activation_note: z.string().min(1).optional(),
|
|
88
88
|
recording: recordingReportSchema.optional(),
|
|
@@ -6,12 +6,12 @@ export declare const deployResourcesSchema: z.ZodObject<{
|
|
|
6
6
|
version: z.ZodLiteral<"spawnfile.deploy-resources.v1">;
|
|
7
7
|
deployment: z.ZodString;
|
|
8
8
|
deployment_id: z.ZodString;
|
|
9
|
-
activated_at: z.ZodISODateTime
|
|
9
|
+
activated_at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>;
|
|
10
10
|
activation_exact: z.ZodBoolean;
|
|
11
11
|
activation_note: z.ZodOptional<z.ZodString>;
|
|
12
|
-
rolled_back_at: z.ZodOptional<z.ZodISODateTime
|
|
12
|
+
rolled_back_at: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>>;
|
|
13
13
|
exact: z.ZodOptional<z.ZodLiteral<false>>;
|
|
14
|
-
deployed_at: z.ZodISODateTime
|
|
14
|
+
deployed_at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>;
|
|
15
15
|
report_sha256: z.ZodString;
|
|
16
16
|
resources: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
17
17
|
id: z.ZodString;
|