@adhd/backlog 1.0.1 → 1.0.3
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 +19 -0
- package/api.ir.json +1 -1
- package/cli-input-envelope.d.ts +40 -0
- package/index.d.ts +4 -0
- package/index.js +43 -42
- package/index.mjs +3487 -2968
- package/package.json +13 -13
- package/query/query.d.ts +12 -0
- package/store/catalog-invariant-guard.d.ts +62 -0
- package/write/catalog-merge.d.ts +123 -0
- package/write/catalog-repair.d.ts +74 -0
- package/write/catalog.d.ts +57 -0
- package/write/create-issue.d.ts +1 -1
- package/write/transition.d.ts +4 -3
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ComposedSchemas, Operation } from '@adhd/apigen-core-client';
|
|
2
|
+
|
|
3
|
+
/** The top-level keys whose presence marks the MCP envelope shape. */
|
|
4
|
+
export declare const ENVELOPE_WRAPPER_KEYS: readonly ["input", "data"];
|
|
5
|
+
/** A detected MCP-envelope-shaped `--input`, with everything the message needs. */
|
|
6
|
+
export interface ICliInputEnvelopeViolation {
|
|
7
|
+
/** The envelope keys found at the top level of the parsed `--input` value. */
|
|
8
|
+
wrapperKeys: string[];
|
|
9
|
+
/**
|
|
10
|
+
* The exact command a consumer should type, as the CLI's own help renders it
|
|
11
|
+
* (`project(op).cli.path.join(' ')`, e.g. `backlog get`).
|
|
12
|
+
*/
|
|
13
|
+
commandLabel: string;
|
|
14
|
+
/**
|
|
15
|
+
* A minimal, schema-derived JSON example of the verb's BARE params, already
|
|
16
|
+
* JSON-encoded (`'{"uid":"<string>"}'`). `undefined` only when the verb's
|
|
17
|
+
* composed schema could not be found (e.g. a synthetic mount command).
|
|
18
|
+
*/
|
|
19
|
+
exampleJson: string | undefined;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Detects an `--input` value that carries the MCP envelope shape. `argv` is
|
|
23
|
+
* the FULL, namespace-prefixed argv (what `prefixCommand` produces) so command
|
|
24
|
+
* matching lines up with the operation paths.
|
|
25
|
+
*
|
|
26
|
+
* Returns `undefined` — i.e. no interception — for: a missing `--input`, a
|
|
27
|
+
* non-object value, an unparseable value, a `--help` invocation, an
|
|
28
|
+
* unrecognized command, and a bare object that merely happens to declare a
|
|
29
|
+
* `data`/`input` field the verb's schema actually owns (the check consults the
|
|
30
|
+
* verb's own properties, so a legitimate field of that name is never
|
|
31
|
+
* misflagged).
|
|
32
|
+
*/
|
|
33
|
+
export declare function detectCliInputEnvelopeViolation(argv: readonly string[], operations: readonly Operation[], schemas: ComposedSchemas): ICliInputEnvelopeViolation | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Renders the actionable rejection: names the bare-params contract, shows a
|
|
36
|
+
* concrete correct invocation for the invoked verb, and identifies the
|
|
37
|
+
* envelope as the MCP calling convention. Deliberately a single sentence-run
|
|
38
|
+
* with NO raw AJV output — the guidance must not be buried under a union dump.
|
|
39
|
+
*/
|
|
40
|
+
export declare function renderCliInputEnvelopeMessage(violation: ICliInputEnvelopeViolation): string;
|
package/index.d.ts
CHANGED
|
@@ -16,3 +16,7 @@ export type { BacklogConfig, BuildBacklogEnvOptions } from './env.js';
|
|
|
16
16
|
export { openGraphBacklogStore, closeGraphBacklogStore, } from './store/graph-backlog-store.js';
|
|
17
17
|
export type { GraphBacklogStore } from './store/graph-backlog-store.js';
|
|
18
18
|
export { readBacklogVersionInfo } from './version-info.js';
|
|
19
|
+
export { RESERVED_TERMINAL_STATUS_NAMES, catalogNameFold, planTerminalBackfill, applyTerminalBackfill, reverseTerminalBackfill, } from './write/catalog-repair.js';
|
|
20
|
+
export type { ITerminalBackfillPlan, ITerminalBackfillJournal, } from './write/catalog-repair.js';
|
|
21
|
+
export { planCaseFragmentMerge, applyCaseFragmentMerge, reverseCaseFragmentMerge, } from './write/catalog-merge.js';
|
|
22
|
+
export type { IMergePlan, IMergeJournal, IMergeJournalEntry, } from './write/catalog-merge.js';
|