@rasensio/aidlc 1.44.0 → 1.45.1
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/cost/gitignore.d.ts +17 -0
- package/dist/cost/gitignore.d.ts.map +1 -0
- package/dist/cost/gitignore.js +37 -0
- package/dist/cost/gitignore.js.map +1 -0
- package/dist/cost/hooks/shim.d.ts.map +1 -1
- package/dist/cost/hooks/shim.js +5 -0
- package/dist/cost/hooks/shim.js.map +1 -1
- package/dist/doctor/migrations/cost-gitignore.d.ts +4 -3
- package/dist/doctor/migrations/cost-gitignore.d.ts.map +1 -1
- package/dist/doctor/migrations/cost-gitignore.js +7 -24
- package/dist/doctor/migrations/cost-gitignore.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The selective .aidlc/cost/.gitignore (AC-15).
|
|
3
|
+
*
|
|
4
|
+
* Selective, NOT '*': .aidlc/cost/unattributed.ndjson is durable ledger
|
|
5
|
+
* data that must remain trackable.
|
|
6
|
+
*
|
|
7
|
+
* The file lists itself, so it is never committed and exists only where
|
|
8
|
+
* something wrote it. The cost-gitignore doctor migration writes it, and so
|
|
9
|
+
* does every shim write: a fresh worktree gets a generated `capture.sh`
|
|
10
|
+
* before doctor has ever run there, and without the ignore file a broad
|
|
11
|
+
* `git add` commits the shim.
|
|
12
|
+
*/
|
|
13
|
+
export declare const COST_IGNORE_LINES: string[];
|
|
14
|
+
export declare function costIgnorePath(projectRoot: string): string;
|
|
15
|
+
/** Idempotently write the cost ignore lines. Returns the lines added. */
|
|
16
|
+
export declare function ensureCostGitignore(projectRoot: string): string[];
|
|
17
|
+
//# sourceMappingURL=gitignore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gitignore.d.ts","sourceRoot":"","sources":["../../src/cost/gitignore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAaH,eAAO,MAAM,iBAAiB,UAM7B,CAAC;AAEF,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,yEAAyE;AACzE,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAEjE"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The selective .aidlc/cost/.gitignore (AC-15).
|
|
3
|
+
*
|
|
4
|
+
* Selective, NOT '*': .aidlc/cost/unattributed.ndjson is durable ledger
|
|
5
|
+
* data that must remain trackable.
|
|
6
|
+
*
|
|
7
|
+
* The file lists itself, so it is never committed and exists only where
|
|
8
|
+
* something wrote it. The cost-gitignore doctor migration writes it, and so
|
|
9
|
+
* does every shim write: a fresh worktree gets a generated `capture.sh`
|
|
10
|
+
* before doctor has ever run there, and without the ignore file a broad
|
|
11
|
+
* `git add` commits the shim.
|
|
12
|
+
*/
|
|
13
|
+
import { join } from 'node:path';
|
|
14
|
+
import { ensureIgnoreLines } from '../doctor/migrations/nested-gitignore.js';
|
|
15
|
+
/*
|
|
16
|
+
* `capture.sh` is generated per-install and its body embeds the node and CLI
|
|
17
|
+
* paths seen at install time as resolution *hints*. Those are machine-specific,
|
|
18
|
+
* so tracking the file would commit exactly the kind of absolute path this
|
|
19
|
+
* project just spent a bugfix removing from hook commands
|
|
20
|
+
* (cost-capture-goes-dark/AC-5). It is regenerated by `aidlc cost hooks install`
|
|
21
|
+
* and by the legacy-cost-hooks doctor migration, so nothing is lost by ignoring it.
|
|
22
|
+
*/
|
|
23
|
+
export const COST_IGNORE_LINES = [
|
|
24
|
+
'active-sessions/',
|
|
25
|
+
'capture.log',
|
|
26
|
+
'capture.sh',
|
|
27
|
+
'locks/',
|
|
28
|
+
'.gitignore',
|
|
29
|
+
];
|
|
30
|
+
export function costIgnorePath(projectRoot) {
|
|
31
|
+
return join(projectRoot, '.aidlc', 'cost', '.gitignore');
|
|
32
|
+
}
|
|
33
|
+
/** Idempotently write the cost ignore lines. Returns the lines added. */
|
|
34
|
+
export function ensureCostGitignore(projectRoot) {
|
|
35
|
+
return ensureIgnoreLines(costIgnorePath(projectRoot), COST_IGNORE_LINES);
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=gitignore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gitignore.js","sourceRoot":"","sources":["../../src/cost/gitignore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAE7E;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,kBAAkB;IAClB,aAAa;IACb,YAAY;IACZ,QAAQ;IACR,YAAY;CACb,CAAC;AAEF,MAAM,UAAU,cAAc,CAAC,WAAmB;IAChD,OAAO,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;AAC3D,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,mBAAmB,CAAC,WAAmB;IACrD,OAAO,iBAAiB,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,iBAAiB,CAAC,CAAC;AAC3E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shim.d.ts","sourceRoot":"","sources":["../../../src/cost/hooks/shim.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;
|
|
1
|
+
{"version":3,"file":"shim.d.ts","sourceRoot":"","sources":["../../../src/cost/hooks/shim.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAMH,kCAAkC;AAClC,wBAAgB,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,yCAAyC;AACzC,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,YAAY,GAAG,gBAAgB,CAAC;AAEtE;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAenE;AAED,yDAAyD;AACzD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAUhE;AAUD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAiGlE;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAUxF;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,OAAO,SAAuB,GAAG,MAAM,CAErE"}
|
package/dist/cost/hooks/shim.js
CHANGED
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
*/
|
|
32
32
|
import { accessSync, chmodSync, constants as fsConstants, mkdirSync, statSync, writeFileSync } from 'node:fs';
|
|
33
33
|
import { dirname, join } from 'node:path';
|
|
34
|
+
import { ensureCostGitignore } from '../gitignore.js';
|
|
34
35
|
/** Path of the generated shim. */
|
|
35
36
|
export function shimPath(projectRoot) {
|
|
36
37
|
return join(projectRoot, '.aidlc', 'cost', 'capture.sh');
|
|
@@ -198,6 +199,10 @@ exec "\$NODE" "\$CLI" "\$@"
|
|
|
198
199
|
*/
|
|
199
200
|
export function writeShim(projectRoot, nodeHint, cliHint) {
|
|
200
201
|
const path = shimPath(projectRoot);
|
|
202
|
+
// Ignore before writing. The shim is machine-specific, and a fresh worktree
|
|
203
|
+
// has no ignore file until doctor runs — so whoever writes the shim must
|
|
204
|
+
// also make sure `git add -A` cannot pick it up.
|
|
205
|
+
ensureCostGitignore(projectRoot);
|
|
201
206
|
mkdirSync(dirname(path), { recursive: true });
|
|
202
207
|
writeFileSync(path, shimBody(nodeHint, cliHint));
|
|
203
208
|
chmodSync(path, 0o755);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shim.js","sourceRoot":"","sources":["../../../src/cost/hooks/shim.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,IAAI,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC9G,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"shim.js","sourceRoot":"","sources":["../../../src/cost/hooks/shim.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,IAAI,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC9G,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,kCAAkC;AAClC,MAAM,UAAU,QAAQ,CAAC,WAAmB;IAC1C,OAAO,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;AAC3D,CAAC;AAKD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,WAAW,CAAC,WAAmB;IAC7C,MAAM,IAAI,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;IACnC,IAAI,EAA+B,CAAC;IACpC,IAAI,CAAC;QACH,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,OAAO,YAAY,CAAC;IACtC,IAAI,CAAC;QACH,UAAU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EAAE,OAAO,CAAC,CAAC,CAAC;IACjD,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACvB,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,OAAO,GAAG,oBAAoB;IAC3D,OAAO,OAAO,OAAO,8BAA8B,CAAC;AACtD,CAAC"}
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
* cost-gitignore migration (AC-15): ensure cost ephemera are git-ignored
|
|
3
3
|
* via a nested selective .aidlc/cost/.gitignore.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* The ignore lines and their rationale live in cost/gitignore.ts, because the
|
|
6
|
+
* shim writer applies them too.
|
|
7
7
|
*/
|
|
8
8
|
import type { Migration } from '../types.js';
|
|
9
|
-
|
|
9
|
+
import { COST_IGNORE_LINES } from '../../cost/gitignore.js';
|
|
10
|
+
export { COST_IGNORE_LINES };
|
|
10
11
|
export declare const costGitignore: Migration;
|
|
11
12
|
//# sourceMappingURL=cost-gitignore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cost-gitignore.d.ts","sourceRoot":"","sources":["../../../src/doctor/migrations/cost-gitignore.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"cost-gitignore.d.ts","sourceRoot":"","sources":["../../../src/doctor/migrations/cost-gitignore.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAAE,iBAAiB,EAAuC,MAAM,yBAAyB,CAAC;AAEjG,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAE7B,eAAO,MAAM,aAAa,EAAE,SAsB3B,CAAC"}
|
|
@@ -2,29 +2,12 @@
|
|
|
2
2
|
* cost-gitignore migration (AC-15): ensure cost ephemera are git-ignored
|
|
3
3
|
* via a nested selective .aidlc/cost/.gitignore.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* The ignore lines and their rationale live in cost/gitignore.ts, because the
|
|
6
|
+
* shim writer applies them too.
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
* `capture.sh` is generated per-install and its body embeds the node and CLI
|
|
12
|
-
* paths seen at install time as resolution *hints*. Those are machine-specific,
|
|
13
|
-
* so tracking the file would commit exactly the kind of absolute path this
|
|
14
|
-
* project just spent a bugfix removing from hook commands
|
|
15
|
-
* (cost-capture-goes-dark/AC-5). It is regenerated by `aidlc cost hooks install`
|
|
16
|
-
* and by the legacy-cost-hooks doctor migration, so nothing is lost by ignoring it.
|
|
17
|
-
*/
|
|
18
|
-
export const COST_IGNORE_LINES = [
|
|
19
|
-
'active-sessions/',
|
|
20
|
-
'capture.log',
|
|
21
|
-
'capture.sh',
|
|
22
|
-
'locks/',
|
|
23
|
-
'.gitignore',
|
|
24
|
-
];
|
|
25
|
-
function ignorePath(projectRoot) {
|
|
26
|
-
return join(projectRoot, '.aidlc', 'cost', '.gitignore');
|
|
27
|
-
}
|
|
8
|
+
import { missingIgnoreLines } from './nested-gitignore.js';
|
|
9
|
+
import { COST_IGNORE_LINES, costIgnorePath, ensureCostGitignore } from '../../cost/gitignore.js';
|
|
10
|
+
export { COST_IGNORE_LINES };
|
|
28
11
|
export const costGitignore = {
|
|
29
12
|
id: 'cost-gitignore',
|
|
30
13
|
tier: 'safe',
|
|
@@ -32,7 +15,7 @@ export const costGitignore = {
|
|
|
32
15
|
if (ctx.gitCommonDir === null) {
|
|
33
16
|
return { applicable: false, reason: 'requires a git repository' };
|
|
34
17
|
}
|
|
35
|
-
const missing = missingIgnoreLines(
|
|
18
|
+
const missing = missingIgnoreLines(costIgnorePath(ctx.projectRoot), COST_IGNORE_LINES);
|
|
36
19
|
if (missing.length === 0)
|
|
37
20
|
return { applicable: true, pending: false };
|
|
38
21
|
return {
|
|
@@ -42,7 +25,7 @@ export const costGitignore = {
|
|
|
42
25
|
};
|
|
43
26
|
},
|
|
44
27
|
apply(ctx) {
|
|
45
|
-
const added =
|
|
28
|
+
const added = ensureCostGitignore(ctx.projectRoot);
|
|
46
29
|
return {
|
|
47
30
|
changed: added.length > 0,
|
|
48
31
|
summary: `added ${added.length} line(s) to .aidlc/cost/.gitignore`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cost-gitignore.js","sourceRoot":"","sources":["../../../src/doctor/migrations/cost-gitignore.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"cost-gitignore.js","sourceRoot":"","sources":["../../../src/doctor/migrations/cost-gitignore.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEjG,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAE7B,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,OAAO,GAAG,kBAAkB,CAAC,cAAc,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,iBAAiB,CAAC,CAAC;QACvF,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,aAAa,OAAO,CAAC,MAAM,uCAAuC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;SACrG,CAAC;IACJ,CAAC;IACD,KAAK,CAAC,GAAG;QACP,MAAM,KAAK,GAAG,mBAAmB,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QACnD,OAAO;YACL,OAAO,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC;YACzB,OAAO,EAAE,SAAS,KAAK,CAAC,MAAM,oCAAoC;SACnE,CAAC;IACJ,CAAC;CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rasensio/aidlc",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.45.1",
|
|
4
4
|
"description": "AI Development Lifecycle Framework — structured lifecycle guidance for AI coding agents across platforms",
|
|
5
5
|
"homepage": "https://aidlc.rodrigoasensio.com",
|
|
6
6
|
"repository": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"commander": "15.0.0",
|
|
32
32
|
"picomatch": "4.0.5",
|
|
33
33
|
"yaml": "2.9.0",
|
|
34
|
-
"@rasensio/aidlc-content": "1.
|
|
34
|
+
"@rasensio/aidlc-content": "1.45.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "22.15.32",
|