@noopolis/daimon 0.2.0 → 0.2.2

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 (261) hide show
  1. package/README.md +6 -0
  2. package/dist/contracts/attentionContract.d.ts +25 -0
  3. package/dist/contracts/attentionContract.d.ts.map +1 -1
  4. package/dist/contracts/attentionContract.js +8 -1
  5. package/dist/contracts/grokBrokerTaskClock.d.ts +18 -0
  6. package/dist/contracts/grokBrokerTaskClock.d.ts.map +1 -0
  7. package/dist/contracts/grokBrokerTaskClock.js +16 -0
  8. package/dist/contracts/organizationRuntimeContract.d.ts +76 -0
  9. package/dist/contracts/organizationRuntimeContract.d.ts.map +1 -1
  10. package/dist/contracts/organizationRuntimeContract.js +2 -0
  11. package/dist/contracts/runtimeContractManifest.d.ts +222 -15
  12. package/dist/contracts/runtimeContractManifest.d.ts.map +1 -1
  13. package/dist/contracts/runtimeContractManifest.js +35 -10
  14. package/dist/contracts/shellEnvironmentPolicy.d.ts +3 -0
  15. package/dist/contracts/shellEnvironmentPolicy.d.ts.map +1 -0
  16. package/dist/contracts/shellEnvironmentPolicy.js +5 -0
  17. package/dist/contracts/wakeMomentContract.d.ts +61 -0
  18. package/dist/contracts/wakeMomentContract.d.ts.map +1 -0
  19. package/dist/contracts/wakeMomentContract.js +27 -0
  20. package/dist/core/types.d.ts +2 -0
  21. package/dist/core/types.d.ts.map +1 -1
  22. package/dist/examples/jungianPlayAgent.d.ts +1 -0
  23. package/dist/examples/jungianPlayAgent.d.ts.map +1 -1
  24. package/dist/examples/jungianPlayAgent.js +6 -2
  25. package/dist/observability/causalEvents.d.ts +3 -3
  26. package/dist/observability/causalEvents.d.ts.map +1 -1
  27. package/dist/observability/causalEvents.js +4 -4
  28. package/dist/pi/cliEngineSpawn.d.ts +2 -2
  29. package/dist/pi/cliEngineSpawn.d.ts.map +1 -1
  30. package/dist/pi/cliEngineSpawn.js +7 -2
  31. package/dist/pi/cliEnvironment.d.ts.map +1 -1
  32. package/dist/pi/cliEnvironment.js +2 -0
  33. package/dist/pi/cliMcpRegistration.d.ts +1 -1
  34. package/dist/pi/cliMcpRegistration.d.ts.map +1 -1
  35. package/dist/pi/cliMcpRegistration.js +1 -1
  36. package/dist/pi/cliSession.d.ts +2 -0
  37. package/dist/pi/cliSession.d.ts.map +1 -1
  38. package/dist/pi/cliSession.js +3 -80
  39. package/dist/pi/cliSessionMcp.d.ts +9 -0
  40. package/dist/pi/cliSessionMcp.d.ts.map +1 -0
  41. package/dist/pi/cliSessionMcp.js +80 -0
  42. package/dist/pi/engineTaskClock.d.ts +9 -0
  43. package/dist/pi/engineTaskClock.d.ts.map +1 -0
  44. package/dist/pi/engineTaskClock.js +28 -0
  45. package/dist/pi/grokHomeMcpRegistration.d.ts.map +1 -1
  46. package/dist/pi/grokHomeMcpRegistration.js +2 -1
  47. package/dist/pi/grokSandbox.js +1 -1
  48. package/dist/pi/memoryClock.d.ts +25 -0
  49. package/dist/pi/memoryClock.d.ts.map +1 -0
  50. package/dist/pi/memoryClock.js +18 -0
  51. package/dist/pi/piAgentHandle.d.ts +3 -1
  52. package/dist/pi/piAgentHandle.d.ts.map +1 -1
  53. package/dist/pi/piAgentHandle.js +5 -2
  54. package/dist/pi/piHarness.d.ts +8 -2
  55. package/dist/pi/piHarness.d.ts.map +1 -1
  56. package/dist/pi/piHarness.js +28 -12
  57. package/dist/pi/taskClockProcess.d.ts +6 -0
  58. package/dist/pi/taskClockProcess.d.ts.map +1 -0
  59. package/dist/pi/taskClockProcess.js +8 -0
  60. package/dist/pi/turnCausal.d.ts +4 -2
  61. package/dist/pi/turnCausal.d.ts.map +1 -1
  62. package/dist/pi/turnCausal.js +4 -4
  63. package/dist/pi/wakeAcceptance.d.ts +1 -1
  64. package/dist/pi/wakeAcceptance.d.ts.map +1 -1
  65. package/dist/pi/wakeAcceptance.js +2 -2
  66. package/dist/runtime/agentSkillsDirectory.d.ts +25 -0
  67. package/dist/runtime/agentSkillsDirectory.d.ts.map +1 -0
  68. package/dist/runtime/agentSkillsDirectory.js +101 -0
  69. package/dist/runtime/agySubscriptionBootstrap.js +1 -1
  70. package/dist/runtime/agySubscriptionRealm.js +1 -1
  71. package/dist/runtime/attention.d.ts +5 -0
  72. package/dist/runtime/attention.d.ts.map +1 -1
  73. package/dist/runtime/attention.js +14 -1
  74. package/dist/runtime/attentionDispatcher.d.ts +14 -2
  75. package/dist/runtime/attentionDispatcher.d.ts.map +1 -1
  76. package/dist/runtime/attentionDispatcher.js +127 -33
  77. package/dist/runtime/cli.js +5 -0
  78. package/dist/runtime/contract-manifest.json +1 -1
  79. package/dist/runtime/contract-manifest.sha256 +1 -1
  80. package/dist/runtime/engineBrokerCapabilities.d.ts +10 -0
  81. package/dist/runtime/engineBrokerCapabilities.d.ts.map +1 -1
  82. package/dist/runtime/engineBrokerCapabilities.js +10 -0
  83. package/dist/runtime/engineBrokerControlClient.d.ts +12 -1
  84. package/dist/runtime/engineBrokerControlClient.d.ts.map +1 -1
  85. package/dist/runtime/engineBrokerControlClient.js +139 -43
  86. package/dist/runtime/engineBrokerCredentialJournal.d.ts +2 -0
  87. package/dist/runtime/engineBrokerCredentialJournal.d.ts.map +1 -1
  88. package/dist/runtime/engineBrokerCredentialJournal.js +9 -0
  89. package/dist/runtime/engineBrokerInferenceProtocol.d.ts +3 -2
  90. package/dist/runtime/engineBrokerInferenceProtocol.d.ts.map +1 -1
  91. package/dist/runtime/engineBrokerInferenceProtocol.js +4 -4
  92. package/dist/runtime/engineBrokerMcpCallLog.d.ts +11 -0
  93. package/dist/runtime/engineBrokerMcpCallLog.d.ts.map +1 -1
  94. package/dist/runtime/engineBrokerMcpCallLog.js +13 -1
  95. package/dist/runtime/engineBrokerMcpFacade.d.ts +5 -2
  96. package/dist/runtime/engineBrokerMcpFacade.d.ts.map +1 -1
  97. package/dist/runtime/engineBrokerMcpFacade.js +5 -2
  98. package/dist/runtime/engineBrokerNativeClient.js +2 -2
  99. package/dist/runtime/engineBrokerProtocol.d.ts +42 -10
  100. package/dist/runtime/engineBrokerProtocol.d.ts.map +1 -1
  101. package/dist/runtime/engineBrokerProtocol.js +97 -14
  102. package/dist/runtime/engineBrokerSealLedger.d.ts.map +1 -1
  103. package/dist/runtime/engineBrokerSealLedger.js +9 -0
  104. package/dist/runtime/engineBrokerService.d.ts +8 -2
  105. package/dist/runtime/engineBrokerService.d.ts.map +1 -1
  106. package/dist/runtime/engineBrokerService.js +95 -37
  107. package/dist/runtime/engineBrokerServiceCli.js +1 -1
  108. package/dist/runtime/engineBrokerServiceConfig.d.ts +15 -2
  109. package/dist/runtime/engineBrokerServiceConfig.d.ts.map +1 -1
  110. package/dist/runtime/engineBrokerServiceConfig.js +53 -11
  111. package/dist/runtime/engineBrokerTurnRegistry.d.ts +1 -1
  112. package/dist/runtime/engineBrokerTurnRegistry.d.ts.map +1 -1
  113. package/dist/runtime/engineBrokerTurnRegistry.js +7 -6
  114. package/dist/runtime/engineDispatcher.d.ts +2 -0
  115. package/dist/runtime/engineDispatcher.d.ts.map +1 -1
  116. package/dist/runtime/engineDispatcher.js +14 -2
  117. package/dist/runtime/engineReadiness.js +1 -1
  118. package/dist/runtime/grokBrokerCredentialAuthority.d.ts +1 -0
  119. package/dist/runtime/grokBrokerCredentialAuthority.d.ts.map +1 -1
  120. package/dist/runtime/grokBrokerCredentialAuthority.js +48 -22
  121. package/dist/runtime/grokBrokerCredentialReader.d.ts +1 -0
  122. package/dist/runtime/grokBrokerCredentialReader.d.ts.map +1 -1
  123. package/dist/runtime/grokBrokerCredentialReader.js +2 -1
  124. package/dist/runtime/grokBrokerProjection.d.ts +26 -2
  125. package/dist/runtime/grokBrokerProjection.d.ts.map +1 -1
  126. package/dist/runtime/grokBrokerProjection.js +18 -7
  127. package/dist/runtime/grokBrokerProviderClock.d.ts +26 -0
  128. package/dist/runtime/grokBrokerProviderClock.d.ts.map +1 -0
  129. package/dist/runtime/grokBrokerProviderClock.js +133 -0
  130. package/dist/runtime/grokBrokerProxy.d.ts +17 -3
  131. package/dist/runtime/grokBrokerProxy.d.ts.map +1 -1
  132. package/dist/runtime/grokBrokerProxy.js +73 -9
  133. package/dist/runtime/grokBrokerProxyJson.d.ts +10 -0
  134. package/dist/runtime/grokBrokerProxyJson.d.ts.map +1 -0
  135. package/dist/runtime/grokBrokerProxyJson.js +31 -0
  136. package/dist/runtime/grokBrokerProxyRequest.d.ts.map +1 -1
  137. package/dist/runtime/grokBrokerProxyRequest.js +17 -6
  138. package/dist/runtime/grokBrokerRealmLease.js +1 -1
  139. package/dist/runtime/grokBrokerRefresh.js +1 -1
  140. package/dist/runtime/grokBrokerRunBudget.d.ts +20 -0
  141. package/dist/runtime/grokBrokerRunBudget.d.ts.map +1 -0
  142. package/dist/runtime/grokBrokerRunBudget.js +85 -0
  143. package/dist/runtime/grokBrokerSlot.d.ts +6 -0
  144. package/dist/runtime/grokBrokerSlot.d.ts.map +1 -0
  145. package/dist/runtime/grokBrokerSlot.js +21 -0
  146. package/dist/runtime/grokBrokerTaskClock.d.ts +32 -0
  147. package/dist/runtime/grokBrokerTaskClock.d.ts.map +1 -0
  148. package/dist/runtime/grokBrokerTaskClock.js +120 -0
  149. package/dist/runtime/grokBrokerTurnMeter.d.ts +55 -3
  150. package/dist/runtime/grokBrokerTurnMeter.d.ts.map +1 -1
  151. package/dist/runtime/grokBrokerTurnMeter.js +90 -4
  152. package/dist/runtime/grokBrokerWorkerConfig.d.ts +5 -2
  153. package/dist/runtime/grokBrokerWorkerConfig.d.ts.map +1 -1
  154. package/dist/runtime/grokBrokerWorkerConfig.js +22 -3
  155. package/dist/runtime/grokEngineBroker.d.ts +43 -3
  156. package/dist/runtime/grokEngineBroker.d.ts.map +1 -1
  157. package/dist/runtime/grokEngineBroker.js +159 -71
  158. package/dist/runtime/grokEngineBrokerTurn.d.ts +32 -8
  159. package/dist/runtime/grokEngineBrokerTurn.d.ts.map +1 -1
  160. package/dist/runtime/grokEngineBrokerTurn.js +204 -21
  161. package/dist/runtime/grokEngineBrokerTurnEnd.d.ts +88 -0
  162. package/dist/runtime/grokEngineBrokerTurnEnd.d.ts.map +1 -0
  163. package/dist/runtime/grokEngineBrokerTurnEnd.js +148 -0
  164. package/dist/runtime/grokInferenceProxy.d.ts.map +1 -1
  165. package/dist/runtime/grokInferenceProxy.js +3 -0
  166. package/dist/runtime/grokSubscriptionRealm.js +1 -1
  167. package/dist/runtime/grokWorkerAttestation.d.ts +12 -5
  168. package/dist/runtime/grokWorkerAttestation.d.ts.map +1 -1
  169. package/dist/runtime/grokWorkerAttestation.js +5 -3
  170. package/dist/runtime/grokWorkerHomeAttestation.d.ts +51 -5
  171. package/dist/runtime/grokWorkerHomeAttestation.d.ts.map +1 -1
  172. package/dist/runtime/grokWorkerHomeAttestation.js +103 -8
  173. package/dist/runtime/grokWorkerSkills.d.ts +86 -0
  174. package/dist/runtime/grokWorkerSkills.d.ts.map +1 -0
  175. package/dist/runtime/grokWorkerSkills.js +135 -0
  176. package/dist/runtime/index.d.ts +10 -2
  177. package/dist/runtime/index.d.ts.map +1 -1
  178. package/dist/runtime/index.js +8 -1
  179. package/dist/runtime/native/daimon-engine-broker +0 -0
  180. package/dist/runtime/organizationRuntime.d.ts +3 -0
  181. package/dist/runtime/organizationRuntime.d.ts.map +1 -1
  182. package/dist/runtime/organizationRuntimeAdmission.d.ts +6 -0
  183. package/dist/runtime/organizationRuntimeAdmission.d.ts.map +1 -0
  184. package/dist/runtime/organizationRuntimeAdmission.js +22 -0
  185. package/dist/runtime/organizationRuntimeControl.d.ts +9 -0
  186. package/dist/runtime/organizationRuntimeControl.d.ts.map +1 -1
  187. package/dist/runtime/organizationRuntimeControl.js +72 -24
  188. package/dist/runtime/organizationRuntimeHost.d.ts.map +1 -1
  189. package/dist/runtime/organizationRuntimeHost.js +13 -4
  190. package/dist/runtime/organizationRuntimeParsing.d.ts.map +1 -1
  191. package/dist/runtime/organizationRuntimeParsing.js +4 -1
  192. package/dist/runtime/organizationRuntimeReadiness.d.ts.map +1 -1
  193. package/dist/runtime/organizationRuntimeReadiness.js +8 -0
  194. package/dist/runtime/organizationRuntimeRecording.d.ts +7 -0
  195. package/dist/runtime/organizationRuntimeRecording.d.ts.map +1 -0
  196. package/dist/runtime/organizationRuntimeRecording.js +58 -0
  197. package/dist/runtime/physicalReadiness.d.ts +12 -0
  198. package/dist/runtime/physicalReadiness.d.ts.map +1 -1
  199. package/dist/runtime/physicalReadiness.js +43 -9
  200. package/dist/runtime/productionAgentTools.d.ts.map +1 -1
  201. package/dist/runtime/productionAgentTools.js +13 -5
  202. package/dist/runtime/relocateRuntimeConfig.d.ts +14 -0
  203. package/dist/runtime/relocateRuntimeConfig.d.ts.map +1 -0
  204. package/dist/runtime/relocateRuntimeConfig.js +38 -0
  205. package/dist/runtime/schedule.d.ts.map +1 -1
  206. package/dist/runtime/schedule.js +12 -7
  207. package/dist/runtime/storeCoordination.d.ts +10 -0
  208. package/dist/runtime/storeCoordination.d.ts.map +1 -1
  209. package/dist/runtime/storeCoordination.js +23 -0
  210. package/dist/runtime/taskClock.d.ts +42 -0
  211. package/dist/runtime/taskClock.d.ts.map +1 -0
  212. package/dist/runtime/taskClock.js +102 -0
  213. package/dist/runtime/taskClockProcess.d.ts +17 -0
  214. package/dist/runtime/taskClockProcess.d.ts.map +1 -0
  215. package/dist/runtime/taskClockProcess.js +58 -0
  216. package/dist/runtime/turnRequestLedger.d.ts +0 -5
  217. package/dist/runtime/turnRequestLedger.d.ts.map +1 -1
  218. package/dist/runtime/turnRequestLedger.js +23 -21
  219. package/dist/runtime/wakeAcceptanceClaimDiagnostics.d.ts +34 -0
  220. package/dist/runtime/wakeAcceptanceClaimDiagnostics.d.ts.map +1 -0
  221. package/dist/runtime/wakeAcceptanceClaimDiagnostics.js +79 -0
  222. package/dist/runtime/wakeAcceptanceIndex.d.ts +55 -0
  223. package/dist/runtime/wakeAcceptanceIndex.d.ts.map +1 -0
  224. package/dist/runtime/wakeAcceptanceIndex.js +158 -0
  225. package/dist/runtime/wakeAcceptanceProcessIdentity.d.ts +9 -1
  226. package/dist/runtime/wakeAcceptanceProcessIdentity.d.ts.map +1 -1
  227. package/dist/runtime/wakeAcceptanceProcessIdentity.js +5 -1
  228. package/dist/runtime/wakeAcceptanceRecord.d.ts +2 -0
  229. package/dist/runtime/wakeAcceptanceRecord.d.ts.map +1 -1
  230. package/dist/runtime/wakeAcceptanceRecord.js +4 -2
  231. package/dist/runtime/wakeAcceptanceRetention.d.ts +25 -1
  232. package/dist/runtime/wakeAcceptanceRetention.d.ts.map +1 -1
  233. package/dist/runtime/wakeAcceptanceRetention.js +28 -2
  234. package/dist/runtime/wakeAcceptanceStore.d.ts +8 -8
  235. package/dist/runtime/wakeAcceptanceStore.d.ts.map +1 -1
  236. package/dist/runtime/wakeAcceptanceStore.js +66 -63
  237. package/dist/runtime/wakeFuse.d.ts +58 -3
  238. package/dist/runtime/wakeFuse.d.ts.map +1 -1
  239. package/dist/runtime/wakeFuse.js +106 -7
  240. package/dist/runtime/wakeMomentFs.d.ts +27 -0
  241. package/dist/runtime/wakeMomentFs.d.ts.map +1 -0
  242. package/dist/runtime/wakeMomentFs.js +223 -0
  243. package/dist/runtime/wakeMomentHistory.d.ts +26 -0
  244. package/dist/runtime/wakeMomentHistory.d.ts.map +1 -0
  245. package/dist/runtime/wakeMomentHistory.js +109 -0
  246. package/dist/runtime/wakeMomentIo.d.ts +22 -0
  247. package/dist/runtime/wakeMomentIo.d.ts.map +1 -0
  248. package/dist/runtime/wakeMomentIo.js +114 -0
  249. package/dist/runtime/wakeMomentRecorder.d.ts +33 -0
  250. package/dist/runtime/wakeMomentRecorder.d.ts.map +1 -0
  251. package/dist/runtime/wakeMomentRecorder.js +81 -0
  252. package/dist/runtime/wakeMomentRetention.d.ts +7 -0
  253. package/dist/runtime/wakeMomentRetention.d.ts.map +1 -0
  254. package/dist/runtime/wakeMomentRetention.js +143 -0
  255. package/dist/runtime/wakeMomentRows.d.ts +8 -0
  256. package/dist/runtime/wakeMomentRows.d.ts.map +1 -0
  257. package/dist/runtime/wakeMomentRows.js +66 -0
  258. package/dist/runtime/wakeMomentSnapshot.d.ts +56 -0
  259. package/dist/runtime/wakeMomentSnapshot.d.ts.map +1 -0
  260. package/dist/runtime/wakeMomentSnapshot.js +248 -0
  261. package/package.json +4 -4
@@ -0,0 +1,34 @@
1
+ import type { WakeExecutionClaim } from "./wakeAcceptanceStore.js";
2
+ import { type TransitionLock } from "./wakeAcceptanceProcessIdentity.js";
3
+ type Identity = WakeExecutionClaim | TransitionLock | string | null;
4
+ export type WakeClaimFailure = Readonly<{
5
+ step: string;
6
+ assertion: string;
7
+ acceptance_id: string;
8
+ expected: Identity;
9
+ current: Identity;
10
+ lock?: TransitionLock | null;
11
+ }>;
12
+ export declare class WakeExecutionClaimLostError extends Error {
13
+ readonly detail?: WakeClaimFailure | undefined;
14
+ constructor(detail?: WakeClaimFailure | undefined, cause?: unknown);
15
+ }
16
+ export declare class WakeTransitionLockContentionError extends WakeExecutionClaimLostError {
17
+ constructor(detail: WakeClaimFailure);
18
+ }
19
+ type LockWaitTiming = Readonly<{
20
+ now: () => number;
21
+ sleep: (ms: number) => Promise<void>;
22
+ }>;
23
+ /**
24
+ * Only an occupied lock is retried; claim mismatches and I/O failures are not.
25
+ * The 250 ms budget bounds attempt starts and requested sleeps. Filesystem I/O
26
+ * is not cancellable, so an admitted acquisition can finish after the deadline.
27
+ * Keep that lock: callers revalidate the claim before writing and release the
28
+ * lock in finally, so late acquisition cannot authorize a stale claim.
29
+ */
30
+ export declare function waitForClaimTransitionLock(acquire: () => Promise<TransitionLock | undefined>, read: () => Promise<TransitionLock | undefined>, acceptanceId: string, claim: WakeExecutionClaim, step: string, timing?: LockWaitTiming): Promise<TransitionLock>;
31
+ /** Read errors retain their errno as cause; no record/event/credential data enters diagnostics. */
32
+ export declare function readExpectedClaim(read: () => Promise<WakeExecutionClaim>, acceptanceId: string, expected: WakeExecutionClaim, step: string, now: () => number, lock?: TransitionLock): Promise<WakeExecutionClaim>;
33
+ export {};
34
+ //# sourceMappingURL=wakeAcceptanceClaimDiagnostics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wakeAcceptanceClaimDiagnostics.d.ts","sourceRoot":"","sources":["../../src/runtime/wakeAcceptanceClaimDiagnostics.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAkC,KAAK,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEzG,KAAK,QAAQ,GAAG,kBAAkB,GAAG,cAAc,GAAG,MAAM,GAAG,IAAI,CAAC;AACpE,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,QAAQ,CAAC;IAAC,IAAI,CAAC,EAAE,cAAc,GAAG,IAAI,CAAA;CAAE,CAAC,CAAC;AACzK,qBAAa,2BAA4B,SAAQ,KAAK;IACxC,QAAQ,CAAC,MAAM,CAAC,EAAE,gBAAgB;gBAAzB,MAAM,CAAC,EAAE,gBAAgB,YAAA,EAAE,KAAK,CAAC,EAAE,OAAO;CAIhE;AACD,qBAAa,iCAAkC,SAAQ,2BAA2B;gBACpE,MAAM,EAAE,gBAAgB;CACrC;AAED,KAAK,cAAc,GAAG,QAAQ,CAAC;IAAE,GAAG,EAAE,MAAM,MAAM,CAAC;IAAC,KAAK,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,CAAC,CAAC;AAE5F;;;;;;GAMG;AACH,wBAAsB,0BAA0B,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,kBAAkB,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAE,cAA+B,GAAG,OAAO,CAAC,cAAc,CAAC,CAiBrR;AAUD,mGAAmG;AACnG,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,OAAO,CAAC,kBAAkB,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,kBAAkB,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAcxN"}
@@ -0,0 +1,79 @@
1
+ import { setTimeout as delay } from "node:timers/promises";
2
+ import { performance } from "node:perf_hooks";
3
+ import { WakeTransitionLockBlockedError } from "./wakeAcceptanceProcessIdentity.js";
4
+ export class WakeExecutionClaimLostError extends Error {
5
+ detail;
6
+ constructor(detail, cause) {
7
+ super(`wake execution claim was lost${detail === undefined ? "" : `: step=${detail.step} assertion=${detail.assertion} ${JSON.stringify({ ...detail, expected: diagnosticIdentity(detail.expected), current: diagnosticIdentity(detail.current) })}`}`, { cause });
8
+ this.detail = detail;
9
+ this.name = "WakeExecutionClaimLostError";
10
+ }
11
+ }
12
+ export class WakeTransitionLockContentionError extends WakeExecutionClaimLostError {
13
+ constructor(detail) { super(detail); this.name = "WakeTransitionLockContentionError"; }
14
+ }
15
+ const lockWaitTiming = { now: () => performance.now(), sleep: async (ms) => { await delay(ms); } };
16
+ /**
17
+ * Only an occupied lock is retried; claim mismatches and I/O failures are not.
18
+ * The 250 ms budget bounds attempt starts and requested sleeps. Filesystem I/O
19
+ * is not cancellable, so an admitted acquisition can finish after the deadline.
20
+ * Keep that lock: callers revalidate the claim before writing and release the
21
+ * lock in finally, so late acquisition cannot authorize a stale claim.
22
+ */
23
+ export async function waitForClaimTransitionLock(acquire, read, acceptanceId, claim, step, timing = lockWaitTiming) {
24
+ const deadline = timing.now() + 250;
25
+ for (let attempt = 0;; attempt++) {
26
+ if (attempt >= 26 || timing.now() >= deadline) {
27
+ let current;
28
+ try {
29
+ current = await read();
30
+ }
31
+ catch (cause) {
32
+ throw new WakeExecutionClaimLostError({ step, assertion: "transition_lock_read", acceptance_id: acceptanceId, expected: claim, current: null }, cause);
33
+ }
34
+ throw new WakeTransitionLockContentionError({ step, assertion: "transition_lock_contended", acceptance_id: acceptanceId, expected: claim, current: current ?? null, lock: current ?? null });
35
+ }
36
+ let lock;
37
+ try {
38
+ lock = await acquire();
39
+ }
40
+ catch (cause) {
41
+ if (cause instanceof WakeTransitionLockBlockedError)
42
+ throw cause;
43
+ throw new WakeExecutionClaimLostError({ step, assertion: "transition_lock_acquire", acceptance_id: acceptanceId, expected: claim, current: null }, cause);
44
+ }
45
+ if (lock !== undefined)
46
+ return lock;
47
+ const remaining = deadline - timing.now();
48
+ if (remaining > 0 && attempt < 25)
49
+ await timing.sleep(Math.min(10, remaining));
50
+ }
51
+ }
52
+ function diagnosticIdentity(value) {
53
+ if (value === null || typeof value === "string" || "pid" in value)
54
+ return value;
55
+ // Membership can contain 32 UUIDs. Keep both identities and the lock visible
56
+ // through the host's 2 KiB diagnostic bound; the typed detail keeps membership.
57
+ const { acceptance_ids: _members, ...identity } = value;
58
+ return identity;
59
+ }
60
+ /** Read errors retain their errno as cause; no record/event/credential data enters diagnostics. */
61
+ export async function readExpectedClaim(read, acceptanceId, expected, step, now, lock) {
62
+ let current;
63
+ try {
64
+ current = await read();
65
+ }
66
+ catch (cause) {
67
+ const assertion = cause?.code === "ENOENT" ? "claim_missing" : "claim_read";
68
+ throw new WakeExecutionClaimLostError({ step, assertion, acceptance_id: acceptanceId, expected, current: null, ...(lock === undefined ? {} : { lock }) }, cause);
69
+ }
70
+ const assertion = !(current.acceptance_id === acceptanceId || current.acceptance_ids?.includes(acceptanceId)) ? "claim_membership"
71
+ : current.acceptance_id !== expected.acceptance_id ? "claim_acceptance_id"
72
+ : current.owner_id !== expected.owner_id ? "claim_owner_id"
73
+ : current.generation !== expected.generation ? "claim_generation"
74
+ : current.expires_at !== expected.expires_at ? "claim_expires_at"
75
+ : Date.parse(current.expires_at) <= now() ? "claim_expired" : undefined;
76
+ if (assertion !== undefined)
77
+ throw new WakeExecutionClaimLostError({ step, assertion, acceptance_id: acceptanceId, expected, current, ...(lock === undefined ? {} : { lock }) });
78
+ return current;
79
+ }
@@ -0,0 +1,55 @@
1
+ export type WakeAcceptanceStat = Readonly<{
2
+ ino: bigint;
3
+ size: bigint;
4
+ mtimeNs: bigint;
5
+ ctimeNs: bigint;
6
+ }>;
7
+ export type WakeAcceptanceIndexSource = Readonly<{
8
+ /** Opened-handle stat of the store directory. */
9
+ directoryStat: () => Promise<WakeAcceptanceStat>;
10
+ /** Record file names, after the store's own root validation and bounds. */
11
+ files: () => Promise<readonly string[]>;
12
+ /** Acceptance id of one record, read through every safety check of the store. */
13
+ readId: (file: string) => Promise<string>;
14
+ /** Identity stamp of one record file; undefined when it is gone. */
15
+ fileStat: (file: string) => Promise<WakeAcceptanceStat | undefined>;
16
+ }>;
17
+ /**
18
+ * Acceptance-id → record-file index. Own writes keep it current; a directory
19
+ * whose stamp moved since the last sync (another process, or this one) is
20
+ * re-listed, and only record files whose own stamp moved are read again. A miss
21
+ * against an unchanged directory reads no record file.
22
+ */
23
+ export declare class WakeAcceptanceIndex {
24
+ private readonly root;
25
+ private readonly source;
26
+ private readonly nowNs;
27
+ private readonly byId;
28
+ private readonly byFile;
29
+ private synced;
30
+ /** Bumped by every binding change made outside a sync; a sync that saw one never vouches for the directory. */
31
+ private mutations;
32
+ private refreshing;
33
+ constructor(root: string, source: WakeAcceptanceIndexSource, nowNs?: () => bigint);
34
+ /**
35
+ * The record bound to this id, verified to still carry it. Unknown and
36
+ * compacted ids are polled, so a miss against an unchanged directory reads
37
+ * no record file.
38
+ */
39
+ find<T extends Readonly<{
40
+ acceptance_id: string;
41
+ }>>(acceptanceId: string, read: (file: string) => Promise<T | undefined>): Promise<T | undefined>;
42
+ /** Binds a record this process wrote; its file stamp is learned on the next sync. */
43
+ set(acceptanceId: string, file: string): void;
44
+ /** Drops a record file this process deleted. */
45
+ forget(file: string): void;
46
+ /** Brings the index level with the directory; a no-op while the directory is unchanged. Single-flight. */
47
+ refresh(): Promise<void>;
48
+ private refreshNow;
49
+ private scan;
50
+ /** A binding found stale: drop only what still says so, never a newer binding of the same file. */
51
+ private unbind;
52
+ private drop;
53
+ private bind;
54
+ }
55
+ //# sourceMappingURL=wakeAcceptanceIndex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wakeAcceptanceIndex.d.ts","sourceRoot":"","sources":["../../src/runtime/wakeAcceptanceIndex.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE3G,MAAM,MAAM,yBAAyB,GAAG,QAAQ,CAAC;IAC/C,iDAAiD;IACjD,aAAa,EAAE,MAAM,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACjD,2EAA2E;IAC3E,KAAK,EAAE,MAAM,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAAC;IACxC,iFAAiF;IACjF,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1C,oEAAoE;IACpE,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC,CAAC;CACrE,CAAC,CAAC;AAEH;;;;;GAKG;AACH,qBAAa,mBAAmB;IAOlB,OAAO,CAAC,QAAQ,CAAC,IAAI;IAAU,OAAO,CAAC,QAAQ,CAAC,MAAM;IAA6B,OAAO,CAAC,QAAQ,CAAC,KAAK;IANrH,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA6B;IAClD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA4B;IACnD,OAAO,CAAC,MAAM,CAAqB;IACnC,+GAA+G;IAC/G,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,UAAU,CAA4B;gBACjB,IAAI,EAAE,MAAM,EAAmB,MAAM,EAAE,yBAAyB,EAAmB,KAAK,GAAE,MAAM,MAA8C;IAC3K;;;;OAIG;IACG,IAAI,CAAC,CAAC,SAAS,QAAQ,CAAC;QAAE,aAAa,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IAYvJ,qFAAqF;IACrF,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAK7C,gDAAgD;IAChD,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAC1B,0GAA0G;IACpG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;YAMhB,UAAU;YAiBV,IAAI;IAiBlB,mGAAmG;IACnG,OAAO,CAAC,MAAM;IAMd,OAAO,CAAC,IAAI;IAMZ,OAAO,CAAC,IAAI;CAMb"}
@@ -0,0 +1,158 @@
1
+ import path from "node:path";
2
+ import { MAX_WAKE_ACCEPTANCE_RECORDS } from "./wakeAcceptanceRetention.js";
3
+ /**
4
+ * A stamp younger than this may share a coarse filesystem timestamp tick with
5
+ * a write that lands after it was taken, so it is never trusted to prove that
6
+ * nothing changed (the racy-timestamp rule).
7
+ */
8
+ const RACY_WINDOW_NS = 2000000000n;
9
+ /**
10
+ * Own writes bind without a sync, so another process compacting behind a host
11
+ * that only ever hits could leave bindings for files that are gone. Past this
12
+ * many the index is dropped and the next miss rebuilds it from the directory.
13
+ */
14
+ const MAX_INDEX_ENTRIES = MAX_WAKE_ACCEPTANCE_RECORDS * 2;
15
+ /**
16
+ * Acceptance-id → record-file index. Own writes keep it current; a directory
17
+ * whose stamp moved since the last sync (another process, or this one) is
18
+ * re-listed, and only record files whose own stamp moved are read again. A miss
19
+ * against an unchanged directory reads no record file.
20
+ */
21
+ export class WakeAcceptanceIndex {
22
+ root;
23
+ source;
24
+ nowNs;
25
+ byId = new Map();
26
+ byFile = new Map();
27
+ synced;
28
+ /** Bumped by every binding change made outside a sync; a sync that saw one never vouches for the directory. */
29
+ mutations = 0;
30
+ refreshing;
31
+ constructor(root, source, nowNs = () => BigInt(Date.now()) * 1000000n) {
32
+ this.root = root;
33
+ this.source = source;
34
+ this.nowNs = nowNs;
35
+ }
36
+ /**
37
+ * The record bound to this id, verified to still carry it. Unknown and
38
+ * compacted ids are polled, so a miss against an unchanged directory reads
39
+ * no record file.
40
+ */
41
+ async find(acceptanceId, read) {
42
+ for (let attempt = 0; attempt < 2; attempt += 1) {
43
+ const known = this.byId.get(acceptanceId);
44
+ if (known !== undefined) {
45
+ const record = await read(known);
46
+ if (record?.acceptance_id === acceptanceId)
47
+ return record;
48
+ this.unbind(acceptanceId, known);
49
+ }
50
+ if (attempt === 0)
51
+ await this.refresh();
52
+ }
53
+ return undefined;
54
+ }
55
+ /** Binds a record this process wrote; its file stamp is learned on the next sync. */
56
+ set(acceptanceId, file) {
57
+ this.mutations += 1;
58
+ if (this.byFile.size >= MAX_INDEX_ENTRIES) {
59
+ this.byFile.clear();
60
+ this.byId.clear();
61
+ this.synced = undefined;
62
+ }
63
+ this.bind(file, acceptanceId, undefined);
64
+ }
65
+ /** Drops a record file this process deleted. */
66
+ forget(file) { this.mutations += 1; this.drop(file); }
67
+ /** Brings the index level with the directory; a no-op while the directory is unchanged. Single-flight. */
68
+ async refresh() {
69
+ while (this.refreshing !== undefined)
70
+ await this.refreshing.catch(() => undefined);
71
+ const run = this.refreshNow();
72
+ this.refreshing = run;
73
+ try {
74
+ await run;
75
+ }
76
+ finally {
77
+ if (this.refreshing === run)
78
+ this.refreshing = undefined;
79
+ }
80
+ }
81
+ async refreshNow() {
82
+ const startedAt = this.nowNs();
83
+ const directory = await this.source.directoryStat();
84
+ const directoryStamp = stampOf(directory);
85
+ if (this.synced === directoryStamp)
86
+ return;
87
+ const mutations = this.mutations;
88
+ const listed = (await this.source.files()).map((name) => path.join(this.root, name));
89
+ // Prune what the directory no longer lists even when a record below fails to
90
+ // read, so the maps stay bounded by the store's own record bound.
91
+ const present = new Set(listed);
92
+ try {
93
+ await this.scan(listed, present);
94
+ }
95
+ finally {
96
+ for (const file of [...this.byFile.keys()])
97
+ if (!present.has(file))
98
+ this.drop(file);
99
+ }
100
+ // Vouch for the directory only if nothing rebound while listing and its stamp
101
+ // was already settled when it was taken (the racy-timestamp rule).
102
+ this.synced = this.mutations === mutations && !racy(directory, startedAt) ? directoryStamp : undefined;
103
+ }
104
+ async scan(listed, present) {
105
+ for (const file of listed) {
106
+ const seenAt = this.nowNs();
107
+ const stat = await this.source.fileStat(file);
108
+ if (stat === undefined) {
109
+ present.delete(file);
110
+ continue;
111
+ }
112
+ const stamp = racy(stat, seenAt) ? undefined : stampOf(stat);
113
+ const known = this.byFile.get(file);
114
+ if (known !== undefined && known.stamp !== undefined && known.stamp === stamp)
115
+ continue;
116
+ let id;
117
+ try {
118
+ id = await this.source.readId(file);
119
+ }
120
+ catch (error) {
121
+ if (error.code !== "ENOENT")
122
+ throw error;
123
+ present.delete(file);
124
+ continue;
125
+ }
126
+ this.bind(file, id, stamp);
127
+ }
128
+ }
129
+ /** A binding found stale: drop only what still says so, never a newer binding of the same file. */
130
+ unbind(acceptanceId, file) {
131
+ this.mutations += 1;
132
+ if (this.byId.get(acceptanceId) === file)
133
+ this.byId.delete(acceptanceId);
134
+ if (this.byFile.get(file)?.id === acceptanceId)
135
+ this.byFile.delete(file);
136
+ this.synced = undefined;
137
+ }
138
+ drop(file) {
139
+ const entry = this.byFile.get(file);
140
+ if (entry !== undefined && this.byId.get(entry.id) === file)
141
+ this.byId.delete(entry.id);
142
+ this.byFile.delete(file);
143
+ this.synced = undefined;
144
+ }
145
+ bind(file, acceptanceId, stamp) {
146
+ const prior = this.byFile.get(file);
147
+ if (prior !== undefined && prior.id !== acceptanceId && this.byId.get(prior.id) === file)
148
+ this.byId.delete(prior.id);
149
+ this.byFile.set(file, { id: acceptanceId, ...(stamp === undefined ? {} : { stamp }) });
150
+ this.byId.set(acceptanceId, file);
151
+ }
152
+ }
153
+ /** A stamp taken within the window of its own last change may share a tick with a later write. */
154
+ function racy(stat, observedAt) {
155
+ const changed = stat.mtimeNs > stat.ctimeNs ? stat.mtimeNs : stat.ctimeNs;
156
+ return observedAt - changed < RACY_WINDOW_NS;
157
+ }
158
+ function stampOf(stat) { return `${stat.ino}:${stat.size}:${stat.mtimeNs}:${stat.ctimeNs}`; }
@@ -7,11 +7,19 @@ export type TransitionLock = Readonly<{
7
7
  pid_namespace_dev: number;
8
8
  pid_namespace_ino: number;
9
9
  }>;
10
+ type BlockedLockDetail = Readonly<{
11
+ step: string;
12
+ acceptance_id: string;
13
+ expected: Omit<TransitionLock, "owner_id" | "generation">;
14
+ current: TransitionLock;
15
+ }>;
10
16
  export declare class WakeTransitionLockBlockedError extends Error {
17
+ readonly detail?: BlockedLockDetail | undefined;
11
18
  readonly code: "offline_reconciliation_required";
12
- constructor();
19
+ constructor(detail?: BlockedLockDetail | undefined);
13
20
  }
14
21
  export declare function sameNamespace(left: Pick<TransitionLock, "pid_namespace_dev" | "pid_namespace_ino">, right: Pick<TransitionLock, "pid_namespace_dev" | "pid_namespace_ino">): boolean;
15
22
  export declare function currentProcessIdentity(): Promise<Omit<TransitionLock, "owner_id" | "generation">>;
16
23
  export declare function processIsAlive(lock: TransitionLock): Promise<boolean>;
24
+ export {};
17
25
  //# sourceMappingURL=wakeAcceptanceProcessIdentity.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wakeAcceptanceProcessIdentity.d.ts","sourceRoot":"","sources":["../../src/runtime/wakeAcceptanceProcessIdentity.ts"],"names":[],"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,QAAQ,EAAE,IAAI,CAAC,cAAc,EAAE,UAAU,GAAG,YAAY,CAAC,CAAC;IAAC,OAAO,EAAE,cAAc,CAAA;CAAE,CAAC,CAAC;AAC/J,qBAAa,8BAA+B,SAAQ,KAAK;IAE3C,QAAQ,CAAC,MAAM,CAAC,EAAE,iBAAiB;IAD/C,QAAQ,CAAC,IAAI,EAAG,iCAAiC,CAAU;gBACtC,MAAM,CAAC,EAAE,iBAAiB,YAAA;CAChD;AACD,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,cAAc,EAAE,mBAAmB,GAAG,mBAAmB,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,mBAAmB,GAAG,mBAAmB,CAAC,GAAG,OAAO,CAAqH;AAC1S,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,UAAU,GAAG,YAAY,CAAC,CAAC,CAKvG;AACD,wBAAsB,cAAc,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CAO3E"}
@@ -1,7 +1,11 @@
1
1
  import { readFile, stat } from "node:fs/promises";
2
2
  export class WakeTransitionLockBlockedError extends Error {
3
+ detail;
3
4
  code = "offline_reconciliation_required";
4
- constructor() { super("wake transition lock requires offline reconciliation"); }
5
+ constructor(detail) {
6
+ super(`wake transition lock requires offline reconciliation${detail === undefined ? "" : `: step=${detail.step} assertion=transition_lock_namespace ${JSON.stringify(detail)}`}`);
7
+ this.detail = detail;
8
+ }
5
9
  }
6
10
  export function sameNamespace(left, right) { return left.pid_namespace_dev === right.pid_namespace_dev && left.pid_namespace_ino === right.pid_namespace_ino; }
7
11
  export async function currentProcessIdentity() {
@@ -6,6 +6,8 @@ export type StoredWakeAcceptanceRecord = Readonly<{
6
6
  request_digest: string;
7
7
  event: OrganizationRuntimeWakeAcceptanceRequest["event"];
8
8
  state: WakeReceiptState;
9
+ /** Set only through native scheduler acceptance; absent means a real delivery instant. */
10
+ native_schedule?: true;
9
11
  accepted_at: string;
10
12
  updated_at: string;
11
13
  claim_generation?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"wakeAcceptanceRecord.d.ts","sourceRoot":"","sources":["../../src/runtime/wakeAcceptanceRecord.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,iCAAiC,EACtC,KAAK,wCAAwC,EAC7C,KAAK,oCAAoC,EACzC,KAAK,eAAe,EACpB,KAAK,gBAAgB,EAEtB,MAAM,0BAA0B,CAAC;AAElC,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAAC;IAChD,aAAa,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAC;IACrF,KAAK,EAAE,wCAAwC,CAAC,OAAO,CAAC,CAAC;IAAC,KAAK,EAAE,gBAAgB,CAAC;IAClF,WAAW,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,eAAe,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CAChL,CAAC,CAAC;AAEH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,0BAA0B,GAAG,iCAAiC,CAEtG;AACD,wBAAgB,YAAY,CAAC,MAAM,EAAE,0BAA0B,GAAG,oCAAoC,CAErG;AACD,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,0BAA0B,CA0BpF;AAMD,oFAAoF;AACpF,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE5D"}
1
+ {"version":3,"file":"wakeAcceptanceRecord.d.ts","sourceRoot":"","sources":["../../src/runtime/wakeAcceptanceRecord.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,iCAAiC,EACtC,KAAK,wCAAwC,EAC7C,KAAK,oCAAoC,EACzC,KAAK,eAAe,EACpB,KAAK,gBAAgB,EAEtB,MAAM,0BAA0B,CAAC;AAElC,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAAC;IAChD,aAAa,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAC;IACrF,KAAK,EAAE,wCAAwC,CAAC,OAAO,CAAC,CAAC;IAAC,KAAK,EAAE,gBAAgB,CAAC;IAClF,0FAA0F;IAC1F,eAAe,CAAC,EAAE,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,eAAe,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CAChL,CAAC,CAAC;AAEH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,0BAA0B,GAAG,iCAAiC,CAEtG;AACD,wBAAgB,YAAY,CAAC,MAAM,EAAE,0BAA0B,GAAG,oCAAoC,CAErG;AACD,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,0BAA0B,CA2BpF;AAMD,oFAAoF;AACpF,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE5D"}
@@ -10,10 +10,12 @@ export function parseStoredWakeAcceptance(value) {
10
10
  if (value === null || typeof value !== "object" || Array.isArray(value))
11
11
  throw new Error("wake acceptance record is invalid");
12
12
  const record = value;
13
- const keys = ["acceptance_id", "agent_id", "delivery_id", "request_digest", "event", "state", "accepted_at", "updated_at", "claim_generation", "execution_id", "deferred", "execution_error", "code", "text"];
13
+ const keys = ["acceptance_id", "agent_id", "delivery_id", "request_digest", "event", "state", "accepted_at", "updated_at", "claim_generation", "execution_id", "deferred", "execution_error", "code", "text", "native_schedule"];
14
14
  if (Object.keys(record).some((key) => !keys.includes(key)))
15
15
  throw new Error("wake acceptance record is invalid");
16
16
  const parsed = parseWakeAcceptanceRequest({ token: undefined, agent_id: string(record.agent_id), delivery_id: string(record.delivery_id), event: record.event });
17
+ if (record.native_schedule !== undefined && (record.native_schedule !== true || parsed.event.kind !== "schedule"))
18
+ throw new Error("wake acceptance schedule provenance is invalid");
17
19
  const state = string(record.state);
18
20
  if (!["accepted", "running", "completed", "failed", "stopped"].includes(state))
19
21
  throw new Error("wake acceptance record is invalid");
@@ -42,7 +44,7 @@ export function parseStoredWakeAcceptance(value) {
42
44
  throw new Error("wake acceptance record is invalid");
43
45
  if (string(record.request_digest) !== wakeAcceptanceDigest(parsed) || !uuid(string(record.acceptance_id)))
44
46
  throw new Error("wake acceptance record is invalid");
45
- return { acceptance_id: string(record.acceptance_id), agent_id: parsed.agent_id, delivery_id: parsed.delivery_id, request_digest: string(record.request_digest), event: parsed.event, state, accepted_at: timestamp(record.accepted_at), updated_at: timestamp(record.updated_at), ...(claimGeneration === undefined ? {} : { claim_generation: claimGeneration }), ...(executionId === undefined ? {} : { execution_id: executionId }), ...(record.deferred === undefined ? {} : { deferred: record.deferred }), ...(code === undefined ? {} : { code }), ...(completionText === undefined ? {} : { text: completionText }), ...(executionError === undefined ? {} : { execution_error: executionError }) };
47
+ return { acceptance_id: string(record.acceptance_id), agent_id: parsed.agent_id, delivery_id: parsed.delivery_id, request_digest: string(record.request_digest), event: parsed.event, state, accepted_at: timestamp(record.accepted_at), updated_at: timestamp(record.updated_at), ...(record.native_schedule === true ? { native_schedule: true } : {}), ...(claimGeneration === undefined ? {} : { claim_generation: claimGeneration }), ...(executionId === undefined ? {} : { execution_id: executionId }), ...(record.deferred === undefined ? {} : { deferred: record.deferred }), ...(code === undefined ? {} : { code }), ...(completionText === undefined ? {} : { text: completionText }), ...(executionError === undefined ? {} : { execution_error: executionError }) };
46
48
  }
47
49
  function string(value) { if (typeof value !== "string")
48
50
  throw new Error("wake acceptance record is invalid"); return value; }
@@ -1,12 +1,36 @@
1
1
  export declare const TERMINAL_RECEIPT_IDEMPOTENCY_HORIZON = 2048;
2
2
  export declare const WAKE_ACCEPTANCE_COMPACTION_THRESHOLD = 2112;
3
3
  export declare const MAX_WAKE_ACCEPTANCE_RECORDS = 2176;
4
+ /**
5
+ * How long a delivery may sit in `accepted` before the store stops it.
6
+ *
7
+ * Inbox agents return every delivery they did not dispose of to `accepted`
8
+ * (deferred), and a failed execution keeps its batch for retry. Nothing ever
9
+ * ended either, so by 2026-10-05 213 deliveries up to two weeks old sat in the
10
+ * queue, were re-offered on every wake, and kept the store at its bound. A
11
+ * day is longer than any delivery stays actionable in a daily organization: at
12
+ * two days, deliveries from 2026-10-05 were still being retried — and failing —
13
+ * through 10-07's edition. The dispatcher stops an expired delivery
14
+ * `queued_wake_stopped` the first time it meets one and says so on stderr
15
+ * (`attentionDispatcher.ts`), rather than leaving it hidden until compaction.
16
+ */
17
+ export declare const STALE_QUEUED_DELIVERY_MS: number;
4
18
  export type RetentionCandidate = Readonly<{
5
19
  file: string;
6
20
  state: "accepted" | "running" | "completed" | "failed" | "stopped";
7
21
  updatedAt: string;
22
+ acceptedAt?: string;
8
23
  acceptanceId: string;
9
24
  }>;
10
- /** Active work is never eligible; the newest terminal receipt horizon survives. */
25
+ /** Queued, unclaimed deliveries accepted before the staleness horizon. Running or claimed work never qualifies. */
26
+ export declare function staleQueuedFilesToStop(records: readonly (RetentionCandidate & Readonly<{
27
+ claimed: boolean;
28
+ }>)[], nowMs: number): readonly string[];
29
+ /**
30
+ * Active work is never eligible. The newest terminal receipts survive up to the
31
+ * idempotency horizon, but never so many that active work plus kept receipts
32
+ * still sits at the compaction threshold: a horizon that ignores active work
33
+ * lets parked deliveries hold the store at its bound with nothing to compact.
34
+ */
11
35
  export declare function terminalFilesToCompact(records: readonly RetentionCandidate[]): readonly string[];
12
36
  //# sourceMappingURL=wakeAcceptanceRetention.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wakeAcceptanceRetention.d.ts","sourceRoot":"","sources":["../../src/runtime/wakeAcceptanceRetention.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oCAAoC,OAAQ,CAAC;AAC1D,eAAO,MAAM,oCAAoC,OAAQ,CAAC;AAC1D,eAAO,MAAM,2BAA2B,OAAQ,CAAC;AAEjD,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;IACnE,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC,CAAC;AAEH,mFAAmF;AACnF,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,SAAS,kBAAkB,EAAE,GAAG,SAAS,MAAM,EAAE,CAMhG"}
1
+ {"version":3,"file":"wakeAcceptanceRetention.d.ts","sourceRoot":"","sources":["../../src/runtime/wakeAcceptanceRetention.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oCAAoC,OAAQ,CAAC;AAC1D,eAAO,MAAM,oCAAoC,OAAQ,CAAC;AAC1D,eAAO,MAAM,2BAA2B,OAAQ,CAAC;AACjD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,wBAAwB,QAAmB,CAAC;AAEzD,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;IACnE,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC,CAAC;AAEH,mHAAmH;AACnH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,SAAS,CAAC,kBAAkB,GAAG,QAAQ,CAAC;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAIlJ;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,SAAS,kBAAkB,EAAE,GAAG,SAAS,MAAM,EAAE,CAOhG"}
@@ -1,12 +1,38 @@
1
1
  export const TERMINAL_RECEIPT_IDEMPOTENCY_HORIZON = 2_048;
2
2
  export const WAKE_ACCEPTANCE_COMPACTION_THRESHOLD = 2_112;
3
3
  export const MAX_WAKE_ACCEPTANCE_RECORDS = 2_176;
4
- /** Active work is never eligible; the newest terminal receipt horizon survives. */
4
+ /**
5
+ * How long a delivery may sit in `accepted` before the store stops it.
6
+ *
7
+ * Inbox agents return every delivery they did not dispose of to `accepted`
8
+ * (deferred), and a failed execution keeps its batch for retry. Nothing ever
9
+ * ended either, so by 2026-10-05 213 deliveries up to two weeks old sat in the
10
+ * queue, were re-offered on every wake, and kept the store at its bound. A
11
+ * day is longer than any delivery stays actionable in a daily organization: at
12
+ * two days, deliveries from 2026-10-05 were still being retried — and failing —
13
+ * through 10-07's edition. The dispatcher stops an expired delivery
14
+ * `queued_wake_stopped` the first time it meets one and says so on stderr
15
+ * (`attentionDispatcher.ts`), rather than leaving it hidden until compaction.
16
+ */
17
+ export const STALE_QUEUED_DELIVERY_MS = 24 * 60 * 60_000;
18
+ /** Queued, unclaimed deliveries accepted before the staleness horizon. Running or claimed work never qualifies. */
19
+ export function staleQueuedFilesToStop(records, nowMs) {
20
+ return records
21
+ .filter((record) => record.state === "accepted" && !record.claimed && record.acceptedAt !== undefined && Date.parse(record.acceptedAt) <= nowMs - STALE_QUEUED_DELIVERY_MS)
22
+ .map((record) => record.file);
23
+ }
24
+ /**
25
+ * Active work is never eligible. The newest terminal receipts survive up to the
26
+ * idempotency horizon, but never so many that active work plus kept receipts
27
+ * still sits at the compaction threshold: a horizon that ignores active work
28
+ * lets parked deliveries hold the store at its bound with nothing to compact.
29
+ */
5
30
  export function terminalFilesToCompact(records) {
6
31
  if (records.length < WAKE_ACCEPTANCE_COMPACTION_THRESHOLD)
7
32
  return [];
8
33
  const terminal = records
9
34
  .filter((record) => record.state === "completed" || record.state === "failed" || record.state === "stopped")
10
35
  .sort((left, right) => right.updatedAt.localeCompare(left.updatedAt) || right.acceptanceId.localeCompare(left.acceptanceId));
11
- return terminal.slice(TERMINAL_RECEIPT_IDEMPOTENCY_HORIZON).map((record) => record.file);
36
+ const keep = Math.max(0, Math.min(TERMINAL_RECEIPT_IDEMPOTENCY_HORIZON, WAKE_ACCEPTANCE_COMPACTION_THRESHOLD - 1 - (records.length - terminal.length)));
37
+ return terminal.slice(keep).map((record) => record.file);
12
38
  }
@@ -43,10 +43,12 @@ export declare class WakeAcceptanceStore {
43
43
  private readonly ownerLiveness;
44
44
  private readonly afterFinalLockAssertion?;
45
45
  private mutations;
46
- private readonly acceptanceFiles;
46
+ private readonly index;
47
+ private onRecordRead?;
48
+ private claimTransitionLockTiming?;
47
49
  private constructor();
48
50
  static open(root: string, options?: WakeAcceptanceStoreTestOptions): Promise<WakeAcceptanceStore>;
49
- accept(request: OrganizationRuntimeWakeAcceptanceRequest): Promise<{
51
+ accept(request: OrganizationRuntimeWakeAcceptanceRequest, nativeSchedule?: boolean): Promise<{
50
52
  readonly record: Stored;
51
53
  readonly created: boolean;
52
54
  }>;
@@ -56,10 +58,10 @@ export declare class WakeAcceptanceStore {
56
58
  /** Internal availability view; diagnostics never enter the public receipt wire. */
57
59
  activityWithExecutionErrors(): Promise<readonly ActivityRow[]>;
58
60
  private activityRows;
59
- recoverable(agentIds: ReadonlySet<string>): Promise<readonly Stored[]>;
61
+ recoverable(agentIds: ReadonlySet<string>, onStale?: (record: Stored) => void): Promise<readonly Stored[]>;
60
62
  transition(acceptanceId: string, state: WakeReceiptState, code?: WakeReceiptCode): Promise<Stored>;
61
63
  /** Fuse race seam: never stops a record that was claimed after enumeration. */
62
- transitionAcceptedToStopped(acceptanceId: string): Promise<Stored>;
64
+ transitionAcceptedToStopped(acceptanceId: string, code?: "host_stopping" | "queued_wake_stopped"): Promise<Stored>;
63
65
  acquireClaim(acceptanceId: string, ownerId: string, acceptanceIds?: readonly string[], executionId?: string): Promise<WakeExecutionClaimResult>;
64
66
  claimHeartbeatIntervalMs(): number;
65
67
  renewClaim(acceptanceId: string, claim: WakeExecutionClaim): Promise<WakeExecutionClaim>;
@@ -99,14 +101,12 @@ export declare class WakeAcceptanceStore {
99
101
  private verify;
100
102
  }
101
103
  export declare class WakeInboxFullError extends Error {
102
- constructor();
104
+ constructor(message?: string);
103
105
  }
104
106
  export declare class WakeAcceptanceConflictError extends Error {
105
107
  constructor();
106
108
  }
107
- export declare class WakeExecutionClaimLostError extends Error {
108
- constructor();
109
- }
109
+ export { WakeExecutionClaimLostError, WakeTransitionLockContentionError } from "./wakeAcceptanceClaimDiagnostics.js";
110
110
  /** A container boundary requires deployment-authorized offline reconciliation. */
111
111
  export { WakeTransitionLockBlockedError } from "./wakeAcceptanceProcessIdentity.js";
112
112
  export { publicAcceptance } from "./wakeAcceptanceRecord.js";
@@ -1 +1 @@
1
- {"version":3,"file":"wakeAcceptanceStore.d.ts","sourceRoot":"","sources":["../../src/runtime/wakeAcceptanceStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyF,KAAK,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAKhK,OAAO,EAIL,KAAK,wCAAwC,EAC7C,KAAK,oCAAoC,EACzC,KAAK,eAAe,EACpB,KAAK,gBAAgB,EAEtB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAqF,KAAK,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAI/J,KAAK,MAAM,GAAG,0BAA0B,CAAC;AACzC,KAAK,WAAW,GAAG,oCAA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