omnius 1.0.953 → 1.0.955
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/_types/execution/native-file-write-observation.d.ts +19 -0
- package/dist/_types/execution/native-memory-view-provider.d.ts +84 -0
- package/dist/_types/execution/shell-runs.d.ts +4 -0
- package/dist/_types/execution/tool-output-spool.d.ts +61 -0
- package/dist/_types/execution/tools/file-write.d.ts +53 -0
- package/dist/_types/execution/types.d.ts +34 -0
- package/dist/_types/execution/work-mode-capability.d.ts +23 -0
- package/dist/_types/memory/candidateCoverage.d.ts +23 -0
- package/dist/_types/memory/embeddings.d.ts +1 -1
- package/dist/_types/memory/memoryCapability.d.ts +259 -0
- package/dist/_types/memory/memorySourceResolver.d.ts +131 -0
- package/dist/_types/memory/memoryTypes.d.ts +16 -0
- package/dist/_types/memory/structuredMemoryStore.d.ts +63 -6
- package/dist/_types/memory/unifiedMemoryStore.d.ts +12 -1
- package/dist/_types/orchestrator/agenticRunner.d.ts +236 -48
- package/dist/_types/orchestrator/authored-instruction-context.d.ts +59 -0
- package/dist/_types/orchestrator/authored-instruction-revisions.d.ts +56 -0
- package/dist/_types/orchestrator/authored-instruction-sources.d.ts +60 -0
- package/dist/_types/orchestrator/auxiliary-context-operation.d.ts +196 -0
- package/dist/_types/orchestrator/brokered-tool-composition.d.ts +141 -0
- package/dist/_types/orchestrator/completionReadiness.d.ts +2 -2
- package/dist/_types/orchestrator/confined-composition-worker.d.ts +45 -0
- package/dist/_types/orchestrator/contentAddressedArtifactStore.d.ts +173 -0
- package/dist/_types/orchestrator/contextWindowDump.d.ts +4 -0
- package/dist/_types/orchestrator/explicit-work-mode.d.ts +92 -0
- package/dist/_types/orchestrator/interruption-lifecycle.d.ts +3 -0
- package/dist/_types/orchestrator/memory-capability-context.d.ts +49 -0
- package/dist/_types/orchestrator/owned-inference-wait.d.ts +123 -0
- package/dist/_types/orchestrator/owned-model-wait.d.ts +26 -0
- package/dist/_types/orchestrator/provider-context-contract.d.ts +78 -0
- package/dist/_types/orchestrator/request-tool-capabilities.d.ts +52 -0
- package/dist/_types/orchestrator/structured-memory-extraction-worker.d.ts +20 -0
- package/dist/_types/orchestrator/structuredMemoryInference.d.ts +12 -0
- package/dist/_types/orchestrator/successful-procedure-memory.d.ts +35 -0
- package/dist/api/py-embed.js +70 -17
- package/dist/index.js +2 -2
- package/dist/library.js +115267 -108004
- package/dist/memory-maintenance-worker.js +486 -81
- package/dist/omni-setup-worker.js +83 -30
- package/dist/tui/native/worker.js +3 -1
- package/dist/update-worker-runtime.js +270 -126
- package/docs/DISCOVERY.json +63 -0
- package/docs/DISCOVERY.md +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { type HostMemoryBindingV1, type MemoryContractIssuer, type MemorySearchResultV1, type MemorySearchMatchV1, type MemorySourceV1 } from "./memoryCapability.js";
|
|
2
|
+
export type MemorySourceKind = "observation" | "derived_claim" | "procedure" | "old_plan" | "unclassified_record";
|
|
3
|
+
export interface MemorySourceLocator {
|
|
4
|
+
kind: string;
|
|
5
|
+
[key: string]: string;
|
|
6
|
+
}
|
|
7
|
+
export interface MemorySourceNativeIdentity {
|
|
8
|
+
namespace: string;
|
|
9
|
+
storeRef: string;
|
|
10
|
+
scopeRef: string;
|
|
11
|
+
occurrenceId: string;
|
|
12
|
+
scopeName?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface MemorySourceCurrent {
|
|
15
|
+
text?: string;
|
|
16
|
+
version?: string;
|
|
17
|
+
identity?: MemorySourceNativeIdentity;
|
|
18
|
+
historical?: boolean;
|
|
19
|
+
sourceKind?: MemorySourceKind;
|
|
20
|
+
reasonCode?: string;
|
|
21
|
+
}
|
|
22
|
+
/** Optional host adapter to an EXISTING immutable archive. No full bodies live in the catalog. */
|
|
23
|
+
export interface MemorySourceArchive {
|
|
24
|
+
maxStoreBytes: number;
|
|
25
|
+
retain(input: {
|
|
26
|
+
text: string;
|
|
27
|
+
sha256: string;
|
|
28
|
+
source: MemorySourceV1;
|
|
29
|
+
}): Promise<string> | string;
|
|
30
|
+
read(input: {
|
|
31
|
+
reference: string;
|
|
32
|
+
sha256: string;
|
|
33
|
+
maxBytes: number;
|
|
34
|
+
source: MemorySourceV1;
|
|
35
|
+
}): Promise<string> | string;
|
|
36
|
+
}
|
|
37
|
+
export interface MemorySourceAdmission {
|
|
38
|
+
sourceRef: string;
|
|
39
|
+
fullText: string;
|
|
40
|
+
version: string;
|
|
41
|
+
locator: MemorySourceLocator;
|
|
42
|
+
sourceKind?: MemorySourceKind;
|
|
43
|
+
}
|
|
44
|
+
export interface MemorySourceOpenRequest {
|
|
45
|
+
source_ref: string;
|
|
46
|
+
start_byte?: number;
|
|
47
|
+
max_bytes?: number;
|
|
48
|
+
cursor?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface MemorySourceOpenItem {
|
|
51
|
+
itemId: string;
|
|
52
|
+
originSourceRef?: string;
|
|
53
|
+
status: "ready" | "unavailable";
|
|
54
|
+
reasonCode?: string;
|
|
55
|
+
sourceRef?: string;
|
|
56
|
+
sourceKind?: MemorySourceKind;
|
|
57
|
+
fullContentSha256?: string;
|
|
58
|
+
totalBytes?: number;
|
|
59
|
+
startByte?: number;
|
|
60
|
+
endByte?: number;
|
|
61
|
+
nextCursor?: string;
|
|
62
|
+
stale?: boolean;
|
|
63
|
+
custody?: "hot_issued" | "current_store_revalidated";
|
|
64
|
+
}
|
|
65
|
+
export interface MemorySourceQuerySnapshot {
|
|
66
|
+
id: string;
|
|
67
|
+
bindingRevision: string;
|
|
68
|
+
}
|
|
69
|
+
export interface MemorySourceResolverOptions {
|
|
70
|
+
workspaceRoot: string;
|
|
71
|
+
getBinding(): HostMemoryBindingV1 | undefined;
|
|
72
|
+
readCurrent(locator: MemorySourceLocator, source: MemorySourceV1): Promise<MemorySourceCurrent> | MemorySourceCurrent;
|
|
73
|
+
archive?: MemorySourceArchive;
|
|
74
|
+
maxEntries?: number;
|
|
75
|
+
maxCatalogBytes?: number;
|
|
76
|
+
maxSourceBytes?: number;
|
|
77
|
+
maxBatchBytes?: number;
|
|
78
|
+
maxRangeBytes?: number;
|
|
79
|
+
maxItems?: number;
|
|
80
|
+
}
|
|
81
|
+
/** Minimal integrity-checked caches of source admissions/cursors. Current native reads
|
|
82
|
+
* independently revalidate source identity/scope/version/hash. Only a private hot
|
|
83
|
+
* issuer observation permits archival fallback; writable catalog HMACs are not authority.
|
|
84
|
+
* Source refs/JSON alone never grant access.
|
|
85
|
+
* Mutable-store locators reopen only the exact captured version/hash; optional historical bodies
|
|
86
|
+
* remain in the host's existing immutable archive. Descriptor collection never opens this store. */
|
|
87
|
+
export declare class MemorySourceResolver {
|
|
88
|
+
private readonly options;
|
|
89
|
+
private readonly root;
|
|
90
|
+
private readonly dir;
|
|
91
|
+
private readonly maxEntries;
|
|
92
|
+
private readonly maxBytes;
|
|
93
|
+
private readonly maxSourceBytes;
|
|
94
|
+
private readonly maxBatchBytes;
|
|
95
|
+
private readonly maxRangeBytes;
|
|
96
|
+
private readonly maxItems;
|
|
97
|
+
private readyBinding?;
|
|
98
|
+
constructor(options: MemorySourceResolverOptions);
|
|
99
|
+
status(): {
|
|
100
|
+
status: "ready" | "deferred";
|
|
101
|
+
reasonCode?: string;
|
|
102
|
+
};
|
|
103
|
+
private binding;
|
|
104
|
+
private open;
|
|
105
|
+
private mac;
|
|
106
|
+
private verified;
|
|
107
|
+
admit(issuer: MemoryContractIssuer, result: MemorySearchResultV1, admissions: readonly MemorySourceAdmission[]): Promise<Array<{
|
|
108
|
+
sourceRef: string;
|
|
109
|
+
status: "ready" | "unavailable";
|
|
110
|
+
reasonCode?: string;
|
|
111
|
+
sourceKind?: MemorySourceKind;
|
|
112
|
+
}>>;
|
|
113
|
+
/** Store bounded candidate identity/order, not source bodies or a new semantic ranking. */
|
|
114
|
+
saveQuery(issuer: MemoryContractIssuer, result: MemorySearchResultV1, queryKey: string): MemorySourceQuerySnapshot | undefined;
|
|
115
|
+
candidateCursor(snapshot: MemorySourceQuerySnapshot, offset: number): string | undefined;
|
|
116
|
+
page(cursor: string, pageSize?: number, options?: {
|
|
117
|
+
signal?: AbortSignal;
|
|
118
|
+
}): Promise<{
|
|
119
|
+
matches: MemorySearchMatchV1[];
|
|
120
|
+
snapshot: MemorySourceQuerySnapshot;
|
|
121
|
+
offset: number;
|
|
122
|
+
nextCursor?: string;
|
|
123
|
+
stale: boolean;
|
|
124
|
+
}>;
|
|
125
|
+
expand(requests: readonly MemorySourceOpenRequest[], options?: {
|
|
126
|
+
signal?: AbortSignal;
|
|
127
|
+
}): Promise<{
|
|
128
|
+
items: MemorySourceOpenItem[];
|
|
129
|
+
matches: MemorySearchMatchV1[];
|
|
130
|
+
}>;
|
|
131
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { MemoryCandidateObserver } from "./candidateCoverage.js";
|
|
1
2
|
export type JsonObject = Record<string, unknown>;
|
|
2
3
|
export type MemoryScopeKind = "global" | "project" | "session" | "social" | "source" | "custom";
|
|
3
4
|
export type MemoryItemKind = "note" | "procedure" | "episode" | "task" | "failure" | "tool_output" | "media" | "social" | "code" | "custom";
|
|
@@ -189,6 +190,20 @@ export interface MemoryJobRecord {
|
|
|
189
190
|
updatedAt: string;
|
|
190
191
|
}
|
|
191
192
|
export interface MemorySearchOptions {
|
|
193
|
+
onCandidateCoverage?: MemoryCandidateObserver;
|
|
194
|
+
queryEmbeddingModel?: string;
|
|
195
|
+
/** Optional independently verified encoder revision/digest, matched to embedding-set metadata.profileRef. */
|
|
196
|
+
queryEmbeddingProfileRef?: string;
|
|
197
|
+
/** World-time eligibility and recorded snapshot; does not reconstruct overwritten item versions. */
|
|
198
|
+
activeAt?: string;
|
|
199
|
+
recordedAsOf?: string;
|
|
200
|
+
graphBudget?: {
|
|
201
|
+
maxNodes?: number;
|
|
202
|
+
maxEdges?: number;
|
|
203
|
+
maxHops?: number;
|
|
204
|
+
maxDurationMs?: number;
|
|
205
|
+
maxSourceTokens?: number;
|
|
206
|
+
};
|
|
192
207
|
limit?: number;
|
|
193
208
|
scopeNames?: string[];
|
|
194
209
|
scopeIds?: string[];
|
|
@@ -216,6 +231,7 @@ export interface MemorySearchMatch {
|
|
|
216
231
|
rawScore?: number;
|
|
217
232
|
vectorSimilarity?: number;
|
|
218
233
|
embedding?: Float32Array;
|
|
234
|
+
graphSupports?: MemoryGraphEdgeRecord[];
|
|
219
235
|
}
|
|
220
236
|
export interface HybridMemorySearchInput extends MemorySearchOptions {
|
|
221
237
|
query: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type MemorySourceV1 } from "./memoryCapability.js";
|
|
1
2
|
type SqliteDatabase = {
|
|
2
3
|
exec(sql: string): void;
|
|
3
4
|
prepare(sql: string): {
|
|
@@ -13,6 +14,12 @@ export type StructuredMemoryClass = "fact" | "constraint" | "decision" | "entity
|
|
|
13
14
|
export type StructuredMemoryFidelity = "exact" | "derived" | "unverified";
|
|
14
15
|
export interface StructuredMemorySourceSpan {
|
|
15
16
|
chunkId: string;
|
|
17
|
+
documentId?: string;
|
|
18
|
+
chunkSha256?: string;
|
|
19
|
+
documentSha256?: string;
|
|
20
|
+
sourceVersion?: string;
|
|
21
|
+
/** Captured source metadata, never an issued reader or permission grant. */
|
|
22
|
+
source?: MemorySourceV1;
|
|
16
23
|
charStart?: number;
|
|
17
24
|
charEnd?: number;
|
|
18
25
|
byteStart?: number;
|
|
@@ -34,6 +41,7 @@ export interface StructuredMemoryInput {
|
|
|
34
41
|
metadata?: Record<string, unknown>;
|
|
35
42
|
compressionGeneration?: number;
|
|
36
43
|
supersedesId?: string;
|
|
44
|
+
derivation?: Record<string, unknown>;
|
|
37
45
|
/** Required when a canonical key already has a different active value. */
|
|
38
46
|
conflictDisposition?: "supersede" | "compete";
|
|
39
47
|
}
|
|
@@ -52,6 +60,9 @@ export interface StructuredMemoryRecord {
|
|
|
52
60
|
validUntil?: string;
|
|
53
61
|
supersedesId?: string;
|
|
54
62
|
supersededById?: string;
|
|
63
|
+
recordedUntil?: string;
|
|
64
|
+
derivation?: Record<string, unknown>;
|
|
65
|
+
rootSourceIds: string[];
|
|
55
66
|
compressionGeneration: number;
|
|
56
67
|
metadata: Record<string, unknown>;
|
|
57
68
|
createdAt: string;
|
|
@@ -61,6 +72,8 @@ export interface StructuredMemoryQuery {
|
|
|
61
72
|
classes?: StructuredMemoryClass[];
|
|
62
73
|
canonicalKeys?: string[];
|
|
63
74
|
activeAt?: string;
|
|
75
|
+
/** World validity and knowledge time are independent. Current access is still required. */
|
|
76
|
+
recordedAsOf?: string;
|
|
64
77
|
includeSuperseded?: boolean;
|
|
65
78
|
includeExpired?: boolean;
|
|
66
79
|
minimumImportance?: number;
|
|
@@ -72,15 +85,15 @@ export interface StructuredMemorySearchMatch {
|
|
|
72
85
|
score: number;
|
|
73
86
|
matchedQuery: string;
|
|
74
87
|
}
|
|
75
|
-
/**
|
|
76
|
-
|
|
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
|
-
*/
|
|
88
|
+
/** Native millisecond ISO view; date parsing never establishes semantic truth. */
|
|
89
|
+
export declare function normalizeMemoryTimestamp(value: string, label?: string): string;
|
|
80
90
|
export declare class StructuredMemoryStore {
|
|
81
91
|
private readonly db;
|
|
82
92
|
private extractionTransaction;
|
|
83
|
-
|
|
93
|
+
private readonly sourceStoreRef;
|
|
94
|
+
constructor(db: SqliteDatabase, options?: {
|
|
95
|
+
readOnly?: boolean;
|
|
96
|
+
});
|
|
84
97
|
private ensureSchema;
|
|
85
98
|
append(input: StructuredMemoryInput): StructuredMemoryRecord;
|
|
86
99
|
/** One connection owns the claim check, derived records and queue settlement.
|
|
@@ -90,11 +103,55 @@ export declare class StructuredMemoryStore {
|
|
|
90
103
|
assertCurrent: () => void;
|
|
91
104
|
settle: (records: StructuredMemoryRecord[]) => boolean;
|
|
92
105
|
}): StructuredMemoryRecord[];
|
|
106
|
+
private captureSource;
|
|
107
|
+
/** Host-only access/availability state. Historical time never rewinds a present revocation. */
|
|
108
|
+
setSourceEligibility(input: {
|
|
109
|
+
chunkId: string;
|
|
110
|
+
scopeId?: string;
|
|
111
|
+
status: "active" | "revoked" | "unavailable";
|
|
112
|
+
reasonCode?: string;
|
|
113
|
+
}): void;
|
|
114
|
+
getEligibility(id: string): {
|
|
115
|
+
eligible: boolean;
|
|
116
|
+
reasonCode?: string;
|
|
117
|
+
rootSourceIds: string[];
|
|
118
|
+
};
|
|
93
119
|
get(id: string): StructuredMemoryRecord | null;
|
|
94
120
|
currentForKey(canonicalKey: string, activeAt?: string, scopeId?: string): StructuredMemoryRecord | null;
|
|
95
121
|
activeForKey(canonicalKey: string, activeAt?: string, scopeId?: string): StructuredMemoryRecord[];
|
|
96
122
|
history(canonicalKey: string, scopeId?: string): StructuredMemoryRecord[];
|
|
97
123
|
query(input?: StructuredMemoryQuery): StructuredMemoryRecord[];
|
|
124
|
+
queryView(input?: StructuredMemoryQuery): {
|
|
125
|
+
schema: "omnius.structured-memory-view.v1";
|
|
126
|
+
semantics: {
|
|
127
|
+
validAt: string;
|
|
128
|
+
knownAt: string;
|
|
129
|
+
sourceAccess: string;
|
|
130
|
+
interpretationTruth: string;
|
|
131
|
+
};
|
|
132
|
+
records: StructuredMemoryRecord[];
|
|
133
|
+
unresolvedCanonicalAlternatives: {
|
|
134
|
+
canonicalKey: string;
|
|
135
|
+
scopeId: string | undefined;
|
|
136
|
+
recordIds: string[];
|
|
137
|
+
}[];
|
|
138
|
+
distinctOriginalSourceCount: number;
|
|
139
|
+
coverage: {
|
|
140
|
+
candidateLimit: number;
|
|
141
|
+
examinedRecords: number;
|
|
142
|
+
eligibleRecords: number;
|
|
143
|
+
sourceExcludedRecords: number;
|
|
144
|
+
sourceExclusionsOmitted: number;
|
|
145
|
+
returnedRecords: number;
|
|
146
|
+
candidateLimitReached: boolean;
|
|
147
|
+
complete: boolean;
|
|
148
|
+
};
|
|
149
|
+
sourceExclusions: {
|
|
150
|
+
recordId: string;
|
|
151
|
+
reasonCode: string;
|
|
152
|
+
}[];
|
|
153
|
+
};
|
|
154
|
+
private queryInternal;
|
|
98
155
|
/**
|
|
99
156
|
* Lexically locate derived memory, then let the caller expand immutable
|
|
100
157
|
* provenance and perform semantic reranking. A search hit is never evidence
|
|
@@ -29,6 +29,8 @@ export interface MemoryEmbeddingCommitBinding {
|
|
|
29
29
|
scopeSha256: string;
|
|
30
30
|
}
|
|
31
31
|
export interface UnifiedMemoryStoreOptions {
|
|
32
|
+
/** Existing schema only; the underlying DB must also be opened readonly. */
|
|
33
|
+
readOnly?: boolean;
|
|
32
34
|
defaultScopeName?: string;
|
|
33
35
|
defaultEmbeddingSetSlug?: string;
|
|
34
36
|
now?: () => Date;
|
|
@@ -85,6 +87,7 @@ export declare class UnifiedMemoryStore {
|
|
|
85
87
|
listJobs(status?: MemoryJobRecord["status"], limit?: number): MemoryJobRecord[];
|
|
86
88
|
chunksMissingEmbedding(embeddingSetSlug?: string, limit?: number): MemoryChunkRecord[];
|
|
87
89
|
upsertGraphNode(input: MemoryGraphNodeInput): MemoryGraphNodeRecord;
|
|
90
|
+
getGraphNode(id: string): MemoryGraphNodeRecord | null;
|
|
88
91
|
linkItemToGraphNode(input: {
|
|
89
92
|
itemId: string;
|
|
90
93
|
nodeId: string;
|
|
@@ -95,8 +98,16 @@ export declare class UnifiedMemoryStore {
|
|
|
95
98
|
createGraphEdge(input: MemoryGraphEdgeInput): MemoryGraphEdgeRecord;
|
|
96
99
|
clearItemGraph(itemId: string): void;
|
|
97
100
|
searchGraph(query: string, options?: MemorySearchOptions): MemorySearchMatch[];
|
|
101
|
+
/** Explicit graph mode only. Every traversed relation is typed, scoped and
|
|
102
|
+
* backed by a currently eligible direct source item. A failed graph route
|
|
103
|
+
* contributes nothing; independent passage/adjacency retrieval survives. */
|
|
104
|
+
private expandGraphSources;
|
|
98
105
|
recordRetrievalEvent(input: MemoryRetrievalEventInput): string;
|
|
99
|
-
|
|
106
|
+
/** Optional foreground telemetry can yield immediately to an existing writer.
|
|
107
|
+
* The default retains the caller's normal SQLite busy policy. */
|
|
108
|
+
recordRetrievalEvents(events: MemoryRetrievalEventInput[], options?: {
|
|
109
|
+
bestEffort?: boolean;
|
|
110
|
+
}): number;
|
|
100
111
|
applyWeightEvent(input: MemoryWeightEventInput): MemoryItemRecord | null;
|
|
101
112
|
reinforce(itemId: string, amount?: number, reason?: string): MemoryItemRecord | null;
|
|
102
113
|
decay(itemId: string, amount?: number, reason?: string): MemoryItemRecord | null;
|