@drisp/cli 0.5.24 → 0.5.28

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/dist/cli.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import "./chunk-HXBCZAP7.js";
3
3
  import {
4
4
  rotateGatewayToken
5
- } from "./chunk-7GEQJQMR.js";
5
+ } from "./chunk-MSPZOJMJ.js";
6
6
  import {
7
7
  CREDENTIAL_SOURCES_TRIED,
8
8
  EXEC_EXIT_CODE,
@@ -27,7 +27,6 @@ import {
27
27
  createRelayQuestionCallback,
28
28
  createRuntime,
29
29
  createSessionStore,
30
- createWsClientTransport,
31
30
  credentialHelperKey,
32
31
  cursorToVisualPosition,
33
32
  daemonStatePaths,
@@ -46,6 +45,7 @@ import {
46
45
  get,
47
46
  getAll,
48
47
  getGlyphs,
48
+ getLatestRunForSession,
49
49
  getMostRecentAthenaSession,
50
50
  getSessionMeta,
51
51
  hintGlyphs,
@@ -53,6 +53,7 @@ import {
53
53
  isCommandPrefix,
54
54
  isScopedPermissionsRequest,
55
55
  isSupportedGatewayUrl,
56
+ listAwaitingAttentionRuns,
56
57
  listHarnessAdapters,
57
58
  listHarnessCapabilities,
58
59
  listSessions,
@@ -61,6 +62,7 @@ import {
61
62
  makeSkippedProbe,
62
63
  mergeFeedItems,
63
64
  messageGlyphs,
65
+ parseFrontmatter,
64
66
  parseToolName,
65
67
  probeSkipReason,
66
68
  processRegistry,
@@ -74,6 +76,7 @@ import {
74
76
  renderInputLines,
75
77
  resolveClaudeBinary,
76
78
  resolveClaudeSettingsSurfacePaths,
79
+ resolveEffectiveCapabilities,
77
80
  resolveHarnessAdapter,
78
81
  resolveHookForwarderCommand,
79
82
  resolveRuntimeAuthOverlay,
@@ -95,13 +98,13 @@ import {
95
98
  visualPositionToOffset,
96
99
  wrapText,
97
100
  writeAttachmentMirror,
98
- writeGatewayClientConfig,
99
- wsClientOptionsForEndpoint
100
- } from "./chunk-QBMYQJFX.js";
101
+ writeGatewayClientConfig
102
+ } from "./chunk-4HWBXCVY.js";
101
103
  import {
102
104
  generateId as generateId2
103
- } from "./chunk-BTKQ67RE.js";
105
+ } from "./chunk-USK5VSQ7.js";
104
106
  import {
107
+ createWsClientTransport,
105
108
  dashboardClientConfigPath,
106
109
  disableTelemetry,
107
110
  initTelemetry,
@@ -120,8 +123,9 @@ import {
120
123
  trackSetupCompleted,
121
124
  trackTelemetryOptedOut,
122
125
  writeDashboardClientConfig,
123
- writeGatewayTrace
124
- } from "./chunk-YU2WMPRC.js";
126
+ writeGatewayTrace,
127
+ wsClientOptionsForEndpoint
128
+ } from "./chunk-VAFS446Y.js";
125
129
  import {
126
130
  McpOptionsStep,
127
131
  StepSelector,
@@ -158,20 +162,20 @@ import {
158
162
  useWorkflowSessionController,
159
163
  writeGlobalConfig,
160
164
  writeProjectConfig
161
- } from "./chunk-7UUPLAP4.js";
165
+ } from "./chunk-2QV7YSX6.js";
162
166
 
163
167
  // src/app/entry/cli.tsx
164
168
  import { render } from "ink";
165
169
  import meow from "meow";
166
- import fs9 from "fs";
170
+ import fs10 from "fs";
167
171
  import { createRequire as createRequire2 } from "module";
168
172
  import os7 from "os";
169
- import path9 from "path";
173
+ import path10 from "path";
170
174
  import { fileURLToPath as fileURLToPath3 } from "url";
171
175
 
172
176
  // src/app/shell/AppShell.tsx
173
177
  import process6 from "process";
174
- import React9, {
178
+ import React8, {
175
179
  Profiler,
176
180
  useState as useState18,
177
181
  useCallback as useCallback19,
@@ -179,7 +183,7 @@ import React9, {
179
183
  useEffect as useEffect14,
180
184
  useMemo as useMemo17
181
185
  } from "react";
182
- import { Box as Box19, Text as Text25, useApp, useInput as useInput17, useStdout as useStdout9 } from "ink";
186
+ import { Box as Box18, Text as Text24, useApp, useInput as useInput17, useStdout as useStdout9 } from "ink";
183
187
 
184
188
  // src/ui/components/PermissionDialog.tsx
185
189
  import { useCallback, useMemo } from "react";
@@ -2301,6 +2305,7 @@ function useHeaderMetrics(events) {
2301
2305
  return cachedRef.current;
2302
2306
  }
2303
2307
  let modelName = null;
2308
+ let effortLevel = null;
2304
2309
  let sessionStartTime = null;
2305
2310
  let toolCallCount = 0;
2306
2311
  let permissionsAllowed = 0;
@@ -2317,6 +2322,9 @@ function useHeaderMetrics(events) {
2317
2322
  modelName = event.data.model;
2318
2323
  }
2319
2324
  }
2325
+ if (typeof event.effort_level === "string") {
2326
+ effortLevel = event.effort_level;
2327
+ }
2320
2328
  if (event.kind === "agent.message" && typeof event.data.model === "string") {
2321
2329
  modelName = event.data.model;
2322
2330
  }
@@ -2369,6 +2377,7 @@ function useHeaderMetrics(events) {
2369
2377
  );
2370
2378
  const result = {
2371
2379
  modelName,
2380
+ effortLevel,
2372
2381
  toolCallCount,
2373
2382
  totalToolCallCount: toolCallCount + subagentToolTotal,
2374
2383
  subagentCount: subagentMap.size,
@@ -4437,6 +4446,8 @@ function getClipboardCommand() {
4437
4446
 
4438
4447
  // src/core/feed/defaultRender.ts
4439
4448
  var DEFAULT_RENDER = /* @__PURE__ */ new Set([
4449
+ "prompt.expansion",
4450
+ "tool.batch",
4440
4451
  "compact.post",
4441
4452
  "task.created",
4442
4453
  "cwd.changed",
@@ -4702,14 +4713,14 @@ function extractWebSearch(_input, response) {
4702
4713
  return { type: "text", content: extractTextContent(response), maxLines: 10 };
4703
4714
  }
4704
4715
  function extractNotebookEdit(input, _response) {
4705
- const path10 = typeof input["notebook_path"] === "string" ? input["notebook_path"] : "";
4716
+ const path11 = typeof input["notebook_path"] === "string" ? input["notebook_path"] : "";
4706
4717
  const mode = typeof input["edit_mode"] === "string" ? input["edit_mode"] : "replace";
4707
4718
  const source = typeof input["new_source"] === "string" ? input["new_source"] : "";
4708
- if (!source) return { type: "text", content: `${mode} cell in ${path10}` };
4719
+ if (!source) return { type: "text", content: `${mode} cell in ${path11}` };
4709
4720
  return {
4710
4721
  type: "code",
4711
4722
  content: source,
4712
- language: detectLanguage(path10),
4723
+ language: detectLanguage(path11),
4713
4724
  maxLines: 10
4714
4725
  };
4715
4726
  }
@@ -5233,10 +5244,10 @@ function extractToolSubject(toolName, toolInput) {
5233
5244
  const parts = [];
5234
5245
  const pattern = str(input, "pattern");
5235
5246
  const glob = str(input, "glob");
5236
- const path10 = str(input, "path");
5247
+ const path11 = str(input, "path");
5237
5248
  if (pattern) parts.push(`"${pattern}"`);
5238
5249
  if (glob) parts.push(glob);
5239
- if (path10) parts.push(`in ${path10}`);
5250
+ if (path11) parts.push(`in ${path11}`);
5240
5251
  return parts.length > 0 ? parts.join(" ") : void 0;
5241
5252
  }
5242
5253
  case "Skill":
@@ -5494,9 +5505,11 @@ function renderDetailLines(event, width, pairedPostEvent, theme = darkTheme) {
5494
5505
  case "setup":
5495
5506
  case "unknown.hook":
5496
5507
  case "todo.add":
5508
+ case "tool.batch":
5497
5509
  case "todo.update":
5498
5510
  case "todo.done":
5499
5511
  case "teammate.idle":
5512
+ case "prompt.expansion":
5500
5513
  case "task.created":
5501
5514
  case "task.completed":
5502
5515
  case "config.change":
@@ -6112,13 +6125,11 @@ function buildBodyLines({
6112
6125
  }
6113
6126
 
6114
6127
  // src/ui/components/FeedGrid.tsx
6115
- import React7 from "react";
6116
- import { Text as Text15 } from "ink";
6128
+ import React6 from "react";
6129
+ import { Text as Text14 } from "ink";
6117
6130
 
6118
6131
  // src/ui/components/FeedRow.tsx
6119
6132
  import { performance as performance2 } from "perf_hooks";
6120
- import React3 from "react";
6121
- import { Box as Box9, Text as Text12 } from "ink";
6122
6133
 
6123
6134
  // src/core/feed/cellFormatters.ts
6124
6135
  function isLifecycleOp(op) {
@@ -6332,7 +6343,6 @@ function formatDetails(opts) {
6332
6343
  }
6333
6344
 
6334
6345
  // src/ui/components/FeedRow.tsx
6335
- import { Fragment as Fragment4, jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
6336
6346
  var ROW_LINE_CACHE_MAX_VARIANTS = 16;
6337
6347
  var ROW_LINE_CACHE_MAX_ENTRIES = 2e3;
6338
6348
  var rowLineCache = /* @__PURE__ */ new Map();
@@ -6549,40 +6559,11 @@ function formatFeedRowLine({
6549
6559
  logVisibleRowFormat(performance2.now() - startedAt);
6550
6560
  }
6551
6561
  }
6552
- function FeedRowImpl({
6553
- entry,
6554
- cols,
6555
- focused,
6556
- expanded,
6557
- matched,
6558
- ascii,
6559
- theme
6560
- }) {
6561
- const parts = lineParts({
6562
- entry,
6563
- cols,
6564
- focused,
6565
- expanded,
6566
- matched,
6567
- ascii,
6568
- theme
6569
- });
6570
- return /* @__PURE__ */ jsxs10(Fragment4, { children: [
6571
- /* @__PURE__ */ jsx11(Box9, { width: 1, flexShrink: 0, children: /* @__PURE__ */ jsx11(Text12, { wrap: "truncate-end", children: parts.gutter }) }),
6572
- /* @__PURE__ */ jsx11(Box9, { width: 5, flexShrink: 0, children: /* @__PURE__ */ jsx11(Text12, { wrap: "truncate-end", children: parts.time }) }),
6573
- /* @__PURE__ */ jsx11(Box9, { width: cols.gapW, flexShrink: 0 }),
6574
- /* @__PURE__ */ jsx11(Box9, { width: cols.toolW, flexShrink: 0, children: /* @__PURE__ */ jsx11(Text12, { wrap: "truncate-end", children: parts.tool }) }),
6575
- /* @__PURE__ */ jsx11(Box9, { width: cols.gapW, flexShrink: 0 }),
6576
- /* @__PURE__ */ jsx11(Box9, { width: cols.detailsW, flexShrink: 0, children: /* @__PURE__ */ jsx11(Text12, { wrap: "truncate-end", children: parts.detail }) }),
6577
- /* @__PURE__ */ jsx11(Box9, { flexGrow: 1, flexShrink: 1 })
6578
- ] });
6579
- }
6580
- var FeedRow = React3.memo(FeedRowImpl);
6581
6562
 
6582
6563
  // src/ui/components/FeedHeader.tsx
6583
- import React4 from "react";
6584
- import { Box as Box10, Text as Text13 } from "ink";
6585
- import { Fragment as Fragment5, jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
6564
+ import React3 from "react";
6565
+ import { Box as Box9, Text as Text12 } from "ink";
6566
+ import { Fragment as Fragment4, jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
6586
6567
  function formatFeedHeaderLine(cols, theme, innerWidth) {
6587
6568
  const headerColor = theme.feed.headerLabel;
6588
6569
  const style = (s) => source_default.hex(headerColor)(s);
@@ -6597,17 +6578,17 @@ function formatFeedHeaderLine(cols, theme, innerWidth) {
6597
6578
  function FeedHeaderImpl({ cols, theme }) {
6598
6579
  const headerColor = theme.feed.headerLabel;
6599
6580
  const style = (s) => source_default.hex(headerColor)(s);
6600
- return /* @__PURE__ */ jsxs11(Fragment5, { children: [
6601
- /* @__PURE__ */ jsx12(Box10, { width: 1, flexShrink: 0, children: /* @__PURE__ */ jsx12(Text13, { children: " " }) }),
6602
- /* @__PURE__ */ jsx12(Box10, { width: 5, flexShrink: 0, children: /* @__PURE__ */ jsx12(Text13, { wrap: "truncate-end", children: style(fit("TIME", 5)) }) }),
6603
- /* @__PURE__ */ jsx12(Box10, { width: cols.gapW, flexShrink: 0 }),
6604
- /* @__PURE__ */ jsx12(Box10, { width: cols.toolW, flexShrink: 0, children: /* @__PURE__ */ jsx12(Text13, { wrap: "truncate-end", children: style(fit("ACTION", cols.toolW)) }) }),
6605
- /* @__PURE__ */ jsx12(Box10, { width: cols.gapW, flexShrink: 0 }),
6606
- /* @__PURE__ */ jsx12(Box10, { width: cols.detailsW, flexShrink: 0, children: /* @__PURE__ */ jsx12(Text13, { wrap: "truncate-end", children: style(fit("DETAILS", cols.detailsW)) }) }),
6607
- /* @__PURE__ */ jsx12(Box10, { flexGrow: 1, flexShrink: 1 })
6581
+ return /* @__PURE__ */ jsxs10(Fragment4, { children: [
6582
+ /* @__PURE__ */ jsx11(Box9, { width: 1, flexShrink: 0, children: /* @__PURE__ */ jsx11(Text12, { children: " " }) }),
6583
+ /* @__PURE__ */ jsx11(Box9, { width: 5, flexShrink: 0, children: /* @__PURE__ */ jsx11(Text12, { wrap: "truncate-end", children: style(fit("TIME", 5)) }) }),
6584
+ /* @__PURE__ */ jsx11(Box9, { width: cols.gapW, flexShrink: 0 }),
6585
+ /* @__PURE__ */ jsx11(Box9, { width: cols.toolW, flexShrink: 0, children: /* @__PURE__ */ jsx11(Text12, { wrap: "truncate-end", children: style(fit("ACTION", cols.toolW)) }) }),
6586
+ /* @__PURE__ */ jsx11(Box9, { width: cols.gapW, flexShrink: 0 }),
6587
+ /* @__PURE__ */ jsx11(Box9, { width: cols.detailsW, flexShrink: 0, children: /* @__PURE__ */ jsx11(Text12, { wrap: "truncate-end", children: style(fit("DETAILS", cols.detailsW)) }) }),
6588
+ /* @__PURE__ */ jsx11(Box9, { flexGrow: 1, flexShrink: 1 })
6608
6589
  ] });
6609
6590
  }
6610
- var FeedHeader = React4.memo(FeedHeaderImpl);
6591
+ var FeedHeader = React3.memo(FeedHeaderImpl);
6611
6592
 
6612
6593
  // src/ui/components/rowCache.ts
6613
6594
  var DEFAULT_MAX_SIZE = 100;
@@ -6874,11 +6855,11 @@ function buildFeedSurface(params) {
6874
6855
  }
6875
6856
 
6876
6857
  // src/ui/components/FeedSurface.tsx
6877
- import React6 from "react";
6878
- import { Text as Text14 } from "ink";
6858
+ import React5 from "react";
6859
+ import { Text as Text13 } from "ink";
6879
6860
 
6880
6861
  // src/ui/components/IncrementalFeedSurface.tsx
6881
- import React5 from "react";
6862
+ import React4 from "react";
6882
6863
 
6883
6864
  // src/ui/components/feedSurfaceDiff.ts
6884
6865
  function diffFeedSurface(prev, next) {
@@ -6941,19 +6922,19 @@ function IncrementalFeedSurfaceImpl({
6941
6922
  feedStartCol,
6942
6923
  stdout = process.stdout
6943
6924
  }) {
6944
- const prevLinesRef = React5.useRef([]);
6945
- const prevFeedStartRowRef = React5.useRef(feedStartRow);
6946
- const prevFeedStartColRef = React5.useRef(feedStartCol);
6947
- const prevLineWidthRef = React5.useRef(surface.lineWidth);
6948
- const feedStartRowRef = React5.useRef(feedStartRow);
6949
- const feedStartColRef = React5.useRef(feedStartCol);
6950
- const lineWidthRef = React5.useRef(surface.lineWidth);
6951
- const stdoutRef = React5.useRef(stdout);
6925
+ const prevLinesRef = React4.useRef([]);
6926
+ const prevFeedStartRowRef = React4.useRef(feedStartRow);
6927
+ const prevFeedStartColRef = React4.useRef(feedStartCol);
6928
+ const prevLineWidthRef = React4.useRef(surface.lineWidth);
6929
+ const feedStartRowRef = React4.useRef(feedStartRow);
6930
+ const feedStartColRef = React4.useRef(feedStartCol);
6931
+ const lineWidthRef = React4.useRef(surface.lineWidth);
6932
+ const stdoutRef = React4.useRef(stdout);
6952
6933
  feedStartRowRef.current = feedStartRow;
6953
6934
  feedStartColRef.current = feedStartCol;
6954
6935
  lineWidthRef.current = surface.lineWidth;
6955
6936
  stdoutRef.current = stdout;
6956
- React5.useEffect(() => {
6937
+ React4.useEffect(() => {
6957
6938
  const prevLines = prevLinesRef.current;
6958
6939
  const nextLines = surface.allLines;
6959
6940
  const prevStartRow = prevFeedStartRowRef.current;
@@ -7010,7 +6991,7 @@ function IncrementalFeedSurfaceImpl({
7010
6991
  linesCleared: result.linesCleared
7011
6992
  });
7012
6993
  }, [surface, feedStartRow, feedStartCol, stdout]);
7013
- React5.useEffect(() => {
6994
+ React4.useEffect(() => {
7014
6995
  return () => {
7015
6996
  if (prevLinesRef.current.length > 0) {
7016
6997
  paintFeedSurface(
@@ -7026,10 +7007,10 @@ function IncrementalFeedSurfaceImpl({
7026
7007
  }, []);
7027
7008
  return null;
7028
7009
  }
7029
- var IncrementalFeedSurface = React5.memo(IncrementalFeedSurfaceImpl);
7010
+ var IncrementalFeedSurface = React4.memo(IncrementalFeedSurfaceImpl);
7030
7011
 
7031
7012
  // src/ui/components/FeedSurface.tsx
7032
- import { jsx as jsx13 } from "react/jsx-runtime";
7013
+ import { jsx as jsx12 } from "react/jsx-runtime";
7033
7014
  var VALID_BACKENDS = /* @__PURE__ */ new Set([
7034
7015
  "ink-full",
7035
7016
  "incremental"
@@ -7051,7 +7032,7 @@ function FeedSurfaceImpl({
7051
7032
  }) {
7052
7033
  const backend = resolveFeedBackend(backendProp);
7053
7034
  if (backend === "incremental") {
7054
- return /* @__PURE__ */ jsx13(
7035
+ return /* @__PURE__ */ jsx12(
7055
7036
  IncrementalFeedSurface,
7056
7037
  {
7057
7038
  surface,
@@ -7061,15 +7042,15 @@ function FeedSurfaceImpl({
7061
7042
  }
7062
7043
  );
7063
7044
  }
7064
- return /* @__PURE__ */ jsx13(InkFullFeedSurface, { surface, backend });
7045
+ return /* @__PURE__ */ jsx12(InkFullFeedSurface, { surface, backend });
7065
7046
  }
7066
7047
  function InkFullFeedSurface({
7067
7048
  surface,
7068
7049
  backend
7069
7050
  }) {
7070
- const output = React6.useMemo(() => surface.allLines.join("\n"), [surface]);
7071
- const prevLinesRef = React6.useRef(0);
7072
- React6.useEffect(() => {
7051
+ const output = React5.useMemo(() => surface.allLines.join("\n"), [surface]);
7052
+ const prevLinesRef = React5.useRef(0);
7053
+ React5.useEffect(() => {
7073
7054
  const linesRendered = surface.allLines.length;
7074
7055
  const prevLines = prevLinesRef.current;
7075
7056
  prevLinesRef.current = linesRendered;
@@ -7083,12 +7064,12 @@ function InkFullFeedSurface({
7083
7064
  linesCleared
7084
7065
  });
7085
7066
  }, [surface, backend]);
7086
- return /* @__PURE__ */ jsx13(Text14, { children: output });
7067
+ return /* @__PURE__ */ jsx12(Text13, { children: output });
7087
7068
  }
7088
- var FeedSurfaceView = React6.memo(FeedSurfaceImpl);
7069
+ var FeedSurfaceView = React5.memo(FeedSurfaceImpl);
7089
7070
 
7090
7071
  // src/ui/components/FeedGrid.tsx
7091
- import { Fragment as Fragment6, jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
7072
+ import { Fragment as Fragment5, jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
7092
7073
  function FeedGridImpl({
7093
7074
  feedHeaderRows,
7094
7075
  feedContentRows,
@@ -7108,16 +7089,16 @@ function FeedGridImpl({
7108
7089
  }) {
7109
7090
  const backend = resolveFeedBackend(backendProp);
7110
7091
  const isIncremental = backend === "incremental";
7111
- const rowCacheRef = React7.useRef(new RowCache());
7112
- const prevGlobalsRef = React7.useRef({ innerWidth, ascii, theme, cols });
7113
- React7.useEffect(() => {
7092
+ const rowCacheRef = React6.useRef(new RowCache());
7093
+ const prevGlobalsRef = React6.useRef({ innerWidth, ascii, theme, cols });
7094
+ React6.useEffect(() => {
7114
7095
  const prev = prevGlobalsRef.current;
7115
7096
  if (prev.innerWidth !== innerWidth || prev.ascii !== ascii || prev.theme !== theme || prev.cols !== cols) {
7116
7097
  rowCacheRef.current.bumpGeneration();
7117
7098
  prevGlobalsRef.current = { innerWidth, ascii, theme, cols };
7118
7099
  }
7119
7100
  }, [innerWidth, ascii, theme, cols]);
7120
- const surface = React7.useMemo(
7101
+ const surface = React6.useMemo(
7121
7102
  () => buildFeedSurface({
7122
7103
  feedHeaderRows,
7123
7104
  feedContentRows,
@@ -7149,7 +7130,7 @@ function FeedGridImpl({
7149
7130
  ]
7150
7131
  );
7151
7132
  const { visibleContentRows } = surface;
7152
- const visibleRowSignatures = React7.useMemo(() => {
7133
+ const visibleRowSignatures = React6.useMemo(() => {
7153
7134
  const signatures = [];
7154
7135
  if (visibleContentRows <= 0) return signatures;
7155
7136
  for (let offset = 0; offset < visibleContentRows; offset++) {
@@ -7178,8 +7159,8 @@ function FeedGridImpl({
7178
7159
  feedCursor,
7179
7160
  searchMatchSet
7180
7161
  ]);
7181
- const prevViewportRef = React7.useRef(null);
7182
- React7.useEffect(() => {
7162
+ const prevViewportRef = React6.useRef(null);
7163
+ React6.useEffect(() => {
7183
7164
  const previous = prevViewportRef.current;
7184
7165
  const current = {
7185
7166
  signatures: visibleRowSignatures,
@@ -7223,9 +7204,9 @@ function FeedGridImpl({
7223
7204
  if (isIncremental) {
7224
7205
  const totalFeedRows = feedHeaderRows + feedContentRows;
7225
7206
  const placeholderLines = "\n".repeat(Math.max(0, totalFeedRows - 1));
7226
- return /* @__PURE__ */ jsxs12(Fragment6, { children: [
7227
- /* @__PURE__ */ jsx14(Text15, { children: placeholderLines }),
7228
- /* @__PURE__ */ jsx14(
7207
+ return /* @__PURE__ */ jsxs11(Fragment5, { children: [
7208
+ /* @__PURE__ */ jsx13(Text14, { children: placeholderLines }),
7209
+ /* @__PURE__ */ jsx13(
7229
7210
  FeedSurfaceView,
7230
7211
  {
7231
7212
  surface,
@@ -7236,7 +7217,7 @@ function FeedGridImpl({
7236
7217
  )
7237
7218
  ] });
7238
7219
  }
7239
- return /* @__PURE__ */ jsx14(
7220
+ return /* @__PURE__ */ jsx13(
7240
7221
  FeedSurfaceView,
7241
7222
  {
7242
7223
  surface,
@@ -7245,11 +7226,11 @@ function FeedGridImpl({
7245
7226
  }
7246
7227
  );
7247
7228
  }
7248
- var FeedGrid = React7.memo(FeedGridImpl);
7229
+ var FeedGrid = React6.memo(FeedGridImpl);
7249
7230
 
7250
7231
  // src/ui/components/MessagePanel.tsx
7251
- import React8, { useMemo as useMemo11 } from "react";
7252
- import { Text as Text16 } from "ink";
7232
+ import React7, { useMemo as useMemo11 } from "react";
7233
+ import { Text as Text15 } from "ink";
7253
7234
 
7254
7235
  // src/core/feed/panelFilter.ts
7255
7236
  var USER_TAGS = /* @__PURE__ */ new Set(["msg.user", "prompt"]);
@@ -7297,7 +7278,7 @@ function messageText(entry) {
7297
7278
  }
7298
7279
 
7299
7280
  // src/ui/components/MessagePanel.tsx
7300
- import { jsx as jsx15 } from "react/jsx-runtime";
7281
+ import { jsx as jsx14 } from "react/jsx-runtime";
7301
7282
  var INDICATOR_OVERHEAD = 2;
7302
7283
  function buildRenderedLines(entries, width, theme) {
7303
7284
  const contentWidth2 = width - INDICATOR_OVERHEAD;
@@ -7432,9 +7413,9 @@ function MessagePanelImpl(props) {
7432
7413
  ),
7433
7414
  [wrapped, contentRows, viewportStart, style, width, messageCursorIndex]
7434
7415
  );
7435
- return /* @__PURE__ */ jsx15(Text16, { children: lines.join("\n") });
7416
+ return /* @__PURE__ */ jsx14(Text15, { children: lines.join("\n") });
7436
7417
  }
7437
- var MessagePanel = React8.memo(MessagePanelImpl);
7418
+ var MessagePanel = React7.memo(MessagePanelImpl);
7438
7419
 
7439
7420
  // src/ui/hooks/useFeedColumns.ts
7440
7421
  import { useMemo as useMemo12, useRef as useRef12 } from "react";
@@ -7646,6 +7627,7 @@ function buildHeaderModel(input) {
7646
7627
  workflow: workflowRef ?? "default",
7647
7628
  harness: detectHarness(input.harness),
7648
7629
  model_name: input.modelName ?? null,
7630
+ effort_level: input.effortLevel ?? null,
7649
7631
  context: { used: input.contextUsed ?? null, max: input.contextMax ?? null },
7650
7632
  total_tokens: input.totalTokens ?? null,
7651
7633
  token_label: codexHarness ? "Billable" : "Tokens",
@@ -7854,7 +7836,8 @@ function renderHeaderLines(model, width, hasColor, theme) {
7854
7836
  const sidText = `${sidLabel}${sidValue}${style(sidScope, palette.label)}`;
7855
7837
  const wfText = `${style("Workflow: ", palette.label)}${style(model.workflow, palette.value)}`;
7856
7838
  const harnessText = `${style("Harness: ", palette.label)}${style(model.harness, palette.value)}`;
7857
- const modelText = `${style("Model: ", palette.label)}${style(formatModelName(model.model_name), palette.value)}`;
7839
+ const effortSuffix = model.effort_level ? style(` with ${model.effort_level} effort`, palette.label) : "";
7840
+ const modelText = `${style("Model: ", palette.label)}${style(formatModelName(model.model_name), palette.value)}${effortSuffix}`;
7858
7841
  const tokenLabel = model.token_label ?? "Tokens";
7859
7842
  const runLabel = model.run_label ?? "Runs";
7860
7843
  const leftTokens = [
@@ -7982,8 +7965,8 @@ function executeCommand(command, args, ctx) {
7982
7965
 
7983
7966
  // src/ui/components/SessionPicker.tsx
7984
7967
  import { useState as useState11 } from "react";
7985
- import { Box as Box11, Text as Text17, useInput as useInput12, useStdout as useStdout5 } from "ink";
7986
- import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
7968
+ import { Box as Box10, Text as Text16, useInput as useInput12, useStdout as useStdout5 } from "ink";
7969
+ import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
7987
7970
  var PICKER_CHROME_ROWS = 5;
7988
7971
  var ROWS_PER_SESSION = 3;
7989
7972
  function resolveVisibleCount(terminalRows) {
@@ -8025,13 +8008,13 @@ function SessionPicker({
8025
8008
  }
8026
8009
  });
8027
8010
  if (loading) {
8028
- return /* @__PURE__ */ jsxs13(Box11, { flexDirection: "column", padding: 1, children: [
8029
- /* @__PURE__ */ jsx16(Box11, { marginBottom: 1, children: /* @__PURE__ */ jsx16(Text17, { bold: true, color: theme.accent, children: "Sessions" }) }),
8030
- /* @__PURE__ */ jsx16(Text17, { dimColor: true, children: "Loading sessions\u2026" })
8011
+ return /* @__PURE__ */ jsxs12(Box10, { flexDirection: "column", padding: 1, children: [
8012
+ /* @__PURE__ */ jsx15(Box10, { marginBottom: 1, children: /* @__PURE__ */ jsx15(Text16, { bold: true, color: theme.accent, children: "Sessions" }) }),
8013
+ /* @__PURE__ */ jsx15(Text16, { dimColor: true, children: "Loading sessions\u2026" })
8031
8014
  ] });
8032
8015
  }
8033
8016
  if (sessions.length === 0) {
8034
- return /* @__PURE__ */ jsx16(Box11, { flexDirection: "column", padding: 1, children: /* @__PURE__ */ jsx16(Text17, { dimColor: true, children: "No previous sessions found." }) });
8017
+ return /* @__PURE__ */ jsx15(Box10, { flexDirection: "column", padding: 1, children: /* @__PURE__ */ jsx15(Text16, { dimColor: true, children: "No previous sessions found." }) });
8035
8018
  }
8036
8019
  const scrollStart = Math.max(
8037
8020
  0,
@@ -8041,8 +8024,8 @@ function SessionPicker({
8041
8024
  )
8042
8025
  );
8043
8026
  const visible = sessions.slice(scrollStart, scrollStart + visibleCount);
8044
- return /* @__PURE__ */ jsxs13(Box11, { flexDirection: "column", padding: 1, children: [
8045
- /* @__PURE__ */ jsx16(Box11, { marginBottom: 1, children: /* @__PURE__ */ jsx16(Text17, { bold: true, color: theme.accent, children: "Sessions" }) }),
8027
+ return /* @__PURE__ */ jsxs12(Box10, { flexDirection: "column", padding: 1, children: [
8028
+ /* @__PURE__ */ jsx15(Box10, { marginBottom: 1, children: /* @__PURE__ */ jsx15(Text16, { bold: true, color: theme.accent, children: "Sessions" }) }),
8046
8029
  visible.map((session, vi) => {
8047
8030
  const realIndex = scrollStart + vi;
8048
8031
  const isFocused = realIndex === focusIndex;
@@ -8054,23 +8037,23 @@ function SessionPicker({
8054
8037
  const meta = `${shortId}${branch} \xB7 ${time}${msgs}`;
8055
8038
  const titleRaw = session.summary || session.firstPrompt || `Session ${shortId}`;
8056
8039
  const title = compactText(titleRaw.replace(/\n/g, " ").trim(), 60);
8057
- return /* @__PURE__ */ jsxs13(
8058
- Box11,
8040
+ return /* @__PURE__ */ jsxs12(
8041
+ Box10,
8059
8042
  {
8060
8043
  flexDirection: "column",
8061
8044
  marginBottom: vi === visible.length - 1 ? 0 : 1,
8062
8045
  children: [
8063
- /* @__PURE__ */ jsx16(Box11, { children: /* @__PURE__ */ jsxs13(Text17, { color: isFocused ? "cyan" : void 0, bold: isFocused, children: [
8046
+ /* @__PURE__ */ jsx15(Box10, { children: /* @__PURE__ */ jsxs12(Text16, { color: isFocused ? "cyan" : void 0, bold: isFocused, children: [
8064
8047
  isFocused ? "\u276F " : " ",
8065
8048
  title
8066
8049
  ] }) }),
8067
- /* @__PURE__ */ jsx16(Box11, { paddingLeft: 2, children: /* @__PURE__ */ jsx16(Text17, { dimColor: true, children: meta }) })
8050
+ /* @__PURE__ */ jsx15(Box10, { paddingLeft: 2, children: /* @__PURE__ */ jsx15(Text16, { dimColor: true, children: meta }) })
8068
8051
  ]
8069
8052
  },
8070
8053
  session.sessionId
8071
8054
  );
8072
8055
  }),
8073
- /* @__PURE__ */ jsx16(Box11, { marginTop: 1, children: /* @__PURE__ */ jsx16(Text17, { dimColor: true, children: "\u2191/\u2193 Navigate \xB7 Enter Select \xB7 Esc Cancel" }) })
8056
+ /* @__PURE__ */ jsx15(Box10, { marginTop: 1, children: /* @__PURE__ */ jsx15(Text16, { dimColor: true, children: "\u2191/\u2193 Navigate \xB7 Enter Select \xB7 Esc Cancel" }) })
8074
8057
  ] });
8075
8058
  }
8076
8059
 
@@ -8091,7 +8074,7 @@ function renderYankLines(entry, width, theme) {
8091
8074
 
8092
8075
  // src/setup/SetupWizard.tsx
8093
8076
  import { useState as useState14, useCallback as useCallback15, useEffect as useEffect10, useRef as useRef13 } from "react";
8094
- import { Box as Box16, Text as Text22, useInput as useInput13 } from "ink";
8077
+ import { Box as Box15, Text as Text21, useInput as useInput13 } from "ink";
8095
8078
 
8096
8079
  // src/setup/useSetupState.ts
8097
8080
  import { useState as useState12, useCallback as useCallback13 } from "react";
@@ -8125,14 +8108,14 @@ function useSetupState() {
8125
8108
  }
8126
8109
 
8127
8110
  // src/setup/steps/ThemeStep.tsx
8128
- import { Box as Box12, Text as Text18 } from "ink";
8129
- import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
8111
+ import { Box as Box11, Text as Text17 } from "ink";
8112
+ import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
8130
8113
  function ThemeStep({ onComplete, onPreview }) {
8131
8114
  const theme = useTheme();
8132
- return /* @__PURE__ */ jsxs14(Box12, { flexDirection: "column", children: [
8133
- /* @__PURE__ */ jsx17(Text18, { bold: true, color: theme.accent, children: "Choose your display theme" }),
8134
- /* @__PURE__ */ jsx17(Text18, { color: theme.textMuted, children: "This applies immediately after setup completes." }),
8135
- /* @__PURE__ */ jsx17(Box12, { marginTop: 1, children: /* @__PURE__ */ jsx17(
8115
+ return /* @__PURE__ */ jsxs13(Box11, { flexDirection: "column", children: [
8116
+ /* @__PURE__ */ jsx16(Text17, { bold: true, color: theme.accent, children: "Choose your display theme" }),
8117
+ /* @__PURE__ */ jsx16(Text17, { color: theme.textMuted, children: "This applies immediately after setup completes." }),
8118
+ /* @__PURE__ */ jsx16(Box11, { marginTop: 1, children: /* @__PURE__ */ jsx16(
8136
8119
  StepSelector,
8137
8120
  {
8138
8121
  options: [
@@ -8162,8 +8145,8 @@ function ThemeStep({ onComplete, onPreview }) {
8162
8145
 
8163
8146
  // src/setup/steps/HarnessStep.tsx
8164
8147
  import { useState as useState13, useCallback as useCallback14 } from "react";
8165
- import { Box as Box13, Text as Text19 } from "ink";
8166
- import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
8148
+ import { Box as Box12, Text as Text18 } from "ink";
8149
+ import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
8167
8150
  function HarnessStep({ onComplete, onError }) {
8168
8151
  const theme = useTheme();
8169
8152
  const capabilities = listHarnessCapabilities();
@@ -8174,7 +8157,7 @@ function HarnessStep({ onComplete, onError }) {
8174
8157
  (check) => {
8175
8158
  const glyph = check.status === "pass" ? "\u2713" : check.status === "fail" ? "\u2717" : "!";
8176
8159
  const color = check.status === "pass" ? theme.status.success : check.status === "fail" ? theme.status.error : theme.status.warning;
8177
- return /* @__PURE__ */ jsx18(Text19, { color, children: `${glyph} ${check.label}: ${check.message}` }, check.label);
8160
+ return /* @__PURE__ */ jsx17(Text18, { color, children: `${glyph} ${check.label}: ${check.message}` }, check.label);
8178
8161
  },
8179
8162
  [theme.status.error, theme.status.success, theme.status.warning]
8180
8163
  );
@@ -8206,10 +8189,10 @@ function HarnessStep({ onComplete, onError }) {
8206
8189
  },
8207
8190
  [capabilities, onComplete, onError]
8208
8191
  );
8209
- return /* @__PURE__ */ jsxs15(Box13, { flexDirection: "column", children: [
8210
- /* @__PURE__ */ jsx18(Text19, { bold: true, color: theme.accent, children: "Select harness" }),
8211
- /* @__PURE__ */ jsx18(Text19, { color: theme.textMuted, children: "Choose your coding harness. You can skip this step with S." }),
8212
- status === "selecting" && /* @__PURE__ */ jsx18(Box13, { marginTop: 1, children: /* @__PURE__ */ jsx18(
8192
+ return /* @__PURE__ */ jsxs14(Box12, { flexDirection: "column", children: [
8193
+ /* @__PURE__ */ jsx17(Text18, { bold: true, color: theme.accent, children: "Select harness" }),
8194
+ /* @__PURE__ */ jsx17(Text18, { color: theme.textMuted, children: "Choose your coding harness. You can skip this step with S." }),
8195
+ status === "selecting" && /* @__PURE__ */ jsx17(Box12, { marginTop: 1, children: /* @__PURE__ */ jsx17(
8213
8196
  StepSelector,
8214
8197
  {
8215
8198
  options: capabilities.map((capability, index) => ({
@@ -8221,22 +8204,22 @@ function HarnessStep({ onComplete, onError }) {
8221
8204
  onSelect: (value) => handleSelect(value)
8222
8205
  }
8223
8206
  ) }),
8224
- (status === "verifying" || status === "success" || status === "error") && /* @__PURE__ */ jsxs15(Box13, { flexDirection: "column", marginTop: 1, children: [
8225
- /* @__PURE__ */ jsx18(
8207
+ (status === "verifying" || status === "success" || status === "error") && /* @__PURE__ */ jsxs14(Box12, { flexDirection: "column", marginTop: 1, children: [
8208
+ /* @__PURE__ */ jsx17(
8226
8209
  StepStatus,
8227
8210
  {
8228
8211
  status,
8229
8212
  message: message || "Verifying harness..."
8230
8213
  }
8231
8214
  ),
8232
- checks.length > 0 && /* @__PURE__ */ jsx18(Box13, { flexDirection: "column", marginTop: 1, children: checks.map(renderCheckLine) })
8215
+ checks.length > 0 && /* @__PURE__ */ jsx17(Box12, { flexDirection: "column", marginTop: 1, children: checks.map(renderCheckLine) })
8233
8216
  ] })
8234
8217
  ] });
8235
8218
  }
8236
8219
 
8237
8220
  // src/setup/components/WizardFrame.tsx
8238
- import { Box as Box14, Text as Text20, useStdout as useStdout6 } from "ink";
8239
- import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
8221
+ import { Box as Box13, Text as Text19, useStdout as useStdout6 } from "ink";
8222
+ import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
8240
8223
  var MAX_WIDTH = 60;
8241
8224
  function WizardFrame({ title, header, footer, children }) {
8242
8225
  const theme = useTheme();
@@ -8250,25 +8233,25 @@ function WizardFrame({ title, header, footer, children }) {
8250
8233
  const topLine = `${g["frame.topLeft"]}${h.repeat(3)}${titlePadded}${h.repeat(topFillCount)}${g["frame.topRight"]}`;
8251
8234
  const teeLine = `${g["frame.teeLeft"]}${h.repeat(frameWidth - 2)}${g["frame.teeRight"]}`;
8252
8235
  const bottomLine = `${g["frame.bottomLeft"]}${h.repeat(frameWidth - 2)}${g["frame.bottomRight"]}`;
8253
- return /* @__PURE__ */ jsxs16(Box14, { flexDirection: "column", paddingX: 1, children: [
8254
- /* @__PURE__ */ jsx19(Text20, { color: theme.accent, children: topLine }),
8255
- /* @__PURE__ */ jsx19(Box14, { flexDirection: "column", paddingX: 1, paddingY: 1, children: header }),
8256
- /* @__PURE__ */ jsx19(Text20, { color: theme.accent, children: teeLine }),
8257
- /* @__PURE__ */ jsx19(Box14, { flexDirection: "column", paddingX: 1, paddingY: 1, children }),
8258
- /* @__PURE__ */ jsx19(Text20, { color: theme.accent, children: teeLine }),
8259
- /* @__PURE__ */ jsx19(Box14, { paddingX: 1, children: footer }),
8260
- /* @__PURE__ */ jsx19(Text20, { color: theme.accent, children: bottomLine })
8236
+ return /* @__PURE__ */ jsxs15(Box13, { flexDirection: "column", paddingX: 1, children: [
8237
+ /* @__PURE__ */ jsx18(Text19, { color: theme.accent, children: topLine }),
8238
+ /* @__PURE__ */ jsx18(Box13, { flexDirection: "column", paddingX: 1, paddingY: 1, children: header }),
8239
+ /* @__PURE__ */ jsx18(Text19, { color: theme.accent, children: teeLine }),
8240
+ /* @__PURE__ */ jsx18(Box13, { flexDirection: "column", paddingX: 1, paddingY: 1, children }),
8241
+ /* @__PURE__ */ jsx18(Text19, { color: theme.accent, children: teeLine }),
8242
+ /* @__PURE__ */ jsx18(Box13, { paddingX: 1, children: footer }),
8243
+ /* @__PURE__ */ jsx18(Text19, { color: theme.accent, children: bottomLine })
8261
8244
  ] });
8262
8245
  }
8263
8246
 
8264
8247
  // src/setup/components/WizardHints.tsx
8265
- import { Box as Box15, Text as Text21 } from "ink";
8266
- import { jsx as jsx20 } from "react/jsx-runtime";
8248
+ import { Box as Box14, Text as Text20 } from "ink";
8249
+ import { jsx as jsx19 } from "react/jsx-runtime";
8267
8250
  function WizardHints({ stepState, stepIndex }) {
8268
8251
  const theme = useTheme();
8269
8252
  const g = getGlyphs();
8270
8253
  if (stepState === "verifying" || stepState === "success") {
8271
- return /* @__PURE__ */ jsx20(Box15, {});
8254
+ return /* @__PURE__ */ jsx19(Box14, {});
8272
8255
  }
8273
8256
  const hints = [];
8274
8257
  if (stepState === "error") {
@@ -8280,7 +8263,7 @@ function WizardHints({ stepState, stepIndex }) {
8280
8263
  if (stepIndex > 0) hints.push(`${g["hint.escape"]} back`);
8281
8264
  hints.push("s skip");
8282
8265
  }
8283
- return /* @__PURE__ */ jsx20(Box15, { children: /* @__PURE__ */ jsx20(Text21, { color: theme.textMuted, children: hints.join(" ") }) });
8266
+ return /* @__PURE__ */ jsx19(Box14, { children: /* @__PURE__ */ jsx19(Text20, { color: theme.textMuted, children: hints.join(" ") }) });
8284
8267
  }
8285
8268
 
8286
8269
  // src/infra/telemetry/identity.ts
@@ -8290,7 +8273,7 @@ function generateDeviceId() {
8290
8273
  }
8291
8274
 
8292
8275
  // src/setup/SetupWizard.tsx
8293
- import { Fragment as Fragment7, jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
8276
+ import { Fragment as Fragment6, jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
8294
8277
  var STEP_SUMMARIES = [
8295
8278
  { label: "Theme", summarize: (r) => r.theme },
8296
8279
  { label: "Harness", summarize: (r) => r.harness ?? "skipped" }
@@ -8411,12 +8394,12 @@ function SetupWizard({ onComplete, onThemePreview }) {
8411
8394
  }
8412
8395
  }
8413
8396
  }, [isComplete, result, onComplete, writeRetryCount]);
8414
- return /* @__PURE__ */ jsxs17(
8397
+ return /* @__PURE__ */ jsxs16(
8415
8398
  WizardFrame,
8416
8399
  {
8417
8400
  title: "ATHENA SETUP",
8418
- header: /* @__PURE__ */ jsx21(Text22, { color: theme.textMuted, children: "Configure your defaults in under a minute." }),
8419
- footer: /* @__PURE__ */ jsx21(
8401
+ header: /* @__PURE__ */ jsx20(Text21, { color: theme.textMuted, children: "Configure your defaults in under a minute." }),
8402
+ footer: /* @__PURE__ */ jsx20(
8420
8403
  WizardHints,
8421
8404
  {
8422
8405
  stepState: isComplete ? writeError ? "error" : "verifying" : stepState,
@@ -8427,21 +8410,21 @@ function SetupWizard({ onComplete, onThemePreview }) {
8427
8410
  STEP_SUMMARIES.slice(
8428
8411
  0,
8429
8412
  isComplete ? STEP_SUMMARIES.length : stepIndex
8430
- ).map((step, i) => /* @__PURE__ */ jsxs17(Text22, { color: theme.status.success, children: [
8413
+ ).map((step, i) => /* @__PURE__ */ jsxs16(Text21, { color: theme.status.success, children: [
8431
8414
  getGlyphs()["todo.done"],
8432
8415
  " ",
8433
8416
  step.label,
8434
8417
  " \xB7 ",
8435
8418
  step.summarize(result)
8436
8419
  ] }, i)),
8437
- stepIndex === 0 && !isComplete && /* @__PURE__ */ jsx21(
8420
+ stepIndex === 0 && !isComplete && /* @__PURE__ */ jsx20(
8438
8421
  ThemeStep,
8439
8422
  {
8440
8423
  onComplete: handleThemeComplete,
8441
8424
  onPreview: handleThemePreview
8442
8425
  }
8443
8426
  ),
8444
- stepIndex === 1 && !isComplete && /* @__PURE__ */ jsx21(Box16, { marginTop: 1, children: /* @__PURE__ */ jsx21(
8427
+ stepIndex === 1 && !isComplete && /* @__PURE__ */ jsx20(Box15, { marginTop: 1, children: /* @__PURE__ */ jsx20(
8445
8428
  HarnessStep,
8446
8429
  {
8447
8430
  onComplete: handleHarnessComplete,
@@ -8449,11 +8432,11 @@ function SetupWizard({ onComplete, onThemePreview }) {
8449
8432
  },
8450
8433
  retryCount
8451
8434
  ) }),
8452
- stepState === "error" && !isComplete && /* @__PURE__ */ jsx21(Text22, { color: theme.status.error, children: "Press r to retry this step." }),
8453
- isComplete && !writeError && /* @__PURE__ */ jsx21(StepStatus, { status: "verifying", message: "Saving setup..." }),
8454
- isComplete && writeError && /* @__PURE__ */ jsxs17(Fragment7, { children: [
8455
- /* @__PURE__ */ jsx21(StepStatus, { status: "error", message: writeError }),
8456
- /* @__PURE__ */ jsx21(Text22, { color: theme.textMuted, children: "Press r to retry saving." })
8435
+ stepState === "error" && !isComplete && /* @__PURE__ */ jsx20(Text21, { color: theme.status.error, children: "Press r to retry this step." }),
8436
+ isComplete && !writeError && /* @__PURE__ */ jsx20(StepStatus, { status: "verifying", message: "Saving setup..." }),
8437
+ isComplete && writeError && /* @__PURE__ */ jsxs16(Fragment6, { children: [
8438
+ /* @__PURE__ */ jsx20(StepStatus, { status: "error", message: writeError }),
8439
+ /* @__PURE__ */ jsx20(Text21, { color: theme.textMuted, children: "Press r to retry saving." })
8457
8440
  ] })
8458
8441
  ]
8459
8442
  }
@@ -8462,7 +8445,7 @@ function SetupWizard({ onComplete, onThemePreview }) {
8462
8445
 
8463
8446
  // src/app/workflow/WorkflowPicker.tsx
8464
8447
  import { useState as useState15, useCallback as useCallback16, useEffect as useEffect11 } from "react";
8465
- import { Box as Box17, Text as Text23, useInput as useInput14, useStdout as useStdout7 } from "ink";
8448
+ import { Box as Box16, Text as Text22, useInput as useInput14, useStdout as useStdout7 } from "ink";
8466
8449
 
8467
8450
  // src/core/workflows/workflowOptions.ts
8468
8451
  import fs3 from "fs";
@@ -8526,7 +8509,7 @@ function loadWorkflowOptions() {
8526
8509
  }
8527
8510
 
8528
8511
  // src/app/workflow/WorkflowPicker.tsx
8529
- import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
8512
+ import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
8530
8513
  var DEFAULT_WORKFLOW_OPTION = {
8531
8514
  label: "default",
8532
8515
  value: "default",
@@ -8622,22 +8605,22 @@ function WorkflowPicker({
8622
8605
  } else if (phase.type === "error") {
8623
8606
  hints.push("r retry");
8624
8607
  }
8625
- return /* @__PURE__ */ jsx22(
8626
- Box17,
8608
+ return /* @__PURE__ */ jsx21(
8609
+ Box16,
8627
8610
  {
8628
8611
  flexDirection: "column",
8629
8612
  alignItems: "center",
8630
8613
  justifyContent: "center",
8631
8614
  height: rows,
8632
- children: /* @__PURE__ */ jsx22(Box17, { width: frameWidth + 4, children: /* @__PURE__ */ jsxs18(
8615
+ children: /* @__PURE__ */ jsx21(Box16, { width: frameWidth + 4, children: /* @__PURE__ */ jsxs17(
8633
8616
  WizardFrame,
8634
8617
  {
8635
8618
  title: "WORKFLOW",
8636
- header: /* @__PURE__ */ jsx22(Text23, { color: theme.textMuted, children: "Choose a workflow for this project." }),
8637
- footer: /* @__PURE__ */ jsx22(Text23, { color: theme.textMuted, children: hints.join(" ") }),
8619
+ header: /* @__PURE__ */ jsx21(Text22, { color: theme.textMuted, children: "Choose a workflow for this project." }),
8620
+ footer: /* @__PURE__ */ jsx21(Text22, { color: theme.textMuted, children: hints.join(" ") }),
8638
8621
  children: [
8639
- phase.type === "loading" && /* @__PURE__ */ jsx22(StepStatus, { status: "verifying", message: "Loading workflows..." }),
8640
- phase.type === "selecting" && /* @__PURE__ */ jsx22(
8622
+ phase.type === "loading" && /* @__PURE__ */ jsx21(StepStatus, { status: "verifying", message: "Loading workflows..." }),
8623
+ phase.type === "selecting" && /* @__PURE__ */ jsx21(
8641
8624
  StepSelector,
8642
8625
  {
8643
8626
  options: phase.options,
@@ -8645,15 +8628,15 @@ function WorkflowPicker({
8645
8628
  gap: 1
8646
8629
  }
8647
8630
  ),
8648
- phase.type === "installing" && /* @__PURE__ */ jsx22(StepStatus, { status: "verifying", message: "Installing workflow..." }),
8649
- phase.type === "mcp-options" && /* @__PURE__ */ jsx22(
8631
+ phase.type === "installing" && /* @__PURE__ */ jsx21(StepStatus, { status: "verifying", message: "Installing workflow..." }),
8632
+ phase.type === "mcp-options" && /* @__PURE__ */ jsx21(
8650
8633
  McpOptionsStep,
8651
8634
  {
8652
8635
  servers: phase.servers,
8653
8636
  onComplete: handleMcpComplete
8654
8637
  }
8655
8638
  ),
8656
- phase.type === "error" && /* @__PURE__ */ jsx22(Text23, { color: theme.status.error, children: phase.message })
8639
+ phase.type === "error" && /* @__PURE__ */ jsx21(Text22, { color: theme.status.error, children: phase.message })
8657
8640
  ]
8658
8641
  }
8659
8642
  ) })
@@ -8663,58 +8646,8 @@ function WorkflowPicker({
8663
8646
 
8664
8647
  // src/app/modelPreferences/ModelPicker.tsx
8665
8648
  import { useState as useState16, useEffect as useEffect12, useCallback as useCallback17 } from "react";
8666
- import { Box as Box18, Text as Text24, useInput as useInput15, useStdout as useStdout8 } from "ink";
8667
-
8668
- // src/app/modelPreferences/listAvailableModels.ts
8669
- var CLAUDE_MODEL_OPTIONS = [
8670
- {
8671
- value: "sonnet",
8672
- label: "Sonnet",
8673
- description: "Balanced default for day-to-day coding work."
8674
- },
8675
- {
8676
- value: "opus",
8677
- label: "Opus",
8678
- description: "Stronger reasoning for complex architecture and debugging."
8679
- },
8680
- {
8681
- value: "haiku",
8682
- label: "Haiku",
8683
- description: "Fastest option for lighter tasks."
8684
- },
8685
- {
8686
- value: "opusplan",
8687
- label: "OpusPlan",
8688
- description: "Uses Opus for planning and Sonnet for execution."
8689
- }
8690
- ];
8691
- function isCodexRuntimeWithModels(runtime) {
8692
- return Boolean(runtime && "listModels" in runtime);
8693
- }
8694
- async function listAvailableModels(input) {
8695
- switch (input.harness) {
8696
- case "claude-code":
8697
- return CLAUDE_MODEL_OPTIONS;
8698
- case "openai-codex": {
8699
- if (!isCodexRuntimeWithModels(input.runtime)) {
8700
- throw new Error("Codex runtime is not available");
8701
- }
8702
- const models = await input.runtime.listModels();
8703
- return models.map((model) => ({
8704
- value: model.model,
8705
- label: model.displayName,
8706
- description: model.description,
8707
- isDefault: model.isDefault
8708
- }));
8709
- }
8710
- case "opencode":
8711
- default:
8712
- return [];
8713
- }
8714
- }
8715
-
8716
- // src/app/modelPreferences/ModelPicker.tsx
8717
- import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
8649
+ import { Box as Box17, Text as Text23, useInput as useInput15, useStdout as useStdout8 } from "ink";
8650
+ import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
8718
8651
  function ModelPicker({
8719
8652
  projectDir,
8720
8653
  rows,
@@ -8732,7 +8665,7 @@ function ModelPicker({
8732
8665
  const loadModels = useCallback17(() => {
8733
8666
  setPhase({ type: "loading" });
8734
8667
  setTimeout(() => {
8735
- void listAvailableModels({ harness, runtime }).then((options) => {
8668
+ void resolveHarnessAdapter(harness).listModels(runtime).then((options) => {
8736
8669
  if (options.length === 0) {
8737
8670
  setPhase({
8738
8671
  type: "error",
@@ -8780,28 +8713,28 @@ function ModelPicker({
8780
8713
  hints.push("r retry");
8781
8714
  if (onClose) hints.push(`${g["hint.escape"]} close`);
8782
8715
  }
8783
- return /* @__PURE__ */ jsx23(
8784
- Box18,
8716
+ return /* @__PURE__ */ jsx22(
8717
+ Box17,
8785
8718
  {
8786
8719
  flexDirection: "column",
8787
8720
  alignItems: "center",
8788
8721
  justifyContent: "center",
8789
8722
  height: rows,
8790
- children: /* @__PURE__ */ jsx23(Box18, { width: frameWidth + 4, children: /* @__PURE__ */ jsxs19(
8723
+ children: /* @__PURE__ */ jsx22(Box17, { width: frameWidth + 4, children: /* @__PURE__ */ jsxs18(
8791
8724
  WizardFrame,
8792
8725
  {
8793
8726
  title: "MODEL",
8794
- header: /* @__PURE__ */ jsxs19(Box18, { flexDirection: "column", children: [
8795
- /* @__PURE__ */ jsx23(Text24, { color: theme.textMuted, children: "Choose the preferred model for this project." }),
8796
- currentModelName ? /* @__PURE__ */ jsxs19(Text24, { color: theme.textMuted, children: [
8727
+ header: /* @__PURE__ */ jsxs18(Box17, { flexDirection: "column", children: [
8728
+ /* @__PURE__ */ jsx22(Text23, { color: theme.textMuted, children: "Choose the preferred model for this project." }),
8729
+ currentModelName ? /* @__PURE__ */ jsxs18(Text23, { color: theme.textMuted, children: [
8797
8730
  "Current: ",
8798
8731
  currentModelName
8799
8732
  ] }) : null
8800
8733
  ] }),
8801
- footer: /* @__PURE__ */ jsx23(Text24, { color: theme.textMuted, children: hints.join(" ") }),
8734
+ footer: /* @__PURE__ */ jsx22(Text23, { color: theme.textMuted, children: hints.join(" ") }),
8802
8735
  children: [
8803
- phase.type === "loading" && /* @__PURE__ */ jsx23(StepStatus, { status: "verifying", message: "Loading models..." }),
8804
- phase.type === "selecting" && /* @__PURE__ */ jsx23(
8736
+ phase.type === "loading" && /* @__PURE__ */ jsx22(StepStatus, { status: "verifying", message: "Loading models..." }),
8737
+ phase.type === "selecting" && /* @__PURE__ */ jsx22(
8805
8738
  StepSelector,
8806
8739
  {
8807
8740
  options: phase.options.map((option) => ({
@@ -8814,14 +8747,14 @@ function ModelPicker({
8814
8747
  gap: 1
8815
8748
  }
8816
8749
  ),
8817
- phase.type === "saving" && /* @__PURE__ */ jsx23(
8750
+ phase.type === "saving" && /* @__PURE__ */ jsx22(
8818
8751
  StepStatus,
8819
8752
  {
8820
8753
  status: "verifying",
8821
8754
  message: `Saving model preference (${phase.model})...`
8822
8755
  }
8823
8756
  ),
8824
- phase.type === "error" && /* @__PURE__ */ jsx23(Text24, { color: theme.status.error, children: phase.message })
8757
+ phase.type === "error" && /* @__PURE__ */ jsx22(Text23, { color: theme.status.error, children: phase.message })
8825
8758
  ]
8826
8759
  }
8827
8760
  ) })
@@ -9630,7 +9563,7 @@ function toSessionPickerEntries(sessions) {
9630
9563
 
9631
9564
  // src/app/shell/startupDiagnostics.ts
9632
9565
  function shouldTrackStartupDiagnostics(harness) {
9633
- return harness === "claude-code";
9566
+ return resolveHarnessAdapter(harness).capabilities.emitsStartupDiagnostics;
9634
9567
  }
9635
9568
  function createPendingStartupDiagnosticsEvent(args) {
9636
9569
  return {
@@ -9667,6 +9600,20 @@ function deriveStartupTimeoutFailure(args) {
9667
9600
  };
9668
9601
  }
9669
9602
 
9603
+ // src/app/shell/resolveAllowedTools.ts
9604
+ var BASELINE_ALLOWED_TOOLS = ["mcp__*"];
9605
+ function resolveAllowedTools(harness, allowedTools) {
9606
+ const extras = [
9607
+ ...BASELINE_ALLOWED_TOOLS,
9608
+ ...resolveHarnessAdapter(harness).capabilities.extraAllowedTools
9609
+ ];
9610
+ const merged = [...allowedTools ?? []];
9611
+ for (const tool of extras) {
9612
+ if (!merged.includes(tool)) merged.push(tool);
9613
+ }
9614
+ return merged;
9615
+ }
9616
+
9670
9617
  // src/app/shell/channelDispatchCompletion.ts
9671
9618
  function findChannelDispatchReply(feedEvents, afterFeedEventCount) {
9672
9619
  return feedEvents.slice(afterFeedEventCount).reverse().find(
@@ -9706,7 +9653,7 @@ function buildSessionTelemetrySummary(carry, metrics) {
9706
9653
  }
9707
9654
 
9708
9655
  // src/app/shell/AppShell.tsx
9709
- import { Fragment as Fragment8, jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
9656
+ import { Fragment as Fragment7, jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
9710
9657
  var EMPTY_SESSION_METRICS = {
9711
9658
  modelName: null,
9712
9659
  toolCallCount: 0,
@@ -9735,21 +9682,21 @@ function PermissionErrorFallback({ onDeny }) {
9735
9682
  useInput17((_input, key) => {
9736
9683
  if (key.escape) onDeny();
9737
9684
  });
9738
- return /* @__PURE__ */ jsx24(Text25, { color: theme.status.error, children: "[Permission dialog error -- press Escape to deny and continue]" });
9685
+ return /* @__PURE__ */ jsx23(Text24, { color: theme.status.error, children: "[Permission dialog error -- press Escape to deny and continue]" });
9739
9686
  }
9740
9687
  function QuestionErrorFallback({ onSkip }) {
9741
9688
  const theme = useTheme();
9742
9689
  useInput17((_input, key) => {
9743
9690
  if (key.escape) onSkip();
9744
9691
  });
9745
- return /* @__PURE__ */ jsx24(Text25, { color: theme.status.error, children: "[Question dialog error -- press Escape to skip and continue]" });
9692
+ return /* @__PURE__ */ jsx23(Text24, { color: theme.status.error, children: "[Question dialog error -- press Escape to skip and continue]" });
9746
9693
  }
9747
9694
  function DiagnosticsConsentErrorFallback({ onDismiss }) {
9748
9695
  const theme = useTheme();
9749
9696
  useInput17((_input, key) => {
9750
9697
  if (key.escape) onDismiss();
9751
9698
  });
9752
- return /* @__PURE__ */ jsx24(Text25, { color: theme.status.error, children: "[Diagnostics consent dialog error -- press Escape to dismiss]" });
9699
+ return /* @__PURE__ */ jsx23(Text24, { color: theme.status.error, children: "[Diagnostics consent dialog error -- press Escape to dismiss]" });
9753
9700
  }
9754
9701
  var STARTUP_HANDSHAKE_TIMEOUT_MS = 2500;
9755
9702
  function AppContent({
@@ -10793,6 +10740,7 @@ function AppContent({
10793
10740
  sessionTotal: sessionScope.total,
10794
10741
  harness,
10795
10742
  modelName: metrics.modelName ?? modelName,
10743
+ effortLevel: metrics.effortLevel ?? null,
10796
10744
  errorReason: startupFailure?.message
10797
10745
  });
10798
10746
  return renderHeaderLines(headerModel, innerWidth, hasColor, theme)[0];
@@ -10817,6 +10765,7 @@ function AppContent({
10817
10765
  harness,
10818
10766
  modelName,
10819
10767
  metrics.modelName,
10768
+ metrics.effortLevel,
10820
10769
  startupFailure?.message,
10821
10770
  innerWidth,
10822
10771
  hasColor,
@@ -10866,27 +10815,27 @@ function AppContent({
10866
10815
  [withBorderEdges, frameLine]
10867
10816
  );
10868
10817
  if (pagerActive) {
10869
- return /* @__PURE__ */ jsx24(Box19, {});
10818
+ return /* @__PURE__ */ jsx23(Box18, {});
10870
10819
  }
10871
- return /* @__PURE__ */ jsxs20(Box19, { flexDirection: "column", width: frameWidth, children: [
10872
- /* @__PURE__ */ jsx24(
10820
+ return /* @__PURE__ */ jsxs19(Box18, { flexDirection: "column", width: frameWidth, children: [
10821
+ /* @__PURE__ */ jsx23(
10873
10822
  MaybeProfiler,
10874
10823
  {
10875
10824
  enabled: perfEnabled,
10876
10825
  id: "app.main.header-frame",
10877
10826
  onRender: handleSectionProfilerRender,
10878
- children: /* @__PURE__ */ jsx24(Text25, { children: `${border(topBorder)}
10827
+ children: /* @__PURE__ */ jsx23(Text24, { children: `${border(topBorder)}
10879
10828
  ${withBorderEdges(frameLine(headerLine1))}
10880
10829
  ${border(sectionBorder)}` })
10881
10830
  }
10882
10831
  ),
10883
- /* @__PURE__ */ jsx24(
10832
+ /* @__PURE__ */ jsx23(
10884
10833
  MaybeProfiler,
10885
10834
  {
10886
10835
  enabled: perfEnabled,
10887
10836
  id: "app.main.todo-header",
10888
10837
  onRender: handleSectionProfilerRender,
10889
- children: /* @__PURE__ */ jsx24(
10838
+ children: /* @__PURE__ */ jsx23(
10890
10839
  TodoHeaderSection,
10891
10840
  {
10892
10841
  actualTodoRows,
@@ -10904,13 +10853,13 @@ ${border(sectionBorder)}` })
10904
10853
  )
10905
10854
  }
10906
10855
  ),
10907
- /* @__PURE__ */ jsx24(
10856
+ /* @__PURE__ */ jsx23(
10908
10857
  MaybeProfiler,
10909
10858
  {
10910
10859
  enabled: perfEnabled,
10911
10860
  id: "app.main.body-prefix",
10912
10861
  onRender: handleSectionProfilerRender,
10913
- children: /* @__PURE__ */ jsx24(
10862
+ children: /* @__PURE__ */ jsx23(
10914
10863
  TodoBodySection,
10915
10864
  {
10916
10865
  innerWidth,
@@ -10937,13 +10886,13 @@ ${border(sectionBorder)}` })
10937
10886
  )
10938
10887
  }
10939
10888
  ),
10940
- /* @__PURE__ */ jsx24(
10889
+ /* @__PURE__ */ jsx23(
10941
10890
  MaybeProfiler,
10942
10891
  {
10943
10892
  enabled: perfEnabled,
10944
10893
  id: "app.main.feed",
10945
10894
  onRender: handleSectionProfilerRender,
10946
- children: workflowPickerVisible ? /* @__PURE__ */ jsx24(
10895
+ children: workflowPickerVisible ? /* @__PURE__ */ jsx23(
10947
10896
  WorkflowPicker,
10948
10897
  {
10949
10898
  projectDir,
@@ -10954,7 +10903,7 @@ ${border(sectionBorder)}` })
10954
10903
  onWorkflowSelected(name);
10955
10904
  }
10956
10905
  }
10957
- ) : modelPickerVisible ? /* @__PURE__ */ jsx24(
10906
+ ) : modelPickerVisible ? /* @__PURE__ */ jsx23(
10958
10907
  ModelPicker,
10959
10908
  {
10960
10909
  projectDir,
@@ -10968,8 +10917,8 @@ ${border(sectionBorder)}` })
10968
10917
  onModelSelected(selectedModel);
10969
10918
  }
10970
10919
  }
10971
- ) : splitMode ? /* @__PURE__ */ jsxs20(Box19, { flexDirection: "row", children: [
10972
- /* @__PURE__ */ jsx24(Box19, { width: messagePanelWidth + 1, flexShrink: 0, children: /* @__PURE__ */ jsx24(
10920
+ ) : splitMode ? /* @__PURE__ */ jsxs19(Box18, { flexDirection: "row", children: [
10921
+ /* @__PURE__ */ jsx23(Box18, { width: messagePanelWidth + 1, flexShrink: 0, children: /* @__PURE__ */ jsx23(
10973
10922
  MessagePanel,
10974
10923
  {
10975
10924
  entries: messageEntries,
@@ -10981,7 +10930,7 @@ ${border(sectionBorder)}` })
10981
10930
  borderColor: theme.border
10982
10931
  }
10983
10932
  ) }),
10984
- /* @__PURE__ */ jsx24(Box19, { flexGrow: 1, children: /* @__PURE__ */ jsx24(
10933
+ /* @__PURE__ */ jsx23(Box18, { flexGrow: 1, children: /* @__PURE__ */ jsx23(
10985
10934
  FeedGrid,
10986
10935
  {
10987
10936
  feedHeaderRows,
@@ -11001,7 +10950,7 @@ ${border(sectionBorder)}` })
11001
10950
  onboarding: feedOnboarding
11002
10951
  }
11003
10952
  ) })
11004
- ] }) : /* @__PURE__ */ jsx24(
10953
+ ] }) : /* @__PURE__ */ jsx23(
11005
10954
  FeedGrid,
11006
10955
  {
11007
10956
  feedHeaderRows,
@@ -11023,13 +10972,13 @@ ${border(sectionBorder)}` })
11023
10972
  )
11024
10973
  }
11025
10974
  ),
11026
- /* @__PURE__ */ jsx24(
10975
+ /* @__PURE__ */ jsx23(
11027
10976
  MaybeProfiler,
11028
10977
  {
11029
10978
  enabled: perfEnabled,
11030
10979
  id: "app.main.input",
11031
10980
  onRender: handleSectionProfilerRender,
11032
- children: /* @__PURE__ */ jsx24(
10981
+ children: /* @__PURE__ */ jsx23(
11033
10982
  InputSection,
11034
10983
  {
11035
10984
  innerWidth,
@@ -11059,13 +11008,13 @@ ${border(sectionBorder)}` })
11059
11008
  )
11060
11009
  }
11061
11010
  ),
11062
- /* @__PURE__ */ jsx24(
11011
+ /* @__PURE__ */ jsx23(
11063
11012
  MaybeProfiler,
11064
11013
  {
11065
11014
  enabled: perfEnabled,
11066
11015
  id: "app.main.footer",
11067
11016
  onRender: handleSectionProfilerRender,
11068
- children: /* @__PURE__ */ jsx24(
11017
+ children: /* @__PURE__ */ jsx23(
11069
11018
  FooterSection,
11070
11019
  {
11071
11020
  frameFooterHelp: frame.footerHelp,
@@ -11076,22 +11025,22 @@ ${border(sectionBorder)}` })
11076
11025
  )
11077
11026
  }
11078
11027
  ),
11079
- /* @__PURE__ */ jsx24(
11028
+ /* @__PURE__ */ jsx23(
11080
11029
  MaybeProfiler,
11081
11030
  {
11082
11031
  enabled: perfEnabled,
11083
11032
  id: "app.main.diagnostics-dialog",
11084
11033
  onRender: handleSectionProfilerRender,
11085
- children: /* @__PURE__ */ jsx24(Fragment8, { children: pendingStartupDiagnostics && /* @__PURE__ */ jsx24(
11034
+ children: /* @__PURE__ */ jsx23(Fragment7, { children: pendingStartupDiagnostics && /* @__PURE__ */ jsx23(
11086
11035
  ErrorBoundary,
11087
11036
  {
11088
- fallback: /* @__PURE__ */ jsx24(
11037
+ fallback: /* @__PURE__ */ jsx23(
11089
11038
  DiagnosticsConsentErrorFallback,
11090
11039
  {
11091
11040
  onDismiss: () => setPendingStartupDiagnostics(null)
11092
11041
  }
11093
11042
  ),
11094
- children: /* @__PURE__ */ jsx24(
11043
+ children: /* @__PURE__ */ jsx23(
11095
11044
  DiagnosticsConsentDialog,
11096
11045
  {
11097
11046
  harnessLabel,
@@ -11102,22 +11051,22 @@ ${border(sectionBorder)}` })
11102
11051
  ) })
11103
11052
  }
11104
11053
  ),
11105
- /* @__PURE__ */ jsx24(
11054
+ /* @__PURE__ */ jsx23(
11106
11055
  MaybeProfiler,
11107
11056
  {
11108
11057
  enabled: perfEnabled,
11109
11058
  id: "app.main.permission-dialog",
11110
11059
  onRender: handleSectionProfilerRender,
11111
- children: /* @__PURE__ */ jsx24(Fragment8, { children: appMode.type === "permission" && currentPermissionRequest && /* @__PURE__ */ jsx24(
11060
+ children: /* @__PURE__ */ jsx23(Fragment7, { children: appMode.type === "permission" && currentPermissionRequest && /* @__PURE__ */ jsx23(
11112
11061
  ErrorBoundary,
11113
11062
  {
11114
- fallback: /* @__PURE__ */ jsx24(
11063
+ fallback: /* @__PURE__ */ jsx23(
11115
11064
  PermissionErrorFallback,
11116
11065
  {
11117
11066
  onDeny: () => handlePermissionDecision("deny")
11118
11067
  }
11119
11068
  ),
11120
- children: /* @__PURE__ */ jsx24(
11069
+ children: /* @__PURE__ */ jsx23(
11121
11070
  PermissionDialog,
11122
11071
  {
11123
11072
  request: currentPermissionRequest,
@@ -11129,17 +11078,17 @@ ${border(sectionBorder)}` })
11129
11078
  ) })
11130
11079
  }
11131
11080
  ),
11132
- /* @__PURE__ */ jsx24(
11081
+ /* @__PURE__ */ jsx23(
11133
11082
  MaybeProfiler,
11134
11083
  {
11135
11084
  enabled: perfEnabled,
11136
11085
  id: "app.main.question-dialog",
11137
11086
  onRender: handleSectionProfilerRender,
11138
- children: /* @__PURE__ */ jsx24(Fragment8, { children: appMode.type === "question" && currentQuestionRequest && /* @__PURE__ */ jsx24(
11087
+ children: /* @__PURE__ */ jsx23(Fragment7, { children: appMode.type === "question" && currentQuestionRequest && /* @__PURE__ */ jsx23(
11139
11088
  ErrorBoundary,
11140
11089
  {
11141
- fallback: /* @__PURE__ */ jsx24(QuestionErrorFallback, { onSkip: handleQuestionSkip }),
11142
- children: /* @__PURE__ */ jsx24(
11090
+ fallback: /* @__PURE__ */ jsx23(QuestionErrorFallback, { onSkip: handleQuestionSkip }),
11091
+ children: /* @__PURE__ */ jsx23(
11143
11092
  QuestionDialog,
11144
11093
  {
11145
11094
  request: currentQuestionRequest,
@@ -11160,10 +11109,10 @@ function MaybeProfiler({
11160
11109
  onRender,
11161
11110
  children
11162
11111
  }) {
11163
- if (!enabled) return /* @__PURE__ */ jsx24(Fragment8, { children });
11164
- return /* @__PURE__ */ jsx24(Profiler, { id, onRender, children });
11112
+ if (!enabled) return /* @__PURE__ */ jsx23(Fragment7, { children });
11113
+ return /* @__PURE__ */ jsx23(Profiler, { id, onRender, children });
11165
11114
  }
11166
- var TodoHeaderSection = React9.memo(function TodoHeaderSection2({
11115
+ var TodoHeaderSection = React8.memo(function TodoHeaderSection2({
11167
11116
  actualTodoRows,
11168
11117
  innerWidth,
11169
11118
  useAscii,
@@ -11202,9 +11151,9 @@ var TodoHeaderSection = React9.memo(function TodoHeaderSection2({
11202
11151
  theme
11203
11152
  ]
11204
11153
  );
11205
- return /* @__PURE__ */ jsx24(Fragment8, { children: todoHeaderLine !== null && /* @__PURE__ */ jsx24(Text25, { children: withBorderEdges(frameLine(todoHeaderLine)) }, "todo-header") });
11154
+ return /* @__PURE__ */ jsx23(Fragment7, { children: todoHeaderLine !== null && /* @__PURE__ */ jsx23(Text24, { children: withBorderEdges(frameLine(todoHeaderLine)) }, "todo-header") });
11206
11155
  });
11207
- var TodoBodySection = React9.memo(function TodoBodySection2({
11156
+ var TodoBodySection = React8.memo(function TodoBodySection2({
11208
11157
  innerWidth,
11209
11158
  actualTodoRows,
11210
11159
  todoScroll,
@@ -11291,9 +11240,9 @@ var TodoBodySection = React9.memo(function TodoBodySection2({
11291
11240
  ]
11292
11241
  );
11293
11242
  if (output === null) return null;
11294
- return /* @__PURE__ */ jsx24(Text25, { children: output });
11243
+ return /* @__PURE__ */ jsx23(Text24, { children: output });
11295
11244
  });
11296
- var FooterSection = React9.memo(function FooterSection2({
11245
+ var FooterSection = React8.memo(function FooterSection2({
11297
11246
  frameFooterHelp,
11298
11247
  toastMessage,
11299
11248
  hintTextColor,
@@ -11305,9 +11254,9 @@ var FooterSection = React9.memo(function FooterSection2({
11305
11254
  return fit(hint, innerWidth);
11306
11255
  }, [frameFooterHelp, toastMessage, hintTextColor, innerWidth]);
11307
11256
  if (output === null) return null;
11308
- return /* @__PURE__ */ jsx24(Text25, { children: output });
11257
+ return /* @__PURE__ */ jsx23(Text24, { children: output });
11309
11258
  });
11310
- var InputSection = React9.memo(function InputSection2({
11259
+ var InputSection = React8.memo(function InputSection2({
11311
11260
  innerWidth,
11312
11261
  useAscii,
11313
11262
  borderColor,
@@ -11332,7 +11281,7 @@ var InputSection = React9.memo(function InputSection2({
11332
11281
  topBorder,
11333
11282
  bottomBorder
11334
11283
  }) {
11335
- return /* @__PURE__ */ jsx24(
11284
+ return /* @__PURE__ */ jsx23(
11336
11285
  ShellInput2,
11337
11286
  {
11338
11287
  ref: inputRef,
@@ -11541,13 +11490,13 @@ function App({
11541
11490
  refreshRuntime();
11542
11491
  }, [refreshRuntime]);
11543
11492
  if (phase.type === "setup") {
11544
- return /* @__PURE__ */ jsx24(
11493
+ return /* @__PURE__ */ jsx23(
11545
11494
  MaybeProfiler,
11546
11495
  {
11547
11496
  enabled: perfEnabled,
11548
11497
  id: "app.setup",
11549
11498
  onRender: handleProfilerRender,
11550
- children: /* @__PURE__ */ jsx24(ThemeProvider, { value: activeTheme, children: /* @__PURE__ */ jsx24(
11499
+ children: /* @__PURE__ */ jsx23(ThemeProvider, { value: activeTheme, children: /* @__PURE__ */ jsx23(
11551
11500
  SetupWizard,
11552
11501
  {
11553
11502
  onThemePreview: (themeName) => {
@@ -11560,17 +11509,17 @@ function App({
11560
11509
  );
11561
11510
  }
11562
11511
  if (phase.type === "session-select") {
11563
- return /* @__PURE__ */ jsx24(
11512
+ return /* @__PURE__ */ jsx23(
11564
11513
  MaybeProfiler,
11565
11514
  {
11566
11515
  enabled: perfEnabled,
11567
11516
  id: "app.session-select",
11568
11517
  onRender: handleProfilerRender,
11569
- children: /* @__PURE__ */ jsx24(
11518
+ children: /* @__PURE__ */ jsx23(
11570
11519
  ErrorBoundary,
11571
11520
  {
11572
- fallback: /* @__PURE__ */ jsx24(Text25, { color: "red", children: "[Session picker error -- starting new session]" }),
11573
- children: /* @__PURE__ */ jsx24(
11521
+ fallback: /* @__PURE__ */ jsx23(Text24, { color: "red", children: "[Session picker error -- starting new session]" }),
11522
+ children: /* @__PURE__ */ jsx23(
11574
11523
  SessionPicker,
11575
11524
  {
11576
11525
  sessions,
@@ -11584,7 +11533,7 @@ function App({
11584
11533
  }
11585
11534
  );
11586
11535
  }
11587
- return /* @__PURE__ */ jsx24(ThemeProvider, { value: activeTheme, children: /* @__PURE__ */ jsx24(
11536
+ return /* @__PURE__ */ jsx23(ThemeProvider, { value: activeTheme, children: /* @__PURE__ */ jsx23(
11588
11537
  HookProvider,
11589
11538
  {
11590
11539
  projectDir,
@@ -11597,7 +11546,7 @@ function App({
11597
11546
  ),
11598
11547
  athenaSessionId,
11599
11548
  ...attachmentId !== void 0 ? { attachmentId } : {},
11600
- children: /* @__PURE__ */ jsx24(
11549
+ children: /* @__PURE__ */ jsx23(
11601
11550
  AppContent,
11602
11551
  {
11603
11552
  projectDir,
@@ -11633,15 +11582,6 @@ function App({
11633
11582
  }
11634
11583
  ) });
11635
11584
  }
11636
- function resolveAllowedTools(harness, allowedTools) {
11637
- const extras = harness === "openai-codex" ? ["mcp__*", "Permissions", "Bash", "Edit"] : ["mcp__*"];
11638
- const base = allowedTools ?? [];
11639
- const merged = [...base];
11640
- for (const tool of extras) {
11641
- if (!merged.includes(tool)) merged.push(tool);
11642
- }
11643
- return merged;
11644
- }
11645
11585
  function usePerfRenderLog(enabled, id) {
11646
11586
  const renderCountRef = useRef16(0);
11647
11587
  renderCountRef.current += 1;
@@ -11945,6 +11885,21 @@ function resolveResumeTarget(input) {
11945
11885
  const createSessionId = input.createSessionId ?? crypto.randomUUID;
11946
11886
  const getSessionMetaFn = input.getSessionMetaFn ?? getSessionMeta;
11947
11887
  const getMostRecentSessionFn = input.getMostRecentSessionFn ?? getMostRecentAthenaSession;
11888
+ const getLatestRunFn = input.getLatestRunFn ?? getLatestRunForSession;
11889
+ function toTarget(meta) {
11890
+ const latestRun = getLatestRunFn(meta.id);
11891
+ if (latestRun?.status === "awaiting_attention") {
11892
+ return {
11893
+ athenaSessionId: meta.id,
11894
+ adapterResumeSessionId: latestRun.adapterSessionId ?? meta.adapterSessionIds.at(-1),
11895
+ resumeRunId: latestRun.id
11896
+ };
11897
+ }
11898
+ return {
11899
+ athenaSessionId: meta.id,
11900
+ adapterResumeSessionId: meta.adapterSessionIds.at(-1)
11901
+ };
11902
+ }
11948
11903
  const { request } = input;
11949
11904
  if (request.kind === "fresh") {
11950
11905
  return {
@@ -11958,10 +11913,7 @@ function resolveResumeTarget(input) {
11958
11913
  input.logError(input.messages.unknownExplicit(request.sessionId));
11959
11914
  return void 0;
11960
11915
  }
11961
- return {
11962
- athenaSessionId: meta.id,
11963
- adapterResumeSessionId: meta.adapterSessionIds.at(-1)
11964
- };
11916
+ return toTarget(meta);
11965
11917
  }
11966
11918
  const recent = getMostRecentSessionFn(input.projectDir);
11967
11919
  if (!recent) {
@@ -11974,10 +11926,7 @@ function resolveResumeTarget(input) {
11974
11926
  }
11975
11927
  return void 0;
11976
11928
  }
11977
- return {
11978
- athenaSessionId: recent.id,
11979
- adapterResumeSessionId: recent.adapterSessionIds.at(-1)
11980
- };
11929
+ return toTarget(recent);
11981
11930
  }
11982
11931
 
11983
11932
  // src/app/entry/execCommand.ts
@@ -12037,6 +11986,7 @@ async function runExecCommand(input, deps = {}) {
12037
11986
  harness: input.runtimeConfig.harness,
12038
11987
  athenaSessionId: continueResolution.athenaSessionId,
12039
11988
  adapterResumeSessionId: continueResolution.adapterResumeSessionId,
11989
+ resumeRunId: continueResolution.resumeRunId,
12040
11990
  isolationConfig: input.runtimeConfig.isolationConfig,
12041
11991
  pluginMcpConfig: input.runtimeConfig.pluginMcpConfig,
12042
11992
  workflow: input.runtimeConfig.workflow,
@@ -12046,7 +11996,34 @@ async function runExecCommand(input, deps = {}) {
12046
11996
  outputLastMessagePath: input.flags.outputLastMessage,
12047
11997
  ephemeral: input.flags.ephemeral,
12048
11998
  timeoutMs: input.flags.timeoutMs,
12049
- channels: input.flags.channels
11999
+ channels: input.flags.channels,
12000
+ // Reporting-only summary: strip to name + source layer so secret-bearing
12001
+ // MCP env/command/args and skill paths never reach the startup notice or
12002
+ // the exec.started event (R3).
12003
+ personalCapabilities: {
12004
+ mcpServers: input.runtimeConfig.personalMcpServers.map((server) => ({
12005
+ name: server.name,
12006
+ sourceLayer: server.sourceLayer
12007
+ })),
12008
+ skills: input.runtimeConfig.personalSkills.map((skill) => ({
12009
+ name: skill.name,
12010
+ sourceLayer: skill.sourceLayer
12011
+ }))
12012
+ },
12013
+ // Same strip for shadowed (conflicting) capabilities — name + source
12014
+ // layer only, never the personal MCP env/command/args or skill path (R7).
12015
+ capabilityConflicts: {
12016
+ mcpServers: input.runtimeConfig.capabilityConflicts.mcpServers.map(
12017
+ (server) => ({
12018
+ name: server.name,
12019
+ sourceLayer: server.sourceLayer
12020
+ })
12021
+ ),
12022
+ skills: input.runtimeConfig.capabilityConflicts.skills.map((skill) => ({
12023
+ name: skill.name,
12024
+ sourceLayer: skill.sourceLayer
12025
+ }))
12026
+ }
12050
12027
  });
12051
12028
  return result.exitCode;
12052
12029
  }
@@ -12343,6 +12320,27 @@ function runWorkflowCommand(input, deps = {}) {
12343
12320
  ` note: project config overrides global at ${projectConfigPath(input.projectDir)}`
12344
12321
  );
12345
12322
  }
12323
+ const { mcpServers, skills } = resolveEffectiveCapabilities({
12324
+ globalConfig,
12325
+ projectConfig
12326
+ });
12327
+ if (mcpServers.length === 0 && skills.length === 0) {
12328
+ logOut("Personal capabilities: none configured");
12329
+ } else {
12330
+ logOut("Personal capabilities:");
12331
+ if (mcpServers.length > 0) {
12332
+ logOut(" MCP servers:");
12333
+ for (const server of mcpServers) {
12334
+ logOut(` ${server.name} [${server.sourceLayer}]`);
12335
+ }
12336
+ }
12337
+ if (skills.length > 0) {
12338
+ logOut(" Skills:");
12339
+ for (const skill of skills) {
12340
+ logOut(` ${skill.name} [${skill.sourceLayer}]`);
12341
+ }
12342
+ }
12343
+ }
12346
12344
  return 0;
12347
12345
  }
12348
12346
  default:
@@ -12351,6 +12349,343 @@ function runWorkflowCommand(input, deps = {}) {
12351
12349
  }
12352
12350
  }
12353
12351
 
12352
+ // src/app/entry/mcpCommand.ts
12353
+ function parseArgs(args, context) {
12354
+ let project = false;
12355
+ let global = false;
12356
+ const env2 = [];
12357
+ const positional = [];
12358
+ for (let i = 0; i < args.length; i++) {
12359
+ const arg = args[i];
12360
+ if (arg === "--project") {
12361
+ project = true;
12362
+ } else if (arg === "--global") {
12363
+ global = true;
12364
+ } else if (arg === "--env") {
12365
+ const value = args[i + 1];
12366
+ if (value === void 0) {
12367
+ return { error: `mcp ${context}: --env requires a KEY=VALUE argument` };
12368
+ }
12369
+ env2.push(value);
12370
+ i++;
12371
+ } else if (arg.startsWith("--")) {
12372
+ return { error: `Unknown flag for mcp ${context}: ${arg}` };
12373
+ } else {
12374
+ positional.push(arg);
12375
+ }
12376
+ }
12377
+ if (project && global) {
12378
+ return {
12379
+ error: `mcp ${context}: --project and --global are mutually exclusive`
12380
+ };
12381
+ }
12382
+ return { project, global, env: env2, positional };
12383
+ }
12384
+ function parseEnv(entries) {
12385
+ const env2 = {};
12386
+ for (const entry of entries) {
12387
+ const eq = entry.indexOf("=");
12388
+ if (eq <= 0) {
12389
+ return { error: `Invalid --env value (expected KEY=VALUE): ${entry}` };
12390
+ }
12391
+ env2[entry.slice(0, eq)] = entry.slice(eq + 1);
12392
+ }
12393
+ return env2;
12394
+ }
12395
+ function runMcpCommand(input, deps = {}) {
12396
+ const readGlobal = deps.readGlobalConfig ?? readGlobalConfig;
12397
+ const readProject = deps.readProjectConfig ?? readConfig;
12398
+ const writeGlobal = deps.writeGlobalConfig ?? writeGlobalConfig;
12399
+ const writeProject = deps.writeProjectConfig ?? writeProjectConfig;
12400
+ const logError = deps.logError ?? console.error;
12401
+ const logOut = deps.logOut ?? console.log;
12402
+ const { subcommand } = input;
12403
+ if (subcommand === "add") {
12404
+ const parsed = parseArgs(input.subcommandArgs, "add");
12405
+ if ("error" in parsed) {
12406
+ logError(parsed.error);
12407
+ return 1;
12408
+ }
12409
+ const name = parsed.positional[0];
12410
+ if (!name) {
12411
+ logError("mcp add: missing server name");
12412
+ return 1;
12413
+ }
12414
+ const [command, ...args] = input.serverCommandTokens;
12415
+ if (!command) {
12416
+ logError(
12417
+ `mcp add: missing server command. Usage: mcp add ${name} -- <command> [args...]`
12418
+ );
12419
+ return 1;
12420
+ }
12421
+ const envResult = parseEnv(parsed.env);
12422
+ if ("error" in envResult) {
12423
+ logError(envResult.error);
12424
+ return 1;
12425
+ }
12426
+ const server = { command };
12427
+ if (args.length > 0) {
12428
+ server.args = args;
12429
+ }
12430
+ if (Object.keys(envResult).length > 0) {
12431
+ server.env = envResult;
12432
+ }
12433
+ const layer = parsed.project ? "project" : "global";
12434
+ const existing = (layer === "project" ? readProject(input.projectDir).mcpServers : readGlobal().mcpServers) ?? {};
12435
+ const overwriting = name in existing;
12436
+ const merged = { ...existing, [name]: server };
12437
+ if (layer === "project") {
12438
+ writeProject(input.projectDir, { mcpServers: merged });
12439
+ } else {
12440
+ writeGlobal({ mcpServers: merged });
12441
+ }
12442
+ logOut(
12443
+ `${overwriting ? "Overwrote" : "Added"} personal MCP server '${name}' [${layer}]`
12444
+ );
12445
+ return 0;
12446
+ }
12447
+ if (subcommand === "list") {
12448
+ const parsed = parseArgs(input.subcommandArgs, "list");
12449
+ if ("error" in parsed) {
12450
+ logError(parsed.error);
12451
+ return 1;
12452
+ }
12453
+ const listSingleLayer = (servers, label) => {
12454
+ const names = Object.keys(servers);
12455
+ if (names.length === 0) {
12456
+ logOut(`No personal MCP servers configured (${label}).`);
12457
+ return;
12458
+ }
12459
+ logOut(`Personal MCP servers (${label}):`);
12460
+ for (const name of names) {
12461
+ logOut(` ${name} ${servers[name].command}`);
12462
+ }
12463
+ };
12464
+ if (parsed.global) {
12465
+ listSingleLayer(readGlobal().mcpServers ?? {}, "global");
12466
+ return 0;
12467
+ }
12468
+ if (parsed.project) {
12469
+ listSingleLayer(
12470
+ readProject(input.projectDir).mcpServers ?? {},
12471
+ "project"
12472
+ );
12473
+ return 0;
12474
+ }
12475
+ const { mcpServers } = resolveEffectiveCapabilities({
12476
+ globalConfig: readGlobal(),
12477
+ projectConfig: readProject(input.projectDir)
12478
+ });
12479
+ if (mcpServers.length === 0) {
12480
+ logOut("No personal MCP servers configured.");
12481
+ return 0;
12482
+ }
12483
+ logOut("Personal MCP servers (effective):");
12484
+ for (const server of mcpServers) {
12485
+ logOut(` ${server.name} ${server.command} [${server.sourceLayer}]`);
12486
+ }
12487
+ return 0;
12488
+ }
12489
+ if (subcommand === "remove") {
12490
+ const parsed = parseArgs(input.subcommandArgs, "remove");
12491
+ if ("error" in parsed) {
12492
+ logError(parsed.error);
12493
+ return 1;
12494
+ }
12495
+ const name = parsed.positional[0];
12496
+ if (!name) {
12497
+ logError("mcp remove: missing server name");
12498
+ return 1;
12499
+ }
12500
+ const layer = parsed.project ? "project" : "global";
12501
+ const existing = (layer === "project" ? readProject(input.projectDir).mcpServers : readGlobal().mcpServers) ?? {};
12502
+ if (!(name in existing)) {
12503
+ logError(
12504
+ `mcp remove: no personal MCP server '${name}' found in ${layer} config`
12505
+ );
12506
+ return 1;
12507
+ }
12508
+ const next = { ...existing };
12509
+ delete next[name];
12510
+ if (layer === "project") {
12511
+ writeProject(input.projectDir, { mcpServers: next });
12512
+ } else {
12513
+ writeGlobal({ mcpServers: next });
12514
+ }
12515
+ logOut(`Removed personal MCP server '${name}' [${layer}]`);
12516
+ return 0;
12517
+ }
12518
+ logError(`Unknown mcp subcommand: ${subcommand}`);
12519
+ return 1;
12520
+ }
12521
+
12522
+ // src/app/entry/skillCommand.ts
12523
+ import fs4 from "fs";
12524
+ import path4 from "path";
12525
+ function resolvePersonalSkill(ref, projectDir) {
12526
+ const absPath = path4.isAbsolute(ref) ? ref : path4.resolve(projectDir, ref);
12527
+ if (!fs4.existsSync(absPath)) {
12528
+ return { error: `skill install: path not found: ${ref}` };
12529
+ }
12530
+ let skillDir;
12531
+ let skillMdPath;
12532
+ if (fs4.statSync(absPath).isDirectory()) {
12533
+ skillDir = absPath;
12534
+ skillMdPath = path4.join(absPath, "SKILL.md");
12535
+ } else if (path4.basename(absPath) === "SKILL.md") {
12536
+ skillDir = path4.dirname(absPath);
12537
+ skillMdPath = absPath;
12538
+ } else {
12539
+ return {
12540
+ error: `skill install: expected a directory containing SKILL.md or a SKILL.md file: ${ref}`
12541
+ };
12542
+ }
12543
+ if (!fs4.existsSync(skillMdPath)) {
12544
+ return { error: `skill install: no SKILL.md found at ${skillDir}` };
12545
+ }
12546
+ try {
12547
+ const { frontmatter } = parseFrontmatter(
12548
+ fs4.readFileSync(skillMdPath, "utf-8")
12549
+ );
12550
+ return { name: frontmatter.name, source: ref, path: skillDir };
12551
+ } catch (error) {
12552
+ const message = error instanceof Error ? error.message : String(error);
12553
+ return { error: `skill install: invalid SKILL.md (${message})` };
12554
+ }
12555
+ }
12556
+ function parseArgs2(args, context) {
12557
+ let project = false;
12558
+ let global = false;
12559
+ const positional = [];
12560
+ for (const arg of args) {
12561
+ if (arg === "--project") {
12562
+ project = true;
12563
+ } else if (arg === "--global") {
12564
+ global = true;
12565
+ } else if (arg.startsWith("--")) {
12566
+ return { error: `Unknown flag for skill ${context}: ${arg}` };
12567
+ } else {
12568
+ positional.push(arg);
12569
+ }
12570
+ }
12571
+ if (project && global) {
12572
+ return {
12573
+ error: `skill ${context}: --project and --global are mutually exclusive`
12574
+ };
12575
+ }
12576
+ return { project, global, positional };
12577
+ }
12578
+ function runSkillCommand(input, deps = {}) {
12579
+ const readGlobal = deps.readGlobalConfig ?? readGlobalConfig;
12580
+ const readProject = deps.readProjectConfig ?? readConfig;
12581
+ const writeGlobal = deps.writeGlobalConfig ?? writeGlobalConfig;
12582
+ const writeProject = deps.writeProjectConfig ?? writeProjectConfig;
12583
+ const resolveSkill = deps.resolveSkill ?? resolvePersonalSkill;
12584
+ const logError = deps.logError ?? console.error;
12585
+ const logOut = deps.logOut ?? console.log;
12586
+ const { subcommand } = input;
12587
+ if (subcommand === "install") {
12588
+ const parsed = parseArgs2(input.subcommandArgs, "install");
12589
+ if ("error" in parsed) {
12590
+ logError(parsed.error);
12591
+ return 1;
12592
+ }
12593
+ const ref = parsed.positional[0];
12594
+ if (!ref) {
12595
+ logError(
12596
+ "skill install: missing skill path. Usage: skill install <path>"
12597
+ );
12598
+ return 1;
12599
+ }
12600
+ const resolved = resolveSkill(ref, input.projectDir);
12601
+ if ("error" in resolved) {
12602
+ logError(resolved.error);
12603
+ return 1;
12604
+ }
12605
+ const layer = parsed.project ? "project" : "global";
12606
+ const existing = (layer === "project" ? readProject(input.projectDir).skills : readGlobal().skills) ?? [];
12607
+ const overwriting = existing.some((s) => s.name === resolved.name);
12608
+ const next = [...existing.filter((s) => s.name !== resolved.name), resolved];
12609
+ if (layer === "project") {
12610
+ writeProject(input.projectDir, { skills: next });
12611
+ } else {
12612
+ writeGlobal({ skills: next });
12613
+ }
12614
+ logOut(
12615
+ `${overwriting ? "Reinstalled" : "Installed"} personal skill '${resolved.name}' [${layer}]`
12616
+ );
12617
+ return 0;
12618
+ }
12619
+ if (subcommand === "list") {
12620
+ const parsed = parseArgs2(input.subcommandArgs, "list");
12621
+ if ("error" in parsed) {
12622
+ logError(parsed.error);
12623
+ return 1;
12624
+ }
12625
+ const listSingleLayer = (skills2, label) => {
12626
+ if (skills2.length === 0) {
12627
+ logOut(`No personal skills configured (${label}).`);
12628
+ return;
12629
+ }
12630
+ logOut(`Personal skills (${label}):`);
12631
+ for (const skill of skills2) {
12632
+ logOut(` ${skill.name} ${skill.source}`);
12633
+ }
12634
+ };
12635
+ if (parsed.global) {
12636
+ listSingleLayer(readGlobal().skills ?? [], "global");
12637
+ return 0;
12638
+ }
12639
+ if (parsed.project) {
12640
+ listSingleLayer(readProject(input.projectDir).skills ?? [], "project");
12641
+ return 0;
12642
+ }
12643
+ const { skills } = resolveEffectiveCapabilities({
12644
+ globalConfig: readGlobal(),
12645
+ projectConfig: readProject(input.projectDir)
12646
+ });
12647
+ if (skills.length === 0) {
12648
+ logOut("No personal skills configured.");
12649
+ return 0;
12650
+ }
12651
+ logOut("Personal skills (effective):");
12652
+ for (const skill of skills) {
12653
+ logOut(` ${skill.name} ${skill.source} [${skill.sourceLayer}]`);
12654
+ }
12655
+ return 0;
12656
+ }
12657
+ if (subcommand === "remove") {
12658
+ const parsed = parseArgs2(input.subcommandArgs, "remove");
12659
+ if ("error" in parsed) {
12660
+ logError(parsed.error);
12661
+ return 1;
12662
+ }
12663
+ const target = parsed.positional[0];
12664
+ if (!target) {
12665
+ logError("skill remove: missing skill name or source");
12666
+ return 1;
12667
+ }
12668
+ const layer = parsed.project ? "project" : "global";
12669
+ const existing = (layer === "project" ? readProject(input.projectDir).skills : readGlobal().skills) ?? [];
12670
+ const next = existing.filter((s) => s.name !== target && s.source !== target);
12671
+ if (next.length === existing.length) {
12672
+ logError(
12673
+ `skill remove: no personal skill '${target}' found in ${layer} config`
12674
+ );
12675
+ return 1;
12676
+ }
12677
+ if (layer === "project") {
12678
+ writeProject(input.projectDir, { skills: next });
12679
+ } else {
12680
+ writeGlobal({ skills: next });
12681
+ }
12682
+ logOut(`Removed personal skill '${target}' [${layer}]`);
12683
+ return 0;
12684
+ }
12685
+ logError(`Unknown skill subcommand: ${subcommand}`);
12686
+ return 1;
12687
+ }
12688
+
12354
12689
  // src/app/entry/marketplaceCommand.ts
12355
12690
  var DEFAULT_MARKETPLACE_SLUG3 = "lespaceman/athena-workflow-marketplace";
12356
12691
  var USAGE2 = `Usage: athena-flow marketplace <subcommand>
@@ -12466,9 +12801,9 @@ Default: ${DEFAULT_MARKETPLACE_SLUG3}`
12466
12801
  }
12467
12802
 
12468
12803
  // src/app/entry/channelCommand.ts
12469
- import fs4 from "fs";
12804
+ import fs5 from "fs";
12470
12805
  import os3 from "os";
12471
- import path4 from "path";
12806
+ import path5 from "path";
12472
12807
  var USAGE3 = `Usage: athena-flow channel telegram configure --bot-token <token> --user-id <id> [--chat-id <id>]
12473
12808
 
12474
12809
  Configures ~/.config/athena/channels/telegram.json and enables telegram in the global channels list.`;
@@ -12479,16 +12814,16 @@ function parseTelegramId(flagName, value) {
12479
12814
  return Number(value);
12480
12815
  }
12481
12816
  function writeTelegramChannelConfig(config) {
12482
- const dir = path4.join(os3.homedir(), ".config", "athena", "channels");
12483
- const configPath = path4.join(dir, "telegram.json");
12484
- fs4.mkdirSync(dir, { recursive: true, mode: 448 });
12485
- fs4.writeFileSync(configPath, JSON.stringify(config, null, 2) + "\n", {
12817
+ const dir = path5.join(os3.homedir(), ".config", "athena", "channels");
12818
+ const configPath = path5.join(dir, "telegram.json");
12819
+ fs5.mkdirSync(dir, { recursive: true, mode: 448 });
12820
+ fs5.writeFileSync(configPath, JSON.stringify(config, null, 2) + "\n", {
12486
12821
  encoding: "utf-8",
12487
12822
  mode: 384
12488
12823
  });
12489
12824
  if (process.platform !== "win32") {
12490
- fs4.chmodSync(dir, 448);
12491
- fs4.chmodSync(configPath, 384);
12825
+ fs5.chmodSync(dir, 448);
12826
+ fs5.chmodSync(configPath, 384);
12492
12827
  }
12493
12828
  }
12494
12829
  function runChannelCommand(input, deps = {}) {
@@ -12535,22 +12870,22 @@ function runChannelCommand(input, deps = {}) {
12535
12870
  // src/app/entry/dashboardCommand.ts
12536
12871
  import crypto3 from "crypto";
12537
12872
  import { spawn } from "child_process";
12538
- import fs6 from "fs";
12873
+ import fs7 from "fs";
12539
12874
  import { createRequire } from "module";
12540
12875
  import os5 from "os";
12541
- import path6 from "path";
12876
+ import path7 from "path";
12542
12877
  import { fileURLToPath } from "url";
12543
12878
 
12544
12879
  // src/infra/daemon/serviceUnit.ts
12545
- import fs5 from "fs";
12880
+ import fs6 from "fs";
12546
12881
  import os4 from "os";
12547
- import path5 from "path";
12882
+ import path6 from "path";
12548
12883
  function installServiceUnit(options) {
12549
12884
  const platform = options.platform ?? process.platform;
12550
12885
  const env2 = options.env ?? process.env;
12551
12886
  const home = env2["HOME"] ?? os4.homedir();
12552
12887
  if (platform === "darwin") {
12553
- const target = options.targetPath ?? path5.join(home, "Library", "LaunchAgents", "ai.drisp.daemon.plist");
12888
+ const target = options.targetPath ?? path6.join(home, "Library", "LaunchAgents", "ai.drisp.daemon.plist");
12554
12889
  const paths = daemonStatePaths(env2);
12555
12890
  const plist = renderLaunchdPlist({
12556
12891
  label: "ai.drisp.daemon",
@@ -12570,7 +12905,7 @@ function installServiceUnit(options) {
12570
12905
  };
12571
12906
  }
12572
12907
  if (platform === "linux") {
12573
- const target = options.targetPath ?? path5.join(home, ".config", "systemd", "user", "drisp-daemon.service");
12908
+ const target = options.targetPath ?? path6.join(home, ".config", "systemd", "user", "drisp-daemon.service");
12574
12909
  const unit = renderSystemdUnit({
12575
12910
  description: "Drisp dashboard runtime daemon",
12576
12911
  nodeBinary: options.nodeBinary,
@@ -12592,16 +12927,16 @@ function installServiceUnit(options) {
12592
12927
  };
12593
12928
  }
12594
12929
  function writeIfChanged(target, content) {
12595
- const dir = path5.dirname(target);
12596
- fs5.mkdirSync(dir, { recursive: true, mode: 448 });
12930
+ const dir = path6.dirname(target);
12931
+ fs6.mkdirSync(dir, { recursive: true, mode: 448 });
12597
12932
  let existing = null;
12598
12933
  try {
12599
- existing = fs5.readFileSync(target, "utf-8");
12934
+ existing = fs6.readFileSync(target, "utf-8");
12600
12935
  } catch (err) {
12601
12936
  if (err.code !== "ENOENT") throw err;
12602
12937
  }
12603
12938
  if (existing === content) return;
12604
- fs5.writeFileSync(target, content, { mode: 384 });
12939
+ fs6.writeFileSync(target, content, { mode: 384 });
12605
12940
  }
12606
12941
  function renderLaunchdPlist(input) {
12607
12942
  const argv = [input.nodeBinary, input.daemonEntry].map((s) => ` <string>${escapeXml(s)}</string>`).join("\n");
@@ -12702,7 +13037,7 @@ var cachedVersion = null;
12702
13037
  function readPackageVersion() {
12703
13038
  if (cachedVersion !== null) return cachedVersion;
12704
13039
  try {
12705
- const injected = "0.5.24";
13040
+ const injected = "0.5.28";
12706
13041
  if (typeof injected === "string" && injected.length > 0) {
12707
13042
  cachedVersion = injected;
12708
13043
  return cachedVersion;
@@ -13689,11 +14024,11 @@ function resolveDaemonEntry() {
13689
14024
  return null;
13690
14025
  }
13691
14026
  const candidates = [
13692
- path6.join(path6.dirname(here), "dashboard-daemon.js"),
14027
+ path7.join(path7.dirname(here), "dashboard-daemon.js"),
13693
14028
  // When invoked via `npm run start`, `here` may be the unbundled source
13694
14029
  // path. Walk up until we hit a `dist/` sibling.
13695
- path6.join(
13696
- path6.dirname(here),
14030
+ path7.join(
14031
+ path7.dirname(here),
13697
14032
  "..",
13698
14033
  "..",
13699
14034
  "..",
@@ -13703,7 +14038,7 @@ function resolveDaemonEntry() {
13703
14038
  ];
13704
14039
  for (const candidate of candidates) {
13705
14040
  try {
13706
- fs6.accessSync(candidate, fs6.constants.R_OK);
14041
+ fs7.accessSync(candidate, fs7.constants.R_OK);
13707
14042
  return candidate;
13708
14043
  } catch {
13709
14044
  }
@@ -13888,14 +14223,14 @@ async function defaultTailDaemonLog(opts) {
13888
14223
  let stream2 = null;
13889
14224
  let watcher = null;
13890
14225
  try {
13891
- const stat = fs6.statSync(paths.logPath);
14226
+ const stat = fs7.statSync(paths.logPath);
13892
14227
  const size = stat.size;
13893
14228
  const buf = Buffer.alloc(Math.min(size, opts.tail * 1024));
13894
- const fd = fs6.openSync(paths.logPath, "r");
14229
+ const fd = fs7.openSync(paths.logPath, "r");
13895
14230
  try {
13896
- fs6.readSync(fd, buf, 0, buf.length, Math.max(0, size - buf.length));
14231
+ fs7.readSync(fd, buf, 0, buf.length, Math.max(0, size - buf.length));
13897
14232
  } finally {
13898
- fs6.closeSync(fd);
14233
+ fs7.closeSync(fd);
13899
14234
  }
13900
14235
  const lines = buf.toString("utf-8").split("\n").filter((l) => l.length > 0);
13901
14236
  const tail = lines.slice(-opts.tail);
@@ -13913,22 +14248,22 @@ async function defaultTailDaemonLog(opts) {
13913
14248
  }
13914
14249
  throw err;
13915
14250
  }
13916
- let position = fs6.statSync(paths.logPath).size;
14251
+ let position = fs7.statSync(paths.logPath).size;
13917
14252
  return await new Promise((resolve) => {
13918
14253
  let pollTimer = null;
13919
14254
  const drain = () => {
13920
14255
  try {
13921
- const stat = fs6.statSync(paths.logPath);
14256
+ const stat = fs7.statSync(paths.logPath);
13922
14257
  if (stat.size < position) {
13923
14258
  position = 0;
13924
14259
  }
13925
14260
  if (stat.size > position) {
13926
- const fd = fs6.openSync(paths.logPath, "r");
14261
+ const fd = fs7.openSync(paths.logPath, "r");
13927
14262
  const buf = Buffer.alloc(stat.size - position);
13928
14263
  try {
13929
- fs6.readSync(fd, buf, 0, buf.length, position);
14264
+ fs7.readSync(fd, buf, 0, buf.length, position);
13930
14265
  } finally {
13931
- fs6.closeSync(fd);
14266
+ fs7.closeSync(fd);
13932
14267
  }
13933
14268
  position = stat.size;
13934
14269
  process.stdout.write(buf);
@@ -13943,7 +14278,7 @@ async function defaultTailDaemonLog(opts) {
13943
14278
  }
13944
14279
  };
13945
14280
  try {
13946
- watcher = fs6.watch(paths.logPath, { persistent: true }, () => {
14281
+ watcher = fs7.watch(paths.logPath, { persistent: true }, () => {
13947
14282
  drain();
13948
14283
  });
13949
14284
  } catch {
@@ -14147,8 +14482,8 @@ function parsePairedRunner(raw) {
14147
14482
 
14148
14483
  // src/app/entry/gatewayCommand.ts
14149
14484
  import { spawn as spawn2 } from "child_process";
14150
- import fs7 from "fs";
14151
- import path7 from "path";
14485
+ import fs8 from "fs";
14486
+ import path8 from "path";
14152
14487
  import { fileURLToPath as fileURLToPath2 } from "url";
14153
14488
  var USAGE5 = `Usage: athena-flow gateway <subcommand> [--json]
14154
14489
 
@@ -14167,12 +14502,12 @@ Subcommands:
14167
14502
  reload-channels Reload channel sidecars without restarting the daemon.
14168
14503
  `;
14169
14504
  function defaultResolveDaemonEntry() {
14170
- const here = path7.dirname(fileURLToPath2(import.meta.url));
14171
- return path7.resolve(here, "athena-gateway.js");
14505
+ const here = path8.dirname(fileURLToPath2(import.meta.url));
14506
+ return path8.resolve(here, "athena-gateway.js");
14172
14507
  }
14173
14508
  function readToken(tokenPath) {
14174
14509
  try {
14175
- return fs7.readFileSync(tokenPath, "utf-8").trim();
14510
+ return fs8.readFileSync(tokenPath, "utf-8").trim();
14176
14511
  } catch (err) {
14177
14512
  const code = err.code;
14178
14513
  if (code === "ENOENT") {
@@ -14522,9 +14857,9 @@ import process7 from "process";
14522
14857
 
14523
14858
  // src/harnesses/claude/system/doctorEnvironment.ts
14524
14859
  import { execFileSync } from "child_process";
14525
- import * as fs8 from "fs";
14860
+ import * as fs9 from "fs";
14526
14861
  import * as os6 from "os";
14527
- import * as path8 from "path";
14862
+ import * as path9 from "path";
14528
14863
  var MANAGED_POLICY_KEYS = [
14529
14864
  "forceLoginMethod",
14530
14865
  "forceLoginOrgUUID",
@@ -14628,8 +14963,8 @@ function collectEnvironment(options = {}) {
14628
14963
  const detectVersion = options.detectClaudeVersionFn ?? detectClaudeVersion;
14629
14964
  const runAuthStatus = options.runClaudeAuthStatusFn ?? runClaudeAuthStatus;
14630
14965
  const resolveForwarder = options.resolveHookForwarderCommandFn ?? resolveHookForwarderCommand;
14631
- const statFn = options.statFn ?? ((p) => fs8.statSync(p));
14632
- const readFileFn = options.readFileFn ?? ((p) => fs8.readFileSync(p, "utf8"));
14966
+ const statFn = options.statFn ?? ((p) => fs9.statSync(p));
14967
+ const readFileFn = options.readFileFn ?? ((p) => fs9.readFileSync(p, "utf8"));
14633
14968
  const settingsPaths = resolveClaudeSettingsSurfacePaths(
14634
14969
  homeDir,
14635
14970
  cwd,
@@ -14674,7 +15009,7 @@ function collectEnvironment(options = {}) {
14674
15009
  });
14675
15010
  let globalConfigPresent = false;
14676
15011
  try {
14677
- statFn(path8.join(homeDir, ".claude.json"));
15012
+ statFn(path9.join(homeDir, ".claude.json"));
14678
15013
  globalConfigPresent = true;
14679
15014
  } catch {
14680
15015
  globalConfigPresent = false;
@@ -15082,16 +15417,65 @@ async function runDoctorCommand(options) {
15082
15417
  return exitCode;
15083
15418
  }
15084
15419
 
15420
+ // src/app/entry/runsCommand.ts
15421
+ function formatAge(nowMs, thenMs) {
15422
+ const minutes = Math.max(0, Math.round((nowMs - thenMs) / 6e4));
15423
+ if (minutes < 60) return `${minutes}m ago`;
15424
+ const hours = Math.round(minutes / 60);
15425
+ if (hours < 48) return `${hours}h ago`;
15426
+ return `${Math.round(hours / 24)}d ago`;
15427
+ }
15428
+ function formatRun(run, nowMs) {
15429
+ const lines = [];
15430
+ lines.push(
15431
+ `\u25CF ${run.workflowName ?? "(no workflow)"} \u2014 awaiting attention (${formatAge(
15432
+ nowMs,
15433
+ run.sessionUpdatedAt
15434
+ )})`
15435
+ );
15436
+ lines.push(` session: ${run.athenaSessionId}`);
15437
+ lines.push(` project: ${run.projectDir}`);
15438
+ if (run.stopReason) {
15439
+ lines.push(` reason: ${run.stopReason}`);
15440
+ }
15441
+ lines.push(
15442
+ ` wake it: athena-flow exec --continue=${run.athenaSessionId} "<your reply>"`
15443
+ );
15444
+ return lines.join("\n");
15445
+ }
15446
+ function runRunsCommand(input) {
15447
+ const log = input.log ?? console.log;
15448
+ const listRunsFn = input.listRunsFn ?? listAwaitingAttentionRuns;
15449
+ const runs = listRunsFn(input.projectDir);
15450
+ if (input.json) {
15451
+ log(JSON.stringify({ awaitingAttention: runs }, null, 2));
15452
+ return 0;
15453
+ }
15454
+ if (runs.length === 0) {
15455
+ log("No workflow runs are awaiting attention.");
15456
+ return 0;
15457
+ }
15458
+ const now = Date.now();
15459
+ log(
15460
+ `${runs.length} workflow run${runs.length === 1 ? "" : "s"} awaiting attention:
15461
+ `
15462
+ );
15463
+ for (const run of runs) {
15464
+ log(formatRun(run, now) + "\n");
15465
+ }
15466
+ return 0;
15467
+ }
15468
+
15085
15469
  // src/app/entry/cli.tsx
15086
- import { jsx as jsx25 } from "react/jsx-runtime";
15470
+ import { jsx as jsx24 } from "react/jsx-runtime";
15087
15471
  function resolvePackageJsonPath(entryUrl) {
15088
- let currentDir = path9.dirname(fileURLToPath3(entryUrl));
15472
+ let currentDir = path10.dirname(fileURLToPath3(entryUrl));
15089
15473
  for (; ; ) {
15090
- const candidatePath = path9.join(currentDir, "package.json");
15091
- if (fs9.existsSync(candidatePath)) {
15474
+ const candidatePath = path10.join(currentDir, "package.json");
15475
+ if (fs10.existsSync(candidatePath)) {
15092
15476
  return candidatePath;
15093
15477
  }
15094
- const parentDir = path9.dirname(currentDir);
15478
+ const parentDir = path10.dirname(currentDir);
15095
15479
  if (parentDir === currentDir) {
15096
15480
  throw new Error("Could not locate package.json for CLI metadata.");
15097
15481
  }
@@ -15104,8 +15488,11 @@ var KNOWN_COMMANDS = /* @__PURE__ */ new Set([
15104
15488
  "setup",
15105
15489
  "sessions",
15106
15490
  "resume",
15491
+ "runs",
15107
15492
  "exec",
15108
15493
  "workflow",
15494
+ "mcp",
15495
+ "skill",
15109
15496
  "marketplace",
15110
15497
  "channel",
15111
15498
  "gateway",
@@ -15182,6 +15569,38 @@ function printExecDryRunSummary(runtimeConfig, context) {
15182
15569
  lines.push(
15183
15570
  ` plugin mcp config: ${runtimeConfig.pluginMcpConfig ?? "<none>"}`
15184
15571
  );
15572
+ const mcpLabel = "personal mcp servers:";
15573
+ const skillLabel = "personal skills:";
15574
+ const personalLabelWidth = mcpLabel.length;
15575
+ lines.push(" personal capabilities:");
15576
+ if (runtimeConfig.personalMcpServers.length === 0) {
15577
+ lines.push(` ${mcpLabel.padEnd(personalLabelWidth)} <none>`);
15578
+ } else {
15579
+ lines.push(` ${mcpLabel}`);
15580
+ for (const server of runtimeConfig.personalMcpServers) {
15581
+ lines.push(` - ${server.name} [${server.sourceLayer}]`);
15582
+ }
15583
+ }
15584
+ if (runtimeConfig.personalSkills.length === 0) {
15585
+ lines.push(` ${skillLabel.padEnd(personalLabelWidth)} <none>`);
15586
+ } else {
15587
+ lines.push(` ${skillLabel}`);
15588
+ for (const skill of runtimeConfig.personalSkills) {
15589
+ lines.push(` - ${skill.name} [${skill.sourceLayer}]`);
15590
+ }
15591
+ }
15592
+ const { mcpServers: conflictMcp, skills: conflictSkills } = runtimeConfig.capabilityConflicts;
15593
+ if (conflictMcp.length === 0 && conflictSkills.length === 0) {
15594
+ lines.push(" conflicts (shadowed by workflow plugin): <none>");
15595
+ } else {
15596
+ lines.push(" conflicts (shadowed by workflow plugin):");
15597
+ for (const server of conflictMcp) {
15598
+ lines.push(` - ${server.name} [${server.sourceLayer}]`);
15599
+ }
15600
+ for (const skill of conflictSkills) {
15601
+ lines.push(` - ${skill.name} [${skill.sourceLayer}]`);
15602
+ }
15603
+ }
15185
15604
  for (const line of lines) {
15186
15605
  console.log(line);
15187
15606
  }
@@ -15210,8 +15629,11 @@ var cli = meow(
15210
15629
  setup Re-run setup wizard
15211
15630
  sessions Launch interactive session picker
15212
15631
  resume [sessionId] Resume most recent (or specified) session
15632
+ runs List workflow runs awaiting attention and how to wake them
15213
15633
  exec "<prompt>" Run non-interactively (CI/script mode)
15214
15634
  workflow <sub> Manage workflows (install, list, search, remove, upgrade, use)
15635
+ mcp <sub> Manage personal MCP servers (add, remove, list)
15636
+ skill <sub> Manage personal skills (install, remove, list)
15215
15637
  marketplace <sub> Manage marketplace sources (add, refresh, remove, list)
15216
15638
  channel <sub> Manage external channels
15217
15639
  dashboard <sub> Manage dashboard pairing and runtime daemon (pair, status, daemon, unpair)
@@ -15394,6 +15816,10 @@ var cli = meow(
15394
15816
  type: "boolean",
15395
15817
  default: false
15396
15818
  },
15819
+ env: {
15820
+ type: "string",
15821
+ isMultiple: true
15822
+ },
15397
15823
  printApiKey: {
15398
15824
  type: "boolean",
15399
15825
  default: false
@@ -15405,7 +15831,7 @@ var cli = meow(
15405
15831
  }
15406
15832
  );
15407
15833
  async function main() {
15408
- const projectDir = path9.resolve(cli.flags.projectDir);
15834
+ const projectDir = path10.resolve(cli.flags.projectDir);
15409
15835
  const [command, ...commandArgs] = cli.input;
15410
15836
  if (command && !KNOWN_COMMANDS.has(command)) {
15411
15837
  console.error(
@@ -15449,9 +15875,9 @@ Available commands: ${[...KNOWN_COMMANDS].join(", ")}`
15449
15875
  await exitWith(1);
15450
15876
  return;
15451
15877
  }
15452
- const { default: WorkflowInstallWizard } = await import("./WorkflowInstallWizard-IMU47QWB.js");
15878
+ const { default: WorkflowInstallWizard } = await import("./WorkflowInstallWizard-7OSOOVS2.js");
15453
15879
  const { waitUntilExit } = render(
15454
- /* @__PURE__ */ jsx25(
15880
+ /* @__PURE__ */ jsx24(
15455
15881
  WorkflowInstallWizard,
15456
15882
  {
15457
15883
  source: resolvedSource,
@@ -15470,6 +15896,40 @@ Available commands: ${[...KNOWN_COMMANDS].join(", ")}`
15470
15896
  );
15471
15897
  return;
15472
15898
  }
15899
+ if (command === "mcp") {
15900
+ const rawArgs = process.argv.slice(2);
15901
+ const dashIdx = rawArgs.indexOf("--");
15902
+ const serverCommandTokens = dashIdx >= 0 ? rawArgs.slice(dashIdx + 1) : [];
15903
+ const cleanArgs = serverCommandTokens.length > 0 ? commandArgs.slice(0, commandArgs.length - serverCommandTokens.length) : commandArgs;
15904
+ const [subcommand = "", ...subcommandArgs] = cleanArgs;
15905
+ if (cli.flags.project) subcommandArgs.push("--project");
15906
+ if (cli.flags.global) subcommandArgs.push("--global");
15907
+ for (const entry of cli.flags.env ?? []) {
15908
+ subcommandArgs.push("--env", entry);
15909
+ }
15910
+ await exitWith(
15911
+ runMcpCommand({
15912
+ subcommand,
15913
+ subcommandArgs,
15914
+ serverCommandTokens,
15915
+ projectDir
15916
+ })
15917
+ );
15918
+ return;
15919
+ }
15920
+ if (command === "skill") {
15921
+ const [subcommand = "", ...subcommandArgs] = commandArgs;
15922
+ if (cli.flags.project) subcommandArgs.push("--project");
15923
+ if (cli.flags.global) subcommandArgs.push("--global");
15924
+ await exitWith(
15925
+ runSkillCommand({
15926
+ subcommand,
15927
+ subcommandArgs,
15928
+ projectDir
15929
+ })
15930
+ );
15931
+ return;
15932
+ }
15473
15933
  if (command === "marketplace") {
15474
15934
  const [subcommand = "", ...subcommandArgs] = commandArgs;
15475
15935
  await exitWith(runMarketplaceCommand({ subcommand, subcommandArgs }));
@@ -15535,6 +15995,14 @@ Available commands: ${[...KNOWN_COMMANDS].join(", ")}`
15535
15995
  );
15536
15996
  return;
15537
15997
  }
15998
+ if (command === "runs") {
15999
+ await exitWith(
16000
+ runRunsCommand({
16001
+ json: Boolean(cli.flags.json)
16002
+ })
16003
+ );
16004
+ return;
16005
+ }
15538
16006
  if (command === "doctor") {
15539
16007
  const harness = typeof cli.flags.harness === "string" && cli.flags.harness || "claude";
15540
16008
  await exitWith(
@@ -15596,8 +16064,8 @@ Available commands: ${[...KNOWN_COMMANDS].join(", ")}`
15596
16064
  const showSetup = command === "exec" ? false : shouldShowSetup({
15597
16065
  cliInput: cli.input,
15598
16066
  setupComplete: globalConfig.setupComplete,
15599
- globalConfigExists: fs9.existsSync(
15600
- path9.join(os7.homedir(), ".config", "athena", "config.json")
16067
+ globalConfigExists: fs10.existsSync(
16068
+ path10.join(os7.homedir(), ".config", "athena", "config.json")
15601
16069
  )
15602
16070
  });
15603
16071
  let runtimeConfig;
@@ -15690,7 +16158,7 @@ Available commands: ${[...KNOWN_COMMANDS].join(", ")}`
15690
16158
  const { athenaSessionId, initialSessionId } = interactiveSession;
15691
16159
  const instanceId = process.pid;
15692
16160
  render(
15693
- /* @__PURE__ */ jsx25(
16161
+ /* @__PURE__ */ jsx24(
15694
16162
  App,
15695
16163
  {
15696
16164
  projectDir,