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,105 @@
|
|
|
1
|
+
type SqliteDatabase = {
|
|
2
|
+
exec(sql: string): void;
|
|
3
|
+
prepare(sql: string): {
|
|
4
|
+
all(...params: unknown[]): unknown[];
|
|
5
|
+
get(...params: unknown[]): unknown;
|
|
6
|
+
run(...params: unknown[]): {
|
|
7
|
+
changes: number;
|
|
8
|
+
lastInsertRowid: number | bigint;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type StructuredMemoryClass = "fact" | "constraint" | "decision" | "entity" | "relationship" | "episode" | "open_question" | "current_plan" | "latent_memory";
|
|
13
|
+
export type StructuredMemoryFidelity = "exact" | "derived" | "unverified";
|
|
14
|
+
export interface StructuredMemorySourceSpan {
|
|
15
|
+
chunkId: string;
|
|
16
|
+
charStart?: number;
|
|
17
|
+
charEnd?: number;
|
|
18
|
+
byteStart?: number;
|
|
19
|
+
byteEnd?: number;
|
|
20
|
+
quoteHash?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface StructuredMemoryInput {
|
|
23
|
+
id?: string;
|
|
24
|
+
/** Exact tenant/session boundary supplied by the owning runtime. */
|
|
25
|
+
scopeId?: string;
|
|
26
|
+
memoryClass: StructuredMemoryClass;
|
|
27
|
+
canonicalKey?: string;
|
|
28
|
+
body: string;
|
|
29
|
+
provenance: StructuredMemorySourceSpan[];
|
|
30
|
+
fidelity: StructuredMemoryFidelity;
|
|
31
|
+
importance?: number;
|
|
32
|
+
ttlSeconds?: number;
|
|
33
|
+
validFrom?: string;
|
|
34
|
+
metadata?: Record<string, unknown>;
|
|
35
|
+
compressionGeneration?: number;
|
|
36
|
+
supersedesId?: string;
|
|
37
|
+
/** Required when a canonical key already has a different active value. */
|
|
38
|
+
conflictDisposition?: "supersede" | "compete";
|
|
39
|
+
}
|
|
40
|
+
export interface StructuredMemoryRecord {
|
|
41
|
+
id: string;
|
|
42
|
+
scopeId?: string;
|
|
43
|
+
memoryClass: StructuredMemoryClass;
|
|
44
|
+
canonicalKey?: string;
|
|
45
|
+
body: string;
|
|
46
|
+
bodyHash: string;
|
|
47
|
+
provenance: StructuredMemorySourceSpan[];
|
|
48
|
+
fidelity: StructuredMemoryFidelity;
|
|
49
|
+
importance: number;
|
|
50
|
+
ttlSeconds?: number;
|
|
51
|
+
validFrom: string;
|
|
52
|
+
validUntil?: string;
|
|
53
|
+
supersedesId?: string;
|
|
54
|
+
supersededById?: string;
|
|
55
|
+
compressionGeneration: number;
|
|
56
|
+
metadata: Record<string, unknown>;
|
|
57
|
+
createdAt: string;
|
|
58
|
+
}
|
|
59
|
+
export interface StructuredMemoryQuery {
|
|
60
|
+
scopeIds?: string[];
|
|
61
|
+
classes?: StructuredMemoryClass[];
|
|
62
|
+
canonicalKeys?: string[];
|
|
63
|
+
activeAt?: string;
|
|
64
|
+
includeSuperseded?: boolean;
|
|
65
|
+
includeExpired?: boolean;
|
|
66
|
+
minimumImportance?: number;
|
|
67
|
+
maximumCompressionGeneration?: number;
|
|
68
|
+
limit?: number;
|
|
69
|
+
}
|
|
70
|
+
export interface StructuredMemorySearchMatch {
|
|
71
|
+
record: StructuredMemoryRecord;
|
|
72
|
+
score: number;
|
|
73
|
+
matchedQuery: string;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Versioned generated memory. Classification is supplied by an inference
|
|
77
|
+
* result or an explicit caller contract; this store never guesses a class from
|
|
78
|
+
* keywords. Raw source text lives in ImmutableEvidenceStore, not here.
|
|
79
|
+
*/
|
|
80
|
+
export declare class StructuredMemoryStore {
|
|
81
|
+
private readonly db;
|
|
82
|
+
private extractionTransaction;
|
|
83
|
+
constructor(db: SqliteDatabase);
|
|
84
|
+
private ensureSchema;
|
|
85
|
+
append(input: StructuredMemoryInput): StructuredMemoryRecord;
|
|
86
|
+
/** One connection owns the claim check, derived records and queue settlement.
|
|
87
|
+
* Callbacks are synchronous; no model operation can hold this transaction. */
|
|
88
|
+
commitExtractionBatch(input: {
|
|
89
|
+
records: StructuredMemoryInput[];
|
|
90
|
+
assertCurrent: () => void;
|
|
91
|
+
settle: (records: StructuredMemoryRecord[]) => boolean;
|
|
92
|
+
}): StructuredMemoryRecord[];
|
|
93
|
+
get(id: string): StructuredMemoryRecord | null;
|
|
94
|
+
currentForKey(canonicalKey: string, activeAt?: string, scopeId?: string): StructuredMemoryRecord | null;
|
|
95
|
+
activeForKey(canonicalKey: string, activeAt?: string, scopeId?: string): StructuredMemoryRecord[];
|
|
96
|
+
history(canonicalKey: string, scopeId?: string): StructuredMemoryRecord[];
|
|
97
|
+
query(input?: StructuredMemoryQuery): StructuredMemoryRecord[];
|
|
98
|
+
/**
|
|
99
|
+
* Lexically locate derived memory, then let the caller expand immutable
|
|
100
|
+
* provenance and perform semantic reranking. A search hit is never evidence
|
|
101
|
+
* by itself and never bypasses scope, validity, TTL, or generation bounds.
|
|
102
|
+
*/
|
|
103
|
+
search(text: string, input?: Omit<StructuredMemoryQuery, "canonicalKeys">): StructuredMemorySearchMatch[];
|
|
104
|
+
}
|
|
105
|
+
export {};
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import type { HybridMemorySearchResult, MemoryChunkRecord, MemoryEmbeddingRecord, MemoryEmbeddingSetInput, MemoryEmbeddingSetRecord, MemoryGraphEdgeInput, MemoryGraphEdgeRecord, MemoryGraphNodeInput, MemoryGraphNodeRecord, MemoryItemNodeRecord, MemoryItemInput, MemoryItemKind, MemoryItemRecord, MemoryJobInput, MemoryJobRecord, MemoryLinkInput, MemoryLinkRecord, MemoryProvenanceInput, MemoryProvenanceRecord, MemoryRetrievalEventInput, MemoryScopeInput, MemoryScopeRecord, MemorySearchMatch, MemorySearchOptions, MemoryVector, MemoryWeightEventInput, StoreChunkEmbeddingOptions } from "./memoryTypes.js";
|
|
2
|
+
type SqliteDatabase = {
|
|
3
|
+
prepare(sql: string): {
|
|
4
|
+
all(...params: unknown[]): unknown[];
|
|
5
|
+
get(...params: unknown[]): unknown;
|
|
6
|
+
run(...params: unknown[]): {
|
|
7
|
+
changes: number;
|
|
8
|
+
lastInsertRowid: number | bigint;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
transaction<T extends (...args: never[]) => unknown>(fn: T): T & {
|
|
12
|
+
immediate: T;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
/** A queue ownership lease, independent of user-task or foreground deadlines. */
|
|
16
|
+
export declare const MEMORY_JOB_CLAIM_LEASE_MS: number;
|
|
17
|
+
export type MemoryJobClaim = Pick<MemoryJobRecord, "id" | "attempts" | "startedAt">;
|
|
18
|
+
export interface MemoryJobClaimScope {
|
|
19
|
+
scopeId: string;
|
|
20
|
+
profileSha256: string;
|
|
21
|
+
}
|
|
22
|
+
export interface MemoryEmbeddingCommitBinding {
|
|
23
|
+
scopeId: string;
|
|
24
|
+
itemId: string;
|
|
25
|
+
itemContentHash: string;
|
|
26
|
+
chunkId: string;
|
|
27
|
+
chunkSha256: string;
|
|
28
|
+
itemMetadataSha256: string;
|
|
29
|
+
scopeSha256: string;
|
|
30
|
+
}
|
|
31
|
+
export interface UnifiedMemoryStoreOptions {
|
|
32
|
+
defaultScopeName?: string;
|
|
33
|
+
defaultEmbeddingSetSlug?: string;
|
|
34
|
+
now?: () => Date;
|
|
35
|
+
}
|
|
36
|
+
export declare class UnifiedMemoryStore {
|
|
37
|
+
private readonly db;
|
|
38
|
+
private readonly defaultScopeName;
|
|
39
|
+
private readonly defaultEmbeddingSetSlug;
|
|
40
|
+
private readonly now;
|
|
41
|
+
constructor(db: SqliteDatabase, options?: UnifiedMemoryStoreOptions);
|
|
42
|
+
ensureScope(input: MemoryScopeInput): MemoryScopeRecord;
|
|
43
|
+
getScopeByName(name: string): MemoryScopeRecord | null;
|
|
44
|
+
getScopeById(id: string): MemoryScopeRecord | null;
|
|
45
|
+
ensureEmbeddingSet(input: MemoryEmbeddingSetInput): MemoryEmbeddingSetRecord;
|
|
46
|
+
getDefaultEmbeddingSet(): MemoryEmbeddingSetRecord;
|
|
47
|
+
getEmbeddingSetBySlug(slug: string): MemoryEmbeddingSetRecord | null;
|
|
48
|
+
getEmbeddingSetById(id: string): MemoryEmbeddingSetRecord | null;
|
|
49
|
+
upsertItem(input: MemoryItemInput): MemoryItemRecord;
|
|
50
|
+
getItem(id: string): MemoryItemRecord | null;
|
|
51
|
+
countItems(): number;
|
|
52
|
+
countChunks(): number;
|
|
53
|
+
countEmbeddings(embeddingSetSlug?: string): number;
|
|
54
|
+
countGraphNodes(): number;
|
|
55
|
+
countGraphEdges(activeOnly?: boolean): number;
|
|
56
|
+
getChunks(itemId: string): MemoryChunkRecord[];
|
|
57
|
+
getChunk(id: string): MemoryChunkRecord | null;
|
|
58
|
+
listEmbeddingChunks(input: {
|
|
59
|
+
scopeId: string;
|
|
60
|
+
kind?: MemoryItemKind;
|
|
61
|
+
source?: string;
|
|
62
|
+
afterChunkId?: string;
|
|
63
|
+
limit?: number;
|
|
64
|
+
}): MemoryChunkRecord[];
|
|
65
|
+
getChunkEmbeddings(chunkId: string): MemoryEmbeddingRecord[];
|
|
66
|
+
commitClaimedChunkEmbedding(claim: MemoryJobRecord, binding: MemoryEmbeddingCommitBinding, vector: MemoryVector, options: StoreChunkEmbeddingOptions): boolean;
|
|
67
|
+
storeChunkEmbedding(chunkId: string, vector: MemoryVector, options?: StoreChunkEmbeddingOptions): MemoryEmbeddingRecord;
|
|
68
|
+
recordProvenance(itemId: string, input: MemoryProvenanceInput): MemoryProvenanceRecord;
|
|
69
|
+
getProvenance(itemId: string): MemoryProvenanceRecord[];
|
|
70
|
+
createLink(input: MemoryLinkInput): MemoryLinkRecord;
|
|
71
|
+
searchLexical(query: string, options?: MemorySearchOptions): MemorySearchMatch[];
|
|
72
|
+
searchVector(queryVector: MemoryVector, options?: MemorySearchOptions): MemorySearchMatch[];
|
|
73
|
+
recordAccess(itemIds: string[]): void;
|
|
74
|
+
enqueueJob(input: MemoryJobInput): MemoryJobRecord;
|
|
75
|
+
getJob(id: string): MemoryJobRecord | null;
|
|
76
|
+
requeueCompletedJob(jobId: string, expectedAttempts: number): boolean;
|
|
77
|
+
claimJobs(jobTypes: string[], limit?: number, scope?: MemoryJobClaimScope, jobIds?: readonly string[]): MemoryJobRecord[];
|
|
78
|
+
isJobClaimCurrent(claim: MemoryJobClaim): boolean;
|
|
79
|
+
completeJob(jobId: string, claim: MemoryJobClaim): boolean;
|
|
80
|
+
failJob(jobId: string, error: string, opts: {
|
|
81
|
+
retry?: boolean;
|
|
82
|
+
delayMs?: number;
|
|
83
|
+
claim: MemoryJobClaim;
|
|
84
|
+
}): boolean;
|
|
85
|
+
listJobs(status?: MemoryJobRecord["status"], limit?: number): MemoryJobRecord[];
|
|
86
|
+
chunksMissingEmbedding(embeddingSetSlug?: string, limit?: number): MemoryChunkRecord[];
|
|
87
|
+
upsertGraphNode(input: MemoryGraphNodeInput): MemoryGraphNodeRecord;
|
|
88
|
+
linkItemToGraphNode(input: {
|
|
89
|
+
itemId: string;
|
|
90
|
+
nodeId: string;
|
|
91
|
+
relation?: string;
|
|
92
|
+
weight?: number;
|
|
93
|
+
evidence?: string;
|
|
94
|
+
}): MemoryItemNodeRecord;
|
|
95
|
+
createGraphEdge(input: MemoryGraphEdgeInput): MemoryGraphEdgeRecord;
|
|
96
|
+
clearItemGraph(itemId: string): void;
|
|
97
|
+
searchGraph(query: string, options?: MemorySearchOptions): MemorySearchMatch[];
|
|
98
|
+
recordRetrievalEvent(input: MemoryRetrievalEventInput): string;
|
|
99
|
+
recordRetrievalEvents(events: MemoryRetrievalEventInput[]): number;
|
|
100
|
+
applyWeightEvent(input: MemoryWeightEventInput): MemoryItemRecord | null;
|
|
101
|
+
reinforce(itemId: string, amount?: number, reason?: string): MemoryItemRecord | null;
|
|
102
|
+
decay(itemId: string, amount?: number, reason?: string): MemoryItemRecord | null;
|
|
103
|
+
decayStaleMemories(options?: {
|
|
104
|
+
olderThanDays?: number;
|
|
105
|
+
amount?: number;
|
|
106
|
+
maxItems?: number;
|
|
107
|
+
reason?: string;
|
|
108
|
+
}): {
|
|
109
|
+
decayed: number;
|
|
110
|
+
itemIds: string[];
|
|
111
|
+
};
|
|
112
|
+
private resolveScope;
|
|
113
|
+
private resolveEmbeddingSet;
|
|
114
|
+
private buildSearchFilters;
|
|
115
|
+
private buildEmbeddingSetFilter;
|
|
116
|
+
private searchTextLike;
|
|
117
|
+
private nowIso;
|
|
118
|
+
}
|
|
119
|
+
export declare function encodeMemoryVector(vector: MemoryVector): Buffer;
|
|
120
|
+
export declare function decodeMemoryVector(blob: unknown): Float32Array;
|
|
121
|
+
export declare function cosineMemorySimilarity(a: MemoryVector, b: MemoryVector): number;
|
|
122
|
+
export declare function normalizeFtsQuery(query: string): string;
|
|
123
|
+
export declare function normalizeVector(vector: MemoryVector): Float32Array;
|
|
124
|
+
export declare function itemQuality(item: Pick<MemoryItemRecord, "baseWeight" | "importance" | "confidence">): number;
|
|
125
|
+
export declare function clamp01(value: number): number;
|
|
126
|
+
export declare function coerceHybridResult(match: MemorySearchMatch): HybridMemorySearchResult;
|
|
127
|
+
export {};
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import type { EvidenceSearchFilters, EvidenceSearchMatch, ImmutableEvidenceChunk, ImmutableEvidenceStore } from "./immutableEvidenceStore.js";
|
|
2
|
+
export type VirtualMemoryLevel = "L0" | "L1" | "L2" | "L3" | "L4" | "L5";
|
|
3
|
+
export type VirtualMemoryOperation = "PAGE_IN" | "PAGE_OUT" | "PIN" | "UNPIN" | "EVICT" | "EXPAND" | "MERGE" | "SUPERSEDE" | "RECONSTRUCT";
|
|
4
|
+
export interface VirtualMemoryItem {
|
|
5
|
+
id: string;
|
|
6
|
+
level: VirtualMemoryLevel;
|
|
7
|
+
body?: string;
|
|
8
|
+
tokenCost: number;
|
|
9
|
+
relevance: number;
|
|
10
|
+
necessity: number;
|
|
11
|
+
provenanceStrength: number;
|
|
12
|
+
uniqueness: number;
|
|
13
|
+
recency: number;
|
|
14
|
+
unresolvedDependency: number;
|
|
15
|
+
futureDependencyProbability: number;
|
|
16
|
+
recoveryCost: number;
|
|
17
|
+
pinned: boolean;
|
|
18
|
+
sourceChunkIds: string[];
|
|
19
|
+
metadata?: Record<string, unknown>;
|
|
20
|
+
}
|
|
21
|
+
export interface VirtualMemoryTelemetryEvent {
|
|
22
|
+
id: string;
|
|
23
|
+
operation: VirtualMemoryOperation;
|
|
24
|
+
itemIds: string[];
|
|
25
|
+
fromLevel?: VirtualMemoryLevel;
|
|
26
|
+
toLevel?: VirtualMemoryLevel;
|
|
27
|
+
tokenDelta: number;
|
|
28
|
+
reason: string;
|
|
29
|
+
timestamp: string;
|
|
30
|
+
metadata: Record<string, unknown>;
|
|
31
|
+
}
|
|
32
|
+
export interface VirtualMemoryHierarchyOptions {
|
|
33
|
+
/** Runtime-discovered physical context window used to size resident levels. */
|
|
34
|
+
contextWindowTokens?: number;
|
|
35
|
+
/** Optional operator ceiling; it may reduce but never inflate the real window. */
|
|
36
|
+
residentTokenLimit?: number;
|
|
37
|
+
/** Maximum output tokens reserved outside the resident input hierarchy. */
|
|
38
|
+
maxOutputTokens?: number;
|
|
39
|
+
/** Additional provider/schema uncertainty reserve. */
|
|
40
|
+
outputSafetyTokens?: number;
|
|
41
|
+
capacities?: Partial<Record<VirtualMemoryLevel, number>>;
|
|
42
|
+
expandEvidence?: (chunkId: string) => string;
|
|
43
|
+
reconstruct?: (item: VirtualMemoryItem) => Promise<string> | string;
|
|
44
|
+
onTelemetry?: (event: VirtualMemoryTelemetryEvent) => void;
|
|
45
|
+
}
|
|
46
|
+
/** Observable residency management. L4/L5 are addressable backing stores, not prompt text. */
|
|
47
|
+
export declare class VirtualMemoryHierarchy {
|
|
48
|
+
private readonly options;
|
|
49
|
+
private readonly items;
|
|
50
|
+
private readonly events;
|
|
51
|
+
private readonly capacities;
|
|
52
|
+
constructor(options?: VirtualMemoryHierarchyOptions);
|
|
53
|
+
register(item: VirtualMemoryItem, reason?: string): VirtualMemoryItem;
|
|
54
|
+
get(id: string): VirtualMemoryItem | null;
|
|
55
|
+
list(level?: VirtualMemoryLevel): VirtualMemoryItem[];
|
|
56
|
+
pageIn(id: string, toLevel: VirtualMemoryLevel, reason: string): VirtualMemoryItem;
|
|
57
|
+
pageOut(id: string, toLevel: VirtualMemoryLevel, reason: string): VirtualMemoryItem;
|
|
58
|
+
pin(id: string, reason: string): VirtualMemoryItem;
|
|
59
|
+
unpin(id: string, reason: string): VirtualMemoryItem;
|
|
60
|
+
evict(id: string, reason: string): VirtualMemoryItem;
|
|
61
|
+
expand(id: string, reason: string): string[];
|
|
62
|
+
merge(input: VirtualMemoryItem, sourceItemIds: string[], reason: string): VirtualMemoryItem;
|
|
63
|
+
supersede(previousId: string, next: VirtualMemoryItem, reason: string): VirtualMemoryItem;
|
|
64
|
+
reconstruct(id: string, reason: string): Promise<string>;
|
|
65
|
+
telemetry(): VirtualMemoryTelemetryEvent[];
|
|
66
|
+
residentTokens(level: VirtualMemoryLevel): number;
|
|
67
|
+
capacityTokens(level: VirtualMemoryLevel): number;
|
|
68
|
+
private enforceCapacity;
|
|
69
|
+
private required;
|
|
70
|
+
private record;
|
|
71
|
+
}
|
|
72
|
+
export type ContextAllocationClass = "system_contract" | "pinned_state" | "structured_memory" | "recent_context" | "exact_evidence";
|
|
73
|
+
export interface ContextAllocationItem<T = unknown> {
|
|
74
|
+
id: string;
|
|
75
|
+
allocationClass: ContextAllocationClass;
|
|
76
|
+
tokenCost: number;
|
|
77
|
+
value: T;
|
|
78
|
+
score?: number;
|
|
79
|
+
required?: boolean;
|
|
80
|
+
sourceChunkIds?: string[];
|
|
81
|
+
}
|
|
82
|
+
export interface ContextBudget {
|
|
83
|
+
totalTokens: number;
|
|
84
|
+
outputHeadroom: number;
|
|
85
|
+
systemContract: number;
|
|
86
|
+
pinnedState: number;
|
|
87
|
+
structuredMemory: number;
|
|
88
|
+
recentContext: number;
|
|
89
|
+
exactEvidence: number;
|
|
90
|
+
}
|
|
91
|
+
export interface PackedContext<T = unknown> {
|
|
92
|
+
selected: Array<ContextAllocationItem<T>>;
|
|
93
|
+
dropped: Array<ContextAllocationItem<T>>;
|
|
94
|
+
usedTokens: number;
|
|
95
|
+
inputBudget: number;
|
|
96
|
+
outputHeadroom: number;
|
|
97
|
+
allocations: Record<ContextAllocationClass, number>;
|
|
98
|
+
}
|
|
99
|
+
export declare const DEFAULT_16K_CONTEXT_BUDGET: ContextBudget;
|
|
100
|
+
export interface AdaptiveContextBudgetInput {
|
|
101
|
+
/** Runtime-discovered physical context window. */
|
|
102
|
+
contextWindowTokens: number;
|
|
103
|
+
/** Optional operator limit; it can reduce but never inflate the real window. */
|
|
104
|
+
residentTokenLimit?: number;
|
|
105
|
+
/** Maximum tokens the active request may generate. */
|
|
106
|
+
maxOutputTokens?: number;
|
|
107
|
+
/** Provider/schema uncertainty reserve. Defaults to 5% of the resident window. */
|
|
108
|
+
outputSafetyTokens?: number;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Scale the complete working-set allocation to the runtime-discovered window.
|
|
112
|
+
* The 16K profile supplies proportions only; it is not a ceiling. Integer
|
|
113
|
+
* rounding is distributed so category capacity exactly equals input capacity.
|
|
114
|
+
*/
|
|
115
|
+
export declare function deriveAdaptiveContextBudget(input: AdaptiveContextBudgetInput): ContextBudget;
|
|
116
|
+
/**
|
|
117
|
+
* Typed budget allocator. It never classifies prose: callers must identify
|
|
118
|
+
* constraints, state, and evidence before packing. Required pinned state is
|
|
119
|
+
* retained ahead of recent dialogue, and exact evidence ahead of summaries.
|
|
120
|
+
*/
|
|
121
|
+
export declare function packVirtualContext<T>(items: Array<ContextAllocationItem<T>>, budget?: ContextBudget): PackedContext<T>;
|
|
122
|
+
export interface InferencePlannedSubquery {
|
|
123
|
+
id: string;
|
|
124
|
+
query: string;
|
|
125
|
+
exactStrings?: string[];
|
|
126
|
+
symbols?: string[];
|
|
127
|
+
entities?: string[];
|
|
128
|
+
filters?: EvidenceSearchFilters;
|
|
129
|
+
denseVector?: number[];
|
|
130
|
+
denseModel?: string;
|
|
131
|
+
graphEntityIds?: string[];
|
|
132
|
+
}
|
|
133
|
+
export interface InferenceQueryPlan {
|
|
134
|
+
subqueries: InferencePlannedSubquery[];
|
|
135
|
+
rationale?: string;
|
|
136
|
+
}
|
|
137
|
+
export interface HybridEvidenceRetrieverOptions {
|
|
138
|
+
candidateLimit?: number;
|
|
139
|
+
cheapRerankLimit?: number;
|
|
140
|
+
finalLimit?: number;
|
|
141
|
+
sourceCap?: number;
|
|
142
|
+
graphHops?: number;
|
|
143
|
+
neighborRadius?: number;
|
|
144
|
+
/** Source chunks reached through a scoped derived-memory index. */
|
|
145
|
+
seedCandidates?: EvidenceSearchMatch[];
|
|
146
|
+
rerank?: (input: {
|
|
147
|
+
plan: InferenceQueryPlan;
|
|
148
|
+
candidates: EvidenceSearchMatch[];
|
|
149
|
+
}) => Promise<Array<{
|
|
150
|
+
chunkId: string;
|
|
151
|
+
score: number;
|
|
152
|
+
rationale?: string;
|
|
153
|
+
}>>;
|
|
154
|
+
}
|
|
155
|
+
export interface HybridEvidenceRetrievalResult {
|
|
156
|
+
candidates: EvidenceSearchMatch[];
|
|
157
|
+
reranked: EvidenceSearchMatch[];
|
|
158
|
+
selected: EvidenceSearchMatch[];
|
|
159
|
+
replay: Array<{
|
|
160
|
+
chunkId: string;
|
|
161
|
+
documentId: string;
|
|
162
|
+
originalText: string;
|
|
163
|
+
charStart: number;
|
|
164
|
+
charEnd: number;
|
|
165
|
+
contentHash: string;
|
|
166
|
+
}>;
|
|
167
|
+
trace: {
|
|
168
|
+
subqueries: Array<{
|
|
169
|
+
id: string;
|
|
170
|
+
channels: Record<string, number>;
|
|
171
|
+
}>;
|
|
172
|
+
candidateIds: string[];
|
|
173
|
+
rerankedIds: string[];
|
|
174
|
+
selectedIds: string[];
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
/** High-recall union, reciprocal-rank fusion, optional inference reranking, and exact replay. */
|
|
178
|
+
export declare class HybridEvidenceRetriever {
|
|
179
|
+
private readonly store;
|
|
180
|
+
private readonly options;
|
|
181
|
+
constructor(store: ImmutableEvidenceStore, options?: HybridEvidenceRetrieverOptions);
|
|
182
|
+
retrieve(plan: InferenceQueryPlan): Promise<HybridEvidenceRetrievalResult>;
|
|
183
|
+
}
|
|
184
|
+
export declare function exactEvidenceAllocationItem<T extends {
|
|
185
|
+
chunk: ImmutableEvidenceChunk;
|
|
186
|
+
score: number;
|
|
187
|
+
}>(match: T): ContextAllocationItem<T>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type NativePageContentSource } from "../execution/page-content-source.js";
|
|
2
|
+
/** Current host custody of an observed returned view, never an HTTP receipt. */
|
|
3
|
+
export interface IssuedAgenticPageContentReceiptV1 {
|
|
4
|
+
readonly schema: "omnius.agentic-page-content-receipt.v1";
|
|
5
|
+
readonly scopeId: string;
|
|
6
|
+
readonly runId: string;
|
|
7
|
+
readonly taskEpoch: number;
|
|
8
|
+
readonly toolCallId: string;
|
|
9
|
+
readonly receipt: Readonly<Omit<NativePageContentSource, "body">>;
|
|
10
|
+
}
|
|
11
|
+
/** Internal execution seam; metadata and model output cannot issue custody. */
|
|
12
|
+
export declare function issueAgenticPageContentReceipt(input: {
|
|
13
|
+
source: NativePageContentSource;
|
|
14
|
+
scopeId: string;
|
|
15
|
+
runId: string;
|
|
16
|
+
taskEpoch: number;
|
|
17
|
+
toolCallId: string;
|
|
18
|
+
}): IssuedAgenticPageContentReceiptV1 | undefined;
|
|
19
|
+
/** Deserialization never restores the live host-issued identity. */
|
|
20
|
+
export declare function getIssuedAgenticPageContentReceipt(value: unknown): IssuedAgenticPageContentReceiptV1 | null;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type NativeWebSource } from "../execution/web-source.js";
|
|
2
|
+
import { type NativeStreamedWebSource } from "../execution/streamed-web-source.js";
|
|
3
|
+
export interface IssuedAgenticWebFetchReceiptV1 {
|
|
4
|
+
readonly schema: "omnius.agentic-web-fetch-receipt.v1";
|
|
5
|
+
readonly scopeId: string;
|
|
6
|
+
readonly runId: string;
|
|
7
|
+
readonly taskEpoch: number;
|
|
8
|
+
readonly toolCallId: string;
|
|
9
|
+
readonly receipt: Readonly<NativeWebSource["receipt"]>;
|
|
10
|
+
}
|
|
11
|
+
/** Internal producer seam; copied JSON and display strings cannot issue custody. */
|
|
12
|
+
export declare function issueAgenticWebFetchReceipt(input: {
|
|
13
|
+
source: NativeWebSource | NativeStreamedWebSource;
|
|
14
|
+
scopeId: string;
|
|
15
|
+
runId: string;
|
|
16
|
+
taskEpoch: number;
|
|
17
|
+
toolCallId: string;
|
|
18
|
+
}): IssuedAgenticWebFetchReceiptV1 | undefined;
|
|
19
|
+
/** A live host-issued record is required; deserialization never restores authority. */
|
|
20
|
+
export declare function getIssuedAgenticWebFetchReceipt(value: unknown): IssuedAgenticWebFetchReceiptV1 | null;
|