@plurnk/plurnk-service 0.34.0 → 0.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/SPEC.md +51 -15
  2. package/dist/content/matcher.d.ts +1 -0
  3. package/dist/content/matcher.d.ts.map +1 -1
  4. package/dist/content/matcher.js +1 -1
  5. package/dist/content/matcher.js.map +1 -1
  6. package/dist/core/ChannelWrite.d.ts +1 -0
  7. package/dist/core/ChannelWrite.d.ts.map +1 -1
  8. package/dist/core/ChannelWrite.js.map +1 -1
  9. package/dist/core/Engine.d.ts +8 -2
  10. package/dist/core/Engine.d.ts.map +1 -1
  11. package/dist/core/Engine.js +99 -28
  12. package/dist/core/Engine.js.map +1 -1
  13. package/dist/core/ExecutorRegistry.d.ts +2 -0
  14. package/dist/core/ExecutorRegistry.d.ts.map +1 -1
  15. package/dist/core/ExecutorRegistry.js +1 -0
  16. package/dist/core/ExecutorRegistry.js.map +1 -1
  17. package/dist/core/SchemeRegistry.d.ts +4 -0
  18. package/dist/core/SchemeRegistry.d.ts.map +1 -1
  19. package/dist/core/SchemeRegistry.js +18 -1
  20. package/dist/core/SchemeRegistry.js.map +1 -1
  21. package/dist/core/fork.js +1 -1
  22. package/dist/core/fork.js.map +1 -1
  23. package/dist/core/git-membership.d.ts.map +1 -1
  24. package/dist/core/git-membership.js +44 -22
  25. package/dist/core/git-membership.js.map +1 -1
  26. package/dist/core/git-state.d.ts.map +1 -1
  27. package/dist/core/git-state.js +3 -1
  28. package/dist/core/git-state.js.map +1 -1
  29. package/dist/core/packet-wire.js +1 -1
  30. package/dist/core/packet-wire.js.map +1 -1
  31. package/dist/core/path-decode.d.ts +2 -0
  32. package/dist/core/path-decode.d.ts.map +1 -0
  33. package/dist/core/path-decode.js +8 -0
  34. package/dist/core/path-decode.js.map +1 -0
  35. package/dist/core/run-cap.d.ts +8 -0
  36. package/dist/core/run-cap.d.ts.map +1 -0
  37. package/dist/core/run-cap.js +20 -0
  38. package/dist/core/run-cap.js.map +1 -0
  39. package/dist/core/session-settings.d.ts +19 -0
  40. package/dist/core/session-settings.d.ts.map +1 -0
  41. package/dist/core/session-settings.js +44 -0
  42. package/dist/core/session-settings.js.map +1 -0
  43. package/dist/schemes/File.d.ts +2 -0
  44. package/dist/schemes/File.d.ts.map +1 -1
  45. package/dist/schemes/File.js +72 -11
  46. package/dist/schemes/File.js.map +1 -1
  47. package/dist/schemes/Log.js +7 -7
  48. package/dist/schemes/Log.js.map +1 -1
  49. package/dist/schemes/Run.d.ts.map +1 -1
  50. package/dist/schemes/Run.js +5 -1
  51. package/dist/schemes/Run.js.map +1 -1
  52. package/dist/schemes/_entry-find.d.ts +14 -3
  53. package/dist/schemes/_entry-find.d.ts.map +1 -1
  54. package/dist/schemes/_entry-find.js +59 -27
  55. package/dist/schemes/_entry-find.js.map +1 -1
  56. package/dist/schemes/_entry-graph.d.ts +6 -0
  57. package/dist/schemes/_entry-graph.d.ts.map +1 -1
  58. package/dist/schemes/_entry-graph.js +8 -0
  59. package/dist/schemes/_entry-graph.js.map +1 -1
  60. package/dist/schemes/_entry-manifest.d.ts.map +1 -1
  61. package/dist/schemes/_entry-manifest.js +13 -0
  62. package/dist/schemes/_entry-manifest.js.map +1 -1
  63. package/dist/schemes/_entry-ops.d.ts.map +1 -1
  64. package/dist/schemes/_entry-ops.js +4 -3
  65. package/dist/schemes/_entry-ops.js.map +1 -1
  66. package/dist/schemes/_entry-semantic.d.ts +5 -1
  67. package/dist/schemes/_entry-semantic.d.ts.map +1 -1
  68. package/dist/schemes/_entry-semantic.js +10 -8
  69. package/dist/schemes/_entry-semantic.js.map +1 -1
  70. package/dist/schemes/_entry-send.d.ts.map +1 -1
  71. package/dist/schemes/_entry-send.js +4 -3
  72. package/dist/schemes/_entry-send.js.map +1 -1
  73. package/dist/server/Daemon.d.ts.map +1 -1
  74. package/dist/server/Daemon.js +26 -1
  75. package/dist/server/Daemon.js.map +1 -1
  76. package/dist/server/envelope.d.ts +2 -0
  77. package/dist/server/envelope.d.ts.map +1 -1
  78. package/dist/server/envelope.js +8 -1
  79. package/dist/server/envelope.js.map +1 -1
  80. package/dist/server/methods/discover.d.ts.map +1 -1
  81. package/dist/server/methods/discover.js +6 -3
  82. package/dist/server/methods/discover.js.map +1 -1
  83. package/dist/server/methods/loop_run.d.ts.map +1 -1
  84. package/dist/server/methods/loop_run.js +14 -10
  85. package/dist/server/methods/loop_run.js.map +1 -1
  86. package/dist/server/methods/session_constraints.js +6 -6
  87. package/dist/server/methods/session_constraints.js.map +1 -1
  88. package/dist/server/methods/session_create.d.ts.map +1 -1
  89. package/dist/server/methods/session_create.js +55 -5
  90. package/dist/server/methods/session_create.js.map +1 -1
  91. package/dist/server/methods/session_prompts.d.ts +5 -0
  92. package/dist/server/methods/session_prompts.d.ts.map +1 -0
  93. package/dist/server/methods/session_prompts.js +29 -0
  94. package/dist/server/methods/session_prompts.js.map +1 -0
  95. package/dist/server/version-info.d.ts +14 -0
  96. package/dist/server/version-info.d.ts.map +1 -0
  97. package/dist/server/version-info.js +69 -0
  98. package/dist/server/version-info.js.map +1 -0
  99. package/dist/server/yolo.d.ts.map +1 -1
  100. package/dist/server/yolo.js +8 -0
  101. package/dist/server/yolo.js.map +1 -1
  102. package/migrations/0000-00-00.01_schema.sql +29 -8
  103. package/package.json +22 -22
package/SPEC.md CHANGED
@@ -152,13 +152,13 @@ Server posture: this package is the runtime. User-facing CLI lives in `plurnk` a
152
152
 
153
153
  **Question.** §actor-boundary isolates runs and lets the runtime self-host, but it stands on an ownership model it never states: what does a *session* own versus a *run*; what is shared versus private; and what does a fork carry? Unstated, the downstream questions — which run `log.read` reads, what a fork copies, where a per-client window onto the workspace would live — grow subtle, then metastasize. Drawn once, they vanish.
154
154
 
155
- **Decision — the session is the world; a run is a log on it.** A **session** is the world: one shared filesystem — the `session`-scoped entries, surfaced as `plurnk:///manifest.json` (§packet) — under one membership overlay (§membership). Exactly one filesystem and one overlay per session; neither is per-run. A **run** is a process whose entire private memory is its **log** (§lifecycle-terms) — its loops, turns, and rows, each row carrying its own content, attribution (`origin`/`source`, §env-delta), and fold-state (`indexed`). A run owns **no entries** and **no membership**; even its visibility is not a possession but a bit on its own rows. It is a *history over the shared world, not a world*.
155
+ **Decision — the session is the world; a run is a log on it.** A **session** is the world: one shared filesystem — the `session`-scoped entries, surfaced as `plurnk:///manifest.json` (§packet) — under one membership overlay (§membership). Exactly one filesystem and one overlay per session; neither is per-run. A **run** is a process whose entire private memory is its **log** (§lifecycle-terms) — its loops, turns, and rows, each row carrying its own content, attribution (`origin`/`source`, §env-delta), and fold-state (`expanded`). A run owns **no entries** and **no membership**; even its visibility is not a possession but a bit on its own rows. It is a *history over the shared world, not a world*.
156
156
 
157
157
  **One filesystem.** The entries are the session's: `entries.session_id`, never a run. A write by any run is a write to the one filesystem every run reads; there is no per-run entry set. {§machine-processes-one-filesystem}
158
158
 
159
159
  **One overlay.** Membership — `git ls-files ∪ add − ignore` with read-only (§membership) — is the session's: `session_constraints.session_id`, never a run. It is workspace *curation*, and the workspace *is* the session; two runs are two conversations about one curated workspace and see the same one. Divergent membership is a different session, never a per-run overlay. {§machine-processes-one-overlay}
160
160
 
161
- **A run is its log — and nothing beside.** The run-private state is the log and only the log. *What I am looking at* (OPEN/FOLD) is `log_entries.indexed`, a bit on the run's own rows, toggled by ordinary `log:///` ops — not a second store, and never membership (§open-fold). *What I last saw* needs no shadow either: a run learns its world moved through log entries (§env-delta) — a sibling's write broadcast into its log, an out-of-band disk change detected against the entry's own content and broadcast the same way — never through a per-run snapshot the run cannot see. The log is the whole of a run's memory. {§machine-processes-run-is-its-log}
161
+ **A run is its log — and nothing beside.** The run-private state is the log and only the log. *What I am looking at* (OPEN/FOLD) is `log_entries.expanded`, a bit on the run's own rows, toggled by ordinary `log:///` ops — not a second store, and never membership (§open-fold). *What I last saw* needs no shadow either: a run learns its world moved through log entries (§env-delta) — a sibling's write broadcast into its log, an out-of-band disk change detected against the entry's own content and broadcast the same way — never through a per-run snapshot the run cannot see. The log is the whole of a run's memory. {§machine-processes-run-is-its-log}
162
162
 
163
163
  **A run's log is private to packets, not to the session.** Isolation (§actor-boundary) governs what an *actor* sees — its own run, never a sibling's. It does not wall off the *wire*: any connection may read any run's log in its session by id — `log.read({ runId })`, ownership-verified, defaulting to the connection's own run. This is how a conversation client reads the **model** run, where the conversation lives: `loop.run` returns its `modelRunId`, and `session.runs` enumerates a session's runs for a connection that did not drive it live. The read is observation, never packet membership — no actor sees it. {§machine-processes-model-run-readable}
164
164
 
@@ -172,7 +172,7 @@ Server posture: this package is the runtime. User-facing CLI lives in `plurnk` a
172
172
 
173
173
  **Migration path.** Mostly stating what the schema already carries: `runs.parent_run_id` and the parentless `sessions` exist (§lifecycle-terms); `session_constraints` is session-level (§membership); §env-delta already makes a run's timeline self-contained, so a fork's log copy suffices. Additive: `run.fork` over the wire (the engine fork is built). Two repatriations: §actor-boundary's "read-only overlay scopes a run's writable surface" becomes a *session* policy bounding every run uniformly; and the §env-delta environment door has shed its per-run snapshot — a run's only memory is its log, so drift is pulled from the shared log (other actors' edits since the run's last turn) and the filesystem narrates its own through the `plurnk` run, both already log entries, never a per-run shadow.
174
174
 
175
- ### §run-scheme The run:// scheme — spawn, irc, fork
175
+ ### §run-scheme The run:// scheme — spawn, irc, fork, terminate, cap, collect
176
176
 
177
177
  The run:// scheme makes §machine-processes addressable: a `run://` target is a sister run in the session — `run:///.` the current run, `run:///<name>` a session-scoped sibling (`runs.name`). Same-session only; a run never addresses another session's runs (§actor-boundary). Three ops, fire-and-forget — the child runs independently, lineage in `runs.parent_run_id`:
178
178
 
@@ -182,6 +182,12 @@ The run:// scheme makes §machine-processes addressable: a `run://` target is a
182
182
 
183
183
  All three ride one engine seam — the daemon's inject (active→fold, idle→enqueue+drain) — so the handler creates/branches/resolves the run and hands off; the daemon owns provider + system prompt. COPY's body here is the fork's seed prompt, not a destination path: the engine routes a run:// source away from the entry-copy path before parsing the body.
184
184
 
185
+ Beyond the three creation ops:
186
+
187
+ - **Terminate** — `KILL(run:///<name>)` aborts a run by address (self when `.`): its active loop closes 499 and its subscriptions tear down; a name with no run is 404. The override to the fire-and-forget default — not a parent-power, whoever holds the address may end it; a run left alone simply ends at its own `SEND[200]`. {§run-scheme-terminate}
188
+ - **Cap** — `PLURNK_SESSION_RUNS_MAX_ACTIVE` ceilings the *concurrent* active runs per session (a run with a non-terminal loop); a spawn or fork past it fails hard (508 — no queue, no retry), irc exempt; `-1` disables it. The fork-bomb brake, sized for sessions that live for months. {§run-scheme-cap}
189
+ - **Collect** — a run's loop reaching a terminal status surfaces to its sisters as an ambient FOLDED delta (§env-delta): a `SEND` from `run:///<name>` carrying the loop's deliverable — the `SEND[200]` body, or for an abandonment the reason. Every death-path is stamped uniformly, so no termination is silent; collection is the shared world moving, never a verb. {§run-scheme-collect}
190
+
185
191
  ---
186
192
 
187
193
  ## §provider Provider Contract
@@ -345,7 +351,7 @@ No mimetype handlers ship in-tree. Framework + every handler are siblings.
345
351
 
346
352
  plurnk-service is mimetype-illiterate. Engine hands channel content + mimetype label to `Mimetypes.process({content, hint})`; the manifest build uses `result.totalLines` for each channel's `lines`. Content reaches the model on READ, not as a rendered preview.
347
353
 
348
- **Required dependencies** (hard deps in `package.json`):
354
+ **Required handlers** (boot-critical, provided via the framework):
349
355
 
350
356
  | Package | Mimetype | Why required |
351
357
  |---|---|---|
@@ -353,7 +359,7 @@ plurnk-service is mimetype-illiterate. Engine hands channel content + mimetype l
353
359
  | `@plurnk/plurnk-mimetypes-text-plain` | `text/plain` | Canonical EXEC stdout/stderr channel mimetype. |
354
360
  | `@plurnk/plurnk-mimetypes-application-json` | `application/json`, `application/jsonc` | Service emits json for `log_entries` rx/tx, telemetry, packet serialization. |
355
361
 
356
- Everything else is opt-in; framework's `discover()` picks up installed packages automatically.
362
+ These ride in via the framework — `@plurnk/plurnk-mimetypes` pins the core set (markdown / plain / json / xml / csv / html) as its own dependencies, so the service's exact-pin on the framework pins them transitively rather than redeclaring each. Boot relies on them (markdown is the `defaultMimetype`); their loss would be a framework-contract break. Everything else is opt-in; framework's `discover()` picks up installed packages automatically.
357
363
 
358
364
  **Tokenize injection.** Daemon constructs `Mimetypes` with a `tokenize` lambda capturing the active provider's `countTokens`:
359
365
 
@@ -466,6 +472,8 @@ AST: `{ op: "EDIT", target, body: string | null, signal: tags | null, lineMarker
466
472
  - A write that changes nothing — identical content and no new tag — returns `{ status: 304, entryId }`, mirroring OPEN/FOLD's no-op (§open-fold). {§edit-noop-304}
467
473
  - Tags from `signal[]` apply additively via `entry_tags` (scheme may vary). {§edit-tags-additive}
468
474
 
475
+ A `file:///` member EDIT diverges from this immediate-write contract: it diffs against the entry snapshot (the body channel, never a fresh disk read) and **proposes** (202) a disk write that lands via a compare-and-swap on accept. See §membership-edit-write-cas and the proposal lifecycle §proposal.
476
+
469
477
  ### §read READ
470
478
 
471
479
  AST: `{ op: "READ", target, body: MatcherBody | null, signal: tags | null, lineMarker? }`.
@@ -511,7 +519,7 @@ AST: `{ op: "FIND", target (scope), body: MatcherBody | null (predicate), signal
511
519
  - `body` matcher operates on entry content (glob/regex/jsonpath/xpath), per grammar plurnk.md §"Body matcher dispatch"; the path-glob lives in the (target), not the body. {§find-glob-filter-on-content}
512
520
  - `signal` is a tag filter; entries match if they have ALL listed tags. {§find-tag-filter-and-semantics}
513
521
  - Session + scheme scoped — no cross-session/cross-scheme leakage. {§find-scoped-isolation}
514
- - Returns `{ status: 200, results: string }` (newline-separated matching paths, `text/plain`).
522
+ - Returns `FindResult { status, content, mimetype, results: Finding[] }`. A **finding** is its enclosing structural unit, not a bare path: `Finding { path, extent: {first,last}|null, symbol?, content? }` — `extent` is the `<L>` line span (a whole-entry finding is `null`), `symbol` names the unit when known. `content` renders the findings as usable addresses, one per line — `path<extent> (symbol)`, e.g. `known:///auth.ts<10,25> (login)`, or the bare path when `extent` is null (`text/plain`); the model READs an address to pull that region into its log. Extent resolution is per dialect: a content match (glob/regex/jsonpath/xpath) resolves each hit line to its smallest enclosing `symbol_defs` row (the bare line when none covers it); `~`semantic carries the best-matching chunk's span; `@`graph and a body-less FIND yield whole-entry findings. {§find-result-findings}
515
523
 
516
524
  ### §send SEND
517
525
 
@@ -548,7 +556,7 @@ A side-effecting op does not execute on dispatch — it **proposes**. The scheme
548
556
 
549
557
  | decision | state | `status_rx` | default outcome | effect |
550
558
  |---|---|---|---|---|
551
- | accept | `resolved` | 200 | — | runs the scheme's **`applyResolution`** — the real side effect (disk write, exec spawn). {§proposal-accept-applies} A failing apply (≥400) downgrades to reject (outcome `apply_failed`). |
559
+ | accept | `resolved` | 200 | — | runs the scheme's **`applyResolution`** — the real side effect (disk write, exec spawn). {§proposal-accept-applies} A failing apply (≥400) downgrades to reject, carrying the apply's own outcome — e.g. a member EDIT's `write_conflict` from its write-back compare-and-swap (§membership-edit-write-cas) — or `apply_failed` when it names none. |
552
560
  | reject | `failed` | 400 | `rejected` | none — the action did not occur. {§proposal-reject-fails} |
553
561
  | cancel | `cancelled` | 499 | `loop_aborted` | none — the loop is abandoning. {§proposal-cancel-aborts} |
554
562
 
@@ -568,7 +576,7 @@ READ on a streaming scheme is a subscription, not a one-shot. Scheme opens the c
568
576
 
569
577
  Subscription registry is plurnk-service runtime state (its own SQLite table). Exists ONLY for cancellation routing. Channel state (§channel-state) + log entries (§no-chunk-rows) carry lifecycle.
570
578
 
571
- FOLD/OPEN toggles `log_entries.indexed` (§open-fold) — a per-run render bit, never the subscription registry. FOLDing a streaming entry's log row collapses its body out of the packet but leaves the live stream running: curation is render-only, never cancellation. {§subscriptions-fold-keeps-subscription}
579
+ FOLD/OPEN toggles `log_entries.expanded` (§open-fold) — a per-run render bit, never the subscription registry. FOLDing a streaming entry's log row collapses its body out of the packet but leaves the live stream running: curation is render-only, never cancellation. {§subscriptions-fold-keeps-subscription}
572
580
 
573
581
  ### §chunk-accumulation Chunk accumulation
574
582
 
@@ -739,6 +747,16 @@ Model selection: separate alias cascade in `ProviderRegistry` (§provider-instan
739
747
 
740
748
  Enforcement is per-use-site — no central most-restrictive pass; each ceiling is checked where it bites. `PLURNK_MAX_TURNS` ships **off** (`-1` = no cap; the loop ends via SEND, budget, strikes, or cycle detection) and, when an operator sets a positive value, the per-call request is `min()`-capped against it. {§operator-config-max-turns-ceiling}
741
749
 
750
+ **Client open-context (per session).** `session.create({settings})` carries per-session overrides, persisted on `sessions.settings` and composed against env at each knob's read-site. Two families, kept distinct so neither semantic leaks into the other; operator-arcane knobs stay env-only — this is the narrow client surface.
751
+
752
+ *Defaults — explicit-wins (the client replaces/merges freely):*
753
+ - `settings.manifestItems` (number) **replaces** `PLURNK_MANIFEST_ITEMS` for the session: a one-shot opens clean (`0`), a workspace full (`-1`) or capped (`N`). A single scalar — the client value wins outright. {§operator-config-session-manifest-items}
754
+ - `settings.mdDocs` (`[{alias, content}]`) **unions** with the server's `PLURNK_MD_*` docs, keyed by alias — a client adds its own repo docs atop the operator's systemwide policy doc. On alias collision the client wins (a deliberate shadow), but by default the policy doc rides into every session. The client sends content (it owns the file), not a path. {§operator-config-session-md-docs}
755
+
756
+ *Ceilings — most-restrictive-wins (the client may only narrow, never widen):*
757
+ - `settings.maxCommands` (number) **min()s** the `PLURNK_MAX_COMMANDS` per-emission cap for the session — a client tightens the runaway-op guard, never raises it past the operator's. {§operator-config-session-max-commands}
758
+ - `settings.git` (`false`) **denies** git for the session (`PLURNK_GIT_ALLOWED` AND session) — the client opts its session out of git membership + telemetry; it can never re-enable git past the operator's service-wide lockout. {§operator-config-session-git}
759
+
742
760
  Feature-flag bools use `process.env.X === "1"` exactly — never `=== "true"`.
743
761
 
744
762
  External plugins declare their own env vars in their own `.env.example`; service merges at boot via the cascade.
@@ -807,12 +825,18 @@ registry.register("loop.run", {
807
825
  "providers": [...],
808
826
  "schemes": [...],
809
827
  "mimetypes": [...]
828
+ },
829
+ "versions": {
830
+ "service": { "installed": "0.34.0", "latest": "0.35.0" },
831
+ "client": { "latest": "0.15.0" }
810
832
  }
811
833
  }
812
834
  ```
813
835
 
814
836
  `capabilities` lists registered plug-ins by `(kind, name)`. Cold clients call `discover` first. No hardcoded method names or capability lists in any client. {§discovery-discover}
815
837
 
838
+ `versions` rides the same round-trip so a client shows update status without per-invocation registry IO: `{ service: { installed, latest? }, client: { latest? } }`. `service.installed` is the daemon's own `package.json` version (honest self-report); `latest` is a **cached, best-effort** npm-registry poll (TTL `PLURNK_VERSION_POLL_TTL`) for the service (`@plurnk/plurnk-service`) and client (`@plurnk/plurnk`) packages — offline or registry-down omits `latest`, and the poll never blocks or fails `discover`. The client owns reading its own installed version and the semver compare. {§discovery-versions}
839
+
816
840
  ### §methods Core method set
817
841
 
818
842
  **Liveness + introspection**
@@ -826,10 +850,11 @@ registry.register("loop.run", {
826
850
 
827
851
  | Method | Params | Result | Notes |
828
852
  |------------------------|---------------------|-------------------|-------|
829
- | `session.create` | `name?: string`, `projectRoot?: string` | `{ id, name, runId, runName, projectRoot }` | Creates new session + its first run; auto-name if unprovided. Returns the auto-created run's identity so clients skip the pending-dance ({§methods-session-create}). Optional `projectRoot` pins the workspace (null/omitted = headless). |
853
+ | `session.create` | `name?: string`, `projectRoot?: string`, `settings?: object` | `{ id, name, runId, runName, projectRoot }` | Creates new session + its first run; auto-name if unprovided. Returns the auto-created run's identity so clients skip the pending-dance ({§methods-session-create}). Optional `projectRoot` pins the workspace (null/omitted = headless); optional `settings` carries per-session open-context overrides (§operator-config). |
830
854
  | `session.list` | none | `{ sessions: Session[] }` | Lists all sessions. |
831
855
  | `session.attach` | `id: number`, `runId?: number`, `runName?: string` | `{ id, name, runId, runName }` | Binds this connection to an existing session. Optional `runId` resumes that specific run (must belong to the session). Optional `runName` reuses-or-creates by name within the session. Both omitted → new auto-named run. {§methods-session-attach} |
832
856
  | `session.runs` | `id?: number` | `{ runs: Run[] }` | Lists runs in a session (defaults to attached session); most-recent first. |
857
+ | `session.prompts` | `id?: number`, `limit?: number` | `{ prompts: string[] }` | A session's prior user prompts (the conversation run's loop seeds), newest-first, capped by `limit` (default 100); defaults to attached session. Lets a client seed up/down recall without log archaeology. |
833
858
  | `session.set_root` | `projectRoot: string \| null` | `{ projectRoot }` | Update the workspace pointer on the attached session. Null reverts to headless. |
834
859
  | `session.constrain` | `effect: "add" \| "ignore" \| "read-only"`, `glob: string` | `{ effect, glob }` | Add a workspace membership constraint (§membership overlay): `add` admits files git misses, `ignore` drops tracked matches, `read-only` admits for read but refuses edits. Immediate. |
835
860
  | `session.unconstrain` | `effect: "add" \| "ignore" \| "read-only"`, `glob: string` | `{ effect, glob }` | Remove a membership constraint — the inverse of `session.constrain`. Immediate. |
@@ -1022,18 +1047,27 @@ Each entry: question, answer, rationale, migration path.
1022
1047
  **git is the substrate.** {§membership-git-membership} git-tracked files (`git ls-files`) are members with no explicit overlay — channel-less markers, disk is truth. git absent → no fs-walk (non-git/headless get no substrate membership); `pick` is then the sole source.
1023
1048
 
1024
1049
  **Membership is a declared forest of repos.** {§membership-forest} A workspace is not one git repo but a **forest**: membership is the union, over a session-declared set of repos, of each repo's `ls-files` (gitlinks/mode-160000 filtered), each path-prefixed by the repo's path relative to `project_root`. The root need not itself be a repo — a non-git parent of ninety repos resolves to all ninety. A worktree, a submodule, a buried repo are not special cases: each is just another declared repo, resolved `rev-parse --show-toplevel` → `ls-files` in the tree it points at.
1025
- - **Membership-gated edits.** {§membership-edit-membership-gate} EDIT is bounded by membership exactly as READ is. An existing **member** is read from disk before diffing, so its baseline is real content, never empty silent overwrite is structurally prevented. An existing **non-member** is refused (403) *before* any read or write: the model never reads a file it can't see (no leak into the proposal) and never overwrites one (no wiping a gitignored `.env` it never added). A **new path** stays open — proposal→accept adds it to the manifest. Reaching past membership is `EXEC[sh]`'s job, not the file scheme's.
1050
+ - **Membership-gated edits.** {§membership-edit-membership-gate} EDIT is bounded by membership exactly as READ is. An existing **member**'s baseline is its entry snapshot the body channel the model READ, not a fresh disk read — so the diff is naive against the view the model saw, never empty (the write-side CAS, §membership-edit-write-cas, prevents the silent overwrite of out-of-band drift). An existing **non-member** is refused (403) *before* any read or write: the model never reads a file it can't see (no leak into the proposal) and never overwrites one (no wiping a gitignored `.env` it never added). A **new path** stays open — proposal→accept adds it to the manifest. Reaching past membership is `EXEC[sh]`'s job, not the file scheme's.
1026
1051
 
1027
1052
  **The overlay — `pick | view | hide | repo`, removed by `drop`.** A `session_constraints` table (effect ∈ {pick, view, hide, repo}, target) is the client's supersede over git; `drop` removes any declaration. Resolved membership is `(⋃ repo ls-files ∪ pick) − hide`, with `view` enforced at the edit gate.
1028
- - **`repo`** {§membership-overlay-repo} — declare a git repo (a folder); its `ls-files` join membership, path-prefixed. Submodules/nested repos are separate `repo` declarations — no recursion; the client owns the scan and the security call.
1053
+ - **`repo`** {§membership-overlay-repo} — declare a git repo (a folder) ANYWHERE — under the project root or outside it. Its `ls-files` (+ untracked-non-ignored, §membership-auto-add) join membership, addressed **relative to the project root** always — a clean path when the repo is under it, a `..`-prefixed one when it's outside (the universal `join(root, pathname)` disk-resolver collapses it back to disk; an absolute key would nest under root and never materialize). `project_root` carries no boundary, it is only the relative-address base. Submodules/nested repos are separate `repo` declarations — no recursion; the client owns the scan and the trust call.
1054
+ - **Auto-add** {§membership-auto-add} — a declared repo's membership is its tracked `ls-files` PLUS its untracked-but-not-ignored files (`git ls-files --others --exclude-standard`), 'git' origin. A model-created file is a member the moment it exists — no `git add` — while `.gitignore` still filters it, and deleting it un-registers it like any git member. The model's new files surface in the catalog and the EMI without a distinct "add" op.
1029
1055
  - **`pick`** {§membership-overlay-pick} — admit an untracked file git misses: a targeted client-dictated `node:fs` glob scan over untracked matches (files only), 'constraint' origin, reconciled like git members. Enumerated, so the manifest stays exhaustive. git-absent, `pick` is the *sole* membership source.
1030
1056
  - **`hide`** {§membership-overlay-hide} — exclude a tracked file: resolution drops matches (`node:path.matchesGlob`) and reconciles so the entry set *equals* the member set. The lever to exclude a committed-but-sensitive tracked file; `entries.membership_origin` keeps reconciliation off model-created members.
1031
1057
  - **`view`** {§membership-overlay-view} — keep a member readable but refuse `File.edit`, 403'd at the membership check before any diff. (Admitting an untracked file as `view` rides on `pick`'s scan.)
1032
1058
 
1059
+ **File ops act on the entry, not the disk; the two reconcile only at gates.** A `file:///` member is a row whose body channel holds the *materialized snapshot* of its disk content. READ returns that channel; EDIT diffs against it — neither reaches the filesystem directly. Entry and disk reconcile at exactly two gates: the **pre-turn materialize** (disk → entry, below) and the **accept-time write-back** (entry → disk, §proposal). Between the gates the entry is the truth the model curates against, and `synced_sig` — the member's last-synced disk stat (`mtime:size`) — is the version token both gates compare on.
1060
+
1033
1061
  **Sync is idempotent and change-gated.** {§membership-change-gated-sync} Per turn, membership materializes every member's disk content into its entry — but the *work* is gated on a cheap per-member change-detect: a member unchanged on disk since its last sync is not re-read, re-tokenized, or rewritten. **Coverage is exhaustive — every member is detected every turn — but work is proportional to change**, so a ninety-repo forest costs detection, not a full re-read. Invariant: after a pass every member's entry equals its disk content; a no-change pass is a no-op.
1034
1062
 
1035
1063
  **EMI divergence signal.** {§membership-emi-divergence-signal} The detector that gates the work *is* the one that fires this — one mechanism, not a second full read. When the change-detect finds a member moved out-of-band, the delta detector (§env-delta) surfaces it as a system `EDIT` log row naming the file, `source="file"` — the model sees what changed without diffing the manifest against memory. The model's own edits are write-through (the entry equals disk after a File write), so the scan never mis-attributes them as external divergence.
1036
1064
 
1065
+ **The write-back is a compare-and-swap — never a clobber, never a clever merge.** {§membership-edit-write-cas} EDIT is *naive against the snapshot*: it diffs the model's change onto the entry's body channel — the exact bytes the model READ — and the proposal carries the `synced_sig` that snapshot was taken at. At accept, `applyResolution` re-stats disk and lands the proposed content only if that signature still matches. If disk moved out-of-band in the propose→accept window — a sibling run, the user's editor, a build step — the write is **refused** with a `write_conflict` and **nothing is written**. The engine neither blind-writes over the ambient change (a *clobber*) nor silently re-diffs the model's edit against a state it never saw (getting *clever*) — both would bury a stale-view contract violation under a fallback. The conflict surfaces instead: a ≥400 apply downgrades to a reject (§proposal), so the model sees the EDIT **did not occur** (400; the `write_conflict` outcome is forensics-only), the next reconcile narrates the real disk content as a `source=file` divergence (§membership-emi-divergence-signal), and the model re-reads and re-proposes against the fresh snapshot.
1066
+
1067
+ The version travels *with the proposal*, never re-read from the entry at accept: a sibling run in the same session may reconcile while this proposal sits paused, advancing the entry's `synced_sig` to the drifted disk — comparing against the *current* entry sig would wave that clobber through, so the comparison is always against the sig the proposal was computed at. A proposal that assumed an **absent** path (a create) conflicts only if a file has since appeared; a member with **no recorded snapshot** (an un-materialized entry, null `synced_sig`) has no baseline to guard and writes through — the two are told apart by the proposal's `existed` flag, not by a null sig alone. On a clean landing the entry refreshes to the written content and `synced_sig` is **restamped** to it, so the next reconcile recognizes the model's own write (not an external divergence) and a second same-turn edit bases on the landed bytes, not a stale sig. This is the write-side twin of the read-side change-gate (§membership-change-gated-sync): one `synced_sig`, gating both the re-read and the write.
1068
+
1069
+ The CAS is the **hard backstop**, at the moment of writing, on every accept path. It composes with — and is distinct from — the YOLO-only `staleClobberRisk` guard (§dual-yolo-stale-clobber-reject): that guard refuses to *auto-accept* an edit whose target already diverged earlier this turn (the read→propose window, server-YOLO path only); the CAS refuses to *write* against a snapshot disk has left (the propose→write window, every path). Together they bracket the full read→write span.
1070
+
1037
1071
  **Permission flags.** {§membership-git-flags} `PLURNK_GIT_ALLOWED` is the hard ceiling: `=0` denies all git membership service-wide, un-re-enableable — the sandbox/benchmark lockout. `PLURNK_GIT_AUTO` is the default declaration: `=1` (default) declares an implicit `repo` at `project_root` (no-op if it isn't a git tree); `=0` declares nothing — service/clients `repo`-declare explicitly. `ALLOWED` gates `AUTO`.
1038
1072
 
1039
1073
  **Rationale.** Session is the right scope unit; membership *is* the curation, outsourced and tiered: git bounds it by tracking, the client supersedes by overlay, the model curates its own render by READ/FOLD — the engine curates nothing. The forest falls out of "session = world": one workspace can be many repos, so membership is their union, declared not guessed (the scan and its security are the client's). Exhaustiveness is a property of *coverage*, not *work*: every member is checked every turn so no drift hides, but unchanged members cost only a detect — the full-repo cost is git's to bound (what it tracks) and the client's to bound (`hide`), never the engine's to pay re-reading what hasn't moved.
@@ -1046,7 +1080,7 @@ Each entry: question, answer, rationale, migration path.
1046
1080
 
1047
1081
  **Decision — a pre-LLM grinder, fired only on actual overflow.** In `Engine.runTurn`, after the packet is assembled (`#buildRequestPacket`) and before `provider.generate`, the assembled render-weight (§tokenomics) is measured against the ceiling. At or under → the packet ships untouched; the grinder never trims speculatively or "helpfully." {§grinder-overflow-only} On overflow it reverts the prior turn, then hard-stops if that isn't enough:
1048
1082
 
1049
- - **Prior-turn rollback.** The immediately-prior turn's log entries — the latest emissions, the ones that pushed the packet over — are folded (`indexed=0`, the same flag the model's own FOLD uses); the prior turn fit by induction, so reverting it usually lands back under. Folded, not deleted: rows and bodies persist and are re-OPENable, so log *history* is preserved while the render collapses to coordinates. {§grinder-layer1-rollback}
1083
+ - **Prior-turn rollback.** The immediately-prior turn's log entries — the latest emissions, the ones that pushed the packet over — are folded (`expanded=0`, the same flag the model's own FOLD uses); the prior turn fit by induction, so reverting it usually lands back under. Folded, not deleted: rows and bodies persist and are re-OPENable, so log *history* is preserved while the render collapses to coordinates. {§grinder-layer1-rollback}
1050
1084
  - **Hard stop.** If the packet still overflows after the prior-turn rollback, the loop abandons at 499 (`engine_loop_cancel`) — the path `maxTurns` and the strike threshold already use. No further passes. {§grinder-hard-413-abort}
1051
1085
 
1052
1086
  **Strike coupling.** A grinder fire bumps the engine's `turnErrors` — the same internal counter cycle detection feeds — so an overflow counts toward the strike streak that ends a runaway loop at 499. This is the pressure that keeps self-curation the path of least resistance. {§grinder-strike-coupling} **Turn 0/1 is exempt:** the first turn's overflow precedes any model action — it's the environment, not the model — so it never strikes. {§grinder-soft-turn-0-1}
@@ -1063,7 +1097,7 @@ Each entry: question, answer, rationale, migration path.
1063
1097
 
1064
1098
  **Decision — pull from the shared log; no snapshot.** Every edit is *already* a span-carrying `log_entries` row (§edit-result-render), so a run needs no stored state of its own: at pre-turn it surfaces *other actors'* EDITs on shared entries **since its own last turn** (`log_entries.at` past the run's most recent prior `turns.timestamp` — both already in the log) and materializes each as a **folded** `EDIT` in its log, reusing the originating row's span and cause. "Since I last looked" is a fact about the run's own turns, never a snapshot it cannot see (§machine-processes). The set is **exhaustive and unranked** — every change, no relevance order — but **not content-free**: the edited region of a change that *happened* is a faithful record, not the index regrowing. Volume is FOLD's to manage (deltas land folded) and the grinder's under budget — never the engine's to manage by gutting the payload.
1065
1099
 
1066
- **Form — a folded log entry, `origin=plurnk`, carrying `source`.** A delta is a `log_entries` row: an **`EDIT`** ("an EDIT happened to X"), `origin=plurnk`, **`indexed=0`** (folded — listed, collapsed to its coordinate until the model OPENs it), carrying the **`source`** column (the cause). A log entry, not a transient frame section, because a run's timeline must be **self-contained** — a forked run carries everything it observed (§machine-processes). `source` renders as `run="<id>"` / `run="file"` in the meta line, **omitted when the cause is the owning run itself** — a third attribution axis, distinct from `run_id` (whose log owns the row) and `origin` (the actor *type*).
1100
+ **Form — a folded log entry, `origin=plurnk`, carrying `source`.** A delta is a `log_entries` row: an **`EDIT`** ("an EDIT happened to X"), `origin=plurnk`, **`expanded=0`** (folded — listed, collapsed to its coordinate until the model OPENs it), carrying the **`source`** column (the cause). A log entry, not a transient frame section, because a run's timeline must be **self-contained** — a forked run carries everything it observed (§machine-processes). `source` renders as `run="<id>"` / `run="file"` in the meta line, **omitted when the cause is the owning run itself** — a third attribution axis, distinct from `run_id` (whose log owns the row) and `origin` (the actor *type*).
1067
1101
 
1068
1102
  **The filesystem is an actor — the `plurnk` run.** A real cross-run edit is a *faithful record*: the sibling issued the op, `source=<run id>`. An out-of-band disk change is a *fiction*: no op happened, but `EDIT` is the only grammar the model has for "your world changed," so the engine narrates the drift as a `source=file` EDIT to keep the model's perspective aligned with what its own tooling would show. It has no real author, so the reserved **`plurnk` run** (§actor-boundary) narrates it — at pre-turn it compares each member file to its entry (the §membership EMI re-read) and logs a `source=file` alignment EDIT for any divergence. Every run pulls that through the one delta path, exactly like a sibling's edit; the fs needs no special case.
1069
1103
 
@@ -1096,6 +1130,8 @@ Each entry: question, answer, rationale, migration path.
1096
1130
 
1097
1131
  **The notification carries the flag.** `loop/proposal` carries `flags` (§notifications), `yolo` among them, so a client attached to a *server*-YOLO loop can suppress its review UI — those proposals resolve in-process before any human could react, and rendering a doomed review prompt is noise. {§dual-yolo-proposal-carries-flags}
1098
1132
 
1133
+ **Server-YOLO is not blind — it refuses a stale clobber.** Auto-accept is not accept-everything: when an EDIT's target diverged on disk *this turn* — a `source=file` env-delta landed in the run's log since the model's prior turn — the model's EDIT is based on a stale read, and accepting it would silently overwrite the ambient change. The engine flags such a proposal `staleClobberRisk`, and the server-YOLO listener **rejects** it (the reject's outcome is forensics-only, never in the model's rx) rather than accepting; the model sees an ordinary reject and can re-READ the current content and retry. The guard is the engine's, on the auto-accept path it owns — it brackets the read→propose window (server-YOLO only), while the write-back compare-and-swap (§membership-edit-write-cas) brackets the propose→write window on every accept path. {§dual-yolo-stale-clobber-reject}
1134
+
1099
1135
  **Why two.** They answer different questions. Server-side asks *"is a human in the loop at all?"* — and when the answer is no, dispatch must not block on a `loop.resolve` that will never come. Client-side asks *"does this human want to review each one?"* — a presentation choice that leaves the protocol untouched. Collapsing them would either force a client onto every headless run or leak an interactive preference into the engine's dispatch path. They are orthogonal by construction: the engine gate and the human gate, each bypassable on its own terms.
1100
1136
 
1101
1137
  **Migration path.** Built. `loops.flags.yolo` persists and the `yolo` listener (`src/server/yolo.ts`) auto-resolves; `loop/proposal` already carries `flags`. Client-side YOLO is wholly the client's (`@plurnk/plurnk`) concern — the service offers nothing to build for it beyond the `loop.resolve` RPC it already has.
@@ -1126,9 +1162,9 @@ type Packet = {
1126
1162
  };
1127
1163
  ```
1128
1164
 
1129
- **Prompt as a first-class entry.** Each loop's prompt is written on loop start as a plurnk-origin `EDIT` against `plurnk:///prompt/<loop_id>` (indexable, body channel, text/markdown). At render time the current loop's prompt body materializes into `packet.user.prompt`; the entry itself stays READ/FOLD-able like any other. The foisted `EDIT`'s **log row is folded by default** (`indexed=0`): the prompt body already lives in `packet.user.prompt`, so the log keeps the action for forensics while collapsing the duplicate body, re-OPENable like any fold (§open-fold). {§prompt-fold}
1165
+ **Prompt as a first-class entry.** Each loop's prompt is written on loop start as a plurnk-origin `EDIT` against `plurnk:///prompt/<loop_id>` (indexable, body channel, text/markdown). At render time the current loop's prompt body materializes into `packet.user.prompt`; the entry itself stays READ/FOLD-able like any other. The foisted `EDIT`'s **log row is folded by default** (`expanded=0`): the prompt body already lives in `packet.user.prompt`, so the log keeps the action for forensics while collapsing the duplicate body, re-OPENable like any fold (§open-fold). {§prompt-fold}
1130
1166
 
1131
- **The entry catalog.** `plurnk:///manifest.json` is a real session entry the model READs to discover what's available — rewritten every turn as a live view of the full entry set. Built in the schemes layer (`_entry-manifest`) and materialized like any entry (the engine only orchestrates the per-turn write — the same pattern as git membership), so it's READable and queryable. Body is `application/json`: a flat, **complete, unranked** array — one item per entry across all schemes, every entry listed in no relevance order, each `{ path, channels: { <name>: { mimetype, tokens, lines } } }`. The model ranks and filters the catalog itself by querying it (task-aware); the catalog never ranks for it — the instant it did, it would be an index again. `tokens` is the provider's write-time count (budget depth), `lines` the content extent from `Mimetypes.process().totalLines`. The engine counts neither. It does not list itself. {§packet-manifest-catalog}
1167
+ **The entry catalog.** `plurnk:///manifest.json` is a real session entry the model READs to discover what's available — rewritten every turn as a live view of the full entry set. Built in the schemes layer (`_entry-manifest`) and materialized like any entry (the engine only orchestrates the per-turn write — the same pattern as git membership), so it's READable and queryable. Body is `application/json`: a flat, **complete, unranked** array — one item per entry across all schemes, every entry listed in no relevance order, each `{ path, tags?, channels: { <name>: { mimetype, tokens, lines } } }`. `tags` is present only when the entry carries `entry_tags` — its own categorization, surfaced so the model sees it in the directory and can `FIND` by tag without a separate read. The model ranks and filters the catalog itself by querying it (task-aware); the catalog never ranks for it — the instant it did, it would be an index again. `tokens` is the provider's write-time count (budget depth), `lines` the content extent from `Mimetypes.process().totalLines`. The engine counts neither. It does not list itself. {§packet-manifest-catalog}
1132
1168
 
1133
1169
  ### §telemetry user.telemetry — model-facing runtime telemetry
1134
1170
 
@@ -4,6 +4,7 @@ export interface MatchResult {
4
4
  status: number;
5
5
  body?: string;
6
6
  matches?: number;
7
+ lines?: number[];
7
8
  error?: string;
8
9
  mimetype?: string;
9
10
  reason?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"matcher.d.ts","sourceRoot":"","sources":["../../src/content/matcher.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAc,MAAM,0BAA0B,CAAC;AAItE,MAAM,WAAW,WAAW;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,OAAO,OAAO;;WAsBX,mBAAmB,CAC5B,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,SAAS,EACpB,QAAQ,GAAE,MAAU,GACrB,OAAO,CAAC,WAAW,CAAC;CA6D1B"}
1
+ {"version":3,"file":"matcher.d.ts","sourceRoot":"","sources":["../../src/content/matcher.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAc,MAAM,0BAA0B,CAAC;AAItE,MAAM,WAAW,WAAW;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,OAAO,OAAO;;WAsBX,mBAAmB,CAC5B,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,SAAS,EACpB,QAAQ,GAAE,MAAU,GACrB,OAAO,CAAC,WAAW,CAAC;CA6D1B"}
@@ -104,7 +104,7 @@ export default class Matcher {
104
104
  if (matches.length === 0)
105
105
  return { status: 204, matches: 0 };
106
106
  const adjusted = Matcher.#shiftLines(matches, baseLine);
107
- return { status: 200, body: Matcher.#renderMatches(adjusted), matches: adjusted.length };
107
+ return { status: 200, body: Matcher.#renderMatches(adjusted), matches: adjusted.length, lines: adjusted.map((m) => m.line) };
108
108
  }
109
109
  }
110
110
  //# sourceMappingURL=matcher.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"matcher.js","sourceRoot":"","sources":["../../src/content/matcher.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,gFAAgF;AAChF,2EAA2E;AAC3E,WAAW;AACX,EAAE;AACF,+EAA+E;AAC/E,+DAA+D;AAC/D,6EAA6E;AAC7E,0EAA0E;AAC1E,EAAE;AACF,gFAAgF;AAChF,wEAAwE;AACxE,yEAAyE;AACzE,EAAE;AACF,8EAA8E;AAC9E,+EAA+E;AAC/E,oFAAoF;AAIpF,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACxG,OAAO,cAAc,MAAM,sBAAsB,CAAC;AAWlD,MAAM,CAAC,OAAO,OAAO,OAAO;IACxB,mFAAmF;IACnF,gFAAgF;IAChF,iFAAiF;IACjF,iDAAiD;IACjD,MAAM,CAAC,YAAY,CAAC,CAAU;QAC1B,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,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AE,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;IACjI,CAAC;CACJ"}
@@ -39,6 +39,7 @@ export type InjectRunNotify = (args: {
39
39
  action: "injected_next_turn" | "enqueued_new_loop";
40
40
  loopId: number;
41
41
  }>;
42
+ export type CancelRunNotify = (runId: number) => boolean;
42
43
  export interface TelemetryEventPayload {
43
44
  loopId: number;
44
45
  event: object;
@@ -1 +1 @@
1
- {"version":3,"file":"ChannelWrite.d.ts","sourceRoot":"","sources":["../../src/core/ChannelWrite.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,EAAE,EAAc,MAAM,SAAS,CAAC;AAE9C,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAMtE,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,YAAY,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,MAAM,iBAAiB,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;AAQvF,MAAM,WAAW,cAAc;IAC3B,SAAS,EAAE,MAAM,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E,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC;QAC7I,OAAO,GAAG,IAAI,IAAI,CAAC;IACvB,CAAC;CACJ"}
@@ -4,7 +4,7 @@ import { Mimetypes } from "@plurnk/plurnk-mimetypes";
4
4
  import type { Db } from "./Db.ts";
5
5
  import type { WriterTier, LoopFlags } from "./scheme-types.ts";
6
6
  import type ExecutorRegistry from "./ExecutorRegistry.ts";
7
- import type { StreamEventNotify, TelemetryEventNotify, WakeRunNotify, InjectRunNotify } from "./ChannelWrite.ts";
7
+ import type { StreamEventNotify, TelemetryEventNotify, WakeRunNotify, InjectRunNotify, CancelRunNotify } from "./ChannelWrite.ts";
8
8
  type ChatMessage = {
9
9
  role: "system" | "user" | "assistant";
10
10
  content: string;
@@ -45,6 +45,7 @@ export interface ProposalPendingEvent {
45
45
  body: string;
46
46
  attrs: object;
47
47
  flags: LoopFlags;
48
+ staleClobberRisk: boolean;
48
49
  }
49
50
  export default class Engine {
50
51
  #private;
@@ -57,13 +58,14 @@ export default class Engine {
57
58
  period: number;
58
59
  cycles: number;
59
60
  };
60
- constructor({ db, schemes, mimetypes, streamEventNotify, wakeRunNotify, injectRun, telemetryEventNotify, tokenize }: {
61
+ constructor({ db, schemes, mimetypes, streamEventNotify, wakeRunNotify, injectRun, cancelRun, telemetryEventNotify, tokenize }: {
61
62
  db: Db;
62
63
  schemes: SchemeRegistry;
63
64
  mimetypes?: Mimetypes;
64
65
  streamEventNotify?: StreamEventNotify;
65
66
  wakeRunNotify?: WakeRunNotify;
66
67
  injectRun?: InjectRunNotify;
68
+ cancelRun?: CancelRunNotify;
67
69
  telemetryEventNotify?: TelemetryEventNotify;
68
70
  tokenize?: (text: string) => number;
69
71
  });
@@ -113,6 +115,10 @@ export default class Engine {
113
115
  budgetStruck: boolean;
114
116
  budgetHardStop: boolean;
115
117
  }>;
118
+ docEntries(): Array<{
119
+ name: string;
120
+ content: string;
121
+ }>;
116
122
  dispatch(context: DispatchContext): Promise<DispatchResult>;
117
123
  resolveProposal(logEntryId: number, resolution: ProposalResolution): void;
118
124
  pendingProposalIds(): number[];
@@ -1 +1 @@
1
- {"version":3,"file":"Engine.d.ts","sourceRoot":"","sources":["../../src/core/Engine.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAwF,MAAM,wBAAwB,CAAC;AAMpJ,OAAO,KAAK,cAAc,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAiB,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAE,EAAE,EAAc,MAAM,SAAS,CAAC;AAO9C,OAAO,KAAK,EAAkB,UAAU,EAAuB,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACpG,OAAO,KAAK,gBAAgB,MAAM,uBAAuB,CAAC;AAE1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AA+DjH,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAG9E,OAAO,KAAK,EAAE,QAAQ,EAAsD,MAAM,0BAA0B,CAAC;AA2C7G,KAAK,eAAe,GAAG;IACnB,SAAS,EAAE,eAAe,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,UAAU,CAAC;IACnB,UAAU,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C,CAAC;AAEF,KAAK,cAAc,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,C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