@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
@@ -51,10 +51,18 @@ const receiptSchema = z
51
51
  ctx.addIssue({ code: z.ZodIssueCode.custom, message: 'Unpriced usage exceeds own usage.' })
52
52
  })
53
53
 
54
- /** @experimental Host-authenticated cumulative root receipt. Cost covers this root only. */
54
+ /**
55
+ * @experimental Host-authenticated cumulative root receipt. Cost covers this root only.
56
+ *
57
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
58
+ */
55
59
  export type ResidentConsumptionReceipt = z.infer<typeof receiptSchema>
56
60
 
57
- /** @experimental A host resolves only authoritative admitted claims and bounds each read. */
61
+ /**
62
+ * @experimental A host resolves only authoritative admitted claims and bounds each read.
63
+ *
64
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
65
+ */
58
66
  export interface ResidentConsumptionResolver {
59
67
  /** Worst-case bytes read per resolution; reserved before calling the adapter. */
60
68
  readonly maxReadBytes: number
@@ -64,7 +72,11 @@ export interface ResidentConsumptionResolver {
64
72
  ): Promise<ResidentConsumptionReceipt | null>
65
73
  }
66
74
 
67
- /** @experimental Bounds the entire inspection, not just each page. No inference or writes. */
75
+ /**
76
+ * @experimental Bounds the entire inspection, not just each page. No inference or writes.
77
+ *
78
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
79
+ */
68
80
  export interface ResidentConsumptionOptions {
69
81
  readonly cursor?: number
70
82
  readonly maxRevisions?: number
@@ -72,14 +84,22 @@ export interface ResidentConsumptionOptions {
72
84
  readonly maxReceiptBytes?: number
73
85
  }
74
86
 
75
- /** @experimental Missing and deferred receipts never establish zero usage. */
87
+ /**
88
+ * @experimental Missing and deferred receipts never establish zero usage.
89
+ *
90
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
91
+ */
76
92
  export interface ResidentConsumptionAttempt extends ResidentAdmission {
77
93
  readonly settlement: ResidentSettlement | null
78
94
  readonly receipt: ResidentConsumptionReceipt | null
79
95
  readonly receiptStatus: 'available' | 'missing' | 'invalid' | 'deferred' | 'duplicate-turn'
80
96
  }
81
97
 
82
- /** @experimental An evidence projection, not a bill or an enforced spending cap. */
98
+ /**
99
+ * @experimental An evidence projection, not a bill or an enforced spending cap.
100
+ *
101
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
102
+ */
83
103
  export interface ResidentConsumptionReport {
84
104
  readonly scope: ResidentActivityScope
85
105
  readonly fromRevision: number
@@ -110,6 +130,8 @@ export interface ResidentConsumptionReport {
110
130
  * @experimental Inspect cumulative root receipts once per admitted claim. Historical
111
131
  * archive/reconcile events never erase consumption. Tree tokens are a separate total:
112
132
  * adding them to own tokens would count the root twice. Descendant prices are unknown.
133
+ *
134
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
113
135
  */
114
136
  export async function inspectResidentConsumption(
115
137
  source: ResidentActivitySource,
@@ -1,6 +1,10 @@
1
1
  import type { ResidentDeliveryGate } from './outbox.js'
2
2
 
3
- /** @experimental A daily allowed delivery window in an explicit named time zone. */
3
+ /**
4
+ * @experimental A daily allowed delivery window in an explicit named time zone.
5
+ *
6
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
7
+ */
4
8
  export interface ResidentDeliveryWindowConfig {
5
9
  readonly timeZone: string
6
10
  /** Inclusive local minute of the day, from 0 through 1439. */
@@ -22,6 +26,8 @@ const searchMinutes = 72 * 60
22
26
  * is bounded to 72 hours and the Date range; no opening returns nextCheckAt:null.
23
27
  * Historic time zones with second-based offsets may defer up to one extra minute.
24
28
  * This gate does not schedule a timer, authorize a destination or send a message.
29
+ *
30
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
25
31
  */
26
32
  export function createResidentDeliveryWindow(
27
33
  config: ResidentDeliveryWindowConfig,
@@ -13,7 +13,11 @@ import { evidenceTokenKey } from '../../utils/evidence-tokens.js'
13
13
  import { type ResidentState, residentStateSchema } from './store.js'
14
14
  import type { ResidentToolEvidenceSource } from './tool-evidence.js'
15
15
 
16
- /** @experimental Automatic original-tool recall for exactly one admitted resident turn. */
16
+ /**
17
+ * @experimental Automatic original-tool recall for exactly one admitted resident turn.
18
+ *
19
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
20
+ */
17
21
  export interface ResidentEvidenceRecallOptions {
18
22
  readonly source: ResidentToolEvidenceSource
19
23
  /** Already admitted state; summaries supply search words, never new observations. */
@@ -74,6 +78,8 @@ function residentQueryWords(text: string): string[] {
74
78
  * Reuses the shared bounded ranking/rendering engine while retaining the
75
79
  * pursuit's settlement authority. No arbitrary Session discovery, saved fact
76
80
  * cache, inference, workspace reread or action replay is performed here.
81
+ *
82
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
77
83
  */
78
84
  export function createResidentEvidenceRecallStep(
79
85
  options: ResidentEvidenceRecallOptions,
@@ -6,7 +6,11 @@ const SCAN_BYTES = 8 * 1024 * 1024
6
6
  const SCAN_REVISIONS = 32
7
7
  const TEXT_PAGE_CHARS = 6_000
8
8
 
9
- /** @experimental Host-bound historical scope; the upper revision never advances implicitly. */
9
+ /**
10
+ * @experimental Host-bound historical scope; the upper revision never advances implicitly.
11
+ *
12
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
13
+ */
10
14
  export interface ResidentHistoryScope {
11
15
  readonly tenantId: string
12
16
  readonly agentKey: string
@@ -14,13 +18,21 @@ export interface ResidentHistoryScope {
14
18
  readonly throughRevision: number
15
19
  }
16
20
 
17
- /** @experimental Revision plus part identifies retained text within one pursuit. */
21
+ /**
22
+ * @experimental Revision plus part identifies retained text within one pursuit.
23
+ *
24
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
25
+ */
18
26
  export interface ResidentHistoryAddress {
19
27
  readonly revision: number
20
28
  readonly part: number
21
29
  }
22
30
 
23
- /** @experimental Summary or accepted wake input from a settled historical step. */
31
+ /**
32
+ * @experimental Summary or accepted wake input from a settled historical step.
33
+ *
34
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
35
+ */
24
36
  export interface ResidentHistoryMatch extends ResidentHistoryAddress {
25
37
  readonly step: number
26
38
  readonly claimId: string
@@ -30,7 +42,11 @@ export interface ResidentHistoryMatch extends ResidentHistoryAddress {
30
42
  readonly matchingParts: readonly number[]
31
43
  }
32
44
 
33
- /** @experimental Empty query browses recent steps; cursor is the next inclusive revision. */
45
+ /**
46
+ * @experimental Empty query browses recent steps; cursor is the next inclusive revision.
47
+ *
48
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
49
+ */
34
50
  export interface ResidentHistorySearchOptions {
35
51
  /** Optional per-call ceiling, 1 byte–8 MiB. Defaults to 8 MiB. */
36
52
  readonly maxReadBytes?: number
@@ -39,7 +55,11 @@ export interface ResidentHistorySearchOptions {
39
55
  readonly limit?: number
40
56
  }
41
57
 
42
- /** @experimental Counts describe this page, not the whole history. */
58
+ /**
59
+ * @experimental Counts describe this page, not the whole history.
60
+ *
61
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
62
+ */
43
63
  export interface ResidentHistorySearchResult {
44
64
  readonly matches: readonly ResidentHistoryMatch[]
45
65
  readonly nextCursor: number | null
@@ -49,14 +69,22 @@ export interface ResidentHistorySearchResult {
49
69
  readonly incomplete: boolean
50
70
  }
51
71
 
52
- /** @experimental Use the returned nextOffset to continue exact Unicode-safe text. */
72
+ /**
73
+ * @experimental Use the returned nextOffset to continue exact Unicode-safe text.
74
+ *
75
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
76
+ */
53
77
  export interface ResidentHistoryReadOptions extends ResidentHistoryAddress {
54
78
  readonly offset?: number
55
79
  /** Optional per-call ceiling, 1 byte–8 MiB. Defaults to 8 MiB. */
56
80
  readonly maxReadBytes?: number
57
81
  }
58
82
 
59
- /** @experimental A recorded claim remains historical evidence, not proof of current validity. */
83
+ /**
84
+ * @experimental A recorded claim remains historical evidence, not proof of current validity.
85
+ *
86
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
87
+ */
60
88
  export interface ResidentHistoryText extends ResidentHistoryAddress {
61
89
  readonly step: number
62
90
  readonly claimId: string
@@ -69,7 +97,11 @@ export interface ResidentHistoryText extends ResidentHistoryAddress {
69
97
  readonly nextOffset: number | null
70
98
  }
71
99
 
72
- /** @experimental Null with unavailable revisions means unreadable evidence, not proven absence. */
100
+ /**
101
+ * @experimental Null with unavailable revisions means unreadable evidence, not proven absence.
102
+ *
103
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
104
+ */
73
105
  export interface ResidentHistoryReadResult {
74
106
  readonly entry: ResidentHistoryText | null
75
107
  readonly scannedRevisions: number
@@ -77,7 +109,11 @@ export interface ResidentHistoryReadResult {
77
109
  readonly unavailableRevisions: readonly number[]
78
110
  }
79
111
 
80
- /** @experimental A backend must enforce its bound scope and bounded reads. */
112
+ /**
113
+ * @experimental A backend must enforce its bound scope and bounded reads.
114
+ *
115
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
116
+ */
81
117
  export interface ResidentHistorySource {
82
118
  readonly scope: ResidentHistoryScope
83
119
  search(
@@ -1,4 +1,5 @@
1
1
  import { setTimeout as sleep } from 'node:timers/promises'
2
+ import { type LearningState, freezeLearning } from '../../learning/skill.js'
2
3
  import type { ResidentAgendaState, ResidentAgendaStore, ResidentPursuit } from './agenda.js'
3
4
  import {
4
5
  type ResidentObservation,
@@ -6,12 +7,15 @@ import {
6
7
  type ResidentSelector,
7
8
  residentObservationSchema,
8
9
  } from './initiative.js'
9
- import { type ResidentLearningState, freezeResidentLearning } from './learning.js'
10
10
  import { type ResidentStep, stepResident } from './loop.js'
11
11
  import { type ResidentMessageInput, residentMessageInputSchema } from './outbox.js'
12
12
  import { ResidentConflictError, type ResidentDecision, residentDecisionSchema } from './store.js'
13
13
 
14
- /** @experimental Host result describes execution, not external-effect rollback. */
14
+ /**
15
+ * @experimental Host result describes execution, not external-effect rollback.
16
+ *
17
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
18
+ */
15
19
  export interface ResidentHostResult {
16
20
  readonly status: 'idle' | 'paused' | 'unresolved' | 'cancelled' | 'limit' | 'contended'
17
21
  readonly stepsSettled: number
@@ -19,7 +23,11 @@ export interface ResidentHostResult {
19
23
  readonly selection?: ResidentSelection
20
24
  }
21
25
 
22
- /** @experimental Explicit authorization to drive a finite number of background steps. */
26
+ /**
27
+ * @experimental Explicit authorization to drive a finite number of background steps.
28
+ *
29
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
30
+ */
23
31
  export interface ResidentHostRunOptions {
24
32
  readonly signal: AbortSignal
25
33
  readonly maxSteps: number
@@ -29,40 +37,64 @@ export interface ResidentHostRunOptions {
29
37
  readonly keepAlive?: boolean
30
38
  }
31
39
 
32
- /** @experimental Immutable context from the agenda snapshot that authorized this admission. */
40
+ /**
41
+ * @experimental Immutable context from the agenda snapshot that authorized this admission.
42
+ *
43
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
44
+ */
33
45
  export interface ResidentStepContext {
34
46
  readonly agendaRevision: number
35
- readonly learning?: ResidentLearningState
47
+ readonly learning?: LearningState
36
48
  }
37
49
 
38
- /** @experimental A developer callback may bind a different SDK turn for each pursuit. */
50
+ /**
51
+ * @experimental A developer callback may bind a different SDK turn for each pursuit.
52
+ *
53
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
54
+ */
39
55
  export type ResidentPursuitStep = (
40
56
  pursuit: ResidentPursuit,
41
57
  signal: AbortSignal,
42
58
  ) => ReturnType<ResidentStep>
43
59
 
44
- /** @experimental Context-aware callback; existing two-argument steps remain assignable. */
60
+ /**
61
+ * @experimental Context-aware callback; existing two-argument steps remain assignable.
62
+ *
63
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
64
+ */
45
65
  export type ResidentContextualStep = (
46
66
  pursuit: ResidentPursuit,
47
67
  signal: AbortSignal,
48
68
  context: ResidentStepContext,
49
69
  ) => ReturnType<ResidentStep>
50
70
 
51
- /** @experimental Inspect actual outcomes and resource receipts independently of model prose. */
71
+ /**
72
+ * @experimental Inspect actual outcomes and resource receipts independently of model prose.
73
+ *
74
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
75
+ */
52
76
  export type ResidentObserver = (
53
77
  pursuit: ResidentPursuit,
54
78
  decision: ResidentDecision,
55
79
  signal: AbortSignal,
56
80
  ) => Promise<ResidentObservation>
57
81
 
58
- /** @experimental Host validates content and destination; null means no communication. */
82
+ /**
83
+ * @experimental Host validates content and destination; null means no communication.
84
+ *
85
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
86
+ */
59
87
  export type ResidentMessageFactory = (
60
88
  pursuit: ResidentPursuit,
61
89
  decision: ResidentDecision,
62
90
  signal: AbortSignal,
63
91
  ) => Promise<ResidentMessageInput | null>
64
92
 
65
- /** @experimental Opt-in local selection, observed settlement and atomic outbound intent. */
93
+ /**
94
+ * @experimental Opt-in local selection, observed settlement and atomic outbound intent.
95
+ *
96
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
97
+ */
66
98
  export interface ResidentHostOptions {
67
99
  readonly select?: ResidentSelector
68
100
  readonly observe?: ResidentObserver
@@ -75,6 +107,8 @@ export interface ResidentHostOptions {
75
107
  * @experimental Local driver for one durable agenda. Shared agenda admission
76
108
  * prevents overlapping pursuits across processes. Notifications are local;
77
109
  * opt-in keepAlive also rereads durable state on bounded idle timers.
110
+ *
111
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
78
112
  */
79
113
  export class ResidentHost {
80
114
  private controller: AbortController | undefined
@@ -239,7 +273,7 @@ export class ResidentHost {
239
273
  const context: ResidentStepContext = Object.freeze({
240
274
  agendaRevision: state.revision,
241
275
  ...(this.options.learning && state.learning
242
- ? { learning: freezeResidentLearning(state.learning) }
276
+ ? { learning: freezeLearning(state.learning) }
243
277
  : {}),
244
278
  })
245
279
  const execution =
@@ -11,7 +11,11 @@ export const residentObservationSchema = z.object({
11
11
  costUnits: cost.nullable(),
12
12
  })
13
13
 
14
- /** @experimental Host-validated outcome and measured resource use, never model self-confidence. */
14
+ /**
15
+ * @experimental Host-validated outcome and measured resource use, never model self-confidence.
16
+ *
17
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
18
+ */
15
19
  export type ResidentObservation = Readonly<z.infer<typeof residentObservationSchema>>
16
20
 
17
21
  export const residentFeedbackSchema = z.object({
@@ -29,7 +33,11 @@ export const residentFeedbackSchema = z.object({
29
33
  .max(8),
30
34
  })
31
35
 
32
- /** @experimental Last eight observations; best progress and stagnation survive eviction. */
36
+ /**
37
+ * @experimental Last eight observations; best progress and stagnation survive eviction.
38
+ *
39
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
40
+ */
33
41
  export type ResidentFeedback = Readonly<
34
42
  Omit<z.infer<typeof residentFeedbackSchema>, 'observations'>
35
43
  > & {
@@ -69,7 +77,11 @@ export function freezeResidentFeedback(value: ResidentFeedback): ResidentFeedbac
69
77
  })
70
78
  }
71
79
 
72
- /** @experimental Policy units are chosen by the host; scores are heuristics, not probabilities. */
80
+ /**
81
+ * @experimental Policy units are chosen by the host; scores are heuristics, not probabilities.
82
+ *
83
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
84
+ */
73
85
  export interface ResidentSelectionConfig {
74
86
  readonly progressValue: number
75
87
  readonly initialExpectedProgress: number
@@ -77,7 +89,11 @@ export interface ResidentSelectionConfig {
77
89
  readonly maxStagnantSteps?: number
78
90
  }
79
91
 
80
- /** @experimental Explainable inputs for a single selection; unknown cost is not zero. */
92
+ /**
93
+ * @experimental Explainable inputs for a single selection; unknown cost is not zero.
94
+ *
95
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
96
+ */
81
97
  export interface ResidentCandidate {
82
98
  readonly pursuitId: string
83
99
  readonly reason:
@@ -92,7 +108,11 @@ export interface ResidentCandidate {
92
108
  readonly score: number | null
93
109
  }
94
110
 
95
- /** @experimental Choice is bound to the whole agenda revision used to compute it. */
111
+ /**
112
+ * @experimental Choice is bound to the whole agenda revision used to compute it.
113
+ *
114
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
115
+ */
96
116
  export interface ResidentSelection {
97
117
  readonly agendaRevision: number
98
118
  readonly pursuitId: string | null
@@ -100,7 +120,11 @@ export interface ResidentSelection {
100
120
  readonly candidates: readonly ResidentCandidate[]
101
121
  }
102
122
 
103
- /** @experimental Pure local selection; perform inference inside budgeted steps, not here. */
123
+ /**
124
+ * @experimental Pure local selection; perform inference inside budgeted steps, not here.
125
+ *
126
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
127
+ */
104
128
  export type ResidentSelector = (agenda: ResidentAgendaState, now: number) => ResidentSelection
105
129
 
106
130
  function meanObservedCost(observations: readonly ResidentObservation[]): number {
@@ -119,6 +143,8 @@ function meanObservedCost(observations: readonly ResidentObservation[]): number
119
143
  * @experimental Cost-aware continuation with an explicit abstention choice.
120
144
  * This is a measured-progress heuristic, not Bayesian value of computation.
121
145
  * A finite bootstrap allowance permits delayed payoffs but may stop too early.
146
+ *
147
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
122
148
  */
123
149
  export function createResidentSelector(config: ResidentSelectionConfig): ResidentSelector {
124
150
  const policy = z
@@ -6,10 +6,18 @@ import {
6
6
  type ResidentState,
7
7
  } from './store.js'
8
8
 
9
- /** @experimental Developer-owned step; bind providers, tools and budgets in the host. */
9
+ /**
10
+ * @experimental Developer-owned step; bind providers, tools and budgets in the host.
11
+ *
12
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
13
+ */
10
14
  export type ResidentStep = (state: ResidentState, signal: AbortSignal) => Promise<ResidentDecision>
11
15
 
12
- /** @experimental No model is invoked for an idle, terminal or unresolved resident. */
16
+ /**
17
+ * @experimental No model is invoked for an idle, terminal or unresolved resident.
18
+ *
19
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
20
+ */
13
21
  export type ResidentStepResult =
14
22
  | { status: 'settled'; state: ResidentState }
15
23
  | {
@@ -18,7 +26,11 @@ export type ResidentStepResult =
18
26
  state: ResidentState
19
27
  }
20
28
 
21
- /** @experimental A failed/aborted callback leaves its durable claim unresolved. */
29
+ /**
30
+ * @experimental A failed/aborted callback leaves its durable claim unresolved.
31
+ *
32
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
33
+ */
22
34
  export async function stepResident(
23
35
  store: ResidentExecutionStore,
24
36
  step: ResidentStep,
@@ -53,7 +65,11 @@ export async function stepResident(
53
65
  }
54
66
  }
55
67
 
56
- /** @experimental Bounded local driver; not a daemon, process recovery service or notification transport. */
68
+ /**
69
+ * @experimental Bounded local driver; not a daemon, process recovery service or notification transport.
70
+ *
71
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
72
+ */
57
73
  export interface ResidentLoopOptions {
58
74
  readonly store: ResidentExecutionStore
59
75
  readonly step: ResidentStep
@@ -68,6 +84,8 @@ export interface ResidentLoopOptions {
68
84
  * @experimental Continue a pursuit without a new user message. Null wake times
69
85
  * and terminal states stop immediately; cancellation also interrupts idle waits.
70
86
  * An abort cannot undo callback effects or forcibly stop a callback ignoring its signal.
87
+ *
88
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
71
89
  */
72
90
  export async function runResident(options: ResidentLoopOptions): Promise<ResidentStepResult> {
73
91
  const maxIdleMs = options.maxIdleMs ?? 60_000
@@ -18,7 +18,11 @@ export const residentMessageInputSchema = z.object({
18
18
  notBefore: time,
19
19
  })
20
20
 
21
- /** @experimental Host-approved content and an opaque destination route, never credentials. */
21
+ /**
22
+ * @experimental Host-approved content and an opaque destination route, never credentials.
23
+ *
24
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
25
+ */
22
26
  export type ResidentMessageInput = Readonly<z.infer<typeof residentMessageInputSchema>>
23
27
 
24
28
  export const residentOutboxMessageSchema = residentMessageInputSchema
@@ -47,7 +51,11 @@ export const residentOutboxMessageSchema = residentMessageInputSchema
47
51
  context.addIssue({ code: z.ZodIssueCode.custom, message: 'Invalid outbox lifecycle.' })
48
52
  })
49
53
 
50
- /** @experimental Acknowledgment proves transport acceptance, not human reading. */
54
+ /**
55
+ * @experimental Acknowledgment proves transport acceptance, not human reading.
56
+ *
57
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
58
+ */
51
59
  export type ResidentOutboxMessage = Readonly<z.infer<typeof residentOutboxMessageSchema>>
52
60
 
53
61
  export const residentDeliveryOutcomeSchema = z.discriminatedUnion('kind', [
@@ -59,10 +67,18 @@ export const residentDeliveryOutcomeSchema = z.discriminatedUnion('kind', [
59
67
  }),
60
68
  ])
61
69
 
62
- /** @experimental Retry only with evidence of non-acceptance; null retryAt ends delivery. */
70
+ /**
71
+ * @experimental Retry only with evidence of non-acceptance; null retryAt ends delivery.
72
+ *
73
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
74
+ */
63
75
  export type ResidentDeliveryOutcome = Readonly<z.infer<typeof residentDeliveryOutcomeSchema>>
64
76
 
65
- /** @experimental Atomic admission and exact-claim settlement, without automatic claim expiry. */
77
+ /**
78
+ * @experimental Atomic admission and exact-claim settlement, without automatic claim expiry.
79
+ *
80
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
81
+ */
66
82
  export interface ResidentOutboxStore {
67
83
  read(): Promise<ResidentAgendaState | null>
68
84
  claimMessage(
@@ -77,7 +93,11 @@ export interface ResidentOutboxStore {
77
93
  ): Promise<ResidentOutboxMessage>
78
94
  }
79
95
 
80
- /** @experimental A synchronous host policy, evaluated before claiming and again before sending. */
96
+ /**
97
+ * @experimental A synchronous host policy, evaluated before claiming and again before sending.
98
+ *
99
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
100
+ */
81
101
  export type ResidentDeliveryGate = (
82
102
  message: ResidentOutboxMessage,
83
103
  now: number,
@@ -89,20 +109,32 @@ export type ResidentDeliveryGate = (
89
109
  readonly reason: string
90
110
  }
91
111
 
92
- /** @experimental Bind an authorized route; forward message.id as the stable idempotency key. */
112
+ /**
113
+ * @experimental Bind an authorized route; forward message.id as the stable idempotency key.
114
+ *
115
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
116
+ */
93
117
  export type ResidentMessageTransport = (
94
118
  message: ResidentOutboxMessage,
95
119
  signal: AbortSignal,
96
120
  ) => Promise<ResidentDeliveryOutcome>
97
121
 
98
- /** @experimental One dispatch admission, with no model invocation, polling or implicit retries. */
122
+ /**
123
+ * @experimental One dispatch admission, with no model invocation, polling or implicit retries.
124
+ *
125
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
126
+ */
99
127
  export interface ResidentDeliveryOptions {
100
128
  readonly signal: AbortSignal
101
129
  readonly gate: ResidentDeliveryGate
102
130
  readonly now?: () => number
103
131
  }
104
132
 
105
- /** @experimental An idle result never asserts a message reached its destination. */
133
+ /**
134
+ * @experimental An idle result never asserts a message reached its destination.
135
+ *
136
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
137
+ */
106
138
  export type ResidentDeliveryResult =
107
139
  | { readonly status: 'settled'; readonly message: ResidentOutboxMessage }
108
140
  | {
@@ -223,6 +255,8 @@ function admission(gate: ResidentDeliveryGate, message: ResidentOutboxMessage, n
223
255
  * @experimental Persist one send claim before calling a host-owned transport.
224
256
  * Throws, malformed outcomes and cancellation keep the claim unresolved. Stop
225
257
  * old executors and inspect effects before explicit settleMessage reconciliation.
258
+ *
259
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
226
260
  */
227
261
  export async function deliverResidentMessage(
228
262
  store: ResidentOutboxStore,
@@ -27,7 +27,11 @@ export const residentProposalLimitsSchema = z.object({
27
27
  maxDepth: z.number().int().min(1).max(4),
28
28
  })
29
29
 
30
- /** @experimental An inert subgoal proposal; creating it grants no execution authority. */
30
+ /**
31
+ * @experimental An inert subgoal proposal; creating it grants no execution authority.
32
+ *
33
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
34
+ */
31
35
  export interface ResidentProposal {
32
36
  readonly id: string
33
37
  readonly parentId: string
@@ -38,7 +42,11 @@ export interface ResidentProposal {
38
42
  readonly evidenceKey: string
39
43
  }
40
44
 
41
- /** @experimental Host-approved routing domains and finite subgoal admission bounds. */
45
+ /**
46
+ * @experimental Host-approved routing domains and finite subgoal admission bounds.
47
+ *
48
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
49
+ */
42
50
  export interface ResidentProposalLimits {
43
51
  readonly domains: readonly string[]
44
52
  readonly maxChildrenPerParent: number
@@ -56,13 +64,19 @@ export const residentProposalOriginSchema = z.object({
56
64
  depth: z.number().int().min(1).max(4),
57
65
  })
58
66
 
59
- /** @experimental Host-admitted ancestry and evidence for a resident subgoal. */
67
+ /**
68
+ * @experimental Host-admitted ancestry and evidence for a resident subgoal.
69
+ *
70
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
71
+ */
60
72
  export type ResidentProposalOrigin = Readonly<z.infer<typeof residentProposalOriginSchema>>
61
73
 
62
74
  /**
63
75
  * @experimental Pure validation against one agenda snapshot. The host must
64
76
  * atomically bind this snapshot to admission. Domains are routing metadata;
65
77
  * this does not prove an objective fits its domain or authorize any tools.
78
+ *
79
+ * @deprecated Residents are deprecated and removed in the next major release. Learning (`runLearningCycle` and the other `Learning*` names) keeps working, but `runLearningCycle` still takes a resident agenda until learning gets its own activation target in the next major release; for long-running work use scheduled tasks (`LocalTaskScheduler`), session goals and background agents.
66
80
  */
67
81
  export function validateResidentProposal(
68
82
  agenda: ResidentAgendaState,