@drisp/cli 0.5.20 → 0.5.22

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/README.md CHANGED
@@ -107,6 +107,8 @@ Manage marketplace sources:
107
107
  ```bash
108
108
  drisp marketplace add owner/repo # Add a marketplace source
109
109
  drisp marketplace add ./local/path # Add a local marketplace
110
+ drisp marketplace refresh # Refresh configured remote sources
111
+ drisp marketplace refresh owner/repo # Refresh one remote source
110
112
  drisp marketplace list # List configured sources
111
113
  drisp marketplace remove owner/repo # Remove a source
112
114
  ```
@@ -248,7 +250,7 @@ Config merges in order: **global → project → CLI flags**.
248
250
  | `resume [id]` | Resume most recent or specific session |
249
251
  | `exec "<prompt>"` | Headless run for CI / scripting |
250
252
  | `workflow <sub>` | `install` · `list` · `search` · `remove` · `upgrade` · `use` |
251
- | `marketplace <sub>` | `add` · `remove` · `list` |
253
+ | `marketplace <sub>` | `add` · `refresh` · `remove` · `list` |
252
254
 
253
255
  </details>
254
256
 
@@ -8,7 +8,7 @@ import {
8
8
  installWorkflowPlugins,
9
9
  resolveWorkflow,
10
10
  writeGlobalConfig
11
- } from "./chunk-FLS4B7JS.js";
11
+ } from "./chunk-DSWRVUOO.js";
12
12
 
13
13
  // src/setup/steps/WorkflowInstallWizard.tsx
14
14
  import { useState, useEffect, useCallback, useRef } from "react";
@@ -92,4 +92,4 @@ function WorkflowInstallWizard({ source, onDone }) {
92
92
  export {
93
93
  WorkflowInstallWizard as default
94
94
  };
95
- //# sourceMappingURL=WorkflowInstallWizard-KP7AEBPQ.js.map
95
+ //# sourceMappingURL=WorkflowInstallWizard-IPLYZPLS.js.map
@@ -2440,7 +2440,7 @@ var cachedVersion = null;
2440
2440
  function readVersion() {
2441
2441
  if (cachedVersion !== null) return cachedVersion;
2442
2442
  try {
2443
- const injected = "0.5.20";
2443
+ const injected = "0.5.22";
2444
2444
  if (typeof injected === "string" && injected.length > 0) {
2445
2445
  cachedVersion = injected;
2446
2446
  return cachedVersion;
@@ -361,7 +361,7 @@ var WorkflowNotFoundError = class extends Error {
361
361
  constructor(workflowName, searchedSources) {
362
362
  const sourceList = searchedSources.length ? searchedSources.join(", ") : "(no marketplaces configured)";
363
363
  super(
364
- `Workflow "${workflowName}" not found in any configured marketplace (searched: ${sourceList}).`
364
+ `Workflow "${workflowName}" not found in any configured marketplace (searched: ${sourceList}). If this workflow was recently added, run \`athena-flow marketplace refresh\` and try again.`
365
365
  );
366
366
  this.name = "WorkflowNotFoundError";
367
367
  this.workflowName = workflowName;
@@ -840,6 +840,12 @@ function refreshVersionedMarketplacePluginTarget(ref, version, sourceRepoDir) {
840
840
  }
841
841
 
842
842
  // src/infra/plugins/marketplace.ts
843
+ function pullMarketplaceRepo(owner, repo) {
844
+ const outcome = refreshMarketplaceRepo(owner, repo);
845
+ if (!outcome.ok) {
846
+ throw new MarketplaceRefreshError(outcome);
847
+ }
848
+ }
843
849
  function resolveMarketplacePlugin(ref) {
844
850
  requireGitForMarketplace("plugins");
845
851
  const { pluginName, owner, repo } = parseRef(ref);
@@ -2218,6 +2224,7 @@ export {
2218
2224
  resolveMarketplaceWorkflow,
2219
2225
  gatherMarketplaceWorkflowSources,
2220
2226
  resolveWorkflowInstall,
2227
+ pullMarketplaceRepo,
2221
2228
  projectConfigPath,
2222
2229
  readConfig,
2223
2230
  resolveActiveWorkflow,
@@ -2237,4 +2244,4 @@ export {
2237
2244
  compileWorkflowPlan,
2238
2245
  collectMcpServersWithOptions
2239
2246
  };
2240
- //# sourceMappingURL=chunk-FLS4B7JS.js.map
2247
+ //# sourceMappingURL=chunk-DSWRVUOO.js.map
@@ -34,7 +34,7 @@ import {
34
34
  resolveWorkflow,
35
35
  resolveWorkflowInstall,
36
36
  resolveWorkflowPlugins
37
- } from "./chunk-FLS4B7JS.js";
37
+ } from "./chunk-DSWRVUOO.js";
38
38
 
39
39
  // src/infra/daemon/stateDir.ts
40
40
  import fs from "fs";
@@ -18237,4 +18237,4 @@ export {
18237
18237
  startUdsServer,
18238
18238
  sendUdsRequest
18239
18239
  };
18240
- //# sourceMappingURL=chunk-3PA63KQW.js.map
18240
+ //# sourceMappingURL=chunk-HXW5N4GE.js.map
package/dist/cli.js CHANGED
@@ -97,7 +97,7 @@ import {
97
97
  writeAttachmentMirror,
98
98
  writeGatewayClientConfig,
99
99
  wsClientOptionsForEndpoint
100
- } from "./chunk-3PA63KQW.js";
100
+ } from "./chunk-HXW5N4GE.js";
101
101
  import {
102
102
  generateId as generateId2
103
103
  } from "./chunk-BTKQ67RE.js";
@@ -144,6 +144,7 @@ import {
144
144
  listMarketplaceWorkflowsFromRepo,
145
145
  listWorkflows,
146
146
  projectConfigPath,
147
+ pullMarketplaceRepo,
147
148
  readConfig,
148
149
  readGlobalConfig,
149
150
  removeWorkflow,
@@ -157,7 +158,7 @@ import {
157
158
  useWorkflowSessionController,
158
159
  writeGlobalConfig,
159
160
  writeProjectConfig
160
- } from "./chunk-FLS4B7JS.js";
161
+ } from "./chunk-DSWRVUOO.js";
161
162
 
162
163
  // src/app/entry/cli.tsx
163
164
  import { render } from "ink";
@@ -5552,6 +5553,7 @@ function pagerContentRows() {
5552
5553
  function usePager({
5553
5554
  displayedEntriesRef,
5554
5555
  feedCursorId,
5556
+ mouseEnabled = true,
5555
5557
  theme
5556
5558
  }) {
5557
5559
  const [pagerActive, setPagerActive] = useState10(false);
@@ -5626,9 +5628,11 @@ function usePager({
5626
5628
  pagerScrollRef.current = 0;
5627
5629
  lastPairedPostRef.current = entry.pairedPostEvent;
5628
5630
  process5.stdout.write("\x1B[?1049h");
5629
- process5.stdout.write("\x1B[?1000h\x1B[?1006h");
5631
+ if (mouseEnabled) {
5632
+ process5.stdout.write("\x1B[?1000h\x1B[?1006h");
5633
+ }
5630
5634
  paintPager();
5631
- }, [pagerActive, paintPager, theme]);
5635
+ }, [mouseEnabled, pagerActive, paintPager, theme]);
5632
5636
  useEffect9(() => {
5633
5637
  if (!pagerActive) return;
5634
5638
  if (pagerLinesRef.current.length === 0) return;
@@ -5741,7 +5745,7 @@ function usePager({
5741
5745
  return () => {
5742
5746
  process5.stdin.removeListener("data", onData);
5743
5747
  };
5744
- }, [pagerActive, scrollPager]);
5748
+ }, [mouseEnabled, pagerActive, scrollPager]);
5745
5749
  return { pagerActive, handleExpandForPager };
5746
5750
  }
5747
5751
 
@@ -5766,6 +5770,7 @@ function buildFrameLines(ctx) {
5766
5770
  [h.space, "Toggle"],
5767
5771
  [h.enter, "Jump"],
5768
5772
  ["a", "Prompt"],
5773
+ ["Fn-drag", "Select"],
5769
5774
  [h.escape, "Back"]
5770
5775
  ]);
5771
5776
  }
@@ -5780,6 +5785,7 @@ function buildFrameLines(ctx) {
5780
5785
  inputPairs.push(
5781
5786
  [h.tab, "Focus"],
5782
5787
  ["\u2303P/N", "History"],
5788
+ ["Fn-drag", "Select"],
5783
5789
  [h.toggle, "Hints"]
5784
5790
  );
5785
5791
  return buildHintPairs(inputPairs);
@@ -5791,7 +5797,8 @@ function buildFrameLines(ctx) {
5791
5797
  ["u/a/b", "Filter"],
5792
5798
  ["/", "Cmds"],
5793
5799
  [":", "Search"],
5794
- ["End", "Tail"]
5800
+ ["End", "Tail"],
5801
+ ["Fn-drag", "Select"]
5795
5802
  ];
5796
5803
  if (ctx.isClaudeRunning) {
5797
5804
  messagePairs.push([`${h.escape} ${h.escape}`, "Interrupt"]);
@@ -5810,7 +5817,8 @@ function buildFrameLines(ctx) {
5810
5817
  ["y", "Yank"],
5811
5818
  ["/", "Cmds"],
5812
5819
  [":", "Search"],
5813
- ["End", "Tail"]
5820
+ ["End", "Tail"],
5821
+ ["Fn-drag", "Select"]
5814
5822
  ];
5815
5823
  if (ctx.isClaudeRunning) {
5816
5824
  feedPairs.push([`${h.escape} ${h.escape}`, "Interrupt"]);
@@ -6258,7 +6266,7 @@ function renderSegments(segments, summary, width, theme, opTag, error = false) {
6258
6266
  if (usedWidth >= width) break;
6259
6267
  const remaining = width - usedWidth;
6260
6268
  const normalizedText = normalizePathPrefix(seg.text);
6261
- const text = normalizedText.length > remaining ? normalizedText.slice(0, remaining) : normalizedText;
6269
+ const text = normalizedText.length > remaining ? fit(normalizedText, remaining) : normalizedText;
6262
6270
  const styled = source_default.hex(roleColor(seg.role))(text);
6263
6271
  result += shouldDim ? source_default.dim(styled) : styled;
6264
6272
  usedWidth += text.length;
@@ -6500,7 +6508,7 @@ function lineParts({
6500
6508
  const detail = formatDetails({
6501
6509
  segments: detailSummaryInfo.segments,
6502
6510
  summary: detailSummaryInfo.summary,
6503
- outcome: entry.summaryOutcome,
6511
+ outcome: errorActive ? entry.summaryOutcome : void 0,
6504
6512
  outcomeZero: entry.summaryOutcomeZero,
6505
6513
  error: errorActive,
6506
6514
  mode: "full",
@@ -9779,6 +9787,7 @@ function AppContent({
9779
9787
  const [workflowPickerVisible, setWorkflowPickerVisible] = useState18(!hadWorkflowOnMount);
9780
9788
  const [workflowPickerDismissible, setWorkflowPickerDismissible] = useState18(hadWorkflowOnMount);
9781
9789
  const [modelPickerVisible, setModelPickerVisible] = useState18(false);
9790
+ const [mouseMode, setMouseMode] = useState18("on");
9782
9791
  const [uiState, setUiState] = useState18(initialSessionUiState);
9783
9792
  const [toastMessage, setToastMessage] = useState18(null);
9784
9793
  const [diagnosticsConsent, setDiagnosticsConsent] = useState18(initialTelemetryDiagnosticsConsent);
@@ -10219,6 +10228,8 @@ function AppContent({
10219
10228
  addMessage: addMessageObj,
10220
10229
  exit,
10221
10230
  clearScreen,
10231
+ mouseMode,
10232
+ setMouseMode,
10222
10233
  showSessions: onShowSessions,
10223
10234
  showSetup: onShowSetup,
10224
10235
  showWorkflowPicker: () => {
@@ -10280,6 +10291,7 @@ function AppContent({
10280
10291
  runtimeError,
10281
10292
  exit,
10282
10293
  clearScreen,
10294
+ mouseMode,
10283
10295
  onShowSessions,
10284
10296
  onShowSetup,
10285
10297
  metrics,
@@ -10628,6 +10640,7 @@ function AppContent({
10628
10640
  const { pagerActive, handleExpandForPager } = usePager({
10629
10641
  displayedEntriesRef: displayedFeedEntriesRef,
10630
10642
  feedCursorId: feedNav.feedCursorId,
10643
+ mouseEnabled: mouseMode === "on",
10631
10644
  theme
10632
10645
  });
10633
10646
  useGlobalKeyboard({
@@ -10718,7 +10731,7 @@ function AppContent({
10718
10731
  }
10719
10732
  });
10720
10733
  usePanelMouseWheel({
10721
- isActive: !dialogActive && !pagerActive && !workflowPickerVisible && !modelPickerVisible,
10734
+ isActive: mouseMode === "on" && !dialogActive && !pagerActive && !workflowPickerVisible && !modelPickerVisible,
10722
10735
  rects: panelMouseRects,
10723
10736
  onFeedFocus: () => dispatchUi({ type: "set_focus_mode", focusMode: "feed" }),
10724
10737
  onMessageFocus: splitMode ? () => dispatchUi({ type: "set_focus_mode", focusMode: "messages" }) : void 0,
@@ -11659,11 +11672,21 @@ var helpCommand = {
11659
11672
  const aliases = cmd.aliases?.length ? ` (${cmd.aliases.map((a) => `/${a}`).join(", ")})` : "";
11660
11673
  return ` /${cmd.name}${aliases} - ${cmd.description}`;
11661
11674
  });
11675
+ const interactionHints = [
11676
+ "",
11677
+ "Interaction:",
11678
+ " Mouse wheel - scroll the panel under the pointer when mouse mode is on",
11679
+ " Click - focus the panel under the pointer when mouse mode is on",
11680
+ " y - copy the focused message/detail to clipboard",
11681
+ " /mouse off - disable app mouse handling for native terminal drag selection",
11682
+ " /mouse on - restore panel wheel scrolling and click focus",
11683
+ " Fn-drag - native terminal text selection on macOS terminals that reserve mouse drag for the app"
11684
+ ];
11662
11685
  ctx.addMessage({
11663
11686
  id: generateId2(),
11664
11687
  role: "assistant",
11665
11688
  content: `Available commands:
11666
- ${lines.join("\n")}`,
11689
+ ${lines.join("\n")}${interactionHints.join("\n")}`,
11667
11690
  timestamp: /* @__PURE__ */ new Date()
11668
11691
  });
11669
11692
  }
@@ -11841,6 +11864,49 @@ var modelCommand = {
11841
11864
  }
11842
11865
  };
11843
11866
 
11867
+ // src/app/commands/builtins/mouse.ts
11868
+ var mouseCommand = {
11869
+ name: "mouse",
11870
+ description: "Show or change terminal mouse mode",
11871
+ category: "ui",
11872
+ args: [
11873
+ {
11874
+ name: "mode",
11875
+ description: "on, off, or toggle",
11876
+ required: false
11877
+ }
11878
+ ],
11879
+ execute: (ctx) => {
11880
+ const rawMode = ctx.args["mode"]?.toLowerCase();
11881
+ if (!rawMode) {
11882
+ ctx.addMessage({
11883
+ id: generateId2(),
11884
+ role: "assistant",
11885
+ content: ctx.mouseMode === "on" ? "Mouse mode is on. Wheel scrolls panels; use /mouse off for native drag selection." : "Mouse mode is off. Terminal drag selection is native; use /mouse on to restore panel wheel scrolling.",
11886
+ timestamp: /* @__PURE__ */ new Date()
11887
+ });
11888
+ return;
11889
+ }
11890
+ if (rawMode !== "on" && rawMode !== "off" && rawMode !== "toggle") {
11891
+ ctx.addMessage({
11892
+ id: generateId2(),
11893
+ role: "assistant",
11894
+ content: "Usage: /mouse [on|off|toggle]",
11895
+ timestamp: /* @__PURE__ */ new Date()
11896
+ });
11897
+ return;
11898
+ }
11899
+ const nextMode = rawMode === "toggle" ? ctx.mouseMode === "on" ? "off" : "on" : rawMode;
11900
+ ctx.setMouseMode(nextMode);
11901
+ ctx.addMessage({
11902
+ id: generateId2(),
11903
+ role: "assistant",
11904
+ content: nextMode === "on" ? "Mouse mode on: wheel scrolls panels and clicks focus panels." : "Mouse mode off: terminal drag selection is native; use keyboard navigation or /mouse on to restore wheel scrolling.",
11905
+ timestamp: /* @__PURE__ */ new Date()
11906
+ });
11907
+ }
11908
+ };
11909
+
11844
11910
  // src/app/commands/builtins/index.ts
11845
11911
  var builtins = [
11846
11912
  helpCommand,
@@ -11853,7 +11919,8 @@ var builtins = [
11853
11919
  setup_default,
11854
11920
  telemetryCommand,
11855
11921
  workflowCommand,
11856
- modelCommand
11922
+ modelCommand,
11923
+ mouseCommand
11857
11924
  ];
11858
11925
  var registered = false;
11859
11926
  function registerBuiltins() {
@@ -12285,11 +12352,13 @@ var USAGE2 = `Usage: athena-flow marketplace <subcommand>
12285
12352
 
12286
12353
  Subcommands
12287
12354
  add <source> Add a marketplace source (owner/repo or local path)
12355
+ refresh [source] Refresh remote marketplace source(s)
12288
12356
  remove <source> Remove a configured marketplace source
12289
12357
  list List configured marketplace sources`;
12290
12358
  function runMarketplaceCommand(input, deps = {}) {
12291
12359
  const listMarketplace = deps.listMarketplaceWorkflows ?? listMarketplaceWorkflows;
12292
12360
  const listMarketplaceFromRepo = deps.listMarketplaceWorkflowsFromRepo ?? listMarketplaceWorkflowsFromRepo;
12361
+ const pullMarketplace = deps.pullMarketplaceRepo ?? pullMarketplaceRepo;
12293
12362
  const resolveMarketplaceSource = deps.resolveWorkflowMarketplaceSource ?? resolveWorkflowMarketplaceSource;
12294
12363
  const readConfig2 = deps.readGlobalConfig ?? readGlobalConfig;
12295
12364
  const writeConfig = deps.writeGlobalConfig ?? writeGlobalConfig;
@@ -12326,6 +12395,30 @@ function runMarketplaceCommand(input, deps = {}) {
12326
12395
  return 1;
12327
12396
  }
12328
12397
  }
12398
+ case "refresh": {
12399
+ const requested = input.subcommandArgs[0];
12400
+ const configuredSources = readConfig2().workflowMarketplaceSources;
12401
+ const sources = requested ? [requested] : configuredSources && configuredSources.length > 0 ? configuredSources : [DEFAULT_MARKETPLACE_SLUG3];
12402
+ let failures = 0;
12403
+ for (const source of sources) {
12404
+ try {
12405
+ const resolvedSource = resolveMarketplaceSource(source);
12406
+ if (resolvedSource.kind === "remote") {
12407
+ pullMarketplace(resolvedSource.owner, resolvedSource.repo);
12408
+ logOut(`Refreshed marketplace: ${resolvedSource.slug}`);
12409
+ } else {
12410
+ listMarketplaceFromRepo(resolvedSource.repoDir);
12411
+ logOut(
12412
+ `Local marketplace does not require refresh: ${resolvedSource.repoDir}`
12413
+ );
12414
+ }
12415
+ } catch (error) {
12416
+ failures += 1;
12417
+ logError(fmtError(error));
12418
+ }
12419
+ }
12420
+ return failures > 0 ? 1 : 0;
12421
+ }
12329
12422
  case "remove": {
12330
12423
  const source = input.subcommandArgs[0];
12331
12424
  if (!source) {
@@ -12604,7 +12697,7 @@ var cachedVersion = null;
12604
12697
  function readPackageVersion() {
12605
12698
  if (cachedVersion !== null) return cachedVersion;
12606
12699
  try {
12607
- const injected = "0.5.20";
12700
+ const injected = "0.5.22";
12608
12701
  if (typeof injected === "string" && injected.length > 0) {
12609
12702
  cachedVersion = injected;
12610
12703
  return cachedVersion;
@@ -15114,7 +15207,7 @@ var cli = meow(
15114
15207
  resume [sessionId] Resume most recent (or specified) session
15115
15208
  exec "<prompt>" Run non-interactively (CI/script mode)
15116
15209
  workflow <sub> Manage workflows (install, list, search, remove, upgrade, use)
15117
- marketplace <sub> Manage marketplace sources (add, remove, list)
15210
+ marketplace <sub> Manage marketplace sources (add, refresh, remove, list)
15118
15211
  channel <sub> Manage external channels
15119
15212
  dashboard <sub> Manage dashboard pairing and runtime daemon (pair, status, daemon, unpair)
15120
15213
  telemetry [action] Manage anonymous telemetry (enable/disable/status)
@@ -15351,7 +15444,7 @@ Available commands: ${[...KNOWN_COMMANDS].join(", ")}`
15351
15444
  await exitWith(1);
15352
15445
  return;
15353
15446
  }
15354
- const { default: WorkflowInstallWizard } = await import("./WorkflowInstallWizard-KP7AEBPQ.js");
15447
+ const { default: WorkflowInstallWizard } = await import("./WorkflowInstallWizard-IPLYZPLS.js");
15355
15448
  const { waitUntilExit } = render(
15356
15449
  /* @__PURE__ */ jsx25(
15357
15450
  WorkflowInstallWizard,
@@ -3,13 +3,13 @@ import {
3
3
  ensureDaemonStateDir,
4
4
  runDashboardRuntimeDaemon,
5
5
  startUdsServer
6
- } from "./chunk-3PA63KQW.js";
6
+ } from "./chunk-HXW5N4GE.js";
7
7
  import "./chunk-BTKQ67RE.js";
8
8
  import {
9
9
  readDashboardClientConfig,
10
10
  refreshDashboardAccessToken
11
11
  } from "./chunk-BTY7MYYT.js";
12
- import "./chunk-FLS4B7JS.js";
12
+ import "./chunk-DSWRVUOO.js";
13
13
 
14
14
  // src/infra/daemon/logFile.ts
15
15
  import fs from "fs";
package/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "hooks",
18
18
  "dashboard"
19
19
  ],
20
- "version": "0.5.20",
20
+ "version": "0.5.22",
21
21
  "license": "MIT",
22
22
  "bin": {
23
23
  "athena": "dist/cli.js",