@adhd/backlog 0.1.5 โ†’ 0.1.6

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 CHANGED
@@ -1,3 +1,15 @@
1
+ ## 0.1.6 (2026-08-12)
2
+
3
+
4
+ ### ๐Ÿฉน Fixes
5
+
6
+ - **backlog:** honor ADHD_BACKLOG_DATABASE_PATH env override (BUG-002)
7
+
8
+
9
+ ### โค๏ธ Thank You
10
+
11
+ - pseudosky
12
+
1
13
  ## 0.1.5 (2026-08-12)
2
14
 
3
15
 
package/env.d.ts CHANGED
@@ -32,6 +32,29 @@ export interface BuildBacklogEnvOptions {
32
32
  instanceId?: string;
33
33
  }
34
34
  export declare function buildBacklogEnv(options?: BuildBacklogEnvOptions): Environment<BacklogConfig>;
35
+ /**
36
+ * BUG-002: the effective SQLite backlog-graph DB path. Every store-open site
37
+ * (`cli.ts`'s `runBacklogCli`, `server.ts`'s `startBacklogServer`) must
38
+ * resolve the path through THIS helper โ€” never `env.files.db` directly โ€”
39
+ * or a consumer setting `ADHD_BACKLOG_DATABASE_PATH` silently hits the
40
+ * scope-root file instead of the path they asked for (the env var was
41
+ * declared on `db.path` in `backlogEnvironmentSpec` but nothing consumed
42
+ * it, so a controlled scratch experiment redirected nowhere and opened the
43
+ * production store). Resolution order, matching the FieldSpec cascade the
44
+ * `@adhd/environment` builder implements (config-resolver.ts ยง2.2):
45
+ *
46
+ * 1. `ADHD_BACKLOG_DATABASE_PATH` (env var โ†’ `config.db.path`) โ€” wins;
47
+ * 2. `db.path` from a config file (system/global/project/local layers);
48
+ * 3. fallback: `files.db` โ€” the namespaced `backlog.db` under the resolved
49
+ * scope root (the declaration's own "Unset โ‡’ falls back to env.files.db").
50
+ *
51
+ * Mirrors `agent-mcp`'s `db/client.ts` precedent
52
+ * (`config.db.path ?? files['db']`), with one deliberate divergence: no
53
+ * `path.resolve` wrap here, because `openGraphBacklogStore` treats the
54
+ * literal `':memory:'` as a special in-memory path and `resolve()` would
55
+ * corrupt it into `<cwd>/':memory:'`.
56
+ */
57
+ export declare function resolveBacklogDbPath(env: Environment<BacklogConfig>): string;
35
58
  /**
36
59
  * DESIGN.md ยง4.4 โ€” the recommended (not enforced) claimant identity shape:
37
60
  * `${agentName}:${instanceId}`. Exposed as a plain helper, never baked into
package/index.d.ts CHANGED
@@ -8,7 +8,7 @@ export { installSkill, runInstallSkillCommand } from './install-skill.js';
8
8
  export type { InstallSkillResult, SkillHost, SkillScope } from './install-skill.js';
9
9
  export { runServeCommand } from './serve.js';
10
10
  export type { RunServeCommandOpts } from './serve.js';
11
- export { buildBacklogEnv, resolveBacklogScope, suggestClaimantIdentity, backlogEnvironmentSpec } from './env.js';
11
+ export { buildBacklogEnv, resolveBacklogScope, resolveBacklogDbPath, suggestClaimantIdentity, backlogEnvironmentSpec } from './env.js';
12
12
  export type { BacklogConfig, BuildBacklogEnvOptions } from './env.js';
13
13
  export { openGraphBacklogStore, closeGraphBacklogStore } from './store/graph-backlog-store.js';
14
14
  export type { GraphBacklogStore } from './store/graph-backlog-store.js';