@ikie-dev/cli 9.9.2 → 9.9.4
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/.ikie/ferments/019f2cb6-1bd2-714a-8edd-5c7440e536e2/reviews/phase-phase-1-1.json +41 -0
- package/.ikie/ferments/019f2cb6-1bd2-714a-8edd-5c7440e536e2/runtime.json +11 -0
- package/.ikie/ferments/019f2cb6-1c3e-72d9-a88d-8f639b9ba138/reviews/phase-phase-1-1.json +47 -0
- package/.ikie/ferments/019f2cb6-1c3e-72d9-a88d-8f639b9ba138/runtime.json +13 -0
- package/.ikie/ferments/019f2cb6-1caa-736a-9d87-411cc0c93174/reviews/phase-phase-1-1.json +40 -0
- package/.ikie/ferments/019f2cb6-1caa-736a-9d87-411cc0c93174/runtime.json +9 -0
- package/.ikie/ferments/019f2cb6-1cd1-76c3-a3de-59ed401d4aa1/reviews/phase-phase-1-1.json +40 -0
- package/.ikie/ferments/019f2cb6-1cd1-76c3-a3de-59ed401d4aa1/runtime.json +9 -0
- package/.ikie/ferments/019f2cb6-1cf2-716a-b444-f4b8bc835d8a/reviews/phase-phase-1-1.json +40 -0
- package/.ikie/ferments/019f2cb6-1cf2-716a-b444-f4b8bc835d8a/runtime.json +9 -0
- package/.ikie/ferments/019f2cb6-1d0d-72af-b2e0-e60c6215e6d3/reviews/phase-phase-1-1.json +40 -0
- package/.ikie/ferments/019f2cb6-1d0d-72af-b2e0-e60c6215e6d3/runtime.json +9 -0
- package/.ikie/ferments/019f2cb6-1d33-7338-aafb-d8d6918de205/reviews/phase-phase-1-1.json +40 -0
- package/.ikie/ferments/019f2cb6-1d33-7338-aafb-d8d6918de205/runtime.json +9 -0
- package/.ikie/ferments/019f2cb6-1d55-71db-82e2-91216d201a8a/reviews/phase-phase-1-1.json +62 -0
- package/.ikie/ferments/019f2cb6-1d55-71db-82e2-91216d201a8a/runtime.json +9 -0
- package/.ikie/ferments/019f2cd9-0367-75ef-977c-44a649192fe7/reviews/phase-phase-1-1.json +41 -0
- package/.ikie/ferments/019f2cd9-0367-75ef-977c-44a649192fe7/runtime.json +11 -0
- package/.ikie/ferments/019f2cd9-039e-759d-95d1-1d610613bc0e/reviews/phase-phase-1-1.json +47 -0
- package/.ikie/ferments/019f2cd9-039e-759d-95d1-1d610613bc0e/runtime.json +13 -0
- package/.ikie/ferments/019f2cd9-03db-765f-8569-5b34354e6cab/reviews/phase-phase-1-1.json +40 -0
- package/.ikie/ferments/019f2cd9-03db-765f-8569-5b34354e6cab/runtime.json +9 -0
- package/.ikie/ferments/019f2cd9-03f3-742f-bab3-cc3bf5a2e413/reviews/phase-phase-1-1.json +40 -0
- package/.ikie/ferments/019f2cd9-03f3-742f-bab3-cc3bf5a2e413/runtime.json +9 -0
- package/.ikie/ferments/019f2cd9-040b-75d3-9ef4-ed620c63b659/reviews/phase-phase-1-1.json +40 -0
- package/.ikie/ferments/019f2cd9-040b-75d3-9ef4-ed620c63b659/runtime.json +9 -0
- package/.ikie/ferments/019f2cd9-0420-767e-906a-aa41084f357f/reviews/phase-phase-1-1.json +40 -0
- package/.ikie/ferments/019f2cd9-0420-767e-906a-aa41084f357f/runtime.json +9 -0
- package/.ikie/ferments/019f2cd9-043c-7249-8a81-8fb24bcf8bc9/reviews/phase-phase-1-1.json +40 -0
- package/.ikie/ferments/019f2cd9-043c-7249-8a81-8fb24bcf8bc9/runtime.json +9 -0
- package/.ikie/ferments/019f2cd9-0458-727a-9381-ce5b651c7032/reviews/phase-phase-1-1.json +62 -0
- package/.ikie/ferments/019f2cd9-0458-727a-9381-ce5b651c7032/runtime.json +9 -0
- package/.ikie/ferments/019f2cd9-e3d4-77ba-a889-83c0773b9df8/reviews/phase-phase-1-1.json +41 -0
- package/.ikie/ferments/019f2cd9-e3d4-77ba-a889-83c0773b9df8/runtime.json +11 -0
- package/.ikie/ferments/019f2cd9-e408-73ac-8fa6-4ac51fc1e3b7/reviews/phase-phase-1-1.json +47 -0
- package/.ikie/ferments/019f2cd9-e408-73ac-8fa6-4ac51fc1e3b7/runtime.json +13 -0
- package/.ikie/ferments/019f2cd9-e45c-7358-985f-5b161c0d4f50/reviews/phase-phase-1-1.json +40 -0
- package/.ikie/ferments/019f2cd9-e45c-7358-985f-5b161c0d4f50/runtime.json +9 -0
- package/.ikie/ferments/019f2cd9-e480-76f9-8d51-dbe7ee36286a/reviews/phase-phase-1-1.json +40 -0
- package/.ikie/ferments/019f2cd9-e480-76f9-8d51-dbe7ee36286a/runtime.json +9 -0
- package/.ikie/ferments/019f2cd9-e498-76bd-b7b0-2e99e6bc7896/reviews/phase-phase-1-1.json +40 -0
- package/.ikie/ferments/019f2cd9-e498-76bd-b7b0-2e99e6bc7896/runtime.json +9 -0
- package/.ikie/ferments/019f2cd9-e4ae-702d-ad38-38e75c72d018/reviews/phase-phase-1-1.json +40 -0
- package/.ikie/ferments/019f2cd9-e4ae-702d-ad38-38e75c72d018/runtime.json +9 -0
- package/.ikie/ferments/019f2cd9-e4c2-730d-b351-fd9d13092ac0/reviews/phase-phase-1-1.json +40 -0
- package/.ikie/ferments/019f2cd9-e4c2-730d-b351-fd9d13092ac0/runtime.json +9 -0
- package/.ikie/ferments/019f2cd9-e4d6-7358-bdc0-34267a569f79/reviews/phase-phase-1-1.json +62 -0
- package/.ikie/ferments/019f2cd9-e4d6-7358-bdc0-34267a569f79/runtime.json +9 -0
- package/package.json +1 -1
- package/src/extensions/ferment/tool-scope.ts +6 -1
- package/src/extensions/ferment/tools/escalate.ts +13 -9
- package/src/extensions/ferment/tools/phases.ts +21 -8
package/package.json
CHANGED
|
@@ -163,7 +163,12 @@ export function applyFermentRuntimeToolProfile(pi: ExtensionAPI, runtime: Fermen
|
|
|
163
163
|
pi.setActiveTools([])
|
|
164
164
|
return
|
|
165
165
|
}
|
|
166
|
-
|
|
166
|
+
const active = runtime.getActive()
|
|
167
|
+
const activeId = runtime.getActiveId() ?? active?.id
|
|
168
|
+
const storage = typeof runtime.getStorage === "function" ? runtime.getStorage() : undefined
|
|
169
|
+
const fresh = activeId ? (storage?.get(activeId) ?? active) : active
|
|
170
|
+
if (fresh && fresh !== active) runtime.setActive(fresh)
|
|
171
|
+
applyFermentToolProfile(pi, profileForFerment(fresh))
|
|
167
172
|
}
|
|
168
173
|
|
|
169
174
|
export function setActiveFermentAndApplyProfile(
|
|
@@ -2,6 +2,7 @@ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent"
|
|
|
2
2
|
import { findFirstPlannedPhase } from "../../../ferment/engine.js"
|
|
3
3
|
import { captureGitHead } from "../phase-evidence.js"
|
|
4
4
|
import type { FermentRuntime } from "../runtime.js"
|
|
5
|
+
import { scheduleFermentWakeUp } from "../scheduler.js"
|
|
5
6
|
import { createApplyAndPersist, toolOk } from "../tool-helpers.js"
|
|
6
7
|
import { applyFermentToolProfile, profileForFerment } from "../tool-scope.js"
|
|
7
8
|
|
|
@@ -29,16 +30,14 @@ export function registerEscalateTool(pi: ExtensionAPI, runtime: FermentRuntime):
|
|
|
29
30
|
|
|
30
31
|
const currentProfile = profileForFerment(ferment)
|
|
31
32
|
|
|
32
|
-
// Check if write tools are actually visible in the current turn.
|
|
33
|
-
const activeTools = pi.getActiveTools()
|
|
34
|
-
const hasWriteTools = activeTools.includes("write") || activeTools.includes("edit")
|
|
35
|
-
|
|
36
33
|
if (currentProfile === "implementation") {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
scheduleFermentWakeUp(pi, runtime, {
|
|
35
|
+
deliverAs: "followUp",
|
|
36
|
+
fermentId: ferment.id,
|
|
37
|
+
tag: "Tool refresh",
|
|
38
|
+
})
|
|
40
39
|
return toolOk(
|
|
41
|
-
"The ferment is in implementation phase
|
|
40
|
+
"The ferment is already in implementation phase. If bash/edit/write/start_ferment_step are not listed in this turn, stop now; a queued follow-up will continue with the refreshed implementation toolset.",
|
|
42
41
|
)
|
|
43
42
|
}
|
|
44
43
|
|
|
@@ -69,9 +68,14 @@ export function registerEscalateTool(pi: ExtensionAPI, runtime: FermentRuntime):
|
|
|
69
68
|
|
|
70
69
|
const headRef = captureGitHead()
|
|
71
70
|
if (headRef) runtime.setPhaseStartRef(ferment.id, planned.id, headRef)
|
|
71
|
+
scheduleFermentWakeUp(pi, runtime, {
|
|
72
|
+
deliverAs: "followUp",
|
|
73
|
+
fermentId: outcome.ferment.id,
|
|
74
|
+
tag: "Tool refresh",
|
|
75
|
+
})
|
|
72
76
|
|
|
73
77
|
return toolOk(
|
|
74
|
-
`Phase "${planned.name}" activated.
|
|
78
|
+
`Phase "${planned.name}" activated. Implementation tools unlock on the next turn. Stop now; a queued follow-up will continue with the refreshed toolset.`,
|
|
75
79
|
)
|
|
76
80
|
},
|
|
77
81
|
})
|
|
@@ -24,6 +24,7 @@ import { type PhaseEvidence, captureGitHead, gatherPhaseEvidence } from "../phas
|
|
|
24
24
|
import { type ProjectCheckResult, runProjectChecks, summarizeProjectChecks } from "../project-tests.js"
|
|
25
25
|
import { hashFlags, writeEscalationArtifact, writeReviewEvidence } from "../review-evidence.js"
|
|
26
26
|
import { type FermentRuntime, defaultFermentRuntime } from "../runtime.js"
|
|
27
|
+
import { scheduleFermentWakeUp } from "../scheduler.js"
|
|
27
28
|
import { MAX_BLOCK_RETRIES } from "../state.js"
|
|
28
29
|
import {
|
|
29
30
|
createApplyAndPersist,
|
|
@@ -578,11 +579,17 @@ export function registerPhaseTools(pi: ExtensionAPI, runtime: FermentRuntime = d
|
|
|
578
579
|
.join("\n")
|
|
579
580
|
const dm = formatDecisionsAndMemories(fresh)
|
|
580
581
|
const dmSection = dm ? `\n\n${dm}` : ""
|
|
582
|
+
|
|
583
|
+
// The active tool schema refreshes only after this model turn ends.
|
|
584
|
+
// Queue the real next action as a follow-up and tell the model not to
|
|
585
|
+
// attempt implementation-only tools inside the stale planning turn.
|
|
586
|
+
scheduleFermentWakeUp(pi, runtime, {
|
|
587
|
+
deliverAs: "followUp",
|
|
588
|
+
fermentId: fresh.id,
|
|
589
|
+
tag: "Tool refresh",
|
|
590
|
+
})
|
|
581
591
|
return toolOk(
|
|
582
|
-
|
|
583
|
-
`Parallel group ${target.groupIndex} activated (${groupPhases.length} phases running concurrently).\nferment_id: ${fresh.id}\nparallel_group: ${target.groupIndex}\nphase_ids: ${groupPhases.map((p) => p.id).join(", ")}\n\n${phaseLines}\n\nRun all parallel phases concurrently: call refine_ferment_phase + start_ferment_step for each phase simultaneously.${dmSection}`,
|
|
584
|
-
fresh,
|
|
585
|
-
),
|
|
592
|
+
`Parallel group ${target.groupIndex} activated (${groupPhases.length} phases running concurrently).\nferment_id: ${fresh.id}\nparallel_group: ${target.groupIndex}\nphase_ids: ${groupPhases.map((p) => p.id).join(", ")}\n\n${phaseLines}${dmSection}\n\nImplementation tools unlock on the next turn. Stop now; a queued follow-up will continue with the refreshed toolset.`,
|
|
586
593
|
)
|
|
587
594
|
}
|
|
588
595
|
|
|
@@ -612,11 +619,17 @@ export function registerPhaseTools(pi: ExtensionAPI, runtime: FermentRuntime = d
|
|
|
612
619
|
: "\nNo steps yet — call refine_ferment_phase to populate them."
|
|
613
620
|
const dm = formatDecisionsAndMemories(fresh)
|
|
614
621
|
const dmSection = dm ? `\n\n${dm}` : ""
|
|
622
|
+
|
|
623
|
+
// The active tool schema refreshes only after this model turn ends.
|
|
624
|
+
// Queue the real next action as a follow-up and tell the model not to
|
|
625
|
+
// attempt implementation-only tools inside the stale planning turn.
|
|
626
|
+
scheduleFermentWakeUp(pi, runtime, {
|
|
627
|
+
deliverAs: "followUp",
|
|
628
|
+
fermentId: fresh.id,
|
|
629
|
+
tag: "Tool refresh",
|
|
630
|
+
})
|
|
615
631
|
return toolOk(
|
|
616
|
-
|
|
617
|
-
`Phase "${target.name}" activated.\nferment_id: ${fresh.id}\nphase_id: ${target.id}${stepList}${dmSection}`,
|
|
618
|
-
fresh,
|
|
619
|
-
),
|
|
632
|
+
`Phase "${target.name}" activated.\nferment_id: ${fresh.id}\nphase_id: ${target.id}${stepList}${dmSection}\n\nImplementation tools unlock on the next turn. Stop now; a queued follow-up will continue with the refreshed toolset.`,
|
|
620
633
|
)
|
|
621
634
|
},
|
|
622
635
|
})
|