@adhd/backlog 0.1.5 โ 0.1.7
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 +24 -0
- package/client.d.ts +25 -1
- package/env.d.ts +23 -0
- package/index.d.ts +1 -1
- package/index.js +97 -97
- package/index.mjs +4481 -4306
- package/model.d.ts +68 -0
- package/package.json +3 -3
- package/store/lifecycle.d.ts +13 -0
- package/store/repo-migration.d.ts +51 -0
- package/store/signal-cleanup.d.ts +38 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
## 0.1.7 (2026-08-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### ๐ฉน Fixes
|
|
5
|
+
|
|
6
|
+
- **backlog:** persist citations, atomic repo migration, signal cleanup
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### โค๏ธ Thank You
|
|
10
|
+
|
|
11
|
+
- pseudosky
|
|
12
|
+
|
|
13
|
+
## 0.1.6 (2026-08-12)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### ๐ฉน Fixes
|
|
17
|
+
|
|
18
|
+
- **backlog:** honor ADHD_BACKLOG_DATABASE_PATH env override (BUG-002)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### โค๏ธ Thank You
|
|
22
|
+
|
|
23
|
+
- pseudosky
|
|
24
|
+
|
|
1
25
|
## 0.1.5 (2026-08-12)
|
|
2
26
|
|
|
3
27
|
|
package/client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GraphBacklogStore } from './store/graph-backlog-store.js';
|
|
2
2
|
import { BacklogConfig } from './env.js';
|
|
3
|
-
import { ArchiveOpts, ArchiveResult, AuditTrailResult, BacklogFilter, BacklogItem, BacklogStats, BacklogStatus, ClaimOpts, ClaimResult, Citation, CreateItemInput, CreateItemResult, DependencyGraph, ImportMarkdownInput, ImportResult, MigrationPhase, MigrationStatusResult, Priority, ReleaseResult, SetMigrationPhaseResult, StatsScope, TopoOrderResult, TransitionOpts, UpdateItemInput } from './model.js';
|
|
3
|
+
import { ArchiveOpts, ArchiveResult, AuditTrailResult, BacklogFilter, BacklogItem, BacklogStats, BacklogStatus, ClaimOpts, ClaimResult, Citation, CreateItemInput, CreateItemResult, DependencyGraph, ImportMarkdownInput, ImportResult, MigrationPhase, MigrationStatusResult, Priority, ReleaseResult, RepoMigrationResult, SetMigrationPhaseResult, StatsScope, TopoOrderResult, TransitionOpts, UpdateItemInput } from './model.js';
|
|
4
4
|
import { Environment } from '@adhd/environment';
|
|
5
5
|
|
|
6
6
|
/** The one type apigen special-cases via the `ctx-name-only` invariant. */
|
|
@@ -92,6 +92,30 @@ export declare function mergeItems(ctx: BacklogCtx, repo: string, keepHumanId: s
|
|
|
92
92
|
export declare function setPriority(ctx: BacklogCtx, repo: string, humanId: string, priority: Priority): Promise<BacklogItem>;
|
|
93
93
|
/** MEMBER_OF edge to a plan node (auto-created if the plan slug hasn't been seen before). */
|
|
94
94
|
export declare function attachToPlan(ctx: BacklogCtx, repo: string, humanId: string, planSlug: string): Promise<void>;
|
|
95
|
+
/**
|
|
96
|
+
* BUG-BACKLOG-REPO-SPLIT-001 / DEBT-BACKLOG-REPO-MOVE-001 โ the dedicated
|
|
97
|
+
* primitive to move every live item out of `fromRepo` into `toRepo` (a
|
|
98
|
+
* repo-key correction, e.g. a legacy `"adhd"` string onto the canonical
|
|
99
|
+
* `"PseudoSky/adhd"`). `dryRun` defaults to `true`: a caller must pass
|
|
100
|
+
* `dryRun:false` explicitly to write anything โ the default call is always
|
|
101
|
+
* safe to make speculatively and returns the full plan (including which
|
|
102
|
+
* items would be renamed, and to what) with zero mutation.
|
|
103
|
+
*
|
|
104
|
+
* Collisions (a humanId already live in `toRepo`) are never silently
|
|
105
|
+
* dropped, overwritten, or left ambiguous โ each is deterministically
|
|
106
|
+
* renamed to the next free number in its own family within `toRepo`
|
|
107
|
+
* (`store/repo-migration.ts`'s `planRepoMigration`), and an audit note
|
|
108
|
+
* recording the original `(fromRepo, humanId)` is attached to the moved
|
|
109
|
+
* item so the rename is traceable. Cross-item links (DEPENDS_ON,
|
|
110
|
+
* RELATES_TO, PART_OF, SUPERSEDES, SAME_AS, MEMBER_OF, ASSIGNED_TO) are
|
|
111
|
+
* preserved automatically โ a move never changes a node's id, only its
|
|
112
|
+
* `namespace`/`repo`/`humanId`/`name`/`content`.
|
|
113
|
+
*
|
|
114
|
+
* Every planned item gets exactly one reported outcome
|
|
115
|
+
* (`results[i].ok`/`error`) when `dryRun:false` โ a per-item failure never
|
|
116
|
+
* aborts the rest of the batch and never goes unreported.
|
|
117
|
+
*/
|
|
118
|
+
export declare function migrateRepo(ctx: BacklogCtx, fromRepo: string, toRepo: string, by: string, dryRun?: boolean): Promise<RepoMigrationResult>;
|
|
95
119
|
export declare function importFromMarkdown(ctx: BacklogCtx, input: ImportMarkdownInput): Promise<ImportResult>;
|
|
96
120
|
/**
|
|
97
121
|
* Excludes archived items (SPEC.md ยง5.4 archiveResolved) โ see markdown.ts's
|
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';
|