cli-jaw 2.0.16 → 2.1.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.
Files changed (30) hide show
  1. package/README.md +8 -8
  2. package/dist/bin/cli-jaw.js +5 -1
  3. package/dist/bin/cli-jaw.js.map +1 -1
  4. package/dist/bin/commands/goal.js +146 -0
  5. package/dist/bin/commands/goal.js.map +1 -0
  6. package/dist/src/agent/lifecycle-handler.js +3 -3
  7. package/dist/src/agent/lifecycle-handler.js.map +1 -1
  8. package/dist/src/goal/heartbeat.js +2 -2
  9. package/dist/src/goal/heartbeat.js.map +1 -1
  10. package/dist/src/prompt/templates/a1-system.md +12 -0
  11. package/package.json +1 -1
  12. package/public/dist/assets/{BrowserPanel-weeCb2qu.js → BrowserPanel-C15ysPhL.js} +1 -1
  13. package/public/dist/assets/{TerminalPanel-AKKXu8dJ.js → TerminalPanel-DFmSkwGU.js} +1 -1
  14. package/public/dist/assets/manager-CfyZloIP.js +12 -0
  15. package/public/dist/assets/manager-DyrwJLZr.css +1 -0
  16. package/public/dist/manager/index.html +2 -2
  17. package/public/manager/src/App.tsx +43 -0
  18. package/public/manager/src/browser-panel/BrowserPanel.tsx +28 -0
  19. package/public/manager/src/components/WorkspaceLayout.tsx +3 -9
  20. package/public/manager/src/manager-layout.css +3 -3
  21. package/public/manager/src/manager-shortcuts.ts +31 -1
  22. package/public/manager/src/panels/PanelLayoutProvider.tsx +6 -1
  23. package/public/manager/src/panels/panel-shortcut-bus.ts +4 -2
  24. package/public/manager/src/panels/panels.css +0 -1
  25. package/public/manager/src/panels/types.ts +2 -2
  26. package/public/manager/src/terminal/TerminalPanel.tsx +16 -0
  27. package/public/manager/src/types.ts +16 -1
  28. package/scripts/release.sh +34 -13
  29. package/public/dist/assets/manager-CFxbpg7j.css +0 -1
  30. package/public/dist/assets/manager-wAHlX68t.js +0 -12
@@ -17,7 +17,7 @@
17
17
  overflow: hidden;
18
18
  }
19
19
  .manager-workspace.is-side-panel-open {
20
- --right-panel-width: 420px;
20
+ --right-panel-width: 50vw;
21
21
  }
22
22
  .manager-shell.is-sidebar-collapsed .manager-workspace,
23
23
  .manager-workspace.is-sidebar-collapsed { --sidebar-width: 56px; }
@@ -88,7 +88,7 @@
88
88
  --sidebar-width: 360px;
89
89
  }
90
90
  .dashboard-shell.manager-shell:not(.is-sidebar-collapsed) .manager-workspace.is-side-panel-open {
91
- --right-panel-width: 720px;
91
+ --right-panel-width: 50vw;
92
92
  }
93
93
  }
94
94
  @media (max-width: 1279px) and (min-width: 1024px) {
@@ -96,7 +96,7 @@
96
96
  --sidebar-width: 300px;
97
97
  }
98
98
  .dashboard-shell.manager-shell:not(.is-sidebar-collapsed) .manager-workspace.is-side-panel-open {
99
- --right-panel-width: 360px;
99
+ --right-panel-width: 50vw;
100
100
  }
101
101
  .command-primary { grid-template-columns: minmax(120px, 180px) max-content minmax(max-content, 1fr); }
102
102
  .command-search { width: clamp(260px, 38vw, 620px); }
@@ -11,6 +11,21 @@ export const MANAGER_SHORTCUT_ACTIONS: DashboardShortcutAction[] = [
11
11
  'focusTerminal',
12
12
  'openDiff',
13
13
  'openFolderTree',
14
+ 'closeFocusedTab',
15
+ 'switchTab1',
16
+ 'switchTab2',
17
+ 'switchTab3',
18
+ 'switchTab4',
19
+ 'previousTab',
20
+ 'nextTab',
21
+ 'browserReload',
22
+ 'browserHardReload',
23
+ 'browserFocusUrl',
24
+ 'browserBack',
25
+ 'browserForward',
26
+ 'terminalClear',
27
+ 'terminalNewTab',
28
+ 'toggleLeftSidebar',
14
29
  ];
15
30
 
16
31
  export const DEFAULT_MANAGER_SHORTCUT_KEYMAP: DashboardShortcutKeymap = {
@@ -24,10 +39,25 @@ export const DEFAULT_MANAGER_SHORTCUT_KEYMAP: DashboardShortcutKeymap = {
24
39
  focusTerminal: 'Ctrl+Shift+`',
25
40
  openDiff: 'Meta+Shift+D',
26
41
  openFolderTree: 'Meta+Shift+E',
42
+ closeFocusedTab: 'Meta+W',
43
+ switchTab1: 'Meta+1',
44
+ switchTab2: 'Meta+2',
45
+ switchTab3: 'Meta+3',
46
+ switchTab4: 'Meta+4',
47
+ previousTab: 'Meta+Shift+[',
48
+ nextTab: 'Meta+Shift+]',
49
+ browserReload: 'Meta+R',
50
+ browserHardReload: 'Meta+Shift+R',
51
+ browserFocusUrl: 'Meta+L',
52
+ browserBack: 'Meta+Left',
53
+ browserForward: 'Meta+Right',
54
+ terminalClear: 'Meta+K',
55
+ terminalNewTab: 'Meta+T',
56
+ toggleLeftSidebar: 'Meta+Shift+B',
27
57
  };
28
58
 
29
59
  const MANAGER_SHORTCUT_ALIASES: Partial<Record<DashboardShortcutAction, string[]>> = {
30
- toggleRightPanel: ['Meta+B', 'Meta+Shift+B'],
60
+ toggleRightPanel: ['Meta+B'],
31
61
  focusTerminal: ['Ctrl+Shift+`', 'Meta+`'],
32
62
  };
33
63
 
@@ -229,11 +229,16 @@ export function PanelLayoutProvider(props: {
229
229
  case 'openFolderTree':
230
230
  dispatch({ type: 'OPEN_RIGHT_PANEL', mode: 'folder' });
231
231
  return true;
232
+ case 'closeActiveBottomTab':
233
+ if (state.bottomPanel.activeTab) {
234
+ dispatch({ type: 'CLOSE_BOTTOM_TAB', tab: state.bottomPanel.activeTab });
235
+ }
236
+ return true;
232
237
  default:
233
238
  return false;
234
239
  }
235
240
  });
236
- }, [state.bottomPanel.open, state.rightPanel.open]);
241
+ }, [state.bottomPanel.open, state.bottomPanel.activeTab, state.rightPanel.open, state.rightPanel.topMode, state.rightPanel.bottomMode]);
237
242
 
238
243
  const value = useMemo(() => ({
239
244
  state, dispatch, effectiveRightOpen, rightPanelSplit,
@@ -1,6 +1,8 @@
1
1
  import type { DashboardShortcutAction } from '../types';
2
2
 
3
- type PanelShortcutHandler = (action: DashboardShortcutAction) => boolean;
3
+ export type PanelBusAction = DashboardShortcutAction | 'closeActiveBottomTab';
4
+
5
+ type PanelShortcutHandler = (action: PanelBusAction) => boolean;
4
6
 
5
7
  let handler: PanelShortcutHandler | null = null;
6
8
 
@@ -9,7 +11,7 @@ export const panelShortcutBus = {
9
11
  handler = fn;
10
12
  return () => { if (handler === fn) handler = null; };
11
13
  },
12
- dispatch(action: DashboardShortcutAction): boolean {
14
+ dispatch(action: PanelBusAction): boolean {
13
15
  return handler?.(action) ?? false;
14
16
  },
15
17
  };
@@ -30,7 +30,6 @@ body.is-resizing-vertical .panel-resizer { pointer-events: auto !important; }
30
30
  grid-area: right;
31
31
  min-width: 0;
32
32
  min-height: 0;
33
- max-width: min(1200px, 70vw);
34
33
  overflow: hidden;
35
34
  display: flex;
36
35
  flex-direction: row;
@@ -5,8 +5,8 @@ export const RIGHT_PANEL_MODES: RightPanelMode[] = ['folder', 'doc', 'diff', 'br
5
5
  export const BOTTOM_PANEL_TABS: BottomPanelTab[] = ['terminal', 'browser', 'logs', 'activity'];
6
6
 
7
7
  export const RIGHT_PANEL_MIN_WIDTH = 260;
8
- export const RIGHT_PANEL_MAX_WIDTH = 1200;
9
- export const RIGHT_PANEL_DEFAULT_WIDTH = 360;
8
+ export const RIGHT_PANEL_MAX_WIDTH = 9999;
9
+ export const RIGHT_PANEL_DEFAULT_WIDTH = 480;
10
10
 
11
11
  export const BOTTOM_PANEL_MIN_HEIGHT = 180;
12
12
  export const BOTTOM_PANEL_MAX_HEIGHT = 520;
@@ -274,6 +274,22 @@ export function TerminalPanel(props: TerminalPanelProps = {}) {
274
274
  }, 0);
275
275
  }, [activeId, fitTerminal]);
276
276
 
277
+ useEffect(() => {
278
+ function handleShortcutAction(e: Event) {
279
+ const detail = (e as CustomEvent).detail;
280
+ if (detail === 'closeTerminalTab' && activeIdRef.current) {
281
+ closeSession(activeIdRef.current);
282
+ } else if (detail === 'terminalClear' && activeIdRef.current) {
283
+ const runtime = runtimesRef.current.get(activeIdRef.current);
284
+ if (runtime) runtime.term.clear();
285
+ } else if (detail === 'terminalNewTab') {
286
+ void createSession();
287
+ }
288
+ }
289
+ document.addEventListener('jaw:shortcut-action', handleShortcutAction);
290
+ return () => document.removeEventListener('jaw:shortcut-action', handleShortcutAction);
291
+ }, [closeSession, createSession]);
292
+
277
293
  useEffect(() => {
278
294
  if (!panelRef.current || typeof ResizeObserver === 'undefined') return;
279
295
  const observer = new ResizeObserver(() => {
@@ -22,7 +22,22 @@ export type DashboardShortcutAction =
22
22
  | 'toggleRightPanel'
23
23
  | 'focusTerminal'
24
24
  | 'openDiff'
25
- | 'openFolderTree';
25
+ | 'openFolderTree'
26
+ | 'closeFocusedTab'
27
+ | 'switchTab1'
28
+ | 'switchTab2'
29
+ | 'switchTab3'
30
+ | 'switchTab4'
31
+ | 'previousTab'
32
+ | 'nextTab'
33
+ | 'browserReload'
34
+ | 'browserHardReload'
35
+ | 'browserFocusUrl'
36
+ | 'browserBack'
37
+ | 'browserForward'
38
+ | 'terminalClear'
39
+ | 'terminalNewTab'
40
+ | 'toggleLeftSidebar';
26
41
  export type DashboardShortcutKeymap = Record<DashboardShortcutAction, string>;
27
42
  export type DashboardDiffMode = 'unstaged' | 'staged' | 'head' | 'base';
28
43
  export type DashboardDiffRootPolicy = 'project-first' | 'working-dir-first' | 'manual';
@@ -161,11 +161,14 @@ git tag "v$VERSION"
161
161
  git push origin master
162
162
  git push origin "v$VERSION"
163
163
 
164
- # ─── npm publish ───────────────────────────────────────
165
- echo "🚀 Publishing to npm..."
166
- npm publish --access public
167
-
168
164
  # ─── GitHub Release with changelog ─────────────────────
165
+ # IMPORTANT: create the GitHub Release BEFORE npm publish.
166
+ # npm publish is the most failure-prone step (OTP, registry, prepublishOnly);
167
+ # with `set -e`, a publish failure used to abort the script before the release
168
+ # was ever created, leaving orphan tags with no GitHub Release (and no desktop
169
+ # build, since desktop-release.yml triggers on `release: published`).
170
+ # Creating the release first guarantees the release record + desktop trigger
171
+ # survive a later publish hiccup, which is then independently retryable.
169
172
  echo "📋 Creating GitHub Release..."
170
173
  RELEASE_BODY="## Release v$VERSION
171
174
 
@@ -177,18 +180,36 @@ $CHANGELOG
177
180
 
178
181
  $ELECTRON_RELEASE_NOTES"
179
182
 
180
- if [ -n "$PREV_TAG" ] && command -v gh &>/dev/null; then
181
- gh release create "v$VERSION" \
182
- --title "v$VERSION" \
183
- --notes "$RELEASE_BODY" \
184
- --latest
185
- echo "✅ GitHub Release v$VERSION created!"
186
- echo "🖥️ Desktop assets will be built by the Desktop Release GitHub Actions workflow."
183
+ RELEASE_CREATED=false
184
+ if command -v gh &>/dev/null; then
185
+ if gh release view "v$VERSION" &>/dev/null; then
186
+ echo "ℹ️ GitHub Release v$VERSION already exists — updating notes."
187
+ gh release edit "v$VERSION" --title "v$VERSION" --notes "$RELEASE_BODY" --latest \
188
+ && RELEASE_CREATED=true \
189
+ || echo "⚠️ Failed to update existing GitHub Release v$VERSION (continuing)."
190
+ elif gh release create "v$VERSION" --title "v$VERSION" --notes "$RELEASE_BODY" --latest; then
191
+ RELEASE_CREATED=true
192
+ echo "✅ GitHub Release v$VERSION created!"
193
+ echo "🖥️ Desktop assets will be built by the Desktop Release GitHub Actions workflow."
194
+ else
195
+ # Do NOT abort: the tag is already pushed and we still want to publish.
196
+ # Surface loudly so the release can be backfilled manually.
197
+ echo "❌ GitHub Release v$VERSION FAILED to create. Tag is pushed; backfill with:"
198
+ echo " gh release create v$VERSION --title v$VERSION --notes-file <(...) --latest"
199
+ fi
187
200
  else
188
- echo "⚠️ Skipped GitHub Release (gh CLI not found or no previous tag)"
201
+ echo "⚠️ Skipped GitHub Release (gh CLI not found)"
189
202
  fi
190
203
 
204
+ # ─── npm publish ───────────────────────────────────────
205
+ echo "🚀 Publishing to npm..."
206
+ npm publish --access public
207
+
191
208
  echo ""
192
209
  echo "✅ cli-jaw@$VERSION published!"
193
210
  echo " Install: npm install -g cli-jaw"
194
- echo " Release: https://github.com/lidge-jun/cli-jaw/releases/tag/v$VERSION"
211
+ if [ "$RELEASE_CREATED" = true ]; then
212
+ echo " Release: https://github.com/lidge-jun/cli-jaw/releases/tag/v$VERSION"
213
+ else
214
+ echo " ⚠️ GitHub Release for v$VERSION was NOT created — backfill it manually."
215
+ fi