pi-better-harness 0.3.2 → 0.3.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.
@@ -121,7 +121,12 @@ function state(): NavigatorState {
121
121
  return g[GLOBAL_KEY]!;
122
122
  }
123
123
 
124
- type PlanNavigationState = { visible: boolean; releaseWorkFocus?: () => void };
124
+ type PlanNavigationState = {
125
+ visible: boolean;
126
+ progressLabel?: string;
127
+ releaseWorkFocus?: () => void;
128
+ refreshNavigationHint?: () => void;
129
+ };
125
130
 
126
131
  function planNavigationState(): PlanNavigationState {
127
132
  const global = globalThis as typeof globalThis & { [PLAN_NAVIGATION_KEY]?: PlanNavigationState };
@@ -129,6 +134,10 @@ function planNavigationState(): PlanNavigationState {
129
134
  return global[PLAN_NAVIGATION_KEY]!;
130
135
  }
131
136
 
137
+ function refreshPlanNavigationHint(): void {
138
+ refreshBackgroundWorkNavigator();
139
+ }
140
+
132
141
  export function registerBackgroundWorkProvider(provider: BackgroundWorkProvider): () => void {
133
142
  const s = state();
134
143
  const previousUnsub = s.unsubscribers.get(provider.id);
@@ -170,7 +179,12 @@ export function isNavigatorUiAvailable(ctx: ExtensionContext | undefined): boole
170
179
  }
171
180
 
172
181
  export function navigatorFooterHint(count: number): string | null {
173
- return count > 0 ? `← work · ${count}` : null;
182
+ const work = count > 0 ? `← work · ${count}` : null;
183
+ const navigation = planNavigationState();
184
+ const plan = navigation.visible
185
+ ? `→ plan${navigation.progressLabel ? ` · ${navigation.progressLabel}` : ""}`
186
+ : null;
187
+ return [work, plan].filter((hint): hint is string => hint !== null).join(" ") || null;
174
188
  }
175
189
 
176
190
  export function applyNavigatorFooter(ui: { setStatus(key: string, value: string | undefined): void }, count: number): string | null {
@@ -194,7 +208,10 @@ export function ensureBackgroundWorkNavigator(ctx: ExtensionContext, deps: HostD
194
208
  s.mainListRequestRender = undefined;
195
209
  s.mainListDeadlineScheduler?.dispose();
196
210
  s.mainListDeadlineScheduler = createRenderScheduler(() => refreshMainListWidget());
197
- planNavigationState().releaseWorkFocus = unfocusMainList;
211
+ const planNavigation = planNavigationState();
212
+ planNavigation.releaseWorkFocus = unfocusMainList;
213
+ planNavigation.refreshNavigationHint = refreshPlanNavigationHint;
214
+ try { (ctx.ui as any).setStatus?.("pi-better-plan-nav", undefined); } catch { /* ignore */ }
198
215
  installNavigatorEditor(ctx.ui as any, deps);
199
216
  s.lastHint = undefined;
200
217
  refreshBackgroundWorkNavigator(ctx);
@@ -223,7 +240,11 @@ export function disposeBackgroundWorkNavigator(ctx?: ExtensionContext): void {
223
240
  s.mainListRequestRender = undefined;
224
241
  s.editorComponent = undefined;
225
242
  s.detailOverlayRows = undefined;
226
- planNavigationState().releaseWorkFocus = undefined;
243
+ const planNavigation = planNavigationState();
244
+ planNavigation.releaseWorkFocus = undefined;
245
+ if (planNavigation.refreshNavigationHint === refreshPlanNavigationHint) {
246
+ planNavigation.refreshNavigationHint = undefined;
247
+ }
227
248
  s.mainListSelectedId = undefined;
228
249
  s.mainListFocused = false;
229
250
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-better-harness",
3
- "version": "0.3.2",
4
- "description": "Pi extension bundle for a write sandbox, subagents, background tasks, and goals.",
3
+ "version": "0.3.4",
4
+ "description": "Pi extension bundle for a write sandbox, subagents, background tasks, SSH, goals, and structured plans.",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "keywords": [
@@ -11,14 +11,19 @@
11
11
  "sandbox",
12
12
  "subagents",
13
13
  "background-tasks",
14
- "goal-tracking"
14
+ "ssh",
15
+ "remote-bash",
16
+ "goal-tracking",
17
+ "plan-tracking"
15
18
  ],
16
19
  "pi": {
17
20
  "extensions": [
18
21
  "extensions/sandbox/index.ts",
19
22
  "extensions/subagents/index.ts",
20
23
  "extensions/background-tasks/index.ts",
21
- "extensions/goal/index.ts"
24
+ "extensions/ssh/index.ts",
25
+ "extensions/goal/index.ts",
26
+ "extensions/plan/index.ts"
22
27
  ],
23
28
  "image": "https://raw.githubusercontent.com/1aboveio/pi-better-harness/main/docs/images/package-gallery/pi-better-harness.png"
24
29
  },
@@ -47,13 +52,17 @@
47
52
  "dependencies": {
48
53
  "pi-better-background-tasks": "0.2.10",
49
54
  "pi-better-goal": "0.2.1",
55
+ "pi-better-plan": "0.1.2",
50
56
  "pi-better-sandbox": "0.3.0",
57
+ "pi-better-ssh": "0.1.1",
51
58
  "pi-better-subagents": "0.1.25"
52
59
  },
53
60
  "bundledDependencies": [
54
61
  "pi-better-background-tasks",
55
62
  "pi-better-goal",
63
+ "pi-better-plan",
56
64
  "pi-better-sandbox",
65
+ "pi-better-ssh",
57
66
  "pi-better-subagents"
58
67
  ]
59
68
  }