@narumitw/pi-goal 0.54.8 → 0.54.10

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.
@@ -3,7 +3,7 @@
3
3
  import {
4
4
  goalSummary,
5
5
  parseTokenBudget
6
- } from "./chunk-7FMBWODN.ts";
6
+ } from "./chunk-VPBPDJDM.ts";
7
7
  import {
8
8
  formatDuration,
9
9
  formatTokenCount,
@@ -547,4 +547,4 @@ export {
547
547
  safeGoalMenuText,
548
548
  showGoalManager
549
549
  };
550
- //# sourceMappingURL=menu-7W5HGHFO.ts.map
550
+ //# sourceMappingURL=menu-UUQNRFAG.ts.map
package/dist/index.ts CHANGED
@@ -43,7 +43,7 @@ import {
43
43
  stoppedStatusLabel,
44
44
  transitionGoal,
45
45
  validateObjective
46
- } from "./chunks/chunk-7FMBWODN.ts";
46
+ } from "./chunks/chunk-VPBPDJDM.ts";
47
47
  import {
48
48
  DEFAULT_GOAL_SETTINGS,
49
49
  currentTokenTotal,
@@ -63,7 +63,7 @@ import {
63
63
 
64
64
  // src/command-registration.ts
65
65
  function registerGoalCommand(pi, runtime, commands, options = {}) {
66
- const loadGoalManager = cachedModuleLoader(options.loadGoalManager ?? (() => import("./chunks/menu-7W5HGHFO.ts")));
66
+ const loadGoalManager = cachedModuleLoader(options.loadGoalManager ?? (() => import("./chunks/menu-UUQNRFAG.ts")));
67
67
  const loadGoalSettings = cachedModuleLoader(options.loadGoalSettings ?? (() => import("./chunks/settings-ui-T77VFPTK.ts")));
68
68
  pi.registerCommand("goal", {
69
69
  description: "Run a goal to completion: /goal [--tokens 100k] <goal_to_complete>",
@@ -713,6 +713,7 @@ function registerGoalLifecycle(pi, runtime, runController, options = {}) {
713
713
  if (!sessionActive) return;
714
714
  if (runtime.activeGoal?.status !== "active" || !runtime.ownsWorkflow(runtime.activeGoal)) {
715
715
  runtime.clearGoalRecovery();
716
+ runtime.ensureInactiveGoalContextContract(ctx);
716
717
  return;
717
718
  }
718
719
  const restoredState = loadGoalStateFromSession(ctx);