dotmem 0.2.4 → 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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dotmem",
3
3
  "codeName": "dotmem",
4
- "version": "0.2.4",
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.",
@@ -1,7 +1,3 @@
1
1
  declare module 'fflate/browser' {
2
- export {
3
- Unzip,
4
- UnzipInflate,
5
- zipSync
6
- } from 'fflate'
2
+ export { Unzip, UnzipInflate, zipSync } from 'fflate'
7
3
  }
@@ -210,53 +210,11 @@ interface CapturePayload {
210
210
  }
211
211
  }
212
212
 
213
- type ShortIntent =
214
- | 'note'
215
- | 'remember'
216
- | 'recall'
217
- | 'forget'
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
- | 'projectAudit'
236
- | 'health'
237
- | 'doctor'
238
- | 'repair'
239
- | 'cleanup'
240
- | 'relate'
241
- | 'link'
242
- | 'unlink'
243
- | 'merge'
244
- | 'configure'
245
- | 'capabilities'
246
- | 'seed'
247
- | 'capture'
248
-
249
- type ShortResultStatus =
250
- | 'completed'
251
- | 'failed'
252
- | 'blocked'
253
- | 'pending'
254
- | 'skipped'
255
-
256
- type IntentHandler = (
257
- runtime: any,
258
- payload: unknown
259
- ) => 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>
260
218
 
261
219
  interface BuildProfileDocument {
262
220
  readonly name: string
@@ -406,36 +364,12 @@ interface DotMemEncryptedEnvelope {
406
364
 
407
365
  interface SubtleCryptoLike {
408
366
  digest(algorithm: string, data: Uint8Array): Promise<Uint8Array>
409
- deriveKey(
410
- algorithm: AlikeAlgorithm,
411
- baseKey: CryptoKey,
412
- derivedKeyAlgorithm: AlikeAlgorithm,
413
- extractable: boolean,
414
- keyUsages: SubKeyUsages
415
- ): Promise<CryptoKey>
416
- deriveBits(
417
- algorithm: AlikeAlgorithm,
418
- baseKey: CryptoKey,
419
- length: number
420
- ): 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>
421
369
  exportKey(format: string, key: CryptoKey): Promise<Uint8Array>
422
- importKey(
423
- format: string,
424
- keyData: Uint8Array,
425
- algorithm: AlikeAlgorithm,
426
- extractable: boolean,
427
- keyUsages: SubKeyUsages
428
- ): Promise<CryptoKey>
429
- encrypt(
430
- algorithm: AlikeAlgorithm,
431
- key: CryptoKey,
432
- data: Uint8Array
433
- ): Promise<Uint8Array>
434
- decrypt(
435
- algorithm: AlikeAlgorithm,
436
- key: CryptoKey,
437
- data: Uint8Array
438
- ): 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>
439
373
  }
440
374
 
441
375
  type SubKeyUsages = readonly ['encrypt', 'decrypt'] | readonly ['deriveKey'] | readonly ['deriveBits']
@@ -494,54 +428,54 @@ interface ContextRunOptions {
494
428
  /** With `explain`, return the structured explanation model instead of rendered text. */
495
429
  json?: boolean
496
430
  /**
497
- * Explicit current HI identity supplied by the runtime (the operator layer).
498
- *
499
- * This is the only channel through which a current USER_IDENTITY may enter
500
- * the projection. An ordinary memory
501
- * claim named `user-name` never asserts current identity; it remains
502
- * historical evidence in the store.
503
- */
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
+ */
504
438
  hiIdentity?: string
505
439
  /**
506
- * Explicit current HI assignment for the AGENT identity (the operator layer).
507
- *
508
- * When present it wins over the canonical profile default; when absent the
509
- * resolver uses the profile. Memory and context never assign it.
510
- */
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
+ */
511
445
  agentIdentity?: string
512
446
  /**
513
- * Scoped, temporary overlays for this run. Overlays may
514
- * influence behavior but never identity, invariants, or authority, and they
515
- * are never persisted.
516
- */
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
+ */
517
451
  overlays?: readonly unknown[]
518
452
  /**
519
- * A verified carrier handshake session record.
520
- *
521
- * The CLI activation path is handshake-gated: `npx dotmem` projects the
522
- * identity channel only for a carrier that demonstrated the minimal
523
- * identity/authority separation contract. Programmatic callers may pass a
524
- * valid record here. The record is session state, never authority: it
525
- * describes the carrier evaluation, it does not grant anything.
526
- */
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
+ */
527
461
  handshake?: HandshakeSessionRecord
528
462
  /**
529
- * Bypass the session-start projection ceiling (default 3000 characters) and
530
- * the candidate cap, returning the complete projection. CLI:
531
- * `dotmem context "<situation>" --full`. Read-only: never persisted.
532
- */
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
+ */
533
467
  full?: boolean
534
468
  /**
535
- * Omit the trusted identity channel and all auxiliary rendering (index,
536
- * size disclosure, personality anchor, exemplars), returning only the
537
- * memory-context envelope (`DOTMEM_CONTEXT_V1` and the candidate claims).
538
- * Default behavior (full projection) is unchanged for backward compatibility.
539
- * CLI: `dotmem context "<situation>" --claims-only`.
540
- *
541
- * The identity channel is never withheld from an unbound carrier: the
542
- * activation gate above already enforces fail-closed, and this flag only
543
- * affects the payload of an already-authorized projection.
544
- */
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
+ */
545
479
  claimsOnly?: boolean
546
480
  /**
547
481
  * Cap the number of candidate claims returned, best first.
@@ -555,9 +489,9 @@ interface ContextRunOptions {
555
489
  */
556
490
  offset?: number
557
491
  /**
558
- * Filter to brief one-line-per-claim output format.
559
- * CLI: `dotmem context "<situation>" --format brief`.
560
- */
492
+ * Filter to brief one-line-per-claim output format.
493
+ * CLI: `dotmem context "<situation>" --format brief`.
494
+ */
561
495
  format?: 'brief'
562
496
  /**
563
497
  * Return the omission manifest as JSON instead of the rendered projection.
@@ -652,16 +586,9 @@ interface EpisodeClaim {
652
586
 
653
587
  type ConvergenceStatus = 'continue' | 'stop'
654
588
 
655
- type LearningEvent =
656
- | 'corrected-error'
657
- | 'disproved-assumption'
658
- | 'compensated-success'
659
- | 'repeated-non-convergence'
589
+ type LearningEvent = 'corrected-error' | 'disproved-assumption' | 'compensated-success' | 'repeated-non-convergence'
660
590
 
661
- type ExplicitProfileRequest =
662
- | { readonly kind: 'canonical'; readonly id: string }
663
- | { readonly kind: 'unknown'; readonly id: string }
664
- | null
591
+ type ExplicitProfileRequest = { readonly kind: 'canonical'; readonly id: string } | { readonly kind: 'unknown'; readonly id: string } | null
665
592
 
666
593
  interface DotMemProfileDocument {
667
594
  readonly name: string
@@ -913,20 +840,9 @@ interface RunAuthorityRecoveryInput {
913
840
  readonly handshakeRerunState?: 'COMPATIBLE' | 'LIMITED' | 'INCOMPATIBLE'
914
841
  }
915
842
 
916
- type RoleMapField =
917
- | 'HOST'
918
- | 'EXECUTOR'
919
- | 'OPERATIONAL_ROLE'
920
- | 'USER'
921
- | 'HI_AUTHORITY'
922
- | 'CONVERSATIONAL_PROFILE'
843
+ type RoleMapField = 'HOST' | 'EXECUTOR' | 'OPERATIONAL_ROLE' | 'USER' | 'HI_AUTHORITY' | 'CONVERSATIONAL_PROFILE'
923
844
 
924
- type AuthorityDriftPattern =
925
- | 'claims-hi-authority'
926
- | 'commands-the-hi'
927
- | 'role-as-other-party'
928
- | 'denies-own-role'
929
- | 'retrospective-authority-attribution'
845
+ type AuthorityDriftPattern = 'claims-hi-authority' | 'commands-the-hi' | 'role-as-other-party' | 'denies-own-role' | 'retrospective-authority-attribution'
930
846
 
931
847
  type RetrospectiveVerdict = 'SUPPORTED' | 'NO_EVIDENCE'
932
848
 
@@ -1053,16 +969,7 @@ interface IdentityResolutionContext {
1053
969
  checkpoints?: Array<{ name: string; source: string; timestamp: string }>
1054
970
  }
1055
971
 
1056
- type IdentityAuthoritySource =
1057
- | 'explicit-user-decision'
1058
- | 'authoritative-project-config'
1059
- | 'verified-project-metadata'
1060
- | 'governance'
1061
- | 'historical-claim'
1062
- | 'summary'
1063
- | 'checkpoint'
1064
- | 'cache'
1065
- | 'index'
972
+ type IdentityAuthoritySource = 'explicit-user-decision' | 'authoritative-project-config' | 'verified-project-metadata' | 'governance' | 'historical-claim' | 'summary' | 'checkpoint' | 'cache' | 'index'
1066
973
 
1067
974
  interface CanonicalReconstructionInput {
1068
975
  /** The canonical identity after governance resolution. */
@@ -1436,13 +1343,7 @@ interface BuildHandshakeSessionRecordInput {
1436
1343
 
1437
1344
  type CompatibilityState = 'COMPATIBLE' | 'LIMITED' | 'INCOMPATIBLE'
1438
1345
 
1439
- type HandshakeCapability =
1440
- | 'identityComposition'
1441
- | 'rolePreservation'
1442
- | 'authorityPreservation'
1443
- | 'memoryAsData'
1444
- | 'hostAuthoritySeparation'
1445
- | 'profileHostCoexistence'
1346
+ type HandshakeCapability = 'identityComposition' | 'rolePreservation' | 'authorityPreservation' | 'memoryAsData' | 'hostAuthoritySeparation' | 'profileHostCoexistence'
1446
1347
 
1447
1348
  type RoleMappingValue = 'preserved' | 'violated' | 'refused' | 'unclear'
1448
1349
 
@@ -1546,11 +1447,7 @@ interface IdentityAndRuntime {
1546
1447
  readonly model: string | null
1547
1448
  }
1548
1449
 
1549
- type IdentityFusionKind =
1550
- | 'identity+environment'
1551
- | 'identity+model'
1552
- | 'identity+authority-label'
1553
- | 'identity+role-metadata'
1450
+ type IdentityFusionKind = 'identity+environment' | 'identity+model' | 'identity+authority-label' | 'identity+role-metadata'
1554
1451
 
1555
1452
  interface IdentityGovernance {
1556
1453
  format: 'dotmem.identity-governance'
@@ -1629,20 +1526,9 @@ interface IdentityResolutionInput {
1629
1526
  retrievedText?: readonly IdentityCandidate[]
1630
1527
  }
1631
1528
 
1632
- type IdentityCandidateSource =
1633
- | 'HI_ASSIGNMENT'
1634
- | 'PROFILE'
1635
- | 'MEMORY'
1636
- | 'RETRIEVED_TEXT'
1529
+ type IdentityCandidateSource = 'HI_ASSIGNMENT' | 'PROFILE' | 'MEMORY' | 'RETRIEVED_TEXT'
1637
1530
 
1638
- type IdentityDisposition =
1639
- | 'SELECTED'
1640
- | 'SHADOWED'
1641
- | 'HISTORICAL'
1642
- | 'UNTRUSTED_DATA'
1643
- | 'SELF_PROMOTED'
1644
- | 'CONFLICT'
1645
- | 'UNRESOLVED'
1531
+ type IdentityDisposition = 'SELECTED' | 'SHADOWED' | 'HISTORICAL' | 'UNTRUSTED_DATA' | 'SELF_PROMOTED' | 'CONFLICT' | 'UNRESOLVED'
1646
1532
 
1647
1533
  interface IncidentCase {
1648
1534
  id: string
@@ -2216,28 +2102,13 @@ type PolicyAction = 'allow' | 'block-and-ask' | 'block'
2216
2102
 
2217
2103
  type OverrideRelaxTo = EnforcementTier
2218
2104
 
2219
- type PolicyAuditAction =
2220
- | 'assign'
2221
- | 'remove'
2222
- | 'clear'
2223
- | 'override'
2224
- | 'revoke'
2225
- | 'lock-break'
2105
+ type PolicyAuditAction = 'assign' | 'remove' | 'clear' | 'override' | 'revoke' | 'lock-break'
2226
2106
 
2227
- type PolicyAuditAuthority =
2228
- | PolicyAuthority
2229
- | { kind: 'system'; source: string }
2107
+ type PolicyAuditAuthority = PolicyAuthority | { kind: 'system'; source: string }
2230
2108
 
2231
2109
  type PolicyOverrideState = 'ACTIVE' | 'EXPIRED' | 'STALE' | 'INERT' | 'NONE'
2232
2110
 
2233
- type PolicyOverrideInertDetail =
2234
- | 'active'
2235
- | 'policy-missing'
2236
- | 'policy-changed'
2237
- | 'expired'
2238
- | 'revoked'
2239
- | 'superseded'
2240
- | 'multiple-active'
2111
+ type PolicyOverrideInertDetail = 'active' | 'policy-missing' | 'policy-changed' | 'expired' | 'revoked' | 'superseded' | 'multiple-active'
2241
2112
 
2242
2113
  interface SummaryFact {
2243
2114
  id: string
@@ -2495,13 +2366,7 @@ interface RelocateStorageOptions {
2495
2366
  updateProjectSettings?: boolean
2496
2367
  }
2497
2368
 
2498
- type DotMemStorageSource =
2499
- | 'cli-override'
2500
- | 'override'
2501
- | 'project-settings'
2502
- | 'user-settings'
2503
- | 'locator'
2504
- | 'default'
2369
+ type DotMemStorageSource = 'cli-override' | 'override' | 'project-settings' | 'user-settings' | 'locator' | 'default'
2505
2370
 
2506
2371
  type DotMemStorageDivergence = 'none' | 'SHADOWED' | 'SPLIT_BRAIN' | 'MIGRATION_REQUIRED'
2507
2372
 
@@ -2887,32 +2752,11 @@ type SituationApplicability = Record<string, JsonPrimitive>
2887
2752
 
2888
2753
  type SituationFacts = SituationApplicability
2889
2754
 
2890
- type CurrentnessState =
2891
- | 'historical'
2892
- | 'superseded'
2893
- | 'expired'
2894
- | 'verified'
2895
- | 'unverified'
2896
- | 'contested'
2897
- | 'unknown-currentness'
2898
-
2899
- type OmissionReason =
2900
- | 'retracted'
2901
- | 'superseded'
2902
- | 'expired'
2903
- | 'scope'
2904
- | 'applicability-mismatch'
2905
- | 'no-term-match'
2906
- | 'limit'
2907
- | 'budget'
2908
-
2909
- type OmissionGate =
2910
- | 'revision-resolution'
2911
- | 'scope'
2912
- | 'freshness'
2913
- | 'applicability'
2914
- | 'ranking'
2915
- | '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'
2916
2760
 
2917
2761
  type ClaimDisposition = 'selected' | 'excluded' | 'unresolved'
2918
2762
 
@@ -2920,21 +2764,9 @@ type ClaimRevisionState = 'current' | 'retracted' | 'superseded' | 'historical-o
2920
2764
 
2921
2765
  type ExplanationGate = 'revision-resolution' | 'applicability-gate'
2922
2766
 
2923
- type DiscoveryPipelineStage =
2924
- | 'candidate-collection'
2925
- | 'revision-resolution'
2926
- | 'applicability-gate'
2927
- | 'ranking'
2928
- | 'projection'
2929
-
2930
- type ExplanationReason =
2931
- | 'current'
2932
- | 'retracted'
2933
- | 'superseded'
2934
- | 'baseline'
2935
- | 'applicability-match'
2936
- | 'applicability-mismatch'
2937
- | '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'
2938
2770
 
2939
2771
  type ProjectedExperienceStatus = 'prior-acquired-experience-candidate'
2940
2772
 
@@ -3306,43 +3138,11 @@ interface MemoryFacadeLike {
3306
3138
 
3307
3139
  type MemoryType = 'fact' | 'preference' | 'decision' | 'task' | 'context'
3308
3140
 
3309
- type OrchestrationRunStatus =
3310
- | 'discovering'
3311
- | 'planning'
3312
- | 'assigned'
3313
- | 'running'
3314
- | 'completed'
3315
- | 'failed'
3316
- | 'partially_completed'
3317
- | 'cancelled'
3318
- | 'recovery_blocked'
3319
-
3320
- type TaskLifecycleState =
3321
- | 'discovered'
3322
- | 'eligible'
3323
- | 'assigned'
3324
- | 'dispatch_accepted'
3325
- | 'running'
3326
- | 'blocked'
3327
- | 'completed'
3328
- | 'failed'
3329
- | 'timed_out'
3330
- | 'cancelled'
3331
- | 'result_received'
3332
- | 'result_validated'
3333
- | 'accepted'
3334
-
3335
- type ExceptionCategory =
3336
- | 'agent_unavailable'
3337
- | 'agent_busy'
3338
- | 'permission_denied'
3339
- | 'no_useful_subtask'
3340
- | 'execution_failed'
3341
- | 'timed_out'
3342
- | 'cancelled'
3343
- | 'provider_unreachable'
3344
- | 'discovery_incomplete'
3345
- | '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'
3346
3146
 
3347
3147
  interface AgentDescriptor {
3348
3148
  agentId: string
@@ -3498,10 +3298,7 @@ interface ProviderAdapter {
3498
3298
  declareCapabilities(): ProviderCapabilityDeclaration
3499
3299
  dispatch(task: DispatchTask): Promise<AgentJobHandle>
3500
3300
  getProgress(jobHandle: AgentJobHandle): Promise<AgentProgress>
3501
- subscribeToProgress?(
3502
- jobHandle: AgentJobHandle,
3503
- callback: (progress: AgentProgress) => void
3504
- ): Promise<() => void>
3301
+ subscribeToProgress?(jobHandle: AgentJobHandle, callback: (progress: AgentProgress) => void): Promise<() => void>
3505
3302
  getResult(jobHandle: AgentJobHandle): Promise<AgentResult>
3506
3303
  cancel(jobHandle: AgentJobHandle): Promise<boolean>
3507
3304
  normalizeError(error: unknown): NormalizedAdapterError
@@ -3509,15 +3306,7 @@ interface ProviderAdapter {
3509
3306
  getAuthContext?(): Promise<{ scopes: string[]; expiresAt?: string }>
3510
3307
  }
3511
3308
 
3512
- type ProviderProtocol =
3513
- | 'a2a'
3514
- | 'mcp'
3515
- | 'provider-native'
3516
- | 'http'
3517
- | 'websocket'
3518
- | 'sdk'
3519
- | 'cli'
3520
- | 'other'
3309
+ type ProviderProtocol = 'a2a' | 'mcp' | 'provider-native' | 'http' | 'websocket' | 'sdk' | 'cli' | 'other'
3521
3310
 
3522
3311
  type ProviderHealthStatus = 'healthy' | 'degraded' | 'unavailable'
3523
3312
 
@@ -3525,23 +3314,9 @@ type AgentAvailability = 'available' | 'unavailable' | 'disabled'
3525
3314
 
3526
3315
  type AgentInvocationMode = 'sync' | 'async' | 'streaming'
3527
3316
 
3528
- type TaskLifecycleCapability =
3529
- | 'status-polling'
3530
- | 'status-subscription'
3531
- | 'cancellation'
3532
- | 'progress-streaming'
3533
- | 'artifacts'
3534
- | 'retry'
3535
-
3536
- type AuthorizationStatus = 'authorized' | 'unauthorized' | 'unknown'
3537
-
3538
- | 'discovered'
3539
- | 'available'
3540
- | 'unavailable'
3541
- | 'invocable'
3542
- | 'not-invocable'
3543
- | 'authorized'
3544
- | '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'
3545
3320
 
3546
3321
  interface RecoveryResult {
3547
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
- | 'retracted'
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
  */
package/types/policy.d.ts CHANGED
@@ -93,14 +93,7 @@ interface PolicyOverride {
93
93
 
94
94
  type PolicyOverrideState = 'ACTIVE' | 'EXPIRED' | 'STALE' | 'INERT' | 'NONE'
95
95
 
96
- type PolicyOverrideInertDetail =
97
- | 'active'
98
- | 'policy-missing'
99
- | 'policy-changed'
100
- | 'expired'
101
- | 'revoked'
102
- | 'superseded'
103
- | 'multiple-active'
96
+ type PolicyOverrideInertDetail = 'active' | 'policy-missing' | 'policy-changed' | 'expired' | 'revoked' | 'superseded' | 'multiple-active'
104
97
 
105
98
  interface ResolvedOverride {
106
99
  override: PolicyOverride
@@ -204,17 +197,9 @@ interface MemoryPolicyOverrideAPI {
204
197
  * from the payload. Exactly one active slot per target; a new grant
205
198
  * atomically supersedes the previous one.
206
199
  */
207
- grant(
208
- input: PolicyOverrideGrantInput,
209
- namespace?: PolicyNamespace,
210
- basedOnRevision?: number
211
- ): Promise<PolicyOverride>
200
+ grant(input: PolicyOverrideGrantInput, namespace?: PolicyNamespace, basedOnRevision?: number): Promise<PolicyOverride>
212
201
  /** Remove a relaxation and restore the base policy. */
213
- revoke(
214
- input: PolicyOverrideRevokeInput,
215
- namespace?: PolicyNamespace,
216
- basedOnRevision?: number
217
- ): Promise<PolicyOverride>
202
+ revoke(input: PolicyOverrideRevokeInput, namespace?: PolicyNamespace, basedOnRevision?: number): Promise<PolicyOverride>
218
203
  /** Every override with its resolved state (ACTIVE / EXPIRED / STALE / INERT). */
219
204
  list(namespace?: PolicyNamespace): Promise<ResolvedOverride[]>
220
205
  /** Effective policy state with the provenance scar. */
@@ -267,12 +252,7 @@ interface MemoryPolicyAPI {
267
252
  }
268
253
 
269
254
  /** Advisory relationship index over memories (@brain.mem). Non-authoritative. */
270
- type BrainRelationshipKind =
271
- | 'uses'
272
- | 'related-to'
273
- | 'supersedes'
274
- | 'encountered-in'
275
- | 'associated-with'
255
+ type BrainRelationshipKind = 'uses' | 'related-to' | 'supersedes' | 'encountered-in' | 'associated-with'
276
256
 
277
257
  interface BrainRelationship {
278
258
  id: string
@@ -288,4 +268,4 @@ interface MemoryBrainAPI {
288
268
  getRelationships(from?: string, to?: string): Promise<BrainRelationship[]>
289
269
  removeRelationship(id: string): Promise<void>
290
270
  clear(): Promise<void>
291
- }
271
+ }