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,202 @@
|
|
|
1
|
+
import type { BranchBackendLike } from "./evidenceBranch.js";
|
|
2
|
+
export interface SourceWideBackendLike {
|
|
3
|
+
chatCompletion(request: Omit<Parameters<BranchBackendLike["chatCompletion"]>[0], "messages"> & {
|
|
4
|
+
messages: Array<{
|
|
5
|
+
role: "system" | "user";
|
|
6
|
+
content: string;
|
|
7
|
+
}>;
|
|
8
|
+
signal?: AbortSignal;
|
|
9
|
+
}): ReturnType<BranchBackendLike["chatCompletion"]>;
|
|
10
|
+
}
|
|
11
|
+
/** A complete producer document, archived separately from its native HTTP body
|
|
12
|
+
* when HTML decoding changes character offsets. Neither worker prose nor these
|
|
13
|
+
* processing receipts confer factual or task-completion authority. */
|
|
14
|
+
export interface SourceWideFileContent {
|
|
15
|
+
readonly kind: "file";
|
|
16
|
+
readonly chars: number;
|
|
17
|
+
readonly sha256: string;
|
|
18
|
+
/** Exact verified UTF-16 range from a complete immutable UTF-8 source. */
|
|
19
|
+
read(charStart: number, charEndExclusive: number): Promise<string>;
|
|
20
|
+
}
|
|
21
|
+
export interface SourceWideDocument {
|
|
22
|
+
content: string | SourceWideFileContent;
|
|
23
|
+
artifactUri: string;
|
|
24
|
+
nativeArtifactUri: string;
|
|
25
|
+
scope: "complete_text" | "all_static_body_text" | "complete_returned_view";
|
|
26
|
+
/** Exact host-owned view provenance, quoted to the worker without authority. */
|
|
27
|
+
context?: string;
|
|
28
|
+
browserRequired?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface SourceWideFacet {
|
|
31
|
+
id: string;
|
|
32
|
+
question: string;
|
|
33
|
+
}
|
|
34
|
+
export interface SourceWideFinding {
|
|
35
|
+
id: string;
|
|
36
|
+
facetIds: string[];
|
|
37
|
+
assessment: string;
|
|
38
|
+
quote: {
|
|
39
|
+
charStart: number;
|
|
40
|
+
charEndExclusive: number;
|
|
41
|
+
text: string;
|
|
42
|
+
sha256: string;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export type SourceWideValidationFailureCode = "malformed_reply" | "truncated_reply" | "facet_mismatch" | "quote_not_found" | "quote_ambiguous" | "quote_offset_mismatch";
|
|
46
|
+
export interface SourceWideChunk {
|
|
47
|
+
index: number;
|
|
48
|
+
charStart: number;
|
|
49
|
+
charEndExclusive: number;
|
|
50
|
+
/** Context may overlap; coverage is credited only to the contiguous core. */
|
|
51
|
+
presentedCharStart: number;
|
|
52
|
+
presentedCharEndExclusive: number;
|
|
53
|
+
sha256: string;
|
|
54
|
+
attempts: number;
|
|
55
|
+
invalidReplies: number;
|
|
56
|
+
/** Static processing diagnostics only; no worker prose or factual authority. */
|
|
57
|
+
lastValidationFailure?: {
|
|
58
|
+
code: SourceWideValidationFailureCode;
|
|
59
|
+
replySha256: string;
|
|
60
|
+
attempt: number;
|
|
61
|
+
};
|
|
62
|
+
result?: {
|
|
63
|
+
findings: SourceWideFinding[];
|
|
64
|
+
facets: Array<{
|
|
65
|
+
id: string;
|
|
66
|
+
status: "supported" | "not_present" | "uncertain";
|
|
67
|
+
}>;
|
|
68
|
+
browserRequired: boolean;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
export interface SourceWideCheckpoint {
|
|
72
|
+
schema: "omnius.source-wide-extraction.v1";
|
|
73
|
+
/** Full original request, all facets, exact source and worker/owner config. */
|
|
74
|
+
bindingSha256: string;
|
|
75
|
+
sourceSha256: string;
|
|
76
|
+
requestSha256: string;
|
|
77
|
+
workerSha256: string;
|
|
78
|
+
artifactUri: string;
|
|
79
|
+
nativeArtifactUri: string;
|
|
80
|
+
sourceChars: number;
|
|
81
|
+
chunks: SourceWideChunk[];
|
|
82
|
+
}
|
|
83
|
+
export type SourceWidePendingReason = "backend_unavailable" | "context_unavailable" | "request_exceeds_context" | "call_budget" | "deadline" | "cancelled" | "invalid_worker_reply" | "worker_failed" | "chunk_attempts_exhausted" | "browser_needed" | "facet_unresolved" | "parent_context_unavailable";
|
|
84
|
+
export interface SourceWideProgressEvent {
|
|
85
|
+
schema: "omnius.source-extraction-progress.v1";
|
|
86
|
+
phase: "started" | "chunk" | "pending" | "ready";
|
|
87
|
+
sourceArtifactUri: string;
|
|
88
|
+
nativeArtifactUri: string;
|
|
89
|
+
sourceChars: number;
|
|
90
|
+
accountedChars: number;
|
|
91
|
+
processedChunks: number;
|
|
92
|
+
totalChunks: number;
|
|
93
|
+
pendingReason?: SourceWidePendingReason | "parent_reduction_needed";
|
|
94
|
+
}
|
|
95
|
+
/** Host-owned processing metadata for the existing semantic goal review. It
|
|
96
|
+
* records worker exposure/coverage, never factual acceptance or fulfillment. */
|
|
97
|
+
export interface SourceWideProcessingReceipt {
|
|
98
|
+
schema: "omnius.source-wide-processing.v1";
|
|
99
|
+
sourceSha256: string;
|
|
100
|
+
nativeSourceSha256: string;
|
|
101
|
+
requestSha256: string;
|
|
102
|
+
workerSha256: string;
|
|
103
|
+
sourceArtifactUri: string;
|
|
104
|
+
nativeArtifactUri: string;
|
|
105
|
+
extractionArtifactUri: string;
|
|
106
|
+
status: "ready" | "pending";
|
|
107
|
+
sourceCoverage: "complete" | "partial";
|
|
108
|
+
sourceChars: number;
|
|
109
|
+
accountedChars: number;
|
|
110
|
+
nextChar: number;
|
|
111
|
+
processedChunks: number;
|
|
112
|
+
totalChunks: number;
|
|
113
|
+
pendingReason?: SourceWideProgressEvent["pendingReason"];
|
|
114
|
+
}
|
|
115
|
+
export interface SourceWideExtractionResult {
|
|
116
|
+
schema: "omnius.source-wide-extraction-result.v1";
|
|
117
|
+
status: "ready" | "pending";
|
|
118
|
+
/** Coverage only: every complete chunk received a valid extraction response. */
|
|
119
|
+
sourceCoverage: "complete" | "partial";
|
|
120
|
+
checkpoint: SourceWideCheckpoint;
|
|
121
|
+
calls: number;
|
|
122
|
+
accountedChars: number;
|
|
123
|
+
nextChar: number;
|
|
124
|
+
findings: SourceWideFinding[];
|
|
125
|
+
facets: Array<{
|
|
126
|
+
id: string;
|
|
127
|
+
status: "supported" | "not_present" | "uncertain";
|
|
128
|
+
}>;
|
|
129
|
+
pendingReason?: SourceWidePendingReason;
|
|
130
|
+
}
|
|
131
|
+
/** Complete retained findings without duplicating the extraction checkpoint.
|
|
132
|
+
* The referenced host checkpoint proves processing coverage; neither artifact
|
|
133
|
+
* grants factual acceptance or task-fulfillment authority. */
|
|
134
|
+
export interface SourceWideFindingsDocument {
|
|
135
|
+
schema: "omnius.source-wide-findings.v1";
|
|
136
|
+
extractionArtifactUri: string;
|
|
137
|
+
sourceArtifactUri: string;
|
|
138
|
+
nativeArtifactUri: string;
|
|
139
|
+
sourceSha256: string;
|
|
140
|
+
requestSha256: string;
|
|
141
|
+
workerSha256: string;
|
|
142
|
+
sourceChars: number;
|
|
143
|
+
accountedChars: number;
|
|
144
|
+
nextChar: number;
|
|
145
|
+
sourceCoverage: SourceWideExtractionResult["sourceCoverage"];
|
|
146
|
+
status: SourceWideExtractionResult["status"];
|
|
147
|
+
pendingReason?: SourceWidePendingReason;
|
|
148
|
+
facets: SourceWideExtractionResult["facets"];
|
|
149
|
+
findings: SourceWideFinding[];
|
|
150
|
+
}
|
|
151
|
+
export interface SourceWideExtractionInput {
|
|
152
|
+
source: SourceWideDocument;
|
|
153
|
+
/** Do not pass a shortened query or synthesized task anchor here. */
|
|
154
|
+
task: string;
|
|
155
|
+
facets?: SourceWideFacet[];
|
|
156
|
+
/** Host-owned current task/epoch/backend identity; never a model tool arg. */
|
|
157
|
+
ownerKey: string;
|
|
158
|
+
workerKey: string;
|
|
159
|
+
backend?: SourceWideBackendLike;
|
|
160
|
+
checkpoint?: SourceWideCheckpoint;
|
|
161
|
+
budget: {
|
|
162
|
+
contextWindowTokens: number;
|
|
163
|
+
maxOutputTokens: number;
|
|
164
|
+
maxChunkChars: number;
|
|
165
|
+
contextOverlapChars?: number;
|
|
166
|
+
maxChunkAttempts: number;
|
|
167
|
+
maxCalls: number;
|
|
168
|
+
/** Production work advances the finite core population automatically;
|
|
169
|
+
* maxCalls remains the explicit bounded-wave contract for other callers. */
|
|
170
|
+
autoContinue?: boolean;
|
|
171
|
+
deadlineMs: number;
|
|
172
|
+
callTimeoutMs: number;
|
|
173
|
+
};
|
|
174
|
+
signal?: AbortSignal;
|
|
175
|
+
/** Metadata-only capacity negotiation when the full original request cannot
|
|
176
|
+
* fit even the smallest core. Actual generation must revalidate its route. */
|
|
177
|
+
resolveContextWindow?: (messages: Array<{
|
|
178
|
+
role: "system" | "user";
|
|
179
|
+
content: string;
|
|
180
|
+
}>, requiredOutputTokens: number) => Promise<number | undefined>;
|
|
181
|
+
assertCurrent?: () => void;
|
|
182
|
+
/** Commit each progress checkpoint before any later chunk can run. */
|
|
183
|
+
persistCheckpoint?: (checkpoint: SourceWideCheckpoint) => void | Promise<void>;
|
|
184
|
+
}
|
|
185
|
+
export declare const SOURCE_WIDE_EXTRACTION_PROTOCOL_SHA256: string;
|
|
186
|
+
/** One isolated worker per complete chunk. This host-only coordinator can be
|
|
187
|
+
* resumed after bounded calls; it never promotes a sampled prefix to full read. */
|
|
188
|
+
export declare function extractSourceWide(input: SourceWideExtractionInput): Promise<SourceWideExtractionResult>;
|
|
189
|
+
export declare function sourceWideFindingsDocument(result: SourceWideExtractionResult, extractionArtifactUri: string): SourceWideFindingsDocument;
|
|
190
|
+
/** A parent projection never silently drops findings to fit. The full typed
|
|
191
|
+
* result must be archived first; a separate reduction can consume that artifact. */
|
|
192
|
+
export declare function renderSourceWideExtraction(result: SourceWideExtractionResult, extractionArtifactUri: string, maxChars: number, options?: {
|
|
193
|
+
findingsArtifactUri?: string;
|
|
194
|
+
}): string;
|
|
195
|
+
export declare function projectSourceWideExtraction(result: SourceWideExtractionResult, extractionArtifactUri: string, maxChars: number, options?: {
|
|
196
|
+
findingsArtifactUri?: string;
|
|
197
|
+
}): {
|
|
198
|
+
llmContent: string;
|
|
199
|
+
status: "ready" | "pending";
|
|
200
|
+
pendingReason?: SourceWideProgressEvent["pendingReason"];
|
|
201
|
+
nextAction?: "resume_source_extraction" | "read_findings" | "obtain_source_evidence";
|
|
202
|
+
};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import type { AgenticBackend } from "./agenticRunner.js";
|
|
2
|
+
/**
|
|
3
|
+
* A user instruction received while an agent is working. Intent is supplied
|
|
4
|
+
* by the surface/controller; the runner must never silently reinterpret an
|
|
5
|
+
* explicit redirect as passive transcript context.
|
|
6
|
+
*/
|
|
7
|
+
export type SteeringIntent = "clarify" | "append" | "context_only" | "constraint" | "priority_change" | "redirect" | "replace" | "cancel";
|
|
8
|
+
export type SteeringInputLifecycleState = "received" | "queued" | "acknowledged" | "visible_in_request" | "reconciliation_required" | "reconciled" | "first_affected_action"
|
|
9
|
+
/** @deprecated Queue insertion is not evidence of model integration. */
|
|
10
|
+
| "consumed" | "superseded" | "cancelled";
|
|
11
|
+
export type SteeringReconciliationStatus = "applied" | "not_applicable" | "needs_clarification";
|
|
12
|
+
export interface SteeringReconciliation {
|
|
13
|
+
inputId: string;
|
|
14
|
+
status: SteeringReconciliationStatus;
|
|
15
|
+
changedConstraints: string[];
|
|
16
|
+
revisedNextAction: string;
|
|
17
|
+
/** Replace only an explicitly superseded user objective, never status/additive/media-only intake. */
|
|
18
|
+
taskDisposition?: "continue" | "replace" | "resolve_after_evidence";
|
|
19
|
+
/** Required only for an applied replacement and validated by the runner. */
|
|
20
|
+
replacementGoal?: string;
|
|
21
|
+
/** Exact durable transaction identities adopted by the new task. */
|
|
22
|
+
retainedToolCallIds?: string[];
|
|
23
|
+
evidenceCalls?: Array<{
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
arguments: Record<string, unknown>;
|
|
27
|
+
}>;
|
|
28
|
+
}
|
|
29
|
+
export interface SteeringInput {
|
|
30
|
+
/** Stable surface-generated identity, retained in runner events and ledger. */
|
|
31
|
+
inputId: string;
|
|
32
|
+
content: string;
|
|
33
|
+
source: string;
|
|
34
|
+
receivedAt: string;
|
|
35
|
+
intent: SteeringIntent;
|
|
36
|
+
/** Host-only authority ceiling. A reviewed amendment cannot retire the active objective. */
|
|
37
|
+
allowTaskReplacement?: boolean;
|
|
38
|
+
/** Current lifecycle state; every transition is durably ledgered. */
|
|
39
|
+
state: SteeringInputLifecycleState;
|
|
40
|
+
/** Bound by the runner when a pre-run input enters a task. */
|
|
41
|
+
taskEpoch?: number;
|
|
42
|
+
/** Host-recorded visible reply; conveys no scope, tool or completion authority. */
|
|
43
|
+
humanResponse?: {
|
|
44
|
+
content: string;
|
|
45
|
+
deliveredAt: string;
|
|
46
|
+
inputSha256: string;
|
|
47
|
+
materialized?: boolean;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export interface SteeringIntakeReceipt {
|
|
51
|
+
inputId: string;
|
|
52
|
+
intent: SteeringIntent;
|
|
53
|
+
state: SteeringInputLifecycleState;
|
|
54
|
+
taskEpoch?: number;
|
|
55
|
+
runId?: string;
|
|
56
|
+
acceptedAt: string;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Normalize surface hints into a runner policy. Explicit task-replacement
|
|
60
|
+
* intents always win; legacy append/clarify callers are upgraded when their
|
|
61
|
+
* actual text changes safety, scope, mutation permission, or priority.
|
|
62
|
+
*/
|
|
63
|
+
export declare function classifySteeringIntent(content: string, requestedIntent?: SteeringIntent): SteeringIntent;
|
|
64
|
+
export declare function steeringRequiresReconciliation(intent: SteeringIntent): boolean;
|
|
65
|
+
export declare function steeringGatesOldPlan(intent: SteeringIntent): boolean;
|
|
66
|
+
export type SteeringSourceSurface = "tui" | "web_chat" | "api" | "unknown";
|
|
67
|
+
export type SteeringAuthority = "user";
|
|
68
|
+
export type SteeringOutcome = "success" | "failure" | "partial" | "unknown";
|
|
69
|
+
export interface SteeringIngress {
|
|
70
|
+
id: string;
|
|
71
|
+
rawText: string;
|
|
72
|
+
sourceSurface: SteeringSourceSurface;
|
|
73
|
+
authority: SteeringAuthority;
|
|
74
|
+
isReplacement: boolean;
|
|
75
|
+
currentTaskGoal: string;
|
|
76
|
+
recentActivity?: string;
|
|
77
|
+
filesTouched: string[];
|
|
78
|
+
toolCallCount: number;
|
|
79
|
+
taskId?: string;
|
|
80
|
+
sessionId?: string;
|
|
81
|
+
timestamp: string;
|
|
82
|
+
}
|
|
83
|
+
export interface SteeringInterpretation {
|
|
84
|
+
inference: string;
|
|
85
|
+
runnerInstruction: string;
|
|
86
|
+
conflicts?: string[];
|
|
87
|
+
alternatives?: string[];
|
|
88
|
+
memoryNote?: string;
|
|
89
|
+
}
|
|
90
|
+
export interface SteeringLedgerEntry {
|
|
91
|
+
type: "ingress" | "outcome" | "lifecycle";
|
|
92
|
+
packetId: string;
|
|
93
|
+
timestamp: string;
|
|
94
|
+
ingress?: SteeringIngress;
|
|
95
|
+
interpretation?: SteeringInterpretation | null;
|
|
96
|
+
injected?: boolean;
|
|
97
|
+
rawOnly?: boolean;
|
|
98
|
+
outcome?: SteeringOutcome;
|
|
99
|
+
summary?: string;
|
|
100
|
+
intake?: SteeringInput;
|
|
101
|
+
runId?: string;
|
|
102
|
+
taskEpoch?: number;
|
|
103
|
+
primaryInputId?: string;
|
|
104
|
+
reconciliation?: SteeringReconciliation;
|
|
105
|
+
}
|
|
106
|
+
export interface SteeringIngressInput {
|
|
107
|
+
rawText: string;
|
|
108
|
+
sourceSurface: SteeringSourceSurface;
|
|
109
|
+
currentTaskGoal: string;
|
|
110
|
+
recentActivity?: string;
|
|
111
|
+
filesTouched?: string[];
|
|
112
|
+
toolCallCount?: number;
|
|
113
|
+
isReplacement?: boolean;
|
|
114
|
+
taskId?: string;
|
|
115
|
+
sessionId?: string;
|
|
116
|
+
}
|
|
117
|
+
export declare function createSteeringIngress(input: SteeringIngressInput): SteeringIngress;
|
|
118
|
+
export declare function interpretSteeringIngress(backend: AgenticBackend, ingress: SteeringIngress, timeoutMs?: number): Promise<SteeringInterpretation | null>;
|
|
119
|
+
export declare function buildSteeringPacket(ingress: SteeringIngress, interpretation: SteeringInterpretation | null): string;
|
|
120
|
+
export declare function extractMidTaskSteeringInput(value: string): string | null;
|
|
121
|
+
export declare function appendSteeringLedgerEntry(repoRoot: string, entry: SteeringLedgerEntry): void;
|
|
122
|
+
export declare function appendSteeringOutcome(repoRoot: string, packetIds: string[], outcome: SteeringOutcome, summary: string): void;
|
|
123
|
+
export declare function buildRecentSteeringContext(repoRoot: string, limit?: number): string;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { initDb } from "../memory/db.js";
|
|
2
|
+
import { ImmutableEvidenceStore } from "../memory/immutableEvidenceStore.js";
|
|
3
|
+
import { StructuredMemoryStore } from "../memory/structuredMemoryStore.js";
|
|
4
|
+
import { UnifiedMemoryStore } from "../memory/unifiedMemoryStore.js";
|
|
5
|
+
import type { UserTaskNoteScope } from "./memory-consolidation.js";
|
|
6
|
+
import type { SuccessfulProcedureFile, SuccessfulProcedureDeliveryFile } from "./successful-procedure-memory.js";
|
|
7
|
+
import { type InferencePressureCoordinator } from "./inference-pressure.js";
|
|
8
|
+
import { type StructuredMemoryInferenceRequest } from "./structuredMemoryInference.js";
|
|
9
|
+
export declare const STRUCTURED_MEMORY_EXTRACTION_JOB = "structured_memory_extraction";
|
|
10
|
+
export interface StructuredMemoryExtractionProfile {
|
|
11
|
+
endpoint: string;
|
|
12
|
+
model: string;
|
|
13
|
+
protocol: string;
|
|
14
|
+
/** Stable configuration identity, never a process/session generation. */
|
|
15
|
+
revision: string;
|
|
16
|
+
}
|
|
17
|
+
export interface StructuredMemoryExtractionContext {
|
|
18
|
+
owner: UserTaskNoteScope;
|
|
19
|
+
profile: StructuredMemoryExtractionProfile;
|
|
20
|
+
assertCurrent?: () => void;
|
|
21
|
+
}
|
|
22
|
+
export interface StructuredMemoryExtractionJobInput extends StructuredMemoryExtractionContext {
|
|
23
|
+
sourceScopeId: string;
|
|
24
|
+
runId: string;
|
|
25
|
+
taskEpoch: number;
|
|
26
|
+
sourceChunkIds: string[];
|
|
27
|
+
}
|
|
28
|
+
export interface StructuredMemoryExtractionReleaseInput extends StructuredMemoryExtractionContext {
|
|
29
|
+
sourceScopeId: string;
|
|
30
|
+
runId: string;
|
|
31
|
+
taskEpoch: number;
|
|
32
|
+
terminal: SuccessfulProcedureFile;
|
|
33
|
+
delivery?: {
|
|
34
|
+
candidateSha256: string;
|
|
35
|
+
records: SuccessfulProcedureDeliveryFile[];
|
|
36
|
+
};
|
|
37
|
+
assertCurrent: () => void;
|
|
38
|
+
}
|
|
39
|
+
export interface StructuredMemoryExtractionDispatch {
|
|
40
|
+
signal: AbortSignal;
|
|
41
|
+
logicalRequestId: string;
|
|
42
|
+
workloadClass: "background";
|
|
43
|
+
assertCurrent: () => void;
|
|
44
|
+
}
|
|
45
|
+
export interface StructuredMemoryExtractionWorkerOptions extends StructuredMemoryExtractionContext {
|
|
46
|
+
/** A private backend/controller; never the terminal task's auxiliary dispatcher. */
|
|
47
|
+
infer: (request: StructuredMemoryInferenceRequest, dispatch: StructuredMemoryExtractionDispatch) => Promise<string>;
|
|
48
|
+
inferencePressureCoordinator?: InferencePressureCoordinator;
|
|
49
|
+
batchSize?: number;
|
|
50
|
+
maxAttempts?: number;
|
|
51
|
+
}
|
|
52
|
+
export interface StructuredMemoryExtractionRunResult {
|
|
53
|
+
claimed: number;
|
|
54
|
+
completed: number;
|
|
55
|
+
pending: number;
|
|
56
|
+
rejected: number;
|
|
57
|
+
}
|
|
58
|
+
/** Queue, sources and output share this one connection. No network in enqueue. */
|
|
59
|
+
export declare class StructuredMemoryExtractionQueue {
|
|
60
|
+
private readonly db;
|
|
61
|
+
readonly store: UnifiedMemoryStore;
|
|
62
|
+
readonly evidence: ImmutableEvidenceStore;
|
|
63
|
+
readonly memories: StructuredMemoryStore;
|
|
64
|
+
constructor(db: ReturnType<typeof initDb>, options?: {
|
|
65
|
+
now?: () => Date;
|
|
66
|
+
});
|
|
67
|
+
private ownerScope;
|
|
68
|
+
private assertSources;
|
|
69
|
+
enqueue(input: StructuredMemoryExtractionJobInput): string[];
|
|
70
|
+
/** Host-only exact terminal/provider boundary, durable across client restarts. */
|
|
71
|
+
releaseRun(input: StructuredMemoryExtractionReleaseInput): void;
|
|
72
|
+
private assertReleased;
|
|
73
|
+
/** Recover a crash between immutable source persistence and queue admission.
|
|
74
|
+
* Only explicitly enabled, owner/profile-tagged source documents qualify. */
|
|
75
|
+
reconcile(context: StructuredMemoryExtractionContext, limit?: number): number;
|
|
76
|
+
createWorker(options: StructuredMemoryExtractionWorkerOptions): {
|
|
77
|
+
runOnce(signal?: AbortSignal): Promise<StructuredMemoryExtractionRunResult>;
|
|
78
|
+
};
|
|
79
|
+
private execute;
|
|
80
|
+
}
|
|
81
|
+
/** A client-lifetime handle. Terminal task closure neither admits nor cancels it. */
|
|
82
|
+
export declare function openStructuredMemoryExtractionWorker(options: StructuredMemoryExtractionWorkerOptions & {
|
|
83
|
+
databasePath: string;
|
|
84
|
+
intervalMs?: number;
|
|
85
|
+
}): {
|
|
86
|
+
runOnce(): Promise<StructuredMemoryExtractionRunResult>;
|
|
87
|
+
releaseRun(input: StructuredMemoryExtractionReleaseInput): void;
|
|
88
|
+
stopAndWait(): Promise<void>;
|
|
89
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { type ImmutableEvidenceStore } from "../memory/immutableEvidenceStore.js";
|
|
2
|
+
import { type StructuredMemoryRecord, type StructuredMemoryInput, type StructuredMemoryStore } from "../memory/structuredMemoryStore.js";
|
|
3
|
+
export interface StructuredMemoryInferenceRequest {
|
|
4
|
+
system: string;
|
|
5
|
+
input: Record<string, unknown>;
|
|
6
|
+
maxTokens: number;
|
|
7
|
+
responseFormat: {
|
|
8
|
+
type: "json_schema";
|
|
9
|
+
json_schema: {
|
|
10
|
+
name: "structured_memory_extraction";
|
|
11
|
+
strict: true;
|
|
12
|
+
schema: Record<string, unknown>;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export type StructuredMemoryInference = (request: StructuredMemoryInferenceRequest) => Promise<string>;
|
|
17
|
+
export interface InferenceMemoryExtractionResult {
|
|
18
|
+
written: StructuredMemoryRecord[];
|
|
19
|
+
rejected: string[];
|
|
20
|
+
sourceChunkIds: string[];
|
|
21
|
+
}
|
|
22
|
+
export interface StructuredMemoryExtractionBatch {
|
|
23
|
+
index: number;
|
|
24
|
+
count: number;
|
|
25
|
+
spans: Array<{
|
|
26
|
+
chunkId: string;
|
|
27
|
+
documentId: string;
|
|
28
|
+
chunkSha256: string;
|
|
29
|
+
documentSha256: string;
|
|
30
|
+
charStart: number;
|
|
31
|
+
charEnd: number;
|
|
32
|
+
text: string;
|
|
33
|
+
}>;
|
|
34
|
+
}
|
|
35
|
+
/** Exact bounded source spans, independent of a task's terminal lifecycle. */
|
|
36
|
+
export declare function prepareStructuredMemoryExtractionBatches(input: {
|
|
37
|
+
evidenceStore: ImmutableEvidenceStore;
|
|
38
|
+
sourceChunkIds: string[];
|
|
39
|
+
scopeId: string;
|
|
40
|
+
}): StructuredMemoryExtractionBatch[];
|
|
41
|
+
export declare function assertStructuredMemoryExtractionBatchCurrent(input: {
|
|
42
|
+
evidenceStore: ImmutableEvidenceStore;
|
|
43
|
+
scopeId: string;
|
|
44
|
+
batch: StructuredMemoryExtractionBatch;
|
|
45
|
+
}): void;
|
|
46
|
+
/**
|
|
47
|
+
* Run bounded model-authored extraction batches and commit only schema-valid,
|
|
48
|
+
* source-resolvable memories. The host never infers a semantic class from
|
|
49
|
+
* keywords; it validates scope, provenance, conflicts, and numeric bounds.
|
|
50
|
+
*/
|
|
51
|
+
export declare function extractStructuredMemoriesWithInference(input: {
|
|
52
|
+
evidenceStore: ImmutableEvidenceStore;
|
|
53
|
+
memoryStore: StructuredMemoryStore;
|
|
54
|
+
sourceChunkIds: string[];
|
|
55
|
+
scopeId: string;
|
|
56
|
+
infer: StructuredMemoryInference;
|
|
57
|
+
batch?: StructuredMemoryExtractionBatch;
|
|
58
|
+
assertCurrent?: () => void;
|
|
59
|
+
recordIdPrefix?: string;
|
|
60
|
+
validFrom?: string;
|
|
61
|
+
commitBatch?: (records: StructuredMemoryInput[], rejected: string[]) => StructuredMemoryRecord[];
|
|
62
|
+
}): Promise<InferenceMemoryExtractionResult>;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { UnifiedMemoryStore } from "../memory/unifiedMemoryStore.js";
|
|
2
|
+
import { type EmbeddingConfig, type EmbeddingResult } from "../memory/embeddings.js";
|
|
3
|
+
import { type MemoryWorkerRunResult } from "../memory/memoryIngestion.js";
|
|
4
|
+
import { type UserTaskNoteScope } from "./memory-consolidation.js";
|
|
5
|
+
import { type CompletionReadinessSnapshot } from "./completionReadiness.js";
|
|
6
|
+
import type { TaskExecutionSnapshotV1 } from "./taskExecutionSnapshot.js";
|
|
7
|
+
export interface SuccessfulProcedureFile {
|
|
8
|
+
path: string;
|
|
9
|
+
sha256: string;
|
|
10
|
+
}
|
|
11
|
+
export interface SuccessfulProcedureAction {
|
|
12
|
+
traceIndex: number;
|
|
13
|
+
tool: string;
|
|
14
|
+
success: boolean;
|
|
15
|
+
argumentKeys?: string[];
|
|
16
|
+
/** Actual host-scrubbed arguments, retained as historical suggestions only. */
|
|
17
|
+
arguments?: Record<string, unknown>;
|
|
18
|
+
description?: string;
|
|
19
|
+
verificationRefs?: string[];
|
|
20
|
+
}
|
|
21
|
+
export interface SuccessfulProcedureRouting {
|
|
22
|
+
sessionKey: string;
|
|
23
|
+
senderActorKey: string;
|
|
24
|
+
runId: string;
|
|
25
|
+
inputId: string;
|
|
26
|
+
chatId: string;
|
|
27
|
+
messageId: number;
|
|
28
|
+
messageThreadId: number;
|
|
29
|
+
generation: number;
|
|
30
|
+
}
|
|
31
|
+
export interface SuccessfulProcedureDeliveryFile extends SuccessfulProcedureFile {
|
|
32
|
+
expectedRouting: SuccessfulProcedureRouting;
|
|
33
|
+
/** Exact operation payload hash, including the actual rendered chunk. */
|
|
34
|
+
expectedTextSha256: string;
|
|
35
|
+
}
|
|
36
|
+
export interface SuccessfulProcedureInput {
|
|
37
|
+
scope: UserTaskNoteScope;
|
|
38
|
+
runId: string;
|
|
39
|
+
taskEpoch: number;
|
|
40
|
+
goal: string;
|
|
41
|
+
result: string;
|
|
42
|
+
preconditions: string[];
|
|
43
|
+
actions: SuccessfulProcedureAction[];
|
|
44
|
+
trace: SuccessfulProcedureFile;
|
|
45
|
+
completion: {
|
|
46
|
+
terminalReceipt: SuccessfulProcedureFile;
|
|
47
|
+
providerDelivery?: {
|
|
48
|
+
candidate: string;
|
|
49
|
+
readiness: CompletionReadinessSnapshot;
|
|
50
|
+
execution: TaskExecutionSnapshotV1;
|
|
51
|
+
/** All final chunks of this current requested result, selected by its host owner. */
|
|
52
|
+
records: SuccessfulProcedureDeliveryFile[];
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
/** Reassert current native/runner/provider ownership; never supplied by a model. */
|
|
56
|
+
assertCurrent: () => void;
|
|
57
|
+
signal?: AbortSignal;
|
|
58
|
+
}
|
|
59
|
+
export interface SuccessfulProcedureMemoryOptions {
|
|
60
|
+
/** Existing host credential scrubber; a failure prevents recording. */
|
|
61
|
+
sanitizeText: (text: string) => string;
|
|
62
|
+
embedding?: EmbeddingConfig;
|
|
63
|
+
/** CPU seam; production defaults to the existing optional embedding provider. */
|
|
64
|
+
embed?: (text: string, config: EmbeddingConfig) => Promise<EmbeddingResult | null>;
|
|
65
|
+
maxPromptChars?: number;
|
|
66
|
+
}
|
|
67
|
+
/** Shared by the host trace writer and the adapter, so immutable safe argument joins are exact. */
|
|
68
|
+
export declare function sanitizeSuccessfulProcedureArguments(value: Record<string, unknown>, sanitizeText: (text: string) => string): Record<string, unknown>;
|
|
69
|
+
/** Historical experience only: this adapter never executes tools or creates task evidence. */
|
|
70
|
+
export declare class SuccessfulProcedureMemory {
|
|
71
|
+
private readonly store;
|
|
72
|
+
private readonly options;
|
|
73
|
+
private readonly retriever;
|
|
74
|
+
constructor(store: UnifiedMemoryStore, options: SuccessfulProcedureMemoryOptions);
|
|
75
|
+
private scrub;
|
|
76
|
+
private embeddingConfig;
|
|
77
|
+
private vectorSet;
|
|
78
|
+
private embeddingProfile;
|
|
79
|
+
private checkedStoredProcedure;
|
|
80
|
+
private hasProcedureVector;
|
|
81
|
+
private enqueueProcedureChunk;
|
|
82
|
+
/** Reconcile only an explicitly authenticated owner's historical cases. No task evidence is created. */
|
|
83
|
+
reconcileEmbeddingJobs(input: {
|
|
84
|
+
scope: UserTaskNoteScope;
|
|
85
|
+
limit?: number;
|
|
86
|
+
afterChunkId?: string;
|
|
87
|
+
}): {
|
|
88
|
+
queued: number;
|
|
89
|
+
scanned: number;
|
|
90
|
+
nextChunkId?: string;
|
|
91
|
+
};
|
|
92
|
+
createEmbeddingWorker(input: {
|
|
93
|
+
scope: UserTaskNoteScope;
|
|
94
|
+
batchSize?: number;
|
|
95
|
+
maxAttempts?: number;
|
|
96
|
+
}): {
|
|
97
|
+
runOnce(signal?: AbortSignal): Promise<MemoryWorkerRunResult>;
|
|
98
|
+
};
|
|
99
|
+
record(input: SuccessfulProcedureInput): Promise<boolean>;
|
|
100
|
+
recall(input: {
|
|
101
|
+
scope: UserTaskNoteScope;
|
|
102
|
+
query: string;
|
|
103
|
+
signal?: AbortSignal;
|
|
104
|
+
assertCurrent: () => void;
|
|
105
|
+
}): Promise<{
|
|
106
|
+
text: string;
|
|
107
|
+
caseIds: string[];
|
|
108
|
+
}>;
|
|
109
|
+
}
|
|
110
|
+
/** Opens the existing workspace substrate; caller closes its private handle after use. */
|
|
111
|
+
export declare function openSuccessfulProcedureMemory(options: SuccessfulProcedureMemoryOptions & {
|
|
112
|
+
workspaceKey: string;
|
|
113
|
+
}): {
|
|
114
|
+
memory: SuccessfulProcedureMemory;
|
|
115
|
+
close: () => void;
|
|
116
|
+
};
|
|
117
|
+
/** Private historical worker handle. Task cancellation never substitutes for this handle's shutdown. */
|
|
118
|
+
export declare function openSuccessfulProcedureMemoryWorker(options: SuccessfulProcedureMemoryOptions & {
|
|
119
|
+
workspaceKey: string;
|
|
120
|
+
scope: UserTaskNoteScope;
|
|
121
|
+
intervalMs?: number;
|
|
122
|
+
batchSize?: number;
|
|
123
|
+
maxAttempts?: number;
|
|
124
|
+
}): {
|
|
125
|
+
runOnce(): Promise<MemoryWorkerRunResult>;
|
|
126
|
+
stopAndWait(): Promise<void>;
|
|
127
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { ObjectiveCriterionStateV1, TaskObjectiveContractV1, TaskObjectiveCriterionV1, VerificationReceiptV1 } from "./taskObjective.js";
|
|
2
|
+
export declare const SUPPORTED_ANSWER_OBLIGATION_SCHEMA: "omnius.supported-answer-obligation.v1";
|
|
3
|
+
export declare const SUPPORTED_ANSWER_BINDING_SCHEMA: "omnius.supported-answer-binding.v1";
|
|
4
|
+
export declare const SUPPORTED_ANSWER_VERIFIER_METHOD: "source_answer_review";
|
|
5
|
+
/** Host-issued native goal/source identity. Model prose never installs policy. */
|
|
6
|
+
export interface SupportedAnswerObligationV1 {
|
|
7
|
+
schema: typeof SUPPORTED_ANSWER_OBLIGATION_SCHEMA;
|
|
8
|
+
nativeScopeSha256: string;
|
|
9
|
+
sourceCriterionIds: string[];
|
|
10
|
+
requirementSetSha256?: string;
|
|
11
|
+
}
|
|
12
|
+
/** An authentic frozen candidate or review of exactly that candidate. */
|
|
13
|
+
export interface SupportedAnswerBindingV1 {
|
|
14
|
+
schema: typeof SUPPORTED_ANSWER_BINDING_SCHEMA;
|
|
15
|
+
phase: "candidate" | "review";
|
|
16
|
+
nativeScopeSha256: string;
|
|
17
|
+
objectiveRef: string;
|
|
18
|
+
objectiveHash: string;
|
|
19
|
+
objectiveRevision: number;
|
|
20
|
+
taskEpoch: number;
|
|
21
|
+
candidateSha256: string;
|
|
22
|
+
candidateRevision: number;
|
|
23
|
+
sourcePopulationSha256: string;
|
|
24
|
+
requirementSetSha256?: string;
|
|
25
|
+
/** Digest of the reopened host factual-review receipt, never model output. */
|
|
26
|
+
reviewReceiptSha256?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare function normalizeSupportedAnswerObligationV1(value: unknown): SupportedAnswerObligationV1 | null;
|
|
29
|
+
export declare function normalizeSupportedAnswerBindingV1(value: unknown): SupportedAnswerBindingV1 | null;
|
|
30
|
+
export declare function supportedAnswerArtifactIdentity(criterionId: string, binding: SupportedAnswerBindingV1): {
|
|
31
|
+
artifactEvidenceId: string;
|
|
32
|
+
artifactRevision: string;
|
|
33
|
+
};
|
|
34
|
+
/** Core checks identity, not the factual review itself. The caller must reopen
|
|
35
|
+
* the native source-review authority before issuing a review receipt. */
|
|
36
|
+
export declare function createSupportedAnswerCandidateReceiptV1(input: {
|
|
37
|
+
contract: TaskObjectiveContractV1;
|
|
38
|
+
criterionId: string;
|
|
39
|
+
candidateSha256: string;
|
|
40
|
+
sourcePopulationSha256: string;
|
|
41
|
+
candidateRevision: number;
|
|
42
|
+
evidenceId: string;
|
|
43
|
+
}): VerificationReceiptV1;
|
|
44
|
+
export declare function createSupportedAnswerReviewReceiptV1(input: {
|
|
45
|
+
candidate: VerificationReceiptV1;
|
|
46
|
+
evidenceId: string;
|
|
47
|
+
outcome: "passed" | "artifact_failed" | "verifier_invalid" | "inconclusive";
|
|
48
|
+
reviewReceiptSha256: string;
|
|
49
|
+
evidenceIds?: string[];
|
|
50
|
+
}): VerificationReceiptV1;
|
|
51
|
+
export declare function getSupportedAnswerCurrentCandidateV1(input: {
|
|
52
|
+
contract: TaskObjectiveContractV1;
|
|
53
|
+
criterionId: string;
|
|
54
|
+
verificationReceipts: readonly VerificationReceiptV1[];
|
|
55
|
+
}): {
|
|
56
|
+
candidate: VerificationReceiptV1 | null;
|
|
57
|
+
maximumRevision: number;
|
|
58
|
+
conflicting: boolean;
|
|
59
|
+
};
|
|
60
|
+
/** Dedicated exact-candidate semantics; ordinary evidence kinds or static
|
|
61
|
+
* satisfied status never certify this obligation. Duplicate receipts/prose
|
|
62
|
+
* cannot create new progress, and any genuine matching failure wins over pass. */
|
|
63
|
+
export declare function projectSupportedAnswerCriterionState(input: {
|
|
64
|
+
contract: TaskObjectiveContractV1;
|
|
65
|
+
criterion: TaskObjectiveCriterionV1;
|
|
66
|
+
verifications: readonly VerificationReceiptV1[];
|
|
67
|
+
sourceCriteriaSatisfied: boolean;
|
|
68
|
+
}): ObjectiveCriterionStateV1;
|