@rasensio/aidlc 1.55.0 → 1.57.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/autopilot/questions.d.ts +84 -0
- package/dist/autopilot/questions.d.ts.map +1 -0
- package/dist/autopilot/questions.js +195 -0
- package/dist/autopilot/questions.js.map +1 -0
- package/dist/autopilot/run.d.ts.map +1 -1
- package/dist/autopilot/run.js +4 -1
- package/dist/autopilot/run.js.map +1 -1
- package/dist/autopilot/team.d.ts +41 -0
- package/dist/autopilot/team.d.ts.map +1 -0
- package/dist/autopilot/team.js +75 -0
- package/dist/autopilot/team.js.map +1 -0
- package/dist/commands/autopilot.d.ts +5 -1
- package/dist/commands/autopilot.d.ts.map +1 -1
- package/dist/commands/autopilot.js +13 -37
- package/dist/commands/autopilot.js.map +1 -1
- package/dist/commands/init.d.ts +37 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +134 -12
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/update.js +2 -2
- package/dist/commands/update.js.map +1 -1
- package/dist/compile/loaders.d.ts.map +1 -1
- package/dist/compile/loaders.js +25 -2
- package/dist/compile/loaders.js.map +1 -1
- package/dist/compile/question-rendering.d.ts.map +1 -1
- package/dist/compile/question-rendering.js +14 -3
- package/dist/compile/question-rendering.js.map +1 -1
- package/dist/compile/roadmap-skill.d.ts +6 -0
- package/dist/compile/roadmap-skill.d.ts.map +1 -1
- package/dist/compile/roadmap-skill.js +22 -4
- package/dist/compile/roadmap-skill.js.map +1 -1
- package/dist/compile/skill-format.d.ts +34 -8
- package/dist/compile/skill-format.d.ts.map +1 -1
- package/dist/compile/skill-format.js +49 -11
- package/dist/compile/skill-format.js.map +1 -1
- package/dist/doctor/migrations/artifact-source-drift.d.ts +14 -5
- package/dist/doctor/migrations/artifact-source-drift.d.ts.map +1 -1
- package/dist/doctor/migrations/artifact-source-drift.js +29 -18
- package/dist/doctor/migrations/artifact-source-drift.js.map +1 -1
- package/dist/setup/setup-compute.d.ts +18 -0
- package/dist/setup/setup-compute.d.ts.map +1 -1
- package/dist/setup/setup-compute.js +28 -0
- package/dist/setup/setup-compute.js.map +1 -1
- package/dist/setup/work-mode.d.ts +53 -0
- package/dist/setup/work-mode.d.ts.map +1 -0
- package/dist/setup/work-mode.js +80 -0
- package/dist/setup/work-mode.js.map +1 -0
- package/package.json +2 -2
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Requirements: 21.10
|
|
9
9
|
*/
|
|
10
|
+
import type { TeamDefaults } from '../autopilot/team.js';
|
|
10
11
|
import type { CycleScope } from '../core/types.js';
|
|
11
12
|
/** Answers collected from the setup wizard (interactive or CLI flags). */
|
|
12
13
|
export interface SetupAnswers {
|
|
@@ -46,7 +47,24 @@ export interface SetupAnswers {
|
|
|
46
47
|
* own `validateStatuses` before the answer gets here.
|
|
47
48
|
*/
|
|
48
49
|
roadmapSyncStatuses?: string[] | null;
|
|
50
|
+
/**
|
|
51
|
+
* How implementation tasks run in this repo, or `undefined` when the question was not
|
|
52
|
+
* put — no platform with sub-agents, `--non-interactive`, `--platform` — which keeps
|
|
53
|
+
* whatever the file says (init-sets-work-mode/AC-4, AC-13).
|
|
54
|
+
*/
|
|
55
|
+
taskAgents?: TaskAgents;
|
|
56
|
+
/**
|
|
57
|
+
* The team half of the autopilot answers. Only the keys present are written, so a
|
|
58
|
+
* question answered "(current)" leaves its key as it was (init-sets-work-mode/AC-16).
|
|
59
|
+
*/
|
|
60
|
+
autopilotTeam?: TeamDefaults;
|
|
49
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* `task_agents` in `.aidlc/config.yaml`; absent means one session. The task-agents
|
|
64
|
+
* rule names these same two values, and a test holds them together.
|
|
65
|
+
*/
|
|
66
|
+
export declare const TASK_AGENTS_VALUES: readonly ["one-session", "per-task"];
|
|
67
|
+
export type TaskAgents = (typeof TASK_AGENTS_VALUES)[number];
|
|
50
68
|
/** Configuration produced/consumed by the setup wizard. */
|
|
51
69
|
export interface SetupConfig {
|
|
52
70
|
version: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup-compute.d.ts","sourceRoot":"","sources":["../../src/setup/setup-compute.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAMnD,0EAA0E;AAC1E,MAAM,WAAW,YAAY;IAC3B,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4CAA4C;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8BAA8B;IAC9B,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;;;;;;;OAQG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B;;;;;;;;;;;;OAYG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"setup-compute.d.ts","sourceRoot":"","sources":["../../src/setup/setup-compute.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAMnD,0EAA0E;AAC1E,MAAM,WAAW,YAAY;IAC3B,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4CAA4C;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8BAA8B;IAC9B,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;;;;;;;OAQG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B;;;;;;;;;;;;OAYG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACtC;;;;OAIG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;OAGG;IACH,aAAa,CAAC,EAAE,YAAY,CAAC;CAC9B;AAED;;;GAGG;AACH,eAAO,MAAM,kBAAkB,sCAAuC,CAAC;AACvE,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D,2DAA2D;AAC3D,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE;QACR,KAAK,EAAE,UAAU,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,qBAAqB,EAAE,MAAM,CAAC;IAC9B;;;;OAIG;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAkKD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,WAAW,GAAG,IAAI,EAC5B,OAAO,EAAE,YAAY,GACpB,WAAW,CA6Bb"}
|
|
@@ -7,6 +7,11 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Requirements: 21.10
|
|
9
9
|
*/
|
|
10
|
+
/**
|
|
11
|
+
* `task_agents` in `.aidlc/config.yaml`; absent means one session. The task-agents
|
|
12
|
+
* rule names these same two values, and a test holds them together.
|
|
13
|
+
*/
|
|
14
|
+
export const TASK_AGENTS_VALUES = ['one-session', 'per-task'];
|
|
10
15
|
// ---------------------------------------------------------------------------
|
|
11
16
|
// Defaults
|
|
12
17
|
// ---------------------------------------------------------------------------
|
|
@@ -125,6 +130,28 @@ function roadmapSection(base, answers) {
|
|
|
125
130
|
},
|
|
126
131
|
};
|
|
127
132
|
}
|
|
133
|
+
/**
|
|
134
|
+
* The `task_agents` and `autopilot` keys for a merged config, or nothing.
|
|
135
|
+
*
|
|
136
|
+
* Two answers, two cases each: `undefined` was not asked and keeps the file as it is;
|
|
137
|
+
* a value is written. Neither has a "remove" case — the task-agents question has no
|
|
138
|
+
* "unset" answer, and "no" to setting up autopilot is not an answer here at all.
|
|
139
|
+
* `autopilot` merges rather than replaces, so a key the answer did not carry
|
|
140
|
+
* survives — including keys autopilot itself never reads from this file
|
|
141
|
+
* (init-sets-work-mode/AC-4, AC-13, AC-16).
|
|
142
|
+
*/
|
|
143
|
+
function workSections(base, answers) {
|
|
144
|
+
const out = {};
|
|
145
|
+
if (answers.taskAgents !== undefined)
|
|
146
|
+
out.task_agents = answers.taskAgents;
|
|
147
|
+
if (answers.autopilotTeam !== undefined && Object.keys(answers.autopilotTeam).length > 0) {
|
|
148
|
+
const existing = typeof base.autopilot === 'object' && base.autopilot !== null && !Array.isArray(base.autopilot)
|
|
149
|
+
? base.autopilot
|
|
150
|
+
: {};
|
|
151
|
+
out.autopilot = { ...existing, ...answers.autopilotTeam };
|
|
152
|
+
}
|
|
153
|
+
return out;
|
|
154
|
+
}
|
|
128
155
|
export function computeSetup(existing, answers) {
|
|
129
156
|
const base = existing ?? DEFAULT_CONFIG;
|
|
130
157
|
return {
|
|
@@ -149,6 +176,7 @@ export function computeSetup(existing, answers) {
|
|
|
149
176
|
// remove it — which would make the wizard's "no" a lie in the only case where the
|
|
150
177
|
// user has something to say.
|
|
151
178
|
...roadmapSection(base, answers),
|
|
179
|
+
...workSections(base, answers),
|
|
152
180
|
stalled_threshold_days: base.stalled_threshold_days,
|
|
153
181
|
claim_timeout_minutes: base.claim_timeout_minutes,
|
|
154
182
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup-compute.js","sourceRoot":"","sources":["../../src/setup/setup-compute.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"setup-compute.js","sourceRoot":"","sources":["../../src/setup/setup-compute.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA4DH;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,aAAa,EAAE,UAAU,CAAU,CAAC;AAsBvE,8EAA8E;AAC9E,WAAW;AACX,8EAA8E;AAE9E,MAAM,cAAc,GAAgB;IAClC,OAAO,EAAE,CAAC;IACV,QAAQ,EAAE;QACR,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,YAAY;KACvB;IACD,SAAS,EAAE,EAAE;IACb,OAAO,EAAE,EAAE;IACX,sBAAsB,EAAE,CAAC;IACzB,qBAAqB,EAAE,EAAE;CAC1B,CAAC;AAEF,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E;;GAEG;AACH,SAAS,WAAW,CAAC,CAAW,EAAE,CAAW;IAC3C,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;IAClC,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AACzB,CAAC;AAED,8EAA8E;AAC9E,aAAa;AACb,8EAA8E;AAE9E;;;;;;;;;;;;;;GAcG;AACH;;;;;;;;;;GAUG;AACH,SAAS,iBAAiB,CACxB,IAAiB,EACjB,OAAqB;IAErB,IAAI,OAAO,CAAC,cAAc,KAAK,SAAS,EAAE,CAAC;QACzC,OAAO,YAAY,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACrE,CAAC;IACD,IAAI,OAAO,CAAC,cAAc,KAAK,IAAI,EAAE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|
3
|
+
* repo, then whether to set up autopilot now (init-sets-work-mode/AC-1..AC-12).
|
|
4
|
+
*
|
|
5
|
+
* A sibling of `collectInteractiveAnswers`, called right after it, rather than more
|
|
6
|
+
* questions inside it. The project questions and their tests stay as they were, and
|
|
7
|
+
* the roadmap projection offer stays the last of them — the position
|
|
8
|
+
* issue-tracker-in-init/AC-1 gave it so a project that never publishes reaches the
|
|
9
|
+
* end of those questions without thinking about it.
|
|
10
|
+
*
|
|
11
|
+
* @module
|
|
12
|
+
*/
|
|
13
|
+
import type { Prompter } from '../core/prompt.js';
|
|
14
|
+
import type { ReleasePreset } from '../autopilot/presets.js';
|
|
15
|
+
import { type AutopilotPicks } from '../autopilot/questions.js';
|
|
16
|
+
import type { AutopilotConfig } from '../autopilot/state.js';
|
|
17
|
+
import type { TeamDefaults } from '../autopilot/team.js';
|
|
18
|
+
import { type SetupConfig, type TaskAgents } from './setup-compute.js';
|
|
19
|
+
/**
|
|
20
|
+
* Which of these platforms declare sub-agents. Read from the same capability maps
|
|
21
|
+
* that put the offer into the implementation skill, so "where one agent per task
|
|
22
|
+
* works" has one source (init-sets-work-mode/AC-2, AC-3).
|
|
23
|
+
*/
|
|
24
|
+
export declare function subagentSupport(platforms: readonly string[]): {
|
|
25
|
+
with: string[];
|
|
26
|
+
without: string[];
|
|
27
|
+
};
|
|
28
|
+
/** The task-agents answer already in `.aidlc/config.yaml`, or null. */
|
|
29
|
+
export declare function existingTaskAgents(existing: SetupConfig | null): TaskAgents | null;
|
|
30
|
+
export interface WorkModeInput {
|
|
31
|
+
existing: SetupConfig | null;
|
|
32
|
+
/** The platforms configured once this init completes: existing plus selected. */
|
|
33
|
+
platforms: string[];
|
|
34
|
+
/** null outside a git repository, where autopilot cannot keep its state. */
|
|
35
|
+
autopilot: null | {
|
|
36
|
+
/** `--autopilot`: skip the yes/no and go straight to the four questions. */
|
|
37
|
+
flag: boolean;
|
|
38
|
+
machine: AutopilotConfig | null;
|
|
39
|
+
team: TeamDefaults;
|
|
40
|
+
releases: ReleasePreset[];
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/** `undefined` fields were not asked, and change nothing. */
|
|
44
|
+
export interface WorkModeAnswers {
|
|
45
|
+
taskAgents?: TaskAgents;
|
|
46
|
+
autopilot?: AutopilotPicks;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Ask the step. Returns null on any cancel, and `runInit` then cancels the whole
|
|
50
|
+
* init with nothing written, as every other init question does (AC-11).
|
|
51
|
+
*/
|
|
52
|
+
export declare function collectWorkMode(input: WorkModeInput, prompt: Prompter): Promise<WorkModeAnswers | null>;
|
|
53
|
+
//# sourceMappingURL=work-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"work-mode.d.ts","sourceRoot":"","sources":["../../src/setup/work-mode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAA2C,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AACzG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAsB,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAE3F;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,GAAG;IAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAOnG;AAED,uEAAuE;AACvE,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,WAAW,GAAG,IAAI,GAAG,UAAU,GAAG,IAAI,CAGlF;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;IAC7B,iFAAiF;IACjF,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,4EAA4E;IAC5E,SAAS,EAAE,IAAI,GAAG;QAChB,4EAA4E;QAC5E,IAAI,EAAE,OAAO,CAAC;QACd,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;QAChC,IAAI,EAAE,YAAY,CAAC;QACnB,QAAQ,EAAE,aAAa,EAAE,CAAC;KAC3B,CAAC;CACH;AAED,6DAA6D;AAC7D,MAAM,WAAW,eAAe;IAC9B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,SAAS,CAAC,EAAE,cAAc,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAsB,eAAe,CAAC,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAyC7G"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The "how work runs" step of `aidlc init`: how implementation tasks run in this
|
|
3
|
+
* repo, then whether to set up autopilot now (init-sets-work-mode/AC-1..AC-12).
|
|
4
|
+
*
|
|
5
|
+
* A sibling of `collectInteractiveAnswers`, called right after it, rather than more
|
|
6
|
+
* questions inside it. The project questions and their tests stay as they were, and
|
|
7
|
+
* the roadmap projection offer stays the last of them — the position
|
|
8
|
+
* issue-tracker-in-init/AC-1 gave it so a project that never publishes reaches the
|
|
9
|
+
* end of those questions without thinking about it.
|
|
10
|
+
*
|
|
11
|
+
* @module
|
|
12
|
+
*/
|
|
13
|
+
import { getCapabilityMap } from '@rasensio/aidlc-content';
|
|
14
|
+
import { askAutopilotQuestions, currentPreselect } from '../autopilot/questions.js';
|
|
15
|
+
import { TASK_AGENTS_VALUES } from './setup-compute.js';
|
|
16
|
+
/**
|
|
17
|
+
* Which of these platforms declare sub-agents. Read from the same capability maps
|
|
18
|
+
* that put the offer into the implementation skill, so "where one agent per task
|
|
19
|
+
* works" has one source (init-sets-work-mode/AC-2, AC-3).
|
|
20
|
+
*/
|
|
21
|
+
export function subagentSupport(platforms) {
|
|
22
|
+
const out = { with: [], without: [] };
|
|
23
|
+
for (const platform of platforms) {
|
|
24
|
+
const caps = getCapabilityMap(platform)?.capabilities ?? {};
|
|
25
|
+
(Object.hasOwn(caps, 'subagents') ? out.with : out.without).push(platform);
|
|
26
|
+
}
|
|
27
|
+
return out;
|
|
28
|
+
}
|
|
29
|
+
/** The task-agents answer already in `.aidlc/config.yaml`, or null. */
|
|
30
|
+
export function existingTaskAgents(existing) {
|
|
31
|
+
const v = existing?.task_agents;
|
|
32
|
+
return TASK_AGENTS_VALUES.includes(v) ? v : null;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Ask the step. Returns null on any cancel, and `runInit` then cancels the whole
|
|
36
|
+
* init with nothing written, as every other init question does (AC-11).
|
|
37
|
+
*/
|
|
38
|
+
export async function collectWorkMode(input, prompt) {
|
|
39
|
+
const answers = {};
|
|
40
|
+
const support = subagentSupport(input.platforms);
|
|
41
|
+
if (support.with.length > 0) {
|
|
42
|
+
const where = `One agent per task works in ${support.with.join(', ')}.` +
|
|
43
|
+
(support.without.length > 0 ? ` ${support.without.join(', ')} always run${support.without.length === 1 ? 's' : ''} one session.` : '');
|
|
44
|
+
const mode = await prompt.select({
|
|
45
|
+
message: `How should implementation tasks run? ${where}`,
|
|
46
|
+
options: [
|
|
47
|
+
{ value: 'one-session', label: 'One session (recommended)', hint: 'every task runs in the session doing the work — cheapest' },
|
|
48
|
+
// The cost is in the label because clack shows a hint only for the focused
|
|
49
|
+
// option, and this is the line that decides the choice (AC-1).
|
|
50
|
+
{ value: 'per-task', label: 'One agent per task — roughly twice the tokens', hint: 'each task in a fresh agent, checked by a reviewer' },
|
|
51
|
+
],
|
|
52
|
+
initialValue: existingTaskAgents(input.existing) ?? 'one-session',
|
|
53
|
+
});
|
|
54
|
+
if (!mode.ok)
|
|
55
|
+
return null;
|
|
56
|
+
answers.taskAgents = mode.value;
|
|
57
|
+
}
|
|
58
|
+
const ap = input.autopilot;
|
|
59
|
+
if (ap === null)
|
|
60
|
+
return answers;
|
|
61
|
+
if (!ap.flag) {
|
|
62
|
+
// Default no, and "no" is not "remove": it leaves every autopilot setting where it
|
|
63
|
+
// is, so pressing Enter through a re-run cannot lose anything (AC-6, AC-7). A
|
|
64
|
+
// first-time user is not asked about agent permissions before running a feature.
|
|
65
|
+
const now = await prompt.confirm({
|
|
66
|
+
message: 'Set up autopilot now? (works the backlog in the background; `aidlc autopilot setup` asks the same later)',
|
|
67
|
+
initialValue: false,
|
|
68
|
+
});
|
|
69
|
+
if (!now.ok)
|
|
70
|
+
return null;
|
|
71
|
+
if (!now.value)
|
|
72
|
+
return answers;
|
|
73
|
+
}
|
|
74
|
+
const picks = await askAutopilotQuestions(prompt, ap.releases, currentPreselect(ap.machine, ap.team, ap.releases));
|
|
75
|
+
if (picks === null)
|
|
76
|
+
return null;
|
|
77
|
+
answers.autopilot = picks;
|
|
78
|
+
return answers;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=work-mode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"work-mode.js","sourceRoot":"","sources":["../../src/setup/work-mode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAI3D,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAuB,MAAM,2BAA2B,CAAC;AAGzG,OAAO,EAAE,kBAAkB,EAAqC,MAAM,oBAAoB,CAAC;AAE3F;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,SAA4B;IAC1D,MAAM,GAAG,GAAG,EAAE,IAAI,EAAE,EAAc,EAAE,OAAO,EAAE,EAAc,EAAE,CAAC;IAC9D,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;QACjC,MAAM,IAAI,GAAG,gBAAgB,CAAC,QAAQ,CAAC,EAAE,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/aidlc",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.57.0",
|
|
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.57.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "22.15.32",
|