@plurnk/plurnk-service 1.0.5 → 1.0.7

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 (201) hide show
  1. package/.env.defaults +66 -48
  2. package/INSTALL.md +3 -3
  3. package/README.md +4 -4
  4. package/SPEC.md +212 -196
  5. package/dist/Paths.js +1 -1
  6. package/dist/Paths.js.map +1 -1
  7. package/dist/core/ChannelWrite.d.ts +18 -18
  8. package/dist/core/ChannelWrite.d.ts.map +1 -1
  9. package/dist/core/ChannelWrite.js +17 -17
  10. package/dist/core/ChannelWrite.js.map +1 -1
  11. package/dist/core/ChannelWrite.sql +11 -11
  12. package/dist/core/Dispatcher.d.ts +15 -11
  13. package/dist/core/Dispatcher.d.ts.map +1 -1
  14. package/dist/core/Dispatcher.js +124 -125
  15. package/dist/core/Dispatcher.js.map +1 -1
  16. package/dist/core/Engine.d.ts +20 -23
  17. package/dist/core/Engine.d.ts.map +1 -1
  18. package/dist/core/Engine.js +210 -185
  19. package/dist/core/Engine.js.map +1 -1
  20. package/dist/core/Engine.sql +106 -109
  21. package/dist/core/PacketBuilder.d.ts +9 -9
  22. package/dist/core/PacketBuilder.d.ts.map +1 -1
  23. package/dist/core/PacketBuilder.js +199 -151
  24. package/dist/core/PacketBuilder.js.map +1 -1
  25. package/dist/core/ProposalLifecycle.d.ts +8 -8
  26. package/dist/core/ProposalLifecycle.d.ts.map +1 -1
  27. package/dist/core/ProposalLifecycle.js +10 -10
  28. package/dist/core/ProposalLifecycle.js.map +1 -1
  29. package/dist/core/ProviderInstantiate.d.ts +1 -0
  30. package/dist/core/ProviderInstantiate.d.ts.map +1 -1
  31. package/dist/core/ProviderInstantiate.js +9 -3
  32. package/dist/core/ProviderInstantiate.js.map +1 -1
  33. package/dist/core/SchemeRegistry.d.ts +4 -1
  34. package/dist/core/SchemeRegistry.d.ts.map +1 -1
  35. package/dist/core/SchemeRegistry.js +18 -9
  36. package/dist/core/SchemeRegistry.js.map +1 -1
  37. package/dist/core/TelemetryChannel.d.ts +5 -5
  38. package/dist/core/TelemetryChannel.d.ts.map +1 -1
  39. package/dist/core/TelemetryChannel.js +9 -9
  40. package/dist/core/TelemetryChannel.js.map +1 -1
  41. package/dist/core/caps/CapsResolve.js +2 -2
  42. package/dist/core/caps/CapsResolve.js.map +1 -1
  43. package/dist/core/caps/DbNotifyCaps.js +2 -2
  44. package/dist/core/caps/DbNotifyCaps.js.map +1 -1
  45. package/dist/core/caps/DbSubscriptionCaps.js +7 -7
  46. package/dist/core/caps/DbSubscriptionCaps.js.map +1 -1
  47. package/dist/core/caps/SchemeCtxImpl.d.ts +2 -2
  48. package/dist/core/caps/SchemeCtxImpl.d.ts.map +1 -1
  49. package/dist/core/caps/SchemeCtxImpl.js +4 -4
  50. package/dist/core/caps/SchemeCtxImpl.js.map +1 -1
  51. package/dist/core/fork.d.ts +1 -1
  52. package/dist/core/fork.d.ts.map +1 -1
  53. package/dist/core/fork.js +31 -26
  54. package/dist/core/fork.js.map +1 -1
  55. package/dist/core/fork.sql +41 -32
  56. package/dist/core/git-env.d.ts.map +1 -1
  57. package/dist/core/git-env.js +23 -7
  58. package/dist/core/git-env.js.map +1 -1
  59. package/dist/core/git-iso.d.ts +9 -0
  60. package/dist/core/git-iso.d.ts.map +1 -0
  61. package/dist/core/git-iso.js +227 -0
  62. package/dist/core/git-iso.js.map +1 -0
  63. package/dist/core/git-membership.d.ts +2 -2
  64. package/dist/core/git-membership.d.ts.map +1 -1
  65. package/dist/core/git-membership.js +70 -50
  66. package/dist/core/git-membership.js.map +1 -1
  67. package/dist/core/git-state.d.ts +1 -1
  68. package/dist/core/git-state.d.ts.map +1 -1
  69. package/dist/core/git-state.js +21 -11
  70. package/dist/core/git-state.js.map +1 -1
  71. package/dist/core/packet-wire.d.ts.map +1 -1
  72. package/dist/core/packet-wire.js +81 -22
  73. package/dist/core/packet-wire.js.map +1 -1
  74. package/dist/core/plurnk-uri.d.ts +2 -2
  75. package/dist/core/plurnk-uri.d.ts.map +1 -1
  76. package/dist/core/plurnk-uri.js +19 -12
  77. package/dist/core/plurnk-uri.js.map +1 -1
  78. package/dist/core/run-ops.sql +26 -26
  79. package/dist/core/scheme-types.d.ts +6 -6
  80. package/dist/core/scheme-types.d.ts.map +1 -1
  81. package/dist/core/search-gate.js +0 -0
  82. package/dist/core/search-gate.js.map +1 -1
  83. package/dist/core/token-ruler.js +2 -2
  84. package/dist/core/token-ruler.js.map +1 -1
  85. package/dist/core/worker-cap.d.ts +8 -0
  86. package/dist/core/worker-cap.d.ts.map +1 -0
  87. package/dist/core/worker-cap.js +20 -0
  88. package/dist/core/worker-cap.js.map +1 -0
  89. package/dist/core/{session-settings.d.ts → workspace-settings.d.ts} +5 -5
  90. package/dist/core/workspace-settings.d.ts.map +1 -0
  91. package/dist/core/{session-settings.js → workspace-settings.js} +13 -13
  92. package/dist/core/workspace-settings.js.map +1 -0
  93. package/dist/digest/Digest.d.ts +3 -3
  94. package/dist/digest/Digest.d.ts.map +1 -1
  95. package/dist/digest/Digest.js +83 -73
  96. package/dist/digest/Digest.js.map +1 -1
  97. package/dist/digest/digest.sql +18 -18
  98. package/dist/schemes/Exec.d.ts +9 -2
  99. package/dist/schemes/Exec.d.ts.map +1 -1
  100. package/dist/schemes/Exec.js +124 -68
  101. package/dist/schemes/Exec.js.map +1 -1
  102. package/dist/schemes/ExecOutputScheme.js +3 -3
  103. package/dist/schemes/ExecOutputScheme.js.map +1 -1
  104. package/dist/schemes/File.js +23 -23
  105. package/dist/schemes/File.js.map +1 -1
  106. package/dist/schemes/Known.js +5 -5
  107. package/dist/schemes/Known.js.map +1 -1
  108. package/dist/schemes/Log.d.ts.map +1 -1
  109. package/dist/schemes/Log.js +63 -14
  110. package/dist/schemes/Log.js.map +1 -1
  111. package/dist/schemes/Log.sql +49 -8
  112. package/dist/schemes/Plurnk.js +5 -5
  113. package/dist/schemes/Plurnk.js.map +1 -1
  114. package/dist/schemes/Skill.js +5 -5
  115. package/dist/schemes/Skill.js.map +1 -1
  116. package/dist/schemes/Unknown.js +5 -5
  117. package/dist/schemes/Unknown.js.map +1 -1
  118. package/dist/schemes/{Run.d.ts → Worker.d.ts} +2 -2
  119. package/dist/schemes/Worker.d.ts.map +1 -0
  120. package/dist/schemes/{Run.js → Worker.js} +67 -67
  121. package/dist/schemes/Worker.js.map +1 -0
  122. package/dist/schemes/_entry-crud.js +8 -8
  123. package/dist/schemes/_entry-crud.js.map +1 -1
  124. package/dist/schemes/_entry-crud.sql +29 -29
  125. package/dist/schemes/_entry-find.d.ts +2 -1
  126. package/dist/schemes/_entry-find.d.ts.map +1 -1
  127. package/dist/schemes/_entry-find.js +31 -19
  128. package/dist/schemes/_entry-find.js.map +1 -1
  129. package/dist/schemes/_entry-find.sql +9 -9
  130. package/dist/schemes/_entry-graph.d.ts +2 -2
  131. package/dist/schemes/_entry-graph.d.ts.map +1 -1
  132. package/dist/schemes/_entry-graph.js +18 -18
  133. package/dist/schemes/_entry-graph.js.map +1 -1
  134. package/dist/schemes/_entry-graph.sql +8 -8
  135. package/dist/schemes/_entry-manifest.d.ts +1 -1
  136. package/dist/schemes/_entry-manifest.d.ts.map +1 -1
  137. package/dist/schemes/_entry-manifest.js +72 -28
  138. package/dist/schemes/_entry-manifest.js.map +1 -1
  139. package/dist/schemes/_entry-ops.d.ts +4 -4
  140. package/dist/schemes/_entry-ops.d.ts.map +1 -1
  141. package/dist/schemes/_entry-ops.js +25 -25
  142. package/dist/schemes/_entry-ops.js.map +1 -1
  143. package/dist/schemes/_entry-ops.sql +9 -9
  144. package/dist/schemes/_entry-semantic.d.ts +2 -1
  145. package/dist/schemes/_entry-semantic.d.ts.map +1 -1
  146. package/dist/schemes/_entry-semantic.js +23 -4
  147. package/dist/schemes/_entry-semantic.js.map +1 -1
  148. package/dist/schemes/_entry-semantic.sql +18 -4
  149. package/dist/schemes/_entry-send.d.ts +1 -1
  150. package/dist/schemes/_entry-send.d.ts.map +1 -1
  151. package/dist/schemes/_entry-send.js +6 -6
  152. package/dist/schemes/_entry-send.js.map +1 -1
  153. package/dist/schemes/exec-abort.js +1 -1
  154. package/dist/schemes/exec-abort.js.map +1 -1
  155. package/dist/server/Daemon.d.ts +48 -48
  156. package/dist/server/Daemon.d.ts.map +1 -1
  157. package/dist/server/Daemon.js +295 -292
  158. package/dist/server/Daemon.js.map +1 -1
  159. package/dist/server/client-input.js +20 -20
  160. package/dist/server/client-input.js.map +1 -1
  161. package/dist/server/dispatch-as-plurnk.d.ts +1 -1
  162. package/dist/server/dispatch-as-plurnk.d.ts.map +1 -1
  163. package/dist/server/dispatch-as-plurnk.js +7 -7
  164. package/dist/server/dispatch-as-plurnk.js.map +1 -1
  165. package/dist/server/drain.sql +27 -27
  166. package/dist/server/envelope.d.ts +20 -20
  167. package/dist/server/envelope.d.ts.map +1 -1
  168. package/dist/server/envelope.js +86 -86
  169. package/dist/server/envelope.js.map +1 -1
  170. package/dist/server/envelope.sql +39 -39
  171. package/dist/server/logEntry.d.ts +1 -1
  172. package/dist/server/logEntry.d.ts.map +1 -1
  173. package/dist/server/logEntry.js +1 -1
  174. package/dist/server/logEntry.js.map +1 -1
  175. package/dist/server/loopDocs.d.ts +1 -1
  176. package/dist/server/loopDocs.d.ts.map +1 -1
  177. package/dist/server/loopDocs.js +6 -6
  178. package/dist/server/loopDocs.js.map +1 -1
  179. package/dist/server/seam-entry-read.sql +2 -2
  180. package/dist/server/seam-log-read.sql +3 -3
  181. package/dist/server/seam-loop.sql +3 -3
  182. package/dist/server/seam-proposal-list.sql +4 -4
  183. package/dist/server/yolo.js +2 -2
  184. package/dist/server/yolo.js.map +1 -1
  185. package/dist/service.d.ts.map +1 -1
  186. package/dist/service.js +22 -7
  187. package/dist/service.js.map +1 -1
  188. package/migrations/0000-00-00.01_schema.sql +82 -70
  189. package/package.json +18 -15
  190. package/dist/core/run-cap.d.ts +0 -8
  191. package/dist/core/run-cap.d.ts.map +0 -1
  192. package/dist/core/run-cap.js +0 -20
  193. package/dist/core/run-cap.js.map +0 -1
  194. package/dist/core/search-prefetch.d.ts +0 -17
  195. package/dist/core/search-prefetch.d.ts.map +0 -1
  196. package/dist/core/search-prefetch.js +0 -164
  197. package/dist/core/search-prefetch.js.map +0 -1
  198. package/dist/core/session-settings.d.ts.map +0 -1
  199. package/dist/core/session-settings.js.map +0 -1
  200. package/dist/schemes/Run.d.ts.map +0 -1
  201. package/dist/schemes/Run.js.map +0 -1
@@ -3,23 +3,23 @@
3
3
  -- PREP: engine_loop_status
4
4
  SELECT status FROM loops WHERE id = $loop_id;
5
5
 
6
- -- PREP: engine_run_has_live_child
7
- -- A non-terminal CHILD run (run:// spawn/fork set parent_run_id) — a "live thing the run holds",
6
+ -- PREP: engine_worker_has_live_child
7
+ -- A non-terminal CHILD run (worker:// spawn/fork set parent_worker_id) — a "live thing the worker holds",
8
8
  -- like an open stream. A SEND[200] while one exists is a premature-terminate (§send-premature-terminate).
9
9
  -- Live = a child whose LATEST loop is still pending/running/parked (100/102/202) — the SAME definition
10
- -- engine_child_runs_live uses for the Child Runs orientation, so the 409 gate and the section the model
10
+ -- engine_child_workers_live uses for the Child Runs orientation, so the 409 gate and the section the model
11
11
  -- reads NEVER disagree: a refused termination is always backed by a child the model can SEE and KILL
12
12
  -- (§child-orientation). An inherited/historical loop (a fork copies the parent's loops) is not the
13
13
  -- latest, so it never makes a concluded child look forever-live.
14
- SELECT 1 AS live FROM runs r
15
- JOIN loops l ON l.id = (SELECT id FROM loops WHERE run_id = r.id ORDER BY sequence DESC, id DESC LIMIT 1)
16
- WHERE r.parent_run_id = $run_id AND l.status IN (100, 102, 202) LIMIT 1;
14
+ SELECT 1 AS live FROM workers r
15
+ JOIN loops l ON l.id = (SELECT id FROM loops WHERE worker_id = r.id ORDER BY sequence DESC, id DESC LIMIT 1)
16
+ WHERE r.parent_worker_id = $worker_id AND l.status IN (100, 102, 202) LIMIT 1;
17
17
 
18
- -- PREP: engine_count_active_loops_for_run
18
+ -- PREP: engine_count_active_loops_for_worker
19
19
  -- Wake-on-completion uses this to decide whether to open a new loop or
20
20
  -- let the existing one pick up the channel transition at the next turn
21
21
  -- boundary. Status 102 = "in progress" (any non-terminal state).
22
- SELECT COUNT(*) AS n FROM loops WHERE run_id = $run_id AND status = 102;
22
+ SELECT COUNT(*) AS n FROM loops WHERE worker_id = $worker_id AND status = 102;
23
23
 
24
24
  -- PREP: engine_get_loop_flags
25
25
  -- Loads the loop's persisted flags (json). Default '{}'; YOLO listener and
@@ -53,7 +53,7 @@ SELECT open_paths FROM loops WHERE id = $loop_id;
53
53
  SELECT prompt, sequence FROM loops WHERE id = $loop_id;
54
54
 
55
55
  -- PREP: engine_reclaim_queued_loop
56
- -- §run-lifecycle-wake-requeue-not-terminal — atomic 100→102 re-claim by loop id. A wake
56
+ -- §worker-lifecycle-wake-requeue-not-terminal — atomic 100→102 re-claim by loop id. A wake
57
57
  -- re-queued this loop while ITS OWN live drain was between turns; the drain re-claims and
58
58
  -- keeps running (the injected prompt is already the next turn). Conditional so a racing
59
59
  -- claimant can never double-claim.
@@ -62,7 +62,7 @@ UPDATE loops SET status = 102 WHERE id = $loop_id AND status = 100;
62
62
  -- PREP: engine_loop_set_status
63
63
  -- The universal terminal setter. terminal_message carries either the loop's deliverable
64
64
  -- (the SEND body) or the engine's abandonment reason (max_turns / budget_overflow /
65
- -- strike_threshold) — rides the §run-scheme delta.
65
+ -- strike_threshold) — rides the §worker-scheme delta.
66
66
  UPDATE loops SET status = $status, terminal_message = $message WHERE id = $loop_id;
67
67
 
68
68
  -- PREP: engine_loop_mark_terminated_by
@@ -80,74 +80,74 @@ UPDATE loops SET terminated_by = $terminated_by WHERE id = $loop_id;
80
80
  UPDATE loops SET status = 499, terminal_message = $message, terminated_by = 'cancel'
81
81
  WHERE id = $loop_id AND status NOT IN (200, 413, 429, 499, 500, 504, 508);
82
82
 
83
- -- PREP: engine_run_cancel_live_loops
83
+ -- PREP: engine_worker_cancel_live_loops
84
84
  -- #380, the PARKED case — a 202-blocked loop has no drain to observe the abort (the drain
85
- -- tears down on 202), so loop.cancel terminalizes the run's live loops itself. 102/202 only:
85
+ -- tears down on 202), so loop.cancel terminalizes the worker's live loops itself. 102/202 only:
86
86
  -- queued (100) loops stay enqueued per §methods-loop-cancel. RETURNING feeds the
87
87
  -- loop/terminated broadcast for exactly the loops this cancel killed.
88
88
  UPDATE loops SET status = 499, terminal_message = $message, terminated_by = 'cancel'
89
- WHERE run_id = $run_id AND status IN (102, 202)
89
+ WHERE worker_id = $worker_id AND status IN (102, 202)
90
90
  RETURNING id;
91
91
 
92
- -- PREP: engine_terminate_run_live_loops
92
+ -- PREP: engine_terminate_worker_live_loops
93
93
  -- §op-synchronous — KILL(run) is a DECISIVE op, not a fork/spawn/stream, so it must complete
94
- -- before the turn moves on. Synchronously flip every LIVE loop of the run to 499 (killed) so the
95
- -- same-turn premature-terminate gate (engine_run_has_live_child) sees it dead immediately; the
96
- -- physical scope reap (drain abort, stream teardown) then proceeds async via cancelRun. The
97
- -- loops_stamp_terminated_at trigger stamps terminated_at on the 499 transition (the §run-scheme delta).
94
+ -- before the turn moves on. Synchronously flip every LIVE loop of the worker to 499 (killed) so the
95
+ -- same-turn premature-terminate gate (engine_worker_has_live_child) sees it dead immediately; the
96
+ -- physical scope reap (drain abort, stream teardown) then proceeds async via cancelWorker. The
97
+ -- loops_stamp_terminated_at trigger stamps terminated_at on the 499 transition (the §worker-scheme delta).
98
98
  UPDATE loops SET status = 499, terminal_message = $message
99
- WHERE run_id = $run_id AND status IN (100, 102, 202);
99
+ WHERE worker_id = $worker_id AND status IN (100, 102, 202);
100
100
 
101
- -- PREP: session_get_settings
102
- -- #231 — the session's client-chosen open-context bag ({ manifestItems?, mdDocs? }),
101
+ -- PREP: workspace_get_settings
102
+ -- #231 — the workspace's client-chosen open-context bag ({ manifestItems?, mdDocs? }),
103
103
  -- read at turn-0 with precedence over env.
104
- SELECT settings FROM sessions WHERE id = $session_id;
104
+ SELECT settings FROM workspaces WHERE id = $workspace_id;
105
105
 
106
106
  -- PREP: engine_target_diverged_this_turn
107
107
  -- #note10 — did this entry diverge on disk THIS turn? A source=file env-delta for the
108
- -- target, materialized into this run's log at the current turn, means the model's view
108
+ -- target, materialized into this worker's log at the current turn, means the model's view
109
109
  -- predates the ambient change — a YOLO auto-accept of a same-turn EDIT would clobber it.
110
110
  SELECT 1 AS hit
111
111
  FROM log_entries
112
- WHERE run_id = $run_id AND turn_id = $turn_id
112
+ WHERE worker_id = $worker_id AND turn_id = $turn_id
113
113
  AND origin = 'plurnk' AND source = 'file' AND op = 'EDIT'
114
114
  AND scheme IS $scheme AND pathname = $pathname
115
115
  LIMIT 1;
116
116
 
117
- -- PREP: engine_list_session_entry_tags
118
- -- #note13 — every (entry, tag) in the session, for the manifest catalog's tags field.
117
+ -- PREP: engine_list_workspace_entry_tags
118
+ -- #note13 — every (entry, tag) in the workspace, for the manifest catalog's tags field.
119
119
  SELECT et.entry_id, et.tag
120
120
  FROM entry_tags et
121
121
  JOIN entries e ON e.id = et.entry_id
122
- WHERE e.session_id = $session_id
122
+ WHERE e.workspace_id = $workspace_id
123
123
  ORDER BY et.entry_id, et.tag;
124
124
 
125
- -- PREP: engine_list_run_entries
126
- -- §run-scheme — the building run's OWN run-scope entries (catalogRowsFor source for a run-scope
127
- -- FIND/foist). Byte-for-byte engine_list_session_entries but scope='run' + an owner-prefix glob
128
- -- (`/<owner>/*`) so it yields exactly one run's scratch — its perspective, not a sibling's. Additive.
125
+ -- PREP: engine_list_worker_entries
126
+ -- §worker-scheme — the building worker's OWN worker-scope entries (catalogRowsFor source for a worker-scope
127
+ -- FIND/foist). Byte-for-byte engine_list_workspace_entries but scope='worker' + an owner-prefix glob
128
+ -- (`/<owner>/*`) so it yields exactly one worker's scratch — its perspective, not a sibling's. Additive.
129
129
  SELECT e.id AS entry_id, e.scheme, e.pathname, ec.name AS channel, ec.content, ec.mimetype, ec.tokens AS tokens, e.deep_hash,
130
130
  CAST(unixepoch('now') - unixepoch(s.opened_at) AS INTEGER) AS seconds
131
131
  FROM entries e
132
132
  JOIN entry_channels ec ON ec.entry_id = e.id
133
133
  LEFT JOIN subscriptions s ON s.entry_id = e.id AND s.closed_at IS NULL
134
- WHERE e.scope = 'run' AND e.session_id = $session_id AND e.pathname GLOB $owner_prefix
134
+ WHERE e.scope = 'worker' AND e.workspace_id = $workspace_id AND e.pathname GLOB $owner_prefix
135
135
  ORDER BY e.updated_at ASC, e.id ASC, ec.name;
136
136
 
137
- -- PREP: engine_list_run_entry_tags
138
- -- §run-scheme — (entry, tag) for the building run's own run-scope entries (the run-scope catalog's tags field).
137
+ -- PREP: engine_list_worker_entry_tags
138
+ -- §worker-scheme — (entry, tag) for the building worker's own worker-scope entries (the worker-scope catalog's tags field).
139
139
  SELECT et.entry_id, et.tag
140
140
  FROM entry_tags et
141
141
  JOIN entries e ON e.id = et.entry_id
142
- WHERE e.session_id = $session_id AND e.scope = 'run' AND e.pathname GLOB $owner_prefix
142
+ WHERE e.workspace_id = $workspace_id AND e.scope = 'worker' AND e.pathname GLOB $owner_prefix
143
143
  ORDER BY et.entry_id, et.tag;
144
144
 
145
- -- PREP: engine_run_scratch_count
146
- -- §run-scheme — distinct run-scope entry count owned by the building run, to decide whether the
147
- -- turn-0 catalog foists a FIND(run:///**) (a run with no scratch foists nothing).
145
+ -- PREP: engine_worker_scratch_count
146
+ -- §worker-scheme — distinct worker-scope entry count owned by the building run, to decide whether the
147
+ -- turn-0 catalog foists a FIND(worker:///**) (a worker with no scratch foists nothing).
148
148
  SELECT COUNT(DISTINCT e.id) AS entries
149
149
  FROM entries e
150
- WHERE e.scope = 'run' AND e.session_id = $session_id AND e.pathname GLOB $owner_prefix;
150
+ WHERE e.scope = 'worker' AND e.workspace_id = $workspace_id AND e.pathname GLOB $owner_prefix;
151
151
 
152
152
  -- PREP: engine_next_turn_sequence
153
153
  SELECT COALESCE(MAX(sequence), 0) + 1 AS next FROM turns WHERE loop_id = $loop_id;
@@ -163,7 +163,7 @@ SELECT COALESCE(SUM(usage_prompt), 0) AS prompt,
163
163
  (SELECT usage_prompt FROM turns WHERE loop_id = $loop_id ORDER BY sequence DESC LIMIT 1) AS context,
164
164
  -- #274 — the LAST turn's model window (denominator), so numerator + denominator come from
165
165
  -- the same loop/model; NULL when the provider reports no window.
166
- (SELECT usage_context_size FROM turns WHERE loop_id = $loop_id ORDER BY sequence DESC LIMIT 1) AS context_size,
166
+ (SELECT usage_prompt_budget FROM turns WHERE loop_id = $loop_id ORDER BY sequence DESC LIMIT 1) AS context_size,
167
167
  -- #252 — the opaque provider meta blob from the LATEST turn (e.g. balancePico, a
168
168
  -- point-in-time snapshot; latest wins). Service-unenforced passthrough to the client.
169
169
  (SELECT meta FROM turns WHERE loop_id = $loop_id ORDER BY sequence DESC LIMIT 1) AS meta
@@ -200,16 +200,16 @@ UPDATE turns SET
200
200
  usage_reasoning = $usage_reasoning,
201
201
  usage_cached = $usage_cached,
202
202
  usage_cost_pico = $usage_cost_pico,
203
- usage_context_size = $usage_context_size,
203
+ usage_prompt_budget = $usage_prompt_budget,
204
204
  finish_reason = $finish_reason,
205
205
  model = $model,
206
206
  meta = $meta
207
207
  WHERE id = $id;
208
208
 
209
- -- PREP: engine_list_session_entries
210
- -- Every entry of a session — all schemes, all channels — the source behind the entry
209
+ -- PREP: engine_list_workspace_entries
210
+ -- Every entry of a workspace — all schemes, all channels — the source behind the entry
211
211
  -- catalog (catalogRowsFor / FIND) and the per-turn derivation pump (maintainDerivations).
212
- -- Session-scoped (persists across runs); FOLD doesn't drop from the catalog.
212
+ -- Workspace-scoped (persists across runs); FOLD doesn't drop from the catalog.
213
213
  -- `seconds` is the live age of an active stream: now − the open subscription's
214
214
  -- opened_at (closed_at IS NULL). NULL for static entries. unixepoch parses the
215
215
  -- stored '...%fZ' timestamp directly; re-evaluated every render like tokens.
@@ -218,8 +218,8 @@ SELECT e.id AS entry_id, e.scheme, e.pathname, ec.name AS channel, ec.content, e
218
218
  FROM entries e
219
219
  JOIN entry_channels ec ON ec.entry_id = e.id
220
220
  LEFT JOIN subscriptions s ON s.entry_id = e.id AND s.closed_at IS NULL
221
- -- entries are session-scoped, shared across runs — §machine-processes-one-filesystem
222
- WHERE e.scope = 'session' AND e.session_id = $session_id
221
+ -- entries are workspace-scoped, shared across runs — §machine-processes-one-filesystem
222
+ WHERE e.scope = 'workspace' AND e.workspace_id = $workspace_id
223
223
  -- User Note 5 — mtime-ascending: dormant entries hold the stable prompt-cache prefix; churn clusters at the tail.
224
224
  ORDER BY e.updated_at ASC, e.id ASC, ec.name;
225
225
 
@@ -231,51 +231,51 @@ SELECT e.scheme AS scheme,
231
231
  COUNT(DISTINCT e.id) AS entries
232
232
  FROM entries e
233
233
  JOIN entry_channels ec ON ec.entry_id = e.id
234
- WHERE e.scope = 'session' AND e.session_id = $session_id
234
+ WHERE e.scope = 'workspace' AND e.workspace_id = $workspace_id
235
235
  GROUP BY e.scheme
236
236
  ORDER BY e.scheme;
237
237
 
238
- -- PREP: engine_run_prior_turn_time
239
- -- §env-delta — timestamp of this run's most recent turn BEFORE the current one
240
- -- (the "since I last looked" boundary). NULL on the run's first turn → no deltas.
238
+ -- PREP: engine_worker_prior_turn_time
239
+ -- §env-delta — timestamp of this worker's most recent turn BEFORE the current one
240
+ -- (the "since I last looked" boundary). NULL on the worker's first turn → no deltas.
241
241
  SELECT MAX(t.timestamp) AS since
242
242
  FROM turns t JOIN loops l ON l.id = t.loop_id
243
- WHERE l.run_id = $run_id AND t.id != $turn_id;
243
+ WHERE l.worker_id = $worker_id AND t.id != $turn_id;
244
244
 
245
245
  -- PREP: engine_pull_env_deltas
246
- -- §env-delta — other actors' resolved EDITs on shared entries since this run last
247
- -- looked. Real edits (origin model/client) AND the plurnk run's fs-sync fictions
248
- -- (origin=plurnk on the reserved 'plurnk' run); excludes this run's own rows and
249
- -- other runs' already-materialized deltas (origin=plurnk on a real run). plurnk:///
246
+ -- §env-delta — other actors' resolved EDITs on shared entries since this worker last
247
+ -- looked. Real edits (origin model/client) AND the plurnk worker's fs-sync fictions
248
+ -- (origin=plurnk on the reserved 'plurnk' run); excludes this worker's own rows and
249
+ -- other workers' already-materialized deltas (origin=plurnk on a real run). plurnk:///
250
250
  -- entries (manifest/prompt/doc) never surface. This is the environment door (§actor-boundary-two-doors); the voice door is inject.
251
- SELECT le.run_id, le.scheme, le.pathname, le.rx, le.source
251
+ SELECT le.worker_id, le.scheme, le.pathname, le.rx, le.source
252
252
  FROM log_entries le
253
- JOIN runs r ON r.id = le.run_id
254
- WHERE r.session_id = $session_id
253
+ JOIN workers r ON r.id = le.worker_id
254
+ WHERE r.workspace_id = $workspace_id
255
255
  AND le.op = 'EDIT'
256
256
  AND le.state = 'resolved'
257
257
  AND le.status_rx IN (200, 201)
258
258
  AND (le.scheme IS NULL OR le.scheme != 'plurnk')
259
- AND le.run_id != $run_id
259
+ AND le.worker_id != $worker_id
260
260
  AND le.at > $since
261
261
  AND (le.origin != 'plurnk'
262
- OR le.run_id = (SELECT id FROM runs WHERE session_id = $session_id AND name = 'plurnk'))
262
+ OR le.worker_id = (SELECT id FROM workers WHERE workspace_id = $workspace_id AND name = 'plurnk'))
263
263
  ORDER BY le.at;
264
264
 
265
265
  -- PREP: engine_insert_env_delta
266
266
  -- §env-delta — materialize a pulled cross-actor edit as a FOLDED delta (expanded=0)
267
- -- in this run's log. origin=plurnk; source carries the cause (sibling run id or
267
+ -- in this worker's log. origin=plurnk; source carries the cause (sibling worker id or
268
268
  -- 'file'); rx reuses the originating row's result span (§edit-result-render).
269
269
  INSERT INTO log_entries (
270
- run_id, loop_id, turn_id, sequence, origin, source,
270
+ worker_id, loop_id, turn_id, sequence, origin, source,
271
271
  op, scheme, pathname, tx, mimetype_tx, rx, mimetype_rx, status_rx, expanded
272
272
  ) VALUES (
273
- $run_id, $loop_id, $turn_id, $sequence, 'plurnk', $source,
273
+ $worker_id, $loop_id, $turn_id, $sequence, 'plurnk', $source,
274
274
  'EDIT', $scheme, $pathname, '', 'text/plain', $rx, 'application/json', 200, 0
275
275
  );
276
276
 
277
- -- PREP: engine_run_stream_channels
278
- -- §exec-stream — every stream channel the run owns (an EXEC's stdout/stderr live on the
277
+ -- PREP: engine_worker_stream_channels
278
+ -- §exec-stream — every stream channel the worker owns (an EXEC's stdout/stderr live on the
279
279
  -- runtime-tag entry), with content + state + coordinate, so the per-turn injector can emit the
280
280
  -- channel's unshown byte-delta. Stays listed until its last delta is shown (cursor == content len).
281
281
  SELECT s.id AS subscription_id, e.scheme AS runtime, e.pathname AS coord,
@@ -283,15 +283,15 @@ SELECT s.id AS subscription_id, e.scheme AS runtime, e.pathname AS coord,
283
283
  FROM subscriptions s
284
284
  JOIN entries e ON e.id = s.entry_id
285
285
  JOIN entry_channels ec ON ec.entry_id = s.entry_id
286
- WHERE s.run_id = $run_id
286
+ WHERE s.worker_id = $worker_id
287
287
  ORDER BY s.id, ec.name;
288
288
 
289
289
  -- PREP: engine_stream_cursor
290
- -- §exec-stream — bytes of this channel already shown to the run: the streamEnd recorded on its
290
+ -- §exec-stream — bytes of this channel already shown to the worker: the streamEnd recorded on its
291
291
  -- latest foisted delta (the caller defaults to 0 when none exists yet).
292
292
  SELECT attrs
293
293
  FROM log_entries
294
- WHERE run_id = $run_id AND origin = 'plurnk' AND op = 'READ'
294
+ WHERE worker_id = $worker_id AND origin = 'plurnk' AND op = 'READ'
295
295
  AND scheme = $scheme AND pathname = $pathname AND fragment = $fragment
296
296
  ORDER BY id DESC LIMIT 1;
297
297
 
@@ -301,63 +301,63 @@ ORDER BY id DESC LIMIT 1;
301
301
  -- the channel; attrs.streamEnd is the next turn's cursor; expanded=1 when the channel has CLOSED
302
302
  -- (the terminal delta auto-OPENs), 0 while it streams (ongoing deltas fold). §exec-stream
303
303
  INSERT INTO log_entries (
304
- run_id, loop_id, turn_id, sequence, origin, source,
304
+ worker_id, loop_id, turn_id, sequence, origin, source,
305
305
  op, scheme, pathname, fragment, tx, mimetype_tx, rx, mimetype_rx, status_rx, attrs, expanded
306
306
  ) VALUES (
307
- $run_id, $loop_id, $turn_id, $sequence, 'plurnk', NULL,
307
+ $worker_id, $loop_id, $turn_id, $sequence, 'plurnk', NULL,
308
308
  'READ', $scheme, $pathname, $fragment, '', 'text/plain', $rx, 'application/json', 200, $attrs, $expanded
309
309
  );
310
310
 
311
311
  -- PREP: engine_pull_loop_terminations
312
- -- §run-scheme — sibling runs' loops that reached a terminal status since this run last
312
+ -- §worker-scheme — sibling runs' loops that reached a terminal status since this worker last
313
313
  -- looked (the loop-termination ambient delta). Carries terminal_message — the SEND[200]
314
314
  -- deliverable or the abandonment reason — plus terminated_by so a collapse/cancel renders
315
- -- its marker (#379). Excludes this run's own loops.
316
- SELECT l.run_id, r.name AS run_name, l.status, l.prompt, l.terminal_message, l.terminated_by
315
+ -- its marker (#379). Excludes this worker's own loops.
316
+ SELECT l.worker_id, r.name AS worker_name, l.status, l.prompt, l.terminal_message, l.terminated_by
317
317
  FROM loops l
318
- JOIN runs r ON r.id = l.run_id
319
- WHERE r.session_id = $session_id
318
+ JOIN workers r ON r.id = l.worker_id
319
+ WHERE r.workspace_id = $workspace_id
320
320
  AND l.terminated_at IS NOT NULL
321
321
  AND l.terminated_at > $since
322
- AND l.run_id != $run_id
322
+ AND l.worker_id != $worker_id
323
323
  ORDER BY l.terminated_at;
324
324
 
325
325
  -- PREP: engine_insert_loop_termination_delta
326
- -- §run-scheme — materialize a sibling's loop-termination as a delta: a SEND from
327
- -- run:///<name> carrying the terminal status + message (the deliverable). origin=plurnk,
326
+ -- §worker-scheme — materialize a sibling's loop-termination as a delta: a SEND from
327
+ -- worker:///<name> carrying the terminal status + message (the deliverable). origin=plurnk,
328
328
  -- source=the terminated run — uniform with the env-delta. Born OPEN for a 2xx deliverable
329
329
  -- (a child's success must reach the parent open + awakening), folded otherwise.
330
330
  INSERT INTO log_entries (
331
- run_id, loop_id, turn_id, sequence, origin, source,
331
+ worker_id, loop_id, turn_id, sequence, origin, source,
332
332
  op, scheme, pathname, tx, mimetype_tx, rx, mimetype_rx, status_rx, expanded
333
333
  ) VALUES (
334
- $run_id, $loop_id, $turn_id, $sequence, 'plurnk', $source,
335
- 'SEND', 'run', $pathname, '', 'text/plain', $rx, 'text/markdown', $status,
334
+ $worker_id, $loop_id, $turn_id, $sequence, 'plurnk', $source,
335
+ 'SEND', 'worker', $pathname, '', 'text/plain', $rx, 'text/markdown', $status,
336
336
  CASE WHEN $status >= 200 AND $status < 300 THEN 1 ELSE 0 END
337
337
  );
338
338
 
339
339
  -- PREP: engine_entry_tags
340
340
  SELECT tag FROM entry_tags WHERE entry_id = $entry_id ORDER BY tag;
341
341
 
342
- -- PREP: engine_child_runs_live
343
- -- The run's LIVE child runs — latest loop non-terminal (100 pending / 102 processing / 202 parked).
344
- -- Powers the Child Runs orienting section (§child-orientation): terse `* <status> run://<name>`
342
+ -- PREP: engine_child_workers_live
343
+ -- The worker's LIVE child workers — latest loop non-terminal (100 pending / 102 processing / 202 parked).
344
+ -- Powers the Child Runs orienting section (§child-orientation): terse `* <status> worker://<name>`
345
345
  -- pointers so the model SEES what it holds live and reasons for itself (READ/KILL), never told to.
346
346
  -- Empty → section omitted.
347
347
  SELECT r.name, l.status
348
- FROM runs r
349
- JOIN loops l ON l.id = (SELECT id FROM loops WHERE run_id = r.id ORDER BY sequence DESC, id DESC LIMIT 1)
350
- WHERE r.parent_run_id = $run_id AND l.status IN (100, 102, 202)
348
+ FROM workers r
349
+ JOIN loops l ON l.id = (SELECT id FROM loops WHERE worker_id = r.id ORDER BY sequence DESC, id DESC LIMIT 1)
350
+ WHERE r.parent_worker_id = $worker_id AND l.status IN (100, 102, 202)
351
351
  ORDER BY r.name;
352
352
 
353
353
  -- PREP: engine_child_streams_open
354
- -- The run's OPEN streams (subscriptions not yet closed) — their addressable coord. Powers the Child
354
+ -- The worker's OPEN streams (subscriptions not yet closed) — their addressable coord. Powers the Child
355
355
  -- Streams orienting section (§child-orientation): terse `* active <runtime>:///<coord>` pointers the
356
356
  -- model OPENs/READs/KILLs. Empty → section omitted.
357
357
  SELECT s.scheme, e.pathname
358
358
  FROM subscriptions s
359
359
  JOIN entries e ON e.id = s.entry_id
360
- WHERE s.run_id = $run_id AND s.closed_at IS NULL
360
+ WHERE s.worker_id = $worker_id AND s.closed_at IS NULL
361
361
  ORDER BY e.pathname;
362
362
 
363
363
  -- PREP: engine_render_telemetry_errors
@@ -388,11 +388,14 @@ ORDER BY t.sequence, le.sequence;
388
388
  -- landing when there is no room: one set-op folds the still-open rows of the newest turn
389
389
  -- boundary — the immediately-prior turn's emissions and the current turn's pre-model rows
390
390
  -- (foists, wake surfaces). Turn 1 is the same rule (no prior turn; its foists are the newest).
391
- -- Folded, never deleted; op='error' rows are EXEMPT (§grinder-errors-exempt), and so is the
391
+ -- Folded, never deleted; THREE exemptions (§grinder-errors-exempt): op='error' rows, the
392
392
  -- user PROMPT (#382 — the task frame the engine foisted is not the model's curatable memory;
393
- -- the engine never reclaims the definition of the task it set).
393
+ -- the engine never reclaims the definition of the task it set), and PLAN rows (#465, owner
394
+ -- ruling — the checklist is the model's orientation surface at exactly the moment the grinder
395
+ -- fires; plans are concise by rule, so exempting them reclaims almost nothing and preserves
396
+ -- the reasoning thread a recovery turn steers by).
394
397
  UPDATE log_entries SET expanded = 0
395
- WHERE loop_id = $loop_id AND expanded = 1 AND op != 'error'
398
+ WHERE loop_id = $loop_id AND expanded = 1 AND op NOT IN ('error', 'PLAN')
396
399
  AND NOT (COALESCE(scheme, '') = 'plurnk' AND COALESCE(pathname, '') LIKE '/prompt/%') -- NULL-safe: a model row's scheme is NULL
397
400
  AND (turn_id = $turn_id
398
401
  OR turn_id = (SELECT MAX(id) FROM turns WHERE loop_id = $loop_id AND id < $turn_id));
@@ -406,7 +409,7 @@ UPDATE log_entries SET expanded = 0 WHERE id = $id;
406
409
  -- PREP: engine_render_log
407
410
  -- Render-time log assembly (SPEC §packet packet.system.log).
408
411
  -- Yields log_entries for the whole RUN — the conversation's working
409
- -- memory carries across loops within a session's run, not just the
412
+ -- memory carries across loops within a workspace's run, not just the
410
413
  -- current loop. Coordinate is log:///<loop_seq>/<turn_seq>/<sequence>/<op>.
411
414
  -- Status 202 entries in state='proposed' are model-invisible until resolved.
412
415
  -- `expanded = 0` rows are FOLDED — listed but collapsed to their coordinate
@@ -415,7 +418,7 @@ SELECT
415
418
  l.sequence AS loop_seq,
416
419
  t.sequence AS turn_seq,
417
420
  le.sequence,
418
- -- le.origin is attribution, never a render filter; the run's actor — §actor-boundary-origin-not-filter §machine-processes-run-origin
421
+ -- le.origin is attribution, never a render filter; the worker's actor — §actor-boundary-origin-not-filter §machine-processes-worker-origin
419
422
  le.origin,
420
423
  le.op, le.suffix, le.signal,
421
424
  le.scheme, le.username, le.password,
@@ -427,13 +430,13 @@ SELECT
427
430
  FROM log_entries le
428
431
  JOIN turns t ON t.id = le.turn_id
429
432
  JOIN loops l ON l.id = le.loop_id
430
- -- WHERE renders exactly one run's log — §actor-boundary-isolation §machine-processes-run-is-its-log
433
+ -- WHERE renders exactly one worker's log — §actor-boundary-isolation §machine-processes-worker-is-its-log
431
434
  -- the AND NOT clauses keep proposed (202) rows hidden until resolved (§proposal-proposed-hidden),
432
435
  -- and SUCCESSFUL OPEN/FOLD render-directive rows out of the packet (#382 — recorded in the DB for
433
436
  -- forensics, suppressed from materialization so a curation receipt rents zero packet space; the
434
437
  -- successful fold that hid the task frame in run43 left NO trace, the database dig. A FAILED
435
438
  -- OPEN/FOLD still renders — errors are signals, §telemetry-uniform-error-channel).
436
- WHERE le.run_id = $run_id
439
+ WHERE le.worker_id = $worker_id
437
440
  AND NOT (le.status_rx = 202 AND le.state = 'proposed')
438
441
  AND NOT (le.op IN ('OPEN', 'FOLD') AND le.status_rx < 400)
439
442
  ORDER BY l.sequence, t.sequence, le.sequence;
@@ -444,14 +447,14 @@ ORDER BY l.sequence, t.sequence, le.sequence;
444
447
  -- triggers the proposal lifecycle (engine pauses dispatch; client resolves
445
448
  -- via loop/resolve RPC; entry transitions through engine_resolve_log_entry).
446
449
  INSERT INTO log_entries (
447
- run_id, loop_id, turn_id, sequence, origin, source,
450
+ worker_id, loop_id, turn_id, sequence, origin, source,
448
451
  op, suffix, signal,
449
452
  scheme, username, password, hostname, port,
450
453
  pathname, params, fragment, lineMarker,
451
454
  tx, mimetype_tx, rx, mimetype_rx, status_rx, tokens,
452
455
  state, outcome, attrs
453
456
  ) VALUES (
454
- $run_id, $loop_id, $turn_id, $sequence, $origin, $source,
457
+ $worker_id, $loop_id, $turn_id, $sequence, $origin, $source,
455
458
  $op, $suffix, $signal,
456
459
  $scheme, $username, $password, $hostname, $port,
457
460
  $pathname, $params, $fragment, $lineMarker,
@@ -505,21 +508,15 @@ UPDATE turns SET status = $status WHERE id = $id;
505
508
  -- model's first loop read as prompt/2/1 (the docs loop holds id 1). Owner: minor but annoying.
506
509
  SELECT sequence FROM loops WHERE id = $loop_id;
507
510
 
508
- -- PREP: engine_run_has_undelivered_child_term
509
- -- A child run whose loop TERMINATED after the current turn's timestamp — its deliverable
510
- -- (the §run-scheme collect delta) is queued for the NEXT packet build and has not been seen.
511
+ -- PREP: engine_worker_has_undelivered_child_term
512
+ -- A child worker whose loop TERMINATED after the current turn's timestamp — its deliverable
513
+ -- (the §worker-scheme collect delta) is queued for the NEXT packet build and has not been seen.
511
514
  -- The 1ms-wide fan-out race: workers concluding DURING the parent's generation are not "live"
512
515
  -- (the wait's J leg misses them) but their results are pending — concluding or ∅-collapsing
513
516
  -- over them silently discards deliverables the model spawned. {§send-undelivered-child-term}
514
517
  SELECT 1 AS pending FROM loops l
515
- JOIN runs r ON r.id = l.run_id
516
- WHERE r.parent_run_id = $run_id
518
+ JOIN workers r ON r.id = l.worker_id
519
+ WHERE r.parent_worker_id = $worker_id
517
520
  AND l.terminated_at IS NOT NULL
518
521
  AND l.terminated_at > (SELECT timestamp FROM turns WHERE id = $turn_id)
519
522
  LIMIT 1;
520
-
521
- -- PREP: search_stamp_entry_attributes
522
- -- §search-prefetch — chooser context (title/snippet/publishedDate) stamped onto a survivor
523
- -- entry's attributes at materialization; json_patch merges, never clobbers other keys.
524
- UPDATE entries SET attributes = json_patch(attributes, $patch)
525
- WHERE session_id = $session_id AND scheme = $scheme AND pathname = $pathname AND scope = 'session';
@@ -28,28 +28,28 @@ export default class PacketBuilder {
28
28
  telemetry: TelemetryChannel;
29
29
  executors: () => ExecutorRegistry | undefined;
30
30
  });
31
- decodeBudget(provider: Provider): number;
32
- promptBudgetFor(provider: Provider): number;
33
- ceilingFor(provider: Provider): number;
34
- buildRequestPacket({ initialMessages, requirements, sessionId, runId, loopId, currentTurnSeq, provider, gitStatus, telemetryErrors: presetTelemetry, }: {
31
+ maxTokensFor(provider: Provider): number | null;
32
+ promptBudgetFor(provider: Provider): number | null;
33
+ ceilingFor(provider: Provider): number | null;
34
+ buildRequestPacket({ initialMessages, requirements, workspaceId, workerId, loopId, currentTurnSeq, provider, gitStatus, telemetryErrors: presetTelemetry, }: {
35
35
  initialMessages: ChatMessage[];
36
36
  requirements: string;
37
37
  gitStatus: GitStatus | null;
38
- sessionId: number;
39
- runId: number;
38
+ workspaceId: number;
39
+ workerId: number;
40
40
  loopId: number;
41
41
  currentTurnSeq: number;
42
42
  provider: Provider;
43
43
  telemetryErrors?: object[];
44
44
  }): Promise<RequestPacket>;
45
- docEntries(sessionId: number): Promise<Array<{
45
+ docEntries(workspaceId: number): Promise<Array<{
46
46
  name: string;
47
47
  content: string;
48
48
  }>>;
49
- enforceBudget({ packet, provider, runId, loopId, turnId, mintSequence, rebuild }: {
49
+ enforceBudget({ packet, provider, workerId, loopId, turnId, mintSequence, rebuild }: {
50
50
  packet: RequestPacket;
51
51
  provider: Provider;
52
- runId: number;
52
+ workerId: number;
53
53
  loopId: number;
54
54
  turnId: number;
55
55
  mintSequence: number;
@@ -1 +1 @@
1
- {"version":3,"file":"PacketBuilder.d.ts","sourceRoot":"","sources":["../../src/core/PacketBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,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