omnius 1.0.923 → 1.0.925
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/{providerRegistry.d.ts → _types/backend-vllm/providerRegistry.d.ts} +0 -1
- package/dist/_types/backend-vllm/types.d.ts +209 -0
- package/dist/_types/execution/av/media-capability.d.ts +94 -0
- package/dist/_types/execution/delegation-contract.d.ts +102 -0
- package/dist/_types/execution/evidence.d.ts +68 -0
- package/dist/_types/execution/html-source-evidence.d.ts +65 -0
- package/dist/_types/execution/mcp/types.d.ts +169 -0
- package/dist/_types/execution/mutation-contract.d.ts +102 -0
- package/dist/_types/execution/nol/artifacts.d.ts +39 -0
- package/dist/_types/execution/nol/checkpoint-edits.d.ts +98 -0
- package/dist/_types/execution/nol/distributions.d.ts +128 -0
- package/dist/_types/execution/nol/gguf-checkpoint-edits.d.ts +194 -0
- package/dist/_types/execution/nol/gguf-control-reader.d.ts +224 -0
- package/dist/_types/execution/nol/lora-exports.d.ts +129 -0
- package/dist/_types/execution/nol/neuronary.d.ts +212 -0
- package/dist/_types/execution/nol/pytorch-control-reader.d.ts +143 -0
- package/dist/_types/execution/nol/qwen35-head-sites.d.ts +61 -0
- package/dist/_types/execution/nol/worker-assets.d.ts +82 -0
- package/dist/_types/execution/nol/worker-protocol.d.ts +94 -0
- package/dist/_types/execution/page-content-source.d.ts +40 -0
- package/dist/_types/execution/rapid-computer-use/artifact-store.d.ts +21 -0
- package/dist/_types/execution/rapid-computer-use/contracts.d.ts +320 -0
- package/dist/_types/execution/rapid-computer-use/decision.d.ts +70 -0
- package/dist/_types/execution/rapid-computer-use/desktop-verification.d.ts +23 -0
- package/dist/_types/execution/rapid-computer-use/geometry.d.ts +57 -0
- package/dist/_types/execution/rapid-computer-use/planner.d.ts +78 -0
- package/dist/_types/execution/rapid-computer-use/trace.d.ts +80 -0
- package/dist/_types/execution/rapid-computer-use/visual.d.ts +48 -0
- package/dist/_types/execution/shell-runs.d.ts +78 -0
- package/dist/_types/execution/streamed-web-source.d.ts +64 -0
- package/dist/_types/execution/tools/browser-page-fallback.d.ts +25 -0
- package/dist/_types/execution/tools/network-egress-policy.d.ts +30 -0
- package/dist/_types/execution/tools/pdf-native-tables.d.ts +46 -0
- package/dist/_types/execution/tools/todo-store.d.ts +133 -0
- package/dist/_types/execution/tools/web-fetch.d.ts +57 -0
- package/dist/_types/execution/tools/workboard.d.ts +1223 -0
- package/dist/_types/execution/types.d.ts +549 -0
- package/dist/_types/execution/web-source.d.ts +14 -0
- package/dist/_types/memory/artifactReviewSourceIndex.d.ts +133 -0
- package/dist/_types/memory/contextMemoryLedger.d.ts +213 -0
- package/dist/_types/memory/db.d.ts +12 -0
- package/dist/_types/memory/embeddings.d.ts +36 -0
- package/dist/_types/memory/immutableEvidenceStore.d.ts +165 -0
- package/dist/_types/memory/memoryIngestion.d.ts +65 -0
- package/dist/_types/memory/memoryTypes.d.ts +312 -0
- package/dist/_types/memory/sourceCorpusStore.d.ts +331 -0
- package/dist/_types/memory/structuredMemoryStore.d.ts +105 -0
- package/dist/_types/memory/unifiedMemoryStore.d.ts +127 -0
- package/dist/_types/memory/virtualMemory.d.ts +187 -0
- package/dist/_types/orchestrator/agentic-page-content-receipt.d.ts +20 -0
- package/dist/_types/orchestrator/agentic-web-fetch-receipt.d.ts +20 -0
- package/dist/_types/orchestrator/agenticRunner.d.ts +5219 -0
- package/dist/_types/orchestrator/app-state.d.ts +171 -0
- package/dist/_types/orchestrator/artifactClaimCritic.d.ts +63 -0
- package/dist/_types/orchestrator/artifactQuality.d.ts +15 -0
- package/dist/_types/orchestrator/artifactSemanticIntegrity.d.ts +203 -0
- package/dist/_types/orchestrator/canonical-context-projection.d.ts +254 -0
- package/dist/_types/orchestrator/canonical-source-body-projection.d.ts +51 -0
- package/dist/_types/orchestrator/completion-review-pending.d.ts +24 -0
- package/dist/_types/orchestrator/completionContract.d.ts +103 -0
- package/dist/_types/orchestrator/completionFinalization.d.ts +224 -0
- package/dist/_types/orchestrator/completionLedger.d.ts +429 -0
- package/dist/_types/orchestrator/completionReadiness.d.ts +234 -0
- package/dist/_types/orchestrator/context-admission.d.ts +93 -0
- package/dist/_types/orchestrator/context-dump-retention.d.ts +25 -0
- package/dist/_types/orchestrator/context-fabric.d.ts +133 -0
- package/dist/_types/orchestrator/contextEngine.d.ts +68 -0
- package/dist/_types/orchestrator/contextWindowDump.d.ts +327 -0
- package/dist/_types/orchestrator/convergence-breaker.d.ts +225 -0
- package/dist/_types/orchestrator/convergence-progress.d.ts +66 -0
- package/dist/_types/orchestrator/deliveryCoverage.d.ts +181 -0
- package/dist/_types/orchestrator/document-persistence-goal-binding.d.ts +106 -0
- package/dist/_types/orchestrator/durable-document-worker.d.ts +85 -0
- package/dist/_types/orchestrator/evidenceBranch.d.ts +291 -0
- package/dist/_types/orchestrator/expected-inference-response.d.ts +55 -0
- package/dist/_types/orchestrator/expectedOutcomeContract.d.ts +58 -0
- package/dist/_types/orchestrator/failure-taxonomy.d.ts +36 -0
- package/dist/_types/orchestrator/focusSupervisor.d.ts +436 -0
- package/dist/_types/orchestrator/forced-update-requirement-recovery.d.ts +105 -0
- package/dist/_types/orchestrator/hooks.d.ts +100 -0
- package/dist/_types/orchestrator/inference-pressure.d.ts +61 -0
- package/dist/_types/orchestrator/integrationClosure.d.ts +89 -0
- package/dist/_types/orchestrator/interruption-lifecycle.d.ts +154 -0
- package/dist/_types/orchestrator/live-memory-passages.d.ts +51 -0
- package/dist/_types/orchestrator/liveVirtualContext.d.ts +84 -0
- package/dist/_types/orchestrator/memory-compiler.d.ts +254 -0
- package/dist/_types/orchestrator/memory-consolidation.d.ts +134 -0
- package/dist/_types/orchestrator/model-router.d.ts +17 -0
- package/dist/_types/orchestrator/modelResponseDiagnostics.d.ts +71 -0
- package/dist/_types/orchestrator/nativeRequirementAmendment.d.ts +63 -0
- package/dist/_types/orchestrator/nol/coordinator.d.ts +204 -0
- package/dist/_types/orchestrator/nol/datasets.d.ts +58 -0
- package/dist/_types/orchestrator/nol/discovery.d.ts +286 -0
- package/dist/_types/orchestrator/nol/evaluation.d.ts +59 -0
- package/dist/_types/orchestrator/nol/model-validation.d.ts +198 -0
- package/dist/_types/orchestrator/nol/statistics.d.ts +142 -0
- package/dist/_types/orchestrator/nol/store.d.ts +133 -0
- package/dist/_types/orchestrator/nol/variant-registry.d.ts +292 -0
- package/dist/_types/orchestrator/ollama-context-policy.d.ts +34 -0
- package/dist/_types/orchestrator/personality.d.ts +66 -0
- package/dist/_types/orchestrator/prompt-cache.d.ts +24 -0
- package/dist/_types/orchestrator/remote-inference-fallback.d.ts +224 -0
- package/dist/_types/orchestrator/remote-inference-policy.d.ts +58 -0
- package/dist/_types/orchestrator/request-budget.d.ts +75 -0
- package/dist/_types/orchestrator/requirementCoverage.d.ts +69 -0
- package/dist/_types/orchestrator/reviewedInterpretation.d.ts +111 -0
- package/dist/_types/orchestrator/runEvents.d.ts +115 -0
- package/dist/_types/orchestrator/runtime-rollout.d.ts +63 -0
- package/dist/_types/orchestrator/semanticVerification.d.ts +135 -0
- package/dist/_types/orchestrator/source-wide-extraction.d.ts +202 -0
- package/dist/_types/orchestrator/steeringIntake.d.ts +123 -0
- package/dist/_types/orchestrator/structured-memory-extraction-worker.d.ts +89 -0
- package/dist/_types/orchestrator/structuredMemoryInference.d.ts +62 -0
- package/dist/_types/orchestrator/successful-procedure-memory.d.ts +127 -0
- package/dist/_types/orchestrator/supportedAnswer.d.ts +68 -0
- package/dist/_types/orchestrator/taskEffectEvidence.d.ts +38 -0
- package/dist/_types/orchestrator/taskExecutionSnapshot.d.ts +67 -0
- package/dist/_types/orchestrator/taskObjective.d.ts +310 -0
- package/dist/_types/orchestrator/taskObjectiveContinuation.d.ts +134 -0
- package/dist/_types/orchestrator/taskRequirementReview.d.ts +246 -0
- package/dist/_types/orchestrator/taskRequirements.d.ts +80 -0
- package/dist/_types/orchestrator/taskSemanticAdmission.d.ts +159 -0
- package/dist/_types/orchestrator/taskWorkDelegation.d.ts +147 -0
- package/dist/_types/orchestrator/taskWorkPlan.d.ts +177 -0
- package/dist/_types/orchestrator/telegram-passive-history.d.ts +42 -0
- package/dist/_types/orchestrator/terminalTaskReport.d.ts +91 -0
- package/dist/_types/orchestrator/todoObservability.d.ts +147 -0
- package/dist/_types/orchestrator/tool-exposure-policy.d.ts +100 -0
- package/dist/_types/orchestrator/trajectory-checkpoint.d.ts +159 -0
- package/dist/_types/orchestrator/types.d.ts +185 -0
- package/dist/_types/schemas/dispatch.d.ts +53 -0
- package/dist/_types/schemas/feature-workflow.d.ts +362 -0
- package/dist/_types/schemas/messages.d.ts +15 -0
- package/dist/_types/schemas/nol-assets.d.ts +955 -0
- package/dist/_types/schemas/nol-json.d.ts +2 -0
- package/dist/_types/schemas/nol.d.ts +3995 -0
- package/dist/_types/schemas/patch.d.ts +47 -0
- package/dist/_types/schemas/plan.d.ts +47 -0
- package/dist/_types/schemas/repoProfile.d.ts +116 -0
- package/dist/_types/schemas/retrieval.d.ts +44 -0
- package/dist/_types/schemas/task.d.ts +57 -0
- package/dist/_types/schemas/tools.d.ts +16 -0
- package/dist/_types/schemas/verification.d.ts +31 -0
- package/dist/api/py-embed.js +3353 -1829
- package/dist/assets/nol-checkpoint-editor.py +701 -0
- package/dist/assets/nol-gguf-checkpoint-editor.py +785 -0
- package/dist/assets/nol-gguf-control-reader.py +428 -0
- package/dist/assets/nol-gne-tools-worker.py +425 -0
- package/dist/assets/nol-gne-worker.py +1081 -0
- package/dist/assets/nol-lora-exporter.py +349 -0
- package/dist/assets/nol-pytorch-control-reader.py +470 -0
- package/dist/assets/nol-transformers-nnsight-worker.py +512 -0
- package/dist/assets/nol-transformers-peft-validation-worker.py +385 -0
- package/dist/assets/nol-transformers-peft-worker.py +488 -0
- package/dist/assets/nol-transformers-research-worker.py +472 -0
- package/dist/assets/nol-transformers-worker.py +920 -0
- package/dist/assets/nol-vllm-owned-worker.py +803 -0
- package/dist/assets/nol-vllm-runtime.py +695 -0
- package/dist/assets/nol-vllm-tokenizer.py +93 -0
- package/dist/assets/nol-vllm-worker.py +201 -0
- package/dist/computer-use/configured-planner.d.ts +37 -0
- package/dist/computer-use/configured-point.d.ts +35 -0
- package/dist/computer-use/host-session.d.ts +60 -0
- package/dist/computer-use/runner-ui-port.d.ts +37 -0
- package/dist/computer-use/session-review.d.ts +14 -0
- package/dist/computer-use/task-spec.d.ts +84 -0
- package/dist/discovery.d.ts +16 -2
- package/dist/index.js +2 -2
- package/dist/library.d.ts +94 -10
- package/dist/library.js +144003 -87414
- package/dist/memory-maintenance-worker.js +1676 -511
- package/dist/nol/cpu-control-reader-profile.d.ts +93 -0
- package/dist/nol/cpu-control-reader-service.d.ts +87 -0
- package/dist/nol/cuda-lease.d.ts +111 -0
- package/dist/nol/cuda-mutations.d.ts +34 -0
- package/dist/nol/export-runtime-config.d.ts +114 -0
- package/dist/nol/export-service.d.ts +143 -0
- package/dist/nol/facade.d.ts +147 -0
- package/dist/nol/gguf-cpu-control-reader-profile.d.ts +106 -0
- package/dist/nol/gguf-cpu-control-reader-service.d.ts +91 -0
- package/dist/nol/gguf-model-control-verifier.d.ts +120 -0
- package/dist/nol/gguf-parameter-inventory.d.ts +28 -0
- package/dist/nol/gne-adapter.d.ts +134 -0
- package/dist/nol/gne-agent-evaluation.d.ts +84 -0
- package/dist/nol/gne-profile.d.ts +124 -0
- package/dist/nol/gne-tools-profile.d.ts +148 -0
- package/dist/nol/gne-tools-transport.d.ts +194 -0
- package/dist/nol/model-actions.d.ts +662 -0
- package/dist/nol/model-control-verifier.d.ts +135 -0
- package/dist/nol/model-json-scorer.d.ts +13 -0
- package/dist/nol/model-runtime-config.d.ts +830 -0
- package/dist/nol/model-serving.d.ts +130 -0
- package/dist/nol/model-subject-adapter.d.ts +72 -0
- package/dist/nol/model-validation-factory.d.ts +113 -0
- package/dist/nol/neuronary-catalog.d.ts +130 -0
- package/dist/nol/orphan-custody.d.ts +72 -0
- package/dist/nol/peft-conformance.d.ts +48 -0
- package/dist/nol/peft-control-types.d.ts +137 -0
- package/dist/nol/peft-control-verifier.d.ts +8 -0
- package/dist/nol/peft-model-actions.d.ts +41 -0
- package/dist/nol/peft-model-authority.d.ts +146 -0
- package/dist/nol/peft-model-controls.d.ts +20 -0
- package/dist/nol/peft-model-host.d.ts +47 -0
- package/dist/nol/peft-model-profile.d.ts +161 -0
- package/dist/nol/peft-model-runtime-config.d.ts +174 -0
- package/dist/nol/peft-model-subject-adapter.d.ts +36 -0
- package/dist/nol/peft-validation.d.ts +105 -0
- package/dist/nol/persistent-parameter-inventory.d.ts +32 -0
- package/dist/nol/runtime.d.ts +100 -0
- package/dist/nol/sqlite-store.d.ts +80 -0
- package/dist/nol/transformers-adapter.d.ts +119 -0
- package/dist/nol/transformers-nnsight.d.ts +87 -0
- package/dist/nol/transformers-peft.d.ts +107 -0
- package/dist/nol/transformers-research.d.ts +114 -0
- package/dist/nol/variant-service.d.ts +143 -0
- package/dist/nol/variant-store.d.ts +51 -0
- package/dist/nol/vllm-actions.d.ts +774 -0
- package/dist/nol/vllm-adapter.d.ts +1473 -0
- package/dist/nol/vllm-authority.d.ts +55 -0
- package/dist/nol/vllm-conformance.d.ts +662 -0
- package/dist/nol/vllm-profile.d.ts +850 -0
- package/dist/nol/vllm-protocol.d.ts +1505 -0
- package/dist/nol/vllm-runtime-config.d.ts +120 -0
- package/dist/nol/vllm-runtime.d.ts +34 -0
- package/dist/nol/vllm-startup.d.ts +235 -0
- package/dist/omni-setup-worker.js +3433 -1909
- package/dist/service-version.d.ts +0 -1
- package/dist/tui/async-process.d.ts +27 -0
- package/dist/tui/native/worker.js +3 -1
- package/dist/tui/telegram-action-session-registry.d.ts +136 -0
- package/dist/tui/telegram-cognition-queue.d.ts +154 -0
- package/dist/tui/telegram-context-packet-v2.d.ts +99 -0
- package/dist/tui/telegram-input-ownership.d.ts +78 -0
- package/dist/tui/telegram-turn-contract-v2.d.ts +62 -0
- package/dist/update-worker-runtime.js +4216 -2603
- package/docs/DISCOVERY.json +389 -0
- package/docs/DISCOVERY.md +4 -0
- package/npm-shrinkwrap.json +28 -12
- package/package.json +3 -2
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { type NolArtifactRef, type NolBackendCapabilities, type NolDatasetSplitManifest, type NolImplementationReceipt, type NolModelManifest, type NolTrialResult } from "../../schemas/nol.js";
|
|
2
|
+
import { type NolModelSubject, type NolModelValidationPlan, type NolModelValidationReceipt } from "../../schemas/nol-assets.js";
|
|
3
|
+
import { type NolPairedComparisonPlan } from "./statistics.js";
|
|
4
|
+
import type { NolArtifactPublisher, NolComputeSettlement } from "./coordinator.js";
|
|
5
|
+
import type { NolJob, NolStore, NolTrialAttempt } from "./store.js";
|
|
6
|
+
export declare const NOL_MODEL_VALIDATION_KIND = "nol_model_validation";
|
|
7
|
+
export declare function nolAssetRecordDigest(value: unknown): string;
|
|
8
|
+
export declare function sealNolAssetRecord<T>(value: T): T;
|
|
9
|
+
export declare function assertNolAssetRecordDigest(value: unknown): void;
|
|
10
|
+
export interface NolModelValidationArtifacts {
|
|
11
|
+
verify(ref: NolArtifactRef, signal?: AbortSignal): Promise<void>;
|
|
12
|
+
readBytes(ref: NolArtifactRef, signal?: AbortSignal): Promise<Uint8Array>;
|
|
13
|
+
putBytes(bytes: Uint8Array, mediaType: string): Promise<NolArtifactRef>;
|
|
14
|
+
}
|
|
15
|
+
export interface NolModelJobContext {
|
|
16
|
+
signal: AbortSignal;
|
|
17
|
+
assertCurrent(): void;
|
|
18
|
+
artifacts: NolArtifactPublisher;
|
|
19
|
+
ownership: Readonly<{
|
|
20
|
+
jobId: string;
|
|
21
|
+
ownerId: string;
|
|
22
|
+
generation: number;
|
|
23
|
+
}>;
|
|
24
|
+
}
|
|
25
|
+
export interface NolModelLiveProof {
|
|
26
|
+
assertCurrent(): void;
|
|
27
|
+
}
|
|
28
|
+
export interface NolResolvedModelSubject {
|
|
29
|
+
subject: NolModelSubject;
|
|
30
|
+
asset: NolModelManifest;
|
|
31
|
+
runtimeModel: NolModelManifest;
|
|
32
|
+
parents: NolModelManifest[];
|
|
33
|
+
}
|
|
34
|
+
/** Trusted host adapter channel. Construction/verification is inert. Each
|
|
35
|
+
* instance binds exactly one subject; operations are ALWAYS recipe:null.
|
|
36
|
+
* A native implementation must gate its zero-token load, and settle even an
|
|
37
|
+
* aborted/ignored in-flight request before returning physical cleanup proof. */
|
|
38
|
+
export interface NolModelSubjectAdapter {
|
|
39
|
+
preflight(input: {
|
|
40
|
+
subject: NolResolvedModelSubject;
|
|
41
|
+
context: NolModelJobContext;
|
|
42
|
+
}): Promise<NolBackendCapabilities>;
|
|
43
|
+
countPromptTokens(input: {
|
|
44
|
+
subject: NolModelSubject;
|
|
45
|
+
prompt: Uint8Array;
|
|
46
|
+
promptArtifact: NolArtifactRef;
|
|
47
|
+
context: NolModelJobContext;
|
|
48
|
+
}): Promise<number>;
|
|
49
|
+
reset(input: {
|
|
50
|
+
subject: NolModelSubject;
|
|
51
|
+
context: NolModelJobContext;
|
|
52
|
+
}): Promise<NolArtifactRef>;
|
|
53
|
+
execute(input: {
|
|
54
|
+
subject: NolModelSubject;
|
|
55
|
+
recipe: null;
|
|
56
|
+
prompt: Uint8Array;
|
|
57
|
+
promptArtifact: NolArtifactRef;
|
|
58
|
+
seed: number;
|
|
59
|
+
maxTokens: number;
|
|
60
|
+
decoding: NolModelValidationPlan["decoding"];
|
|
61
|
+
cacheKeyDigest: string;
|
|
62
|
+
context: NolModelJobContext;
|
|
63
|
+
}): Promise<{
|
|
64
|
+
output: NolArtifactRef;
|
|
65
|
+
performance?: NolArtifactRef;
|
|
66
|
+
usage: NolTrialResult["usage"];
|
|
67
|
+
finishReason: string;
|
|
68
|
+
implementationReceipt: NolImplementationReceipt;
|
|
69
|
+
hardware?: NolTrialResult["hardware"];
|
|
70
|
+
}>;
|
|
71
|
+
settle(input: {
|
|
72
|
+
ownership: NolModelJobContext["ownership"];
|
|
73
|
+
artifacts: NolArtifactPublisher;
|
|
74
|
+
}): Promise<NolComputeSettlement>;
|
|
75
|
+
}
|
|
76
|
+
export interface NolModelValidationFactory {
|
|
77
|
+
/** Includes full native/runtime/profile bindings. No CUDA is allowed here. */
|
|
78
|
+
verifySubject(input: NolResolvedModelSubject, signal: AbortSignal): Promise<NolModelLiveProof>;
|
|
79
|
+
verifyControls(input: {
|
|
80
|
+
plan: NolModelValidationPlan;
|
|
81
|
+
subjects: NolResolvedModelSubject[];
|
|
82
|
+
}, signal: AbortSignal): Promise<NolModelLiveProof>;
|
|
83
|
+
/** Host-held disjoint final inventory, not a caller-supplied passed flag. */
|
|
84
|
+
verifyHeldOut(input: {
|
|
85
|
+
plan: NolModelValidationPlan;
|
|
86
|
+
dataset: NolDatasetSplitManifest;
|
|
87
|
+
}, signal: AbortSignal): Promise<NolModelLiveProof>;
|
|
88
|
+
create(subject: NolResolvedModelSubject): NolModelSubjectAdapter;
|
|
89
|
+
/** Read-only historical custody recovery; never loads/requeues a model. */
|
|
90
|
+
recoverPhysical?(job: NolJob, ownership: NolModelJobContext["ownership"], artifacts: NolArtifactPublisher, signal?: AbortSignal): Promise<NolComputeSettlement>;
|
|
91
|
+
/** Reopen/issuance checks consult genuine private native/cleanup custody.
|
|
92
|
+
* Generic store rows and serialized receipts alone must be rejected. */
|
|
93
|
+
verifyHistorical(input: {
|
|
94
|
+
phase: "issue" | "reopen";
|
|
95
|
+
job: NolJob;
|
|
96
|
+
plan: NolModelValidationPlan;
|
|
97
|
+
trials: NolTrialAttempt[];
|
|
98
|
+
settlement: NolArtifactRef;
|
|
99
|
+
validation: NolModelValidationReceipt;
|
|
100
|
+
}, signal: AbortSignal): Promise<NolModelLiveProof>;
|
|
101
|
+
}
|
|
102
|
+
export interface NolModelValidationScorer {
|
|
103
|
+
harnessDigest: string;
|
|
104
|
+
bindings: ReadonlyArray<{
|
|
105
|
+
metricId: string;
|
|
106
|
+
id: string;
|
|
107
|
+
digest: string;
|
|
108
|
+
}>;
|
|
109
|
+
score(input: {
|
|
110
|
+
plan: NolModelValidationPlan;
|
|
111
|
+
task: NolDatasetSplitManifest["tasks"][number];
|
|
112
|
+
prompt: Uint8Array;
|
|
113
|
+
expected: Uint8Array;
|
|
114
|
+
output: Uint8Array;
|
|
115
|
+
finishReason: string;
|
|
116
|
+
usage: NolTrialResult["usage"];
|
|
117
|
+
}): Promise<{
|
|
118
|
+
scores: NolTrialResult["scores"];
|
|
119
|
+
outcome: "completed" | "failed" | "inconclusive";
|
|
120
|
+
failureClass?: NolTrialResult["failureClass"];
|
|
121
|
+
}>;
|
|
122
|
+
}
|
|
123
|
+
export interface NolModelValidationLimits {
|
|
124
|
+
maxMetadataBytes: number;
|
|
125
|
+
maxUniqueInputBytes: number;
|
|
126
|
+
maxInputArtifacts: number;
|
|
127
|
+
leaseMs: number;
|
|
128
|
+
cleanupAllowanceBytes: number;
|
|
129
|
+
}
|
|
130
|
+
export interface NolModelValidationResult {
|
|
131
|
+
job: NolJob;
|
|
132
|
+
plan: NolArtifactRef;
|
|
133
|
+
comparison?: NolArtifactRef;
|
|
134
|
+
validation?: NolArtifactRef;
|
|
135
|
+
settlement?: NolArtifactRef;
|
|
136
|
+
trials: NolTrialAttempt[];
|
|
137
|
+
error?: string;
|
|
138
|
+
}
|
|
139
|
+
/** Exact archival-sidecar bridge. It never silently changes dtype, quantization,
|
|
140
|
+
* site geometry, tokenizer or template while adapting a loader's file grammar. */
|
|
141
|
+
export declare function assertNolModelSubjectBridge(input: NolResolvedModelSubject): void;
|
|
142
|
+
export declare function modelComparisonPlan(plan: NolModelValidationPlan, dataset: NolDatasetSplitManifest): NolPairedComparisonPlan;
|
|
143
|
+
/** Independent durable orchestration for persistent model/adapter subjects.
|
|
144
|
+
* It never constructs an experiment.v1 or represents an exported model as a recipe. */
|
|
145
|
+
export declare class NolModelValidationService {
|
|
146
|
+
private readonly options;
|
|
147
|
+
private active;
|
|
148
|
+
private recoveries;
|
|
149
|
+
private closing;
|
|
150
|
+
constructor(options: {
|
|
151
|
+
projectId: string;
|
|
152
|
+
ownerId: string;
|
|
153
|
+
store: NolStore;
|
|
154
|
+
artifacts: NolModelValidationArtifacts;
|
|
155
|
+
factory: NolModelValidationFactory;
|
|
156
|
+
scorer: NolModelValidationScorer;
|
|
157
|
+
limits: NolModelValidationLimits;
|
|
158
|
+
now?: () => number;
|
|
159
|
+
});
|
|
160
|
+
private now;
|
|
161
|
+
private frozen;
|
|
162
|
+
submit(input: unknown): NolJob;
|
|
163
|
+
run(jobId: string, grant: {
|
|
164
|
+
assertCurrent(): void;
|
|
165
|
+
signal?: AbortSignal;
|
|
166
|
+
}): Promise<NolModelValidationResult>;
|
|
167
|
+
cancel(jobId: string, reason?: string): NolJob;
|
|
168
|
+
stopOwned(): Promise<string[]>;
|
|
169
|
+
shutdown(): Promise<void>;
|
|
170
|
+
/** Stops an expired run and settles its original historical claim. Scientific
|
|
171
|
+
* trials are never replayed and the publication generation is never reused. */
|
|
172
|
+
recoverCleanup(jobId: string, grant: {
|
|
173
|
+
assertCurrent(): void;
|
|
174
|
+
signal?: AbortSignal;
|
|
175
|
+
}): Promise<NolJob>;
|
|
176
|
+
result(jobId: string): NolModelValidationResult;
|
|
177
|
+
/** Host-only metadata resolution for the actual private serving adapter. No
|
|
178
|
+
* experiment, model load, conformance grant or scientific success is inferred. */
|
|
179
|
+
resolveSubject(subjectInput: NolModelSubject, signal: AbortSignal): Promise<{
|
|
180
|
+
subject: NolResolvedModelSubject;
|
|
181
|
+
live: NolModelLiveProof;
|
|
182
|
+
}>;
|
|
183
|
+
private publisher;
|
|
184
|
+
private context;
|
|
185
|
+
private resolveInputs;
|
|
186
|
+
private taskBounds;
|
|
187
|
+
private settle;
|
|
188
|
+
private recoverOwned;
|
|
189
|
+
private execute;
|
|
190
|
+
/** Revalidates the real originating job and host-private native issuance.
|
|
191
|
+
* This result is a live host callback input, never a JSON bearer credential. */
|
|
192
|
+
verifyIssued(jobId: string, signal: AbortSignal): Promise<{
|
|
193
|
+
result: NolModelValidationResult;
|
|
194
|
+
plan: NolModelValidationPlan;
|
|
195
|
+
validation: NolModelValidationReceipt;
|
|
196
|
+
live: NolModelLiveProof;
|
|
197
|
+
}>;
|
|
198
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { type NolExperimentManifest, type NolTrialResult } from "../../schemas/nol.js";
|
|
2
|
+
import type { NolObservationStatus } from "./evaluation.js";
|
|
3
|
+
export interface NolStatisticalTrial {
|
|
4
|
+
taskId: string;
|
|
5
|
+
clusterId: string;
|
|
6
|
+
seed: number;
|
|
7
|
+
variant: "baseline" | "candidate";
|
|
8
|
+
status: NolObservationStatus;
|
|
9
|
+
metrics: Readonly<Record<string, number>>;
|
|
10
|
+
inputDigest?: string;
|
|
11
|
+
environmentDigest?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface NolMatchedPair {
|
|
14
|
+
taskId: string;
|
|
15
|
+
clusterId: string;
|
|
16
|
+
seed: number;
|
|
17
|
+
baseline: NolStatisticalTrial;
|
|
18
|
+
candidate: NolStatisticalTrial;
|
|
19
|
+
}
|
|
20
|
+
export interface NolPairIssue {
|
|
21
|
+
taskId: string;
|
|
22
|
+
seed: number;
|
|
23
|
+
code: string;
|
|
24
|
+
variant?: "baseline" | "candidate";
|
|
25
|
+
metric?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface NolMatchedTrials {
|
|
28
|
+
pairs: NolMatchedPair[];
|
|
29
|
+
issues: NolPairIssue[];
|
|
30
|
+
expectedPairCount: number;
|
|
31
|
+
}
|
|
32
|
+
export interface NolHardConstraint {
|
|
33
|
+
id: string;
|
|
34
|
+
metric: string;
|
|
35
|
+
direction: "maximize" | "minimize";
|
|
36
|
+
kind: "minimum" | "maximum" | "non_inferiority";
|
|
37
|
+
threshold: number;
|
|
38
|
+
}
|
|
39
|
+
export interface NolPairedComparisonPlan {
|
|
40
|
+
phase: "development" | "final_test";
|
|
41
|
+
decisionPoint: "fixed";
|
|
42
|
+
primaryMetric: string;
|
|
43
|
+
direction: "maximize" | "minimize";
|
|
44
|
+
minUsefulEffect: number;
|
|
45
|
+
absoluteTarget?: {
|
|
46
|
+
direction: "at_least" | "at_most";
|
|
47
|
+
value: number;
|
|
48
|
+
};
|
|
49
|
+
hardConstraints: readonly NolHardConstraint[];
|
|
50
|
+
alpha: number;
|
|
51
|
+
resamples: number;
|
|
52
|
+
seed: number;
|
|
53
|
+
weighting: "equal_tasks" | "equal_clusters";
|
|
54
|
+
missingPairPolicy: "inconclusive" | "fail";
|
|
55
|
+
minTasks: number;
|
|
56
|
+
minClusters: number;
|
|
57
|
+
maxIntervalWidth?: number;
|
|
58
|
+
jointErrorPolicy: "bonferroni";
|
|
59
|
+
comparisons: number;
|
|
60
|
+
/** Frozen task/seed inventory makes an entirely absent pair observable. */
|
|
61
|
+
expectedPairs?: readonly {
|
|
62
|
+
taskId: string;
|
|
63
|
+
clusterId: string;
|
|
64
|
+
seed: number;
|
|
65
|
+
}[];
|
|
66
|
+
}
|
|
67
|
+
export interface NolMetricComparison {
|
|
68
|
+
metric: string;
|
|
69
|
+
baselineMean: number;
|
|
70
|
+
candidateMean: number;
|
|
71
|
+
delta: number;
|
|
72
|
+
benefit: number;
|
|
73
|
+
benefitInterval: [
|
|
74
|
+
number,
|
|
75
|
+
number
|
|
76
|
+
];
|
|
77
|
+
candidateInterval: [
|
|
78
|
+
number,
|
|
79
|
+
number
|
|
80
|
+
];
|
|
81
|
+
}
|
|
82
|
+
export interface NolAcceptanceGate {
|
|
83
|
+
id: string;
|
|
84
|
+
kind: "primary_effect" | "absolute_minimum" | "absolute_maximum" | "non_inferiority";
|
|
85
|
+
metric: string;
|
|
86
|
+
threshold: number;
|
|
87
|
+
interval: [
|
|
88
|
+
number,
|
|
89
|
+
number
|
|
90
|
+
];
|
|
91
|
+
verdict: "pass" | "fail" | "inconclusive";
|
|
92
|
+
}
|
|
93
|
+
export interface NolPairedComparison {
|
|
94
|
+
method: "paired_cluster_percentile_bootstrap";
|
|
95
|
+
verdict: "pass" | "fail" | "inconclusive";
|
|
96
|
+
intervalMethod: "percentile_linear_interpolation";
|
|
97
|
+
intervalIsApproximation: true;
|
|
98
|
+
minimumExpectedTailDraws: number;
|
|
99
|
+
expectedTailDraws: number;
|
|
100
|
+
phase: "development" | "final_test";
|
|
101
|
+
finalDecision: boolean;
|
|
102
|
+
weighting: "equal_tasks" | "equal_clusters";
|
|
103
|
+
alpha: number;
|
|
104
|
+
perGateAlpha: number;
|
|
105
|
+
jointErrorPolicy: "bonferroni";
|
|
106
|
+
comparisons: number;
|
|
107
|
+
resamples: number;
|
|
108
|
+
seed: number;
|
|
109
|
+
pairCount: number;
|
|
110
|
+
expectedPairCount: number;
|
|
111
|
+
taskCount: number;
|
|
112
|
+
clusterCount: number;
|
|
113
|
+
repeatAggregation: "mean_within_task";
|
|
114
|
+
clusterResampling: "paired_source_clusters";
|
|
115
|
+
evidenceSufficient: boolean;
|
|
116
|
+
issues: string[];
|
|
117
|
+
pairIssues: NolPairIssue[];
|
|
118
|
+
metrics: NolMetricComparison[];
|
|
119
|
+
gates: NolAcceptanceGate[];
|
|
120
|
+
}
|
|
121
|
+
/** Fixed before examining outcomes; percentile intervals remain a finite-resample approximation. */
|
|
122
|
+
export declare const NOL_MIN_EXPECTED_BOOTSTRAP_TAIL_DRAWS = 10;
|
|
123
|
+
/** Retries must be adjudicated before this call; duplicate arms are never silently selected. */
|
|
124
|
+
export declare function matchTrialPairs(trials: readonly NolStatisticalTrial[], metrics: readonly string[], expectedPairs?: NolPairedComparisonPlan["expectedPairs"]): NolMatchedTrials;
|
|
125
|
+
/** Repeated seeds are averaged inside tasks; only independent source clusters are resampled. */
|
|
126
|
+
export declare function pairedClusterBootstrap(matched: NolMatchedTrials, plan: NolPairedComparisonPlan): NolPairedComparison;
|
|
127
|
+
export declare function comparePairedTrials(trials: readonly NolStatisticalTrial[], plan: NolPairedComparisonPlan): NolPairedComparison;
|
|
128
|
+
/** Canonical contract adapter; analysis checkpoints are single, predeclared decisions. */
|
|
129
|
+
export declare function comparisonPlanFromExperiment(input: NolExperimentManifest, expectedPairs?: NolPairedComparisonPlan["expectedPairs"]): NolPairedComparisonPlan;
|
|
130
|
+
/** Explicitly maps canonical trial failure classes; no infrastructure loss becomes a model failure. */
|
|
131
|
+
export declare function statisticalTrialFromResult(input: NolTrialResult): NolStatisticalTrial;
|
|
132
|
+
/** Development allocation only. No repeated final-test significance looks or confidence-based early claims. */
|
|
133
|
+
export declare function nextDevelopmentRepetitions(input: {
|
|
134
|
+
phase: "development" | "final_test";
|
|
135
|
+
currentCount: number;
|
|
136
|
+
increment: 5 | 10;
|
|
137
|
+
precisionMet: boolean;
|
|
138
|
+
}): {
|
|
139
|
+
nextCount: number;
|
|
140
|
+
stop: boolean;
|
|
141
|
+
reason: "initial" | "continue" | "precision_met" | "cap_reached";
|
|
142
|
+
};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/** Persistence boundary for NOL. Implementations own JSON integrity and atomic
|
|
2
|
+
* state changes; coordinators own filesystem verification and compute custody. */
|
|
3
|
+
export type NolJsonValue = null | boolean | number | string | NolJsonValue[] | {
|
|
4
|
+
[key: string]: NolJsonValue;
|
|
5
|
+
};
|
|
6
|
+
export interface NolImmutableDocument<T = unknown> {
|
|
7
|
+
kind: string;
|
|
8
|
+
id: string;
|
|
9
|
+
payload: T;
|
|
10
|
+
sha256: string;
|
|
11
|
+
createdAtMs: number;
|
|
12
|
+
}
|
|
13
|
+
export type NolJobStatus = "queued" | "running" | "cancel_requested" | "cancelled" | "completed" | "failed" | "inconclusive";
|
|
14
|
+
export interface NolJob {
|
|
15
|
+
id: string;
|
|
16
|
+
kind: string;
|
|
17
|
+
manifestSha256: string;
|
|
18
|
+
payload: unknown;
|
|
19
|
+
inputSha256: string;
|
|
20
|
+
status: NolJobStatus;
|
|
21
|
+
ownerId: string | null;
|
|
22
|
+
generation: number;
|
|
23
|
+
leaseUntilMs: number | null;
|
|
24
|
+
/** A publication fence can advance while an old worker still needs cleanup. */
|
|
25
|
+
cleanupGeneration: number | null;
|
|
26
|
+
createdAtMs: number;
|
|
27
|
+
updatedAtMs: number;
|
|
28
|
+
}
|
|
29
|
+
export interface NolJobLease {
|
|
30
|
+
jobId: string;
|
|
31
|
+
ownerId: string;
|
|
32
|
+
generation: number;
|
|
33
|
+
leaseUntilMs: number;
|
|
34
|
+
}
|
|
35
|
+
export interface NolTrialKey {
|
|
36
|
+
experimentSha256: string;
|
|
37
|
+
variantSha256: string;
|
|
38
|
+
taskId: string;
|
|
39
|
+
seed: number;
|
|
40
|
+
repetition: number;
|
|
41
|
+
arm: string;
|
|
42
|
+
}
|
|
43
|
+
export interface NolStoredArtifactReference {
|
|
44
|
+
sha256: string;
|
|
45
|
+
sizeBytes: number;
|
|
46
|
+
uri: string;
|
|
47
|
+
mediaType?: string;
|
|
48
|
+
}
|
|
49
|
+
/** A durable, nonrefundable charge made before CAS publication. Cleanup
|
|
50
|
+
* artifacts consume an already charged allowance and grant no compute authority. */
|
|
51
|
+
export interface NolArtifactReservation {
|
|
52
|
+
scopeId: string;
|
|
53
|
+
id: string;
|
|
54
|
+
jobId: string;
|
|
55
|
+
generation: number;
|
|
56
|
+
purpose: "artifact" | "cleanup_allowance" | "cleanup_artifact";
|
|
57
|
+
bytes: number;
|
|
58
|
+
artifact: NolStoredArtifactReference | null;
|
|
59
|
+
createdAtMs: number;
|
|
60
|
+
}
|
|
61
|
+
export interface NolTrialAttempt {
|
|
62
|
+
id: string;
|
|
63
|
+
jobId: string;
|
|
64
|
+
key: NolTrialKey;
|
|
65
|
+
keySha256: string;
|
|
66
|
+
inputSha256: string;
|
|
67
|
+
generation: number;
|
|
68
|
+
attempt: number;
|
|
69
|
+
status: "running" | "committed" | "interrupted";
|
|
70
|
+
result: unknown | null;
|
|
71
|
+
artifacts: NolStoredArtifactReference[];
|
|
72
|
+
resultSha256: string | null;
|
|
73
|
+
startedAtMs: number;
|
|
74
|
+
finishedAtMs: number | null;
|
|
75
|
+
}
|
|
76
|
+
export interface NolStoreEvent {
|
|
77
|
+
sequence: number;
|
|
78
|
+
jobId: string;
|
|
79
|
+
generation: number;
|
|
80
|
+
type: string;
|
|
81
|
+
payload: unknown;
|
|
82
|
+
sha256: string;
|
|
83
|
+
createdAtMs: number;
|
|
84
|
+
}
|
|
85
|
+
export interface NolStore {
|
|
86
|
+
putDocument<T>(input: {
|
|
87
|
+
kind: string;
|
|
88
|
+
id: string;
|
|
89
|
+
payload: T;
|
|
90
|
+
}): NolImmutableDocument<T>;
|
|
91
|
+
getDocument<T = unknown>(kind: string, id: string): NolImmutableDocument<T> | null;
|
|
92
|
+
listDocuments(kind: string): NolImmutableDocument[];
|
|
93
|
+
createJob(input: {
|
|
94
|
+
id: string;
|
|
95
|
+
kind: string;
|
|
96
|
+
manifestSha256: string;
|
|
97
|
+
payload: unknown;
|
|
98
|
+
}): NolJob;
|
|
99
|
+
getJob(jobId: string): NolJob | null;
|
|
100
|
+
listJobs(status?: NolJobStatus): NolJob[];
|
|
101
|
+
claimJob(jobId: string, ownerId: string, leaseMs: number): NolJobLease | null;
|
|
102
|
+
renewLease(lease: NolJobLease, leaseMs: number): NolJobLease;
|
|
103
|
+
assertCurrent(lease: NolJobLease): void;
|
|
104
|
+
appendEvent(lease: NolJobLease, type: string, payload: unknown): NolStoreEvent;
|
|
105
|
+
listEvents(jobId: string, afterSequence?: number): NolStoreEvent[];
|
|
106
|
+
reserveArtifact(lease: NolJobLease, input: {
|
|
107
|
+
scopeId: string;
|
|
108
|
+
id: string;
|
|
109
|
+
purpose: NolArtifactReservation["purpose"];
|
|
110
|
+
bytes: number;
|
|
111
|
+
maxAggregateBytes: number;
|
|
112
|
+
artifact?: NolStoredArtifactReference;
|
|
113
|
+
}): NolArtifactReservation;
|
|
114
|
+
listArtifactReservations(scopeId: string): NolArtifactReservation[];
|
|
115
|
+
beginTrial(lease: NolJobLease, key: NolTrialKey): NolTrialAttempt;
|
|
116
|
+
commitTrial(lease: NolJobLease, attemptId: string, input: {
|
|
117
|
+
result: unknown;
|
|
118
|
+
artifacts?: NolStoredArtifactReference[];
|
|
119
|
+
}): NolTrialAttempt;
|
|
120
|
+
interruptTrial(lease: NolJobLease, attemptId: string, input: {
|
|
121
|
+
result: unknown;
|
|
122
|
+
artifacts?: NolStoredArtifactReference[];
|
|
123
|
+
}): NolTrialAttempt;
|
|
124
|
+
listTrials(jobId: string): NolTrialAttempt[];
|
|
125
|
+
/** Call only after the coordinator has settled the owned compute worker. */
|
|
126
|
+
finishJob(lease: NolJobLease, status: "completed" | "failed" | "inconclusive", payload?: unknown): NolJob;
|
|
127
|
+
requestCancel(jobId: string, reason: string): NolJob;
|
|
128
|
+
/** Cleanup is not scientific output. Host verifies worker/GPU release first. */
|
|
129
|
+
acknowledgeCleanup(jobId: string, generation: number, receipt: unknown): NolJob;
|
|
130
|
+
/** Caller revalidates artifacts and the complete frozen manifest before resume. */
|
|
131
|
+
resumeJob(jobId: string, expectedManifestSha256: string, expectedGeneration?: number): NolJob;
|
|
132
|
+
close(): void;
|
|
133
|
+
}
|