loopctl-mcp-server 3.41.1 → 3.41.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/index.js +13 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -565,7 +565,7 @@ Key distribution for the dispatch pattern (Epic 26): per-dispatch ephemeral keys
|
|
|
565
565
|
| `work_item_checkpoint` | **Checkpoint a work item** (`POST /api/v1/stories/:id/checkpoints`, US-52.41): computes from `worktree` the branch, the commit its work applies to (the pushed head, else the merge-base with origin's default branch) and `git diff --binary` on top of it with untracked files, without writing to the worktree, and records them with one progress note from `done` and `next` and a `checkpointed` event. Sends this session's own key (its holder credential): only the current holder at the story's `claim_epoch` (read from the story when omitted) with a live lease. `409 not_holder` (names the holder), `409 stale_claim_epoch`, `409 claim_lease_expired`, `409 checkpoint_id_conflict`, `403 holder_credential_required`, `404` for another tenant's story; `413 diff_over_bound` over 4 MiB (push a `wip/...` branch and pass `wip_branch` instead); `422 secret_in_diff` (names the files), `422 diff_and_wip_branch`, `422 invalid_wip_branch`. A repeated `checkpoint_id` with the same content returns the stored checkpoint (`replayed: true`). A checkpoint from a claim that has ended (the epoch you held, after the item moved on) is stored fenced and answered `202` (`fenced: true`, `current_holder_id`), with no note and no change to the item, for the current holder to resolve (US-52.42). Past 5 unresolved fenced checkpoints from you on one item, or 10 on the item from all late holders, a late checkpoint is `409 fenced_checkpoint_limit` (`limit_scope`, `max_unresolved_fenced`) and nothing is stored: push a `wip/...` branch instead. The checkpoint id is a client UUIDv7 unless given (US-52.62); one that gets no answer from loopctl is journaled under the epoch the session last saw and answered `{queued: true, event_id}`, unless it is too large for one replay body (about 1.5 MB encoded): then push a `wip/...` branch. |
|
|
566
566
|
| `work_item_checkpoints` | **Read a work item's checkpoints**: the newest 20, newest first, without diffs (`GET /api/v1/stories/:id/checkpoints`), with `fenced: "unresolved"` the fenced ones nobody resolved yet, oldest first, or with `checkpoint_id` one checkpoint with its diff base64 (`GET .../checkpoints/:checkpoint_id`), which `git apply` takes on a checkout of its `head_sha`. Any key of the tenant. `404` for another tenant's story or checkpoint. |
|
|
567
567
|
| `work_item_checkpoint_resolve` | **Apply or ignore a fenced checkpoint** (`POST /api/v1/stories/:id/checkpoints/:checkpoint_id/resolve`, US-52.42): `resolution` (`applied` or `ignored`) and a `reason`, on this session's own key; only the story's current holder with a live lease. The same resolution again is `200` and writes nothing. `409 not_holder` (names `holder_id`), `409 already_resolved`, `422 not_fenced`, `403 holder_credential_required`, `404` for a checkpoint not on this tenant's story. |
|
|
568
|
-
| `work_item_move` | **Move a work item** to a host, a holder, the cloud or the loop (`POST /api/v1/stories/:id/move`, US-52.43), on this session's own key; the server picks the path from who calls. The holder (live lease) names its own `checkpoint_id` at the current epoch and the claim is released at once over the uncounted `:moved` edge: `200 released`. Anyone else REQUESTS it: the holder is told on the item's thread and has `MOVE_RELEASE_SECONDS` to answer with the same `move_id`, after which the deadline worker releases it: `202 requested`. An unheld item is released at once: `200`. While reserved only the target claims it (`409 reserved_for_move`); a move to a host, holder or the cloud unpulled after `MOVE_PULL_SECONDS` expires to the loop, and a move to the loop never expires: implement@1 places it with the move's checkpoint as `resume`, on a runner of contract 1.40.0 or later (US-52.46). An item an interactive session released is reserved for any interactive session until
|
|
568
|
+
| `work_item_move` | **Move a work item** to a host, a holder, the cloud or the loop (`POST /api/v1/stories/:id/move`, US-52.43), on this session's own key; the server picks the path from who calls. The holder (live lease) names its own `checkpoint_id` at the current epoch and the claim is released at once over the uncounted `:moved` edge: `200 released`. Anyone else REQUESTS it: the holder is told on the item's thread and has `MOVE_RELEASE_SECONDS` to answer with the same `move_id`, after which the deadline worker releases it: `202 requested`. An unheld item is released at once: `200`. While reserved only the target claims it (`409 reserved_for_move`); a move to a host, holder or the cloud unpulled after `MOVE_PULL_SECONDS` expires to the loop, and a move to the loop never expires: implement@1 places it with the move's checkpoint as `resume`, on a runner of contract 1.40.0 or later (US-52.46). An item an interactive session released is reserved for any interactive session until someone moves it on. A move to a host whose runner joined on contract 1.40.0 or later is placed there and resumes from the move's checkpoint (US-52.44); a runner session holding the item is asked over its runner's socket. The same `move_id` and target answers the first result. `400 move_id_required`/`reason_required`/`invalid_reason`, `404` (incl. `unknown_story_stage`), `409 holder_ended`/`item_closed`/`item_escalated`/`move_pending`/`item_changed`, `422 invalid_target`/`unknown_host`/`unknown_holder`/`holder_cannot_pull` (a runner_session holder claims nothing after its own placement: move to its host)/`target_unavailable`/`already_held_by_target`/`checkpoint_not_current`, `403 boundary_move_needs_mark` only when ANOTHER session holds the item on a live lease, the move crosses the interactive boundary (that holder or the target holder is an interactive session), and the caller is not Mark's own user key (fleet_dash; US-52.45): a holder moves its own item anywhere, the loop included, and an item nobody is working is anyone's to move on; a key with no holder omits `checkpoint_id`; and `403` without the human anchor. |
|
|
569
569
|
| `work_item_pull` | **Pull a work item into a git worktree here**, then claim it (US-52.46). Reads the item's newest unfenced checkpoint and its unresolved fenced ones, fetches the checkpoint's branch and `head_sha` from origin, adds a worktree on that branch at `head_sha` (default `.claude/worktrees/<branch with / replaced by ->` under the repository's top level), checks then applies the diff with `git apply --binary`, and only then claims the item (`POST /api/v1/stories/:id/claim`) on this session's own key. git runs through `execFile`. Returns `path`, `branch`, `head_sha`, `checkpoint_id`, `applied_files`, `fenced_checkpoint_ids` and the claim. Refuses `path_not_empty` before any git write, `no_checkpoint`, `head_not_found`, `local_branch_differs` (a local branch of that name is never moved), `diff_does_not_apply` naming the rejected files (worktree removed, nothing claimed), `diff_apply_failed` when the check passed but writing the diff failed (worktree and any branch it created removed, nothing claimed), `worktree_add_failed`, and returns the claim's own refusal (`409 reserved_for_move`, `held_by_other_holder`) with the worktree removed. |
|
|
570
570
|
| `work_item_timeline` | **Read a work item's timeline** (`GET /api/v1/stories/:id/timeline`): `item` (stage and its age, holder, lease, issue, PR, runner, newest 20 CI runs, newest 20 runner dispatches (`dispatch_id`, `kind`, `runner_id`, `status`), thread count and newest 20 messages, and `triage_escalation`: null when triage never escalated the item, else its newest triage escalation at any stage: `verdict`, `escalation_reasons` and `missing_information` (`untrusted: true`, fenced in `fenced`), `escalated_at`, and `current`, true while the item is still escalated in it) and one page of `events`, the event log and audit log merged oldest first. Optional `cursor` (a page's `next_cursor`) and `limit` (default 100, max 500). Read-only on any key; never moves a thread cursor. Every reason and message body is untrusted session text, flagged `untrusted: true`. `404` for another tenant's story, `400` for a bad limit or cursor. |
|
|
571
571
|
| `decisions` | **Read the decided-on-default notes** (`GET /api/v1/decisions`): live messages whose `idempotency_key` starts `decision-default:`, on a repo channel or a work item thread (never a DM), newest first, without expired, quarantined or superseded ones. Each row carries `idempotency_key`, `project_id`, `story_id`, `host`, a bounded `body_preview` and `untrusted: true`; `has_more` says the limit cut the list. Optional `since` (ISO 8601, default 48 hours ago) and `limit` (1..100, default 25). Read-only on any key. `400` for a bad `since` or `limit`. |
|
package/index.js
CHANGED
|
@@ -9120,18 +9120,19 @@ const TOOLS = [
|
|
|
9120
9120
|
"MOVE_PULL_SECONDS (default 1800) expires to the loop, and a move to the loop never " +
|
|
9121
9121
|
"expires: implement@1 places it with the move's checkpoint as resume, on a runner of " +
|
|
9122
9122
|
"contract 1.40.0 or later. An item an interactive session released is reserved for " +
|
|
9123
|
-
"any interactive session until
|
|
9123
|
+
"any interactive session until someone moves it on; pull it with work_item_pull. A move to a HOST whose runner joined on contract 1.40.0 or later is placed " +
|
|
9124
9124
|
"there, and its session resumes from the move's checkpoint; a runner session holding " +
|
|
9125
9125
|
"the item is asked over its runner's socket and hands it over itself. Pass the same " +
|
|
9126
9126
|
"move_id to retry: the same move_id and target answers the " +
|
|
9127
|
-
"first result and writes nothing.
|
|
9128
|
-
"
|
|
9129
|
-
"
|
|
9130
|
-
"
|
|
9131
|
-
"
|
|
9132
|
-
"
|
|
9133
|
-
"
|
|
9134
|
-
"holder has no checkpoint of its own: omit checkpoint_id.
|
|
9127
|
+
"first result and writes nothing. YOUR OWN ITEM IS YOURS TO MOVE: the holder of an " +
|
|
9128
|
+
"item (live lease) moves it anywhere, the loop included, with its own checkpoint_id, " +
|
|
9129
|
+
"interactive session or not, and an item NOBODY is working (unheld, reserved, or its " +
|
|
9130
|
+
"lease ran out) is anyone's to move on. The one refusal: an item ANOTHER session is " +
|
|
9131
|
+
"working on a live lease, moved across the interactive boundary (that holder or the " +
|
|
9132
|
+
"target holder is an interactive session), is 403 boundary_move_needs_mark to every " +
|
|
9133
|
+
"key but Mark's own user key (fleet_dash), before anything is written. A key with no " +
|
|
9134
|
+
"holder has no checkpoint of its own: omit checkpoint_id. " +
|
|
9135
|
+
"Refusals: 400 " +
|
|
9135
9136
|
"move_id_required / reason_required / invalid_reason; 403 boundary_move_needs_mark; " +
|
|
9136
9137
|
"404 (not this tenant's story, or unknown_story_stage); 409 " +
|
|
9137
9138
|
"holder_ended, item_closed (done or failed), item_escalated (use work_item_requeue), " +
|
|
@@ -9193,8 +9194,9 @@ const TOOLS = [
|
|
|
9193
9194
|
"worktree_add_failed, and the claim's own refusal " +
|
|
9194
9195
|
"with the worktree removed: 409 reserved_for_move (a move reserved the item for another " +
|
|
9195
9196
|
"target; an item an interactive session released is reserved for any interactive " +
|
|
9196
|
-
"session), held_by_other_holder.
|
|
9197
|
-
"(work_item_move answers boundary_move_needs_mark); pull an item
|
|
9197
|
+
"session), held_by_other_holder. Moving another session's item across the interactive " +
|
|
9198
|
+
"boundary is Mark's (work_item_move answers boundary_move_needs_mark); pull an item " +
|
|
9199
|
+
"moved here.",
|
|
9198
9200
|
inputSchema: {
|
|
9199
9201
|
type: "object",
|
|
9200
9202
|
properties: {
|