@rasensio/aidlc 1.15.0 → 1.15.2

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.
Files changed (76) hide show
  1. package/dist/commands/add-action.d.ts +0 -3
  2. package/dist/commands/add-action.d.ts.map +1 -1
  3. package/dist/commands/add-action.js +31 -14
  4. package/dist/commands/add-action.js.map +1 -1
  5. package/dist/commands/add-skill.js +7 -3
  6. package/dist/commands/add-skill.js.map +1 -1
  7. package/dist/commands/cost.d.ts.map +1 -1
  8. package/dist/commands/cost.js +37 -1
  9. package/dist/commands/cost.js.map +1 -1
  10. package/dist/commands/init.d.ts +16 -1
  11. package/dist/commands/init.d.ts.map +1 -1
  12. package/dist/commands/init.js +40 -26
  13. package/dist/commands/init.js.map +1 -1
  14. package/dist/commands/knowledge.js +8 -3
  15. package/dist/commands/knowledge.js.map +1 -1
  16. package/dist/commands/start.d.ts.map +1 -1
  17. package/dist/commands/start.js +10 -8
  18. package/dist/commands/start.js.map +1 -1
  19. package/dist/compile/loaders.d.ts.map +1 -1
  20. package/dist/compile/loaders.js +12 -2
  21. package/dist/compile/loaders.js.map +1 -1
  22. package/dist/core/prompt.d.ts +140 -0
  23. package/dist/core/prompt.d.ts.map +1 -0
  24. package/dist/core/prompt.js +115 -0
  25. package/dist/core/prompt.js.map +1 -0
  26. package/dist/cost/agent.d.ts.map +1 -1
  27. package/dist/cost/agent.js +2 -11
  28. package/dist/cost/agent.js.map +1 -1
  29. package/dist/cost/hooks/claude-code.d.ts +17 -1
  30. package/dist/cost/hooks/claude-code.d.ts.map +1 -1
  31. package/dist/cost/hooks/claude-code.js +30 -5
  32. package/dist/cost/hooks/claude-code.js.map +1 -1
  33. package/dist/cost/hooks/kiro.d.ts.map +1 -1
  34. package/dist/cost/hooks/kiro.js +42 -26
  35. package/dist/cost/hooks/kiro.js.map +1 -1
  36. package/dist/cost/sessions.d.ts +85 -2
  37. package/dist/cost/sessions.d.ts.map +1 -1
  38. package/dist/cost/sessions.js +132 -9
  39. package/dist/cost/sessions.js.map +1 -1
  40. package/dist/cost/types.d.ts +10 -0
  41. package/dist/cost/types.d.ts.map +1 -1
  42. package/dist/cost/types.js.map +1 -1
  43. package/dist/doctor/migrations/index.d.ts.map +1 -1
  44. package/dist/doctor/migrations/index.js +8 -0
  45. package/dist/doctor/migrations/index.js.map +1 -1
  46. package/dist/doctor/migrations/outdated-cost-hooks.d.ts +35 -0
  47. package/dist/doctor/migrations/outdated-cost-hooks.d.ts.map +1 -0
  48. package/dist/doctor/migrations/outdated-cost-hooks.js +81 -0
  49. package/dist/doctor/migrations/outdated-cost-hooks.js.map +1 -0
  50. package/dist/doctor/migrations/trust-run-actions.d.ts +14 -0
  51. package/dist/doctor/migrations/trust-run-actions.d.ts.map +1 -0
  52. package/dist/doctor/migrations/trust-run-actions.js +68 -0
  53. package/dist/doctor/migrations/trust-run-actions.js.map +1 -0
  54. package/dist/doctor/runner.d.ts.map +1 -1
  55. package/dist/doctor/runner.js +5 -3
  56. package/dist/doctor/runner.js.map +1 -1
  57. package/dist/events/event-bus.d.ts +3 -1
  58. package/dist/events/event-bus.d.ts.map +1 -1
  59. package/dist/events/event-bus.js +40 -10
  60. package/dist/events/event-bus.js.map +1 -1
  61. package/dist/menu/index.d.ts +5 -2
  62. package/dist/menu/index.d.ts.map +1 -1
  63. package/dist/menu/index.js +13 -7
  64. package/dist/menu/index.js.map +1 -1
  65. package/dist/security/action-trust.d.ts +34 -0
  66. package/dist/security/action-trust.d.ts.map +1 -0
  67. package/dist/security/action-trust.js +82 -0
  68. package/dist/security/action-trust.js.map +1 -0
  69. package/dist/traceability/gate-criterion.d.ts.map +1 -1
  70. package/dist/traceability/gate-criterion.js +7 -0
  71. package/dist/traceability/gate-criterion.js.map +1 -1
  72. package/package.json +2 -2
  73. package/dist/menu/prompt.d.ts +0 -74
  74. package/dist/menu/prompt.d.ts.map +0 -1
  75. package/dist/menu/prompt.js +0 -69
  76. package/dist/menu/prompt.js.map +0 -1
@@ -1,74 +0,0 @@
1
- /**
2
- * Prompt seam for the interactive menu (interactive-cli-menu/AC-12,
3
- * interactive-cli-menu/AC-13, interactive-cli-menu/AC-26).
4
- *
5
- * The only module that imports `@clack/prompts`. Everything the menu does that
6
- * touches a terminal goes through `MenuDeps`, so tests drive both the
7
- * interactive and non-interactive branches without emulating a TTY — the same
8
- * shape as the doctor's injectable `ConfirmFn`.
9
- *
10
- * @module
11
- */
12
- import { isInteractive } from '../core/tty.js';
13
- /**
14
- * Cancellation sentinel, owned by this module.
15
- *
16
- * Deliberately *not* a re-export: `@clack/prompts` exports no symbol at all. Its
17
- * cancel value is a private `Symbol("clack:cancel")` that is not
18
- * `Symbol.for`-registered, so it can be neither imported nor reconstructed —
19
- * only the `isCancel()` predicate is public, which is why every call site in
20
- * this package uses that. The clack-backed adapters below translate, so injected
21
- * test doubles return exactly what production returns.
22
- */
23
- export declare const CANCEL: unique symbol;
24
- export interface SelectRequest {
25
- message: string;
26
- options: {
27
- value: string;
28
- label: string;
29
- hint?: string;
30
- }[];
31
- }
32
- export interface TextRequest {
33
- message: string;
34
- placeholder?: string;
35
- /**
36
- * Return a message to reject the value and re-prompt.
37
- *
38
- * The value is optional because clack passes `undefined` before the field has
39
- * been touched — which is exactly the empty case that must be rejected.
40
- */
41
- validate?: (value: string | undefined) => string | undefined;
42
- }
43
- export type SelectFn = (req: SelectRequest) => Promise<string | typeof CANCEL>;
44
- export type TextFn = (req: TextRequest) => Promise<string | typeof CANCEL>;
45
- export interface MenuDeps {
46
- select: SelectFn;
47
- text: TextFn;
48
- /** Whether an interactive prompt can be rendered at all. */
49
- interactive: () => boolean;
50
- intro: (message: string) => void;
51
- outro: (message: string) => void;
52
- }
53
- /**
54
- * Both streams must be a TTY (interactive-cli-menu/AC-10).
55
- *
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
- */
62
- export { isInteractive };
63
- /**
64
- * Reject empty or whitespace-only input for a required positional.
65
- *
66
- * clack's text prompt yields `''` — not the cancel symbol — when Enter is
67
- * pressed on an empty field with no default, so without this the menu would
68
- * dispatch a meaningless invocation the user cannot distinguish from a cancel.
69
- * Commander would reject a missing `<arg>`; this rejects it earlier, where the
70
- * user can still fix it.
71
- */
72
- export declare function requireNonEmpty(label: string): (value: string | undefined) => string | undefined;
73
- export declare const defaultDeps: MenuDeps;
74
- //# sourceMappingURL=prompt.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../src/menu/prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM,EAAE,OAAO,MAAoC,CAAC;AAEjE,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,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"}
@@ -1,69 +0,0 @@
1
- /**
2
- * Prompt seam for the interactive menu (interactive-cli-menu/AC-12,
3
- * interactive-cli-menu/AC-13, interactive-cli-menu/AC-26).
4
- *
5
- * The only module that imports `@clack/prompts`. Everything the menu does that
6
- * touches a terminal goes through `MenuDeps`, so tests drive both the
7
- * interactive and non-interactive branches without emulating a TTY — the same
8
- * shape as the doctor's injectable `ConfirmFn`.
9
- *
10
- * @module
11
- */
12
- import * as clack from '@clack/prompts';
13
- import { isInteractive } from '../core/tty.js';
14
- /**
15
- * Cancellation sentinel, owned by this module.
16
- *
17
- * Deliberately *not* a re-export: `@clack/prompts` exports no symbol at all. Its
18
- * cancel value is a private `Symbol("clack:cancel")` that is not
19
- * `Symbol.for`-registered, so it can be neither imported nor reconstructed —
20
- * only the `isCancel()` predicate is public, which is why every call site in
21
- * this package uses that. The clack-backed adapters below translate, so injected
22
- * test doubles return exactly what production returns.
23
- */
24
- export const CANCEL = Symbol('aidlc:menu:cancel');
25
- /**
26
- * Both streams must be a TTY (interactive-cli-menu/AC-10).
27
- *
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
- */
34
- export { isInteractive };
35
- const clackSelect = async (req) => {
36
- const value = await clack.select({
37
- message: req.message,
38
- options: req.options,
39
- });
40
- return clack.isCancel(value) ? CANCEL : value;
41
- };
42
- const clackText = async (req) => {
43
- const value = await clack.text({
44
- message: req.message,
45
- placeholder: req.placeholder,
46
- validate: req.validate,
47
- });
48
- return clack.isCancel(value) ? CANCEL : value;
49
- };
50
- /**
51
- * Reject empty or whitespace-only input for a required positional.
52
- *
53
- * clack's text prompt yields `''` — not the cancel symbol — when Enter is
54
- * pressed on an empty field with no default, so without this the menu would
55
- * dispatch a meaningless invocation the user cannot distinguish from a cancel.
56
- * Commander would reject a missing `<arg>`; this rejects it earlier, where the
57
- * user can still fix it.
58
- */
59
- export function requireNonEmpty(label) {
60
- return (value) => ((value ?? '').trim() === '' ? `${label} is required` : undefined);
61
- }
62
- export const defaultDeps = {
63
- select: clackSelect,
64
- text: clackText,
65
- interactive: isInteractive,
66
- intro: (message) => clack.intro(message),
67
- outro: (message) => clack.outro(message),
68
- };
69
- //# sourceMappingURL=prompt.js.map
@@ -1 +0,0 @@
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;;;;;;;;GAQG;AACH,OAAO,EAAE,aAAa,EAAE,CAAC;AAEzB,MAAM,WAAW,GAAa,KAAK,EAAE,GAAG,EAAE,EAAE;IAC1C,MAAM,KAAK,GAAG,MAAM,KAAK,CAAC,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