@rasensio/aidlc 1.6.0 → 1.8.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.
- package/dist/cli.js +7 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/doctor.d.ts +27 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +97 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/init.js +13 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/metrics.d.ts +10 -0
- package/dist/commands/metrics.d.ts.map +1 -0
- package/dist/commands/metrics.js +83 -0
- package/dist/commands/metrics.js.map +1 -0
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +56 -10
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/transition.js +88 -4
- package/dist/commands/transition.js.map +1 -1
- package/dist/commands/update.js +11 -16
- package/dist/commands/update.js.map +1 -1
- package/dist/concurrency/claim-store.d.ts +10 -0
- package/dist/concurrency/claim-store.d.ts.map +1 -1
- package/dist/concurrency/claim-store.js +30 -0
- package/dist/concurrency/claim-store.js.map +1 -1
- package/dist/concurrency/gitattributes.d.ts +6 -0
- package/dist/concurrency/gitattributes.d.ts.map +1 -1
- package/dist/concurrency/gitattributes.js +16 -4
- package/dist/concurrency/gitattributes.js.map +1 -1
- package/dist/concurrency/registry.d.ts +4 -1
- package/dist/concurrency/registry.d.ts.map +1 -1
- package/dist/concurrency/registry.js +14 -6
- package/dist/concurrency/registry.js.map +1 -1
- package/dist/cost/recorder.d.ts +8 -0
- package/dist/cost/recorder.d.ts.map +1 -1
- package/dist/cost/recorder.js +41 -0
- package/dist/cost/recorder.js.map +1 -1
- package/dist/cost/sessions.d.ts +10 -2
- package/dist/cost/sessions.d.ts.map +1 -1
- package/dist/cost/sessions.js +26 -4
- package/dist/cost/sessions.js.map +1 -1
- package/dist/doctor/context.d.ts +7 -0
- package/dist/doctor/context.d.ts.map +1 -0
- package/dist/doctor/context.js +16 -0
- package/dist/doctor/context.js.map +1 -0
- package/dist/doctor/git.d.ts +17 -0
- package/dist/doctor/git.d.ts.map +1 -0
- package/dist/doctor/git.js +43 -0
- package/dist/doctor/git.js.map +1 -0
- package/dist/doctor/migrations/cost-gitignore.d.ts +11 -0
- package/dist/doctor/migrations/cost-gitignore.d.ts.map +1 -0
- package/dist/doctor/migrations/cost-gitignore.js +38 -0
- package/dist/doctor/migrations/cost-gitignore.js.map +1 -0
- package/dist/doctor/migrations/gitattributes.d.ts +8 -0
- package/dist/doctor/migrations/gitattributes.d.ts.map +1 -0
- package/dist/doctor/migrations/gitattributes.js +31 -0
- package/dist/doctor/migrations/gitattributes.js.map +1 -0
- package/dist/doctor/migrations/index.d.ts +10 -0
- package/dist/doctor/migrations/index.d.ts.map +1 -0
- package/dist/doctor/migrations/index.js +26 -0
- package/dist/doctor/migrations/index.js.map +1 -0
- package/dist/doctor/migrations/knowledge-gitignore.d.ts +12 -0
- package/dist/doctor/migrations/knowledge-gitignore.d.ts.map +1 -0
- package/dist/doctor/migrations/knowledge-gitignore.js +44 -0
- package/dist/doctor/migrations/knowledge-gitignore.js.map +1 -0
- package/dist/doctor/migrations/nested-gitignore.d.ts +14 -0
- package/dist/doctor/migrations/nested-gitignore.d.ts.map +1 -0
- package/dist/doctor/migrations/nested-gitignore.js +35 -0
- package/dist/doctor/migrations/nested-gitignore.js.map +1 -0
- package/dist/doctor/migrations/prune-cost-locks.d.ts +8 -0
- package/dist/doctor/migrations/prune-cost-locks.d.ts.map +1 -0
- package/dist/doctor/migrations/prune-cost-locks.js +28 -0
- package/dist/doctor/migrations/prune-cost-locks.js.map +1 -0
- package/dist/doctor/migrations/prune-registry.d.ts +11 -0
- package/dist/doctor/migrations/prune-registry.d.ts.map +1 -0
- package/dist/doctor/migrations/prune-registry.js +48 -0
- package/dist/doctor/migrations/prune-registry.js.map +1 -0
- package/dist/doctor/migrations/prune-session-stash.d.ts +8 -0
- package/dist/doctor/migrations/prune-session-stash.d.ts.map +1 -0
- package/dist/doctor/migrations/prune-session-stash.js +28 -0
- package/dist/doctor/migrations/prune-session-stash.js.map +1 -0
- package/dist/doctor/migrations/shipped-actions.d.ts +8 -0
- package/dist/doctor/migrations/shipped-actions.d.ts.map +1 -0
- package/dist/doctor/migrations/shipped-actions.js +32 -0
- package/dist/doctor/migrations/shipped-actions.js.map +1 -0
- package/dist/doctor/migrations/untrack-cost-ephemera.d.ts +14 -0
- package/dist/doctor/migrations/untrack-cost-ephemera.d.ts.map +1 -0
- package/dist/doctor/migrations/untrack-cost-ephemera.js +60 -0
- package/dist/doctor/migrations/untrack-cost-ephemera.js.map +1 -0
- package/dist/doctor/runner.d.ts +22 -0
- package/dist/doctor/runner.d.ts.map +1 -0
- package/dist/doctor/runner.js +99 -0
- package/dist/doctor/runner.js.map +1 -0
- package/dist/doctor/types.d.ts +66 -0
- package/dist/doctor/types.d.ts.map +1 -0
- package/dist/doctor/types.js +11 -0
- package/dist/doctor/types.js.map +1 -0
- package/dist/events/event-bus.d.ts +7 -0
- package/dist/events/event-bus.d.ts.map +1 -1
- package/dist/events/event-bus.js +36 -1
- package/dist/events/event-bus.js.map +1 -1
- package/dist/events/shipped-actions.d.ts +24 -0
- package/dist/events/shipped-actions.d.ts.map +1 -0
- package/dist/events/shipped-actions.js +56 -0
- package/dist/events/shipped-actions.js.map +1 -0
- package/dist/metrics/report.d.ts +83 -0
- package/dist/metrics/report.d.ts.map +1 -0
- package/dist/metrics/report.js +286 -0
- package/dist/metrics/report.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* prune-cost-locks migration (AC-19): remove stale per-session cost lock
|
|
3
|
+
* files. Staleness threshold stays owned by cost/recorder.ts. Works
|
|
4
|
+
* without git (AC-12).
|
|
5
|
+
*/
|
|
6
|
+
import type { Migration } from '../types.js';
|
|
7
|
+
export declare const pruneCostLocks: Migration;
|
|
8
|
+
//# sourceMappingURL=prune-cost-locks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prune-cost-locks.d.ts","sourceRoot":"","sources":["../../../src/doctor/migrations/prune-cost-locks.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,eAAO,MAAM,cAAc,EAAE,SAmB5B,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* prune-cost-locks migration (AC-19): remove stale per-session cost lock
|
|
3
|
+
* files. Staleness threshold stays owned by cost/recorder.ts. Works
|
|
4
|
+
* without git (AC-12).
|
|
5
|
+
*/
|
|
6
|
+
import { staleLockFiles, removeStaleLocks } from '../../cost/recorder.js';
|
|
7
|
+
export const pruneCostLocks = {
|
|
8
|
+
id: 'prune-cost-locks',
|
|
9
|
+
tier: 'safe',
|
|
10
|
+
check(ctx) {
|
|
11
|
+
const stale = staleLockFiles(ctx.projectRoot, ctx.now);
|
|
12
|
+
if (stale.length === 0)
|
|
13
|
+
return { applicable: true, pending: false };
|
|
14
|
+
return {
|
|
15
|
+
applicable: true,
|
|
16
|
+
pending: true,
|
|
17
|
+
description: `would remove ${stale.length} stale cost lock file(s)`,
|
|
18
|
+
};
|
|
19
|
+
},
|
|
20
|
+
apply(ctx) {
|
|
21
|
+
const removed = removeStaleLocks(ctx.projectRoot, ctx.now);
|
|
22
|
+
return {
|
|
23
|
+
changed: removed.length > 0,
|
|
24
|
+
summary: `removed ${removed.length} stale cost lock file(s)`,
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=prune-cost-locks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prune-cost-locks.js","sourceRoot":"","sources":["../../../src/doctor/migrations/prune-cost-locks.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAG1E,MAAM,CAAC,MAAM,cAAc,GAAc;IACvC,EAAE,EAAE,kBAAkB;IACtB,IAAI,EAAE,MAAM;IACZ,KAAK,CAAC,GAAG;QACP,MAAM,KAAK,GAAG,cAAc,CAAC,GAAG,CAAC,WAAW,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;QACvD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;QACpE,OAAO;YACL,UAAU,EAAE,IAAI;YAChB,OAAO,EAAE,IAAI;YACb,WAAW,EAAE,gBAAgB,KAAK,CAAC,MAAM,0BAA0B;SACpE,CAAC;IACJ,CAAC;IACD,KAAK,CAAC,GAAG;QACP,MAAM,OAAO,GAAG,gBAAgB,CAAC,GAAG,CAAC,WAAW,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;QAC3D,OAAO;YACL,OAAO,EAAE,OAAO,CAAC,MAAM,GAAG,CAAC;YAC3B,OAAO,EAAE,WAAW,OAAO,CAAC,MAAM,0BAA0B;SAC7D,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* prune-registry migration (AC-20, AC-21): remove stale instance-registry
|
|
3
|
+
* entries and release orphaned claims — the same logic behind
|
|
4
|
+
* `aidlc status --prune`, whose surface is unchanged.
|
|
5
|
+
*
|
|
6
|
+
* Coordination files live in the git common dir, so running from a linked
|
|
7
|
+
* worktree cleans shared state exactly once and never touches any index.
|
|
8
|
+
*/
|
|
9
|
+
import type { Migration } from '../types.js';
|
|
10
|
+
export declare const pruneRegistry: Migration;
|
|
11
|
+
//# sourceMappingURL=prune-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prune-registry.d.ts","sourceRoot":"","sources":["../../../src/doctor/migrations/prune-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AASH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,eAAO,MAAM,aAAa,EAAE,SAiC3B,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* prune-registry migration (AC-20, AC-21): remove stale instance-registry
|
|
3
|
+
* entries and release orphaned claims — the same logic behind
|
|
4
|
+
* `aidlc status --prune`, whose surface is unchanged.
|
|
5
|
+
*
|
|
6
|
+
* Coordination files live in the git common dir, so running from a linked
|
|
7
|
+
* worktree cleans shared state exactly once and never touches any index.
|
|
8
|
+
*/
|
|
9
|
+
import { openRegistry } from '../../concurrency/registry.js';
|
|
10
|
+
import { openClaimStore, orphanedClaims, releaseOrphanedClaims, } from '../../concurrency/claim-store.js';
|
|
11
|
+
import { loadClaimTimeoutMinutes } from '../../cost/config.js';
|
|
12
|
+
export const pruneRegistry = {
|
|
13
|
+
id: 'prune-registry',
|
|
14
|
+
tier: 'safe',
|
|
15
|
+
check(ctx) {
|
|
16
|
+
if (ctx.gitCommonDir === null) {
|
|
17
|
+
return { applicable: false, reason: 'requires a git repository' };
|
|
18
|
+
}
|
|
19
|
+
const registry = openRegistry(ctx.projectRoot);
|
|
20
|
+
const stale = registry ? registry.stale() : [];
|
|
21
|
+
const store = openClaimStore(ctx.projectRoot, loadClaimTimeoutMinutes(ctx.projectRoot));
|
|
22
|
+
const orphans = orphanedClaims(store);
|
|
23
|
+
if (stale.length === 0 && orphans.length === 0) {
|
|
24
|
+
return { applicable: true, pending: false };
|
|
25
|
+
}
|
|
26
|
+
const parts = [];
|
|
27
|
+
if (stale.length > 0)
|
|
28
|
+
parts.push(`${stale.length} stale registry entr${stale.length === 1 ? 'y' : 'ies'}`);
|
|
29
|
+
if (orphans.length > 0)
|
|
30
|
+
parts.push(`${orphans.length} orphaned claim(s)`);
|
|
31
|
+
return {
|
|
32
|
+
applicable: true,
|
|
33
|
+
pending: true,
|
|
34
|
+
description: `would prune ${parts.join(' and ')}`,
|
|
35
|
+
};
|
|
36
|
+
},
|
|
37
|
+
apply(ctx) {
|
|
38
|
+
const registry = openRegistry(ctx.projectRoot);
|
|
39
|
+
const removed = registry ? registry.prune() : [];
|
|
40
|
+
const store = openClaimStore(ctx.projectRoot, loadClaimTimeoutMinutes(ctx.projectRoot));
|
|
41
|
+
const released = releaseOrphanedClaims(store);
|
|
42
|
+
return {
|
|
43
|
+
changed: removed.length > 0 || released.length > 0,
|
|
44
|
+
summary: `pruned ${removed.length} registry entr${removed.length === 1 ? 'y' : 'ies'}, released ${released.length} orphaned claim(s)`,
|
|
45
|
+
};
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=prune-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prune-registry.js","sourceRoot":"","sources":["../../../src/doctor/migrations/prune-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EACL,cAAc,EACd,cAAc,EACd,qBAAqB,GACtB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAG/D,MAAM,CAAC,MAAM,aAAa,GAAc;IACtC,EAAE,EAAE,gBAAgB;IACpB,IAAI,EAAE,MAAM;IACZ,KAAK,CAAC,GAAG;QACP,IAAI,GAAG,CAAC,YAAY,KAAK,IAAI,EAAE,CAAC;YAC9B,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,2BAA2B,EAAE,CAAC;QACpE,CAAC;QACD,MAAM,QAAQ,GAAG,YAAY,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QAC/C,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/C,MAAM,KAAK,GAAG,cAAc,CAAC,GAAG,CA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AAQ,CAAC,MAAM,GAAG,CAAC;YAClD,OAAO,EAAE,UAAU,OAAO,CAAC,MAAM,iBAAiB,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,cAAc,QAAQ,CAAC,MAAM,oBAAoB;SACtI,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* prune-session-stash migration (AC-18): delete expired active-session
|
|
3
|
+
* stash entries. TTL logic stays owned by cost/sessions.ts — this
|
|
4
|
+
* migration only invokes it. Works without git (AC-12).
|
|
5
|
+
*/
|
|
6
|
+
import type { Migration } from '../types.js';
|
|
7
|
+
export declare const pruneSessionStash: Migration;
|
|
8
|
+
//# sourceMappingURL=prune-session-stash.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prune-session-stash.d.ts","sourceRoot":"","sources":["../../../src/doctor/migrations/prune-session-stash.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,eAAO,MAAM,iBAAiB,EAAE,SAmB/B,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* prune-session-stash migration (AC-18): delete expired active-session
|
|
3
|
+
* stash entries. TTL logic stays owned by cost/sessions.ts — this
|
|
4
|
+
* migration only invokes it. Works without git (AC-12).
|
|
5
|
+
*/
|
|
6
|
+
import { expiredStashEntries, pruneStash } from '../../cost/sessions.js';
|
|
7
|
+
export const pruneSessionStash = {
|
|
8
|
+
id: 'prune-session-stash',
|
|
9
|
+
tier: 'safe',
|
|
10
|
+
check(ctx) {
|
|
11
|
+
const expired = expiredStashEntries(ctx.projectRoot, ctx.now);
|
|
12
|
+
if (expired.length === 0)
|
|
13
|
+
return { applicable: true, pending: false };
|
|
14
|
+
return {
|
|
15
|
+
applicable: true,
|
|
16
|
+
pending: true,
|
|
17
|
+
description: `would remove ${expired.length} expired active-session stash entr${expired.length === 1 ? 'y' : 'ies'}`,
|
|
18
|
+
};
|
|
19
|
+
},
|
|
20
|
+
apply(ctx) {
|
|
21
|
+
const removed = pruneStash(ctx.projectRoot, ctx.now);
|
|
22
|
+
return {
|
|
23
|
+
changed: removed.length > 0,
|
|
24
|
+
summary: `removed ${removed.length} expired active-session stash entr${removed.length === 1 ? 'y' : 'ies'}`,
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=prune-session-stash.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prune-session-stash.js","sourceRoot":"","sources":["../../../src/doctor/migrations/prune-session-stash.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGzE,MAAM,CAAC,MAAM,iBAAiB,GAAc;IAC1C,EAAE,EAAE,qBAAqB;IACzB,IAAI,EAAE,MAAM;IACZ,KAAK,CAAC,GAAG;QACP,MAAM,OAAO,GAAG,mBAAmB,CAAC,GAAG,CAAC,WAAW,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;QAC9D,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;QACtE,OAAO;YACL,UAAU,EAAE,IAAI;YAChB,OAAO,EAAE,IAAI;YACb,WAAW,EAAE,gBAAgB,OAAO,CAAC,MAAM,qCAAqC,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE;SACrH,CAAC;IACJ,CAAC;IACD,KAAK,CAAC,GAAG;QACP,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,WAAW,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;QACrD,OAAO;YACL,OAAO,EAAE,OAAO,CAAC,MAAM,GAAG,CAAC;YAC3B,OAAO,EAAE,WAAW,OAAO,CAAC,MAAM,qCAAqC,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE;SAC5G,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* shipped-actions migration (AC-13): the match-by-id shipped lifecycle
|
|
3
|
+
* action installer, absorbed from update.ts's post-bump seam. Malformed
|
|
4
|
+
* actions.yaml reports clean (never clobbers), exactly as before.
|
|
5
|
+
*/
|
|
6
|
+
import type { Migration } from '../types.js';
|
|
7
|
+
export declare const shippedActions: Migration;
|
|
8
|
+
//# sourceMappingURL=shipped-actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shipped-actions.d.ts","sourceRoot":"","sources":["../../../src/doctor/migrations/shipped-actions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAM7C,eAAO,MAAM,cAAc,EAAE,SAmB5B,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* shipped-actions migration (AC-13): the match-by-id shipped lifecycle
|
|
3
|
+
* action installer, absorbed from update.ts's post-bump seam. Malformed
|
|
4
|
+
* actions.yaml reports clean (never clobbers), exactly as before.
|
|
5
|
+
*/
|
|
6
|
+
import { join } from 'node:path';
|
|
7
|
+
import { installShippedActions, pendingShippedActions, } from '../../events/shipped-actions.js';
|
|
8
|
+
function actionsPath(projectRoot) {
|
|
9
|
+
return join(projectRoot, '.aidlc', 'actions.yaml');
|
|
10
|
+
}
|
|
11
|
+
export const shippedActions = {
|
|
12
|
+
id: 'shipped-actions',
|
|
13
|
+
tier: 'safe',
|
|
14
|
+
check(ctx) {
|
|
15
|
+
const pending = pendingShippedActions(actionsPath(ctx.projectRoot));
|
|
16
|
+
if (pending.length === 0)
|
|
17
|
+
return { applicable: true, pending: false };
|
|
18
|
+
return {
|
|
19
|
+
applicable: true,
|
|
20
|
+
pending: true,
|
|
21
|
+
description: `would install shipped action(s): ${pending.join(', ')}`,
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
apply(ctx) {
|
|
25
|
+
const installed = installShippedActions(actionsPath(ctx.projectRoot));
|
|
26
|
+
return {
|
|
27
|
+
changed: installed.length > 0,
|
|
28
|
+
summary: `installed shipped action(s): ${installed.join(', ') || 'none'}`,
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=shipped-actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shipped-actions.js","sourceRoot":"","sources":["../../../src/doctor/migrations/shipped-actions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AAGzC,SAAS,WAAW,CAAC,WAAmB;IACtC,OAAO,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;AACrD,CAAC;AAED,MAAM,CAAC,MAAM,cAAc,GAAc;IACvC,EAAE,EAAE,iBAAiB;IACrB,IAAI,EAAE,MAAM;IACZ,KAAK,CAAC,GAAG;QACP,MAAM,OAAO,GAAG,qBAAqB,CAAC,WAAW,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC;QACpE,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;QACtE,OAAO;YACL,UAAU,EAAE,IAAI;YAChB,OAAO,EAAE,IAAI;YACb,WAAW,EAAE,oCAAoC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;SACtE,CAAC;IACJ,CAAC;IACD,KAAK,CAAC,GAAG;QACP,MAAM,SAAS,GAAG,qBAAqB,CAAC,WAAW,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC;QACtE,OAAO;YACL,OAAO,EAAE,SAAS,CAAC,MAAM,GAAG,CAAC;YAC7B,OAAO,EAAE,gCAAgC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,MAAM,EAAE;SAC1E,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* untrack-cost-ephemera migration (AC-17, confirm tier): cost ephemera
|
|
3
|
+
* committed before any ignore rule existed get untracked with
|
|
4
|
+
* `git rm --cached` — files stay on disk; the staged deletion is the
|
|
5
|
+
* user's to commit.
|
|
6
|
+
*
|
|
7
|
+
* The printed command is exactly what apply() executes (NFR). Pathspecs
|
|
8
|
+
* include the mistaken `.aidlc/costs/` plural path seen in the wild.
|
|
9
|
+
* unattributed.ndjson is durable ledger data — never listed here.
|
|
10
|
+
*/
|
|
11
|
+
import type { Migration } from '../types.js';
|
|
12
|
+
export declare const EPHEMERA_PATHSPECS: string[];
|
|
13
|
+
export declare const untrackCostEphemera: Migration;
|
|
14
|
+
//# sourceMappingURL=untrack-cost-ephemera.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"untrack-cost-ephemera.d.ts","sourceRoot":"","sources":["../../../src/doctor/migrations/untrack-cost-ephemera.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAG7C,eAAO,MAAM,kBAAkB,UAK9B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,SAuCjC,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* untrack-cost-ephemera migration (AC-17, confirm tier): cost ephemera
|
|
3
|
+
* committed before any ignore rule existed get untracked with
|
|
4
|
+
* `git rm --cached` — files stay on disk; the staged deletion is the
|
|
5
|
+
* user's to commit.
|
|
6
|
+
*
|
|
7
|
+
* The printed command is exactly what apply() executes (NFR). Pathspecs
|
|
8
|
+
* include the mistaken `.aidlc/costs/` plural path seen in the wild.
|
|
9
|
+
* unattributed.ndjson is durable ledger data — never listed here.
|
|
10
|
+
*/
|
|
11
|
+
import { execFileSync } from 'node:child_process';
|
|
12
|
+
import { trackedFiles, hasStagedChanges, shellQuote } from '../git.js';
|
|
13
|
+
export const EPHEMERA_PATHSPECS = [
|
|
14
|
+
'.aidlc/cost/active-sessions',
|
|
15
|
+
'.aidlc/cost/capture.log',
|
|
16
|
+
'.aidlc/cost/locks',
|
|
17
|
+
'.aidlc/costs',
|
|
18
|
+
];
|
|
19
|
+
export const untrackCostEphemera = {
|
|
20
|
+
id: 'untrack-cost-ephemera',
|
|
21
|
+
tier: 'confirm',
|
|
22
|
+
check(ctx) {
|
|
23
|
+
if (ctx.gitCommonDir === null) {
|
|
24
|
+
return { applicable: false, reason: 'requires a git repository' };
|
|
25
|
+
}
|
|
26
|
+
const files = trackedFiles(ctx.projectRoot, EPHEMERA_PATHSPECS);
|
|
27
|
+
if (files.length === 0)
|
|
28
|
+
return { applicable: true, pending: false };
|
|
29
|
+
const commands = [`git rm --cached -- ${files.map(shellQuote).join(' ')}`];
|
|
30
|
+
if (hasStagedChanges(ctx.projectRoot)) {
|
|
31
|
+
return {
|
|
32
|
+
applicable: true,
|
|
33
|
+
pending: true,
|
|
34
|
+
description: `would untrack ${files.length} committed cost ephemera file(s)`,
|
|
35
|
+
commands,
|
|
36
|
+
blocked: 'git index has staged changes — commit or unstage them first, then run the command yourself or re-run aidlc doctor',
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
applicable: true,
|
|
41
|
+
pending: true,
|
|
42
|
+
description: `would untrack ${files.length} committed cost ephemera file(s) (files stay on disk)`,
|
|
43
|
+
commands,
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
apply(ctx) {
|
|
47
|
+
const files = trackedFiles(ctx.projectRoot, EPHEMERA_PATHSPECS);
|
|
48
|
+
if (files.length === 0)
|
|
49
|
+
return { changed: false, summary: 'nothing tracked' };
|
|
50
|
+
execFileSync('git', ['rm', '--cached', '--quiet', '--', ...files], {
|
|
51
|
+
cwd: ctx.projectRoot,
|
|
52
|
+
stdio: ['ignore', 'ignore', 'pipe'],
|
|
53
|
+
});
|
|
54
|
+
return {
|
|
55
|
+
changed: true,
|
|
56
|
+
summary: `untracked ${files.length} file(s) — staged as deletions, files kept on disk; commit when ready`,
|
|
57
|
+
};
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=untrack-cost-ephemera.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"untrack-cost-ephemera.js","sourceRoot":"","sources":["../../../src/doctor/migrations/untrack-cost-ephemera.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvE,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,6BAA6B;IAC7B,yBAAyB;IACzB,mBAAmB;IACnB,cAAc;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAc;IAC5C,EAAE,EAAE,uBAAuB;IAC3B,IAAI,EAAE,SAAS;IACf,KAAK,CAAC,GAAG;QACP,IAAI,GAAG,CAAC,YAAY,KAAK,IAAI,EAAE,CAAC;YAC9B,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,2BAA2B,EAAE,CAAC;QACpE,CAAC;QACD,MAAM,KAAK,GAAG,YAAY,CAAC,GAAG,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC;QAChE,IA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2
|
+
* Doctor runner: iterates every registered migration on every run (AC-1),
|
|
3
|
+
* applying safe-tier migrations automatically (AC-4) and gating
|
|
4
|
+
* confirm-tier migrations behind the print-exact-commands → confirm flow
|
|
5
|
+
* (AC-5..AC-9, AC-23; installMergeDriver pattern from commands/knowledge.ts).
|
|
6
|
+
*
|
|
7
|
+
* The runner owns the whole confirm decision table in one place —
|
|
8
|
+
* blocked → --yes → non-interactive skip → prompt — with an injectable
|
|
9
|
+
* ConfirmFn so tests never touch a TTY.
|
|
10
|
+
*/
|
|
11
|
+
import type { DoctorContext, DoctorRunResult, Migration } from './types.js';
|
|
12
|
+
export type ConfirmFn = (req: {
|
|
13
|
+
id: string;
|
|
14
|
+
description: string;
|
|
15
|
+
commands: string[];
|
|
16
|
+
}) => Promise<boolean>;
|
|
17
|
+
export interface RunDoctorOpts {
|
|
18
|
+
dryRun: boolean;
|
|
19
|
+
confirm?: ConfirmFn;
|
|
20
|
+
}
|
|
21
|
+
export declare function runDoctor(ctx: DoctorContext, migrations: Migration[], opts: RunDoctorOpts): Promise<DoctorRunResult>;
|
|
22
|
+
//# sourceMappingURL=runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/doctor/runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EACf,SAAS,EAEV,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AAYvB,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,wBAAsB,SAAS,CAC7B,GAAG,EAAE,aAAa,EAClB,UAAU,EAAE,SAAS,EAAE,EACvB,IAAI,EAAE,aAAa,GAClB,OAAO,CAAC,eAAe,CAAC,CAY1B"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Doctor runner: iterates every registered migration on every run (AC-1),
|
|
3
|
+
* applying safe-tier migrations automatically (AC-4) and gating
|
|
4
|
+
* confirm-tier migrations behind the print-exact-commands → confirm flow
|
|
5
|
+
* (AC-5..AC-9, AC-23; installMergeDriver pattern from commands/knowledge.ts).
|
|
6
|
+
*
|
|
7
|
+
* The runner owns the whole confirm decision table in one place —
|
|
8
|
+
* blocked → --yes → non-interactive skip → prompt — with an injectable
|
|
9
|
+
* ConfirmFn so tests never touch a TTY.
|
|
10
|
+
*/
|
|
11
|
+
import * as clack from '@clack/prompts';
|
|
12
|
+
const defaultConfirm = async ({ id, description, commands }) => {
|
|
13
|
+
process.stdout.write(`\n${id}: ${description}\n`);
|
|
14
|
+
process.stdout.write('This will run:\n');
|
|
15
|
+
for (const cmd of commands) {
|
|
16
|
+
process.stdout.write(` ${cmd}\n`);
|
|
17
|
+
}
|
|
18
|
+
const confirmed = await clack.confirm({ message: 'Run these commands now?' });
|
|
19
|
+
return confirmed === true;
|
|
20
|
+
};
|
|
21
|
+
export async function runDoctor(ctx, migrations, opts) {
|
|
22
|
+
const confirm = opts.confirm ?? defaultConfirm;
|
|
23
|
+
const outcomes = [];
|
|
24
|
+
for (const m of migrations) {
|
|
25
|
+
outcomes.push(await runOne(ctx, m, opts.dryRun, confirm));
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
outcomes,
|
|
29
|
+
pendingConfirm: outcomes.filter((o) => o.status === 'pending'),
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
async function runOne(ctx, m, dryRun, confirm) {
|
|
33
|
+
let checked;
|
|
34
|
+
try {
|
|
35
|
+
checked = m.check(ctx);
|
|
36
|
+
}
|
|
37
|
+
catch (err) {
|
|
38
|
+
return outcome(m, 'error', `check failed: ${err.message}`);
|
|
39
|
+
}
|
|
40
|
+
if (!checked.applicable) {
|
|
41
|
+
return outcome(m, 'not-applicable', checked.reason);
|
|
42
|
+
}
|
|
43
|
+
if (!checked.pending) {
|
|
44
|
+
return outcome(m, 'clean', 'nothing to do');
|
|
45
|
+
}
|
|
46
|
+
if (dryRun) {
|
|
47
|
+
return {
|
|
48
|
+
...outcome(m, 'would-apply', checked.description),
|
|
49
|
+
commands: checked.commands,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
if (m.tier === 'safe') {
|
|
53
|
+
return applyOne(ctx, m);
|
|
54
|
+
}
|
|
55
|
+
// Confirm tier: blocked → --yes → non-interactive → prompt (AC-8, AC-6, AC-23, AC-5).
|
|
56
|
+
if (checked.blocked) {
|
|
57
|
+
return {
|
|
58
|
+
...outcome(m, 'pending', checked.blocked),
|
|
59
|
+
commands: checked.commands,
|
|
60
|
+
pendingReason: 'blocked',
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
if (ctx.yes) {
|
|
64
|
+
return applyOne(ctx, m);
|
|
65
|
+
}
|
|
66
|
+
if (!ctx.interactive) {
|
|
67
|
+
return {
|
|
68
|
+
...outcome(m, 'pending', checked.description),
|
|
69
|
+
commands: checked.commands,
|
|
70
|
+
pendingReason: 'non-interactive',
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
const confirmed = await confirm({
|
|
74
|
+
id: m.id,
|
|
75
|
+
description: checked.description,
|
|
76
|
+
commands: checked.commands ?? [],
|
|
77
|
+
});
|
|
78
|
+
if (!confirmed) {
|
|
79
|
+
return {
|
|
80
|
+
...outcome(m, 'pending', `declined: ${checked.description}`),
|
|
81
|
+
commands: checked.commands,
|
|
82
|
+
pendingReason: 'declined',
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
return applyOne(ctx, m);
|
|
86
|
+
}
|
|
87
|
+
function applyOne(ctx, m) {
|
|
88
|
+
try {
|
|
89
|
+
const applied = m.apply(ctx);
|
|
90
|
+
return outcome(m, applied.changed ? 'applied' : 'clean', applied.summary);
|
|
91
|
+
}
|
|
92
|
+
catch (err) {
|
|
93
|
+
return outcome(m, 'error', `apply failed: ${err.message}`);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
function outcome(m, status, detail) {
|
|
97
|
+
return { id: m.id, tier: m.tier, status, detail };
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=runner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runner.js","sourceRoot":"","sources":["../../src/doctor/runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAcxC,MAAM,cAAc,GAAc,KAAK,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,EAAE;IACxE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,WAAW,IAAI,CAAC,CAAC;IAClD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACzC,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;QAC3B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;IACrC,CAAC;IACD,MAAM,SAAS,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,yBAAyB,EAAE,CAAC,CAAC;IAC9E,OAAO,SAAS,KAAK,IAAI,CAAC;AAC5B,CAAC,CAAC;AAOF,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,GAAkB,EAClB,UAAuB,EACvB,IAAmB;IAEnB,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,cAAc,CAAC;IAC/C,MAAM,QAAQ,GAAuB,EAAE,CAAC;IAExC,KAAK,MAAM,CAAC,IAAI,UAAU,EAAE,CAAC;QAC3B,QAAQ,CAAC,IAAI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GAAG,EAAE,CAAC;QACb,OAAO,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,iBAAkB,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;AACH,CAAC;AAED,SAAS,OAAO,CACd,CAAY,EACZ,MAAkC,EAClC,MAAc;IAEd,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AACpD,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Doctor migration registry types (update-spring-clean AC-1..AC-3).
|
|
3
|
+
*
|
|
4
|
+
* A migration is a named check/apply pair. `check` is a pure state
|
|
5
|
+
* inspection — the ONLY source of pending-ness, shared verbatim by
|
|
6
|
+
* dry-run and real runs so they can never disagree (AC-2, AC-11).
|
|
7
|
+
* No migration-version stamp exists anywhere (AC-3): repos self-heal
|
|
8
|
+
* and converge regardless of the version they were initialized at.
|
|
9
|
+
*/
|
|
10
|
+
export type MigrationTier = 'safe' | 'confirm';
|
|
11
|
+
export interface DoctorContext {
|
|
12
|
+
projectRoot: string;
|
|
13
|
+
/** Git common dir, or null outside a git repo (AC-12). */
|
|
14
|
+
gitCommonDir: string | null;
|
|
15
|
+
/** True when running from a linked worktree (AC-21). */
|
|
16
|
+
isLinkedWorktree: boolean;
|
|
17
|
+
/** Injected clock so TTL migrations are deterministic in tests. */
|
|
18
|
+
now: Date;
|
|
19
|
+
/** stdout is a TTY — confirm-tier migrations may prompt (AC-23). */
|
|
20
|
+
interactive: boolean;
|
|
21
|
+
/** --yes: apply confirm-tier migrations without prompting (AC-6). */
|
|
22
|
+
yes: boolean;
|
|
23
|
+
}
|
|
24
|
+
export type CheckResult = {
|
|
25
|
+
applicable: false;
|
|
26
|
+
reason: string;
|
|
27
|
+
} | {
|
|
28
|
+
applicable: true;
|
|
29
|
+
pending: false;
|
|
30
|
+
} | {
|
|
31
|
+
applicable: true;
|
|
32
|
+
pending: true;
|
|
33
|
+
/** One-line "would ..." used by dry-run listings and prompts (AC-11). */
|
|
34
|
+
description: string;
|
|
35
|
+
/** Confirm tier: the exact shell command(s) apply will run (AC-5). */
|
|
36
|
+
commands?: string[];
|
|
37
|
+
/** Set → apply must not run, even with --yes (AC-8 staged index). */
|
|
38
|
+
blocked?: string;
|
|
39
|
+
};
|
|
40
|
+
export interface ApplyResult {
|
|
41
|
+
changed: boolean;
|
|
42
|
+
/** One-line report, e.g. "removed 3 expired stash entries" (AC-4). */
|
|
43
|
+
summary: string;
|
|
44
|
+
}
|
|
45
|
+
export interface Migration {
|
|
46
|
+
/** Stable id, e.g. 'cost-gitignore' — never renamed (AC-1). */
|
|
47
|
+
id: string;
|
|
48
|
+
tier: MigrationTier;
|
|
49
|
+
check(ctx: DoctorContext): CheckResult;
|
|
50
|
+
apply(ctx: DoctorContext): ApplyResult;
|
|
51
|
+
}
|
|
52
|
+
export type PendingReason = 'declined' | 'non-interactive' | 'blocked';
|
|
53
|
+
export interface MigrationOutcome {
|
|
54
|
+
id: string;
|
|
55
|
+
tier: MigrationTier;
|
|
56
|
+
status: 'applied' | 'clean' | 'not-applicable' | 'would-apply' | 'pending' | 'error';
|
|
57
|
+
detail: string;
|
|
58
|
+
commands?: string[];
|
|
59
|
+
pendingReason?: PendingReason;
|
|
60
|
+
}
|
|
61
|
+
export interface DoctorRunResult {
|
|
62
|
+
outcomes: MigrationOutcome[];
|
|
63
|
+
/** Confirm-tier items left undone — drives the doctor exit code (AC-10). */
|
|
64
|
+
pendingConfirm: MigrationOutcome[];
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/doctor/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,SAAS,CAAC;AAE/C,M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AS,GAAG,OAAO,CAAC;IACrF,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,4EAA4E;IAC5E,cAAc,EAAE,gBAAgB,EAAE,CAAC;CACpC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Doctor migration registry types (update-spring-clean AC-1..AC-3).
|
|
3
|
+
*
|
|
4
|
+
* A migration is a named check/apply pair. `check` is a pure state
|
|
5
|
+
* inspection — the ONLY source of pending-ness, shared verbatim by
|
|
6
|
+
* dry-run and real runs so they can never disagree (AC-2, AC-11).
|
|
7
|
+
* No migration-version stamp exists anywhere (AC-3): repos self-heal
|
|
8
|
+
* and converge regardless of the version they were initialized at.
|
|
9
|
+
*/
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/doctor/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
|
|
@@ -10,6 +10,13 @@
|
|
|
10
10
|
* Requirements: 20.1, 20.9
|
|
11
11
|
*/
|
|
12
12
|
import type { ActionsConfig, EventPayload, DispatchReport } from '../core/types.js';
|
|
13
|
+
/**
|
|
14
|
+
* Path of the retro-pending marker for an instance. Markers are coordination
|
|
15
|
+
* data (like claims/registry): they live in `<git-common-dir>/aidlc/
|
|
16
|
+
* retro-pending/` so every worktree sees them and worktree removal cannot
|
|
17
|
+
* destroy them. Outside a git repo they fall back to the instance state dir.
|
|
18
|
+
*/
|
|
19
|
+
export declare function retroPendingPath(projectRoot: string, instance: string): string;
|
|
13
20
|
/**
|
|
14
21
|
* Load and parse `.aidlc/actions.yaml` into an ActionsConfig.
|
|
15
22
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-bus.d.ts","sourceRoot":"","sources":["../../src/events/event-bus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"event-bus.d.ts","sourceRoot":"","sources":["../../src/events/event-bus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAOH,OAAO,KAAK,EACV,aAAa,EAEb,YAAY,EACZ,cAAc,EAEf,MAAM,kBAAkB,CAAC;AAM1B;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAM9E;AAkDD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAyB3E;AAMD;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,CAC3B,KAAK,EAAE,YAAY,EACnB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,KACxC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAwE1C;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI,CAE3E;AA8ED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,IAAI,CAClB,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,aAAa,GAAG,IAAI,EAC7B,IAAI,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAC1B,cAAc,CAmChB"}
|
package/dist/events/event-bus.js
CHANGED
|
@@ -9,9 +9,27 @@
|
|
|
9
9
|
*
|
|
10
10
|
* Requirements: 20.1, 20.9
|
|
11
11
|
*/
|
|
12
|
-
import { readFileSync, existsSync } from 'node:fs';
|
|
12
|
+
import { readFileSync, existsSync, mkdirSync, writeFileSync } from 'node:fs';
|
|
13
|
+
import { join, dirname } from 'node:path';
|
|
13
14
|
import { execSync } from 'node:child_process';
|
|
14
15
|
import { parse } from 'yaml';
|
|
16
|
+
import { coordinationRoot } from '../concurrency/common-dir.js';
|
|
17
|
+
// ---------------------------------------------------------------------------
|
|
18
|
+
// Retro-pending markers (feedback-loop AC-23, design DD-4)
|
|
19
|
+
// ---------------------------------------------------------------------------
|
|
20
|
+
/**
|
|
21
|
+
* Path of the retro-pending marker for an instance. Markers are coordination
|
|
22
|
+
* data (like claims/registry): they live in `<git-common-dir>/aidlc/
|
|
23
|
+
* retro-pending/` so every worktree sees them and worktree removal cannot
|
|
24
|
+
* destroy them. Outside a git repo they fall back to the instance state dir.
|
|
25
|
+
*/
|
|
26
|
+
export function retroPendingPath(projectRoot, instance) {
|
|
27
|
+
const root = coordinationRoot(projectRoot);
|
|
28
|
+
if (root !== null) {
|
|
29
|
+
return join(root, 'retro-pending', instance);
|
|
30
|
+
}
|
|
31
|
+
return join(projectRoot, '.aidlc', 'state', instance, 'retro-pending');
|
|
32
|
+
}
|
|
15
33
|
// ---------------------------------------------------------------------------
|
|
16
34
|
// Actions config loader
|
|
17
35
|
// ---------------------------------------------------------------------------
|
|
@@ -121,6 +139,23 @@ const builtInHandlers = {
|
|
|
121
139
|
return { success: false, error: `github-issue failed: ${err.message}` };
|
|
122
140
|
}
|
|
123
141
|
},
|
|
142
|
+
/**
|
|
143
|
+
* retro-pending: Mark an instance as awaiting its retrospective
|
|
144
|
+
* (feedback-loop AC-23). Cross-platform Node fs — the shipped
|
|
145
|
+
* on-instance-complete action cannot be a shell script (design F3).
|
|
146
|
+
*/
|
|
147
|
+
'retro-pending': (event) => {
|
|
148
|
+
try {
|
|
149
|
+
const marker = retroPendingPath(process.cwd(), event.instance);
|
|
150
|
+
mkdirSync(dirname(marker), { recursive: true });
|
|
151
|
+
writeFileSync(marker, `${new Date().toISOString()}\n`, 'utf8');
|
|
152
|
+
process.stdout.write(`retro pending for ${event.instance}: run the aidlc-retrospective skill\n`);
|
|
153
|
+
return { success: true };
|
|
154
|
+
}
|
|
155
|
+
catch (err) {
|
|
156
|
+
return { success: false, error: `retro-pending failed: ${err.message}` };
|
|
157
|
+
}
|
|
158
|
+
},
|
|
124
159
|
/**
|
|
125
160
|
* doc-update: Append to a configured documentation file.
|
|
126
161
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-bus.js","sourceRoot":"","sources":["../../src/events/event-bus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"event-bus.js","sourceRoot":"","sources":["../../src/events/event-bus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAShE,8EAA8E;AAC9E,2DAA2D;AAC3D,8EAA8E;AAE9E;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,WAAmB,EAAE,QAAgB;IACpE,MAAM,IAAI,GAAG,gBAAgB,CAAC,WAAW,CAAC,CAAC;IAC3C,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAClB,OAAO,IAAI,CAAC,IAAI,EAAE,eAAe,EAAE,QAAQ,CAAC,CAAC;IAC/C,CAAC;IACD,OAAO,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,CAAC,CAAC;AACzE,CAAC;AAED,8EAA8E;AAC9E,wBAAwB;AACxB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