@felan-ai/ext-prewalk 0.1.0-alpha.1 → 0.1.0-alpha.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.
package/LICENSE CHANGED
@@ -1,6 +1,8 @@
1
1
  MIT License
2
2
 
3
3
  Copyright (c) 2026 Felan contributors
4
+ Copyright (c) 2026 Dimitar Panayotov
5
+ Copyright (c) 2026 Milko Slavov
4
6
 
5
7
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
8
  of this software and associated documentation files (the "Software"), to deal
package/NOTICE ADDED
@@ -0,0 +1,10 @@
1
+ @felan-ai/ext-prewalk
2
+
3
+ This package includes adapted portions of packages/pi-prewalk from
4
+ mslavov/pi-extensions at commit 7e72e509fe45a5a87c4c2e176cb711de994a8c1d.
5
+
6
+ Copyright (c) 2026 Dimitar Panayotov
7
+ Copyright (c) 2026 Milko Slavov
8
+
9
+ The adapted source is licensed under the MIT License. The applicable MIT
10
+ license text and copyright notices are reproduced in LICENSE.
package/README.md CHANGED
@@ -1,3 +1,62 @@
1
1
  # @felan-ai/ext-prewalk
2
2
 
3
- Package foundation for the Felan prewalk extension.
3
+ Same-session Prewalk for Felan: the current model explores and plans the work, records a validated task plan, and makes one focused mutation. Felan then switches the next model request to `openai-codex/gpt-5.6-luna`, which finishes and verifies the task with the full conversation and tool history intact.
4
+
5
+ After the run settles, Prewalk restores the original planner model and thinking level by default.
6
+
7
+ ## Requirements
8
+
9
+ - An authenticated target model
10
+ - A Beads workspace with an active `bash` or `exec_command` tool, or an active `todo_write` tool
11
+ - At least one active mutation tool: `edit`, `write`, or `apply_patch`
12
+
13
+ When `/prewalk` is armed, it probes the current working directory with `bd status` through the active Felan `AgentRuntime`. A configured Beads workspace makes Beads the task tracker for that run; otherwise Prewalk uses `todo_write`. Prewalk refuses to arm and names the missing capability when the selected tracker or mutation tools are unavailable. Felan currently does not provide a global `todo_write` tool, so non-Beads workspaces require another extension to provide that capability.
14
+
15
+ ## Commands
16
+
17
+ ```text
18
+ /prewalk <task> Arm Prewalk and start the task immediately
19
+ /prewalk Arm Prewalk for the next ordinary prompt
20
+ /prewalk status Show the phase, target model, and restoration setting
21
+ /prewalk off Cancel Prewalk
22
+ ```
23
+
24
+ `status` and `off` are handled locally and do not make a provider request. In TUI mode, an inline task is submitted as a user message. In JSON and print modes, it is submitted as a visible custom message and the command waits for the run to become idle. Turning Prewalk off after handoff restores the original planner when restoration is enabled. A manual model selection cancels Prewalk and keeps the model selected by the user.
25
+
26
+ ## Lifecycle
27
+
28
+ 1. The planner explores the relevant repository surface and determines the complete implementation scope.
29
+ 2. The planner records implementation and validation work. It uses direct `bd` CLI commands when Beads is configured, or calls `todo_write` with 5–9 items and exactly one `in_progress` item otherwise.
30
+ 3. The planner performs one focused successful `edit`, `write`, or `apply_patch` after the task-tracking gate opens.
31
+ 4. At that turn boundary, Felan switches to the configured target model.
32
+ 5. The target model completes the existing Beads graph or checklist and runs the relevant verification.
33
+ 6. Once the agent run has fully settled, Felan restores the planner model and thinking level.
34
+
35
+ Tool-call order controls the handoff even when tools execute in parallel: a successful Beads task update or todo checklist followed by a mutation can qualify in the same turn, while a mutation before task tracking cannot. Failed tracking or mutation calls do not qualify. If the planner stops after prose or partial tool progress, Prewalk can queue a bounded hidden continuation, with a maximum of three per run.
36
+
37
+ The handoff does not fork, summarize, or replace the session. Planning guidance and implementation guidance are transient context messages; user messages, assistant responses, task-tracking results, mutations, and verification results remain in one trajectory.
38
+
39
+ ## Flags
40
+
41
+ Prewalk uses Pi's namespaced extension flags and does not read a configuration file.
42
+
43
+ ```text
44
+ --prewalk-target-model <provider/model-id>
45
+ --prewalk-restore-planner
46
+ --no-prewalk-restore-planner
47
+ ```
48
+
49
+ `prewalk-target-model` defaults to `openai-codex/gpt-5.6-luna`. `prewalk-restore-planner` defaults to `true`.
50
+
51
+ ## Failure behavior
52
+
53
+ - Missing target model or authentication clears the handoff and keeps the existing trajectory.
54
+ - A failed target-model switch clears Prewalk and reports the failure once.
55
+ - A failed planner restoration clears Prewalk, reports the failure once, and keeps the current model.
56
+ - A manual model change cancels Prewalk without restoring over the user's selection.
57
+ - Session quit, reload, replacement, or fork while the target is active attempts planner restoration as a graceful shutdown backstop.
58
+ - Reaching the automatic continuation limit lets the run settle normally.
59
+
60
+ ## Attribution
61
+
62
+ This package adapts the MIT-licensed `packages/pi-prewalk` implementation from `mslavov/pi-extensions` at commit `7e72e509fe45a5a87c4c2e176cb711de994a8c1d`. See [NOTICE](./NOTICE) and [LICENSE](./LICENSE).
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
- declare const prewalkExtension: () => void;
1
+ import type { FelanExtension } from '@felan-ai/agent-core';
2
+ declare const prewalkExtension: FelanExtension;
2
3
  export default prewalkExtension;
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,gBAAgB,QAAO,IAAU,CAAC;AAExC,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,cAAc,EAEf,MAAM,sBAAsB,CAAC;AAmD9B,QAAA,MAAM,gBAAgB,EAAE,cA2VvB,CAAC;AAkGF,eAAe,gBAAgB,CAAC"}
package/dist/index.js CHANGED
@@ -1,3 +1,410 @@
1
- const prewalkExtension = () => { };
1
+ import { BEADS_PLANNING_INSTRUCTION, BEADS_VERIFICATION_INSTRUCTION, CONTINUATION_MESSAGE_TYPE, CONTROL_MESSAGE_PREFIX, IMPLEMENTATION_MESSAGE_TYPE, PLANNING_INSTRUCTION, PLANNING_MESSAGE_TYPE, VERIFICATION_INSTRUCTION, } from './prompts.js';
2
+ import { beginTurn, createRunState, recordToolCall, reduceTurn, validateArmingTools, validateTodoWriteInput, } from './state.js';
3
+ const DEFAULT_CONFIG = {
4
+ targetModel: 'openai-codex/gpt-5.6-luna',
5
+ restorePlanner: true,
6
+ };
7
+ const TARGET_MODEL_FLAG = 'prewalk-target-model';
8
+ const RESTORE_PLANNER_FLAG = 'prewalk-restore-planner';
9
+ const HEADLESS_TASK_MESSAGE_TYPE = 'pi-prewalk-task';
10
+ const prewalkExtension = (pi) => {
11
+ pi.registerFlag(TARGET_MODEL_FLAG, {
12
+ description: 'Model used to implement a planned Prewalk task (provider/model-id)',
13
+ type: 'string',
14
+ default: DEFAULT_CONFIG.targetModel,
15
+ });
16
+ pi.registerFlag(RESTORE_PLANNER_FLAG, {
17
+ description: 'Restore the planner model and thinking level after implementation',
18
+ type: 'boolean',
19
+ default: DEFAULT_CONFIG.restorePlanner,
20
+ });
21
+ let loadedConfig = { config: { ...DEFAULT_CONFIG } };
22
+ let config = loadedConfig.config;
23
+ let targetModel = parseTargetModel(config.targetModel);
24
+ let configWarningShown = false;
25
+ let state = { phase: 'idle' };
26
+ let plannerSnapshot;
27
+ let expectedModelKey;
28
+ let useBeads = false;
29
+ function refreshConfig() {
30
+ loadedConfig = loadConfig(pi);
31
+ config = loadedConfig.config;
32
+ targetModel = parseTargetModel(config.targetModel);
33
+ }
34
+ function notify(ctx, message, type = 'info') {
35
+ if (ctx.hasUI) {
36
+ ctx.ui.notify(message, type);
37
+ }
38
+ else {
39
+ console.error(message);
40
+ }
41
+ }
42
+ function publishConfigWarning(ctx) {
43
+ if (!loadedConfig.warning || configWarningShown)
44
+ return;
45
+ configWarningShown = true;
46
+ notify(ctx, `Prewalk flag warning: ${loadedConfig.warning} Using defaults.`, 'warning');
47
+ }
48
+ function updateStatus(ctx) {
49
+ if (state.phase === 'idle') {
50
+ ctx.ui.setStatus('prewalk', undefined);
51
+ return;
52
+ }
53
+ const continuationCount = state.run?.continuationCount ?? 0;
54
+ const continuationText = state.phase === 'planning' && continuationCount > 0
55
+ ? ` · ${continuationCount}/3`
56
+ : '';
57
+ ctx.ui.setStatus('prewalk', `Prewalk ${state.phase}${continuationText} → ${targetModel.key}`);
58
+ }
59
+ function publishStatus(ctx) {
60
+ publishConfigWarning(ctx);
61
+ const planner = plannerSnapshot ? ` | planner ${plannerSnapshot.modelKey}` : '';
62
+ notify(ctx, `Prewalk: ${state.phase} | target ${targetModel.key} | restore planner ${config.restorePlanner ? 'on' : 'off'}${planner}`);
63
+ }
64
+ function clearAutomation(ctx) {
65
+ state = { phase: 'idle' };
66
+ plannerSnapshot = undefined;
67
+ expectedModelKey = undefined;
68
+ useBeads = false;
69
+ updateStatus(ctx);
70
+ }
71
+ function failAutomation(ctx, message) {
72
+ clearAutomation(ctx);
73
+ notify(ctx, message, 'error');
74
+ }
75
+ async function arm(ctx) {
76
+ publishConfigWarning(ctx);
77
+ if (state.phase !== 'idle') {
78
+ notify(ctx, `Prewalk is already ${state.phase}. Use /prewalk off before starting another run.`, 'warning');
79
+ return false;
80
+ }
81
+ if (!ctx.isIdle()) {
82
+ notify(ctx, 'Prewalk can only be armed while the agent is idle.', 'warning');
83
+ return false;
84
+ }
85
+ useBeads = await hasBeadsWorkspace(pi, ctx.cwd);
86
+ const validation = validateArmingTools(pi.getActiveTools(), useBeads);
87
+ if (!validation.ok) {
88
+ notify(ctx, validation.reason, 'error');
89
+ return false;
90
+ }
91
+ state = { phase: 'armed' };
92
+ updateStatus(ctx);
93
+ const tracking = useBeads ? 'Beads' : 'todo_write';
94
+ notify(ctx, `Prewalk armed with ${tracking}. The next task will plan, make one mutation, then hand off to ${targetModel.key}.`);
95
+ return true;
96
+ }
97
+ function beginRun(ctx) {
98
+ if (state.phase !== 'armed')
99
+ return;
100
+ if (!ctx.model) {
101
+ failAutomation(ctx, 'Prewalk requires a selected planner model.');
102
+ return;
103
+ }
104
+ plannerSnapshot = {
105
+ model: ctx.model,
106
+ modelKey: modelKey(ctx.model),
107
+ thinkingLevel: pi.getThinkingLevel(),
108
+ };
109
+ state = { phase: 'planning', run: createRunState() };
110
+ updateStatus(ctx);
111
+ }
112
+ async function switchToTarget(ctx) {
113
+ if (state.phase !== 'planning' || !state.run || !plannerSnapshot)
114
+ return;
115
+ const run = state.run;
116
+ const snapshot = plannerSnapshot;
117
+ state = { phase: 'handoff', run };
118
+ updateStatus(ctx);
119
+ const target = ctx.modelRegistry.find(targetModel.provider, targetModel.modelId);
120
+ if (!target) {
121
+ failAutomation(ctx, `Prewalk target model is unavailable: ${targetModel.key}.`);
122
+ return;
123
+ }
124
+ if (!ctx.modelRegistry.hasConfiguredAuth(target)) {
125
+ failAutomation(ctx, `Prewalk target model is not authenticated: ${targetModel.key}.`);
126
+ return;
127
+ }
128
+ try {
129
+ expectedModelKey = targetModel.key;
130
+ const switched = await pi.setModel(target);
131
+ if (state.phase !== 'handoff' || plannerSnapshot !== snapshot)
132
+ return;
133
+ if (!switched) {
134
+ failAutomation(ctx, `Prewalk could not switch to ${targetModel.key}.`);
135
+ return;
136
+ }
137
+ state = { phase: 'implementing', run };
138
+ updateStatus(ctx);
139
+ notify(ctx, `Prewalk handed implementation to ${targetModel.key}.`);
140
+ }
141
+ catch (error) {
142
+ if (state.phase === 'handoff' && plannerSnapshot === snapshot) {
143
+ failAutomation(ctx, `Prewalk could not switch to ${targetModel.key}: ${errorMessage(error)}`);
144
+ }
145
+ }
146
+ finally {
147
+ if (expectedModelKey === targetModel.key)
148
+ expectedModelKey = undefined;
149
+ }
150
+ }
151
+ async function restorePlanner(ctx) {
152
+ const snapshot = plannerSnapshot;
153
+ if (!snapshot) {
154
+ clearAutomation(ctx);
155
+ return true;
156
+ }
157
+ state = { phase: 'restoring', run: state.run };
158
+ updateStatus(ctx);
159
+ try {
160
+ if (modelKey(ctx.model) !== snapshot.modelKey) {
161
+ expectedModelKey = snapshot.modelKey;
162
+ const restored = await pi.setModel(snapshot.model);
163
+ if (state.phase !== 'restoring' || plannerSnapshot !== snapshot)
164
+ return false;
165
+ if (!restored)
166
+ throw new Error(`model ${snapshot.modelKey} is not authenticated`);
167
+ }
168
+ if (state.phase !== 'restoring' || plannerSnapshot !== snapshot)
169
+ return false;
170
+ pi.setThinkingLevel(snapshot.thinkingLevel);
171
+ clearAutomation(ctx);
172
+ return true;
173
+ }
174
+ catch (error) {
175
+ if (state.phase !== 'idle') {
176
+ clearAutomation(ctx);
177
+ notify(ctx, `Prewalk could not restore ${snapshot.modelKey}: ${errorMessage(error)}`, 'error');
178
+ }
179
+ return false;
180
+ }
181
+ finally {
182
+ if (expectedModelKey === snapshot.modelKey)
183
+ expectedModelKey = undefined;
184
+ }
185
+ }
186
+ async function turnOff(ctx) {
187
+ if (state.phase === 'idle') {
188
+ notify(ctx, 'Prewalk is already off.');
189
+ return;
190
+ }
191
+ const targetIsActive = state.phase === 'handoff'
192
+ || state.phase === 'implementing'
193
+ || state.phase === 'restoring';
194
+ if (targetIsActive && config.restorePlanner && plannerSnapshot) {
195
+ const restored = await restorePlanner(ctx);
196
+ if (restored)
197
+ notify(ctx, 'Prewalk is off and the planner model has been restored.');
198
+ return;
199
+ }
200
+ clearAutomation(ctx);
201
+ notify(ctx, 'Prewalk is off.');
202
+ }
203
+ pi.registerCommand('prewalk', {
204
+ description: 'Plan with the current model, make one mutation, then hand off implementation',
205
+ handler: async (args, ctx) => {
206
+ if (state.phase === 'idle')
207
+ refreshConfig();
208
+ const command = args.trim();
209
+ if (command === 'status') {
210
+ publishStatus(ctx);
211
+ return;
212
+ }
213
+ if (command === 'off') {
214
+ await turnOff(ctx);
215
+ return;
216
+ }
217
+ if (!(await arm(ctx)))
218
+ return;
219
+ if (!command)
220
+ return;
221
+ if (!ctx.hasUI) {
222
+ beginRun(ctx);
223
+ if (state.phase !== 'planning')
224
+ return;
225
+ pi.sendMessage({
226
+ customType: HEADLESS_TASK_MESSAGE_TYPE,
227
+ content: command,
228
+ display: true,
229
+ }, { triggerTurn: true });
230
+ await ctx.waitForIdle();
231
+ return;
232
+ }
233
+ pi.sendUserMessage(command);
234
+ },
235
+ });
236
+ pi.on('session_start', (_event, ctx) => {
237
+ if (state.phase === 'idle')
238
+ refreshConfig();
239
+ publishConfigWarning(ctx);
240
+ updateStatus(ctx);
241
+ });
242
+ pi.on('before_agent_start', (_event, ctx) => {
243
+ beginRun(ctx);
244
+ });
245
+ pi.on('context', (event) => {
246
+ return { messages: buildContextMessages(event.messages, state.phase, useBeads) };
247
+ });
248
+ pi.on('turn_start', () => {
249
+ if (state.phase !== 'planning' || !state.run)
250
+ return;
251
+ state = { phase: 'planning', run: beginTurn(state.run) };
252
+ });
253
+ pi.on('tool_call', (event) => {
254
+ if (state.phase !== 'planning' || !state.run)
255
+ return;
256
+ if (!useBeads && event.toolName === 'todo_write') {
257
+ const validation = validateTodoWriteInput(event.input);
258
+ if (!validation.ok)
259
+ return { block: true, reason: validation.reason };
260
+ }
261
+ state = {
262
+ phase: 'planning',
263
+ run: recordToolCall(state.run, { toolCallId: event.toolCallId, toolName: event.toolName, input: event.input }, useBeads),
264
+ };
265
+ });
266
+ pi.on('turn_end', async (event, ctx) => {
267
+ if (state.phase !== 'planning' || !state.run)
268
+ return;
269
+ const decision = reduceTurn(state.run, event.toolResults, {
270
+ allowContinuation: isTextOnlyCompletion(event.message),
271
+ });
272
+ state = { phase: 'planning', run: decision.state };
273
+ updateStatus(ctx);
274
+ if (decision.shouldHandoff) {
275
+ await switchToTarget(ctx);
276
+ return;
277
+ }
278
+ if (decision.shouldContinue) {
279
+ pi.sendMessage({
280
+ customType: CONTINUATION_MESSAGE_TYPE,
281
+ content: '',
282
+ display: false,
283
+ }, { deliverAs: 'followUp' });
284
+ }
285
+ });
286
+ pi.on('model_select', (event, ctx) => {
287
+ if (state.phase === 'idle')
288
+ return;
289
+ const selectedModelKey = modelKey(event.model);
290
+ if (expectedModelKey === selectedModelKey) {
291
+ expectedModelKey = undefined;
292
+ return;
293
+ }
294
+ clearAutomation(ctx);
295
+ notify(ctx, `Prewalk cancelled after the model changed to ${selectedModelKey}.`, 'warning');
296
+ });
297
+ pi.on('agent_settled', async (_event, ctx) => {
298
+ if (state.phase === 'implementing' || state.phase === 'handoff') {
299
+ if (config.restorePlanner && plannerSnapshot) {
300
+ const snapshot = plannerSnapshot;
301
+ const restored = await restorePlanner(ctx);
302
+ if (restored)
303
+ notify(ctx, `Prewalk restored ${snapshot.modelKey}.`);
304
+ }
305
+ else {
306
+ clearAutomation(ctx);
307
+ }
308
+ return;
309
+ }
310
+ if (state.phase === 'planning') {
311
+ clearAutomation(ctx);
312
+ notify(ctx, 'Prewalk ended before a qualifying first mutation.', 'warning');
313
+ }
314
+ });
315
+ pi.on('session_shutdown', async (_event, ctx) => {
316
+ const targetIsActive = state.phase === 'handoff'
317
+ || state.phase === 'implementing'
318
+ || state.phase === 'restoring';
319
+ if (targetIsActive && config.restorePlanner && plannerSnapshot) {
320
+ await restorePlanner(ctx);
321
+ }
322
+ else if (state.phase !== 'idle') {
323
+ clearAutomation(ctx);
324
+ }
325
+ });
326
+ };
327
+ function buildContextMessages(messages, phase, useBeads) {
328
+ const filtered = structuredClone(messages).filter((message) => !isControlMessage(message));
329
+ const instruction = phase === 'planning'
330
+ ? { customType: PLANNING_MESSAGE_TYPE, content: useBeads ? BEADS_PLANNING_INSTRUCTION : PLANNING_INSTRUCTION }
331
+ : phase === 'implementing'
332
+ ? {
333
+ customType: IMPLEMENTATION_MESSAGE_TYPE,
334
+ content: useBeads ? BEADS_VERIFICATION_INSTRUCTION : VERIFICATION_INSTRUCTION,
335
+ }
336
+ : undefined;
337
+ if (!instruction)
338
+ return filtered;
339
+ return [
340
+ ...filtered,
341
+ {
342
+ role: 'custom',
343
+ customType: instruction.customType,
344
+ content: instruction.content,
345
+ display: false,
346
+ timestamp: Date.now(),
347
+ },
348
+ ];
349
+ }
350
+ async function hasBeadsWorkspace(pi, cwd) {
351
+ try {
352
+ const result = await pi.exec('bd', ['-C', cwd, '--readonly', '--json', 'status', '--no-activity'], { timeout: 5_000 });
353
+ return result.code === 0;
354
+ }
355
+ catch {
356
+ return false;
357
+ }
358
+ }
359
+ function isTextOnlyCompletion(message) {
360
+ return isRecord(message)
361
+ && message.role === 'assistant'
362
+ && message.stopReason === 'stop'
363
+ && Array.isArray(message.content)
364
+ && !message.content.some((content) => isRecord(content) && content.type === 'toolCall');
365
+ }
366
+ function isControlMessage(message) {
367
+ return isRecord(message)
368
+ && message.role === 'custom'
369
+ && typeof message.customType === 'string'
370
+ && message.customType.startsWith(CONTROL_MESSAGE_PREFIX);
371
+ }
372
+ function modelKey(model) {
373
+ return model ? `${model.provider}/${model.id}` : 'none';
374
+ }
375
+ function parseTargetModel(value) {
376
+ const separator = value.indexOf('/');
377
+ if (separator <= 0 || separator === value.length - 1)
378
+ return undefined;
379
+ const provider = value.slice(0, separator).trim();
380
+ const modelId = value.slice(separator + 1).trim();
381
+ if (!provider || !modelId)
382
+ return undefined;
383
+ return { provider, modelId, key: `${provider}/${modelId}` };
384
+ }
385
+ function loadConfig(pi) {
386
+ const targetModel = pi.getFlag(TARGET_MODEL_FLAG);
387
+ const restorePlanner = pi.getFlag(RESTORE_PLANNER_FLAG);
388
+ const parsedTarget = typeof targetModel === 'string' ? parseTargetModel(targetModel) : undefined;
389
+ if (!parsedTarget)
390
+ return invalidConfig(`${TARGET_MODEL_FLAG} must use the form "provider/model-id"`);
391
+ if (typeof restorePlanner !== 'boolean')
392
+ return invalidConfig(`${RESTORE_PLANNER_FLAG} must be a boolean`);
393
+ return {
394
+ config: {
395
+ targetModel: parsedTarget.key,
396
+ restorePlanner,
397
+ },
398
+ };
399
+ }
400
+ function invalidConfig(reason) {
401
+ return { config: { ...DEFAULT_CONFIG }, warning: `${reason}.` };
402
+ }
403
+ function errorMessage(error) {
404
+ return error instanceof Error ? error.message : String(error);
405
+ }
406
+ function isRecord(value) {
407
+ return typeof value === 'object' && value !== null;
408
+ }
2
409
  export default prewalkExtension;
3
410
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,GAAG,GAAS,EAAE,GAAE,CA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 export declare const IMPLEMENTATION_MESSAGE_TYPE = "pi-prewalk:implementation";
4
+ export declare const CONTINUATION_MESSAGE_TYPE = "pi-prewalk:continuation";
5
+ export declare const MAX_AUTOMATIC_CONTINUATIONS = 3;
6
+ export declare const PLANNING_INSTRUCTION = "Explore the repository thoroughly and determine the complete work required for the user's request.\n\nFollow this order:\n1. Inspect the relevant source, tests, configuration, documentation, and constraints.\n2. Determine the full implementation scope, affected files and symbols, risks, and verification required.\n3. Call todo_write with 5-9 detailed implementation tasks in execution order. Include validation work and mark exactly one ready task in_progress.\n4. Start implementing immediately. Work through the checklist in order, keep task statuses current, run the relevant validation, and continue until the request is complete.\n\nKeep the implementation focused on the requested scope and revise the checklist when repository evidence changes the plan.";
7
+ export declare const VERIFICATION_INSTRUCTION = "Continue implementing the existing todo_write checklist in task order. Keep statuses current, complete every remaining item, and keep the changes limited to the requested scope. Run the full relevant test module or suite, resolve failures, and report the verification performed.";
8
+ export declare const BEADS_PLANNING_INSTRUCTION = "Explore the repository thoroughly and determine the complete work required for the user's request.\n\nUse the beads skill and direct bd CLI commands for task tracking. Track the work with Beads instead of todo_write.\n\nFollow this order:\n1. Inspect the relevant source, tests, configuration, documentation, and constraints.\n2. Determine the full implementation scope, affected files and symbols, risks, and verification required.\n3. Create detailed Beads tasks for all implementation and validation work. Give each task a concrete scope and acceptance criteria, add dependencies that represent the required execution order, and mark the first ready task in_progress.\n4. Start implementing immediately. Work through ready Beads while honoring their dependencies, keep task statuses current, validate each completed task, and continue until every task for the request is complete.\n\nKeep the implementation focused on the requested scope and update the Beads graph when repository evidence changes the plan.";
9
+ export declare const BEADS_VERIFICATION_INSTRUCTION = "Continue implementing the existing Beads task graph. Honor task dependencies, work through ready Beads in execution order, and keep their statuses current with direct bd CLI commands instead of todo_write. Validate and close each completed Bead, keep the changes limited to the requested scope, run the full relevant test module or suite, resolve failures, and continue until every task is complete.";
10
+ //# sourceMappingURL=prompts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,gBAAgB,CAAC;AACpD,eAAO,MAAM,qBAAqB,wBAAsC,CAAC;AACzE,eAAO,MAAM,2BAA2B,8BAA4C,CAAC;AACrF,eAAO,MAAM,yBAAyB,4BAA0C,CAAC;AACjF,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAE7C,eAAO,MAAM,oBAAoB,+vBAQ0F,CAAC;AAE5H,eAAO,MAAM,wBAAwB,2RAA2R,CAAC;AAEjU,eAAO,MAAM,0BAA0B,w/BAUsF,CAAC;AAE9H,eAAO,MAAM,8BAA8B,oZAAoZ,CAAC"}
@@ -0,0 +1,28 @@
1
+ export const CONTROL_MESSAGE_PREFIX = 'pi-prewalk:';
2
+ export const PLANNING_MESSAGE_TYPE = `${CONTROL_MESSAGE_PREFIX}planning`;
3
+ export const IMPLEMENTATION_MESSAGE_TYPE = `${CONTROL_MESSAGE_PREFIX}implementation`;
4
+ export const CONTINUATION_MESSAGE_TYPE = `${CONTROL_MESSAGE_PREFIX}continuation`;
5
+ export const MAX_AUTOMATIC_CONTINUATIONS = 3;
6
+ export const PLANNING_INSTRUCTION = `Explore the repository thoroughly and determine the complete work required for the user's request.
7
+
8
+ Follow this order:
9
+ 1. Inspect the relevant source, tests, configuration, documentation, and constraints.
10
+ 2. Determine the full implementation scope, affected files and symbols, risks, and verification required.
11
+ 3. Call todo_write with 5-9 detailed implementation tasks in execution order. Include validation work and mark exactly one ready task in_progress.
12
+ 4. Start implementing immediately. Work through the checklist in order, keep task statuses current, run the relevant validation, and continue until the request is complete.
13
+
14
+ Keep the implementation focused on the requested scope and revise the checklist when repository evidence changes the plan.`;
15
+ export const VERIFICATION_INSTRUCTION = `Continue implementing the existing todo_write checklist in task order. Keep statuses current, complete every remaining item, and keep the changes limited to the requested scope. Run the full relevant test module or suite, resolve failures, and report the verification performed.`;
16
+ export const BEADS_PLANNING_INSTRUCTION = `Explore the repository thoroughly and determine the complete work required for the user's request.
17
+
18
+ Use the beads skill and direct bd CLI commands for task tracking. Track the work with Beads instead of todo_write.
19
+
20
+ Follow this order:
21
+ 1. Inspect the relevant source, tests, configuration, documentation, and constraints.
22
+ 2. Determine the full implementation scope, affected files and symbols, risks, and verification required.
23
+ 3. Create detailed Beads tasks for all implementation and validation work. Give each task a concrete scope and acceptance criteria, add dependencies that represent the required execution order, and mark the first ready task in_progress.
24
+ 4. Start implementing immediately. Work through ready Beads while honoring their dependencies, keep task statuses current, validate each completed task, and continue until every task for the request is complete.
25
+
26
+ Keep the implementation focused on the requested scope and update the Beads graph when repository evidence changes the plan.`;
27
+ export const BEADS_VERIFICATION_INSTRUCTION = `Continue implementing the existing Beads task graph. Honor task dependencies, work through ready Beads in execution order, and keep their statuses current with direct bd CLI commands instead of todo_write. Validate and close each completed Bead, keep the changes limited to the requested scope, run the full relevant test module or suite, resolve failures, and continue until every task is complete.`;
28
+ //# sourceMappingURL=prompts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts.js","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG,aAAa,CAAC;AACpD,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,sBAAsB,UAAU,CAAC;AACzE,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,sBAAsB,gBAAgB,CAAC;AACrF,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,sBAAsB,cAAc,CAAC;AACjF,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC;AAE7C,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;;;2HAQuF,CAAC;AAE5H,MAAM,CAAC,MAAM,wBAAwB,GAAG,wRAAwR,CAAC;AAEjU,MAAM,CAAC,MAAM,0BAA0B,GAAG;;;;;;;;;;6HAUmF,CAAC;AAE9H,MAAM,CAAC,MAAM,8BAA8B,GAAG,iZAAiZ,CAAC"}
@@ -0,0 +1,48 @@
1
+ export type PrewalkPhase = 'idle' | 'armed' | 'planning' | 'handoff' | 'implementing' | 'restoring';
2
+ export interface PrewalkState {
3
+ phase: PrewalkPhase;
4
+ run?: PrewalkRunState;
5
+ }
6
+ export interface PrewalkRunState {
7
+ trackingGateOpen: boolean;
8
+ toolCalls: RecordedToolCall[];
9
+ nextOrdinal: number;
10
+ continuationCount: number;
11
+ continuationArmed: boolean;
12
+ }
13
+ export interface ToolCallSummary {
14
+ toolCallId: string;
15
+ toolName: string;
16
+ input?: unknown;
17
+ }
18
+ export interface ToolResultSummary {
19
+ toolCallId: string;
20
+ isError: boolean;
21
+ }
22
+ export interface TurnDecision {
23
+ state: PrewalkRunState;
24
+ shouldHandoff: boolean;
25
+ shouldContinue: boolean;
26
+ }
27
+ export type ValidationResult = {
28
+ ok: true;
29
+ } | {
30
+ ok: false;
31
+ reason: string;
32
+ };
33
+ type RecordedToolCall = {
34
+ toolCallId: string;
35
+ kind: 'tracking' | 'mutation';
36
+ ordinal: number;
37
+ };
38
+ export declare const MUTATION_TOOL_NAMES: ReadonlySet<string>;
39
+ export declare function validateArmingTools(activeTools: readonly string[], useBeads?: boolean): ValidationResult;
40
+ export declare function validateTodoWriteInput(input: unknown): ValidationResult;
41
+ export declare function createRunState(): PrewalkRunState;
42
+ export declare function beginTurn(state: PrewalkRunState): PrewalkRunState;
43
+ export declare function recordToolCall(state: PrewalkRunState, call: ToolCallSummary, useBeads?: boolean): PrewalkRunState;
44
+ export declare function reduceTurn(state: PrewalkRunState, results: readonly ToolResultSummary[], options?: {
45
+ allowContinuation?: boolean;
46
+ }): TurnDecision;
47
+ export {};
48
+ //# sourceMappingURL=state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../src/state.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,cAAc,GAAG,WAA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AAC,KAAK,EAAE,eAAe,GAAG,eAAe,CAMjE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,eAAe,EAAE,QAAQ,UAAQ,GAAG,eAAe,CAe/G;AAED,wBAAgB,UAAU,CACxB,KAAK,EAAE,eAAe,EACtB,OAAO,EAAE,SAAS,iBAAiB,EAAE,EACrC,OAAO,GAAE;IAAE,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAAO,GAC5C,YAAY,CAwCd"}
package/dist/state.js ADDED
@@ -0,0 +1,205 @@
1
+ import { MAX_AUTOMATIC_CONTINUATIONS } from './prompts.js';
2
+ const MUTATION_TOOLS = ['edit', 'write', 'apply_patch'];
3
+ const TODO_STATUSES = new Set(['pending', 'in_progress', 'completed']);
4
+ const BEADS_MUTATIONS = new Set([
5
+ 'create',
6
+ 'new',
7
+ 'q',
8
+ 'update',
9
+ 'close',
10
+ 'done',
11
+ 'link',
12
+ 'dep',
13
+ 'reopen',
14
+ 'assign',
15
+ 'priority',
16
+ 'tag',
17
+ 'label',
18
+ 'note',
19
+ 'comment',
20
+ 'edit',
21
+ 'set-state',
22
+ ]);
23
+ export const MUTATION_TOOL_NAMES = new Set(MUTATION_TOOLS);
24
+ export function validateArmingTools(activeTools, useBeads = false) {
25
+ const missingTracking = useBeads
26
+ ? !activeTools.some((toolName) => toolName === 'bash' || toolName === 'exec_command')
27
+ : !activeTools.includes('todo_write');
28
+ const missingMutation = !activeTools.some((toolName) => MUTATION_TOOL_NAMES.has(toolName));
29
+ if (!missingTracking && !missingMutation)
30
+ return { ok: true };
31
+ const requirements = [];
32
+ if (missingTracking) {
33
+ requirements.push(useBeads ? 'an active shell tool (bash or exec_command)' : 'the active todo_write tool');
34
+ }
35
+ if (missingMutation)
36
+ requirements.push('an active mutation tool (edit, write, or apply_patch)');
37
+ return {
38
+ ok: false,
39
+ reason: `Prewalk requires ${requirements.join(' and ')}.`,
40
+ };
41
+ }
42
+ export function validateTodoWriteInput(input) {
43
+ if (!isRecord(input) || !Array.isArray(input.todos)) {
44
+ return { ok: false, reason: 'Prewalk requires todo_write input with a todos array.' };
45
+ }
46
+ if (input.todos.length < 5 || input.todos.length > 9) {
47
+ return { ok: false, reason: 'Prewalk requires 5-9 todo items before the first mutation.' };
48
+ }
49
+ if (input.todos.some((todo) => !isRecord(todo) || !TODO_STATUSES.has(String(todo.status)))) {
50
+ return { ok: false, reason: 'Every Prewalk todo must have a valid pending, in_progress, or completed status.' };
51
+ }
52
+ const inProgressCount = input.todos.filter((todo) => todo.status === 'in_progress').length;
53
+ if (inProgressCount !== 1) {
54
+ return { ok: false, reason: 'Prewalk requires exactly one in_progress todo item.' };
55
+ }
56
+ return { ok: true };
57
+ }
58
+ export function createRunState() {
59
+ return {
60
+ trackingGateOpen: false,
61
+ toolCalls: [],
62
+ nextOrdinal: 0,
63
+ continuationCount: 0,
64
+ continuationArmed: true,
65
+ };
66
+ }
67
+ export function beginTurn(state) {
68
+ return {
69
+ ...state,
70
+ toolCalls: [],
71
+ nextOrdinal: 0,
72
+ };
73
+ }
74
+ export function recordToolCall(state, call, useBeads = false) {
75
+ const ordinal = state.nextOrdinal;
76
+ const nextState = { ...state, nextOrdinal: ordinal + 1 };
77
+ const kind = isTrackingCall(call, useBeads)
78
+ ? 'tracking'
79
+ : MUTATION_TOOL_NAMES.has(call.toolName)
80
+ ? 'mutation'
81
+ : undefined;
82
+ if (!kind)
83
+ return nextState;
84
+ return {
85
+ ...nextState,
86
+ toolCalls: [...state.toolCalls, { toolCallId: call.toolCallId, kind, ordinal }],
87
+ };
88
+ }
89
+ export function reduceTurn(state, results, options = {}) {
90
+ const successfulIds = new Set(results.filter((result) => !result.isError).map((result) => result.toolCallId));
91
+ const successfulTracking = state.toolCalls.filter((call) => call.kind === 'tracking' && successfulIds.has(call.toolCallId));
92
+ const successfulMutations = state.toolCalls.filter((call) => call.kind === 'mutation' && successfulIds.has(call.toolCallId));
93
+ const shouldHandoff = state.trackingGateOpen
94
+ ? successfulMutations.length > 0
95
+ : successfulMutations.some((mutation) => successfulTracking.some((tracking) => tracking.ordinal < mutation.ordinal));
96
+ let continuationArmed = results.some((result) => !result.isError) || state.continuationArmed;
97
+ let continuationCount = state.continuationCount;
98
+ let shouldContinue = false;
99
+ if (!shouldHandoff
100
+ && options.allowContinuation !== false
101
+ && results.length === 0
102
+ && continuationArmed
103
+ && continuationCount < MAX_AUTOMATIC_CONTINUATIONS) {
104
+ shouldContinue = true;
105
+ continuationCount += 1;
106
+ continuationArmed = false;
107
+ }
108
+ return {
109
+ state: {
110
+ trackingGateOpen: state.trackingGateOpen || successfulTracking.length > 0,
111
+ toolCalls: [],
112
+ nextOrdinal: 0,
113
+ continuationCount,
114
+ continuationArmed,
115
+ },
116
+ shouldHandoff,
117
+ shouldContinue,
118
+ };
119
+ }
120
+ function isTrackingCall(call, useBeads) {
121
+ if (!useBeads)
122
+ return call.toolName === 'todo_write';
123
+ if (call.toolName !== 'bash' && call.toolName !== 'exec_command')
124
+ return false;
125
+ if (!isRecord(call.input))
126
+ return false;
127
+ const command = call.input.command ?? call.input.cmd;
128
+ return typeof command === 'string' && shellCommandSegments(command).some(isBeadsMutationSegment);
129
+ }
130
+ function isBeadsMutationSegment(argv) {
131
+ const commandIndex = argv.findIndex((argument) => !/^[A-Za-z_][A-Za-z0-9_]*=/.test(argument));
132
+ if (commandIndex === -1 || argv[commandIndex] !== 'bd')
133
+ return false;
134
+ return BEADS_MUTATIONS.has(argv[commandIndex + 1] ?? '');
135
+ }
136
+ function shellCommandSegments(command) {
137
+ const segments = [];
138
+ let argv = [];
139
+ let token = '';
140
+ let tokenStarted = false;
141
+ let quote;
142
+ const finishToken = () => {
143
+ if (!tokenStarted)
144
+ return;
145
+ argv.push(token);
146
+ token = '';
147
+ tokenStarted = false;
148
+ };
149
+ const finishSegment = () => {
150
+ finishToken();
151
+ if (argv.length > 0)
152
+ segments.push(argv);
153
+ argv = [];
154
+ };
155
+ for (let index = 0; index < command.length; index += 1) {
156
+ const character = command[index];
157
+ if (quote !== undefined) {
158
+ if (character === quote) {
159
+ quote = undefined;
160
+ }
161
+ else if (character === '\\' && quote !== "'" && index + 1 < command.length) {
162
+ token += command[index + 1];
163
+ index += 1;
164
+ }
165
+ else {
166
+ token += character;
167
+ }
168
+ continue;
169
+ }
170
+ if (character === "'" || character === '"' || character === '`') {
171
+ quote = character;
172
+ tokenStarted = true;
173
+ continue;
174
+ }
175
+ if (character === '\\' && index + 1 < command.length) {
176
+ token += command[index + 1];
177
+ tokenStarted = true;
178
+ index += 1;
179
+ continue;
180
+ }
181
+ if (character === '#' && !tokenStarted) {
182
+ while (index + 1 < command.length && command[index + 1] !== '\n')
183
+ index += 1;
184
+ continue;
185
+ }
186
+ if (character === ';' || character === '&' || character === '|' || character === '\n') {
187
+ finishSegment();
188
+ if ((character === '&' || character === '|') && command[index + 1] === character)
189
+ index += 1;
190
+ continue;
191
+ }
192
+ if (/\s/.test(character)) {
193
+ finishToken();
194
+ continue;
195
+ }
196
+ token += character;
197
+ tokenStarted = true;
198
+ }
199
+ finishSegment();
200
+ return segments;
201
+ }
202
+ function isRecord(value) {
203
+ return typeof value === 'object' && value !== null;
204
+ }
205
+ //# sourceMappingURL=state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.js","sourceRoot":"","sources":["../src/state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AA0C3D,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,aAAa,CAAU,CAAC;AACjE,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC,CAAC;AACvE,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC;IAC9B,QAAQ;IACR,KAAK;IACL,GAAG;IACH,QAAQ;IACR,OAAO;IACP,MAAM;IACN,MAAM;IACN,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,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,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,IAAI;gBAAE,KAAK,IAAI,CAAC,CAAC;YAC7E,SAAS;QACX,CAAC;QACD,IAAI,SAAS,KAAK,GAAG,IAAI,SAAS,KAAK,GAAG,IAAI,SAAS,KAAK,GAAG,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;YACtF,aAAa,EAAE,CAAC;YAChB,IAAI,CAAC,SAAS,KAAK,GAAG,IAAI,SAAS,KAAK,GAAG,CAAC,IAAI,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,SAAS;gBAAE,KAAK,IAAI,CAAC,CAAC;YAC7F,SAAS;QACX,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;YACzB,WAAW,EAAE,CAAC;YACd,SAAS;QACX,CAAC;QAED,KAAK,IAAI,SAAS,CAAC;QACnB,YAAY,GAAG,IAAI,CAAC;IACtB,CAAC;IAED,aAAa,EAAE,CAAC;IAChB,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC;AACrD,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@felan-ai/ext-prewalk",
3
- "version": "0.1.0-alpha.1",
4
- "description": "Prewalk extension for Felan",
3
+ "version": "0.1.0-alpha.2",
4
+ "description": "Same-session planner-to-implementation model handoff for Felan",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "repository": "github:felan-ai/felan",
@@ -11,6 +11,7 @@
11
11
  "files": [
12
12
  "dist",
13
13
  "LICENSE",
14
+ "NOTICE",
14
15
  "README.md"
15
16
  ],
16
17
  "exports": {
@@ -20,7 +21,7 @@
20
21
  }
21
22
  },
22
23
  "dependencies": {
23
- "@felan-ai/agent-core": "0.1.0-alpha.1"
24
+ "@felan-ai/agent-core": "0.1.0-alpha.2"
24
25
  },
25
26
  "publishConfig": {
26
27
  "access": "public",