@adhd/backlog 0.0.2 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -155,6 +155,19 @@ export interface BacklogFilter {
155
155
  * duplicated into root.
156
156
  */
157
157
  rootLevel?: boolean;
158
+ /**
159
+ * Drops items with `metadata.archivedAt` set (BACKLOG-adoption's
160
+ * `archiveResolved` — SPEC.md §5.4). `renderToMarkdown` always applies
161
+ * this internally (a markdown projection never shows archived rows), but
162
+ * `listItems`/`queryItemNodes` do NOT default to it — auditing/reporting
163
+ * consumers legitimately need to see archived items too. A caller that
164
+ * needs to reproduce `renderToMarkdown`'s exact item set through
165
+ * `listItems` (e.g. `render-projections.mjs`/`parity-check.mjs` verifying
166
+ * a rendered projection against the graph's own view of the same filter —
167
+ * BUG-BACKLOG-RENDER-VERIFY-ARCHIVED-MISMATCH-001) must set this
168
+ * explicitly; otherwise the two queries diverge on every archived row.
169
+ */
170
+ excludeArchived?: boolean;
158
171
  limit?: number;
159
172
  offset?: number;
160
173
  }
package/package.json CHANGED
@@ -1,34 +1,28 @@
1
1
  {
2
2
  "name": "@adhd/backlog",
3
- "version": "0.0.2",
3
+ "version": "0.1.0",
4
4
  "bin": {
5
- "backlog": "./dist/index.js"
5
+ "backlog": "index.js"
6
6
  },
7
7
  "dependencies": {
8
8
  "@adhd/sox-graph-store": "^0.3.0",
9
9
  "better-sqlite3": "^12.10.0",
10
- "@adhd/environment": "0.0.2",
11
- "@adhd/environment-base-spec": "0.0.3",
12
- "@adhd/apigen-core-client": "^0.1.1",
13
- "@adhd/apigen-plugin-api-fastify": "^0.1.2",
14
- "@adhd/apigen-plugin-openapi": "^0.1.3",
15
- "@adhd/apigen-plugin-mcp": "^0.1.2",
16
- "@adhd/apigen-plugin-cli-output": "^0.1.3",
17
- "@adhd/apigen-engine-naming": "^0.1.3",
18
- "yaml": "1.10.3"
10
+ "@adhd/environment": "^0.1.0",
11
+ "@adhd/environment-base-spec": "^0.1.0",
12
+ "@adhd/apigen-core-client": "^0.2.0",
13
+ "@adhd/apigen-plugin-api-fastify": "^0.2.0",
14
+ "@adhd/apigen-plugin-openapi": "^0.2.0",
15
+ "@adhd/apigen-plugin-mcp": "^0.2.0",
16
+ "@adhd/apigen-plugin-cli-output": "^0.2.0",
17
+ "@adhd/apigen-engine-naming": "^0.2.0",
18
+ "yaml": "1.10.3",
19
+ "pino": "10.3.1",
20
+ "pino-pretty": "13.1.3"
19
21
  },
20
- "devDependencies": {
21
- "@types/better-sqlite3": "^7.6.13"
22
- },
23
- "main": "./dist/index.js",
24
- "module": "./dist/index.mjs",
25
- "typings": "./dist/index.d.ts",
22
+ "main": "./index.js",
23
+ "module": "./index.mjs",
24
+ "typings": "./index.d.ts",
26
25
  "publishConfig": {
27
26
  "access": "public"
28
- },
29
- "files": [
30
- "dist",
31
- "CHANGELOG.md",
32
- "skill"
33
- ]
27
+ }
34
28
  }
@@ -1,5 +1,5 @@
1
1
  import { BacklogCtx } from './client.js';
2
- import { composeSchemas, Operation, OutputPlugin, RunInput } from '@adhd/apigen-core-client';
2
+ import { composeSchemas, Operation, Logger, OutputPlugin, RunInput } from '@adhd/apigen-core-client';
3
3
  import { Scope } from '@adhd/environment-base-spec';
4
4
 
5
5
  /**
@@ -13,6 +13,30 @@ import { Scope } from '@adhd/environment-base-spec';
13
13
  * plain re-export instead.
14
14
  */
15
15
  export declare function requireRun(plugin: OutputPlugin): (input: RunInput) => Promise<void>;
16
+ /**
17
+ * Test-only `RunInput.logger` override (exported for `cli.ts`'s identical
18
+ * third-transport mount). Every one of the three apigen output plugins
19
+ * (`apigen-plugin-api-fastify`, `-mcp`, `-cli-output`) falls back to its own
20
+ * `createLogger()` — real pino, level `info`, writing jsonl to stderr —
21
+ * whenever `input.logger` is absent, which floods the console on every test
22
+ * run that actually mounts a transport (`server.spec.ts`, `server.mcp.spec.ts`,
23
+ * `serve.spec.ts`, and `cli.spec.ts`'s spawned-binary cases, since
24
+ * `spawnSync`'s `env: { ...process.env }` inherits vitest's own
25
+ * `VITEST=true`). None of those specs assert on log content — they assert
26
+ * status codes and response bodies — so under vitest this swaps in a no-op
27
+ * logger. `mcpPlugin`/`cliPlugin` only ever call `.info`/`.error` on it, but
28
+ * `apiFastifyPlugin` hands it straight to `Fastify({ logger })`, whose own
29
+ * `validateLogger` (`fastify/lib/logger.js`) REQUIRES the full pino surface
30
+ * (`info,error,debug,fatal,warn,trace,child`) or throws
31
+ * `FST_ERR_LOG_INVALID_LOGGER` — confirmed empirically, not guessed, by a
32
+ * first cut here that only stubbed `info`/`error` and blew up every
33
+ * `server.spec.ts` HTTP test with exactly that error. `child()` returns the
34
+ * same no-op instance (fastify calls it per-request to derive a child
35
+ * logger; a self-referencing no-op keeps every descendant silent too).
36
+ * Outside vitest (a real `backlog serve` or CLI invocation) this returns
37
+ * `undefined` and the real pino default logger is used, unchanged.
38
+ */
39
+ export declare function testSilentLogger(): Logger | undefined;
16
40
  export interface StartOpts {
17
41
  transport: 'http' | 'mcp' | 'both';
18
42
  port?: number;