spawnfile 0.1.28 → 0.1.30
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/training/container/launch.js +8 -0
- package/dist/compiler/training/container/outputVolume.d.ts +1 -0
- package/dist/compiler/training/container/outputVolume.js +27 -3
- 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/commands.js +2 -2
- package/dist/training/cli/commands.js.map +1 -1
- package/dist/training/cli/datasets.js +1 -1
- package/dist/training/cli/datasets.js.map +1 -1
- package/dist/training/cli/grader/atomic/files.d.ts +3 -3
- package/dist/training/cli/grader/backend.js +3 -1
- package/dist/training/cli/grader/backend.js.map +1 -1
- 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/cli/training/bridge-command.d.ts +2 -0
- package/dist/training/cli/training/bridge-command.js +28 -0
- package/dist/training/cli/training/bridge-command.js.map +1 -0
- package/dist/training/cli/training/index.d.ts +1 -0
- package/dist/training/cli/training/index.js +1 -0
- package/dist/training/cli/training/index.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/decision/typesafe/index.js +3 -2
- package/dist/training/inference/decision/typesafe/index.js.map +1 -1
- package/dist/training/inference/decision/typesafe/transport.js +8 -7
- package/dist/training/inference/decision/typesafe/transport.js.map +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/inference/evaluator/policy.js +6 -3
- package/dist/training/inference/evaluator/policy.js.map +1 -1
- package/dist/training/inference/evaluator/provider.js +2 -1
- package/dist/training/inference/evaluator/provider.js.map +1 -1
- package/dist/training/inference/index.d.ts +1 -0
- package/dist/training/inference/index.js +1 -0
- package/dist/training/inference/index.js.map +1 -1
- package/dist/training/inference/safe-diagnostic.d.ts +6 -0
- package/dist/training/inference/safe-diagnostic.js +7 -0
- package/dist/training/inference/safe-diagnostic.js.map +1 -0
- package/dist/training/optimization/protocol.d.ts +11 -11
- package/package.json +4 -4
- package/runtimes.yaml +6 -6
|
@@ -2,7 +2,7 @@ import type { InferenceProviderRegistry } from '../../contracts/inference-regist
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { type EvaluatorPurpose } from './policy.js';
|
|
4
4
|
declare const receipt: z.ZodObject<{
|
|
5
|
-
version: z.ZodPreprocess<z.ZodLiteral<"spawnfile.training.evaluator-request.v1"
|
|
5
|
+
version: z.ZodPreprocess<z.ZodLiteral<"spawnfile.training.evaluator-request.v1">, unknown>;
|
|
6
6
|
id: z.ZodString;
|
|
7
7
|
policy: z.ZodString;
|
|
8
8
|
route: z.ZodString;
|
|
@@ -11,7 +11,7 @@ declare const receipt: z.ZodObject<{
|
|
|
11
11
|
failed: "failed";
|
|
12
12
|
admitted: "admitted";
|
|
13
13
|
}>;
|
|
14
|
-
at: z.
|
|
14
|
+
at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODateTime]>;
|
|
15
15
|
reservedUsd: z.ZodNumber;
|
|
16
16
|
chargedUsd: z.ZodNumber;
|
|
17
17
|
inputTokens: z.ZodNullable<z.ZodNumber>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { compatibleIsoDateTimeSchema } from '../../../shared/trainingLegacy/index.js';
|
|
1
2
|
import { compatibleWireLiteral } from '../../contracts/index.js';
|
|
2
3
|
import { appendFileSync, constants, closeSync, fstatSync, fsyncSync, openSync, readFileSync } from 'node:fs';
|
|
3
4
|
import { randomUUID, createHash } from 'node:crypto';
|
|
@@ -5,7 +6,7 @@ import { z } from 'zod';
|
|
|
5
6
|
import { evaluatorRoute, routeKey } from './policy.js';
|
|
6
7
|
const receipt = z.object({ version: compatibleWireLiteral('spawnfile.training.evaluator-request.v1'), id: z.string().uuid(),
|
|
7
8
|
policy: z.string().regex(/^[a-f0-9]{64}$/u), route: z.string(),
|
|
8
|
-
event: z.enum(['admitted', 'completed', 'failed']), at:
|
|
9
|
+
event: z.enum(['admitted', 'completed', 'failed']), at: compatibleIsoDateTimeSchema(),
|
|
9
10
|
reservedUsd: z.number().finite().nonnegative(), chargedUsd: z.number().finite().nonnegative(),
|
|
10
11
|
inputTokens: z.number().int().nonnegative().nullable(), outputTokens: z.number().int().nonnegative().nullable(),
|
|
11
12
|
}).strict();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ledger.js","sourceRoot":"","sources":["../../../../src/training/inference/evaluator/ledger.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ledger.js","sourceRoot":"","sources":["../../../../src/training/inference/evaluator/ledger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AAEtF,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC7G,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,O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AAC;gBAAC,CAAC;YAChC,CAAC;SACF,CAAC;IACJ,CAAC;YAAS,CAAC;QAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IAAC,CAAC;AAC9B,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SafeDiagnosticError } from '../safe-diagnostic.js';
|
|
1
2
|
import { defaultInferenceProviders } from '../../providers/index.js';
|
|
2
3
|
import { trainingEnvironment } from '../../platform/index.js';
|
|
3
4
|
import { compatibleWireLiteral } from '../../contracts/index.js';
|
|
@@ -49,12 +50,14 @@ export function evaluatorPolicy(registry = defaultInferenceProviders) {
|
|
|
49
50
|
const budget = dedicated?.budget ?? descriptor?.capabilities.evaluatorBudget;
|
|
50
51
|
if (!purposes?.includes(route.purpose) || !budget ||
|
|
51
52
|
(budget === 'usd') !== (route.maxSpendUsd !== undefined))
|
|
52
|
-
throw
|
|
53
|
+
throw new SafeDiagnosticError('Unsupported budgeted provider');
|
|
53
54
|
}
|
|
54
55
|
return policy;
|
|
55
56
|
}
|
|
56
|
-
catch {
|
|
57
|
-
|
|
57
|
+
catch (cause) {
|
|
58
|
+
if (cause instanceof SafeDiagnosticError)
|
|
59
|
+
throw cause;
|
|
60
|
+
throw new SafeDiagnosticError('Invalid evaluator route policy');
|
|
58
61
|
}
|
|
59
62
|
}
|
|
60
63
|
export function evaluatorRoute(provider, purpose, model, registry = defaultInferenceProviders) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policy.js","sourceRoot":"","sources":["../../../../src/training/inference/evaluator/policy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"policy.js","sourceRoot":"","sources":["../../../../src/training/inference/evaluator/policy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9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CAAC;IAChB,CAAC;IACD,OAAO,KAAK,EAAE,CAAC;QACb,IAAI,KAAK,YAAY,mBAAmB;YAAE,MAAM,KAAK,CAAC;QACtD,MAAM,IAAI,mBAAmB,CAAC,gCAAgC,CAAC,CAAC;IAClE,CAAC;AACH,CAAC;AACD,MAAM,UAAU,cAAc,CAAC,QAAgB,EAAE,OAAyB,EAAE,KAAa,EAAE,WAAsC,yBAAyB;IACxJ,MAAM,MAAM,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;IACzC,MAAM,QAAQ,GAAG,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,KAAK,OAAO,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC;IACjI,IAAI,CAAC,QAAQ;QAAE,MAAM,KAAK,CAAC,4BAA4B,QAAQ,CAAC,oBAAoB,IAAI,QAAQ,oCAAoC,OAAO,qBAAqB,QAAQ,EAAE,CAAC,CAAC;IAC5K,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAO,CAAC,WAAW,EAAE,CAAC;AAC/D,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SafeDiagnosticError } from '../safe-diagnostic.js';
|
|
1
2
|
import { defaultInferenceProviders } from '../../providers/index.js';
|
|
2
3
|
import { trainingEnvironment } from '../../platform/index.js';
|
|
3
4
|
import { evaluatorRoute, readProtectedFile } from './policy.js';
|
|
@@ -39,7 +40,7 @@ export function typeSafeEvaluatorEnvironment() {
|
|
|
39
40
|
return { TYPESAFE_API_KEY: key };
|
|
40
41
|
}
|
|
41
42
|
catch {
|
|
42
|
-
throw
|
|
43
|
+
throw new SafeDiagnosticError('Invalid evaluator TypeSafe secret file');
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
46
|
//# sourceMappingURL=provider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../../../src/training/inference/evaluator/provider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../../../src/training/inference/evaluator/provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAyB,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAEtD,MAAM,UAAU,wBAAwB,CAAC,QAA2B,EAAE,IAAY,EAAE,OAAyB,EAAE,KAAa,EAAE,WAAsC,yBAAyB;IAC3L,IAAI,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC,eAAe,IAAI,mBAAmB,CAAC,sCAAsC,CAAC,KAAK,QAAQ,IAAI,mBAAmB,CAAC,0CAA0C,CAAC,KAAK,SAAS;QAAE,OAAO,QAAQ,CAAC;IACpR,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC/C,OAAO,EAAE,GAAG,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,OAAO;YAC1C,IAAI,OAAO,CAAC,KAAK,KAAK,KAAK;gBAAE,MAAM,KAAK,CAAC,qDAAqD,CAAC,CAAC;YAChG,OAAO,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC;YACjC,MAAM,SAAS,GAAG,uBAAuB,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC;YAC7E,IAAI,OAAO,GAAG,KAAK,CAA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C"}
|
|
@@ -6,3 +6,4 @@ export { validateInferenceSchema, validateInferenceResponse, validateInferenceSc
|
|
|
6
6
|
export { captureInferenceDiagnostic } from './diagnostic.js';
|
|
7
7
|
export { assertModelRequestAdmission } from './request-cap.js';
|
|
8
8
|
export { budgetEvaluatorInference, typeSafeEvaluatorEnvironment } from './evaluator/index.js';
|
|
9
|
+
export { SafeDiagnosticError } from './safe-diagnostic.js';
|
|
@@ -6,4 +6,5 @@ export { validateInferenceSchema, validateInferenceResponse, validateInferenceSc
|
|
|
6
6
|
export { captureInferenceDiagnostic } from './diagnostic.js';
|
|
7
7
|
export { assertModelRequestAdmission } from './request-cap.js';
|
|
8
8
|
export { budgetEvaluatorInference, typeSafeEvaluatorEnvironment } from './evaluator/index.js';
|
|
9
|
+
export { SafeDiagnosticError } from './safe-diagnostic.js';
|
|
9
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/training/inference/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAA+B,MAAM,mBAAmB,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAiC,MAAM,cAAc,CAAC;AAC/E,OAAO,EAAE,qBAAqB,EAAoD,MAAM,cAAc,CAAC;AACvG,OAAO,EAAE,qBAAqB,EAA+B,MAAM,mBAAmB,CAAC;AACvF,OAAO,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACvH,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,wBAAwB,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/training/inference/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAA+B,MAAM,mBAAmB,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAiC,MAAM,cAAc,CAAC;AAC/E,OAAO,EAAE,qBAAqB,EAAoD,MAAM,cAAc,CAAC;AACvG,OAAO,EAAE,qBAAqB,EAA+B,MAAM,mBAAmB,CAAC;AACvF,OAAO,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACvH,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,wBAAwB,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AAC9F,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Only owner-authored, credential-free diagnostics may cross a startup boundary.
|
|
2
|
+
* Never construct this class from transport text, paths or other untrusted input.
|
|
3
|
+
*/
|
|
4
|
+
export declare class SafeDiagnosticError extends Error {
|
|
5
|
+
readonly name = "SafeDiagnosticError";
|
|
6
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Only owner-authored, credential-free diagnostics may cross a startup boundary.
|
|
2
|
+
* Never construct this class from transport text, paths or other untrusted input.
|
|
3
|
+
*/
|
|
4
|
+
export class SafeDiagnosticError extends Error {
|
|
5
|
+
name = 'SafeDiagnosticError';
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=safe-diagnostic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safe-diagnostic.js","sourceRoot":"","sources":["../../../src/training/inference/safe-diagnostic.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IAC1B,IAAI,GAAG,qBAAqB,CAAC;CAChD"}
|
|
@@ -53,7 +53,7 @@ export declare const searchSchema: z.ZodPipe<z.ZodObject<{
|
|
|
53
53
|
}>>;
|
|
54
54
|
export declare const editScopeSchema: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"whole-file">, z.ZodArray<z.ZodString>]>>;
|
|
55
55
|
export declare const startSchema: z.ZodObject<{
|
|
56
|
-
schema: z.ZodPreprocess<z.ZodLiteral<"spawnfile.training.dspy.v2"
|
|
56
|
+
schema: z.ZodPreprocess<z.ZodLiteral<"spawnfile.training.dspy.v2">, unknown>;
|
|
57
57
|
kind: z.ZodLiteral<"optimize">;
|
|
58
58
|
id: z.ZodString;
|
|
59
59
|
components: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
@@ -233,7 +233,7 @@ export declare const requestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
233
233
|
components: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
234
234
|
round: z.ZodOptional<z.ZodNumber>;
|
|
235
235
|
}, z.core.$strict>;
|
|
236
|
-
schema: z.ZodPreprocess<z.ZodLiteral<"spawnfile.training.dspy.v2"
|
|
236
|
+
schema: z.ZodPreprocess<z.ZodLiteral<"spawnfile.training.dspy.v2">, unknown>;
|
|
237
237
|
id: z.ZodString;
|
|
238
238
|
}, z.core.$strict>, z.ZodObject<{
|
|
239
239
|
kind: z.ZodLiteral<"request">;
|
|
@@ -252,7 +252,7 @@ export declare const requestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
252
252
|
responseSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
253
253
|
}, z.core.$strict>;
|
|
254
254
|
}, z.core.$strict>;
|
|
255
|
-
schema: z.ZodPreprocess<z.ZodLiteral<"spawnfile.training.dspy.v2"
|
|
255
|
+
schema: z.ZodPreprocess<z.ZodLiteral<"spawnfile.training.dspy.v2">, unknown>;
|
|
256
256
|
id: z.ZodString;
|
|
257
257
|
}, z.core.$strict>], "method">;
|
|
258
258
|
export declare const populationRoundSchema: z.ZodObject<{
|
|
@@ -295,7 +295,7 @@ export declare const resultSchema: z.ZodObject<{
|
|
|
295
295
|
optimizer: z.ZodPreprocess<z.ZodEnum<{
|
|
296
296
|
"training.population": "training.population";
|
|
297
297
|
"dspy.GEPA": "dspy.GEPA";
|
|
298
|
-
}
|
|
298
|
+
}>, unknown>;
|
|
299
299
|
dspyVersion: z.ZodLiteral<"3.3.1">;
|
|
300
300
|
gepaVersion: z.ZodLiteral<"0.1.4">;
|
|
301
301
|
seed: z.ZodNumber;
|
|
@@ -372,7 +372,7 @@ export declare const resultSchema: z.ZodObject<{
|
|
|
372
372
|
text: z.ZodOptional<z.ZodString>;
|
|
373
373
|
}, z.core.$strict>>;
|
|
374
374
|
}, z.core.$strict>;
|
|
375
|
-
schema: z.ZodPreprocess<z.ZodLiteral<"spawnfile.training.dspy.v2"
|
|
375
|
+
schema: z.ZodPreprocess<z.ZodLiteral<"spawnfile.training.dspy.v2">, unknown>;
|
|
376
376
|
id: z.ZodString;
|
|
377
377
|
}, z.core.$strict>;
|
|
378
378
|
export declare const errorSchema: z.ZodObject<{
|
|
@@ -381,7 +381,7 @@ export declare const errorSchema: z.ZodObject<{
|
|
|
381
381
|
code: z.ZodString;
|
|
382
382
|
message: z.ZodString;
|
|
383
383
|
}, z.core.$strict>;
|
|
384
|
-
schema: z.ZodPreprocess<z.ZodLiteral<"spawnfile.training.dspy.v2"
|
|
384
|
+
schema: z.ZodPreprocess<z.ZodLiteral<"spawnfile.training.dspy.v2">, unknown>;
|
|
385
385
|
id: z.ZodString;
|
|
386
386
|
}, z.core.$strict>;
|
|
387
387
|
export declare const messageSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -396,7 +396,7 @@ export declare const messageSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion
|
|
|
396
396
|
components: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
397
397
|
round: z.ZodOptional<z.ZodNumber>;
|
|
398
398
|
}, z.core.$strict>;
|
|
399
|
-
schema: z.ZodPreprocess<z.ZodLiteral<"spawnfile.training.dspy.v2"
|
|
399
|
+
schema: z.ZodPreprocess<z.ZodLiteral<"spawnfile.training.dspy.v2">, unknown>;
|
|
400
400
|
id: z.ZodString;
|
|
401
401
|
}, z.core.$strict>, z.ZodObject<{
|
|
402
402
|
kind: z.ZodLiteral<"request">;
|
|
@@ -415,7 +415,7 @@ export declare const messageSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion
|
|
|
415
415
|
responseSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
416
416
|
}, z.core.$strict>;
|
|
417
417
|
}, z.core.$strict>;
|
|
418
|
-
schema: z.ZodPreprocess<z.ZodLiteral<"spawnfile.training.dspy.v2"
|
|
418
|
+
schema: z.ZodPreprocess<z.ZodLiteral<"spawnfile.training.dspy.v2">, unknown>;
|
|
419
419
|
id: z.ZodString;
|
|
420
420
|
}, z.core.$strict>], "method">, z.ZodObject<{
|
|
421
421
|
kind: z.ZodLiteral<"result">;
|
|
@@ -424,7 +424,7 @@ export declare const messageSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion
|
|
|
424
424
|
optimizer: z.ZodPreprocess<z.ZodEnum<{
|
|
425
425
|
"training.population": "training.population";
|
|
426
426
|
"dspy.GEPA": "dspy.GEPA";
|
|
427
|
-
}
|
|
427
|
+
}>, unknown>;
|
|
428
428
|
dspyVersion: z.ZodLiteral<"3.3.1">;
|
|
429
429
|
gepaVersion: z.ZodLiteral<"0.1.4">;
|
|
430
430
|
seed: z.ZodNumber;
|
|
@@ -501,7 +501,7 @@ export declare const messageSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion
|
|
|
501
501
|
text: z.ZodOptional<z.ZodString>;
|
|
502
502
|
}, z.core.$strict>>;
|
|
503
503
|
}, z.core.$strict>;
|
|
504
|
-
schema: z.ZodPreprocess<z.ZodLiteral<"spawnfile.training.dspy.v2"
|
|
504
|
+
schema: z.ZodPreprocess<z.ZodLiteral<"spawnfile.training.dspy.v2">, unknown>;
|
|
505
505
|
id: z.ZodString;
|
|
506
506
|
}, z.core.$strict>, z.ZodObject<{
|
|
507
507
|
kind: z.ZodLiteral<"error">;
|
|
@@ -509,7 +509,7 @@ export declare const messageSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion
|
|
|
509
509
|
code: z.ZodString;
|
|
510
510
|
message: z.ZodString;
|
|
511
511
|
}, z.core.$strict>;
|
|
512
|
-
schema: z.ZodPreprocess<z.ZodLiteral<"spawnfile.training.dspy.v2"
|
|
512
|
+
schema: z.ZodPreprocess<z.ZodLiteral<"spawnfile.training.dspy.v2">, unknown>;
|
|
513
513
|
id: z.ZodString;
|
|
514
514
|
}, z.core.$strict>]>;
|
|
515
515
|
export type DspyStart = z.infer<typeof startSchema>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spawnfile",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.30",
|
|
4
4
|
"description": "Canonical source compiler for autonomous agents and teams.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"test:verdict": "node -e \"const fs=require('fs'); const file='coverage/vitest-results.json'; if (!fs.existsSync(file)) { console.error('VERDICT: results file missing'); process.exit(1); } let result; try { result=JSON.parse(fs.readFileSync(file, 'utf8')); } catch { console.error('VERDICT: results file unparseable'); process.exit(1); } const total=result.numTotalTests; const totalSuites=result.numTotalTestSuites; const passedTests=result.numPassedTests; const failedTests=result.numFailedTests; const pendingTests=result.numPendingTests; const todoTests=result.numTodoTests; const failedSuites=result.numFailedTestSuites; if (typeof result.success !== 'boolean' || !Number.isInteger(passedTests) || passedTests < 0 || !Number.isInteger(failedTests) || failedTests < 0 || !Number.isInteger(pendingTests) || pendingTests < 0 || !Number.isInteger(todoTests) || todoTests < 0 || !Number.isInteger(failedSuites) || failedSuites < 0 || !Number.isInteger(totalSuites) || totalSuites < 0) { console.error('VERDICT: results schema unrecognised'); process.exit(1); } if (!Number.isInteger(total) || total <= 0) { console.error('VERDICT: no tests found'); process.exit(1); } if (passedTests + failedTests + pendingTests + todoTests !== total) { console.error('VERDICT: results counters do not reconcile (tests='+total+', passed='+passedTests+', failed='+failedTests+', skipped='+pendingTests+', todo='+todoTests+')'); process.exit(1); } const failed=result.success === false || failedTests > 0 || failedSuites > 0; if (failed) { console.error('VERDICT: test failures found (tests='+failedTests+', suites='+failedSuites+', success='+result.success+')'); process.exit(2); } if (passedTests === 0) { console.error('VERDICT: no tests actually ran (skipped='+pendingTests+', todo='+todoTests+')'); process.exit(1); } console.log('VERDICT: tests passed (tests='+total+', suites='+totalSuites+', passed='+passedTests+', skipped='+pendingTests+', todo='+todoTests+')');\"",
|
|
57
57
|
"test:coverage-verdict": "node --import tsx -e \"import fs from 'node:fs'; const file='coverage/coverage-summary.json'; const fail=(message)=>{ console.error('COVERAGE VERDICT: '+message); process.exit(1); }; let summary; try { summary=JSON.parse(fs.readFileSync(file, 'utf8')); } catch (error) { fail(error && error.code === 'ENOENT' ? 'summary file missing' : 'summary file unparseable'); } import('./vitest.config.ts').then(({default:config})=>{ const thresholds=config.test && config.test.coverage && config.test.coverage.thresholds; if (!thresholds || typeof thresholds !== 'object' || !summary || typeof summary !== 'object' || !summary.total || typeof summary.total !== 'object') fail('summary or threshold schema unrecognised'); const metricNames=['branches','functions','lines','statements']; const metrics=metricNames.filter((metric)=>Object.prototype.hasOwnProperty.call(thresholds, metric)); if (metrics.length === 0) fail('no threshold metrics configured'); let shortfall=false; for (const metric of metrics) { const threshold=thresholds[metric]; const pct=summary.total[metric] && summary.total[metric].pct; if (typeof threshold !== 'number' || !Number.isFinite(threshold) || typeof pct !== 'number' || !Number.isFinite(pct)) fail('missing or non-numeric value for '+metric); console.log('COVERAGE: '+metric+' '+pct+'% (threshold '+threshold+'%)'); if (pct < threshold) shortfall=true; } if (shortfall) { console.error('COVERAGE VERDICT: thresholds not met'); process.exit(2); } console.log('COVERAGE VERDICT: thresholds met'); }).catch((error)=>fail('could not load vitest config: '+error.message));\"",
|
|
58
58
|
"test:node": "mkdir -p coverage || exit 1; rm -f coverage/node-test.tap || exit 1; node --import tsx --test --test-reporter=tap src/runtime/pi/appControlDeliveryMetadata.test.ts > coverage/node-test.tap 2>&1; node_status=$?; cat coverage/node-test.tap; cat_status=$?; npm run test:node-verdict; verdict_status=$?; if [ \"$verdict_status\" -eq 2 ]; then exit 2; fi; if [ \"$verdict_status\" -ne 0 ]; then exit 1; fi; if [ \"$cat_status\" -ne 0 ]; then echo 'NODE VERDICT: could not read TAP output' >&2; exit 1; fi; if [ \"$node_status\" -ne 0 ]; then echo \"NODE VERDICT: node:test runner exited $node_status despite a passing TAP summary\" >&2; exit 1; fi; exit 0",
|
|
59
|
-
"test:node-verdict": "node -e \"const fs=require('fs'); const text=fs.readFileSync('coverage/node-test.tap', 'utf8'); const tests=text.match(/^# tests ([0-9]+)\\r?$/m); const suites=text.match(/^# suites ([0-9]+)\\r?$/m); const passed=text.match(/^# pass ([0-9]+)\\r?$/m); const failed=text.match(/^# fail ([0-9]+)\\r?$/m); const skipped=text.match(/^# skipped ([0-9]+)\\r?$/m); const todo=text.match(/^# todo ([0-9]+)\\r?$/m); const cancelled=text.match(/^# cancelled ([0-9]+)\\r?$/m); if (!tests || !suites || !passed || !failed || !skipped || !todo || !cancelled) { console.error('NODE VERDICT: TAP summary unrecognised'); process.exit(1); } const testCount=Number(tests[1]); const suiteCount=Number(suites[1]); const passCount=Number(passed[1]); const failCount=Number(failed[1]); const skippedCount=Number(skipped[1]); const todoCount=Number(todo[1]); const cancelledCount=Number(cancelled[1]); if (failCount > 0) { console.error('NODE VERDICT: test failures found (tests='+testCount+', failed='+failCount+')'); process.exit(2); } if (cancelledCount > 0) { console.error('NODE VERDICT: incomplete run (cancelled='+cancelledCount+')'); process.exit(1); } if (passCount + skippedCount + todoCount + cancelledCount !== testCount) { console.error('NODE VERDICT: TAP counts do not reconcile (tests='+testCount+', passed='+passCount+', skipped='+skippedCount+', todo='+todoCount+', cancelled='+cancelledCount+')'); process.exit(1); } if (testCount < 10) { console.error('NODE VERDICT: expected at least 10 node:test cases, found '+testCount+'
|
|
59
|
+
"test:node-verdict": "node -e \"const fs=require('fs'); const text=fs.readFileSync('coverage/node-test.tap', 'utf8'); const tests=text.match(/^# tests ([0-9]+)\\r?$/m); const suites=text.match(/^# suites ([0-9]+)\\r?$/m); const passed=text.match(/^# pass ([0-9]+)\\r?$/m); const failed=text.match(/^# fail ([0-9]+)\\r?$/m); const skipped=text.match(/^# skipped ([0-9]+)\\r?$/m); const todo=text.match(/^# todo ([0-9]+)\\r?$/m); const cancelled=text.match(/^# cancelled ([0-9]+)\\r?$/m); if (!tests || !suites || !passed || !failed || !skipped || !todo || !cancelled) { console.error('NODE VERDICT: TAP summary unrecognised'); process.exit(1); } const testCount=Number(tests[1]); const suiteCount=Number(suites[1]); const passCount=Number(passed[1]); const failCount=Number(failed[1]); const skippedCount=Number(skipped[1]); const todoCount=Number(todo[1]); const cancelledCount=Number(cancelled[1]); if (failCount > 0) { console.error('NODE VERDICT: test failures found (tests='+testCount+', failed='+failCount+')'); process.exit(2); } if (cancelledCount > 0) { console.error('NODE VERDICT: incomplete run (cancelled='+cancelledCount+')'); process.exit(1); } if (passCount + skippedCount + todoCount + cancelledCount !== testCount) { console.error('NODE VERDICT: TAP counts do not reconcile (tests='+testCount+', passed='+passCount+', skipped='+skippedCount+', todo='+todoCount+', cancelled='+cancelledCount+')'); process.exit(1); } if (testCount < 10) { console.error('NODE VERDICT: expected at least 10 node:test cases, found '+testCount+' — cases were removed or the file was gutted'); process.exit(1); } if (passCount < 10) { console.error('NODE VERDICT: expected at least 10 passing node:test cases, found '+passCount+' (skipped='+skippedCount+', todo='+todoCount+')'); process.exit(1); } if (suiteCount < 1) { console.error('NODE VERDICT: expected at least 1 node:test suite, found '+suiteCount); process.exit(1); } console.log('NODE VERDICT: tests passed (tests='+testCount+', suites='+suiteCount+', passed='+passCount+', skipped='+skippedCount+', todo='+todoCount+', failed=0)');\"",
|
|
60
60
|
"verify:training-image-modes": "tsx scripts/verify-training-image-modes.ts",
|
|
61
61
|
"test:product-state-volume": "node --experimental-strip-types scripts/product-state-volume-integration.test.ts",
|
|
62
62
|
"test:boundaries": "vitest run --coverage.enabled=false src/ownership/rootOwnershipBoundary.test.ts src/deployment/providerRuntimeBoundary.test.ts src/ownership/mnemePublicImportBoundary.test.ts src/target/containerBundleArchive.test.ts",
|
|
@@ -80,9 +80,9 @@
|
|
|
80
80
|
"commander": "^14.0.1",
|
|
81
81
|
"mdast-util-from-markdown": "2.0.3",
|
|
82
82
|
"mdast-util-to-string": "4.0.0",
|
|
83
|
-
"undici": "7.
|
|
83
|
+
"undici": "7.30.1",
|
|
84
84
|
"yaml": "^2.8.1",
|
|
85
|
-
"zod": "^4.
|
|
85
|
+
"zod": "^4.6.7"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
88
|
"@eslint/js": "10.0.1",
|
package/runtimes.yaml
CHANGED
|
@@ -13,17 +13,17 @@
|
|
|
13
13
|
runtimes:
|
|
14
14
|
daimon:
|
|
15
15
|
remote: git@github.com:noopolis/daimon-harness.git
|
|
16
|
-
ref:
|
|
16
|
+
ref: 0f2e73b4794f9ad03173b05a99486a5459715d4c
|
|
17
17
|
default_branch: main
|
|
18
18
|
install:
|
|
19
19
|
kind: container_image
|
|
20
20
|
image: noopolis/spawnfile-runtime-daimon
|
|
21
|
-
tag: 0.2.
|
|
22
|
-
digest: sha256:
|
|
21
|
+
tag: 0.2.10-0f2e73b
|
|
22
|
+
digest: sha256:3e9743eaeb8ebae529e8e2768320695e97dc73bb5d639ffa6e2a479d3db81dbd
|
|
23
23
|
capability_receipts:
|
|
24
|
-
amd64: sha256:
|
|
25
|
-
arm64: sha256:
|
|
26
|
-
contract_manifest_sha256: sha256:
|
|
24
|
+
amd64: sha256:87648523888cf96773cdee733d819def3aaa43fa2626e0f945b841fc2313edd0
|
|
25
|
+
arm64: sha256:e714abca4ba1bb9e2ea13fcb0620aba7a3b3b3a6d002c09bf9857a720a5fc34d
|
|
26
|
+
contract_manifest_sha256: sha256:85de96d75cf1e02e0e88bd6e1dcce39a125c1d5b97f1eb9c01911a0d5c3316e8
|
|
27
27
|
status: active
|
|
28
28
|
|
|
29
29
|
openclaw:
|