@agent-tasks/mcp-server 0.11.0 → 0.13.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.
- package/README.md +107 -23
- package/dist/client.d.ts +88 -21
- package/dist/client.js +172 -14
- package/dist/client.js.map +1 -1
- package/dist/default-workflow.d.ts +23 -0
- package/dist/default-workflow.js +107 -0
- package/dist/default-workflow.js.map +1 -0
- package/dist/errors.d.ts +45 -0
- package/dist/errors.js +798 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.js +16 -1
- package/dist/index.js.map +1 -1
- package/dist/legacy-flag.d.ts +1 -0
- package/dist/legacy-flag.js +36 -0
- package/dist/legacy-flag.js.map +1 -0
- package/dist/primer.d.ts +15 -0
- package/dist/primer.js +86 -0
- package/dist/primer.js.map +1 -0
- package/dist/read.d.ts +133 -0
- package/dist/read.js +193 -0
- package/dist/read.js.map +1 -0
- package/dist/receipt.d.ts +216 -0
- package/dist/receipt.js +542 -0
- package/dist/receipt.js.map +1 -0
- package/dist/server.d.ts +8 -3
- package/dist/server.js +22 -9
- package/dist/server.js.map +1 -1
- package/dist/tools.d.ts +3 -1
- package/dist/tools.js +390 -60
- package/dist/tools.js.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,4EAA4E;AAC5E,qCAAqC;AACrC,0EAA0E;AAC1E,oEAAoE;AACpE,6EAA6E;AAC7E,sEAAsE;AACtE,mEAAmE;AACnE,EAAE;AACF,yEAAyE;AACzE,6EAA6E;AAC7E,2EAA2E;AAC3E,4EAA4E;AAC5E,wEAAwE;AACxE,2EAA2E;AAC3E,yEAAyE;AACzE,yEAAyE;AACzE,2EAA2E;AAC3E,4EAA4E;AAC5E,mBAAmB;AACnB,EAAE;AACF,yEAAyE;AACzE,wEAAwE;AACxE,gEAAgE;AAChE,gEAAg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mBAAmB,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;IACD,IAAI,MAAM,KAAK,GAAG,IAAI,IAAI,KAAK,qBAAqB,EAAE,CAAC;QACrD,OAAO,uBAAuB,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IACpD,CAAC;IACD,IAAI,MAAM,KAAK,GAAG,IAAI,IAAI,KAAK,gBAAgB,EAAE,CAAC;QAChD,OAAO,kBAAkB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC3C,CAAC;IACD,IAAI,MAAM,KAAK,GAAG,IAAI,IAAI,KAAK,wBAAwB,EAAE,CAAC;QACxD,OAAO,sBAAsB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IACtD,CAAC;IACD,IAAI,MAAM,KAAK,GAAG,IAAI,IAAI,KAAK,oBAAoB,EAAE,CAAC;QACpD,OAAO,qBAAqB,CAAC,OAAO,CAAC,CAAC;IACxC,CAAC;IACD,IAAI,MAAM,KAAK,GAAG,IAAI,IAAI,KAAK,UAAU,IAAI,uBAAuB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QACnF,OAAO,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;IAED,OAAO,cAAc,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;AACnE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { runStdioServer, DEFAULT_BASE_URL } from "./server.js";
|
|
3
|
+
import { resolveLegacyFlag } from "./legacy-flag.js";
|
|
3
4
|
function resolveConfig() {
|
|
4
5
|
const token = process.env.AGENT_TASKS_TOKEN;
|
|
5
6
|
if (!token) {
|
|
@@ -8,7 +9,21 @@ function resolveConfig() {
|
|
|
8
9
|
const baseUrl = process.env.AGENT_TASKS_BASE_URL ?? DEFAULT_BASE_URL;
|
|
9
10
|
return { token, baseUrl };
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
+
// rc-v1-C007 fix round 2 (CRITICAL): the call below used to be guarded by an
|
|
13
|
+
// `invokedDirectly` check comparing import.meta.url against
|
|
14
|
+
// pathToFileURL(process.argv[1]), added only so importing this module from
|
|
15
|
+
// a test would not also spawn a real stdio server. That guard broke the
|
|
16
|
+
// npm bin path: node_modules/.bin/agent-tasks-mcp is a SYMLINK, so
|
|
17
|
+
// process.argv[1] is the symlink path while import.meta.url is Node's
|
|
18
|
+
// realpath-resolved target -- the two never matched, and the published
|
|
19
|
+
// binary silently did nothing (measured: a real npm pack/install/npx round
|
|
20
|
+
// trip produced no output and exit 0). resolveLegacyFlag (the only export
|
|
21
|
+
// the guard needed to shield from a bare import) now lives in
|
|
22
|
+
// legacy-flag.ts, so tests import it directly from there and this
|
|
23
|
+
// entrypoint needs no guard at all: it is only ever loaded as the
|
|
24
|
+
// package's `bin` target, or via `node dist/index.js` / `tsx
|
|
25
|
+
// src/index.ts`, never imported by test code.
|
|
26
|
+
runStdioServer(resolveConfig(), { legacy: resolveLegacyFlag() }).catch((err) => {
|
|
12
27
|
// eslint-disable-next-line no-console
|
|
13
28
|
console.error("[agent-tasks-mcp] fatal:", err);
|
|
14
29
|
process.exit(1);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,SAAS,aAAa;IACpB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC;IAC5C,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CACb,4GAA4G,CAC7G,CAAC;IACJ,CAAC;IACD,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,gBAAgB,CAAC;IACrE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AAC5B,CAAC;AAED,6EAA6E;AAC7E,4DAA4D;AAC5D,2EAA2E;AAC3E,wEAAwE;AACxE,mEAAmE;AACnE,sEAAsE;AACtE,uEAAuE;AACvE,2EAA2E;AAC3E,0EAA0E;AAC1E,8DAA8D;AAC9D,kEAAkE;AAClE,kEAAkE;AAClE,6DAA6D;AAC7D,8CAA8C;AAC9C,cAAc,CAAC,aAAa,EAAE,EAAE,EAAE,MAAM,EAAE,iBAAiB,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IAC7E,sCAAsC;IACtC,OAAO,CAAC,KAAK,CAAC,0BAA0B,EAAE,GAAG,CAAC,CAAC;IAC/C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function resolveLegacyFlag(): boolean;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// rc-v1-C007: AGENT_TASKS_MCP_LEGACY=1 re-registers the v1 verbs tools.ts's
|
|
2
|
+
// buildTools prunes from the default registration (LEGACY_VERB_NAMES), for
|
|
3
|
+
// a caller still depending on one of them by name. Read here and forwarded
|
|
4
|
+
// as an explicit option so buildTools/createServer/runStdioServer stay
|
|
5
|
+
// testable in both modes without env stubbing.
|
|
6
|
+
//
|
|
7
|
+
// Round-2 fix (CRITICAL): this used to live in src/index.ts itself, called
|
|
8
|
+
// only from behind an `invokedDirectly` guard that compared import.meta.url
|
|
9
|
+
// (Node realpath-resolves the entrypoint's own URL) against
|
|
10
|
+
// pathToFileURL(process.argv[1]) (NOT realpath-resolved) -- purely so
|
|
11
|
+
// importing index.ts from a test would not also spawn a real stdio server.
|
|
12
|
+
// That guard silently broke the npm bin path: node_modules/.bin/
|
|
13
|
+
// agent-tasks-mcp is a SYMLINK, so process.argv[1] is the symlink path
|
|
14
|
+
// while import.meta.url is the resolved target; the two never matched,
|
|
15
|
+
// invokedDirectly was always false, and the published binary exited 0
|
|
16
|
+
// having done nothing (measured directly: a real npm pack -> install ->
|
|
17
|
+
// npx round trip in a sandbox produced zero output). Moving this function
|
|
18
|
+
// out to its own module removes the hazard class entirely: index.ts now
|
|
19
|
+
// has nothing that needs shielding from a bare import, so its own
|
|
20
|
+
// entrypoint call carries no guard at all (see index.ts's comment), and
|
|
21
|
+
// this module can be imported by tests with no server-spawning side
|
|
22
|
+
// effect regardless of how it is invoked.
|
|
23
|
+
export function resolveLegacyFlag() {
|
|
24
|
+
const raw = process.env.AGENT_TASKS_MCP_LEGACY;
|
|
25
|
+
// Only the literal string "1" turns the flag on. Anything else that is
|
|
26
|
+
// still SET (a truthy-looking typo like "true" or "yes") silently stayed
|
|
27
|
+
// off before this fix, with no signal to the operator that the flag they
|
|
28
|
+
// set had no effect. One line to stderr, not a thrown error: the server
|
|
29
|
+
// still starts in default mode, which is the safe fallback.
|
|
30
|
+
if (raw !== undefined && raw !== "1") {
|
|
31
|
+
// eslint-disable-next-line no-console
|
|
32
|
+
console.error(`[agent-tasks-mcp] AGENT_TASKS_MCP_LEGACY is set to "${raw}", not "1"; the legacy verb set stays OFF. Set AGENT_TASKS_MCP_LEGACY=1 (exactly) to enable it.`);
|
|
33
|
+
}
|
|
34
|
+
return raw === "1";
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=legacy-flag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacy-flag.js","sourceRoot":"","sources":["../src/legacy-flag.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,2EAA2E;AAC3E,2EAA2E;AAC3E,uEAAuE;AACvE,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,4EAA4E;AAC5E,4DAA4D;AAC5D,sEAAsE;AACtE,2EAA2E;AAC3E,iEAAiE;AACjE,uEAAuE;AACvE,uEAAuE;AACvE,sEAAsE;AACtE,wEAAwE;AACxE,0EAA0E;AAC1E,wEAAwE;AACxE,kEAAkE;AAClE,wEAAwE;AACxE,oEAAoE;AACpE,0CAA0C;AAC1C,MAAM,UAAU,iBAAiB;IAC/B,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;IAC/C,uEAAuE;IACvE,yEAAyE;IACzE,yEAAyE;IACzE,wEAAwE;IACxE,4DAA4D;IAC5D,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,GAAG,EAAE,CAAC;QACrC,sCAAsC;QACtC,OAAO,CAAC,KAAK,CACX,uDAAuD,GAAG,iGAAiG,CAC5J,CAAC;IACJ,CAAC;IACD,OAAO,GAAG,KAAK,GAAG,CAAC;AACrB,CAAC"}
|
package/dist/primer.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sent once per session as the MCP `initialize.instructions` field (see
|
|
3
|
+
* server.ts). System / lifecycle / verb-order knowledge only: no per-task
|
|
4
|
+
* data, no receipt/error detail (those live in the receipt itself and in
|
|
5
|
+
* `workflow_primer`, respectively). Hard budget: <= 2000 chars.
|
|
6
|
+
*/
|
|
7
|
+
export declare const HANDSHAKE_PRIMER: string;
|
|
8
|
+
/**
|
|
9
|
+
* Returned on demand by the parameterless `workflow_primer` tool
|
|
10
|
+
* (tools.ts). The fuller companion to HANDSHAKE_PRIMER: per-state lifecycle
|
|
11
|
+
* detail, canonical flows, the claim model, receipt/include defaults per
|
|
12
|
+
* verb, and today's error behavior. No per-task data and no budget cap (it
|
|
13
|
+
* is pulled once by a caller who needs it, not replayed automatically).
|
|
14
|
+
*/
|
|
15
|
+
export declare const WORKFLOW_PRIMER: string;
|
package/dist/primer.js
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// Onboarding channels split by rate of change, per docs/response-contract-v1.md's
|
|
2
|
+
// "Onboarding channels by rate of change" table. System / lifecycle / verb-order
|
|
3
|
+
// knowledge "effectively never" changes, so it is moved out of the per-call
|
|
4
|
+
// task_start receipt (see receipt.ts's receiptForStart and rc-v1-C003, which cut
|
|
5
|
+
// this exact content out of every task_start response) into two channels paid
|
|
6
|
+
// for at most once per session:
|
|
7
|
+
//
|
|
8
|
+
// 1. HANDSHAKE_PRIMER: sent once, as the MCP `initialize.instructions` field
|
|
9
|
+
// (see server.ts's `new McpServer(..., { instructions: HANDSHAKE_PRIMER })`).
|
|
10
|
+
// Hard budget: <= 2000 chars (the contract's own "~300-500 tokens" target).
|
|
11
|
+
// tests/primer.test.ts asserts the exact measured size and, via an
|
|
12
|
+
// InMemoryTransport client, that the handshake actually carries the text.
|
|
13
|
+
// 2. WORKFLOW_PRIMER: returned on demand by the parameterless `workflow_primer`
|
|
14
|
+
// tool (tools.ts). No per-call budget: it is the fuller reference a caller
|
|
15
|
+
// pulls once, not something replayed automatically on every call.
|
|
16
|
+
//
|
|
17
|
+
// Both reuse DEFAULT_WORKFLOW_STATES (default-workflow.ts) verbatim for the
|
|
18
|
+
// per-state lifecycle prose rather than holding a third hand-copied version of
|
|
19
|
+
// that text (backend's DEFAULT_STATES and this package's own mirror already
|
|
20
|
+
// being the first two; see default-workflow.ts's file header). Both primers
|
|
21
|
+
// describe the CURRENT verb surface and CURRENT error behavior: the
|
|
22
|
+
// structured teaching-error shape (code/message/recipe/allowedNext) from
|
|
23
|
+
// docs/response-contract-v1.md's "Error shape (block tier)" section is
|
|
24
|
+
// implemented (rc-v1-C005, see errors.ts and tools.ts's wrap()) and
|
|
25
|
+
// WORKFLOW_PRIMER's "## Errors" section below describes the shape actually
|
|
26
|
+
// emitted today, not a planned future one.
|
|
27
|
+
//
|
|
28
|
+
// No per-task data lives here (that is task_pickup's and task_start's job), and
|
|
29
|
+
// no em dashes in the exported prose (repo convention).
|
|
30
|
+
import { DEFAULT_WORKFLOW_STATES } from "./default-workflow.js";
|
|
31
|
+
// Derived, not hand-typed, so the state-order summary in HANDSHAKE_PRIMER can
|
|
32
|
+
// never silently drift from the actual default workflow's state list.
|
|
33
|
+
const STATE_ORDER = DEFAULT_WORKFLOW_STATES.map((s) => s.name).join(" -> ");
|
|
34
|
+
// Each line reuses `agentInstructions` verbatim (no paraphrase, so no separate
|
|
35
|
+
// consistency assert is needed against DEFAULT_WORKFLOW_STATES: a change there
|
|
36
|
+
// flows straight through here on the next build).
|
|
37
|
+
const LIFECYCLE_DETAIL = DEFAULT_WORKFLOW_STATES.map((s) => `- ${s.label} (${s.name}): ${s.agentInstructions}`).join("\n");
|
|
38
|
+
/**
|
|
39
|
+
* Sent once per session as the MCP `initialize.instructions` field (see
|
|
40
|
+
* server.ts). System / lifecycle / verb-order knowledge only: no per-task
|
|
41
|
+
* data, no receipt/error detail (those live in the receipt itself and in
|
|
42
|
+
* `workflow_primer`, respectively). Hard budget: <= 2000 chars.
|
|
43
|
+
*/
|
|
44
|
+
export const HANDSHAKE_PRIMER = `agent-tasks is a task tracker for human-agent collaboration: task state changes are enforced server-side (claim gates, transition preconditions, review, audited overrides), not left to prompt discipline.
|
|
45
|
+
|
|
46
|
+
Task lifecycle: ${STATE_ORDER}. Canonical verb order: task_pickup (find work) -> task_start (claim it) -> implement the change, run \`gh pr create\` -> task_submit_pr (record branch/PR metadata) -> task_finish (advance the task).
|
|
47
|
+
|
|
48
|
+
Claim model: only one active claim is held per caller at a time. task_pickup and task_start fail with 409 if you already hold one; call task_finish or task_abandon on the current task first.
|
|
49
|
+
|
|
50
|
+
Governance: every transition and admin override is enforced and audited server-side by this project's workflow, not by convention.
|
|
51
|
+
|
|
52
|
+
The converted v2 write verbs (task_create, task_respec, task_finish, task_submit_pr, task_note, task_merge, task_abandon, tasks_comment) return small receipts by default and accept include:["task"]; task_pickup returns the full spec and task_start a receipt plus a small slice; tasks_get returns a summary by default and accepts include:["description", "comments", "artifacts", "task"]; signals_poll caps and cursors the backend response locally even though it takes no include parameter; every other tool returns the raw backend body and ignores include. Call workflow_primer (no arguments) for full lifecycle detail, include semantics, and today's error behavior; call projects_get_effective_gates before task_create or task_submit_pr to see this project's actual gates.`;
|
|
53
|
+
/**
|
|
54
|
+
* Returned on demand by the parameterless `workflow_primer` tool
|
|
55
|
+
* (tools.ts). The fuller companion to HANDSHAKE_PRIMER: per-state lifecycle
|
|
56
|
+
* detail, canonical flows, the claim model, receipt/include defaults per
|
|
57
|
+
* verb, and today's error behavior. No per-task data and no budget cap (it
|
|
58
|
+
* is pulled once by a caller who needs it, not replayed automatically).
|
|
59
|
+
*/
|
|
60
|
+
export const WORKFLOW_PRIMER = `agent-tasks workflow primer. See also docs/response-contract-v1.md, the normative contract this text summarizes.
|
|
61
|
+
|
|
62
|
+
## Lifecycle
|
|
63
|
+
Per-state agent guidance from this project's own workflow when it defines one, or the built-in default below otherwise. This prose predates the v2 verbs and describes intent, not a literal call sequence; the canonical flows below are the current call sequence and supersede it.
|
|
64
|
+
|
|
65
|
+
${LIFECYCLE_DETAIL}
|
|
66
|
+
|
|
67
|
+
## Canonical flows
|
|
68
|
+
Work: task_pickup -> task_start (author-claim, open -> in_progress) -> implement the change, run \`gh pr create\` -> task_submit_pr (records branchName/prUrl/prNumber) -> task_finish (advances to review or done, depending on the workflow).
|
|
69
|
+
Review: task_pickup (kind: "review") -> task_start (review-claim, no state change) -> task_finish { outcome: "approve" | "request_changes" }. approve moves the task to done; request_changes returns it to in_progress and keeps the work claim for the original author.
|
|
70
|
+
|
|
71
|
+
## Claim model
|
|
72
|
+
task_start fails with 409 if you already hold an active claim on another task. task_pickup fails with the same 409 if you hold any active claim, but it never claims anything itself: it only returns a candidate, so a review candidate still needs task_start to review-claim it. task_finish, task_submit_pr, and task_abandon require that same claim, not just a taskId, and fail with 403 if you do not hold it.
|
|
73
|
+
|
|
74
|
+
## Receipt defaults (no include passed)
|
|
75
|
+
- task_pickup: the full task spec, without comments (the one write-verb exception; delivering the spec is its purpose).
|
|
76
|
+
- task_start: a receipt plus a small per-task slice (inferredTaskType, expectedFinishState, gateExpectations, gateExpectationsSource when assumed). Not the full task.
|
|
77
|
+
- task_create, task_respec, task_finish, task_submit_pr, task_merge, task_abandon, task_note, tasks_comment: a small receipt only, shaped { ok, task: { id, status? }, confidence?, deviations?, next? }. confidence is set only by task_create and task_respec (the score just computed for that call); every other verb in this list omits it. Fields you sent are never echoed back; deviations appear only when something needs your attention.
|
|
78
|
+
|
|
79
|
+
Pass include:["task"] on any of the verbs above to get the full, pre-contract object back instead (recovery path after context loss, or when you need the whole object in one call). task_start additionally accepts include:["description" | "instructions" | "comments"] to add back one field at a time, without paying for the rest.
|
|
80
|
+
|
|
81
|
+
## Errors
|
|
82
|
+
A call that cannot proceed returns an MCP tool error (isError: true) whose text is the JSON teaching-error shape \`{ ok: false, error: { code, message, recipe, allowedNext, detail? } }\`, printed the same way every other tool result is (two-space-indented JSON), never a bare status or raw backend string. \`code\` identifies the failure, \`recipe\` names the concrete corrective call, and \`allowedNext\` lists only verb names you can call immediately (a strict, machine-checkable counterpart to a receipt's free-form \`next[]\`); \`detail\` carries structured extras for the codes that have them. Known traps and their recipe: \`not_claimed\` (403, calling task_finish, task_submit_pr, or task_abandon without holding the claim, call task_start first); \`already_claimed\` (409, a claim wall on task_pickup or task_start, call task_finish or task_abandon on your current task first); \`precondition_failed\` (422, an unmet branchPresent/prPresent/ciGreen/prMerged gate, \`detail.failed\` lists each failing rule individually, call task_submit_pr first when a branch or PR gate is the one failing); \`cross_repo_pr_rejected\` (400, task_submit_pr's prUrl points outside the project's own repo); \`pr_author_mismatch\` (403, that PR was not authored by the delegation user); \`force_admin_only\` (403, the admin-only force-transition escape hatch used as a non-admin, no self-service fix exists); \`respec_conflict\` (409, task_respec on a task that is claimed or not open); \`low_confidence\` (422, task_start's pre-claim confidence gate rejected the claim, detail carries score/threshold/missing[]/totalMissing, call task_respec to raise the score); \`result_not_plain_string\` (task_finish's own result rejected before any request is sent, because it looks XML- or JSON-wrapped instead of plain prose); \`project_addressing_conflict\` (task_create's projectId/projectSlug pair rejected client-side before any request is sent, because exactly one of the two is required, whether both were sent or neither was, resubmit with exactly one, or ask the operator which project to use if you do not yet know it); \`unknown_project_slug\` (task_create's or project_tasks's projectSlug/project value did not resolve to any project on a fresh lookup, ask the operator for the correct slug or id). Any other backend error still degrades to the same shape instead of leaking raw text: a code derived from its HTTP status, the backend's own message passed through, a recipe pointing at workflow_primer, and, when the backend sent a structured details payload, a clamped copy of it in detail.
|
|
83
|
+
|
|
84
|
+
## Project rules
|
|
85
|
+
Call projects_get_effective_gates before task_create or task_submit_pr to see which gates are active on this project and why, instead of discovering them by tripping a 4xx.`;
|
|
86
|
+
//# sourceMappingURL=primer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primer.js","sourceRoot":"","sources":["../src/primer.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,iFAAiF;AACjF,4EAA4E;AAC5E,iFAAiF;AACjF,8EAA8E;AAC9E,gCAAgC;AAChC,EAAE;AACF,+EAA+E;AAC/E,mFAAmF;AACnF,iFAAiF;AACjF,wEAAwE;AACxE,+EAA+E;AAC/E,kFAAkF;AAClF,gFAAgF;AAChF,uEAAuE;AACvE,EAAE;AACF,4EAA4E;AAC5E,+EAA+E;AAC/E,4EAA4E;AAC5E,4EAA4E;AAC5E,oEAAoE;AACpE,yEAAyE;AACzE,uEAAuE;AACvE,oEAAoE;AACpE,2EAA2E;AAC3E,2CAA2C;AAC3C,EAAE;AACF,gFAAgF;AAChF,wDAAwD;AAExD,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,8EAA8E;AAC9E,sEAAsE;AACtE,MAAM,WAAW,GAAG,uBAAuB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAE5E,+EAA+E;AAC/E,+EAA+E;AAC/E,kDAAkD;AAClD,MAAM,gBAAgB,GAAG,uBAAuB,CAAC,GAAG,CAClD,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,iBAAiB,EAAE,CAC1D,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;;kBAEd,WAAW;;;;;;qwBAMwuB,CAAC;AAEtwB;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;EAK7B,gBAAgB;;;;;;;;;;;;;;;;;;;;6KAoB2J,CAAC"}
|
package/dist/read.d.ts
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/** Minimal structural types for the fields this projection actually reads.
|
|
2
|
+
* The real backend task (taskInclude) carries many more fields
|
|
3
|
+
* (description, comments, attachments, artifacts, templateData, ...);
|
|
4
|
+
* this projection intentionally touches only what the summary and its
|
|
5
|
+
* include-gated additions need. */
|
|
6
|
+
export interface RawClaimUser {
|
|
7
|
+
id: string;
|
|
8
|
+
login?: string | null;
|
|
9
|
+
name?: string | null;
|
|
10
|
+
}
|
|
11
|
+
export interface RawClaimAgent {
|
|
12
|
+
id: string;
|
|
13
|
+
name?: string | null;
|
|
14
|
+
}
|
|
15
|
+
export interface RawBlockedByEntry {
|
|
16
|
+
id: string;
|
|
17
|
+
title: string;
|
|
18
|
+
status: string;
|
|
19
|
+
}
|
|
20
|
+
export interface RawTask {
|
|
21
|
+
id: string;
|
|
22
|
+
title: string;
|
|
23
|
+
status?: string;
|
|
24
|
+
priority?: string;
|
|
25
|
+
labels?: string[];
|
|
26
|
+
prUrl?: string | null;
|
|
27
|
+
description?: string | null;
|
|
28
|
+
comments?: unknown[];
|
|
29
|
+
artifacts?: unknown[];
|
|
30
|
+
claimedByUser?: RawClaimUser | null;
|
|
31
|
+
claimedByAgent?: RawClaimAgent | null;
|
|
32
|
+
reviewClaimedByUser?: RawClaimUser | null;
|
|
33
|
+
reviewClaimedByAgent?: RawClaimAgent | null;
|
|
34
|
+
blockedBy?: RawBlockedByEntry[];
|
|
35
|
+
}
|
|
36
|
+
/** The shape client.getTask() resolves to: `{ task }`, matching GET
|
|
37
|
+
* /tasks/:id's own response envelope verbatim (see backend/src/routes/
|
|
38
|
+
* tasks.ts). include:["task"] returns this unchanged. */
|
|
39
|
+
export interface GetTaskResponse {
|
|
40
|
+
task: RawTask;
|
|
41
|
+
}
|
|
42
|
+
export declare const TASKS_GET_INCLUDE_VALUES: readonly ["description", "comments", "artifacts", "task"];
|
|
43
|
+
export type TasksGetIncludeValue = (typeof TASKS_GET_INCLUDE_VALUES)[number];
|
|
44
|
+
/** tasks_get's default response shape: id/title always present, every
|
|
45
|
+
* other field present only when the source data has it (never emitted as
|
|
46
|
+
* null/empty -- same presence convention as receipt.ts's Receipt). */
|
|
47
|
+
export interface TaskSummary {
|
|
48
|
+
id: string;
|
|
49
|
+
title: string;
|
|
50
|
+
status?: string;
|
|
51
|
+
priority?: string;
|
|
52
|
+
labels?: string[];
|
|
53
|
+
totalLabels?: number;
|
|
54
|
+
claims?: {
|
|
55
|
+
work?: string;
|
|
56
|
+
review?: string;
|
|
57
|
+
};
|
|
58
|
+
blockedBy?: RawBlockedByEntry[];
|
|
59
|
+
totalBlockedBy?: number;
|
|
60
|
+
prUrl?: string;
|
|
61
|
+
description?: string;
|
|
62
|
+
comments?: unknown[];
|
|
63
|
+
artifacts?: unknown[];
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Projects a raw GET /tasks/:id response to the summary shape, or (on
|
|
67
|
+
* include:["task"]) returns it unchanged. Defensive guard mirrors
|
|
68
|
+
* receipt.ts's hasTaskId: a malformed body (no task.id) is returned raw
|
|
69
|
+
* rather than crashing on a dereference.
|
|
70
|
+
*/
|
|
71
|
+
export declare function projectTaskSummary(response: GetTaskResponse, include?: readonly string[]): GetTaskResponse | {
|
|
72
|
+
task: TaskSummary;
|
|
73
|
+
};
|
|
74
|
+
export declare const SIGNALS_DEFAULT_LIMIT = 10;
|
|
75
|
+
/** Caller-requestable ceiling on a single signals_poll response. */
|
|
76
|
+
export declare const SIGNALS_MAX_LIMIT = 100;
|
|
77
|
+
/** What mcp-server itself asks the backend for, regardless of the caller's
|
|
78
|
+
* own `limit` -- the backend's own hard max (backend/src/routes/
|
|
79
|
+
* signals.ts), so the full pending backlog (up to that ceiling) is always
|
|
80
|
+
* in hand to slice+cursor locally. */
|
|
81
|
+
export declare const SIGNALS_BACKEND_FETCH_LIMIT = 200;
|
|
82
|
+
export interface RawSignal {
|
|
83
|
+
id: string;
|
|
84
|
+
[key: string]: unknown;
|
|
85
|
+
}
|
|
86
|
+
export interface SignalsPollResult {
|
|
87
|
+
signals: RawSignal[];
|
|
88
|
+
/** Present only when more signals exist beyond this page WITHIN `all`
|
|
89
|
+
* (report by exception, same philosophy as receipt.ts's deviations
|
|
90
|
+
* tier: never silently truncated). This is local pagination only -- see
|
|
91
|
+
* atBackendFetchCeiling for the separate "the fetch itself might be an
|
|
92
|
+
* undercount" signal. */
|
|
93
|
+
truncated?: boolean;
|
|
94
|
+
/** Pass back as `cursor` on the next call to resume exactly where this
|
|
95
|
+
* page left off. Present only alongside truncated:true. */
|
|
96
|
+
cursor?: string;
|
|
97
|
+
/** rc-v1-C006 round-2 review (HIGH): set (true) whenever `all.length` hit
|
|
98
|
+
* SIGNALS_BACKEND_FETCH_LIMIT -- the single backend fetch this array came
|
|
99
|
+
* from may itself be an undercount of the true pending backlog (the
|
|
100
|
+
* backend has no cursor of its own; mcp-server always asks for its hard
|
|
101
|
+
* max in one shot). Before this field existed, the LAST local page of an
|
|
102
|
+
* at-ceiling fetch reported truncated:false (nothing left in `all`),
|
|
103
|
+
* which read as "backlog fully drained" even when the backend backlog
|
|
104
|
+
* was actually larger than what this one fetch could return (measured: a
|
|
105
|
+
* 260-signal backlog delivers only 200, and the final local page over
|
|
106
|
+
* those 200 said truncated:false). truncated and atBackendFetchCeiling
|
|
107
|
+
* answer two different questions ("more left in what I already fetched"
|
|
108
|
+
* vs "what I fetched might not be everything") and are therefore
|
|
109
|
+
* independent flags, not one folded into the other -- forcing
|
|
110
|
+
* truncated:true here would make a caller loop forever re-requesting a
|
|
111
|
+
* cursor that never advances past the fetched window's own end. A caller
|
|
112
|
+
* that sees this on ANY page (not only the final one, since it describes
|
|
113
|
+
* the underlying fetch, not the page) should ack what it received and
|
|
114
|
+
* poll again rather than treating the backlog as drained once
|
|
115
|
+
* truncated stops appearing. */
|
|
116
|
+
atBackendFetchCeiling?: boolean;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Slices `all` (the full backend-fetched backlog, oldest-first) starting
|
|
120
|
+
* just after `cursor` (or from the start when absent/not found -- a
|
|
121
|
+
* cursor whose signal has since been acked or aged out of the backend's
|
|
122
|
+
* own fetch window falls back to the start rather than silently dropping
|
|
123
|
+
* everything), returning at most `limit` entries. Sets truncated+cursor
|
|
124
|
+
* whenever more remain WITHIN `all`, so a caller can never lose a signal
|
|
125
|
+
* by not noticing the response was capped; sets atBackendFetchCeiling
|
|
126
|
+
* independently whenever `all` itself reached the backend's own fetch
|
|
127
|
+
* ceiling, since that is a fact about the fetch, not about which page of
|
|
128
|
+
* it a caller happens to be reading.
|
|
129
|
+
*/
|
|
130
|
+
export declare function paginateSignals(all: readonly RawSignal[], opts?: {
|
|
131
|
+
cursor?: string;
|
|
132
|
+
limit?: number;
|
|
133
|
+
}): SignalsPollResult;
|
package/dist/read.js
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
// Read-verb projection layer (docs/response-contract-v1.md's "include
|
|
2
|
+
// semantics replacing verbose" section; rc-v1-C006). Mirrors receipt.ts's
|
|
3
|
+
// role for write verbs: this is the one place tasks_get's summary
|
|
4
|
+
// projection and signals_poll's mcp-server-side cap+cursor live. The
|
|
5
|
+
// clamping / no-silent-truncation conventions receipt.ts established for
|
|
6
|
+
// write-verb deviations (entry count clamp + per-entry char clamp + a
|
|
7
|
+
// total count marker + a visible truncation marker, never a silent drop)
|
|
8
|
+
// are reused here via receipt.ts's own exported clampEntries /
|
|
9
|
+
// ENTRY_TRUNCATION_MARKER instead of a second parallel implementation.
|
|
10
|
+
import { clampEntries, ENTRY_TRUNCATION_MARKER } from "./receipt.js";
|
|
11
|
+
// The full read-verb include vocabulary (docs/response-contract-v1.md:
|
|
12
|
+
// ["task", "description", "comments", "instructions", "artifacts"]) minus
|
|
13
|
+
// "instructions" -- that value is task_start's own per-state prose
|
|
14
|
+
// (receipt.ts's deriveStartInstructions), not a field a plain task object
|
|
15
|
+
// carries, so it does not apply to tasks_get.
|
|
16
|
+
export const TASKS_GET_INCLUDE_VALUES = ["description", "comments", "artifacts", "task"];
|
|
17
|
+
/** Short claim label for ONE claimant pair (a single relation, e.g. just
|
|
18
|
+
* claimedByUser/claimedByAgent, or just reviewClaimedByUser/
|
|
19
|
+
* reviewClaimedByAgent -- never both at once, see the call site below):
|
|
20
|
+
* prefers a resolved name, falls back to login, then to the bare id,
|
|
21
|
+
* always resolving to SOMETHING when a claimant is present so the summary
|
|
22
|
+
* never silently drops a claim it has data for. A present `user` wins
|
|
23
|
+
* outright over `agent` (checked first, unconditionally); `agent` is only
|
|
24
|
+
* consulted when `user` itself is absent. */
|
|
25
|
+
function shortClaim(user, agent) {
|
|
26
|
+
const raw = user ? user.name || user.login || user.id : agent ? agent.name || agent.id : undefined;
|
|
27
|
+
// Clamped via the same clampEntries helper every other summary-projection
|
|
28
|
+
// field uses (CLAIM_CHAR_BUDGET, defined below), not left unbounded: a
|
|
29
|
+
// resolved `name` in particular is caller/human-influenced free text with
|
|
30
|
+
// no length limit enforced anywhere upstream of this projection.
|
|
31
|
+
return raw !== undefined ? clampEntries([raw], { max: 1, entryChars: CLAIM_CHAR_BUDGET })[0] : undefined;
|
|
32
|
+
}
|
|
33
|
+
// Summary-projection clamps. Deliberately separate constants from
|
|
34
|
+
// receipt.ts's own DETAIL_CLAMP/ENTRY_CHAR_BUDGET (5 entries / 19 chars):
|
|
35
|
+
// those are tuned for the tier-2 DEVIATION budget (~400 tokens), a
|
|
36
|
+
// different, tighter target than tasks_get's own summary budget (see the
|
|
37
|
+
// budget tests in tests/read.test.ts). The clamp TECHNIQUE (count cap +
|
|
38
|
+
// per-entry char cap + total marker + visible "..." marker) is reused via
|
|
39
|
+
// clampEntries; only the numbers differ.
|
|
40
|
+
const LABELS_SUMMARY_CLAMP = 10;
|
|
41
|
+
const LABEL_CHAR_BUDGET = 60;
|
|
42
|
+
const BLOCKED_BY_SUMMARY_CLAMP = 10;
|
|
43
|
+
const BLOCKED_BY_TITLE_CHAR_BUDGET = 60;
|
|
44
|
+
// Per-entry char bound for a resolved claim label (shortClaim's own
|
|
45
|
+
// return value) and for prUrl. Both are, in principle, unbounded caller-
|
|
46
|
+
// or-backend-influenced strings: prUrl in particular has no max length on
|
|
47
|
+
// task_submit_pr's own input schema (tools.ts), so a caller could in
|
|
48
|
+
// principle submit an arbitrarily long one and have it echoed back
|
|
49
|
+
// verbatim by a later tasks_get call. Clamped here the same way
|
|
50
|
+
// labels/blockedBy already are (rc-v1-C006 round-2 review, LOW: the
|
|
51
|
+
// WORST CASE ceiling test previously left both unclamped, relying only on
|
|
52
|
+
// realistic-length fixture values rather than an actual bound). `title` is
|
|
53
|
+
// deliberately NOT clamped this way: unlike prUrl, it IS genuinely bounded
|
|
54
|
+
// today, independently, by both the backend's own createTaskSchema
|
|
55
|
+
// (backend/src/routes/tasks.ts: `title: z.string().min(1).max(255)`) and
|
|
56
|
+
// mcp-server's own task_create inputShape (tools.ts, same 255 max) -- and a
|
|
57
|
+
// caller reading a summary needs the task's actual title to identify the
|
|
58
|
+
// task, so silently shortening it would cost more in usability than the
|
|
59
|
+
// (already externally-bounded) worst case saves in budget. See the WORST
|
|
60
|
+
// CASE test's own comment in tests/read.test.ts for the same reasoning
|
|
61
|
+
// pinned alongside the fixture it documents.
|
|
62
|
+
const CLAIM_CHAR_BUDGET = 60;
|
|
63
|
+
const PRURL_CHAR_BUDGET = 100;
|
|
64
|
+
function clampBlockedBy(entries) {
|
|
65
|
+
if (!entries || entries.length === 0)
|
|
66
|
+
return {};
|
|
67
|
+
const clamped = entries.slice(0, BLOCKED_BY_SUMMARY_CLAMP).map((b) => ({
|
|
68
|
+
id: b.id,
|
|
69
|
+
title: b.title.length > BLOCKED_BY_TITLE_CHAR_BUDGET
|
|
70
|
+
? b.title.slice(0, BLOCKED_BY_TITLE_CHAR_BUDGET - ENTRY_TRUNCATION_MARKER.length) +
|
|
71
|
+
ENTRY_TRUNCATION_MARKER
|
|
72
|
+
: b.title,
|
|
73
|
+
status: b.status,
|
|
74
|
+
}));
|
|
75
|
+
return entries.length > BLOCKED_BY_SUMMARY_CLAMP
|
|
76
|
+
? { blockedBy: clamped, totalBlockedBy: entries.length }
|
|
77
|
+
: { blockedBy: clamped };
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Projects a raw GET /tasks/:id response to the summary shape, or (on
|
|
81
|
+
* include:["task"]) returns it unchanged. Defensive guard mirrors
|
|
82
|
+
* receipt.ts's hasTaskId: a malformed body (no task.id) is returned raw
|
|
83
|
+
* rather than crashing on a dereference.
|
|
84
|
+
*/
|
|
85
|
+
export function projectTaskSummary(response, include) {
|
|
86
|
+
if (include?.includes("task"))
|
|
87
|
+
return response;
|
|
88
|
+
if (!response?.task?.id)
|
|
89
|
+
return response;
|
|
90
|
+
const task = response.task;
|
|
91
|
+
const summary = { id: task.id, title: task.title };
|
|
92
|
+
if (task.status !== undefined)
|
|
93
|
+
summary.status = task.status;
|
|
94
|
+
if (task.priority !== undefined)
|
|
95
|
+
summary.priority = task.priority;
|
|
96
|
+
if (task.labels && task.labels.length > 0) {
|
|
97
|
+
summary.labels = clampEntries(task.labels, {
|
|
98
|
+
max: LABELS_SUMMARY_CLAMP,
|
|
99
|
+
entryChars: LABEL_CHAR_BUDGET,
|
|
100
|
+
});
|
|
101
|
+
if (task.labels.length > LABELS_SUMMARY_CLAMP)
|
|
102
|
+
summary.totalLabels = task.labels.length;
|
|
103
|
+
}
|
|
104
|
+
// Work and review claims are resolved by two independent shortClaim
|
|
105
|
+
// calls, one per relation, never passed to a single call together --
|
|
106
|
+
// there is no "work wins the tie against review" logic anywhere, because
|
|
107
|
+
// shortClaim itself never sees both relations at once. Both can end up
|
|
108
|
+
// present in `summary.claims` simultaneously (a task can be work-claimed
|
|
109
|
+
// by one caller and separately review-claimed by another).
|
|
110
|
+
const work = shortClaim(task.claimedByUser, task.claimedByAgent);
|
|
111
|
+
const review = shortClaim(task.reviewClaimedByUser, task.reviewClaimedByAgent);
|
|
112
|
+
if (work || review) {
|
|
113
|
+
summary.claims = {};
|
|
114
|
+
if (work)
|
|
115
|
+
summary.claims.work = work;
|
|
116
|
+
if (review)
|
|
117
|
+
summary.claims.review = review;
|
|
118
|
+
}
|
|
119
|
+
const { blockedBy, totalBlockedBy } = clampBlockedBy(task.blockedBy);
|
|
120
|
+
if (blockedBy)
|
|
121
|
+
summary.blockedBy = blockedBy;
|
|
122
|
+
if (totalBlockedBy !== undefined)
|
|
123
|
+
summary.totalBlockedBy = totalBlockedBy;
|
|
124
|
+
// Clamped like the claim labels above: task_submit_pr's own input schema
|
|
125
|
+
// (tools.ts) has no max length on prUrl, so this is genuinely unbounded
|
|
126
|
+
// upstream, unlike `title` (see PRURL_CHAR_BUDGET's own doc comment).
|
|
127
|
+
if (task.prUrl) {
|
|
128
|
+
summary.prUrl = clampEntries([task.prUrl], { max: 1, entryChars: PRURL_CHAR_BUDGET })[0];
|
|
129
|
+
}
|
|
130
|
+
if (include?.includes("description") && task.description)
|
|
131
|
+
summary.description = task.description;
|
|
132
|
+
if (include?.includes("comments") && task.comments)
|
|
133
|
+
summary.comments = task.comments;
|
|
134
|
+
if (include?.includes("artifacts") && task.artifacts)
|
|
135
|
+
summary.artifacts = task.artifacts;
|
|
136
|
+
return { task: summary };
|
|
137
|
+
}
|
|
138
|
+
// ── signals_poll: mcp-server-side cap + cursor ──────────────────────────
|
|
139
|
+
//
|
|
140
|
+
// The motivating measurement (docs/response-contract-v1.md): a single
|
|
141
|
+
// observed signals_poll call cost 9.5k tokens -- an unbounded backlog
|
|
142
|
+
// returned in one shot. The backend route (backend/src/routes/signals.ts)
|
|
143
|
+
// already accepts `limit` (default 50, hard max 200) but has no cursor
|
|
144
|
+
// param of its own, and backend pagination is explicitly out of scope for
|
|
145
|
+
// this task, so the cap and the "no signal is silently lost" guarantee are
|
|
146
|
+
// both implemented here, entirely client-side: fetch up to the backend's
|
|
147
|
+
// own max in one call (client.ts's pollSignals(SIGNALS_BACKEND_FETCH_LIMIT)),
|
|
148
|
+
// then slice+cursor that array locally. Signals are ordered oldest-first
|
|
149
|
+
// and stable across calls as long as none are acked/created in between
|
|
150
|
+
// (backend/src/services/signal.ts: `orderBy: { createdAt: "asc" }`), so a
|
|
151
|
+
// signal id is a valid resume point.
|
|
152
|
+
export const SIGNALS_DEFAULT_LIMIT = 10;
|
|
153
|
+
/** Caller-requestable ceiling on a single signals_poll response. */
|
|
154
|
+
export const SIGNALS_MAX_LIMIT = 100;
|
|
155
|
+
/** What mcp-server itself asks the backend for, regardless of the caller's
|
|
156
|
+
* own `limit` -- the backend's own hard max (backend/src/routes/
|
|
157
|
+
* signals.ts), so the full pending backlog (up to that ceiling) is always
|
|
158
|
+
* in hand to slice+cursor locally. */
|
|
159
|
+
export const SIGNALS_BACKEND_FETCH_LIMIT = 200;
|
|
160
|
+
/**
|
|
161
|
+
* Slices `all` (the full backend-fetched backlog, oldest-first) starting
|
|
162
|
+
* just after `cursor` (or from the start when absent/not found -- a
|
|
163
|
+
* cursor whose signal has since been acked or aged out of the backend's
|
|
164
|
+
* own fetch window falls back to the start rather than silently dropping
|
|
165
|
+
* everything), returning at most `limit` entries. Sets truncated+cursor
|
|
166
|
+
* whenever more remain WITHIN `all`, so a caller can never lose a signal
|
|
167
|
+
* by not noticing the response was capped; sets atBackendFetchCeiling
|
|
168
|
+
* independently whenever `all` itself reached the backend's own fetch
|
|
169
|
+
* ceiling, since that is a fact about the fetch, not about which page of
|
|
170
|
+
* it a caller happens to be reading.
|
|
171
|
+
*/
|
|
172
|
+
export function paginateSignals(all, opts = {}) {
|
|
173
|
+
const limit = opts.limit ?? SIGNALS_DEFAULT_LIMIT;
|
|
174
|
+
let startIndex = 0;
|
|
175
|
+
if (opts.cursor) {
|
|
176
|
+
const idx = all.findIndex((s) => s.id === opts.cursor);
|
|
177
|
+
startIndex = idx === -1 ? 0 : idx + 1;
|
|
178
|
+
}
|
|
179
|
+
const page = all.slice(startIndex, startIndex + limit);
|
|
180
|
+
const hasMore = startIndex + page.length < all.length;
|
|
181
|
+
const result = { signals: page };
|
|
182
|
+
if (hasMore) {
|
|
183
|
+
result.truncated = true;
|
|
184
|
+
const last = page[page.length - 1];
|
|
185
|
+
if (last)
|
|
186
|
+
result.cursor = last.id;
|
|
187
|
+
}
|
|
188
|
+
if (all.length >= SIGNALS_BACKEND_FETCH_LIMIT) {
|
|
189
|
+
result.atBackendFetchCeiling = true;
|
|
190
|
+
}
|
|
191
|
+
return result;
|
|
192
|
+
}
|
|
193
|
+
//# sourceMappingURL=read.js.map
|
package/dist/read.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read.js","sourceRoot":"","sources":["../src/read.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,0EAA0E;AAC1E,kEAAkE;AAClE,qEAAqE;AACrE,yEAAyE;AACzE,sEAAsE;AACtE,yEAAyE;AACzE,+DAA+D;AAC/D,uEAAuE;AAEvE,OAAO,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AA0DrE,uEAAuE;AACvE,0EAA0E;AAC1E,mEAAmE;AACnE,0EAA0E;AAC1E,8CAA8C;AAC9C,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,a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