dotmem 0.2.3 → 0.2.5
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/CHANGELOG.md +24 -4
- package/MEMORY.md +2 -0
- package/OVERVIEW.md +376 -378
- package/README.md +461 -456
- package/agent.cjs +135 -27
- package/agent.js +135 -27
- package/built-in-context.json +12 -12
- package/cli.cjs +263 -139
- package/cli.js +263 -139
- package/context/profiles/joy/ai.md +1 -1
- package/context/profiles/joy/behavior.md +16 -0
- package/context/profiles/joy/soul.md +1 -1
- package/global.cjs +135 -27
- package/global.js +135 -27
- package/index.cjs +165 -57
- package/index.js +165 -57
- package/llms.txt +6 -0
- package/mcp.cjs +192 -81
- package/mcp.js +192 -81
- package/package.json +4 -4
- package/types/fflate-browser.d.ts +1 -5
- package/types/global-types.d.ts +82 -306
- package/types/memory.d.ts +7 -39
- package/types/policy.d.ts +5 -25
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dotmem",
|
|
3
3
|
"codeName": "dotmem",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.5",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"description": "The AI memory layer for agents and apps: acquired experience, discovery, context projection, continuity, and logic engine. Built on Memorio's state+store foundation.",
|
|
@@ -75,13 +75,13 @@
|
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"@modelcontextprotocol/server": "2.4.0",
|
|
78
|
-
"memorio": "5.5.
|
|
79
|
-
"reactflow": "11.11.4",
|
|
78
|
+
"memorio": "5.5.5",
|
|
80
79
|
"zod": "4.6.7"
|
|
81
80
|
},
|
|
82
81
|
"overrides": {
|
|
83
82
|
"glob": "^14.0.2",
|
|
84
|
-
"minimatch": "^11.0.1"
|
|
83
|
+
"minimatch": "^11.0.1",
|
|
84
|
+
"picomatch": "^4.0.7"
|
|
85
85
|
},
|
|
86
86
|
"typings": "./index.d.ts",
|
|
87
87
|
"scripts": {
|
package/types/global-types.d.ts
CHANGED
|
@@ -210,52 +210,11 @@ interface CapturePayload {
|
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
type ShortIntent =
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
| 'update'
|
|
219
|
-
| 'patch'
|
|
220
|
-
| 'acquire'
|
|
221
|
-
| 'verify'
|
|
222
|
-
| 'important'
|
|
223
|
-
| 'avoid'
|
|
224
|
-
| 'prefer'
|
|
225
|
-
| 'warning'
|
|
226
|
-
| 'context'
|
|
227
|
-
| 'bootstrap'
|
|
228
|
-
| 'rules'
|
|
229
|
-
| 'policy'
|
|
230
|
-
| 'project'
|
|
231
|
-
| 'discover'
|
|
232
|
-
| 'inspect'
|
|
233
|
-
| 'dump'
|
|
234
|
-
| 'audit'
|
|
235
|
-
| 'health'
|
|
236
|
-
| 'doctor'
|
|
237
|
-
| 'repair'
|
|
238
|
-
| 'cleanup'
|
|
239
|
-
| 'relate'
|
|
240
|
-
| 'link'
|
|
241
|
-
| 'unlink'
|
|
242
|
-
| 'merge'
|
|
243
|
-
| 'configure'
|
|
244
|
-
| 'capabilities'
|
|
245
|
-
| 'seed'
|
|
246
|
-
| 'capture'
|
|
247
|
-
|
|
248
|
-
type ShortResultStatus =
|
|
249
|
-
| 'completed'
|
|
250
|
-
| 'failed'
|
|
251
|
-
| 'blocked'
|
|
252
|
-
| 'pending'
|
|
253
|
-
| 'skipped'
|
|
254
|
-
|
|
255
|
-
type IntentHandler = (
|
|
256
|
-
runtime: any,
|
|
257
|
-
payload: unknown
|
|
258
|
-
) => Promise<ShortResultBase>
|
|
213
|
+
type ShortIntent = 'note' | 'remember' | 'recall' | 'forget' | 'update' | 'patch' | 'acquire' | 'verify' | 'important' | 'avoid' | 'prefer' | 'warning' | 'context' | 'bootstrap' | 'rules' | 'policy' | 'project' | 'discover' | 'inspect' | 'dump' | 'audit' | 'projectAudit' | 'health' | 'doctor' | 'repair' | 'cleanup' | 'relate' | 'link' | 'unlink' | 'merge' | 'configure' | 'capabilities' | 'seed' | 'capture'
|
|
214
|
+
|
|
215
|
+
type ShortResultStatus = 'completed' | 'failed' | 'blocked' | 'pending' | 'skipped'
|
|
216
|
+
|
|
217
|
+
type IntentHandler = (runtime: any, payload: unknown) => Promise<ShortResultBase>
|
|
259
218
|
|
|
260
219
|
interface BuildProfileDocument {
|
|
261
220
|
readonly name: string
|
|
@@ -405,36 +364,12 @@ interface DotMemEncryptedEnvelope {
|
|
|
405
364
|
|
|
406
365
|
interface SubtleCryptoLike {
|
|
407
366
|
digest(algorithm: string, data: Uint8Array): Promise<Uint8Array>
|
|
408
|
-
deriveKey(
|
|
409
|
-
|
|
410
|
-
baseKey: CryptoKey,
|
|
411
|
-
derivedKeyAlgorithm: AlikeAlgorithm,
|
|
412
|
-
extractable: boolean,
|
|
413
|
-
keyUsages: SubKeyUsages
|
|
414
|
-
): Promise<CryptoKey>
|
|
415
|
-
deriveBits(
|
|
416
|
-
algorithm: AlikeAlgorithm,
|
|
417
|
-
baseKey: CryptoKey,
|
|
418
|
-
length: number
|
|
419
|
-
): Promise<Uint8Array>
|
|
367
|
+
deriveKey(algorithm: AlikeAlgorithm, baseKey: CryptoKey, derivedKeyAlgorithm: AlikeAlgorithm, extractable: boolean, keyUsages: SubKeyUsages): Promise<CryptoKey>
|
|
368
|
+
deriveBits(algorithm: AlikeAlgorithm, baseKey: CryptoKey, length: number): Promise<Uint8Array>
|
|
420
369
|
exportKey(format: string, key: CryptoKey): Promise<Uint8Array>
|
|
421
|
-
importKey(
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
algorithm: AlikeAlgorithm,
|
|
425
|
-
extractable: boolean,
|
|
426
|
-
keyUsages: SubKeyUsages
|
|
427
|
-
): Promise<CryptoKey>
|
|
428
|
-
encrypt(
|
|
429
|
-
algorithm: AlikeAlgorithm,
|
|
430
|
-
key: CryptoKey,
|
|
431
|
-
data: Uint8Array
|
|
432
|
-
): Promise<Uint8Array>
|
|
433
|
-
decrypt(
|
|
434
|
-
algorithm: AlikeAlgorithm,
|
|
435
|
-
key: CryptoKey,
|
|
436
|
-
data: Uint8Array
|
|
437
|
-
): Promise<Uint8Array>
|
|
370
|
+
importKey(format: string, keyData: Uint8Array, algorithm: AlikeAlgorithm, extractable: boolean, keyUsages: SubKeyUsages): Promise<CryptoKey>
|
|
371
|
+
encrypt(algorithm: AlikeAlgorithm, key: CryptoKey, data: Uint8Array): Promise<Uint8Array>
|
|
372
|
+
decrypt(algorithm: AlikeAlgorithm, key: CryptoKey, data: Uint8Array): Promise<Uint8Array>
|
|
438
373
|
}
|
|
439
374
|
|
|
440
375
|
type SubKeyUsages = readonly ['encrypt', 'decrypt'] | readonly ['deriveKey'] | readonly ['deriveBits']
|
|
@@ -493,54 +428,54 @@ interface ContextRunOptions {
|
|
|
493
428
|
/** With `explain`, return the structured explanation model instead of rendered text. */
|
|
494
429
|
json?: boolean
|
|
495
430
|
/**
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
431
|
+
* Explicit current HI identity supplied by the runtime (the operator layer).
|
|
432
|
+
*
|
|
433
|
+
* This is the only channel through which a current USER_IDENTITY may enter
|
|
434
|
+
* the projection. An ordinary memory
|
|
435
|
+
* claim named `user-name` never asserts current identity; it remains
|
|
436
|
+
* historical evidence in the store.
|
|
437
|
+
*/
|
|
503
438
|
hiIdentity?: string
|
|
504
439
|
/**
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
440
|
+
* Explicit current HI assignment for the AGENT identity (the operator layer).
|
|
441
|
+
*
|
|
442
|
+
* When present it wins over the canonical profile default; when absent the
|
|
443
|
+
* resolver uses the profile. Memory and context never assign it.
|
|
444
|
+
*/
|
|
510
445
|
agentIdentity?: string
|
|
511
446
|
/**
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
447
|
+
* Scoped, temporary overlays for this run. Overlays may
|
|
448
|
+
* influence behavior but never identity, invariants, or authority, and they
|
|
449
|
+
* are never persisted.
|
|
450
|
+
*/
|
|
516
451
|
overlays?: readonly unknown[]
|
|
517
452
|
/**
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
453
|
+
* A verified carrier handshake session record.
|
|
454
|
+
*
|
|
455
|
+
* The CLI activation path is handshake-gated: `npx dotmem` projects the
|
|
456
|
+
* identity channel only for a carrier that demonstrated the minimal
|
|
457
|
+
* identity/authority separation contract. Programmatic callers may pass a
|
|
458
|
+
* valid record here. The record is session state, never authority: it
|
|
459
|
+
* describes the carrier evaluation, it does not grant anything.
|
|
460
|
+
*/
|
|
526
461
|
handshake?: HandshakeSessionRecord
|
|
527
462
|
/**
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
463
|
+
* Bypass the session-start projection ceiling (default 3000 characters) and
|
|
464
|
+
* the candidate cap, returning the complete projection. CLI:
|
|
465
|
+
* `dotmem context "<situation>" --full`. Read-only: never persisted.
|
|
466
|
+
*/
|
|
532
467
|
full?: boolean
|
|
533
468
|
/**
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
469
|
+
* Omit the trusted identity channel and all auxiliary rendering (index,
|
|
470
|
+
* size disclosure, personality anchor, exemplars), returning only the
|
|
471
|
+
* memory-context envelope (`DOTMEM_CONTEXT_V1` and the candidate claims).
|
|
472
|
+
* Default behavior (full projection) is unchanged for backward compatibility.
|
|
473
|
+
* CLI: `dotmem context "<situation>" --claims-only`.
|
|
474
|
+
*
|
|
475
|
+
* The identity channel is never withheld from an unbound carrier: the
|
|
476
|
+
* activation gate above already enforces fail-closed, and this flag only
|
|
477
|
+
* affects the payload of an already-authorized projection.
|
|
478
|
+
*/
|
|
544
479
|
claimsOnly?: boolean
|
|
545
480
|
/**
|
|
546
481
|
* Cap the number of candidate claims returned, best first.
|
|
@@ -554,9 +489,9 @@ interface ContextRunOptions {
|
|
|
554
489
|
*/
|
|
555
490
|
offset?: number
|
|
556
491
|
/**
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
492
|
+
* Filter to brief one-line-per-claim output format.
|
|
493
|
+
* CLI: `dotmem context "<situation>" --format brief`.
|
|
494
|
+
*/
|
|
560
495
|
format?: 'brief'
|
|
561
496
|
/**
|
|
562
497
|
* Return the omission manifest as JSON instead of the rendered projection.
|
|
@@ -651,16 +586,9 @@ interface EpisodeClaim {
|
|
|
651
586
|
|
|
652
587
|
type ConvergenceStatus = 'continue' | 'stop'
|
|
653
588
|
|
|
654
|
-
type LearningEvent =
|
|
655
|
-
| 'corrected-error'
|
|
656
|
-
| 'disproved-assumption'
|
|
657
|
-
| 'compensated-success'
|
|
658
|
-
| 'repeated-non-convergence'
|
|
589
|
+
type LearningEvent = 'corrected-error' | 'disproved-assumption' | 'compensated-success' | 'repeated-non-convergence'
|
|
659
590
|
|
|
660
|
-
type ExplicitProfileRequest =
|
|
661
|
-
| { readonly kind: 'canonical'; readonly id: string }
|
|
662
|
-
| { readonly kind: 'unknown'; readonly id: string }
|
|
663
|
-
| null
|
|
591
|
+
type ExplicitProfileRequest = { readonly kind: 'canonical'; readonly id: string } | { readonly kind: 'unknown'; readonly id: string } | null
|
|
664
592
|
|
|
665
593
|
interface DotMemProfileDocument {
|
|
666
594
|
readonly name: string
|
|
@@ -912,20 +840,9 @@ interface RunAuthorityRecoveryInput {
|
|
|
912
840
|
readonly handshakeRerunState?: 'COMPATIBLE' | 'LIMITED' | 'INCOMPATIBLE'
|
|
913
841
|
}
|
|
914
842
|
|
|
915
|
-
type RoleMapField =
|
|
916
|
-
| 'HOST'
|
|
917
|
-
| 'EXECUTOR'
|
|
918
|
-
| 'OPERATIONAL_ROLE'
|
|
919
|
-
| 'USER'
|
|
920
|
-
| 'HI_AUTHORITY'
|
|
921
|
-
| 'CONVERSATIONAL_PROFILE'
|
|
843
|
+
type RoleMapField = 'HOST' | 'EXECUTOR' | 'OPERATIONAL_ROLE' | 'USER' | 'HI_AUTHORITY' | 'CONVERSATIONAL_PROFILE'
|
|
922
844
|
|
|
923
|
-
type AuthorityDriftPattern =
|
|
924
|
-
| 'claims-hi-authority'
|
|
925
|
-
| 'commands-the-hi'
|
|
926
|
-
| 'role-as-other-party'
|
|
927
|
-
| 'denies-own-role'
|
|
928
|
-
| 'retrospective-authority-attribution'
|
|
845
|
+
type AuthorityDriftPattern = 'claims-hi-authority' | 'commands-the-hi' | 'role-as-other-party' | 'denies-own-role' | 'retrospective-authority-attribution'
|
|
929
846
|
|
|
930
847
|
type RetrospectiveVerdict = 'SUPPORTED' | 'NO_EVIDENCE'
|
|
931
848
|
|
|
@@ -1052,16 +969,7 @@ interface IdentityResolutionContext {
|
|
|
1052
969
|
checkpoints?: Array<{ name: string; source: string; timestamp: string }>
|
|
1053
970
|
}
|
|
1054
971
|
|
|
1055
|
-
type IdentityAuthoritySource =
|
|
1056
|
-
| 'explicit-user-decision'
|
|
1057
|
-
| 'authoritative-project-config'
|
|
1058
|
-
| 'verified-project-metadata'
|
|
1059
|
-
| 'governance'
|
|
1060
|
-
| 'historical-claim'
|
|
1061
|
-
| 'summary'
|
|
1062
|
-
| 'checkpoint'
|
|
1063
|
-
| 'cache'
|
|
1064
|
-
| 'index'
|
|
972
|
+
type IdentityAuthoritySource = 'explicit-user-decision' | 'authoritative-project-config' | 'verified-project-metadata' | 'governance' | 'historical-claim' | 'summary' | 'checkpoint' | 'cache' | 'index'
|
|
1065
973
|
|
|
1066
974
|
interface CanonicalReconstructionInput {
|
|
1067
975
|
/** The canonical identity after governance resolution. */
|
|
@@ -1435,13 +1343,7 @@ interface BuildHandshakeSessionRecordInput {
|
|
|
1435
1343
|
|
|
1436
1344
|
type CompatibilityState = 'COMPATIBLE' | 'LIMITED' | 'INCOMPATIBLE'
|
|
1437
1345
|
|
|
1438
|
-
type HandshakeCapability =
|
|
1439
|
-
| 'identityComposition'
|
|
1440
|
-
| 'rolePreservation'
|
|
1441
|
-
| 'authorityPreservation'
|
|
1442
|
-
| 'memoryAsData'
|
|
1443
|
-
| 'hostAuthoritySeparation'
|
|
1444
|
-
| 'profileHostCoexistence'
|
|
1346
|
+
type HandshakeCapability = 'identityComposition' | 'rolePreservation' | 'authorityPreservation' | 'memoryAsData' | 'hostAuthoritySeparation' | 'profileHostCoexistence'
|
|
1445
1347
|
|
|
1446
1348
|
type RoleMappingValue = 'preserved' | 'violated' | 'refused' | 'unclear'
|
|
1447
1349
|
|
|
@@ -1545,11 +1447,7 @@ interface IdentityAndRuntime {
|
|
|
1545
1447
|
readonly model: string | null
|
|
1546
1448
|
}
|
|
1547
1449
|
|
|
1548
|
-
type IdentityFusionKind =
|
|
1549
|
-
| 'identity+environment'
|
|
1550
|
-
| 'identity+model'
|
|
1551
|
-
| 'identity+authority-label'
|
|
1552
|
-
| 'identity+role-metadata'
|
|
1450
|
+
type IdentityFusionKind = 'identity+environment' | 'identity+model' | 'identity+authority-label' | 'identity+role-metadata'
|
|
1553
1451
|
|
|
1554
1452
|
interface IdentityGovernance {
|
|
1555
1453
|
format: 'dotmem.identity-governance'
|
|
@@ -1628,20 +1526,9 @@ interface IdentityResolutionInput {
|
|
|
1628
1526
|
retrievedText?: readonly IdentityCandidate[]
|
|
1629
1527
|
}
|
|
1630
1528
|
|
|
1631
|
-
type IdentityCandidateSource =
|
|
1632
|
-
| 'HI_ASSIGNMENT'
|
|
1633
|
-
| 'PROFILE'
|
|
1634
|
-
| 'MEMORY'
|
|
1635
|
-
| 'RETRIEVED_TEXT'
|
|
1529
|
+
type IdentityCandidateSource = 'HI_ASSIGNMENT' | 'PROFILE' | 'MEMORY' | 'RETRIEVED_TEXT'
|
|
1636
1530
|
|
|
1637
|
-
type IdentityDisposition =
|
|
1638
|
-
| 'SELECTED'
|
|
1639
|
-
| 'SHADOWED'
|
|
1640
|
-
| 'HISTORICAL'
|
|
1641
|
-
| 'UNTRUSTED_DATA'
|
|
1642
|
-
| 'SELF_PROMOTED'
|
|
1643
|
-
| 'CONFLICT'
|
|
1644
|
-
| 'UNRESOLVED'
|
|
1531
|
+
type IdentityDisposition = 'SELECTED' | 'SHADOWED' | 'HISTORICAL' | 'UNTRUSTED_DATA' | 'SELF_PROMOTED' | 'CONFLICT' | 'UNRESOLVED'
|
|
1645
1532
|
|
|
1646
1533
|
interface IncidentCase {
|
|
1647
1534
|
id: string
|
|
@@ -2215,28 +2102,13 @@ type PolicyAction = 'allow' | 'block-and-ask' | 'block'
|
|
|
2215
2102
|
|
|
2216
2103
|
type OverrideRelaxTo = EnforcementTier
|
|
2217
2104
|
|
|
2218
|
-
type PolicyAuditAction =
|
|
2219
|
-
| 'assign'
|
|
2220
|
-
| 'remove'
|
|
2221
|
-
| 'clear'
|
|
2222
|
-
| 'override'
|
|
2223
|
-
| 'revoke'
|
|
2224
|
-
| 'lock-break'
|
|
2105
|
+
type PolicyAuditAction = 'assign' | 'remove' | 'clear' | 'override' | 'revoke' | 'lock-break'
|
|
2225
2106
|
|
|
2226
|
-
type PolicyAuditAuthority =
|
|
2227
|
-
| PolicyAuthority
|
|
2228
|
-
| { kind: 'system'; source: string }
|
|
2107
|
+
type PolicyAuditAuthority = PolicyAuthority | { kind: 'system'; source: string }
|
|
2229
2108
|
|
|
2230
2109
|
type PolicyOverrideState = 'ACTIVE' | 'EXPIRED' | 'STALE' | 'INERT' | 'NONE'
|
|
2231
2110
|
|
|
2232
|
-
type PolicyOverrideInertDetail =
|
|
2233
|
-
| 'active'
|
|
2234
|
-
| 'policy-missing'
|
|
2235
|
-
| 'policy-changed'
|
|
2236
|
-
| 'expired'
|
|
2237
|
-
| 'revoked'
|
|
2238
|
-
| 'superseded'
|
|
2239
|
-
| 'multiple-active'
|
|
2111
|
+
type PolicyOverrideInertDetail = 'active' | 'policy-missing' | 'policy-changed' | 'expired' | 'revoked' | 'superseded' | 'multiple-active'
|
|
2240
2112
|
|
|
2241
2113
|
interface SummaryFact {
|
|
2242
2114
|
id: string
|
|
@@ -2494,13 +2366,7 @@ interface RelocateStorageOptions {
|
|
|
2494
2366
|
updateProjectSettings?: boolean
|
|
2495
2367
|
}
|
|
2496
2368
|
|
|
2497
|
-
type DotMemStorageSource =
|
|
2498
|
-
| 'cli-override'
|
|
2499
|
-
| 'override'
|
|
2500
|
-
| 'project-settings'
|
|
2501
|
-
| 'user-settings'
|
|
2502
|
-
| 'locator'
|
|
2503
|
-
| 'default'
|
|
2369
|
+
type DotMemStorageSource = 'cli-override' | 'override' | 'project-settings' | 'user-settings' | 'locator' | 'default'
|
|
2504
2370
|
|
|
2505
2371
|
type DotMemStorageDivergence = 'none' | 'SHADOWED' | 'SPLIT_BRAIN' | 'MIGRATION_REQUIRED'
|
|
2506
2372
|
|
|
@@ -2886,32 +2752,11 @@ type SituationApplicability = Record<string, JsonPrimitive>
|
|
|
2886
2752
|
|
|
2887
2753
|
type SituationFacts = SituationApplicability
|
|
2888
2754
|
|
|
2889
|
-
type CurrentnessState =
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
| 'unverified'
|
|
2895
|
-
| 'contested'
|
|
2896
|
-
| 'unknown-currentness'
|
|
2897
|
-
|
|
2898
|
-
type OmissionReason =
|
|
2899
|
-
| 'retracted'
|
|
2900
|
-
| 'superseded'
|
|
2901
|
-
| 'expired'
|
|
2902
|
-
| 'scope'
|
|
2903
|
-
| 'applicability-mismatch'
|
|
2904
|
-
| 'no-term-match'
|
|
2905
|
-
| 'limit'
|
|
2906
|
-
| 'budget'
|
|
2907
|
-
|
|
2908
|
-
type OmissionGate =
|
|
2909
|
-
| 'revision-resolution'
|
|
2910
|
-
| 'scope'
|
|
2911
|
-
| 'freshness'
|
|
2912
|
-
| 'applicability'
|
|
2913
|
-
| 'ranking'
|
|
2914
|
-
| 'projection'
|
|
2755
|
+
type CurrentnessState = 'historical' | 'superseded' | 'expired' | 'verified' | 'unverified' | 'contested' | 'unknown-currentness'
|
|
2756
|
+
|
|
2757
|
+
type OmissionReason = 'retracted' | 'superseded' | 'expired' | 'scope' | 'applicability-mismatch' | 'no-term-match' | 'limit' | 'budget'
|
|
2758
|
+
|
|
2759
|
+
type OmissionGate = 'revision-resolution' | 'scope' | 'freshness' | 'applicability' | 'ranking' | 'projection'
|
|
2915
2760
|
|
|
2916
2761
|
type ClaimDisposition = 'selected' | 'excluded' | 'unresolved'
|
|
2917
2762
|
|
|
@@ -2919,21 +2764,9 @@ type ClaimRevisionState = 'current' | 'retracted' | 'superseded' | 'historical-o
|
|
|
2919
2764
|
|
|
2920
2765
|
type ExplanationGate = 'revision-resolution' | 'applicability-gate'
|
|
2921
2766
|
|
|
2922
|
-
type DiscoveryPipelineStage =
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
| 'applicability-gate'
|
|
2926
|
-
| 'ranking'
|
|
2927
|
-
| 'projection'
|
|
2928
|
-
|
|
2929
|
-
type ExplanationReason =
|
|
2930
|
-
| 'current'
|
|
2931
|
-
| 'retracted'
|
|
2932
|
-
| 'superseded'
|
|
2933
|
-
| 'baseline'
|
|
2934
|
-
| 'applicability-match'
|
|
2935
|
-
| 'applicability-mismatch'
|
|
2936
|
-
| 'applicability-unspecified'
|
|
2767
|
+
type DiscoveryPipelineStage = 'candidate-collection' | 'revision-resolution' | 'applicability-gate' | 'ranking' | 'projection'
|
|
2768
|
+
|
|
2769
|
+
type ExplanationReason = 'current' | 'retracted' | 'superseded' | 'baseline' | 'applicability-match' | 'applicability-mismatch' | 'applicability-unspecified'
|
|
2937
2770
|
|
|
2938
2771
|
type ProjectedExperienceStatus = 'prior-acquired-experience-candidate'
|
|
2939
2772
|
|
|
@@ -3305,43 +3138,11 @@ interface MemoryFacadeLike {
|
|
|
3305
3138
|
|
|
3306
3139
|
type MemoryType = 'fact' | 'preference' | 'decision' | 'task' | 'context'
|
|
3307
3140
|
|
|
3308
|
-
type OrchestrationRunStatus =
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
| 'completed'
|
|
3314
|
-
| 'failed'
|
|
3315
|
-
| 'partially_completed'
|
|
3316
|
-
| 'cancelled'
|
|
3317
|
-
| 'recovery_blocked'
|
|
3318
|
-
|
|
3319
|
-
type TaskLifecycleState =
|
|
3320
|
-
| 'discovered'
|
|
3321
|
-
| 'eligible'
|
|
3322
|
-
| 'assigned'
|
|
3323
|
-
| 'dispatch_accepted'
|
|
3324
|
-
| 'running'
|
|
3325
|
-
| 'blocked'
|
|
3326
|
-
| 'completed'
|
|
3327
|
-
| 'failed'
|
|
3328
|
-
| 'timed_out'
|
|
3329
|
-
| 'cancelled'
|
|
3330
|
-
| 'result_received'
|
|
3331
|
-
| 'result_validated'
|
|
3332
|
-
| 'accepted'
|
|
3333
|
-
|
|
3334
|
-
type ExceptionCategory =
|
|
3335
|
-
| 'agent_unavailable'
|
|
3336
|
-
| 'agent_busy'
|
|
3337
|
-
| 'permission_denied'
|
|
3338
|
-
| 'no_useful_subtask'
|
|
3339
|
-
| 'execution_failed'
|
|
3340
|
-
| 'timed_out'
|
|
3341
|
-
| 'cancelled'
|
|
3342
|
-
| 'provider_unreachable'
|
|
3343
|
-
| 'discovery_incomplete'
|
|
3344
|
-
| 'recovery_blocked'
|
|
3141
|
+
type OrchestrationRunStatus = 'discovering' | 'planning' | 'assigned' | 'running' | 'completed' | 'failed' | 'partially_completed' | 'cancelled' | 'recovery_blocked'
|
|
3142
|
+
|
|
3143
|
+
type TaskLifecycleState = 'discovered' | 'eligible' | 'assigned' | 'dispatch_accepted' | 'running' | 'blocked' | 'completed' | 'failed' | 'timed_out' | 'cancelled' | 'result_received' | 'result_validated' | 'accepted'
|
|
3144
|
+
|
|
3145
|
+
type ExceptionCategory = 'agent_unavailable' | 'agent_busy' | 'permission_denied' | 'no_useful_subtask' | 'execution_failed' | 'timed_out' | 'cancelled' | 'provider_unreachable' | 'discovery_incomplete' | 'recovery_blocked'
|
|
3345
3146
|
|
|
3346
3147
|
interface AgentDescriptor {
|
|
3347
3148
|
agentId: string
|
|
@@ -3497,10 +3298,7 @@ interface ProviderAdapter {
|
|
|
3497
3298
|
declareCapabilities(): ProviderCapabilityDeclaration
|
|
3498
3299
|
dispatch(task: DispatchTask): Promise<AgentJobHandle>
|
|
3499
3300
|
getProgress(jobHandle: AgentJobHandle): Promise<AgentProgress>
|
|
3500
|
-
subscribeToProgress?(
|
|
3501
|
-
jobHandle: AgentJobHandle,
|
|
3502
|
-
callback: (progress: AgentProgress) => void
|
|
3503
|
-
): Promise<() => void>
|
|
3301
|
+
subscribeToProgress?(jobHandle: AgentJobHandle, callback: (progress: AgentProgress) => void): Promise<() => void>
|
|
3504
3302
|
getResult(jobHandle: AgentJobHandle): Promise<AgentResult>
|
|
3505
3303
|
cancel(jobHandle: AgentJobHandle): Promise<boolean>
|
|
3506
3304
|
normalizeError(error: unknown): NormalizedAdapterError
|
|
@@ -3508,15 +3306,7 @@ interface ProviderAdapter {
|
|
|
3508
3306
|
getAuthContext?(): Promise<{ scopes: string[]; expiresAt?: string }>
|
|
3509
3307
|
}
|
|
3510
3308
|
|
|
3511
|
-
type ProviderProtocol =
|
|
3512
|
-
| 'a2a'
|
|
3513
|
-
| 'mcp'
|
|
3514
|
-
| 'provider-native'
|
|
3515
|
-
| 'http'
|
|
3516
|
-
| 'websocket'
|
|
3517
|
-
| 'sdk'
|
|
3518
|
-
| 'cli'
|
|
3519
|
-
| 'other'
|
|
3309
|
+
type ProviderProtocol = 'a2a' | 'mcp' | 'provider-native' | 'http' | 'websocket' | 'sdk' | 'cli' | 'other'
|
|
3520
3310
|
|
|
3521
3311
|
type ProviderHealthStatus = 'healthy' | 'degraded' | 'unavailable'
|
|
3522
3312
|
|
|
@@ -3524,23 +3314,9 @@ type AgentAvailability = 'available' | 'unavailable' | 'disabled'
|
|
|
3524
3314
|
|
|
3525
3315
|
type AgentInvocationMode = 'sync' | 'async' | 'streaming'
|
|
3526
3316
|
|
|
3527
|
-
type TaskLifecycleCapability =
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
| 'cancellation'
|
|
3531
|
-
| 'progress-streaming'
|
|
3532
|
-
| 'artifacts'
|
|
3533
|
-
| 'retry'
|
|
3534
|
-
|
|
3535
|
-
type AuthorizationStatus = 'authorized' | 'unauthorized' | 'unknown'
|
|
3536
|
-
|
|
3537
|
-
| 'discovered'
|
|
3538
|
-
| 'available'
|
|
3539
|
-
| 'unavailable'
|
|
3540
|
-
| 'invocable'
|
|
3541
|
-
| 'not-invocable'
|
|
3542
|
-
| 'authorized'
|
|
3543
|
-
| 'unauthorized'
|
|
3317
|
+
type TaskLifecycleCapability = 'status-polling' | 'status-subscription' | 'cancellation' | 'progress-streaming' | 'artifacts' | 'retry'
|
|
3318
|
+
|
|
3319
|
+
type AuthorizationStatus = 'authorized' | 'unauthorized' | 'unknown' | 'discovered' | 'available' | 'unavailable' | 'invocable' | 'not-invocable' | 'authorized' | 'unauthorized'
|
|
3544
3320
|
|
|
3545
3321
|
interface RecoveryResult {
|
|
3546
3322
|
requiresSelection: boolean
|
package/types/memory.d.ts
CHANGED
|
@@ -4,12 +4,7 @@ declare global {
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
type MemoryScope = 'hot' | 'session' | 'local' | 'durable'
|
|
7
|
-
type MemoryType =
|
|
8
|
-
| 'fact'
|
|
9
|
-
| 'preference'
|
|
10
|
-
| 'decision'
|
|
11
|
-
| 'task'
|
|
12
|
-
| 'context'
|
|
7
|
+
type MemoryType = 'fact' | 'preference' | 'decision' | 'task' | 'context'
|
|
13
8
|
type MemoryStatus = 'active' | 'obsolete' | 'superseded'
|
|
14
9
|
type MemoryKind = 'experience' | 'agent' | 'relationship' | 'logic' | 'note' | 'rule'
|
|
15
10
|
type JsonPrimitive = string | number | boolean | null
|
|
@@ -100,22 +95,8 @@ interface DiscoveryCandidate {
|
|
|
100
95
|
/** Derived currentness, so the projection renders what discovery resolved. */
|
|
101
96
|
currentness?: CurrentnessState
|
|
102
97
|
}
|
|
103
|
-
type OmissionReason =
|
|
104
|
-
|
|
105
|
-
| 'superseded'
|
|
106
|
-
| 'expired'
|
|
107
|
-
| 'scope'
|
|
108
|
-
| 'applicability-mismatch'
|
|
109
|
-
| 'no-term-match'
|
|
110
|
-
| 'limit'
|
|
111
|
-
| 'budget'
|
|
112
|
-
type OmissionGate =
|
|
113
|
-
| 'revision-resolution'
|
|
114
|
-
| 'scope'
|
|
115
|
-
| 'freshness'
|
|
116
|
-
| 'applicability'
|
|
117
|
-
| 'ranking'
|
|
118
|
-
| 'projection'
|
|
98
|
+
type OmissionReason = 'retracted' | 'superseded' | 'expired' | 'scope' | 'applicability-mismatch' | 'no-term-match' | 'limit' | 'budget'
|
|
99
|
+
type OmissionGate = 'revision-resolution' | 'scope' | 'freshness' | 'applicability' | 'ranking' | 'projection'
|
|
119
100
|
interface OmissionRecord {
|
|
120
101
|
id: string
|
|
121
102
|
reason: OmissionReason
|
|
@@ -160,14 +141,7 @@ interface ProjectedExperience {
|
|
|
160
141
|
/** Derived currentness of the underlying claim, when discovery computed it. */
|
|
161
142
|
currentness?: CurrentnessState
|
|
162
143
|
}
|
|
163
|
-
type CurrentnessState =
|
|
164
|
-
| 'historical'
|
|
165
|
-
| 'superseded'
|
|
166
|
-
| 'expired'
|
|
167
|
-
| 'verified'
|
|
168
|
-
| 'unverified'
|
|
169
|
-
| 'contested'
|
|
170
|
-
| 'unknown-currentness'
|
|
144
|
+
type CurrentnessState = 'historical' | 'superseded' | 'expired' | 'verified' | 'unverified' | 'contested' | 'unknown-currentness'
|
|
171
145
|
interface ContextProjection {
|
|
172
146
|
format: 'dotmem-context-v1'
|
|
173
147
|
status: 'candidate-context-not-current-truth'
|
|
@@ -195,15 +169,7 @@ interface PatchOperation {
|
|
|
195
169
|
* The `delete` operation creates an explicit tombstone entry so concurrent
|
|
196
170
|
* updates/replay do not resurrect deleted values.
|
|
197
171
|
*/
|
|
198
|
-
type MemoryOperation =
|
|
199
|
-
| 'remember'
|
|
200
|
-
| 'update'
|
|
201
|
-
| 'forget'
|
|
202
|
-
| 'expire'
|
|
203
|
-
| 'confirm'
|
|
204
|
-
| 'supersede'
|
|
205
|
-
| 'delete'
|
|
206
|
-
| 'patch'
|
|
172
|
+
type MemoryOperation = 'remember' | 'update' | 'forget' | 'expire' | 'confirm' | 'supersede' | 'delete' | 'patch'
|
|
207
173
|
/**
|
|
208
174
|
* Synchronization state of a journal entry against a remote/cloud backend.
|
|
209
175
|
*/
|
|
@@ -277,6 +243,8 @@ interface MemoryEntry<T = any> {
|
|
|
277
243
|
* Replaces wall-clock-only ordering which is vulnerable to clock drift.
|
|
278
244
|
*/
|
|
279
245
|
hlc?: string
|
|
246
|
+
/** Tenant ID for storage-level isolation. Null/undefined = unowned (legacy). */
|
|
247
|
+
tenantId?: string | null
|
|
280
248
|
/**
|
|
281
249
|
* Field-level path for path-level journaling (e.g. "user.role").
|
|
282
250
|
* When set, the journal entry represents a patch to a sub-path
|