@rasensio/aidlc 1.10.2 → 1.10.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/dist/commands/add-action.d.ts.map +1 -1
- package/dist/commands/add-action.js +17 -2
- package/dist/commands/add-action.js.map +1 -1
- package/dist/commands/add-skill.d.ts.map +1 -1
- package/dist/commands/add-skill.js +13 -0
- package/dist/commands/add-skill.js.map +1 -1
- package/dist/commands/cost.d.ts.map +1 -1
- package/dist/commands/cost.js +6 -2
- package/dist/commands/cost.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +89 -30
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/knowledge.d.ts.map +1 -1
- package/dist/commands/knowledge.js +11 -0
- package/dist/commands/knowledge.js.map +1 -1
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +13 -3
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +37 -10
- package/dist/commands/update.js.map +1 -1
- package/dist/compile/guidance-install.d.ts +51 -0
- package/dist/compile/guidance-install.d.ts.map +1 -0
- package/dist/compile/guidance-install.js +155 -0
- package/dist/compile/guidance-install.js.map +1 -0
- package/dist/compile/loaders.d.ts +36 -6
- package/dist/compile/loaders.d.ts.map +1 -1
- package/dist/compile/loaders.js +120 -17
- package/dist/compile/loaders.js.map +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/tty.d.ts +38 -0
- package/dist/core/tty.d.ts.map +1 -0
- package/dist/core/tty.js +40 -0
- package/dist/core/tty.js.map +1 -0
- package/dist/core/types.d.ts +7 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/cost/agent.d.ts.map +1 -1
- package/dist/cost/agent.js +30 -2
- package/dist/cost/agent.js.map +1 -1
- package/dist/cost/report.d.ts.map +1 -1
- package/dist/cost/report.js +12 -2
- package/dist/cost/report.js.map +1 -1
- package/dist/doctor/context.d.ts.map +1 -1
- package/dist/doctor/context.js +5 -1
- package/dist/doctor/context.js.map +1 -1
- package/dist/doctor/migrations/index.d.ts.map +1 -1
- package/dist/doctor/migrations/index.js +4 -0
- package/dist/doctor/migrations/index.js.map +1 -1
- package/dist/doctor/migrations/install-guidance.d.ts +18 -0
- package/dist/doctor/migrations/install-guidance.d.ts.map +1 -0
- package/dist/doctor/migrations/install-guidance.js +61 -0
- package/dist/doctor/migrations/install-guidance.js.map +1 -0
- package/dist/doctor/migrations/stale-cost-hooks.d.ts +37 -0
- package/dist/doctor/migrations/stale-cost-hooks.d.ts.map +1 -0
- package/dist/doctor/migrations/stale-cost-hooks.js +85 -0
- package/dist/doctor/migrations/stale-cost-hooks.js.map +1 -0
- package/dist/events/event-bus.d.ts.map +1 -1
- package/dist/events/event-bus.js +16 -13
- package/dist/events/event-bus.js.map +1 -1
- package/dist/events/plugin-hooks.d.ts.map +1 -1
- package/dist/events/plugin-hooks.js +12 -15
- package/dist/events/plugin-hooks.js.map +1 -1
- package/dist/events/run-command.d.ts +58 -0
- package/dist/events/run-command.d.ts.map +1 -0
- package/dist/events/run-command.js +110 -0
- package/dist/events/run-command.js.map +1 -0
- package/dist/menu/prompt.d.ts +7 -7
- package/dist/menu/prompt.d.ts.map +1 -1
- package/dist/menu/prompt.js +7 -9
- package/dist/menu/prompt.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared child-process runner for lifecycle actions and plugin hooks.
|
|
3
|
+
*
|
|
4
|
+
* Both callers hand the event payload to the child on stdin. `spawnSync` forks
|
|
5
|
+
* first and writes that payload afterwards, so a command that never reads stdin
|
|
6
|
+
* can exit before the write lands — the write then hits a closed pipe and
|
|
7
|
+
* `spawnSync` reports `EPIPE` for a command that ran and exited 0. The race is
|
|
8
|
+
* deterministic above the 64 KiB pipe buffer and load-dependent below it, which
|
|
9
|
+
* is how it reached CI as a release-blocking flake that survived three retries
|
|
10
|
+
* (see .aidlc/state/subprocess-test-flake/reproduction.md).
|
|
11
|
+
*
|
|
12
|
+
* So the child's exit status — not the parent's stdin write — is the verdict on
|
|
13
|
+
* whether a hook succeeded, and a failure has to carry enough detail to be
|
|
14
|
+
* diagnosed from a CI log alone.
|
|
15
|
+
*
|
|
16
|
+
* Requirements: subprocess-test-flake/AC-1 .. AC-8
|
|
17
|
+
*/
|
|
18
|
+
import { spawnSync } from 'node:child_process';
|
|
19
|
+
/** Wall-clock budget for a single hook or action command. */
|
|
20
|
+
export const COMMAND_TIMEOUT_MS = 30_000;
|
|
21
|
+
/** Child stderr is quoted in failure text up to this many characters. */
|
|
22
|
+
const STDERR_LIMIT = 500;
|
|
23
|
+
/**
|
|
24
|
+
* Spawn errnos that mean "the machine was momentarily out of a resource",
|
|
25
|
+
* not "the command is wrong" — worth one retry before reporting a failure.
|
|
26
|
+
*/
|
|
27
|
+
const TRANSIENT_CODES = new Set(['EAGAIN', 'EMFILE', 'ENFILE', 'ENOMEM']);
|
|
28
|
+
/** Backoff before the single transient-errno retry. Never runs on success. */
|
|
29
|
+
const RETRY_DELAY_MS = 50;
|
|
30
|
+
/** Sleep without spawning anything or going async. */
|
|
31
|
+
function sleepSync(ms) {
|
|
32
|
+
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
|
|
33
|
+
}
|
|
34
|
+
function errnoOf(error) {
|
|
35
|
+
return error?.code;
|
|
36
|
+
}
|
|
37
|
+
/** Trailing child stderr, trimmed and bounded, as a suffix for failure text. */
|
|
38
|
+
function stderrSuffix(result) {
|
|
39
|
+
const text = (result.stderr ?? '').trim();
|
|
40
|
+
if (text === '') {
|
|
41
|
+
return '';
|
|
42
|
+
}
|
|
43
|
+
const bounded = text.length > STDERR_LIMIT ? `${text.slice(0, STDERR_LIMIT)}… (truncated)` : text;
|
|
44
|
+
return `; stderr: ${bounded}`;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Turn a raw spawnSync result into a success/failure verdict.
|
|
48
|
+
*
|
|
49
|
+
* Order matters: a timeout kill and a genuine spawn failure both outrank the
|
|
50
|
+
* exit status, while EPIPE outranks nothing — it is tolerated when the child
|
|
51
|
+
* exited cleanly (AC-1) and reported alongside the status when it did not (AC-2).
|
|
52
|
+
*/
|
|
53
|
+
function classify(result, timeoutMs) {
|
|
54
|
+
const errno = errnoOf(result.error);
|
|
55
|
+
if (errno === 'ETIMEDOUT') {
|
|
56
|
+
return {
|
|
57
|
+
success: false,
|
|
58
|
+
error: `timed out after ${timeoutMs} ms and was killed (${result.signal ?? 'SIGTERM'})${stderrSuffix(result)}`,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
if (result.error !== undefined && errno !== 'EPIPE') {
|
|
62
|
+
return {
|
|
63
|
+
success: false,
|
|
64
|
+
error: `could not run (${errno ?? 'unknown errno'}): ${result.error.message}${stderrSuffix(result)}`,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
if (result.signal !== null && result.signal !== undefined) {
|
|
68
|
+
return {
|
|
69
|
+
success: false,
|
|
70
|
+
error: `killed by ${result.signal}${stderrSuffix(result)}`,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
if (result.status !== 0) {
|
|
74
|
+
// An EPIPE here is a side note: the command failed on its own terms.
|
|
75
|
+
const unread = errno === 'EPIPE' ? ' (it also never read the stdin payload)' : '';
|
|
76
|
+
return {
|
|
77
|
+
success: false,
|
|
78
|
+
error: `exited ${result.status}${unread}${stderrSuffix(result)}`,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
// status 0 — including the EPIPE case, where the command ran fine and simply
|
|
82
|
+
// ignored stdin (AC-1).
|
|
83
|
+
return { success: true };
|
|
84
|
+
}
|
|
85
|
+
const defaultSpawn = (command, options) => spawnSync(command, options);
|
|
86
|
+
/**
|
|
87
|
+
* Run a hook or action command synchronously and classify the outcome.
|
|
88
|
+
*
|
|
89
|
+
* The success path spawns exactly once and never sleeps; only a transient spawn
|
|
90
|
+
* errno costs a second attempt (AC-4).
|
|
91
|
+
*/
|
|
92
|
+
export function runCommand(command, opts, spawn = defaultSpawn) {
|
|
93
|
+
const timeoutMs = opts.timeoutMs ?? COMMAND_TIMEOUT_MS;
|
|
94
|
+
const spawnOptions = {
|
|
95
|
+
shell: true,
|
|
96
|
+
env: opts.env,
|
|
97
|
+
input: opts.input,
|
|
98
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
99
|
+
timeout: timeoutMs,
|
|
100
|
+
cwd: opts.cwd,
|
|
101
|
+
encoding: 'utf8',
|
|
102
|
+
};
|
|
103
|
+
let result = spawn(command, spawnOptions);
|
|
104
|
+
if (TRANSIENT_CODES.has(errnoOf(result.error) ?? '')) {
|
|
105
|
+
sleepSync(RETRY_DELAY_MS);
|
|
106
|
+
result = spawn(command, spawnOptions);
|
|
107
|
+
}
|
|
108
|
+
return classify(result, timeoutMs);
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=run-command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-command.js","sourceRoot":"","sources":["../../src/events/run-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,6DAA6D;AAC7D,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAEzC,yEAAyE;AACzE,MAAM,YAAY,GAAG,GAAG,CAAC;AAEzB;;;GAGG;AACH,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;AAE1E,8EAA8E;AAC9E,MAAM,cAAc,GAAG,EAAE,CAAC;AAmB1B,sDAAsD;AACtD,SAAS,SAAS,CAAC,EAAU;IAC3B,OAAO,CAAC,IAAI,CAAC,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CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC;QACrD,SAAS,CAAC,cAAc,CAAC,CAAC;QAC1B,MAAM,GAAG,KAAK,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IACxC,CAAC;IAED,OAAO,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AACrC,CAAC"}
|
package/dist/menu/prompt.d.ts
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @module
|
|
11
11
|
*/
|
|
12
|
+
import { isInteractive } from '../core/tty.js';
|
|
12
13
|
/**
|
|
13
14
|
* Cancellation sentinel, owned by this module.
|
|
14
15
|
*
|
|
@@ -52,14 +53,13 @@ export interface MenuDeps {
|
|
|
52
53
|
/**
|
|
53
54
|
* Both streams must be a TTY (interactive-cli-menu/AC-10).
|
|
54
55
|
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* conjunction is stated explicitly rather than inherited from a precedent.
|
|
56
|
+
* Re-exported, not redefined: the predicate moved to `core/tty.ts` so the
|
|
57
|
+
* command modules could adopt it without importing `menu/` — `menu/index.ts`
|
|
58
|
+
* imports the command registrars, so that direction is a cycle
|
|
59
|
+
* (tty-prompt-guard/AC-1, tty-prompt-guard/AC-2). The reasoning for requiring
|
|
60
|
+
* *both* streams now lives with the definition.
|
|
61
61
|
*/
|
|
62
|
-
export
|
|
62
|
+
export { isInteractive };
|
|
63
63
|
/**
|
|
64
64
|
* Reject empty or whitespace-only input for a required positional.
|
|
65
65
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../src/menu/prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM,EAAE,OAAO,MAAoC,CAAC;AA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E,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC5D;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,MAAM,GAAG,SAAS,CAAC;CAC9D;AAED,MAAM,MAAM,QAAQ,GAAG,CAAC,GAAG,EAAE,aAAa,KAAK,OAAO,CAAC,MAAM,GAAG,OAAO,MAAM,CAAC,CAAC;AAC/E,MAAM,MAAM,MAAM,GAAG,CAAC,GAAG,EAAE,WAAW,KAAK,OAAO,CAAC,MAAM,GAAG,OAAO,MAAM,CAAC,CAAC;AAE3E,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,QAAQ,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,4DAA4D;IAC5D,WAAW,EAAE,MAAM,OAAO,CAAC;IAC3B,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC;AAED;;;;;;;;GAQG;AACH,OAAO,EAAE,aAAa,EAAE,CAAC;AAmBzB;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,MAAM,GACZ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,MAAM,GAAG,SAAS,CAEnD;AAED,eAAO,MAAM,WAAW,EAAE,QAMzB,CAAC"}
|
package/dist/menu/prompt.js
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* @module
|
|
11
11
|
*/
|
|
12
12
|
import * as clack from '@clack/prompts';
|
|
13
|
+
import { isInteractive } from '../core/tty.js';
|
|
13
14
|
/**
|
|
14
15
|
* Cancellation sentinel, owned by this module.
|
|
15
16
|
*
|
|
@@ -24,16 +25,13 @@ export const CANCEL = Symbol('aidlc:menu:cancel');
|
|
|
24
25
|
/**
|
|
25
26
|
* Both streams must be a TTY (interactive-cli-menu/AC-10).
|
|
26
27
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* conjunction is stated explicitly rather than inherited from a precedent.
|
|
28
|
+
* Re-exported, not redefined: the predicate moved to `core/tty.ts` so the
|
|
29
|
+
* command modules could adopt it without importing `menu/` — `menu/index.ts`
|
|
30
|
+
* imports the command registrars, so that direction is a cycle
|
|
31
|
+
* (tty-prompt-guard/AC-1, tty-prompt-guard/AC-2). The reasoning for requiring
|
|
32
|
+
* *both* streams now lives with the definition.
|
|
33
33
|
*/
|
|
34
|
-
export
|
|
35
|
-
return process.stdin.isTTY === true && process.stdout.isTTY === true;
|
|
36
|
-
}
|
|
34
|
+
export { isInteractive };
|
|
37
35
|
const clackSelect = async (req) => {
|
|
38
36
|
const value = await clack.select({
|
|
39
37
|
message: req.message,
|
package/dist/menu/prompt.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../src/menu/prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAExC;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,MAAM,GAAkB,MAAM,CAAC,mBAAmB,CAAC,CAAC;AA+BjE
|
|
1
|
+
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../src/menu/prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,MAAM,GAAkB,MAAM,CAAC,mBAAmB,CAAC,CAAC;AA+BjE;;;;;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KAAK,CAAC,OAAO,CAAC;CACzC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rasensio/aidlc",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.6",
|
|
4
4
|
"description": "AI Development Lifecycle Framework — structured lifecycle guidance for AI coding agents across platforms",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/cli.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"commander": "15.0.0",
|
|
25
25
|
"picomatch": "4.0.5",
|
|
26
26
|
"yaml": "2.9.0",
|
|
27
|
-
"@rasensio/aidlc-content": "1.10.
|
|
27
|
+
"@rasensio/aidlc-content": "1.10.6"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/node": "22.15.32",
|