@namzu/sdk 55.0.0 → 55.1.0

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.
Files changed (151) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/{manager/resident/learning-cycle.d.ts → learning/cycle.d.ts} +45 -36
  3. package/dist/learning/cycle.d.ts.map +1 -0
  4. package/dist/{manager/resident/learning-cycle.js → learning/cycle.js} +52 -20
  5. package/dist/learning/cycle.js.map +1 -0
  6. package/dist/learning/deprecated.d.ts +86 -0
  7. package/dist/learning/deprecated.d.ts.map +1 -0
  8. package/dist/learning/deprecated.js +22 -0
  9. package/dist/learning/deprecated.js.map +1 -0
  10. package/dist/learning/experience-store.d.ts +35 -0
  11. package/dist/learning/experience-store.d.ts.map +1 -0
  12. package/dist/learning/experience-store.js +143 -0
  13. package/dist/learning/experience-store.js.map +1 -0
  14. package/dist/learning/experience.d.ts +150 -0
  15. package/dist/learning/experience.d.ts.map +1 -0
  16. package/dist/learning/experience.js +146 -0
  17. package/dist/learning/experience.js.map +1 -0
  18. package/dist/learning/generator.d.ts +118 -0
  19. package/dist/learning/generator.d.ts.map +1 -0
  20. package/dist/learning/generator.js +275 -0
  21. package/dist/learning/generator.js.map +1 -0
  22. package/dist/learning/leak-tripwire.d.ts +66 -0
  23. package/dist/learning/leak-tripwire.d.ts.map +1 -0
  24. package/dist/learning/leak-tripwire.js +208 -0
  25. package/dist/learning/leak-tripwire.js.map +1 -0
  26. package/dist/{manager/resident/learning-observation.d.ts → learning/observation.d.ts} +4 -4
  27. package/dist/learning/observation.d.ts.map +1 -0
  28. package/dist/{manager/resident/learning-observation.js → learning/observation.js} +3 -3
  29. package/dist/learning/observation.js.map +1 -0
  30. package/dist/{manager/resident/learning.d.ts → learning/skill.d.ts} +29 -29
  31. package/dist/learning/skill.d.ts.map +1 -0
  32. package/dist/{manager/resident/learning.js → learning/skill.js} +27 -27
  33. package/dist/learning/skill.js.map +1 -0
  34. package/dist/{manager/resident/learning-store.d.ts → learning/store.d.ts} +38 -31
  35. package/dist/learning/store.d.ts.map +1 -0
  36. package/dist/{manager/resident/learning-store.js → learning/store.js} +52 -20
  37. package/dist/learning/store.js.map +1 -0
  38. package/dist/manager/resident/activity.d.ts +30 -6
  39. package/dist/manager/resident/activity.d.ts.map +1 -1
  40. package/dist/manager/resident/activity.js.map +1 -1
  41. package/dist/manager/resident/agenda.d.ts +42 -12
  42. package/dist/manager/resident/agenda.d.ts.map +1 -1
  43. package/dist/manager/resident/agenda.js +9 -7
  44. package/dist/manager/resident/agenda.js.map +1 -1
  45. package/dist/manager/resident/consumption.d.ts +27 -5
  46. package/dist/manager/resident/consumption.d.ts.map +1 -1
  47. package/dist/manager/resident/consumption.js +2 -0
  48. package/dist/manager/resident/consumption.js.map +1 -1
  49. package/dist/manager/resident/delivery-window.d.ts +7 -1
  50. package/dist/manager/resident/delivery-window.d.ts.map +1 -1
  51. package/dist/manager/resident/delivery-window.js +2 -0
  52. package/dist/manager/resident/delivery-window.js.map +1 -1
  53. package/dist/manager/resident/evidence-recall.d.ts +7 -1
  54. package/dist/manager/resident/evidence-recall.d.ts.map +1 -1
  55. package/dist/manager/resident/evidence-recall.js +2 -0
  56. package/dist/manager/resident/evidence-recall.js.map +1 -1
  57. package/dist/manager/resident/history.d.ts +45 -9
  58. package/dist/manager/resident/history.d.ts.map +1 -1
  59. package/dist/manager/resident/history.js.map +1 -1
  60. package/dist/manager/resident/host.d.ts +44 -10
  61. package/dist/manager/resident/host.d.ts.map +1 -1
  62. package/dist/manager/resident/host.js +4 -2
  63. package/dist/manager/resident/host.js.map +1 -1
  64. package/dist/manager/resident/initiative.d.ts +32 -6
  65. package/dist/manager/resident/initiative.d.ts.map +1 -1
  66. package/dist/manager/resident/initiative.js +2 -0
  67. package/dist/manager/resident/initiative.js.map +1 -1
  68. package/dist/manager/resident/loop.d.ts +22 -4
  69. package/dist/manager/resident/loop.d.ts.map +1 -1
  70. package/dist/manager/resident/loop.js +7 -1
  71. package/dist/manager/resident/loop.js.map +1 -1
  72. package/dist/manager/resident/outbox.d.ts +42 -8
  73. package/dist/manager/resident/outbox.d.ts.map +1 -1
  74. package/dist/manager/resident/outbox.js +2 -0
  75. package/dist/manager/resident/outbox.js.map +1 -1
  76. package/dist/manager/resident/proposal.d.ts +17 -3
  77. package/dist/manager/resident/proposal.d.ts.map +1 -1
  78. package/dist/manager/resident/proposal.js +2 -0
  79. package/dist/manager/resident/proposal.js.map +1 -1
  80. package/dist/manager/resident/store.d.ts +27 -5
  81. package/dist/manager/resident/store.d.ts.map +1 -1
  82. package/dist/manager/resident/store.js +7 -1
  83. package/dist/manager/resident/store.js.map +1 -1
  84. package/dist/manager/resident/tool-evidence.d.ts +45 -9
  85. package/dist/manager/resident/tool-evidence.d.ts.map +1 -1
  86. package/dist/manager/resident/tool-evidence.js +5 -1
  87. package/dist/manager/resident/tool-evidence.js.map +1 -1
  88. package/dist/prompt/resident-learning.d.ts +12 -2
  89. package/dist/prompt/resident-learning.d.ts.map +1 -1
  90. package/dist/prompt/resident-learning.js +6 -5
  91. package/dist/prompt/resident-learning.js.map +1 -1
  92. package/dist/prompt/resident-step.d.ts +10 -4
  93. package/dist/prompt/resident-step.d.ts.map +1 -1
  94. package/dist/prompt/resident-step.js +6 -4
  95. package/dist/prompt/resident-step.js.map +1 -1
  96. package/dist/public-runtime.d.ts +9 -3
  97. package/dist/public-runtime.d.ts.map +1 -1
  98. package/dist/public-runtime.js +10 -3
  99. package/dist/public-runtime.js.map +1 -1
  100. package/dist/public-types.d.ts +9 -4
  101. package/dist/public-types.d.ts.map +1 -1
  102. package/dist/runtime/query/iteration/phases/per-call-review.d.ts +9 -0
  103. package/dist/runtime/query/iteration/phases/per-call-review.d.ts.map +1 -1
  104. package/dist/runtime/query/iteration/phases/per-call-review.js +19 -0
  105. package/dist/runtime/query/iteration/phases/per-call-review.js.map +1 -1
  106. package/dist/tools/resident-history.d.ts +2 -0
  107. package/dist/tools/resident-history.d.ts.map +1 -1
  108. package/dist/tools/resident-history.js +2 -0
  109. package/dist/tools/resident-history.js.map +1 -1
  110. package/dist/tools/resident-tool-evidence.d.ts +5 -1
  111. package/dist/tools/resident-tool-evidence.d.ts.map +1 -1
  112. package/dist/tools/resident-tool-evidence.js +5 -1
  113. package/dist/tools/resident-tool-evidence.js.map +1 -1
  114. package/package.json +1 -1
  115. package/src/{manager/resident/learning-cycle.ts → learning/cycle.ts} +130 -78
  116. package/src/learning/deprecated.ts +124 -0
  117. package/src/learning/experience-store.ts +202 -0
  118. package/src/learning/experience.ts +238 -0
  119. package/src/learning/generator.ts +388 -0
  120. package/src/learning/leak-tripwire.ts +280 -0
  121. package/src/{manager/resident/learning-observation.ts → learning/observation.ts} +5 -5
  122. package/src/{manager/resident/learning.ts → learning/skill.ts} +64 -67
  123. package/src/{manager/resident/learning-store.ts → learning/store.ts} +97 -67
  124. package/src/manager/resident/activity.ts +30 -6
  125. package/src/manager/resident/agenda.ts +63 -33
  126. package/src/manager/resident/consumption.ts +27 -5
  127. package/src/manager/resident/delivery-window.ts +7 -1
  128. package/src/manager/resident/evidence-recall.ts +7 -1
  129. package/src/manager/resident/history.ts +45 -9
  130. package/src/manager/resident/host.ts +45 -11
  131. package/src/manager/resident/initiative.ts +32 -6
  132. package/src/manager/resident/loop.ts +22 -4
  133. package/src/manager/resident/outbox.ts +42 -8
  134. package/src/manager/resident/proposal.ts +17 -3
  135. package/src/manager/resident/store.ts +27 -5
  136. package/src/manager/resident/tool-evidence.ts +45 -9
  137. package/src/prompt/resident-learning.ts +16 -7
  138. package/src/prompt/resident-step.ts +19 -13
  139. package/src/public-runtime.ts +35 -5
  140. package/src/public-types.ts +96 -34
  141. package/src/runtime/query/iteration/phases/per-call-review.ts +19 -0
  142. package/src/tools/resident-history.ts +2 -0
  143. package/src/tools/resident-tool-evidence.ts +5 -1
  144. package/dist/manager/resident/learning-cycle.d.ts.map +0 -1
  145. package/dist/manager/resident/learning-cycle.js.map +0 -1
  146. package/dist/manager/resident/learning-observation.d.ts.map +0 -1
  147. package/dist/manager/resident/learning-observation.js.map +0 -1
  148. package/dist/manager/resident/learning-store.d.ts.map +0 -1
  149. package/dist/manager/resident/learning-store.js.map +0 -1
  150. package/dist/manager/resident/learning.d.ts.map +0 -1
  151. package/dist/manager/resident/learning.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 55.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 5aae7c4: New, additive: an experience library for the learning module. `SqliteLearningExperienceStore` records, per adopted or rejected cycle, the full artefact, a typed edit ledger (surface, change, verdict `helped` / `hurt` / `no observed effect` / `confounded`) and lessons (cue, lesson, evidence, confidence with a reason). When a candidate changed several components, rows not tried alone are stored as `confounded`, and a lesson resting on confounded edits is capped at medium or low. `retrieve` returns entries only from the same domain and evaluator revision, and only those recorded before the ordinal you pass. Entries are immutable, run through the leak tripwire, and live in a separate database file. New exports: `SqliteLearningExperienceStore`, `normalizeLearningExperience`, `selectLearningExperience`, `LEARNING_EDIT_VERDICTS`, `LEARNING_CONFIDENCE_LEVELS`, `LEARNING_EXPERIENCE_STORE_VERSION` and the related types. Nothing existing changes; the cycle does not read the library yet. `record` and `retrieve` require a `leakGuard` (pass `{}` for the built-in checks only) and scan every string an entry holds, on write and again on read. More than one edit row is treated as changed together unless marked `isolated`, and a lesson citing no edits is capped as resting on all of them.
8
+ - 5aae7c4: New, additive: the first built-in learning generator. `proposeLearningCandidate` reads a domain's observations and earlier cycles, asks a model you supply (`LearningModel`, one function returning text and token counts) for one revision of an instruction skill, and returns the candidate with its typed edits, or refuses it. Every edit must sit on the editable surface (`resolveLearningSurface`, today the instruction skill only) and the wording must stay clear of the safety floor; a problem goes back to the model once and a second failure is refused, naming the part and never the text. `LEARNING_FLOOR_COMPONENTS` lists what is never editable and `resolveLearningSurface` throws if a configuration names one. `learningExperienceFromCycle` turns a finished cycle into an experience entry (adopted and helped, rejected and hurt or no observed effect). The proposal does not judge itself: it goes through `runLearningCycle` for paired verification, protection, confirmation and exact-revision activation. Nothing existing changes. New exports: `proposeLearningCandidate`, `resolveLearningSurface`, `learningExperienceFromCycle`, `LEARNING_SURFACE_KINDS`, `LEARNING_FLOOR_COMPONENTS` and the related types.
9
+ - 5aae7c4: The learning cycle now refuses to learn from, or produce, anything that carries evaluator-side material. `runLearningCycle` checks the active skill baseline, the failure evidence (before any stage or journal entry), exploration observations and the generated candidate against the built-in grader-verdict and answer-key wording and secret shapes, plus an optional `leakGuard` you supply (path globs, planted canaries from `createLearningCanary()`, extra markers, verbatim protection-task text, literal secrets). A hit ends the cycle with status `failed`, a reason that says it is a leak and not a false positive, and `result.leak` listing the kind, subject and rule; the matched text is never repeated and a refused candidate is not returned. New exports: `createLearningCanary`, `scanForLearningLeak`, `assertNoLearningLeak`, `LearningLeakError` and the types `LearningLeakGuard`, `LearningLeakFinding`, `LearningLeakKind`, `LearningLeakSubject`. What to check: evidence that legitimately mentions a verdict, an answer key or a secret-shaped string is now refused. Remove or redact it at the source; there is no switch to turn the built-in checks off. Canaries are also found inside larger base64 or base64url blobs at any alignment and in uppercase hex; the built-in secret shapes are found through zero-width characters. The CLI passes no `leakGuard`, so it applies only the built-in checks.
10
+ - 5aae7c4: Learning moves out of the resident module into its own, because it is not specific to residents. Nothing breaks: every exported name that began with `Resident` (`runResidentLearningCycle`, `SqliteResidentLearningStore`, `runStoredResidentLearningCycle`, `runStoredResidentLearningFromObservations`, `hashResidentSkill`, `projectResidentLearning`, `ResidentSkillCandidate`, `ResidentLearningState`, and the rest) still works and is the same value or type as its new name (`runLearningCycle`, `SqliteLearningStore`, `runStoredLearningCycle`, `runStoredLearningFromObservations`, `hashLearningSkill`, `projectLearning`, `LearningSkillCandidate`, `LearningState`, ...). The old names are marked `@deprecated` and will be removed in the next major release; switch to the new names when convenient. Also new: `SqliteLearningStore.pruneObservations(shouldDrop)`, which removes unclaimed observations a host no longer wants to keep.
11
+ - 5aae7c4: Learning by itself no longer counts a refused tool call as a failure: the answer to a call you declined, to a call that went with the turn your No ended, and to a call whose question went unanswered records nothing, because those are your choices, not a tool that broke. The background learning cycle also stays still while any question about a tool call waits on you, and goes on once it closes. The guidance a project learned now opens with "Namzu learned" instead of claiming you confirmed it, since the background cycle activates it without a prompt; a stored memory still wins where the two disagree. `@namzu/sdk` adds `isReviewRefusalResult(output)`, which says whether a tool result answers a call the review did not let run, so a host that counts failures can leave those out. Nothing to change on upgrade.
12
+ - 5aae7c4: Residents are deprecated and will be removed in the next major release. Every resident export (`runResident`, `stepResident`, `ResidentHost`, `DiskResidentStore`, `DiskResidentAgenda`, `createResidentSelector`, `inspectResidentConsumption`, the outbox, history, tool-evidence and step-context helpers, and their types) is now marked `@deprecated` and behaves as before. Nothing is removed in this release. If you use them for long-running work, move to scheduled tasks (`LocalTaskScheduler`), session goals or background agents; learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda (`DiskResidentAgenda`) as its activation target and throws `ResidentConflictError` when it is paused, so a consumer of learning still needs the deprecated resident agenda store. Learning gets its own activation target before the residents are removed; that is the precondition for removing them in the next major release.
13
+
3
14
  ## 55.0.0
4
15
 
5
16
  ### Major Changes
@@ -1,10 +1,11 @@
1
1
  import { z } from 'zod';
2
- import { type HarnessProtectionPlan } from '../../eval/harness-protection.js';
3
- import { type HarnessReview, type HarnessVerificationBatch } from '../../eval/harness-verification.js';
4
- import type { DiskResidentAgenda } from './agenda.js';
5
- import { type ResidentLearningEvidence, type ResidentSkillCandidate } from './learning.js';
2
+ import { type HarnessProtectionPlan } from '../eval/harness-protection.js';
3
+ import { type HarnessReview, type HarnessVerificationBatch } from '../eval/harness-verification.js';
4
+ import type { DiskResidentAgenda } from '../manager/resident/agenda.js';
5
+ import { type LearningLeakFinding, type LearningLeakGuard } from './leak-tripwire.js';
6
+ import { type LearningEvidence, type LearningSkillCandidate } from './skill.js';
6
7
  /** @experimental One explicitly requested experiment; callbacks own inference and evaluation. */
7
- export type ResidentLearningStage = 'explore' | 'generate' | 'verification' | 'confirmation';
8
+ export type LearningStage = 'explore' | 'generate' | 'verification' | 'confirmation';
8
9
  declare const receiptSchema: z.ZodObject<{
9
10
  /** The session and turn of the execution this usage belongs to; one receipt per turn. */
10
11
  sessionId: z.ZodString;
@@ -23,9 +24,9 @@ declare const receiptSchema: z.ZodObject<{
23
24
  costUsd: number | null;
24
25
  }>;
25
26
  /** @experimental One non-overlapping execution's usage, including its retries. Null is unknown. */
26
- export type ResidentLearningReceipt = Readonly<z.infer<typeof receiptSchema>>;
27
+ export type LearningReceipt = Readonly<z.infer<typeof receiptSchema>>;
27
28
  /** @experimental Recorded values are lower bounds when a receipt or stage is incomplete. */
28
- export interface ResidentLearningConsumption {
29
+ export interface LearningConsumption {
29
30
  readonly tokens: number;
30
31
  readonly costUsd: number;
31
32
  readonly receipts: number;
@@ -34,51 +35,51 @@ export interface ResidentLearningConsumption {
34
35
  readonly unfinishedStages: number;
35
36
  }
36
37
  /** @experimental Append in sequence to host-owned durable storage before acknowledging. */
37
- export interface ResidentLearningCycleEvent {
38
+ export interface LearningCycleEvent {
38
39
  readonly cycleId: string;
39
40
  readonly sequence: number;
40
41
  readonly kind: 'started' | 'stage-started' | 'stage-finished' | 'usage' | 'exploration' | 'candidate' | 'evaluation' | 'activation-requested' | 'finished';
41
- readonly stage?: ResidentLearningStage;
42
+ readonly stage?: LearningStage;
42
43
  readonly data: Readonly<Record<string, unknown>>;
43
44
  }
44
45
  /** @experimental Use this stage's signal for every owned execution; await every usage append. */
45
- export interface ResidentLearningCycleContext {
46
+ export interface LearningCycleContext {
46
47
  readonly cycleId: string;
47
- readonly stage: ResidentLearningStage;
48
+ readonly stage: LearningStage;
48
49
  readonly signal: AbortSignal;
49
50
  /** Planning allowance, not a reservation or a cap on a callback's in-flight work. */
50
51
  readonly remainingUnits: number;
51
- recordUsage(receipt: ResidentLearningReceipt): Promise<void>;
52
+ recordUsage(receipt: LearningReceipt): Promise<void>;
52
53
  }
53
54
  /** @experimental Original failure and active baseline; never contains confirmation tasks. */
54
- export interface ResidentLearningExplorationContext extends ResidentLearningCycleContext {
55
+ export interface LearningExplorationContext extends LearningCycleContext {
55
56
  readonly skillName: string;
56
57
  /** Admitted by the host before generation; cannot be changed by a candidate. */
57
58
  readonly purpose?: 'task' | 'exploration';
58
59
  readonly failure: Readonly<{
59
- evidence: ResidentLearningEvidence;
60
+ evidence: LearningEvidence;
60
61
  trace: string;
61
62
  }>;
62
- readonly baseline: ResidentSkillCandidate | null;
63
+ readonly baseline: LearningSkillCandidate | null;
63
64
  }
64
65
  /** @experimental Host-retained environment observations, not a model's claim of success. */
65
- export interface ResidentLearningExploration {
66
- readonly evidence: ResidentLearningEvidence;
66
+ export interface LearningExploration {
67
+ readonly evidence: LearningEvidence;
67
68
  readonly trace: string;
68
69
  }
69
70
  /** @experimental Generation sees completed exploration, never held-out evaluation cases. */
70
- export interface ResidentLearningGenerationContext extends ResidentLearningExplorationContext {
71
- readonly exploration?: Readonly<ResidentLearningExploration>;
71
+ export interface LearningGenerationContext extends LearningExplorationContext {
72
+ readonly exploration?: Readonly<LearningExploration>;
72
73
  }
73
74
  /** @experimental The host supplies independently scored, retained traces for these exact revisions. */
74
- export interface ResidentLearningEvaluationContext extends ResidentLearningCycleContext {
75
- readonly baseline: ResidentSkillCandidate | null;
76
- readonly candidate: ResidentSkillCandidate;
75
+ export interface LearningEvaluationContext extends LearningCycleContext {
76
+ readonly baseline: LearningSkillCandidate | null;
77
+ readonly candidate: LearningSkillCandidate;
77
78
  readonly baselineRevision: string;
78
79
  readonly candidateRevision: string;
79
80
  }
80
- /** @experimental No provider, default background loop or executable-code activation is installed. */
81
- export interface ResidentLearningCycleOptions {
81
+ /** @experimental The SDK installs no provider, background loop or executable-code activation; the host supplies them. */
82
+ export interface LearningCycleOptions {
82
83
  /** Omitted means task guidance. Explicitly select exploration to improve an explorer policy. */
83
84
  readonly purpose?: 'task' | 'exploration';
84
85
  /** Fixed before generation; both rounds must preserve every named task. */
@@ -86,43 +87,51 @@ export interface ResidentLearningCycleOptions {
86
87
  readonly agenda: Pick<DiskResidentAgenda, 'read' | 'promoteSkill'>;
87
88
  readonly skillName: string;
88
89
  readonly failure: {
89
- readonly evidence: ResidentLearningEvidence;
90
+ readonly evidence: LearningEvidence;
90
91
  readonly trace: string;
91
92
  };
92
93
  readonly parentCycleId?: string;
94
+ /**
95
+ * Evaluator-side material to keep out of the evidence and the guidance built
96
+ * from it. The built-in markers and secret shapes always apply. A hit refuses
97
+ * the cycle as a leak (see `LearningCycleResult.leak`), before anything is built.
98
+ */
99
+ readonly leakGuard?: LearningLeakGuard;
93
100
  readonly signal: AbortSignal;
94
101
  /** Stops subsequent stages/activation after observed excess; callbacks enforce in-flight limits. */
95
102
  readonly resources: {
96
103
  readonly unit: 'tokens' | 'usd';
97
104
  readonly maxUnits: number;
98
105
  };
99
- readonly record: (event: ResidentLearningCycleEvent) => Promise<void>;
106
+ readonly record: (event: LearningCycleEvent) => Promise<void>;
100
107
  /** Optional active tool exploration before synthesis; the host retains actual observations. */
101
- readonly explore?: (context: ResidentLearningExplorationContext) => Promise<{
102
- readonly observations: ResidentLearningExploration;
108
+ readonly explore?: (context: LearningExplorationContext) => Promise<{
109
+ readonly observations: LearningExploration;
103
110
  readonly usageComplete: boolean;
104
111
  }>;
105
- readonly generate: (context: ResidentLearningGenerationContext) => Promise<{
106
- readonly candidate: ResidentSkillCandidate;
112
+ readonly generate: (context: LearningGenerationContext) => Promise<{
113
+ readonly candidate: LearningSkillCandidate;
107
114
  /** All executions, including failures and side calls, have supplied receipts. */
108
115
  readonly usageComplete: boolean;
109
116
  }>;
110
- readonly evaluate: (context: ResidentLearningEvaluationContext) => Promise<{
117
+ readonly evaluate: (context: LearningEvaluationContext) => Promise<{
111
118
  readonly batch: HarnessVerificationBatch;
112
119
  readonly usageComplete: boolean;
113
120
  }>;
114
121
  }
115
122
  /** @experimental An ambiguous activation must be inspected, never automatically replayed. */
116
- export interface ResidentLearningCycleResult {
123
+ export interface LearningCycleResult {
117
124
  readonly cycleId: string;
118
125
  readonly status: 'activated' | 'rejected' | 'inconclusive' | 'conflict' | 'cancelled' | 'failed' | 'activation-unknown';
119
126
  readonly reason: string;
120
- readonly candidate?: ResidentSkillCandidate;
127
+ readonly candidate?: LearningSkillCandidate;
121
128
  readonly candidateRevision?: string;
122
129
  readonly baselineRevision?: string;
123
130
  readonly agendaRevision?: number;
124
131
  readonly review?: HarnessReview;
125
- readonly consumption: ResidentLearningConsumption;
132
+ /** Present when the cycle was refused as a leak: where it was seen, never the text. */
133
+ readonly leak?: readonly LearningLeakFinding[];
134
+ readonly consumption: LearningConsumption;
126
135
  readonly auditComplete: boolean;
127
136
  }
128
137
  /**
@@ -130,6 +139,6 @@ export interface ResidentLearningCycleResult {
130
139
  * activate through the existing exact-revision transaction. No internal inference
131
140
  * loop, retry or model-generated success claim replaces the host's evaluator.
132
141
  */
133
- export declare function runResidentLearningCycle(options: ResidentLearningCycleOptions): Promise<ResidentLearningCycleResult>;
142
+ export declare function runLearningCycle(options: LearningCycleOptions): Promise<LearningCycleResult>;
134
143
  export {};
135
- //# sourceMappingURL=learning-cycle.d.ts.map
144
+ //# sourceMappingURL=cycle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cycle.d.ts","sourceRoot":"","sources":["../../src/learning/cycle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EACN,KAAK,qBAAqB,EAE1B,MAAM,+BAA+B,CAAA;AACtC,OAAO,EACN,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAE7B,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAEvE,OAAO,EAEN,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EAGtB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACN,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,E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FAA6F;AAC7F,MAAM,WAAW,mBAAmB;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,MAAM,EACZ,WAAW,GACX,UAAU,GACV,cAAc,GACd,UAAU,GACV,WAAW,GACX,QAAQ,GACR,oBAAoB,CAAA;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,SAAS,CAAC,EAAE,sBAAsB,CAAA;IAC3C,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;IACnC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAClC,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAA;IAChC,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAA;IAC/B,uFAAuF;IACvF,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,mBAAmB,EAAE,CAAA;IAC9C,QAAQ,CAAC,WAAW,EAAE,mBAAmB,CAAA;IACzC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAA;CAC/B;AAED;;;;GAIG;AACH,wBAAsB,gBAAgB,CACrC,OAAO,EAAE,oBAAoB,GAC3B,OAAO,CAAC,mBAAmB,CAAC,CAyX9B"}
@@ -1,9 +1,10 @@
1
1
  import { createHash, randomUUID } from 'node:crypto';
2
2
  import { z } from 'zod';
3
- import { normalizeHarnessProtection, } from '../../eval/harness-protection.js';
4
- import { reviewHarnessCandidate, } from '../../eval/harness-verification.js';
5
- import { hashResidentSkill, normalizeResidentSkill, promoteResidentSkill, residentLearningEvidenceSchema, } from './learning.js';
6
- import { ResidentConflictError } from './store.js';
3
+ import { normalizeHarnessProtection, } from '../eval/harness-protection.js';
4
+ import { reviewHarnessCandidate, } from '../eval/harness-verification.js';
5
+ import { ResidentConflictError } from '../manager/resident/store.js';
6
+ import { LearningLeakError, assertNoLearningLeak, } from './leak-tripwire.js';
7
+ import { hashLearningSkill, learningEvidenceSchema, normalizeLearningSkill, promoteLearningSkill, } from './skill.js';
7
8
  const receiptSchema = z.object({
8
9
  /** The session and turn of the execution this usage belongs to; one receipt per turn. */
9
10
  sessionId: z.string().uuid(),
@@ -16,7 +17,7 @@ const receiptSchema = z.object({
16
17
  * activate through the existing exact-revision transaction. No internal inference
17
18
  * loop, retry or model-generated success claim replaces the host's evaluator.
18
19
  */
19
- export async function runResidentLearningCycle(options) {
20
+ export async function runLearningCycle(options) {
20
21
  const protection = normalizeHarnessProtection(options.protection);
21
22
  const purpose = z.enum(['task', 'exploration']).parse(options.purpose ?? 'task');
22
23
  const purposeContext = options.purpose === undefined ? {} : { purpose };
@@ -25,7 +26,7 @@ export async function runResidentLearningCycle(options) {
25
26
  .regex(/^[a-z0-9][a-z0-9_-]{0,63}$/)
26
27
  .parse(options.skillName);
27
28
  const failure = Object.freeze({
28
- evidence: Object.freeze(residentLearningEvidenceSchema.parse(options.failure.evidence)),
29
+ evidence: Object.freeze(learningEvidenceSchema.parse(options.failure.evidence)),
29
30
  trace: z.string().trim().min(1).max(32_000).parse(options.failure.trace),
30
31
  });
31
32
  const resources = z
@@ -44,6 +45,7 @@ export async function runResidentLearningCycle(options) {
44
45
  let review;
45
46
  let activatedRevision;
46
47
  let activationRequested = false;
48
+ let leak;
47
49
  const usage = () => ({
48
50
  tokens: [...receipts.values()].reduce((n, r) => n + (r.tokens ?? 0), 0),
49
51
  costUsd: [...receipts.values()].reduce((n, r) => n + (r.costUsd ?? 0), 0),
@@ -75,6 +77,7 @@ export async function runResidentLearningCycle(options) {
75
77
  ...(candidate ? { candidate, candidateRevision } : {}),
76
78
  ...(baselineRevision ? { baselineRevision } : {}),
77
79
  ...(review ? { review } : {}),
80
+ ...(leak ? { leak } : {}),
78
81
  ...(activatedRevision !== undefined ? { agendaRevision: activatedRevision } : {}),
79
82
  consumption: usage(),
80
83
  auditComplete,
@@ -93,6 +96,11 @@ export async function runResidentLearningCycle(options) {
93
96
  };
94
97
  const execute = async () => {
95
98
  options.signal.throwIfAborted();
99
+ const guard = (...subjects) => assertNoLearningLeak(options.leakGuard, subjects);
100
+ guard({
101
+ subject: 'failure.evidence',
102
+ text: `${failure.evidence.key}\n${failure.evidence.source}\n${failure.evidence.reason}`,
103
+ }, { subject: 'failure.trace', text: failure.trace });
96
104
  const snapshot = structuredClone(await options.agenda.read());
97
105
  if (!snapshot)
98
106
  throw new Error('No resident agenda exists for this learning cycle.');
@@ -101,8 +109,18 @@ export async function runResidentLearningCycle(options) {
101
109
  const current = snapshot.learning?.skills.find((s) => s.name === skillName);
102
110
  if (current && (current.purpose ?? 'task') !== purpose)
103
111
  throw new Error('The active skill has a different learning purpose; use a distinct skill name.');
104
- const baseline = current ? normalizeResidentSkill(current) : null;
105
- baselineRevision = baseline ? hashResidentSkill(baseline) : 'none';
112
+ const baseline = current ? normalizeLearningSkill(current) : null;
113
+ baselineRevision = baseline ? hashLearningSkill(baseline) : 'none';
114
+ if (baseline)
115
+ guard({
116
+ subject: 'baseline',
117
+ text: [
118
+ baseline.name,
119
+ baseline.description,
120
+ baseline.body,
121
+ ...(baseline.sources ? [JSON.stringify(baseline.sources)] : []),
122
+ ].join('\n'),
123
+ });
106
124
  await append('started', {
107
125
  tenantId: snapshot.tenantId,
108
126
  agentKey: snapshot.agentKey,
@@ -187,9 +205,13 @@ export async function runResidentLearningCycle(options) {
187
205
  const explore = options.explore;
188
206
  const observed = await stage('explore', (context) => explore(Object.freeze({ ...context, skillName, ...purposeContext, failure, baseline })));
189
207
  exploration = Object.freeze({
190
- evidence: Object.freeze(residentLearningEvidenceSchema.parse(observed.observations.evidence)),
208
+ evidence: Object.freeze(learningEvidenceSchema.parse(observed.observations.evidence)),
191
209
  trace: z.string().trim().min(1).max(32_000).parse(observed.observations.trace),
192
210
  });
211
+ guard({
212
+ subject: 'exploration.evidence',
213
+ text: `${exploration.evidence.key}\n${exploration.evidence.source}\n${exploration.evidence.reason}`,
214
+ }, { subject: 'exploration.trace', text: exploration.trace });
193
215
  await append('exploration', {
194
216
  observations: exploration,
195
217
  digest: createHash('sha256').update(JSON.stringify(exploration)).digest('hex'),
@@ -206,8 +228,14 @@ export async function runResidentLearningCycle(options) {
206
228
  baseline,
207
229
  ...(exploration ? { exploration } : {}),
208
230
  })));
209
- candidateRevision = hashResidentSkill(generated.candidate);
210
- candidate = normalizeResidentSkill(generated.candidate);
231
+ const built = normalizeLearningSkill(generated.candidate);
232
+ guard({ subject: 'candidate.name', text: built.name }, { subject: 'candidate.description', text: built.description }, { subject: 'candidate.body', text: built.body }, {
233
+ subject: 'candidate.sources',
234
+ text: (built.sources ?? []).map((s) => `${s.key}\n${s.revision}`).join('\n'),
235
+ paths: (built.sources ?? []).map((s) => s.key),
236
+ });
237
+ candidateRevision = hashLearningSkill(generated.candidate);
238
+ candidate = built;
211
239
  if ((candidate.purpose ?? 'task') !== purpose)
212
240
  throw new Error('Generated skill purpose does not match the host-admitted learning purpose.');
213
241
  if (candidate.name !== skillName)
@@ -270,7 +298,7 @@ export async function runResidentLearningCycle(options) {
270
298
  };
271
299
  // Validate all existing activation contracts before entering the ambiguous
272
300
  // commit interval. The store repeats this against its atomic snapshot.
273
- promoteResidentSkill(snapshot.learning, candidate, { verification, confirmation, protection }, evidence);
301
+ promoteLearningSkill(snapshot.learning, candidate, { verification, confirmation, protection }, evidence);
274
302
  await append('activation-requested', {
275
303
  baselineRevision,
276
304
  candidateRevision,
@@ -287,13 +315,17 @@ export async function runResidentLearningCycle(options) {
287
315
  outcome = await execute();
288
316
  }
289
317
  catch (error) {
290
- outcome = result(error instanceof ResidentConflictError
291
- ? 'conflict'
292
- : activationRequested
293
- ? 'activation-unknown'
294
- : options.signal.aborted
295
- ? 'cancelled'
296
- : 'failed', error instanceof Error ? error.message : String(error));
318
+ if (error instanceof LearningLeakError)
319
+ leak = error.findings;
320
+ outcome = result(error instanceof LearningLeakError
321
+ ? 'failed'
322
+ : error instanceof ResidentConflictError
323
+ ? 'conflict'
324
+ : activationRequested
325
+ ? 'activation-unknown'
326
+ : options.signal.aborted
327
+ ? 'cancelled'
328
+ : 'failed', error instanceof Error ? error.message : String(error));
297
329
  }
298
330
  if (auditComplete) {
299
331
  try {
@@ -305,4 +337,4 @@ export async function runResidentLearningCycle(options) {
305
337
  }
306
338
  return { ...outcome, auditComplete };
307
339
  }
308
- //# sourceMappingURL=learning-cycle.js.map
340
+ //# sourceMappingURL=cycle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cycle.js","sourceRoot":"","sources":["../../src/learning/cycle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAEN,0BAA0B,GAC1B,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAGN,sBAAsB,GACtB,MAAM,iCAAiC,CAAA;AAExC,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAA;AACpE,OAAO,EACN,iBAAiB,EAIjB,oBAAoB,GACpB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAGN,iBAAiB,EACjB,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,GACpB,MAAM,YAAY,CAAA;AAKnB,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9B,yFAAyF;IACzF,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC5B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACzB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IACxD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACrD,CAAC,CAAA;AAkIF;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACrC,OAA6B;I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AAM,CACf,KAAK,YAAY,iBAAiB;YACjC,CAAC,CAAC,QAAQ;YACV,CAAC,CAAC,KAAK,YAAY,qBAAqB;gBACvC,CAAC,CAAC,UAAU;gBACZ,CAAC,CAAC,mBAAmB;oBACpB,CAAC,CAAC,oBAAoB;oBACtB,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO;wBACvB,CAAC,CAAC,WAAW;wBACb,CAAC,CAAC,QAAQ,EACd,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CACtD,CAAA;IACF,CAAC;IACD,IAAI,aAAa,EAAE,CAAC;QACnB,IAAI,CAAC;YACJ,MAAM,MAAM,CAAC,UAAU,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAA;QAC9C,CAAC;QAAC,MAAM,CAAC;YACR,gEAAgE;QACjE,CAAC;IACF,CAAC;IACD,OAAO,EAAE,GAAG,OAAO,EAAE,aAAa,EAAE,CAAA;AACrC,CAAC"}
@@ -0,0 +1,86 @@
1
+ /**
2
+ * The learning module used to live under `manager/resident` and carried a
3
+ * `Resident` prefix. Learning is a feature of all of Namzu, not of residents,
4
+ * so every name now lives in `learning/` without the prefix. The old names stay
5
+ * as aliases of the new ones until the next major release.
6
+ */
7
+ import { runLearningCycle } from './cycle.js';
8
+ import type * as Cycle from './cycle.js';
9
+ import type * as Observation from './observation.js';
10
+ import { hashLearningSkill, projectLearning } from './skill.js';
11
+ import type * as Skill from './skill.js';
12
+ import { SqliteLearningStore, runStoredLearningCycle, runStoredLearningFromObservations } from './store.js';
13
+ import type * as Store from './store.js';
14
+ /** @deprecated Renamed to `LearningEvidence`; the old name is removed in the next major release. */
15
+ export type ResidentLearningEvidence = Skill.LearningEvidence;
16
+ /** @deprecated Renamed to `LearningSkillCandidate`; the old name is removed in the next major release. */
17
+ export type ResidentSkillCandidate = Skill.LearningSkillCandidate;
18
+ /** @deprecated Renamed to `LearnedSkill`; the old name is removed in the next major release. */
19
+ export type ResidentLearnedSkill = Skill.LearnedSkill;
20
+ /** @deprecated Renamed to `LearningState`; the old name is removed in the next major release. */
21
+ export type ResidentLearningState = Skill.LearningState;
22
+ /** @deprecated Renamed to `LearningProfileUpdate`; the old name is removed in the next major release. */
23
+ export type ResidentProfileUpdate = Skill.LearningProfileUpdate;
24
+ /** @deprecated Renamed to `LearningSkillEvaluation`; the old name is removed in the next major release. */
25
+ export type ResidentSkillEvaluation = Skill.LearningSkillEvaluation;
26
+ /** @deprecated Renamed to `LearningProjectionOptions`; the old name is removed in the next major release. */
27
+ export type ResidentLearningProjectionOptions = Skill.LearningProjectionOptions;
28
+ /** @deprecated Renamed to `LearningSource`; the old name is removed in the next major release. */
29
+ export type ResidentLearningSource = Skill.LearningSource;
30
+ /** @deprecated Renamed to `LearningProjection`; the old name is removed in the next major release. */
31
+ export type ResidentLearningProjection = Skill.LearningProjection;
32
+ /** @deprecated Renamed to `LearningStage`; the old name is removed in the next major release. */
33
+ export type ResidentLearningStage = Cycle.LearningStage;
34
+ /** @deprecated Renamed to `LearningReceipt`; the old name is removed in the next major release. */
35
+ export type ResidentLearningReceipt = Cycle.LearningReceipt;
36
+ /** @deprecated Renamed to `LearningConsumption`; the old name is removed in the next major release. */
37
+ export type ResidentLearningConsumption = Cycle.LearningConsumption;
38
+ /** @deprecated Renamed to `LearningCycleEvent`; the old name is removed in the next major release. */
39
+ export type ResidentLearningCycleEvent = Cycle.LearningCycleEvent;
40
+ /** @deprecated Renamed to `LearningCycleContext`; the old name is removed in the next major release. */
41
+ export type ResidentLearningCycleContext = Cycle.LearningCycleContext;
42
+ /** @deprecated Renamed to `LearningGenerationContext`; the old name is removed in the next major release. */
43
+ export type ResidentLearningGenerationContext = Cycle.LearningGenerationContext;
44
+ /** @deprecated Renamed to `LearningExplorationContext`; the old name is removed in the next major release. */
45
+ export type ResidentLearningExplorationContext = Cycle.LearningExplorationContext;
46
+ /** @deprecated Renamed to `LearningExploration`; the old name is removed in the next major release. */
47
+ export type ResidentLearningExploration = Cycle.LearningExploration;
48
+ /** @deprecated Renamed to `LearningEvaluationContext`; the old name is removed in the next major release. */
49
+ export type ResidentLearningEvaluationContext = Cycle.LearningEvaluationContext;
50
+ /** @deprecated Renamed to `LearningCycleOptions`; the old name is removed in the next major release. */
51
+ export type ResidentLearningCycleOptions = Cycle.LearningCycleOptions;
52
+ /** @deprecated Renamed to `LearningCycleResult`; the old name is removed in the next major release. */
53
+ export type ResidentLearningCycleResult = Cycle.LearningCycleResult;
54
+ /** @deprecated Renamed to `SqliteLearningStoreOptions`; the old name is removed in the next major release. */
55
+ export type SqliteResidentLearningStoreOptions = Store.SqliteLearningStoreOptions;
56
+ /** @deprecated Renamed to `LearningArtifact`; the old name is removed in the next major release. */
57
+ export type ResidentLearningArtifact = Store.LearningArtifact;
58
+ /** @deprecated Renamed to `LearningRecordedUsage`; the old name is removed in the next major release. */
59
+ export type ResidentLearningRecordedUsage = Store.LearningRecordedUsage;
60
+ /** @deprecated Renamed to `LearningCycleSummary`; the old name is removed in the next major release. */
61
+ export type ResidentLearningCycleSummary = Store.LearningCycleSummary;
62
+ /** @deprecated Renamed to `LearningDiscoveryOptions`; the old name is removed in the next major release. */
63
+ export type ResidentLearningDiscoveryOptions = Store.LearningDiscoveryOptions;
64
+ /** @deprecated Renamed to `LearningDiscoveryResult`; the old name is removed in the next major release. */
65
+ export type ResidentLearningDiscoveryResult = Store.LearningDiscoveryResult;
66
+ /** @deprecated Renamed to `LearningObservation`; the old name is removed in the next major release. */
67
+ export type ResidentLearningObservation = Observation.LearningObservation;
68
+ /** @deprecated Renamed to `LearningObservationRecord`; the old name is removed in the next major release. */
69
+ export type ResidentLearningObservationRecord = Observation.LearningObservationRecord;
70
+ /** @deprecated Renamed to `LearningTarget`; the old name is removed in the next major release. */
71
+ export type ResidentLearningTarget = Observation.LearningTarget;
72
+ /** @deprecated Renamed to `hashLearningSkill`; the old name is removed in the next major release. */
73
+ export declare const hashResidentSkill: typeof hashLearningSkill;
74
+ /** @deprecated Renamed to `projectLearning`; the old name is removed in the next major release. */
75
+ export declare const projectResidentLearning: typeof projectLearning;
76
+ /** @deprecated Renamed to `runLearningCycle`; the old name is removed in the next major release. */
77
+ export declare const runResidentLearningCycle: typeof runLearningCycle;
78
+ /** @deprecated Renamed to `runStoredLearningCycle`; the old name is removed in the next major release. */
79
+ export declare const runStoredResidentLearningCycle: typeof runStoredLearningCycle;
80
+ /** @deprecated Renamed to `runStoredLearningFromObservations`; the old name is removed in the next major release. */
81
+ export declare const runStoredResidentLearningFromObservations: typeof runStoredLearningFromObservations;
82
+ /** @deprecated Renamed to `SqliteLearningStore`; the old name is removed in the next major release. */
83
+ export declare const SqliteResidentLearningStore: typeof SqliteLearningStore;
84
+ /** @deprecated Renamed to `SqliteLearningStore`; the old name is removed in the next major release. */
85
+ export type SqliteResidentLearningStore = SqliteLearningStore;
86
+ //# sourceMappingURL=deprecated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deprecated.d.ts","sourceRoot":"","sources":["../../src/learning/deprecated.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAA;AACxC,OAAO,KAAK,KAAK,WAAW,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAC/D,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAA;AACxC,OAAO,EACN,mBAAmB,EACnB,sBAAsB,EACtB,iCAAiC,EACjC,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAA;AAExC,oGAAoG;AACpG,MAAM,MAAM,wBAAwB,GAAG,KAAK,CAAC,gBAAgB,CAAA;AAE7D,0GAA0G;AAC1G,MAAM,MAAM,sBAAsB,GAAG,KAAK,C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module used to live under `manager/resident` and carried a
3
+ * `Resident` prefix. Learning is a feature of all of Namzu, not of residents,
4
+ * so every name now lives in `learning/` without the prefix. The old names stay
5
+ * as aliases of the new ones until the next major release.
6
+ */
7
+ import { runLearningCycle } from './cycle.js';
8
+ import { hashLearningSkill, projectLearning } from './skill.js';
9
+ import { SqliteLearningStore, runStoredLearningCycle, runStoredLearningFromObservations, } from './store.js';
10
+ /** @deprecated Renamed to `hashLearningSkill`; the old name is removed in the next major release. */
11
+ export const hashResidentSkill = hashLearningSkill;
12
+ /** @deprecated Renamed to `projectLearning`; the old name is removed in the next major release. */
13
+ export const projectResidentLearning = projectLearning;
14
+ /** @deprecated Renamed to `runLearningCycle`; the old name is removed in the next major release. */
15
+ export const runResidentLearningCycle = runLearningCycle;
16
+ /** @deprecated Renamed to `runStoredLearningCycle`; the old name is removed in the next major release. */
17
+ export const runStoredResidentLearningCycle = runStoredLearningCycle;
18
+ /** @deprecated Renamed to `runStoredLearningFromObservations`; the old name is removed in the next major release. */
19
+ export const runStoredResidentLearningFromObservations = runStoredLearningFromObservations;
20
+ /** @deprecated Renamed to `SqliteLearningStore`; the old name is removed in the next major release. */
21
+ export const SqliteResidentLearningStore = SqliteLearningStore;
22
+ //# sourceMappingURL=deprecated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deprecated.js","sourceRoot":"","sources":["../../src/learning/deprecated.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAG7C,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAE/D,OAAO,EACN,mBAAmB,EACnB,sBAAsB,EACtB,iCAAiC,GACjC,MAAM,YAAY,CAAA;AA0FnB,qGAAqG;AACrG,MAAM,CAAC,MAAM,iBAAiB,GAAG,iBAAiB,CAAA;AAElD,mGAAmG;AACnG,MAAM,CAAC,MAAM,uBAAuB,GAAG,eAAe,CAAA;AAEtD,oGAAoG;AACpG,MAAM,CAAC,MAAM,wBAAwB,GAAG,gBAAgB,CAAA;AAExD,0GAA0G;AAC1G,MAAM,CAAC,MAAM,8BAA8B,GAAG,sBAAsB,CAAA;AAEpE,qHAAqH;AACrH,MAAM,CAAC,MAAM,yCAAyC,GAAG,iCAAiC,CAAA;AAE1F,uGAAuG;AACvG,MAAM,CAAC,MAAM,2BAA2B,GAAG,mBAAmB,CAAA"}
@@ -0,0 +1,35 @@
1
+ import type { ProjectId, TenantId } from '../types/ids/index.js';
2
+ import { type LearningExperienceEntry, type LearningExperienceInput, type LearningExperienceQuery } from './experience.js';
3
+ /** The schema version this store reads and writes. */
4
+ export declare const LEARNING_EXPERIENCE_STORE_VERSION = 1;
5
+ /** @experimental Where the library lives; a separate file from the observation journal. */
6
+ export interface SqliteLearningExperienceStoreOptions {
7
+ readonly databasePath: string;
8
+ readonly scope: {
9
+ readonly tenantId: TenantId;
10
+ readonly projectId: ProjectId;
11
+ readonly agentKey: string;
12
+ };
13
+ readonly readOnly?: boolean;
14
+ }
15
+ /**
16
+ * @experimental Durable experience library. Entries are immutable: recording
17
+ * the same cycle again with identical content returns the stored entry, with
18
+ * different content is refused. The artefact is stored whole.
19
+ */
20
+ export declare class SqliteLearningExperienceStore {
21
+ readonly databasePath: string;
22
+ private readonly scope;
23
+ private readonly readOnly;
24
+ constructor(options: SqliteLearningExperienceStoreOptions);
25
+ private use;
26
+ private scopeArgs;
27
+ private decode;
28
+ /** Record one finished cycle. Throws `LearningLeakError` when the entry carries evaluator-side material. */
29
+ record(input: LearningExperienceInput): Promise<LearningExperienceEntry>;
30
+ /** The ordinal the next entry will be recorded after; pass it as `beforeOrdinal` to read everything so far. */
31
+ nextOrdinal(): Promise<number>;
32
+ /** Entries of one domain and evaluator revision recorded before `beforeOrdinal`, newest first. */
33
+ retrieve(query: LearningExperienceQuery): Promise<LearningExperienceEntry[]>;
34
+ }
35
+ //# sourceMappingURL=experience-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"experience-store.d.ts","sourceRoot":"","sources":["../../src/learning/experience-store.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAEhE,OAAO,EACN,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAI5B,MAAM,iBAAiB,CAAA;AAexB,sDAAsD;AACtD,eAAO,MAAM,iCAAiC,IAAI,CAAA;AAElD,2FAA2F;AAC3F,MAAM,WAAW,oCAAoC;IACpD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,KAAK,EAAE;QACf,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAA;QAC3B,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAA;QAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;KACzB,CAAA;IACD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAC3B;AAID;;;;GAIG;AACH,qBAAa,6BAA6B;IACzC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA+C;IACrE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;gBAEtB,OAAO,EAAE,oCAAoC;IAazD,OAAO,CAAC,GAAG;IA6CX,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,MAAM;IAOd,4GAA4G;IACtG,MAAM,CAAC,KAAK,EAAE,uBAAuB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAkC9E,+GAA+G;IACzG,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC;IAepC,kGAAkG;IAC5F,QAAQ,CAAC,KAAK,EAAE,uBAAuB,GAAG,OAAO,CAAC,uBAAuB,EAAE,CAAC;CAyBlF"}