@adhd/backlog 0.1.9 → 1.0.1
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/CHANGELOG.md +128 -47
- package/README.md +369 -81
- package/api.d.ts +196 -0
- package/api.ir.json +1 -0
- package/cli.d.ts +45 -18
- package/env.d.ts +23 -3
- package/envelope.d.ts +163 -0
- package/extract-live.d.ts +56 -0
- package/index.d.ts +11 -10
- package/index.js +255 -197
- package/index.mjs +11348 -19043
- package/install-skill.d.ts +23 -0
- package/ir-artifact.d.ts +86 -0
- package/package.json +51 -15
- package/query/card.d.ts +31 -0
- package/query/get.d.ts +11 -0
- package/query/index.d.ts +67 -0
- package/query/markdown.d.ts +11 -0
- package/query/query.d.ts +131 -0
- package/query/resolve.d.ts +123 -0
- package/query/types.d.ts +450 -0
- package/query/views/registry.d.ts +43 -0
- package/query/views/semantic.d.ts +101 -0
- package/query/views/stats.d.ts +109 -0
- package/search-shortcut.d.ts +79 -0
- package/serve.d.ts +18 -0
- package/server.d.ts +139 -4
- package/skill/SKILL.md +632 -138
- package/store/graph-backlog-store.d.ts +80 -17
- package/store/immediate-retry.d.ts +24 -13
- package/store/type-policy.d.ts +4 -0
- package/store/vocabulary-guard.d.ts +52 -0
- package/write/audit.d.ts +36 -0
- package/write/bootstrap.d.ts +161 -0
- package/write/catalog.d.ts +369 -0
- package/write/citation-path.d.ts +133 -0
- package/write/claim-lease.d.ts +21 -0
- package/write/claim.d.ts +80 -0
- package/write/create-issue.d.ts +253 -0
- package/write/delete.d.ts +39 -0
- package/write/embed-drain.d.ts +68 -0
- package/write/embedding-config.d.ts +81 -0
- package/write/embedding-observer.d.ts +80 -0
- package/write/errors.d.ts +365 -0
- package/write/issue-status.d.ts +10 -0
- package/write/move.d.ts +70 -0
- package/write/relate.d.ts +52 -0
- package/write/transition.d.ts +64 -0
- package/write/tx.d.ts +344 -0
- package/write/update.d.ts +81 -0
- package/client.d.ts +0 -174
- package/markdown.d.ts +0 -75
- package/migration-admin.d.ts +0 -26
- package/model.d.ts +0 -437
- package/store/audit-log.d.ts +0 -16
- package/store/claim.d.ts +0 -24
- package/store/crud.d.ts +0 -62
- package/store/ids.d.ts +0 -24
- package/store/lifecycle.d.ts +0 -36
- package/store/mapping.d.ts +0 -101
- package/store/mutate-metadata.d.ts +0 -8
- package/store/query.d.ts +0 -68
- package/store/repo-migration.d.ts +0 -51
- package/store/serve-lock.d.ts +0 -42
- package/store/structure.d.ts +0 -66
package/api.d.ts
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { IUpsertProjectInput, IUpsertProjectOutcome, IUpsertComponentInput, IUpsertComponentOutcome, IUpsertLocationInput, IUpsertLocationOutcome, IRmLocationInput, IRmLocationOutcome } from './write/catalog.js';
|
|
2
|
+
import { IDeleteIssueInput, IDeleteIssueOutcome } from './write/delete.js';
|
|
3
|
+
import { IMoveIssueInput, IMoveIssueOutcome } from './write/move.js';
|
|
4
|
+
import { IRelateInput, IRelateOutcome } from './write/relate.js';
|
|
5
|
+
import { IClaimInput, IClaimOutcome } from './write/claim.js';
|
|
6
|
+
import { ITransitionInput, ITransitionOutcome } from './write/transition.js';
|
|
7
|
+
import { IUpdateIssueInput, IUpdateIssueOutcome } from './write/update.js';
|
|
8
|
+
import { ICreateIssueInput, ICreateIssueResult } from './write/create-issue.js';
|
|
9
|
+
import { IIssueGetInput, IIssueGetResult, IIssueQueryInput, IIssueQueryResult, ILookupResult } from './query/types.js';
|
|
10
|
+
import { IPriorityMatrixInput, IPriorityMatrixResult, IPartOfRollupInput, IPartOfRollupResult, IOpenCurveInput, IOpenCurveResult } from './query/views/stats.js';
|
|
11
|
+
import { EmbeddingLiveConfig } from './write/embedding-config.js';
|
|
12
|
+
import { IOutcomeEnvelope } from './envelope.js';
|
|
13
|
+
import { GraphBacklogStore } from './store/graph-backlog-store.js';
|
|
14
|
+
import { BacklogConfig } from './env.js';
|
|
15
|
+
import { Environment } from '@adhd/environment';
|
|
16
|
+
|
|
17
|
+
/** The one type apigen special-cases via the `ctx-name-only` invariant. */
|
|
18
|
+
export interface BacklogCtx {
|
|
19
|
+
store: GraphBacklogStore;
|
|
20
|
+
env: Environment<BacklogConfig>;
|
|
21
|
+
/**
|
|
22
|
+
* Per-process liveness holder for the `embedding.*` config family
|
|
23
|
+
* (`write/embedding-config.ts`). Optional and additive: every existing
|
|
24
|
+
* caller/test that builds a ctx by hand keeps the pre-existing resolve-once
|
|
25
|
+
* behaviour exactly (`ctx.env.config.embedding` is the effective value).
|
|
26
|
+
*
|
|
27
|
+
* `startBacklogServer` attaches one; `ensureSemanticReady` refreshes it
|
|
28
|
+
* before each semantic verb so an on-disk `config.yaml` edit is adopted
|
|
29
|
+
* without a restart. `db.*`/`logging.level` are deliberately NOT covered —
|
|
30
|
+
* they stay restart-required (see the holder's own doc comment).
|
|
31
|
+
*/
|
|
32
|
+
embeddingConfig?: EmbeddingLiveConfig;
|
|
33
|
+
/**
|
|
34
|
+
* Test-isolation escape hatch ONLY — mirrors `BuildBacklogEnvOptions.adhdRoot`
|
|
35
|
+
* (the same value passed to `buildBacklogEnv({ adhdRoot })` when constructing
|
|
36
|
+
* `env`). NEVER set this in production code (`server.ts`/`cli.ts` never do).
|
|
37
|
+
*/
|
|
38
|
+
adhdRoot?: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Fetch one issue by `uid`, projected to the requested `fields`.
|
|
42
|
+
*
|
|
43
|
+
* Defaults to the same five-field card `query` returns
|
|
44
|
+
* (`uid`, `kind`, `title`, `status`, `priority`).
|
|
45
|
+
*/
|
|
46
|
+
export declare function get(ctx: BacklogCtx, input: IIssueGetInput): Promise<IOutcomeEnvelope<IIssueGetResult>>;
|
|
47
|
+
/**
|
|
48
|
+
* Search, filter, group and paginate issues.
|
|
49
|
+
*
|
|
50
|
+
* Supports field projection, keyset and offset pagination, the `view`/`groupBy`
|
|
51
|
+
* aggregate axes, and `grep`/`semantic` text filters.
|
|
52
|
+
*/
|
|
53
|
+
export declare function query(ctx: BacklogCtx, input: IIssueQueryInput): Promise<IOutcomeEnvelope<IIssueQueryResult>>;
|
|
54
|
+
/**
|
|
55
|
+
* SPEC.md §5's status-aware priority matrix (BUG-023) — a per-priority
|
|
56
|
+
* breakdown of issue counts, scoped by `project`/`component`/`kind`/`status`.
|
|
57
|
+
*
|
|
58
|
+
* An omitted `input.filter.status` scopes to OPEN work (a deliberate
|
|
59
|
+
* divergence from `query`'s `list` default, where an omitted status means "no
|
|
60
|
+
* restriction"); the applied scope is echoed on `data.statusScope`, so a
|
|
61
|
+
* default-scoped result can never be mistaken for an all-status one. `{}` is a
|
|
62
|
+
* valid input.
|
|
63
|
+
*
|
|
64
|
+
* A read op, NOT a `query.view` member: it returns a matrix
|
|
65
|
+
* (`{rows, unassigned, statusScope}`) rather than a `{view, items}` list
|
|
66
|
+
* permutation, and mounting it as a view would force `IIssueQueryInput` to
|
|
67
|
+
* carry axes (`at`, an issue root) the other views must reject. Uses only
|
|
68
|
+
* `handle.graph` — hence `needsSemantic:false`/`probeSpace:false`, so this op
|
|
69
|
+
* never pays the cold semantic-backend bootstrap (`queryHandle`'s own doc
|
|
70
|
+
* comment).
|
|
71
|
+
*/
|
|
72
|
+
export declare function priorityMatrix(ctx: BacklogCtx, input: IPriorityMatrixInput): Promise<IOutcomeEnvelope<IPriorityMatrixResult>>;
|
|
73
|
+
/**
|
|
74
|
+
* SPEC.md §5's `part_of` hierarchy rollup (FEAT-005) — every TRANSITIVE
|
|
75
|
+
* descendant of the root issue `input.uid` via `part_of` (issue → issue,
|
|
76
|
+
* `n:1`), counted exactly once each regardless of chain depth, split into
|
|
77
|
+
* `childrenOpen`/`childrenClosed` (plus the open descendants' uids).
|
|
78
|
+
*
|
|
79
|
+
* A read op, NOT a `query.view` member: it is rooted at an issue (`uid`), a
|
|
80
|
+
* per-op input no list view carries. Uses only `handle.graph` — see
|
|
81
|
+
* {@link priorityMatrix}'s note on the `queryHandle` gates.
|
|
82
|
+
*/
|
|
83
|
+
export declare function partOfRollup(ctx: BacklogCtx, input: IPartOfRollupInput): Promise<IOutcomeEnvelope<IPartOfRollupResult>>;
|
|
84
|
+
/**
|
|
85
|
+
* SPEC.md §5's `validAt` cumulative-open curve — for each sampled ISO-8601
|
|
86
|
+
* instant in `input.at`, how many in-scope issues EXISTED then and, of those,
|
|
87
|
+
* how many were reconstructed as OPEN then (never the issue's current status;
|
|
88
|
+
* see `openCurve`'s own doc comment for the reconstruction rule).
|
|
89
|
+
*
|
|
90
|
+
* A read op, NOT a `query.view` member: it returns a time series
|
|
91
|
+
* (`{points}`) keyed by a caller-given instant list, an axis no list view has.
|
|
92
|
+
* Uses only `handle.graph` — see {@link priorityMatrix}'s note on the
|
|
93
|
+
* `queryHandle` gates.
|
|
94
|
+
*/
|
|
95
|
+
export declare function openCurve(ctx: BacklogCtx, input: IOpenCurveInput): Promise<IOutcomeEnvelope<IOpenCurveResult>>;
|
|
96
|
+
/** The `embedding_status` read op's payload (see {@link embeddingStatus}). */
|
|
97
|
+
export interface IEmbeddingStatusResult {
|
|
98
|
+
/** The on-disk `embedding.enabled` (observed from the config layers). */
|
|
99
|
+
readonly configuredEnabled: boolean;
|
|
100
|
+
/** The value the running process is actually using right now. */
|
|
101
|
+
readonly effectiveEnabled: boolean;
|
|
102
|
+
readonly provider: string;
|
|
103
|
+
readonly model: string;
|
|
104
|
+
/** Whether the resolved semantic members are currently retained for the store. */
|
|
105
|
+
readonly membersPresent: {
|
|
106
|
+
readonly embedding: boolean;
|
|
107
|
+
readonly search: boolean;
|
|
108
|
+
};
|
|
109
|
+
/** `configuredEnabled !== effectiveEnabled` — on-disk enabled, process not (yet) adopted. */
|
|
110
|
+
readonly divergent: boolean;
|
|
111
|
+
/** Config hash the process started with (`ctx.env.version.configHash`). */
|
|
112
|
+
readonly startupHash: string;
|
|
113
|
+
/** Config hash currently observed on disk. */
|
|
114
|
+
readonly currentHash: string;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Health/observability read for the semantic layer: EFFECTIVE vs CONFIGURED
|
|
118
|
+
* `embedding.*`, member presence, and both config hashes.
|
|
119
|
+
*
|
|
120
|
+
* A READ op — it never opens the cold semantic backend (`queryHandle` is not
|
|
121
|
+
* touched), so a caller can ask "is RAG on, and is on-disk ahead of me?"
|
|
122
|
+
* cheaply. `provider`/`model` are the effective values; `divergent` is the
|
|
123
|
+
* one non-obvious bit — on-disk says enabled while the process is still
|
|
124
|
+
* effectively disabled, which normally resolves on the next semantic verb
|
|
125
|
+
* (see {@link ensureSemanticReady}).
|
|
126
|
+
*
|
|
127
|
+
* A first-class read op (rather than a `query` view) because it is a property
|
|
128
|
+
* of the PROCESS and its config, not of the issue graph — and because the
|
|
129
|
+
* write path's own loudness net (`write/bootstrap.ts`) reports the same
|
|
130
|
+
* divergence, so operators can confirm it out-of-band.
|
|
131
|
+
*/
|
|
132
|
+
export declare function embeddingStatus(ctx: BacklogCtx): Promise<IOutcomeEnvelope<IEmbeddingStatusResult>>;
|
|
133
|
+
/**
|
|
134
|
+
* Resolve a free-text reference to a project, component or location in the
|
|
135
|
+
* registry.
|
|
136
|
+
*/
|
|
137
|
+
export declare function lookup(ctx: BacklogCtx, input: {
|
|
138
|
+
q: string;
|
|
139
|
+
}): Promise<IOutcomeEnvelope<ILookupResult>>;
|
|
140
|
+
/** File a new issue, minting its `uid` and linking it to a project component. */
|
|
141
|
+
export declare function create(ctx: BacklogCtx, input: ICreateIssueInput): Promise<IOutcomeEnvelope<ICreateIssueResult>>;
|
|
142
|
+
/**
|
|
143
|
+
* Edit an existing issue.
|
|
144
|
+
*
|
|
145
|
+
* A `body` change supersedes the issue, minting a fresh `uid`; every other
|
|
146
|
+
* change edits the existing node in place. `status` is not editable here —
|
|
147
|
+
* use `transition`.
|
|
148
|
+
*/
|
|
149
|
+
export declare function update(ctx: BacklogCtx, input: IUpdateIssueInput): Promise<IOutcomeEnvelope<IUpdateIssueOutcome>>;
|
|
150
|
+
/** Move an issue to a new status, recording the transition in its audit trail. */
|
|
151
|
+
export declare function transition(ctx: BacklogCtx, input: ITransitionInput): Promise<IOutcomeEnvelope<ITransitionOutcome>>;
|
|
152
|
+
/** Take, renew or release an exclusive working lease on an issue. */
|
|
153
|
+
export declare function claim(ctx: BacklogCtx, input: IClaimInput): Promise<IOutcomeEnvelope<IClaimOutcome>>;
|
|
154
|
+
/** Create or remove a typed relationship between two issues. */
|
|
155
|
+
export declare function relate(ctx: BacklogCtx, input: IRelateInput): Promise<IOutcomeEnvelope<IRelateOutcome>>;
|
|
156
|
+
/** Re-file an issue under a different project component. */
|
|
157
|
+
export declare function move(ctx: BacklogCtx, input: IMoveIssueInput): Promise<IOutcomeEnvelope<IMoveIssueOutcome>>;
|
|
158
|
+
/**
|
|
159
|
+
* Soft-delete an issue.
|
|
160
|
+
*
|
|
161
|
+
* The node is closed off bi-temporally, never physically removed — its audit
|
|
162
|
+
* trail and every edge pointing at it remain readable.
|
|
163
|
+
*/
|
|
164
|
+
declare function remove(ctx: BacklogCtx, input: IDeleteIssueInput): Promise<IOutcomeEnvelope<IDeleteIssueOutcome>>;
|
|
165
|
+
/**
|
|
166
|
+
* Create or update a project by `name`.
|
|
167
|
+
*
|
|
168
|
+
* On first creation, also mints the project's reserved default component
|
|
169
|
+
* `(root)`. A repeat call against an existing project is idempotent.
|
|
170
|
+
*/
|
|
171
|
+
export declare function upsertProject(ctx: BacklogCtx, input: IUpsertProjectInput): Promise<IOutcomeEnvelope<IUpsertProjectOutcome>>;
|
|
172
|
+
/** Create or update a component by `(project, name)`. */
|
|
173
|
+
export declare function upsertComponent(ctx: BacklogCtx, input: IUpsertComponentInput): Promise<IOutcomeEnvelope<IUpsertComponentOutcome>>;
|
|
174
|
+
/**
|
|
175
|
+
* Create or find a location by `(component, locType, value)`.
|
|
176
|
+
*
|
|
177
|
+
* A component referenced by bare name (rather than uid) requires `project`
|
|
178
|
+
* to disambiguate it.
|
|
179
|
+
*/
|
|
180
|
+
export declare function upsertLocation(ctx: BacklogCtx, input: IUpsertLocationInput): Promise<IOutcomeEnvelope<IUpsertLocationOutcome>>;
|
|
181
|
+
/** Soft-remove a location by `uid`. */
|
|
182
|
+
export declare function rmLocation(ctx: BacklogCtx, input: IRmLocationInput): Promise<IOutcomeEnvelope<IRmLocationOutcome>>;
|
|
183
|
+
/**
|
|
184
|
+
* SPEC §6.7 names this verb `delete` on every mount (`backlog_delete`,
|
|
185
|
+
* `backlog delete`, `DELETE /issue`). `export async function delete` is a
|
|
186
|
+
* syntax error — `delete` is a reserved word — but an export CLAUSE may alias
|
|
187
|
+
* to any IdentifierName, reserved words included, and apigen resolves the
|
|
188
|
+
* mounted name from `sf.getExportedDeclarations()` (ts-morph's own
|
|
189
|
+
* rename/re-export resolver, which extract.ts documents as covering "named
|
|
190
|
+
* exports — local, renamed, AND re-exported"). So the operation mounts as
|
|
191
|
+
* `delete` while the implementation keeps a legal identifier.
|
|
192
|
+
*
|
|
193
|
+
* Do NOT "simplify" this to `export async function remove`: that silently
|
|
194
|
+
* renames the tool to `backlog_remove` on all four transports.
|
|
195
|
+
*/
|
|
196
|
+
export { remove as delete };
|
package/api.ir.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"formatVersion":1,"operations":[{"id":"backlog/get","host":"ts","namespace":{"raw":"backlog","words":["backlog"]},"path":[{"raw":"get","words":["get"]}],"kind":"action","async":false,"streaming":false,"safe":false,"input":{"type":"object","properties":{"input":{"oneOf":[{"type":"object","properties":{"uid":{"type":"string"},"fields":{"type":"array","items":{"$schema":"http://json-schema.org/draft-07/schema#","oneOf":[{"$ref":"#/definitions/IIssuePlainField"},{"$ref":"#/definitions/IIssuePseudoField"}],"x-apigen-logical":"union"}}},"required":["uid"],"additionalProperties":false},{"type":"object","properties":{"registry":{"type":"string","enum":["project","component","location"]},"name":{"type":"string"},"filter":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"project":{"type":"string"},"component":{"type":"string"}},"additionalProperties":false}},"required":["registry","name"],"additionalProperties":false}],"x-apigen-logical":"union"}},"required":["input"],"definitions":{"IIssuePlainField":{"type":"string","enum":["uid","title","kind","status","priority","project","component","createdAt","updatedAt","assignee","author","closedAt","gitContext"],"description":"The closed field vocabulary a `get`/`query` caller may request (SPEC.md §6.5). `assertKnownFields` (this module's {@link assertKnownIssueFields } ) rejects any name outside this union with a `BacklogValidationError` naming it — never a silent drop.\n\n`plain` fields are cheap: each is either a column on the `issue` node itself or a scalar living in `issue.meta.metadata` (`assignee`, `closedAt`, `gitContext` — SPEC.md §6.5's own reclassification of `closedAt` as `plain`, since it is read in the SAME single-row fetch as `assignee`, not a second query; `gitContext` is the item-level disclosure-contract git context, a sibling of `assignee` in the same metadata blob).\n\n`pseudo` fields are opt-in only: each costs a genuine extra read (an edge traversal to another node kind, or only exists on a `searchRanked` response) and is therefore NEVER included in the default card."},"IIssuePseudoField":{"type":"string","enum":["body","citations","notes","auditTrail","blockers","related","_score","_vector"]}}},"output":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"code":{"$ref":"#/definitions/BacklogErrorCode"},"message":{"type":"string"},"details":{"$ref":"#/definitions/IOutcomeErrorDetails"}},"required":["code","message"],"additionalProperties":false,"description":"The error arm's payload."},"warnings":{"type":"array","items":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{},"warnings":{"type":"array","items":{"type":"string"}},"meta":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"total":{"type":"number","description":"Matching rows before limit/offset — the TRUE count."},"returned":{"type":"number","description":"Rows actually in `data`."},"limit":{"type":"number"},"offset":{"type":"number"},"truncated":{"type":"boolean","description":"Set when the result set was cut short by anything other than the caller's own `limit`. A silent cap is forbidden — if it happens, it is stated here."}},"required":["total","returned"],"additionalProperties":false,"description":"Pagination truth carried beside the data. `total` is the count BEFORE `limit`/`offset`; `returned` is `data.length`. A silently-truncated list is indistinguishable from a complete one unless the envelope says how many there really were."}},"required":["ok","data"],"additionalProperties":false}],"x-apigen-logical":"union","definitions":{"BacklogErrorCode":{"type":"string","enum":["not_found","item_not_found","invalid_argument","validation","store_busy","rag_not_configured","conflict","precondition_failed","internal"],"description":"The closed union of envelope error codes. See {@link BACKLOG_ERROR_CODES } ."},"IOutcomeErrorDetails":{"type":"object","properties":{"retryable":{"type":"boolean","description":"True only for transient codes (today: `store_busy`)."},"retryAfterMs":{"type":"number","description":"Suggested backoff in milliseconds; only meaningful when `retryable`."},"internalRef":{"type":"string","description":"Internal doc/plan reference for an `invalid_argument` whose underlying reason cites internal terminology (a plan id, a spec section) that does not belong in the user-facing `message`."}},"additionalProperties":{},"description":"`error.details`. `retryable`/`retryAfterMs` exist so an agent knows whether to retry a `store_busy` and with what backoff instead of hot-looping. Open-ended beyond those: individual codes attach their own evidence."}}},"envelope":{},"typeText":{"lang":"ts","input":"(input: import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/query/types\").IIssueGetInput)","output":"import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/envelope\").IOutcomeEnvelope<import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/query/types\").IIssueGetResult>"},"hasCtx":true},{"id":"backlog/query","host":"ts","namespace":{"raw":"backlog","words":["backlog"]},"path":[{"raw":"query","words":["query"]}],"kind":"action","async":false,"streaming":false,"safe":false,"input":{"type":"object","properties":{"input":{"type":"object","properties":{"text":{"type":"string"},"filter":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"project":{"type":"string","description":"uid or name (SPEC.md §6.1)."},"component":{"type":"string","description":"uid or name, scoped within `project`."},"kind":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"status":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"string","const":"open"},{"type":"string","const":"closed"},{"type":"string","const":"all"}]},"priority":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"assignee":{"type":"string"},"claimedBy":{"type":"string"},"author":{"type":"string","description":"Resolves via `authored_by` edge traversal — uid or name."},"grep":{"type":"string","description":"FTS keyword, title+body — keyword-only, never hybrid."},"semantic":{"type":"string","description":"Routes to `searchRanked` (§5a) — composes with `grep`, neither swallows the other."},"anchor":{"type":"string","description":"Item-anchored similarity/traversal seed (§6.1) — uid of the reference item."},"plan":{"type":"string","description":"uid or name of the parent `issue` this one is filed under via the `part_of` edge (SPEC.md §1052/§1471: a plan is itself an `issue` row, not a dedicated node kind — attaching an item to it is `relate(childUid, planUid, 'part_of', 'add')`). Resolves candidate issues by the incoming `part_of` edge into the resolved plan node, exactly like the `project`/`component` edge-scoped filters."},"projectPath":{"type":"string","description":"`component.meta.path` (repo-relative package path, SPEC.md §3) — exact match against every live `component` row, unioned across matches. Distinct from `component`, which takes a uid/name rather than a filesystem path."},"closedAt":{"type":"object","properties":{"since":{"type":"string"},"until":{"type":"string"}},"additionalProperties":false},"createdAt":{"type":"object","properties":{"since":{"type":"string"},"until":{"type":"string"}},"additionalProperties":false},"updatedAt":{"type":"object","properties":{"since":{"type":"string"},"until":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"description":"SPEC.md §6.5's `IIssueFilter`."},"fields":{"type":"array","items":{"$schema":"http://json-schema.org/draft-07/schema#","oneOf":[{"$ref":"#/definitions/IIssuePlainField"},{"$ref":"#/definitions/IIssuePseudoField"}],"x-apigen-logical":"union"}},"sort":{"$schema":"http://json-schema.org/draft-07/schema#","type":"string","enum":["priority","updated","created","relevance","textMatch"]},"direction":{"$schema":"http://json-schema.org/draft-07/schema#","type":"string","enum":["asc","desc"]},"limit":{"type":"number"},"offset":{"type":"number"},"after":{"type":"string"},"view":{"$schema":"http://json-schema.org/draft-07/schema#","type":"string","enum":["list","ready","graph","order","stale","similar","overlap","projects","components","locations"],"description":"`projects`/`components`/`locations` (SPEC.md §3a/§8 AC-9) are the registry LIST views — every live `project`/`component`/`location` row, optionally narrowed by `filter.project` (and, for `locations`, `filter.component`) — routed to `views/registry.ts`'s `listProjects`/`listComponents`/ `listLocations`, distinct from the issue-search views above (§6.1: \"conflating the two would be wrong\")."},"format":{"$schema":"http://json-schema.org/draft-07/schema#","type":"string","enum":["json","markdown"]},"overlapAxis":{"$schema":"http://json-schema.org/draft-07/schema#","type":"string","enum":["file","project","component","author"],"description":"SPEC.md §5, §6.1's `axis` — the grouping dimension for `overlapUids` (§6.2)."},"overlapUids":{"type":"array","items":{"type":"string"}},"staleAfterMin":{"type":"number"}},"additionalProperties":false}},"required":["input"],"definitions":{"IIssuePlainField":{"type":"string","enum":["uid","title","kind","status","priority","project","component","createdAt","updatedAt","assignee","author","closedAt","gitContext"],"description":"The closed field vocabulary a `get`/`query` caller may request (SPEC.md §6.5). `assertKnownFields` (this module's {@link assertKnownIssueFields } ) rejects any name outside this union with a `BacklogValidationError` naming it — never a silent drop.\n\n`plain` fields are cheap: each is either a column on the `issue` node itself or a scalar living in `issue.meta.metadata` (`assignee`, `closedAt`, `gitContext` — SPEC.md §6.5's own reclassification of `closedAt` as `plain`, since it is read in the SAME single-row fetch as `assignee`, not a second query; `gitContext` is the item-level disclosure-contract git context, a sibling of `assignee` in the same metadata blob).\n\n`pseudo` fields are opt-in only: each costs a genuine extra read (an edge traversal to another node kind, or only exists on a `searchRanked` response) and is therefore NEVER included in the default card."},"IIssuePseudoField":{"type":"string","enum":["body","citations","notes","auditTrail","blockers","related","_score","_vector"]}}},"output":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"code":{"$ref":"#/definitions/BacklogErrorCode"},"message":{"type":"string"},"details":{"$ref":"#/definitions/IOutcomeErrorDetails"}},"required":["code","message"],"additionalProperties":false,"description":"The error arm's payload."},"warnings":{"type":"array","items":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"oneOf":[{"type":"object","properties":{"view":{"type":"string","enum":["list"]},"items":{"type":"array","items":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"uid":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string"},"project":{"type":"string"},"component":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"assignee":{"type":"string"},"author":{"type":"string"},"closedAt":{"type":"string"},"gitContext":{"type":"string","description":"The item-level disclosure-contract git context (repo `AGENTS.md`'s \"Cite what you read\": the FIRST element of a `Citations:` block is `<active git context>`). A plain field — a sibling of `assignee` in `issue.meta.metadata`, read in the same single-row fetch. Rendered once at the head of the `Citations:` block by `markdown.ts`; never per-citation. Absent on every issue filed before the field existed, and on any issue whose `create`/`transition` supplied no `gitContext`."},"body":{"type":"string"},"citations":{"type":"array","items":{"$ref":"#/definitions/IIssueCitation"}},"notes":{"type":"array","items":{"$ref":"#/definitions/IIssueNote"}},"auditTrail":{"type":"array","items":{"$ref":"#/definitions/IIssueAuditEntry"}},"blockers":{"type":"array","items":{"$ref":"#/definitions/IIssueRef"}},"related":{"type":"array","items":{"$ref":"#/definitions/IIssueRef"}},"_score":{"type":"number"},"_vector":{"type":"array","items":{"type":"number"}}},"required":["uid"],"additionalProperties":false,"description":"The projected issue card (SPEC.md §6.5's `IIssueCard`). Every field is OPTIONAL here because the shape is fields-projected: a caller that asked for `['uid','title']` gets a card with only those two keys populated. `uid` is always present regardless of the requested `fields` — an issue card with no addressable identity is never a useful response."}},"nextCursor":{"type":"string"},"hasMore":{"type":"boolean"}},"required":["view","items","hasMore"],"additionalProperties":false},{"type":"object","properties":{"view":{"type":"string","enum":["ready"]},"items":{"type":"array","items":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"uid":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string"},"project":{"type":"string"},"component":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"assignee":{"type":"string"},"author":{"type":"string"},"closedAt":{"type":"string"},"gitContext":{"type":"string","description":"The item-level disclosure-contract git context (repo `AGENTS.md`'s \"Cite what you read\": the FIRST element of a `Citations:` block is `<active git context>`). A plain field — a sibling of `assignee` in `issue.meta.metadata`, read in the same single-row fetch. Rendered once at the head of the `Citations:` block by `markdown.ts`; never per-citation. Absent on every issue filed before the field existed, and on any issue whose `create`/`transition` supplied no `gitContext`."},"body":{"type":"string"},"citations":{"type":"array","items":{"$ref":"#/definitions/IIssueCitation"}},"notes":{"type":"array","items":{"$ref":"#/definitions/IIssueNote"}},"auditTrail":{"type":"array","items":{"$ref":"#/definitions/IIssueAuditEntry"}},"blockers":{"type":"array","items":{"$ref":"#/definitions/IIssueRef"}},"related":{"type":"array","items":{"$ref":"#/definitions/IIssueRef"}},"_score":{"type":"number"},"_vector":{"type":"array","items":{"type":"number"}}},"required":["uid"],"additionalProperties":false,"description":"The projected issue card (SPEC.md §6.5's `IIssueCard`). Every field is OPTIONAL here because the shape is fields-projected: a caller that asked for `['uid','title']` gets a card with only those two keys populated. `uid` is always present regardless of the requested `fields` — an issue card with no addressable identity is never a useful response."}}},"required":["view","items"],"additionalProperties":false},{"type":"object","properties":{"view":{"type":"string","enum":["graph"]},"graph":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"nodes":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"}},"required":["uid","title","status"],"additionalProperties":false}},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"rel":{"type":"string","enum":["blocks","relates_to","part_of"]}},"required":["from","to","rel"],"additionalProperties":false}}},"required":["nodes","edges"],"additionalProperties":false,"description":"SPEC.md §5's `DependencyGraph`, using this system's edge vocabulary (§6.2: `blocks`, not `DEPENDS_ON`)."}},"required":["view","graph"],"additionalProperties":false},{"type":"object","properties":{"view":{"type":"string","enum":["order"]},"order":{"$schema":"http://json-schema.org/draft-07/schema#","oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":true},"order":{"type":"array","items":{"type":"string"}}},"required":["ok","order"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","const":false},"cycle":{"type":"array","items":{"type":"string"}}},"required":["ok","cycle"],"additionalProperties":false}],"x-apigen-logical":"union"}},"required":["view","order"],"additionalProperties":false},{"type":"object","properties":{"view":{"type":"string","enum":["stale"]},"items":{"type":"array","items":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"uid":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string"},"project":{"type":"string"},"component":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"assignee":{"type":"string"},"author":{"type":"string"},"closedAt":{"type":"string"},"gitContext":{"type":"string","description":"The item-level disclosure-contract git context (repo `AGENTS.md`'s \"Cite what you read\": the FIRST element of a `Citations:` block is `<active git context>`). A plain field — a sibling of `assignee` in `issue.meta.metadata`, read in the same single-row fetch. Rendered once at the head of the `Citations:` block by `markdown.ts`; never per-citation. Absent on every issue filed before the field existed, and on any issue whose `create`/`transition` supplied no `gitContext`."},"body":{"type":"string"},"citations":{"type":"array","items":{"$ref":"#/definitions/IIssueCitation"}},"notes":{"type":"array","items":{"$ref":"#/definitions/IIssueNote"}},"auditTrail":{"type":"array","items":{"$ref":"#/definitions/IIssueAuditEntry"}},"blockers":{"type":"array","items":{"$ref":"#/definitions/IIssueRef"}},"related":{"type":"array","items":{"$ref":"#/definitions/IIssueRef"}},"_score":{"type":"number"},"_vector":{"type":"array","items":{"type":"number"}}},"required":["uid"],"additionalProperties":false,"description":"The projected issue card (SPEC.md §6.5's `IIssueCard`). Every field is OPTIONAL here because the shape is fields-projected: a caller that asked for `['uid','title']` gets a card with only those two keys populated. `uid` is always present regardless of the requested `fields` — an issue card with no addressable identity is never a useful response."}}},"required":["view","items"],"additionalProperties":false},{"type":"object","properties":{"view":{"type":"string","enum":["similar"]},"items":{"type":"array","items":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"uid":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string"},"project":{"type":"string"},"component":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"assignee":{"type":"string"},"author":{"type":"string"},"closedAt":{"type":"string"},"gitContext":{"type":"string","description":"The item-level disclosure-contract git context (repo `AGENTS.md`'s \"Cite what you read\": the FIRST element of a `Citations:` block is `<active git context>`). A plain field — a sibling of `assignee` in `issue.meta.metadata`, read in the same single-row fetch. Rendered once at the head of the `Citations:` block by `markdown.ts`; never per-citation. Absent on every issue filed before the field existed, and on any issue whose `create`/`transition` supplied no `gitContext`."},"body":{"type":"string"},"citations":{"type":"array","items":{"$ref":"#/definitions/IIssueCitation"}},"notes":{"type":"array","items":{"$ref":"#/definitions/IIssueNote"}},"auditTrail":{"type":"array","items":{"$ref":"#/definitions/IIssueAuditEntry"}},"blockers":{"type":"array","items":{"$ref":"#/definitions/IIssueRef"}},"related":{"type":"array","items":{"$ref":"#/definitions/IIssueRef"}},"_score":{"type":"number"},"_vector":{"type":"array","items":{"type":"number"}}},"required":["uid"],"additionalProperties":false,"description":"The projected issue card (SPEC.md §6.5's `IIssueCard`). Every field is OPTIONAL here because the shape is fields-projected: a caller that asked for `['uid','title']` gets a card with only those two keys populated. `uid` is always present regardless of the requested `fields` — an issue card with no addressable identity is never a useful response."}}},"required":["view","items"],"additionalProperties":false},{"type":"object","properties":{"view":{"type":"string","enum":["overlap"]},"groups":{"type":"array","items":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"axisValue":{"type":"string"},"uids":{"type":"array","items":{"type":"string"}}},"required":["axisValue","uids"],"additionalProperties":false,"description":"`view:'overlap'`'s output shape (§6.2) — one entry per distinct axis value shared by ≥1 of the input `uids`."}}},"required":["view","groups"],"additionalProperties":false},{"type":"object","properties":{"view":{"type":"string","enum":["projects"]},"items":{"type":"array","items":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"uid":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"},"repoUrl":{"type":"string"},"monorepo":{"type":"boolean"},"description":{"type":"string"}},"required":["uid","name"],"additionalProperties":false}}},"required":["view","items"],"additionalProperties":false},{"type":"object","properties":{"view":{"type":"string","enum":["components"]},"items":{"type":"array","items":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"uid":{"type":"string"},"name":{"type":"string"},"projectUid":{"type":"string"},"path":{"type":"string"},"description":{"type":"string"}},"required":["uid","name","projectUid"],"additionalProperties":false}}},"required":["view","items"],"additionalProperties":false},{"type":"object","properties":{"view":{"type":"string","enum":["locations"]},"items":{"type":"array","items":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"uid":{"type":"string"},"locType":{"$ref":"#/definitions/ILocationType"},"value":{"type":"string"},"componentUid":{"type":"string"}},"required":["uid","locType","value","componentUid"],"additionalProperties":false}}},"required":["view","items"],"additionalProperties":false},{"type":"object","properties":{"view":{"type":"string","enum":["list","ready","stale","similar"]},"format":{"type":"string","enum":["markdown"]},"markdown":{"type":"string"}},"required":["view","format","markdown"],"additionalProperties":false}],"x-apigen-logical":"union"},"warnings":{"type":"array","items":{"type":"string"}},"meta":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"total":{"type":"number","description":"Matching rows before limit/offset — the TRUE count."},"returned":{"type":"number","description":"Rows actually in `data`."},"limit":{"type":"number"},"offset":{"type":"number"},"truncated":{"type":"boolean","description":"Set when the result set was cut short by anything other than the caller's own `limit`. A silent cap is forbidden — if it happens, it is stated here."}},"required":["total","returned"],"additionalProperties":false,"description":"Pagination truth carried beside the data. `total` is the count BEFORE `limit`/`offset`; `returned` is `data.length`. A silently-truncated list is indistinguishable from a complete one unless the envelope says how many there really were."}},"required":["ok","data"],"additionalProperties":false}],"x-apigen-logical":"union","definitions":{"BacklogErrorCode":{"type":"string","enum":["not_found","item_not_found","invalid_argument","validation","store_busy","rag_not_configured","conflict","precondition_failed","internal"],"description":"The closed union of envelope error codes. See {@link BACKLOG_ERROR_CODES } ."},"IOutcomeErrorDetails":{"type":"object","properties":{"retryable":{"type":"boolean","description":"True only for transient codes (today: `store_busy`)."},"retryAfterMs":{"type":"number","description":"Suggested backoff in milliseconds; only meaningful when `retryable`."},"internalRef":{"type":"string","description":"Internal doc/plan reference for an `invalid_argument` whose underlying reason cites internal terminology (a plan id, a spec section) that does not belong in the user-facing `message`."}},"additionalProperties":{},"description":"`error.details`. `retryable`/`retryAfterMs` exist so an agent knows whether to retry a `store_busy` and with what backoff instead of hot-looping. Open-ended beyond those: individual codes attach their own evidence."},"IIssueCitation":{"type":"object","properties":{"uid":{"type":"string"},"file":{"type":"string"},"lines":{"type":"string"},"context":{"type":"string","description":"Free-text prose for this citation (the write layer's `ICitationInput.context`). NOT the item's disclosure-contract git context — that is ITEM-level provenance and lives on {@link IIssueCard.gitContext } , a sibling of `assignee`, rendered once at the head of the `Citations:` block. This per-citation `context` is never rendered by `markdown.ts` and cannot carry the git context."},"symbol":{"type":"string"},"sha":{"type":"string"},"at":{"type":"string"}},"required":["uid","file","sha","at"],"additionalProperties":false,"description":"A citation, projected for read (mirrors the write layer's `ICitationInput` shape plus the server-computed `sha`)."},"IIssueNote":{"type":"object","properties":{"uid":{"type":"string"},"author":{"type":"string"},"text":{"type":"string"},"at":{"type":"string"}},"required":["uid","author","text","at"],"additionalProperties":false},"IIssueAuditEntry":{"type":"object","properties":{"uid":{"type":"string"},"actor":{"type":"string"},"action":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"note":{"type":"string"},"sha":{"type":"string"},"at":{"type":"string"}},"required":["uid","actor","action","sha","at"],"additionalProperties":false},"IIssueRef":{"type":"object","properties":{"uid":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"}},"required":["uid","title","status"],"additionalProperties":false,"description":"A minimal cross-reference to another issue — used by the `blockers`/`related` pseudo-fields."},"ILocationType":{"type":"string","enum":["path","url","tool"]}}},"envelope":{},"typeText":{"lang":"ts","input":"(input: import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/query/types\").IIssueQueryInput)","output":"import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/envelope\").IOutcomeEnvelope<import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/query/types\").IIssueQueryResult>"},"hasCtx":true},{"id":"backlog/priority-matrix","host":"ts","namespace":{"raw":"backlog","words":["backlog"]},"path":[{"raw":"priorityMatrix","words":["priority","matrix"]}],"kind":"action","async":false,"streaming":false,"safe":false,"input":{"type":"object","properties":{"input":{"type":"object","properties":{"filter":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"project":{"type":"string","description":"uid or name (SPEC.md §6.1)."},"component":{"type":"string","description":"uid or name, scoped within `project`."},"kind":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"status":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"string","const":"open"},{"type":"string","const":"closed"},{"type":"string","const":"all"}]},"priority":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"assignee":{"type":"string"},"claimedBy":{"type":"string"},"author":{"type":"string","description":"Resolves via `authored_by` edge traversal — uid or name."},"grep":{"type":"string","description":"FTS keyword, title+body — keyword-only, never hybrid."},"semantic":{"type":"string","description":"Routes to `searchRanked` (§5a) — composes with `grep`, neither swallows the other."},"anchor":{"type":"string","description":"Item-anchored similarity/traversal seed (§6.1) — uid of the reference item."},"plan":{"type":"string","description":"uid or name of the parent `issue` this one is filed under via the `part_of` edge (SPEC.md §1052/§1471: a plan is itself an `issue` row, not a dedicated node kind — attaching an item to it is `relate(childUid, planUid, 'part_of', 'add')`). Resolves candidate issues by the incoming `part_of` edge into the resolved plan node, exactly like the `project`/`component` edge-scoped filters."},"projectPath":{"type":"string","description":"`component.meta.path` (repo-relative package path, SPEC.md §3) — exact match against every live `component` row, unioned across matches. Distinct from `component`, which takes a uid/name rather than a filesystem path."},"closedAt":{"type":"object","properties":{"since":{"type":"string"},"until":{"type":"string"}},"additionalProperties":false},"createdAt":{"type":"object","properties":{"since":{"type":"string"},"until":{"type":"string"}},"additionalProperties":false},"updatedAt":{"type":"object","properties":{"since":{"type":"string"},"until":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"description":"SPEC.md §6.5's `IIssueFilter`."}},"additionalProperties":false}},"required":["input"]},"output":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"code":{"$ref":"#/definitions/BacklogErrorCode"},"message":{"type":"string"},"details":{"$ref":"#/definitions/IOutcomeErrorDetails"}},"required":["code","message"],"additionalProperties":false,"description":"The error arm's payload."},"warnings":{"type":"array","items":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","properties":{"rows":{"type":"array","items":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"priority":{"type":"string"},"priorityUid":{"type":"string"},"rank":{"type":"number","description":"`priority.meta.metadata.rank` (`nextPriorityRankTx`, §2) — lower is more urgent. Absent only for a malformed pre-existing row with no numeric rank; the count itself is still real."},"count":{"type":"number"}},"required":["priority","priorityUid","count"],"additionalProperties":false}},"unassigned":{"type":"number"},"statusScope":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"x-apigen-logical":"union"}},"required":["rows","unassigned","statusScope"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}},"meta":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"total":{"type":"number","description":"Matching rows before limit/offset — the TRUE count."},"returned":{"type":"number","description":"Rows actually in `data`."},"limit":{"type":"number"},"offset":{"type":"number"},"truncated":{"type":"boolean","description":"Set when the result set was cut short by anything other than the caller's own `limit`. A silent cap is forbidden — if it happens, it is stated here."}},"required":["total","returned"],"additionalProperties":false,"description":"Pagination truth carried beside the data. `total` is the count BEFORE `limit`/`offset`; `returned` is `data.length`. A silently-truncated list is indistinguishable from a complete one unless the envelope says how many there really were."}},"required":["ok","data"],"additionalProperties":false}],"x-apigen-logical":"union","definitions":{"BacklogErrorCode":{"type":"string","enum":["not_found","item_not_found","invalid_argument","validation","store_busy","rag_not_configured","conflict","precondition_failed","internal"],"description":"The closed union of envelope error codes. See {@link BACKLOG_ERROR_CODES } ."},"IOutcomeErrorDetails":{"type":"object","properties":{"retryable":{"type":"boolean","description":"True only for transient codes (today: `store_busy`)."},"retryAfterMs":{"type":"number","description":"Suggested backoff in milliseconds; only meaningful when `retryable`."},"internalRef":{"type":"string","description":"Internal doc/plan reference for an `invalid_argument` whose underlying reason cites internal terminology (a plan id, a spec section) that does not belong in the user-facing `message`."}},"additionalProperties":{},"description":"`error.details`. `retryable`/`retryAfterMs` exist so an agent knows whether to retry a `store_busy` and with what backoff instead of hot-looping. Open-ended beyond those: individual codes attach their own evidence."}}},"envelope":{},"typeText":{"lang":"ts","input":"(input: import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/query/views/stats\").IPriorityMatrixInput)","output":"import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/envelope\").IOutcomeEnvelope<import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/query/views/stats\").IPriorityMatrixResult>"},"hasCtx":true},{"id":"backlog/part-of-rollup","host":"ts","namespace":{"raw":"backlog","words":["backlog"]},"path":[{"raw":"partOfRollup","words":["part","of","rollup"]}],"kind":"action","async":false,"streaming":false,"safe":false,"input":{"type":"object","properties":{"input":{"type":"object","properties":{"uid":{"type":"string"}},"required":["uid"],"additionalProperties":false}},"required":["input"]},"output":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"code":{"$ref":"#/definitions/BacklogErrorCode"},"message":{"type":"string"},"details":{"$ref":"#/definitions/IOutcomeErrorDetails"}},"required":["code","message"],"additionalProperties":false,"description":"The error arm's payload."},"warnings":{"type":"array","items":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","properties":{"uid":{"type":"string"},"childrenTotal":{"type":"number"},"childrenOpen":{"type":"number"},"childrenClosed":{"type":"number"},"childrenOpenUids":{"type":"array","items":{"type":"string"}}},"required":["uid","childrenTotal","childrenOpen","childrenClosed","childrenOpenUids"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}},"meta":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"total":{"type":"number","description":"Matching rows before limit/offset — the TRUE count."},"returned":{"type":"number","description":"Rows actually in `data`."},"limit":{"type":"number"},"offset":{"type":"number"},"truncated":{"type":"boolean","description":"Set when the result set was cut short by anything other than the caller's own `limit`. A silent cap is forbidden — if it happens, it is stated here."}},"required":["total","returned"],"additionalProperties":false,"description":"Pagination truth carried beside the data. `total` is the count BEFORE `limit`/`offset`; `returned` is `data.length`. A silently-truncated list is indistinguishable from a complete one unless the envelope says how many there really were."}},"required":["ok","data"],"additionalProperties":false}],"x-apigen-logical":"union","definitions":{"BacklogErrorCode":{"type":"string","enum":["not_found","item_not_found","invalid_argument","validation","store_busy","rag_not_configured","conflict","precondition_failed","internal"],"description":"The closed union of envelope error codes. See {@link BACKLOG_ERROR_CODES } ."},"IOutcomeErrorDetails":{"type":"object","properties":{"retryable":{"type":"boolean","description":"True only for transient codes (today: `store_busy`)."},"retryAfterMs":{"type":"number","description":"Suggested backoff in milliseconds; only meaningful when `retryable`."},"internalRef":{"type":"string","description":"Internal doc/plan reference for an `invalid_argument` whose underlying reason cites internal terminology (a plan id, a spec section) that does not belong in the user-facing `message`."}},"additionalProperties":{},"description":"`error.details`. `retryable`/`retryAfterMs` exist so an agent knows whether to retry a `store_busy` and with what backoff instead of hot-looping. Open-ended beyond those: individual codes attach their own evidence."}}},"envelope":{},"typeText":{"lang":"ts","input":"(input: import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/query/views/stats\").IPartOfRollupInput)","output":"import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/envelope\").IOutcomeEnvelope<import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/query/views/stats\").IPartOfRollupResult>"},"hasCtx":true},{"id":"backlog/open-curve","host":"ts","namespace":{"raw":"backlog","words":["backlog"]},"path":[{"raw":"openCurve","words":["open","curve"]}],"kind":"action","async":false,"streaming":false,"safe":false,"input":{"type":"object","properties":{"input":{"type":"object","properties":{"filter":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"project":{"type":"string","description":"uid or name (SPEC.md §6.1)."},"component":{"type":"string","description":"uid or name, scoped within `project`."},"kind":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"status":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"string","const":"open"},{"type":"string","const":"closed"},{"type":"string","const":"all"}]},"priority":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"assignee":{"type":"string"},"claimedBy":{"type":"string"},"author":{"type":"string","description":"Resolves via `authored_by` edge traversal — uid or name."},"grep":{"type":"string","description":"FTS keyword, title+body — keyword-only, never hybrid."},"semantic":{"type":"string","description":"Routes to `searchRanked` (§5a) — composes with `grep`, neither swallows the other."},"anchor":{"type":"string","description":"Item-anchored similarity/traversal seed (§6.1) — uid of the reference item."},"plan":{"type":"string","description":"uid or name of the parent `issue` this one is filed under via the `part_of` edge (SPEC.md §1052/§1471: a plan is itself an `issue` row, not a dedicated node kind — attaching an item to it is `relate(childUid, planUid, 'part_of', 'add')`). Resolves candidate issues by the incoming `part_of` edge into the resolved plan node, exactly like the `project`/`component` edge-scoped filters."},"projectPath":{"type":"string","description":"`component.meta.path` (repo-relative package path, SPEC.md §3) — exact match against every live `component` row, unioned across matches. Distinct from `component`, which takes a uid/name rather than a filesystem path."},"closedAt":{"type":"object","properties":{"since":{"type":"string"},"until":{"type":"string"}},"additionalProperties":false},"createdAt":{"type":"object","properties":{"since":{"type":"string"},"until":{"type":"string"}},"additionalProperties":false},"updatedAt":{"type":"object","properties":{"since":{"type":"string"},"until":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"description":"SPEC.md §6.5's `IIssueFilter`."},"at":{"type":"array","items":{"type":"string"}}},"required":["at"],"additionalProperties":false}},"required":["input"]},"output":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"code":{"$ref":"#/definitions/BacklogErrorCode"},"message":{"type":"string"},"details":{"$ref":"#/definitions/IOutcomeErrorDetails"}},"required":["code","message"],"additionalProperties":false,"description":"The error arm's payload."},"warnings":{"type":"array","items":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","properties":{"points":{"type":"array","items":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"at":{"type":"string"},"existed":{"type":"number","description":"In-scope issues that EXISTED at this instant (`NodeFilter.validAt`: `t_created <= at` and `t_invalid` is null or after `at`) — exact, never reconstructed."},"open":{"type":"number","description":"Of `existed`, the count whose RECONSTRUCTED status was non-terminal at this instant (never the issue's CURRENT status) — see {@link reconstructStatusAt } ."},"closed":{"type":"number","description":"`existed - open`."}},"required":["at","existed","open","closed"],"additionalProperties":false}}},"required":["points"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}},"meta":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"total":{"type":"number","description":"Matching rows before limit/offset — the TRUE count."},"returned":{"type":"number","description":"Rows actually in `data`."},"limit":{"type":"number"},"offset":{"type":"number"},"truncated":{"type":"boolean","description":"Set when the result set was cut short by anything other than the caller's own `limit`. A silent cap is forbidden — if it happens, it is stated here."}},"required":["total","returned"],"additionalProperties":false,"description":"Pagination truth carried beside the data. `total` is the count BEFORE `limit`/`offset`; `returned` is `data.length`. A silently-truncated list is indistinguishable from a complete one unless the envelope says how many there really were."}},"required":["ok","data"],"additionalProperties":false}],"x-apigen-logical":"union","definitions":{"BacklogErrorCode":{"type":"string","enum":["not_found","item_not_found","invalid_argument","validation","store_busy","rag_not_configured","conflict","precondition_failed","internal"],"description":"The closed union of envelope error codes. See {@link BACKLOG_ERROR_CODES } ."},"IOutcomeErrorDetails":{"type":"object","properties":{"retryable":{"type":"boolean","description":"True only for transient codes (today: `store_busy`)."},"retryAfterMs":{"type":"number","description":"Suggested backoff in milliseconds; only meaningful when `retryable`."},"internalRef":{"type":"string","description":"Internal doc/plan reference for an `invalid_argument` whose underlying reason cites internal terminology (a plan id, a spec section) that does not belong in the user-facing `message`."}},"additionalProperties":{},"description":"`error.details`. `retryable`/`retryAfterMs` exist so an agent knows whether to retry a `store_busy` and with what backoff instead of hot-looping. Open-ended beyond those: individual codes attach their own evidence."}}},"envelope":{},"typeText":{"lang":"ts","input":"(input: import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/query/views/stats\").IOpenCurveInput)","output":"import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/envelope\").IOutcomeEnvelope<import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/query/views/stats\").IOpenCurveResult>"},"hasCtx":true},{"id":"backlog/embedding-status","host":"ts","namespace":{"raw":"backlog","words":["backlog"]},"path":[{"raw":"embeddingStatus","words":["embedding","status"]}],"kind":"action","async":false,"streaming":false,"safe":false,"input":{"type":"object","properties":{},"required":[]},"output":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"code":{"$ref":"#/definitions/BacklogErrorCode"},"message":{"type":"string"},"details":{"$ref":"#/definitions/IOutcomeErrorDetails"}},"required":["code","message"],"additionalProperties":false,"description":"The error arm's payload."},"warnings":{"type":"array","items":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","properties":{"configuredEnabled":{"type":"boolean"},"effectiveEnabled":{"type":"boolean"},"provider":{"type":"string"},"model":{"type":"string"},"membersPresent":{"type":"object","properties":{"embedding":{"type":"boolean"},"search":{"type":"boolean"}},"required":["embedding","search"],"additionalProperties":false},"divergent":{"type":"boolean"},"startupHash":{"type":"string"},"currentHash":{"type":"string"}},"required":["configuredEnabled","effectiveEnabled","provider","model","membersPresent","divergent","startupHash","currentHash"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}},"meta":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"total":{"type":"number","description":"Matching rows before limit/offset — the TRUE count."},"returned":{"type":"number","description":"Rows actually in `data`."},"limit":{"type":"number"},"offset":{"type":"number"},"truncated":{"type":"boolean","description":"Set when the result set was cut short by anything other than the caller's own `limit`. A silent cap is forbidden — if it happens, it is stated here."}},"required":["total","returned"],"additionalProperties":false,"description":"Pagination truth carried beside the data. `total` is the count BEFORE `limit`/`offset`; `returned` is `data.length`. A silently-truncated list is indistinguishable from a complete one unless the envelope says how many there really were."}},"required":["ok","data"],"additionalProperties":false}],"x-apigen-logical":"union","definitions":{"BacklogErrorCode":{"type":"string","enum":["not_found","item_not_found","invalid_argument","validation","store_busy","rag_not_configured","conflict","precondition_failed","internal"],"description":"The closed union of envelope error codes. See {@link BACKLOG_ERROR_CODES } ."},"IOutcomeErrorDetails":{"type":"object","properties":{"retryable":{"type":"boolean","description":"True only for transient codes (today: `store_busy`)."},"retryAfterMs":{"type":"number","description":"Suggested backoff in milliseconds; only meaningful when `retryable`."},"internalRef":{"type":"string","description":"Internal doc/plan reference for an `invalid_argument` whose underlying reason cites internal terminology (a plan id, a spec section) that does not belong in the user-facing `message`."}},"additionalProperties":{},"description":"`error.details`. `retryable`/`retryAfterMs` exist so an agent knows whether to retry a `store_busy` and with what backoff instead of hot-looping. Open-ended beyond those: individual codes attach their own evidence."}}},"envelope":{},"typeText":{"lang":"ts","input":"()","output":"import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/envelope\").IOutcomeEnvelope<import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/api\").IEmbeddingStatusResult>"},"hasCtx":true},{"id":"backlog/lookup","host":"ts","namespace":{"raw":"backlog","words":["backlog"]},"path":[{"raw":"lookup","words":["lookup"]}],"kind":"action","async":false,"streaming":false,"safe":false,"input":{"type":"object","properties":{"input":{"type":"object","properties":{"q":{"type":"string"}},"required":["q"],"additionalProperties":false}},"required":["input"]},"output":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"code":{"$ref":"#/definitions/BacklogErrorCode"},"message":{"type":"string"},"details":{"$ref":"#/definitions/IOutcomeErrorDetails"}},"required":["code","message"],"additionalProperties":false,"description":"The error arm's payload."},"warnings":{"type":"array","items":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","properties":{"project":{"type":"object","properties":{"uid":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"},"repoUrl":{"type":"string"}},"required":["uid","name"],"additionalProperties":false},"component":{"type":"object","properties":{"uid":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"}},"required":["uid","name"],"additionalProperties":false},"location":{"type":"object","properties":{"uid":{"type":"string"},"locType":{"$schema":"http://json-schema.org/draft-07/schema#","type":"string","enum":["path","url","tool"]},"value":{"type":"string"}},"required":["uid","locType","value"],"additionalProperties":false},"hint":{"type":"string"}},"required":["project"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}},"meta":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"total":{"type":"number","description":"Matching rows before limit/offset — the TRUE count."},"returned":{"type":"number","description":"Rows actually in `data`."},"limit":{"type":"number"},"offset":{"type":"number"},"truncated":{"type":"boolean","description":"Set when the result set was cut short by anything other than the caller's own `limit`. A silent cap is forbidden — if it happens, it is stated here."}},"required":["total","returned"],"additionalProperties":false,"description":"Pagination truth carried beside the data. `total` is the count BEFORE `limit`/`offset`; `returned` is `data.length`. A silently-truncated list is indistinguishable from a complete one unless the envelope says how many there really were."}},"required":["ok","data"],"additionalProperties":false}],"x-apigen-logical":"union","definitions":{"BacklogErrorCode":{"type":"string","enum":["not_found","item_not_found","invalid_argument","validation","store_busy","rag_not_configured","conflict","precondition_failed","internal"],"description":"The closed union of envelope error codes. See {@link BACKLOG_ERROR_CODES } ."},"IOutcomeErrorDetails":{"type":"object","properties":{"retryable":{"type":"boolean","description":"True only for transient codes (today: `store_busy`)."},"retryAfterMs":{"type":"number","description":"Suggested backoff in milliseconds; only meaningful when `retryable`."},"internalRef":{"type":"string","description":"Internal doc/plan reference for an `invalid_argument` whose underlying reason cites internal terminology (a plan id, a spec section) that does not belong in the user-facing `message`."}},"additionalProperties":{},"description":"`error.details`. `retryable`/`retryAfterMs` exist so an agent knows whether to retry a `store_busy` and with what backoff instead of hot-looping. Open-ended beyond those: individual codes attach their own evidence."}}},"envelope":{},"typeText":{"lang":"ts","input":"(input: { q: string; })","output":"import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/envelope\").IOutcomeEnvelope<import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/query/types\").ILookupResult>"},"hasCtx":true},{"id":"backlog/create","host":"ts","namespace":{"raw":"backlog","words":["backlog"]},"path":[{"raw":"create","words":["create"]}],"kind":"action","async":false,"streaming":false,"safe":false,"input":{"type":"object","properties":{"input":{"type":"object","properties":{"title":{"type":"string"},"body":{"type":"string"},"project":{"type":"string"},"component":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string"},"citations":{"type":"array","items":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"file":{"type":"string"},"lines":{"type":"string"},"context":{"type":"string"},"symbol":{"type":"string"},"blastRadius":{"description":"Best-effort enrichment payload — not re-specified here; carried through verbatim into the citation node's metadata."}},"required":["file"],"additionalProperties":false,"description":"A filing-time citation (§6.3.2, carried forward from the established `Citation` shape in spirit — `blastRadius` stays best-effort, `model.ts:110-120`). Named `ICitationInput` here (not the spec's bare `Citation`) per this repo's \"prefix shared/data interfaces with `I`\" convention."}},"author":{"type":"string"},"assignee":{"type":"string"},"gitContext":{"type":"string"},"by":{"type":"string"},"duplicateAction":{"type":"string","enum":["abort","force","comment"]},"awaitEmbed":{"type":"boolean"}},"required":["title","body","project","by"],"additionalProperties":false}},"required":["input"]},"output":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"code":{"$ref":"#/definitions/BacklogErrorCode"},"message":{"type":"string"},"details":{"$ref":"#/definitions/IOutcomeErrorDetails"}},"required":["code","message"],"additionalProperties":false,"description":"The error arm's payload."},"warnings":{"type":"array","items":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","properties":{"created":{"type":"boolean"},"uid":{"type":"string"},"item":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"uid":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string"},"project":{"type":"string"},"component":{"type":"string"},"createdAt":{"type":"string"},"assignee":{"type":"string"},"author":{"type":"string"},"closedAt":{"type":"string"},"gitContext":{"type":"string","description":"The item-level disclosure-contract git context, echoed back from {@link ICreateIssueInput.gitContext } — present iff one was supplied."}},"required":["uid","title","kind","status","project","component","createdAt"],"additionalProperties":false,"description":"The \"plain\" card fields (§6.5) this verb already has in hand after a create — never field-projected, unlike a `query` response.\n\nBUG-APIGEN-CORE-CLIENT-BARE-NAME-COLLISION-001: named `ICreateIssueCard`, not `IIssueCard`, deliberately. `query/types.ts` also exports an `IIssueCard` (the fields-projected card `query`/`get` return, every field but `uid` optional) — both interfaces were reachable from `api.d.ts`'s type graph, and apigen's extraction (`ts-json-schema-generator`, invoked per-operation but apparently resolving/caching declarations by bare name across the whole extracted program) non-deterministically resolved the `IIssueCard` bare name to EITHER declaration depending on extraction order — confirmed empirically: `dist/index.js` (CJS) resolved `query`'s own `items: IIssueCard[]` to THIS file's stricter shape (wrongly requiring `project`/`component`/`createdAt`), while `dist/index.mjs` (ESM) failed to resolve it at all (`items: {}`, unconstrained) — from the exact same source, built in the same pass. This is what broke `backlog_query`'s MCP `oneOf` output-schema validation the moment `get()`'s return type union (AC-11) made the extractor visit both `IIssueCard` declarations. The correct, permanent fix is what's below: give the two interfaces distinct bare names so extraction can never conflate them, not a workaround in the `get()`/`query()` call sites. Filed as BUG-APIGEN-CORE-CLIENT-BARE-NAME-COLLISION-001 (apigen-core-client, out of this package's ownership) — this rename is the local mitigation; the extractor itself should also stop keying declarations by bare name.\n\nThis rename fixes the CJS path (`dist/index.js`, the only bundle any real transport here — CLI, MCP-stdio, HTTP serve — ever spawns/requires; confirmed empirically, `dist/index.mjs` is loaded by none of them). It does NOT fix a second, DISTINCT defect also present in `dist/index.mjs`: every `$ref` to a NAMED exported interface (`ICreateIssueCard` here, `IDuplicateCandidate`, `IIssueCard`, …) dereferences to `{}` (empty/ unconstrained) in the ESM build specifically, while inline/anonymous object types on the SAME operation (e.g. `ICreateIssueResult.commentedOn`) resolve correctly in both builds — ruling out a general extraction failure and pointing at `dereferenceSchema`'s named-`$ref` resolution specifically misbehaving under ESM. Reproduced on `create`'s `item`/ `duplicateCandidates` fields, which this file's own diff never touched, so it predates and is independent of the collision above. Filed separately as BUG-APIGEN-CORE-CLIENT-ESM-DEREF-EMPTY-001 — not fixed here (out of this package's ownership, and no real consumer loads `dist/index.mjs` today), but must not be silently dropped."},"duplicateCandidates":{"type":"array","items":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"uid":{"type":"string"},"title":{"type":"string"},"score":{"type":"number","description":"Cosine similarity in `[0,1]`, straight off the vector channel — directly comparable to `project_policy.dedupe_threshold`."}},"required":["uid","title","score"],"additionalProperties":false,"description":"A dedupe candidate surfaced at filing time (§6.4), carrying the cosine similarity that produced it — see {@link scanForDuplicates } 's own doc comment for where that number comes from and why it is the only score this gate will accept."}},"reason":{"type":"string","enum":["duplicate-suppressed"]},"supersededUid":{"type":"string"},"commentedOn":{"type":"object","properties":{"uid":{"type":"string"},"noteId":{"type":"string"}},"required":["uid","noteId"],"additionalProperties":false}},"required":["created"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}},"meta":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"total":{"type":"number","description":"Matching rows before limit/offset — the TRUE count."},"returned":{"type":"number","description":"Rows actually in `data`."},"limit":{"type":"number"},"offset":{"type":"number"},"truncated":{"type":"boolean","description":"Set when the result set was cut short by anything other than the caller's own `limit`. A silent cap is forbidden — if it happens, it is stated here."}},"required":["total","returned"],"additionalProperties":false,"description":"Pagination truth carried beside the data. `total` is the count BEFORE `limit`/`offset`; `returned` is `data.length`. A silently-truncated list is indistinguishable from a complete one unless the envelope says how many there really were."}},"required":["ok","data"],"additionalProperties":false}],"x-apigen-logical":"union","definitions":{"BacklogErrorCode":{"type":"string","enum":["not_found","item_not_found","invalid_argument","validation","store_busy","rag_not_configured","conflict","precondition_failed","internal"],"description":"The closed union of envelope error codes. See {@link BACKLOG_ERROR_CODES } ."},"IOutcomeErrorDetails":{"type":"object","properties":{"retryable":{"type":"boolean","description":"True only for transient codes (today: `store_busy`)."},"retryAfterMs":{"type":"number","description":"Suggested backoff in milliseconds; only meaningful when `retryable`."},"internalRef":{"type":"string","description":"Internal doc/plan reference for an `invalid_argument` whose underlying reason cites internal terminology (a plan id, a spec section) that does not belong in the user-facing `message`."}},"additionalProperties":{},"description":"`error.details`. `retryable`/`retryAfterMs` exist so an agent knows whether to retry a `store_busy` and with what backoff instead of hot-looping. Open-ended beyond those: individual codes attach their own evidence."}}},"envelope":{},"typeText":{"lang":"ts","input":"(input: import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/write/create-issue\").ICreateIssueInput)","output":"import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/envelope\").IOutcomeEnvelope<import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/write/create-issue\").ICreateIssueResult>"},"hasCtx":true},{"id":"backlog/update","host":"ts","namespace":{"raw":"backlog","words":["backlog"]},"path":[{"raw":"update","words":["update"]}],"kind":"action","async":false,"streaming":false,"safe":false,"input":{"type":"object","properties":{"input":{"type":"object","properties":{"uid":{"type":"string"},"by":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"kind":{"type":"string"},"priority":{"type":"string"},"assignee":{"type":"string"},"author":{"type":"string"},"awaitEmbed":{"type":"boolean"}},"required":["uid","by"],"additionalProperties":false}},"required":["input"]},"output":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"code":{"$ref":"#/definitions/BacklogErrorCode"},"message":{"type":"string"},"details":{"$ref":"#/definitions/IOutcomeErrorDetails"}},"required":["code","message"],"additionalProperties":false,"description":"The error arm's payload."},"warnings":{"type":"array","items":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","properties":{"uid":{"type":"string"},"changed":{"type":"array","items":{"$schema":"http://json-schema.org/draft-07/schema#","type":"string","enum":["title","body","kind","priority","assignee","author"]}}},"required":["uid","changed"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}},"meta":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"total":{"type":"number","description":"Matching rows before limit/offset — the TRUE count."},"returned":{"type":"number","description":"Rows actually in `data`."},"limit":{"type":"number"},"offset":{"type":"number"},"truncated":{"type":"boolean","description":"Set when the result set was cut short by anything other than the caller's own `limit`. A silent cap is forbidden — if it happens, it is stated here."}},"required":["total","returned"],"additionalProperties":false,"description":"Pagination truth carried beside the data. `total` is the count BEFORE `limit`/`offset`; `returned` is `data.length`. A silently-truncated list is indistinguishable from a complete one unless the envelope says how many there really were."}},"required":["ok","data"],"additionalProperties":false}],"x-apigen-logical":"union","definitions":{"BacklogErrorCode":{"type":"string","enum":["not_found","item_not_found","invalid_argument","validation","store_busy","rag_not_configured","conflict","precondition_failed","internal"],"description":"The closed union of envelope error codes. See {@link BACKLOG_ERROR_CODES } ."},"IOutcomeErrorDetails":{"type":"object","properties":{"retryable":{"type":"boolean","description":"True only for transient codes (today: `store_busy`)."},"retryAfterMs":{"type":"number","description":"Suggested backoff in milliseconds; only meaningful when `retryable`."},"internalRef":{"type":"string","description":"Internal doc/plan reference for an `invalid_argument` whose underlying reason cites internal terminology (a plan id, a spec section) that does not belong in the user-facing `message`."}},"additionalProperties":{},"description":"`error.details`. `retryable`/`retryAfterMs` exist so an agent knows whether to retry a `store_busy` and with what backoff instead of hot-looping. Open-ended beyond those: individual codes attach their own evidence."}}},"envelope":{},"typeText":{"lang":"ts","input":"(input: import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/write/update\").IUpdateIssueInput)","output":"import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/envelope\").IOutcomeEnvelope<import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/write/update\").IUpdateIssueOutcome>"},"hasCtx":true},{"id":"backlog/transition","host":"ts","namespace":{"raw":"backlog","words":["backlog"]},"path":[{"raw":"transition","words":["transition"]}],"kind":"action","async":false,"streaming":false,"safe":false,"input":{"type":"object","properties":{"input":{"type":"object","properties":{"uid":{"type":"string"},"by":{"type":"string"},"toStatus":{"type":"string"},"note":{"type":"string"},"citations":{"type":"array","items":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"file":{"type":"string"},"lines":{"type":"string"},"context":{"type":"string"},"symbol":{"type":"string"},"blastRadius":{"description":"Best-effort enrichment payload — not re-specified here; carried through verbatim into the citation node's metadata."}},"required":["file"],"additionalProperties":false,"description":"A filing-time citation (§6.3.2, carried forward from the established `Citation` shape in spirit — `blastRadius` stays best-effort, `model.ts:110-120`). Named `ICitationInput` here (not the spec's bare `Citation`) per this repo's \"prefix shared/data interfaces with `I`\" convention."}},"gitContext":{"type":"string"}},"required":["uid","by","toStatus"],"additionalProperties":false}},"required":["input"]},"output":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"code":{"$ref":"#/definitions/BacklogErrorCode"},"message":{"type":"string"},"details":{"$ref":"#/definitions/IOutcomeErrorDetails"}},"required":["code","message"],"additionalProperties":false,"description":"The error arm's payload."},"warnings":{"type":"array","items":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","properties":{"uid":{"type":"string"},"fromStatus":{"type":"string"},"toStatus":{"type":"string"},"closedAt":{"type":"string"},"transitionUid":{"type":"string"}},"required":["uid","fromStatus","toStatus","transitionUid"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}},"meta":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"total":{"type":"number","description":"Matching rows before limit/offset — the TRUE count."},"returned":{"type":"number","description":"Rows actually in `data`."},"limit":{"type":"number"},"offset":{"type":"number"},"truncated":{"type":"boolean","description":"Set when the result set was cut short by anything other than the caller's own `limit`. A silent cap is forbidden — if it happens, it is stated here."}},"required":["total","returned"],"additionalProperties":false,"description":"Pagination truth carried beside the data. `total` is the count BEFORE `limit`/`offset`; `returned` is `data.length`. A silently-truncated list is indistinguishable from a complete one unless the envelope says how many there really were."}},"required":["ok","data"],"additionalProperties":false}],"x-apigen-logical":"union","definitions":{"BacklogErrorCode":{"type":"string","enum":["not_found","item_not_found","invalid_argument","validation","store_busy","rag_not_configured","conflict","precondition_failed","internal"],"description":"The closed union of envelope error codes. See {@link BACKLOG_ERROR_CODES } ."},"IOutcomeErrorDetails":{"type":"object","properties":{"retryable":{"type":"boolean","description":"True only for transient codes (today: `store_busy`)."},"retryAfterMs":{"type":"number","description":"Suggested backoff in milliseconds; only meaningful when `retryable`."},"internalRef":{"type":"string","description":"Internal doc/plan reference for an `invalid_argument` whose underlying reason cites internal terminology (a plan id, a spec section) that does not belong in the user-facing `message`."}},"additionalProperties":{},"description":"`error.details`. `retryable`/`retryAfterMs` exist so an agent knows whether to retry a `store_busy` and with what backoff instead of hot-looping. Open-ended beyond those: individual codes attach their own evidence."}}},"envelope":{},"typeText":{"lang":"ts","input":"(input: import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/write/transition\").ITransitionInput)","output":"import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/envelope\").IOutcomeEnvelope<import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/write/transition\").ITransitionOutcome>"},"hasCtx":true},{"id":"backlog/claim","host":"ts","namespace":{"raw":"backlog","words":["backlog"]},"path":[{"raw":"claim","words":["claim"]}],"kind":"action","async":false,"streaming":false,"safe":false,"input":{"type":"object","properties":{"input":{"type":"object","properties":{"uid":{"type":"string"},"by":{"type":"string"},"action":{"type":"string","enum":["claim","release","renew"]},"force":{"type":"boolean"}},"required":["uid","by","action"],"additionalProperties":false}},"required":["input"]},"output":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"code":{"$ref":"#/definitions/BacklogErrorCode"},"message":{"type":"string"},"details":{"$ref":"#/definitions/IOutcomeErrorDetails"}},"required":["code","message"],"additionalProperties":false,"description":"The error arm's payload."},"warnings":{"type":"array","items":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","properties":{"uid":{"type":"string"},"status":{"type":"string","enum":["claimed","held","reclaimed-stale","renewed","released","release-noop"]},"claimedBy":{"type":"string"},"claimedAt":{"type":"string"},"heldBy":{"type":"string"},"heldSince":{"type":"string"},"previousClaimant":{"type":"string"},"wasClaimedBy":{"type":"string"}},"required":["uid","status"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}},"meta":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"total":{"type":"number","description":"Matching rows before limit/offset — the TRUE count."},"returned":{"type":"number","description":"Rows actually in `data`."},"limit":{"type":"number"},"offset":{"type":"number"},"truncated":{"type":"boolean","description":"Set when the result set was cut short by anything other than the caller's own `limit`. A silent cap is forbidden — if it happens, it is stated here."}},"required":["total","returned"],"additionalProperties":false,"description":"Pagination truth carried beside the data. `total` is the count BEFORE `limit`/`offset`; `returned` is `data.length`. A silently-truncated list is indistinguishable from a complete one unless the envelope says how many there really were."}},"required":["ok","data"],"additionalProperties":false}],"x-apigen-logical":"union","definitions":{"BacklogErrorCode":{"type":"string","enum":["not_found","item_not_found","invalid_argument","validation","store_busy","rag_not_configured","conflict","precondition_failed","internal"],"description":"The closed union of envelope error codes. See {@link BACKLOG_ERROR_CODES } ."},"IOutcomeErrorDetails":{"type":"object","properties":{"retryable":{"type":"boolean","description":"True only for transient codes (today: `store_busy`)."},"retryAfterMs":{"type":"number","description":"Suggested backoff in milliseconds; only meaningful when `retryable`."},"internalRef":{"type":"string","description":"Internal doc/plan reference for an `invalid_argument` whose underlying reason cites internal terminology (a plan id, a spec section) that does not belong in the user-facing `message`."}},"additionalProperties":{},"description":"`error.details`. `retryable`/`retryAfterMs` exist so an agent knows whether to retry a `store_busy` and with what backoff instead of hot-looping. Open-ended beyond those: individual codes attach their own evidence."}}},"envelope":{},"typeText":{"lang":"ts","input":"(input: import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/write/claim\").IClaimInput)","output":"import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/envelope\").IOutcomeEnvelope<import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/write/claim\").IClaimOutcome>"},"hasCtx":true},{"id":"backlog/relate","host":"ts","namespace":{"raw":"backlog","words":["backlog"]},"path":[{"raw":"relate","words":["relate"]}],"kind":"action","async":false,"streaming":false,"safe":false,"input":{"type":"object","properties":{"input":{"type":"object","properties":{"sourceUid":{"type":"string"},"targetUid":{"type":"string"},"rel":{"$schema":"http://json-schema.org/draft-07/schema#","type":"string","enum":["relates_to","supersedes","blocks","duplicate_of","part_of"],"description":"The closed `rel` union `relate` accepts (§3/§6.3.6) — issue → issue in every case."},"action":{"type":"string","enum":["add","remove"]},"by":{"type":"string"}},"required":["sourceUid","targetUid","rel","action","by"],"additionalProperties":false}},"required":["input"]},"output":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"code":{"$ref":"#/definitions/BacklogErrorCode"},"message":{"type":"string"},"details":{"$ref":"#/definitions/IOutcomeErrorDetails"}},"required":["code","message"],"additionalProperties":false,"description":"The error arm's payload."},"warnings":{"type":"array","items":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","properties":{"sourceUid":{"type":"string"},"targetUid":{"type":"string"},"rel":{"type":"string"},"action":{"type":"string","enum":["add","remove"]},"noop":{"type":"boolean"}},"required":["sourceUid","targetUid","rel","action","noop"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}},"meta":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"total":{"type":"number","description":"Matching rows before limit/offset — the TRUE count."},"returned":{"type":"number","description":"Rows actually in `data`."},"limit":{"type":"number"},"offset":{"type":"number"},"truncated":{"type":"boolean","description":"Set when the result set was cut short by anything other than the caller's own `limit`. A silent cap is forbidden — if it happens, it is stated here."}},"required":["total","returned"],"additionalProperties":false,"description":"Pagination truth carried beside the data. `total` is the count BEFORE `limit`/`offset`; `returned` is `data.length`. A silently-truncated list is indistinguishable from a complete one unless the envelope says how many there really were."}},"required":["ok","data"],"additionalProperties":false}],"x-apigen-logical":"union","definitions":{"BacklogErrorCode":{"type":"string","enum":["not_found","item_not_found","invalid_argument","validation","store_busy","rag_not_configured","conflict","precondition_failed","internal"],"description":"The closed union of envelope error codes. See {@link BACKLOG_ERROR_CODES } ."},"IOutcomeErrorDetails":{"type":"object","properties":{"retryable":{"type":"boolean","description":"True only for transient codes (today: `store_busy`)."},"retryAfterMs":{"type":"number","description":"Suggested backoff in milliseconds; only meaningful when `retryable`."},"internalRef":{"type":"string","description":"Internal doc/plan reference for an `invalid_argument` whose underlying reason cites internal terminology (a plan id, a spec section) that does not belong in the user-facing `message`."}},"additionalProperties":{},"description":"`error.details`. `retryable`/`retryAfterMs` exist so an agent knows whether to retry a `store_busy` and with what backoff instead of hot-looping. Open-ended beyond those: individual codes attach their own evidence."}}},"envelope":{},"typeText":{"lang":"ts","input":"(input: import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/write/relate\").IRelateInput)","output":"import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/envelope\").IOutcomeEnvelope<import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/write/relate\").IRelateOutcome>"},"hasCtx":true},{"id":"backlog/move","host":"ts","namespace":{"raw":"backlog","words":["backlog"]},"path":[{"raw":"move","words":["move"]}],"kind":"action","async":false,"streaming":false,"safe":false,"input":{"type":"object","properties":{"input":{"type":"object","properties":{"uid":{"type":"string"},"toProject":{"type":"string"},"toComponent":{"type":"string"},"by":{"type":"string"}},"required":["uid","by"],"additionalProperties":false}},"required":["input"]},"output":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"code":{"$ref":"#/definitions/BacklogErrorCode"},"message":{"type":"string"},"details":{"$ref":"#/definitions/IOutcomeErrorDetails"}},"required":["code","message"],"additionalProperties":false,"description":"The error arm's payload."},"warnings":{"type":"array","items":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","properties":{"uid":{"type":"string"},"noop":{"type":"boolean"},"fromProject":{"type":"string"},"toProject":{"type":"string"},"fromComponent":{"type":"string"},"toComponent":{"type":"string"}},"required":["uid","noop","fromProject","toProject","fromComponent","toComponent"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}},"meta":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"total":{"type":"number","description":"Matching rows before limit/offset — the TRUE count."},"returned":{"type":"number","description":"Rows actually in `data`."},"limit":{"type":"number"},"offset":{"type":"number"},"truncated":{"type":"boolean","description":"Set when the result set was cut short by anything other than the caller's own `limit`. A silent cap is forbidden — if it happens, it is stated here."}},"required":["total","returned"],"additionalProperties":false,"description":"Pagination truth carried beside the data. `total` is the count BEFORE `limit`/`offset`; `returned` is `data.length`. A silently-truncated list is indistinguishable from a complete one unless the envelope says how many there really were."}},"required":["ok","data"],"additionalProperties":false}],"x-apigen-logical":"union","definitions":{"BacklogErrorCode":{"type":"string","enum":["not_found","item_not_found","invalid_argument","validation","store_busy","rag_not_configured","conflict","precondition_failed","internal"],"description":"The closed union of envelope error codes. See {@link BACKLOG_ERROR_CODES } ."},"IOutcomeErrorDetails":{"type":"object","properties":{"retryable":{"type":"boolean","description":"True only for transient codes (today: `store_busy`)."},"retryAfterMs":{"type":"number","description":"Suggested backoff in milliseconds; only meaningful when `retryable`."},"internalRef":{"type":"string","description":"Internal doc/plan reference for an `invalid_argument` whose underlying reason cites internal terminology (a plan id, a spec section) that does not belong in the user-facing `message`."}},"additionalProperties":{},"description":"`error.details`. `retryable`/`retryAfterMs` exist so an agent knows whether to retry a `store_busy` and with what backoff instead of hot-looping. Open-ended beyond those: individual codes attach their own evidence."}}},"envelope":{},"typeText":{"lang":"ts","input":"(input: import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/write/move\").IMoveIssueInput)","output":"import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/envelope\").IOutcomeEnvelope<import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/write/move\").IMoveIssueOutcome>"},"hasCtx":true},{"id":"backlog/upsert-project","host":"ts","namespace":{"raw":"backlog","words":["backlog"]},"path":[{"raw":"upsertProject","words":["upsert","project"]}],"kind":"action","async":false,"streaming":false,"safe":false,"input":{"type":"object","properties":{"input":{"type":"object","properties":{"name":{"type":"string"},"path":{"type":"string"},"repoUrl":{"type":"string"},"monorepo":{"type":"boolean"},"description":{"type":"string"},"by":{"type":"string"}},"required":["name","by"],"additionalProperties":false}},"required":["input"]},"output":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"code":{"$ref":"#/definitions/BacklogErrorCode"},"message":{"type":"string"},"details":{"$ref":"#/definitions/IOutcomeErrorDetails"}},"required":["code","message"],"additionalProperties":false,"description":"The error arm's payload."},"warnings":{"type":"array","items":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","properties":{"uid":{"type":"string"},"created":{"type":"boolean"},"project":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"uid":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"},"repoUrl":{"type":"string"},"monorepo":{"type":"boolean"},"description":{"type":"string"}},"required":["uid","name"],"additionalProperties":false}},"required":["uid","created","project"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}},"meta":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"total":{"type":"number","description":"Matching rows before limit/offset — the TRUE count."},"returned":{"type":"number","description":"Rows actually in `data`."},"limit":{"type":"number"},"offset":{"type":"number"},"truncated":{"type":"boolean","description":"Set when the result set was cut short by anything other than the caller's own `limit`. A silent cap is forbidden — if it happens, it is stated here."}},"required":["total","returned"],"additionalProperties":false,"description":"Pagination truth carried beside the data. `total` is the count BEFORE `limit`/`offset`; `returned` is `data.length`. A silently-truncated list is indistinguishable from a complete one unless the envelope says how many there really were."}},"required":["ok","data"],"additionalProperties":false}],"x-apigen-logical":"union","definitions":{"BacklogErrorCode":{"type":"string","enum":["not_found","item_not_found","invalid_argument","validation","store_busy","rag_not_configured","conflict","precondition_failed","internal"],"description":"The closed union of envelope error codes. See {@link BACKLOG_ERROR_CODES } ."},"IOutcomeErrorDetails":{"type":"object","properties":{"retryable":{"type":"boolean","description":"True only for transient codes (today: `store_busy`)."},"retryAfterMs":{"type":"number","description":"Suggested backoff in milliseconds; only meaningful when `retryable`."},"internalRef":{"type":"string","description":"Internal doc/plan reference for an `invalid_argument` whose underlying reason cites internal terminology (a plan id, a spec section) that does not belong in the user-facing `message`."}},"additionalProperties":{},"description":"`error.details`. `retryable`/`retryAfterMs` exist so an agent knows whether to retry a `store_busy` and with what backoff instead of hot-looping. Open-ended beyond those: individual codes attach their own evidence."}}},"envelope":{},"typeText":{"lang":"ts","input":"(input: import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/write/catalog\").IUpsertProjectInput)","output":"import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/envelope\").IOutcomeEnvelope<import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/write/catalog\").IUpsertProjectOutcome>"},"hasCtx":true},{"id":"backlog/upsert-component","host":"ts","namespace":{"raw":"backlog","words":["backlog"]},"path":[{"raw":"upsertComponent","words":["upsert","component"]}],"kind":"action","async":false,"streaming":false,"safe":false,"input":{"type":"object","properties":{"input":{"type":"object","properties":{"project":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"},"description":{"type":"string"},"by":{"type":"string"}},"required":["project","name","by"],"additionalProperties":false}},"required":["input"]},"output":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"code":{"$ref":"#/definitions/BacklogErrorCode"},"message":{"type":"string"},"details":{"$ref":"#/definitions/IOutcomeErrorDetails"}},"required":["code","message"],"additionalProperties":false,"description":"The error arm's payload."},"warnings":{"type":"array","items":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","properties":{"uid":{"type":"string"},"created":{"type":"boolean"},"component":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"uid":{"type":"string"},"name":{"type":"string"},"projectUid":{"type":"string"},"path":{"type":"string"},"description":{"type":"string"}},"required":["uid","name","projectUid"],"additionalProperties":false}},"required":["uid","created","component"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}},"meta":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"total":{"type":"number","description":"Matching rows before limit/offset — the TRUE count."},"returned":{"type":"number","description":"Rows actually in `data`."},"limit":{"type":"number"},"offset":{"type":"number"},"truncated":{"type":"boolean","description":"Set when the result set was cut short by anything other than the caller's own `limit`. A silent cap is forbidden — if it happens, it is stated here."}},"required":["total","returned"],"additionalProperties":false,"description":"Pagination truth carried beside the data. `total` is the count BEFORE `limit`/`offset`; `returned` is `data.length`. A silently-truncated list is indistinguishable from a complete one unless the envelope says how many there really were."}},"required":["ok","data"],"additionalProperties":false}],"x-apigen-logical":"union","definitions":{"BacklogErrorCode":{"type":"string","enum":["not_found","item_not_found","invalid_argument","validation","store_busy","rag_not_configured","conflict","precondition_failed","internal"],"description":"The closed union of envelope error codes. See {@link BACKLOG_ERROR_CODES } ."},"IOutcomeErrorDetails":{"type":"object","properties":{"retryable":{"type":"boolean","description":"True only for transient codes (today: `store_busy`)."},"retryAfterMs":{"type":"number","description":"Suggested backoff in milliseconds; only meaningful when `retryable`."},"internalRef":{"type":"string","description":"Internal doc/plan reference for an `invalid_argument` whose underlying reason cites internal terminology (a plan id, a spec section) that does not belong in the user-facing `message`."}},"additionalProperties":{},"description":"`error.details`. `retryable`/`retryAfterMs` exist so an agent knows whether to retry a `store_busy` and with what backoff instead of hot-looping. Open-ended beyond those: individual codes attach their own evidence."}}},"envelope":{},"typeText":{"lang":"ts","input":"(input: import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/write/catalog\").IUpsertComponentInput)","output":"import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/envelope\").IOutcomeEnvelope<import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/write/catalog\").IUpsertComponentOutcome>"},"hasCtx":true},{"id":"backlog/upsert-location","host":"ts","namespace":{"raw":"backlog","words":["backlog"]},"path":[{"raw":"upsertLocation","words":["upsert","location"]}],"kind":"action","async":false,"streaming":false,"safe":false,"input":{"type":"object","properties":{"input":{"type":"object","properties":{"component":{"type":"string"},"project":{"type":"string"},"locType":{"$schema":"http://json-schema.org/draft-07/schema#","type":"string","enum":["path","url","tool"]},"value":{"type":"string"},"by":{"type":"string"}},"required":["component","locType","value","by"],"additionalProperties":false}},"required":["input"]},"output":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"code":{"$ref":"#/definitions/BacklogErrorCode"},"message":{"type":"string"},"details":{"$ref":"#/definitions/IOutcomeErrorDetails"}},"required":["code","message"],"additionalProperties":false,"description":"The error arm's payload."},"warnings":{"type":"array","items":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","properties":{"uid":{"type":"string"},"created":{"type":"boolean"},"location":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"uid":{"type":"string"},"locType":{"$ref":"#/definitions/ILocationType"},"value":{"type":"string"},"componentUid":{"type":"string"}},"required":["uid","locType","value","componentUid"],"additionalProperties":false}},"required":["uid","created","location"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}},"meta":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"total":{"type":"number","description":"Matching rows before limit/offset — the TRUE count."},"returned":{"type":"number","description":"Rows actually in `data`."},"limit":{"type":"number"},"offset":{"type":"number"},"truncated":{"type":"boolean","description":"Set when the result set was cut short by anything other than the caller's own `limit`. A silent cap is forbidden — if it happens, it is stated here."}},"required":["total","returned"],"additionalProperties":false,"description":"Pagination truth carried beside the data. `total` is the count BEFORE `limit`/`offset`; `returned` is `data.length`. A silently-truncated list is indistinguishable from a complete one unless the envelope says how many there really were."}},"required":["ok","data"],"additionalProperties":false}],"x-apigen-logical":"union","definitions":{"BacklogErrorCode":{"type":"string","enum":["not_found","item_not_found","invalid_argument","validation","store_busy","rag_not_configured","conflict","precondition_failed","internal"],"description":"The closed union of envelope error codes. See {@link BACKLOG_ERROR_CODES } ."},"IOutcomeErrorDetails":{"type":"object","properties":{"retryable":{"type":"boolean","description":"True only for transient codes (today: `store_busy`)."},"retryAfterMs":{"type":"number","description":"Suggested backoff in milliseconds; only meaningful when `retryable`."},"internalRef":{"type":"string","description":"Internal doc/plan reference for an `invalid_argument` whose underlying reason cites internal terminology (a plan id, a spec section) that does not belong in the user-facing `message`."}},"additionalProperties":{},"description":"`error.details`. `retryable`/`retryAfterMs` exist so an agent knows whether to retry a `store_busy` and with what backoff instead of hot-looping. Open-ended beyond those: individual codes attach their own evidence."},"ILocationType":{"type":"string","enum":["path","url","tool"]}}},"envelope":{},"typeText":{"lang":"ts","input":"(input: import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/write/catalog\").IUpsertLocationInput)","output":"import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/envelope\").IOutcomeEnvelope<import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/write/catalog\").IUpsertLocationOutcome>"},"hasCtx":true},{"id":"backlog/rm-location","host":"ts","namespace":{"raw":"backlog","words":["backlog"]},"path":[{"raw":"rmLocation","words":["rm","location"]}],"kind":"action","async":false,"streaming":false,"safe":false,"input":{"type":"object","properties":{"input":{"type":"object","properties":{"uid":{"type":"string"},"by":{"type":"string"},"reason":{"type":"string"}},"required":["uid","by"],"additionalProperties":false}},"required":["input"]},"output":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"code":{"$ref":"#/definitions/BacklogErrorCode"},"message":{"type":"string"},"details":{"$ref":"#/definitions/IOutcomeErrorDetails"}},"required":["code","message"],"additionalProperties":false,"description":"The error arm's payload."},"warnings":{"type":"array","items":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","properties":{"uid":{"type":"string"},"invalidated":{"type":"boolean","const":true}},"required":["uid","invalidated"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}},"meta":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"total":{"type":"number","description":"Matching rows before limit/offset — the TRUE count."},"returned":{"type":"number","description":"Rows actually in `data`."},"limit":{"type":"number"},"offset":{"type":"number"},"truncated":{"type":"boolean","description":"Set when the result set was cut short by anything other than the caller's own `limit`. A silent cap is forbidden — if it happens, it is stated here."}},"required":["total","returned"],"additionalProperties":false,"description":"Pagination truth carried beside the data. `total` is the count BEFORE `limit`/`offset`; `returned` is `data.length`. A silently-truncated list is indistinguishable from a complete one unless the envelope says how many there really were."}},"required":["ok","data"],"additionalProperties":false}],"x-apigen-logical":"union","definitions":{"BacklogErrorCode":{"type":"string","enum":["not_found","item_not_found","invalid_argument","validation","store_busy","rag_not_configured","conflict","precondition_failed","internal"],"description":"The closed union of envelope error codes. See {@link BACKLOG_ERROR_CODES } ."},"IOutcomeErrorDetails":{"type":"object","properties":{"retryable":{"type":"boolean","description":"True only for transient codes (today: `store_busy`)."},"retryAfterMs":{"type":"number","description":"Suggested backoff in milliseconds; only meaningful when `retryable`."},"internalRef":{"type":"string","description":"Internal doc/plan reference for an `invalid_argument` whose underlying reason cites internal terminology (a plan id, a spec section) that does not belong in the user-facing `message`."}},"additionalProperties":{},"description":"`error.details`. `retryable`/`retryAfterMs` exist so an agent knows whether to retry a `store_busy` and with what backoff instead of hot-looping. Open-ended beyond those: individual codes attach their own evidence."}}},"envelope":{},"typeText":{"lang":"ts","input":"(input: import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/write/catalog\").IRmLocationInput)","output":"import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/envelope\").IOutcomeEnvelope<import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/write/catalog\").IRmLocationOutcome>"},"hasCtx":true},{"id":"backlog/delete","host":"ts","namespace":{"raw":"backlog","words":["backlog"]},"path":[{"raw":"delete","words":["delete"]}],"kind":"action","async":false,"streaming":false,"safe":false,"input":{"type":"object","properties":{"input":{"type":"object","properties":{"uid":{"type":"string"},"reason":{"type":"string"},"by":{"type":"string"},"awaitEmbed":{"type":"boolean"}},"required":["uid","reason","by"],"additionalProperties":false}},"required":["input"]},"output":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"code":{"$ref":"#/definitions/BacklogErrorCode"},"message":{"type":"string"},"details":{"$ref":"#/definitions/IOutcomeErrorDetails"}},"required":["code","message"],"additionalProperties":false,"description":"The error arm's payload."},"warnings":{"type":"array","items":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","properties":{"uid":{"type":"string"},"invalidated":{"type":"boolean","const":true}},"required":["uid","invalidated"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}},"meta":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"total":{"type":"number","description":"Matching rows before limit/offset — the TRUE count."},"returned":{"type":"number","description":"Rows actually in `data`."},"limit":{"type":"number"},"offset":{"type":"number"},"truncated":{"type":"boolean","description":"Set when the result set was cut short by anything other than the caller's own `limit`. A silent cap is forbidden — if it happens, it is stated here."}},"required":["total","returned"],"additionalProperties":false,"description":"Pagination truth carried beside the data. `total` is the count BEFORE `limit`/`offset`; `returned` is `data.length`. A silently-truncated list is indistinguishable from a complete one unless the envelope says how many there really were."}},"required":["ok","data"],"additionalProperties":false}],"x-apigen-logical":"union","definitions":{"BacklogErrorCode":{"type":"string","enum":["not_found","item_not_found","invalid_argument","validation","store_busy","rag_not_configured","conflict","precondition_failed","internal"],"description":"The closed union of envelope error codes. See {@link BACKLOG_ERROR_CODES } ."},"IOutcomeErrorDetails":{"type":"object","properties":{"retryable":{"type":"boolean","description":"True only for transient codes (today: `store_busy`)."},"retryAfterMs":{"type":"number","description":"Suggested backoff in milliseconds; only meaningful when `retryable`."},"internalRef":{"type":"string","description":"Internal doc/plan reference for an `invalid_argument` whose underlying reason cites internal terminology (a plan id, a spec section) that does not belong in the user-facing `message`."}},"additionalProperties":{},"description":"`error.details`. `retryable`/`retryAfterMs` exist so an agent knows whether to retry a `store_busy` and with what backoff instead of hot-looping. Open-ended beyond those: individual codes attach their own evidence."}}},"envelope":{},"typeText":{"lang":"ts","input":"(input: import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/write/delete\").IDeleteIssueInput)","output":"import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/envelope\").IOutcomeEnvelope<import(\"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/write/delete\").IDeleteIssueOutcome>"},"hasCtx":true}],"extractorVersion":"0.3.2","createdAt":"2026-09-26T19:33:28.161Z","artifactSource":{"path":"/Users/nix/dev/node/adhd/entrypoint/backlog/dist/api.d.ts","sha256":"ebfcef5f1d5890f7b6442890b59613fa8583e9d8d2353b12ad98e0b1110bda52","bytes":10898,"deps":{"api.d.ts":"ebfcef5f1d5890f7b6442890b59613fa8583e9d8d2353b12ad98e0b1110bda52","cli.d.ts":"51a94638d3c71e0769022a71ae271a286e5f34cb3b43e60926bf7c0a635317fa","env.d.ts":"b8dbe8fb14a7dda4745fdac154dacdf8bacec49657830c88bf9344fed84a69d2","envelope.d.ts":"47e8ff09adbc9c5160ec4a8118a4a3597cfad14e5675039957c9e7725cf62479","extract-live.d.ts":"11a6c52c95a703deeae932b5813922bd7773a544904ce0e4c06c6466d3049934","index.d.ts":"13e093553b00376125c0719b0610a96fd0ee2e14ec8d948e0d27f1fd79396a33","install-skill.d.ts":"ac52fbea0674a76508a1b38ce2791191e1d6fa8ced8099dd5da81a18b68d1aa2","install.d.ts":"cc9944d6ec2d12af9963deecf2a2f288e433d1f59cfdba8a9ca9b3b4613b4f31","ir-artifact.d.ts":"10a615c14f483f24f01b6b3c53d38320d6c4aa10ebdb1bc4b5c2da4f84b59e8e","query/card.d.ts":"a4902fc8e3ea4ee8f80e74523c35d8c72b6df4949f4b724b2e3b52431ae93343","query/get.d.ts":"ed9344df7f91cad622c6e531883ce72fd6512b8ad7bc2a81ec65947d02c5de3a","query/index.d.ts":"2426d6dc6e3e7e3f2a5ae440250b6233e56edd5aac400bd9dea5ee878501e290","query/markdown.d.ts":"0aefdc5c216491ec2d98986c834fd66da5969c36da55e1c5c92030f2f79a8e87","query/query.d.ts":"a0057624aeecc10ce175919382cfd1c3bb86daa283fff82470d8000be6dde3d5","query/resolve.d.ts":"399d3d9f83ac4b78b20f7be5c047b4aa9bbed5eda7fef50c8e602bf01b24b6c9","query/types.d.ts":"83a6e4c0bc43f497ffe30b86d95799c823f09f4a93adff3acda2ec2cd4ddf231","query/views/registry.d.ts":"5baee362c591688fe5ea38f8fd3586f80cccb09a2bf6166d3e9e155307bdd08a","query/views/semantic.d.ts":"6ab4a6fe8967e4a79a3d720e006355278e7aaf74ddba1eb2ada829ba90c7d8ed","query/views/stats.d.ts":"5e98526a9d5978e2fbfac2a90c485f5d1b13cec6ca788fdb16e4412e3fc9ab8e","search-shortcut.d.ts":"a9575c3cc4496566859900935031a0e2607f134b557cd3a4462382255dbc0126","serve.d.ts":"768604b57bfd1c31a9a2900d10e77e7a619f4d201f1d6c9f4641e1504e9a0a1c","server.d.ts":"f84b29cd101b50ee0c97c86d3da49f742c9759d55ba0905486ee78b0438cded2","store/graph-backlog-store.d.ts":"1fe364b91a951677f756e0d44f00baab412be040aaed9938e89dc2c8996b9bee","store/immediate-retry.d.ts":"db564719cb7e75e13275a90872de72ff8f7fd4798c73351677ed32329eb52173","store/signal-cleanup.d.ts":"f2b7fa6071337f862891653d02df99db06feff18bf090e048b1f382a6b21e0d1","store/type-policy.d.ts":"8c46b0611170294765383b9f00791e4fd855185a62c69943219f2d40fa3e9415","store/vocabulary-guard.d.ts":"84c88bc4c825977f48f46efec5667b70cbd50195f0c8bafdbe4eb36154b041b0","version-info.d.ts":"9d2a66fb1dc9a9fa227cdb224c53ff5695ad21b23de66c4be1e02e67c9c08eb3","write/audit.d.ts":"b4871edceb1d2c4fbadf0b1801afdd84138e26a7351011b17e81b5dff0e3bf26","write/bootstrap.d.ts":"652fdfcb1d81e5b0569e64e1f588eb2fbe70411e16553a3043ac5e80e9d68276","write/catalog.d.ts":"96d42ba76b7ed017213fd8244a5b30f4e72ea629d03d6db2823d2ff4e5b69068","write/citation-path.d.ts":"78a01a711ec78cba6be9a1e1ef4709c3f8b12bacf8f8b84ea44531702579516f","write/claim-lease.d.ts":"a742912d7d74e5c0221792effdd15452a23e195a88c299e3f7cd60ed26fdc4ff","write/claim.d.ts":"0897712218653b4d71fd5031b65b73e13fe9a56c64f6c348ef1b2d8aed7de2c2","write/create-issue.d.ts":"970c4e87cf478c7c7fff2e7814358e44aa28a686ee3760caafbb5ba0920da9f0","write/delete.d.ts":"73577bd1340a8cb8d078d97d0a7417cf3c1031d3e95ed16d9d087801da6b80df","write/embed-drain.d.ts":"a6295da99822d289187e506281545ca09da490bcda56c497d5571ab674872209","write/embedding-config.d.ts":"b3245db358bf7bbd7db94f412be613b8bb4ac9b3d7b778f07ca019b062c785f1","write/embedding-observer.d.ts":"2ccac6173aba3830bf60652cbf916250d7765f5d704364205a5e08c3f0f4969f","write/errors.d.ts":"4bc96015cf6e93037a0204a518b7984fad988e22218fda4fe1e73aa59ca1d0fe","write/issue-status.d.ts":"0df49e4e88d69122d545037c36e97b67da9bec1e882877833bb33077dc10d753","write/move.d.ts":"3dbe164e938a9cb4459231b3c61b9fae89e9c21d8aa7de3fed719732da9fc62e","write/relate.d.ts":"7567c5e07a78b332999591fa77eede9a3d33b5db5d5b3fb5588588be57b4f1ca","write/transition.d.ts":"a8fe06f6476fbb7a31ca6caa3d740a3834caf005a71704f63199df7726bce12e","write/tx.d.ts":"69bbc426befa9919b87659e176456c1a641094e25a3a5a82e89476f60a38eb12","write/update.d.ts":"3901403b32b892d19df57f68f0824c4f8d70d6d0b9d3583fd0e155441c036311"}}}
|