@staff0rd/assist 0.1242.1 → 0.1243.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/.build-files +22 -20
  2. package/dist/built-version +1 -1
  3. package/dist/chunk-7FGWWOVO.js +49 -0
  4. package/dist/{chunk-TZ63Z24T.js → chunk-GKRLPB3D.js} +1 -1
  5. package/dist/{chunk-HZBKJZNB.js → chunk-GPTEPLA4.js} +9 -9
  6. package/dist/{chunk-V77DTDMI.js → chunk-HBWLFJSN.js} +4 -4
  7. package/dist/{chunk-O533L26O.js → chunk-QMBNUR7U.js} +4 -4
  8. package/dist/{chunk-VIJS3NOM.js → chunk-RM5PQGPB.js} +1 -1
  9. package/dist/{chunk-VRZ2CLBW.js → chunk-RUHAC73Q.js} +1 -48
  10. package/dist/{chunk-CUXEYG7A.js → chunk-SJFRDRTL.js} +1 -1
  11. package/dist/commands/sessions/web/bundle.js +1 -1
  12. package/dist/{doctorNodes-A4I64EXG.js → doctorNodes-DGZACZ3L.js} +6 -6
  13. package/dist/index.js +22 -19
  14. package/dist/listRunConfigs-IEXOWLTP.js +139 -0
  15. package/dist/{restartNode-BJDZ67YV.js → restartNode-4RCWBHKE.js} +6 -6
  16. package/dist/{run-NC7F3P3I.js → run-NWDVQKAM.js} +9 -118
  17. package/dist/{runDaemon-TX7UAWPY.js → runDaemon-LA3KD7E4.js} +6 -6
  18. package/dist/{signExtension-TW2JPQRS.js → signExtension-FIZZC6VF.js} +1 -1
  19. package/dist/{updateNode-3X5MHTEF.js → updateNode-Q4M6LCR2.js} +6 -6
  20. package/dist/{watchWait-VSXR6ZKH.js → watchWait-UT5EKZTO.js} +4 -2
  21. package/dist/{web-RKS3OVZV.js → web-D4FOQVFW.js} +7 -7
  22. package/dist/{web-W7FKLVX5.js → web-YUD22YVO.js} +7 -7
  23. package/package.json +1 -1
  24. package/dist/{decideSession-QROGLJD6.js → decideSession-O4VMOG6G.js} +1 -1
  25. package/dist/{linkNode-O5XQI73P.js → linkNode-FSIYAV5T.js} +3 -3
  26. package/dist/{listNodes-PAFFJVWX.js → listNodes-LFFJV5VO.js} +3 -3
  27. package/dist/{sessionPreviews-KLHCZ2TA.js → sessionPreviews-3YAUFNES.js} +1 -1
package/dist/index.js CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-TJGF3Z72.js";
18
18
  import {
19
19
  package_default
20
- } from "./chunk-VIJS3NOM.js";
20
+ } from "./chunk-RM5PQGPB.js";
21
21
  import {
22
22
  adviceConfigHelp,
23
23
  askQuestionConfigHelp,
@@ -93,7 +93,7 @@ import { Command } from "commander";
93
93
  // src/commands/registerRootAction.ts
94
94
  function registerRootAction(program) {
95
95
  program.option("--no-open", "Do not open a browser on startup").action(
96
- async (options) => (await import("./web-RKS3OVZV.js")).web({
96
+ async (options) => (await import("./web-D4FOQVFW.js")).web({
97
97
  port: "3100",
98
98
  open: options.open
99
99
  })
@@ -646,7 +646,7 @@ function registerShowCommands(cmd) {
646
646
 
647
647
  // src/commands/registerBacklog.ts
648
648
  function registerWebCommand(cmd) {
649
- cmd.command("web").description("Open the backlog tab in the web dashboard").option("-p, --port <number>", "Port to listen on", "3100").option("--no-open", "Do not open a browser on startup").action(lazyAction(() => import("./web-W7FKLVX5.js"), "web"));
649
+ cmd.command("web").description("Open the backlog tab in the web dashboard").option("-p, --port <number>", "Port to listen on", "3100").option("--no-open", "Do not open a browser on startup").action(lazyAction(() => import("./web-YUD22YVO.js"), "web"));
650
650
  }
651
651
  var registrars = [
652
652
  registerItemCommands,
@@ -676,7 +676,7 @@ function registerBacklog(program) {
676
676
  const { setBacklogDir } = await import("./getBacklogDir-C7FLPFSR.js");
677
677
  setBacklogDir(thisCommand.opts().dir);
678
678
  }).action(
679
- async (options) => (await import("./web-W7FKLVX5.js")).web({ port: "3100", open: options.open })
679
+ async (options) => (await import("./web-YUD22YVO.js")).web({ port: "3100", open: options.open })
680
680
  );
681
681
  for (const register of registrars) {
682
682
  register(cmd);
@@ -989,7 +989,7 @@ function registerExtension(program) {
989
989
  ).action(async (options) => {
990
990
  const { extension } = await import("./extension-YYRD5EM6.js");
991
991
  const { printExtensionUrl } = await import("./printExtensionUrl-IW2WTSNS.js");
992
- const { signExtension } = await import("./signExtension-TW2JPQRS.js");
992
+ const { signExtension } = await import("./signExtension-FIZZC6VF.js");
993
993
  if (options.url) return printExtensionUrl();
994
994
  return options.sign ? signExtension() : extension();
995
995
  });
@@ -2527,7 +2527,7 @@ function registerWatchWait(watchCommand) {
2527
2527
  "--build [entry]",
2528
2528
  "After a successful pull, run this run entry (default auto-build), then run assist sync --yes when the pulled commits touched the files sync installs; exit 4 with the output of whichever fails"
2529
2529
  ).action(
2530
- async (options) => (await import("./watchWait-VSXR6ZKH.js")).watchWait(options)
2530
+ async (options) => (await import("./watchWait-UT5EKZTO.js")).watchWait(options)
2531
2531
  ),
2532
2532
  "auto-update"
2533
2533
  );
@@ -2677,8 +2677,11 @@ function registerRunAdd(runCommand) {
2677
2677
 
2678
2678
  // src/commands/run/registerRunSubcommands.ts
2679
2679
  function registerRunSubcommands(runCommand) {
2680
- runCommand.command("list").description("List configured run commands").option("-v, --verbose", "Show full command details").action(
2681
- async (opts) => (await import("./run-NC7F3P3I.js")).listRunConfigs(!!opts.verbose)
2680
+ runCommand.command("list").description("List configured run commands").option("-v, --verbose", "Show full command details").option(
2681
+ "--json",
2682
+ "Print the merged entries as JSON, with every property and its source"
2683
+ ).action(
2684
+ async (opts) => (await import("./listRunConfigs-IEXOWLTP.js")).listRunConfigs(opts)
2682
2685
  );
2683
2686
  registerRunAdd(runCommand);
2684
2687
  runCommand.command("link").description("Link run configurations from another project's assist.yml").argument("<path>", "Relative path to the linked project").requiredOption("--prefix <prefix>", "Namespace prefix for linked commands").allowUnknownOption().action(lazyAction(() => import("./link-C3YQWYNR.js"), "link"));
@@ -2699,7 +2702,7 @@ function registerRun(program) {
2699
2702
  lazyHelpText(
2700
2703
  runCommand,
2701
2704
  async () => (await import("./formatConfiguredCommands-CWHXF4NL.js")).formatConfiguredCommands
2702
- ).action(lazyAction(() => import("./run-NC7F3P3I.js"), "run"));
2705
+ ).action(lazyAction(() => import("./run-NWDVQKAM.js"), "run"));
2703
2706
  configHelp(runCommand, runConfigHelp);
2704
2707
  registerRunSubcommands(runCommand);
2705
2708
  }
@@ -2709,7 +2712,7 @@ function registerDaemon(program) {
2709
2712
  const cmd = program.command("daemon").description("Long-lived daemon that owns web session PTYs");
2710
2713
  cmd.command("run").description(
2711
2714
  "Run the sessions daemon in the foreground (auto-spawned by assist sessions)"
2712
- ).action(lazyAction(() => import("./runDaemon-TX7UAWPY.js"), "runDaemon"));
2715
+ ).action(lazyAction(() => import("./runDaemon-LA3KD7E4.js"), "runDaemon"));
2713
2716
  cmd.command("status").description(
2714
2717
  "Show sessions daemon status, live sessions, and any stray daemon processes"
2715
2718
  ).action(lazyAction(() => import("./daemonStatus-AUHBSCVE.js"), "daemonStatus"));
@@ -2733,7 +2736,7 @@ function registerDiagnoseCommands(nodes, calledBy5) {
2733
2736
  nodes.command("doctor [name]").description(
2734
2737
  "Probe each hop of every link (or one) in order and stop at the first failure with a remediation"
2735
2738
  ).option("--json", "Output as JSON").action(
2736
- async (name, _options, command) => (await import("./doctorNodes-A4I64EXG.js")).doctorNodes(
2739
+ async (name, _options, command) => (await import("./doctorNodes-DGZACZ3L.js")).doctorNodes(
2737
2740
  name,
2738
2741
  command.optsWithGlobals()
2739
2742
  )
@@ -2755,7 +2758,7 @@ function registerLinkCommand(nodes) {
2755
2758
  ).option(
2756
2759
  "--tailscale <host>",
2757
2760
  "Dial the peer at https://<host>.<tailnet>.ts.net:<port> (the peer runs tailscale serve for its web server port)"
2758
- ).option("--port <port>", "The peer's web server port (with --tailscale)").action(lazyAction(() => import("./linkNode-O5XQI73P.js"), "linkNode"));
2761
+ ).option("--port <port>", "The peer's web server port (with --tailscale)").action(lazyAction(() => import("./linkNode-FSIYAV5T.js"), "linkNode"));
2759
2762
  }
2760
2763
 
2761
2764
  // src/commands/sessions/nodes/registerPeerActionCommands.ts
@@ -2763,14 +2766,14 @@ function registerPeerActionCommands(nodes, calledBy5) {
2763
2766
  internalCommand(
2764
2767
  nodes.command("restart <name>").description(
2765
2768
  "Restart a linked node's daemon and/or web server, wait for its link to reconnect and print its version"
2766
- ).option("--target <target>", "daemon, webserver or both", "both").action(lazyAction(() => import("./restartNode-BJDZ67YV.js"), "restartNode")),
2769
+ ).option("--target <target>", "daemon, webserver or both", "both").action(lazyAction(() => import("./restartNode-4RCWBHKE.js"), "restartNode")),
2767
2770
  calledBy5
2768
2771
  );
2769
2772
  internalCommand(
2770
2773
  nodes.command("update <name>").description(
2771
2774
  "Run assist update on a linked node, restart it, wait for its link to reconnect and print its version"
2772
2775
  ).action(
2773
- async (name) => (await import("./updateNode-3X5MHTEF.js")).updateNode(name)
2776
+ async (name) => (await import("./updateNode-Q4M6LCR2.js")).updateNode(name)
2774
2777
  ),
2775
2778
  calledBy5
2776
2779
  );
@@ -2780,7 +2783,7 @@ function registerPeerActionCommands(nodes, calledBy5) {
2780
2783
  var calledBy4 = "agents managing linked nodes";
2781
2784
  function registerNodes(sessions) {
2782
2785
  const cmd = internalCommand(
2783
- sessions.command("nodes").description("List this node and every linked node with its link state").option("--json", "Output as JSON").action(lazyAction(() => import("./listNodes-PAFFJVWX.js"), "listNodes")),
2786
+ sessions.command("nodes").description("List this node and every linked node with its link state").option("--json", "Output as JSON").action(lazyAction(() => import("./listNodes-LFFJV5VO.js"), "listNodes")),
2784
2787
  calledBy4
2785
2788
  );
2786
2789
  internalCommand(registerLinkCommand(cmd), calledBy4);
@@ -2843,7 +2846,7 @@ function collect7(value, previous) {
2843
2846
  function registerPreviewCommands(cmd) {
2844
2847
  cmd.command("previews").argument("<session-id>", SESSION_ID).description(
2845
2848
  "Show a session's pending preview: kind, title, body and a question form's options"
2846
- ).option("--json", "Print the pending preview as JSON (null when none)").action(lazyAction(() => import("./sessionPreviews-KLHCZ2TA.js"), "sessionPreviews"));
2849
+ ).option("--json", "Print the pending preview as JSON (null when none)").action(lazyAction(() => import("./sessionPreviews-3YAUFNES.js"), "sessionPreviews"));
2847
2850
  cmd.command("decide").argument("<session-id>", SESSION_ID).description(
2848
2851
  "Answer a session's pending preview, unblocking the command waiting on it"
2849
2852
  ).option(
@@ -2857,7 +2860,7 @@ function registerPreviewCommands(cmd) {
2857
2860
  "Answer a question form: <number|header>=<option label or own text>, or just <choice> for a single question; repeat per question or multi-select choice",
2858
2861
  collect7,
2859
2862
  []
2860
- ).action(lazyAction(() => import("./decideSession-QROGLJD6.js"), "decideSession"));
2863
+ ).action(lazyAction(() => import("./decideSession-O4VMOG6G.js"), "decideSession"));
2861
2864
  }
2862
2865
 
2863
2866
  // src/commands/sessions/registerSendCommand.ts
@@ -2894,7 +2897,7 @@ function registerSetStatusCommand(cmd) {
2894
2897
  // src/commands/sessions/registerSessionsWeb.ts
2895
2898
  function registerSessionsWeb(cmd) {
2896
2899
  const webCmd = cmd.command("web").description("Start the sessions web dashboard").option("-p, --port <number>", "Port to listen on", "3100").option("--no-open", "Do not open a browser on startup").action(
2897
- async (options, command) => (await import("./web-RKS3OVZV.js")).web({
2900
+ async (options, command) => (await import("./web-D4FOQVFW.js")).web({
2898
2901
  ...options,
2899
2902
  open: command.optsWithGlobals().open
2900
2903
  })
@@ -2909,7 +2912,7 @@ function registerSessionsWeb(cmd) {
2909
2912
  // src/commands/sessions/registerSessions.ts
2910
2913
  function registerSessions(program) {
2911
2914
  const cmd = program.command("sessions").description("Web dashboard for coding agent sessions").option("--no-open", "Do not open a browser on startup").action(
2912
- async (_options, command) => (await import("./web-RKS3OVZV.js")).web({
2915
+ async (_options, command) => (await import("./web-D4FOQVFW.js")).web({
2913
2916
  port: "3100",
2914
2917
  open: command.optsWithGlobals().open
2915
2918
  })
@@ -0,0 +1,139 @@
1
+ import {
2
+ exitNoRunConfigs,
3
+ requireRunConfigs
4
+ } from "./chunk-RUHAC73Q.js";
5
+ import {
6
+ runConfigBaseDirFrom
7
+ } from "./chunk-GZ6DNZKB.js";
8
+ import {
9
+ assertNoDuplicateRunNames,
10
+ resolveRunConfigs
11
+ } from "./chunk-P3TBNIM2.js";
12
+ import {
13
+ isRunLink
14
+ } from "./chunk-APZ6ZTDA.js";
15
+ import "./chunk-SYGYDZIB.js";
16
+ import {
17
+ getGlobalConfigPath,
18
+ loadConfigFrom,
19
+ loadRawConfigLayers,
20
+ projectConfigPathFrom
21
+ } from "./chunk-DFNJ6LGL.js";
22
+ import "./chunk-GRXFWFGP.js";
23
+ import "./chunk-TVQY3HPZ.js";
24
+ import "./chunk-CGYVYHMM.js";
25
+ import "./chunk-WXQ3EA5H.js";
26
+ import "./chunk-YNHUGE22.js";
27
+ import "./chunk-HN7MFXZ7.js";
28
+ import "./chunk-DZGYHAE7.js";
29
+ import "./chunk-3WJYRKC3.js";
30
+
31
+ // src/commands/run/formatRunEntry.ts
32
+ function formatRunSource(source) {
33
+ switch (source.kind) {
34
+ case "global":
35
+ return `global (${source.path})`;
36
+ case "user":
37
+ return "user (shared db)";
38
+ case "repo":
39
+ return source.from === "db" ? "repo override (shared db)" : "repo override (~/.assist.yml repos)";
40
+ case "project":
41
+ return `project (${source.path})`;
42
+ }
43
+ }
44
+ function formatParam(param) {
45
+ const attrs = [
46
+ param.required ? "required" : void 0,
47
+ param.default !== void 0 ? `default ${param.default}` : void 0,
48
+ param.description
49
+ ].filter((a) => a !== void 0);
50
+ return attrs.length ? `${param.name} (${attrs.join(", ")})` : param.name;
51
+ }
52
+ function propertyLines(config) {
53
+ const lines = [
54
+ ["cwd", config.cwd],
55
+ [
56
+ "env",
57
+ config.env && Object.entries(config.env).map(([k, v]) => `${k}=${v}`).join(" ")
58
+ ],
59
+ ["server", config.server === void 0 ? void 0 : String(config.server)],
60
+ ["port", config.port === void 0 ? void 0 : String(config.port)],
61
+ ["protocol", config.protocol],
62
+ ["path", config.path],
63
+ ["pre", config.pre?.join("; ")],
64
+ ["filter", config.filter],
65
+ ["quiet", config.quiet === void 0 ? void 0 : String(config.quiet)],
66
+ ["params", config.params?.map(formatParam).join(", ")]
67
+ ];
68
+ return lines.filter((l) => l[1] !== void 0);
69
+ }
70
+ function formatRunEntry(config, source) {
71
+ const args = config.args?.length ? ` ${config.args.join(" ")}` : "";
72
+ const props = [["source", formatRunSource(source)], ...propertyLines(config)];
73
+ return [
74
+ `${config.name}: ${config.command}${args}`,
75
+ ...props.map(([key, value]) => ` ${key}: ${value}`)
76
+ ].join("\n");
77
+ }
78
+
79
+ // src/commands/run/runEntrySourceOf.ts
80
+ function layerHas(layer, entry) {
81
+ const run = layer.run;
82
+ if (!Array.isArray(run)) return false;
83
+ return run.some(
84
+ (raw) => isRunLink(entry) ? raw.link === entry.link && raw.prefix === entry.prefix : raw.name === entry.name
85
+ );
86
+ }
87
+ function runEntrySourceOf(entry, layers) {
88
+ if (layerHas(layers.project, entry))
89
+ return { kind: "project", path: layers.projectPath };
90
+ if (layerHas(layers.repo, entry))
91
+ return { kind: "repo", from: layers.repoSource ?? "db" };
92
+ if (layerHas(layers.user, entry) && !layerHas(layers.global, entry))
93
+ return { kind: "user" };
94
+ return { kind: "global", path: layers.globalPath };
95
+ }
96
+
97
+ // src/commands/run/loadSourcedRunConfigs.ts
98
+ function loadSourcedRunConfigs(cwd, globalConfigPath = getGlobalConfigPath()) {
99
+ const { run: entries = [] } = loadConfigFrom(cwd, globalConfigPath);
100
+ const layers = loadRawConfigLayers(
101
+ cwd,
102
+ globalConfigPath,
103
+ projectConfigPathFrom(cwd)
104
+ );
105
+ const baseDir = runConfigBaseDirFrom(cwd);
106
+ const sourced = entries.flatMap((entry) => {
107
+ const source = runEntrySourceOf(entry, layers);
108
+ return resolveRunConfigs([entry], baseDir).map((config) => ({
109
+ config,
110
+ source
111
+ }));
112
+ });
113
+ assertNoDuplicateRunNames(sourced.map((s) => s.config));
114
+ return sourced;
115
+ }
116
+
117
+ // src/commands/run/listRunConfigs.ts
118
+ function listRunConfigs({ verbose, json }) {
119
+ if (json) {
120
+ const sourced2 = loadSourcedRunConfigs(process.cwd());
121
+ const entries = sourced2.map(({ config, source }) => ({
122
+ ...config,
123
+ source
124
+ }));
125
+ console.log(JSON.stringify(entries, null, 2));
126
+ return;
127
+ }
128
+ if (!verbose) {
129
+ for (const config of requireRunConfigs()) console.log(config.name);
130
+ return;
131
+ }
132
+ const sourced = loadSourcedRunConfigs(process.cwd());
133
+ if (sourced.length === 0) exitNoRunConfigs();
134
+ for (const { config, source } of sourced)
135
+ console.log(formatRunEntry(config, source));
136
+ }
137
+ export {
138
+ listRunConfigs
139
+ };
@@ -2,20 +2,20 @@ import {
2
2
  linkStatus,
3
3
  postToPeer,
4
4
  startPeerAction
5
- } from "./chunk-V77DTDMI.js";
6
- import "./chunk-O533L26O.js";
7
- import "./chunk-TZ63Z24T.js";
5
+ } from "./chunk-HBWLFJSN.js";
6
+ import "./chunk-QMBNUR7U.js";
7
+ import "./chunk-GKRLPB3D.js";
8
8
  import "./chunk-VABNWHSE.js";
9
9
  import "./chunk-DS2YJZZY.js";
10
+ import "./chunk-B7VOTF5Q.js";
10
11
  import "./chunk-4HKB2TAG.js";
11
- import "./chunk-CUXEYG7A.js";
12
+ import "./chunk-SJFRDRTL.js";
12
13
  import "./chunk-UJLBG2R3.js";
13
14
  import "./chunk-KJZDQHIL.js";
14
- import "./chunk-B7VOTF5Q.js";
15
15
  import "./chunk-E36L7ASL.js";
16
16
  import "./chunk-5H7EHZ3J.js";
17
17
  import "./chunk-GIHVMELY.js";
18
- import "./chunk-VIJS3NOM.js";
18
+ import "./chunk-RM5PQGPB.js";
19
19
  import "./chunk-SYGYDZIB.js";
20
20
  import "./chunk-DFNJ6LGL.js";
21
21
  import "./chunk-GRXFWFGP.js";
@@ -2,16 +2,16 @@ import {
2
2
  formatConfiguredCommands
3
3
  } from "./chunk-DBYW5DA7.js";
4
4
  import {
5
- exitNoRunConfigs,
6
- findRunConfig,
7
- lookupRunConfig,
8
- requireRunConfigs,
9
5
  resolveParams,
10
6
  runPreCommands
11
- } from "./chunk-VRZ2CLBW.js";
7
+ } from "./chunk-7FGWWOVO.js";
12
8
  import {
13
9
  resolveRunCwd
14
10
  } from "./chunk-T3GNPWG4.js";
11
+ import {
12
+ findRunConfig,
13
+ lookupRunConfig
14
+ } from "./chunk-RUHAC73Q.js";
15
15
  import {
16
16
  formatElapsed
17
17
  } from "./chunk-YKVLG4SZ.js";
@@ -72,9 +72,7 @@ import "./chunk-EKKGNYON.js";
72
72
  import "./chunk-A34UJJZF.js";
73
73
  import "./chunk-HCYGEBPW.js";
74
74
  import "./chunk-L363MNYZ.js";
75
- import {
76
- runConfigBaseDirFrom
77
- } from "./chunk-GZ6DNZKB.js";
75
+ import "./chunk-GZ6DNZKB.js";
78
76
  import "./chunk-WS2A65AP.js";
79
77
  import "./chunk-LV367MST.js";
80
78
  import "./chunk-DKX4FE2Z.js";
@@ -87,13 +85,8 @@ import "./chunk-IBPSXDUB.js";
87
85
  import "./chunk-QSXE3JSO.js";
88
86
  import "./chunk-H3LTWKTD.js";
89
87
  import "./chunk-XZSATLYY.js";
90
- import {
91
- assertNoDuplicateRunNames,
92
- resolveRunConfigs
93
- } from "./chunk-P3TBNIM2.js";
94
- import {
95
- isRunLink
96
- } from "./chunk-APZ6ZTDA.js";
88
+ import "./chunk-P3TBNIM2.js";
89
+ import "./chunk-APZ6ZTDA.js";
97
90
  import "./chunk-K4DJEFDZ.js";
98
91
  import "./chunk-D7UZLH36.js";
99
92
  import "./chunk-EW2ZM2PC.js";
@@ -107,12 +100,7 @@ import "./chunk-P23ZWXGY.js";
107
100
  import "./chunk-SQX66MN6.js";
108
101
  import "./chunk-BFXVOTXI.js";
109
102
  import "./chunk-SYGYDZIB.js";
110
- import {
111
- getGlobalConfigPath,
112
- loadConfigFrom,
113
- loadRawConfigLayers,
114
- projectConfigPathFrom
115
- } from "./chunk-DFNJ6LGL.js";
103
+ import "./chunk-DFNJ6LGL.js";
116
104
  import "./chunk-GRXFWFGP.js";
117
105
  import "./chunk-TVQY3HPZ.js";
118
106
  import "./chunk-CGYVYHMM.js";
@@ -126,92 +114,6 @@ import "./chunk-JJKKIBF5.js";
126
114
  import "./chunk-6DGPQ67E.js";
127
115
  import "./chunk-SSKHLBQB.js";
128
116
 
129
- // src/commands/run/formatRunEntry.ts
130
- function formatRunSource(source) {
131
- switch (source.kind) {
132
- case "global":
133
- return `global (${source.path})`;
134
- case "user":
135
- return "user (shared db)";
136
- case "repo":
137
- return source.from === "db" ? "repo override (shared db)" : "repo override (~/.assist.yml repos)";
138
- case "project":
139
- return `project (${source.path})`;
140
- }
141
- }
142
- function formatParam(param) {
143
- const attrs = [
144
- param.required ? "required" : void 0,
145
- param.default !== void 0 ? `default ${param.default}` : void 0,
146
- param.description
147
- ].filter((a) => a !== void 0);
148
- return attrs.length ? `${param.name} (${attrs.join(", ")})` : param.name;
149
- }
150
- function propertyLines(config) {
151
- const lines = [
152
- ["cwd", config.cwd],
153
- [
154
- "env",
155
- config.env && Object.entries(config.env).map(([k, v]) => `${k}=${v}`).join(" ")
156
- ],
157
- ["server", config.server === void 0 ? void 0 : String(config.server)],
158
- ["port", config.port === void 0 ? void 0 : String(config.port)],
159
- ["protocol", config.protocol],
160
- ["path", config.path],
161
- ["pre", config.pre?.join("; ")],
162
- ["filter", config.filter],
163
- ["quiet", config.quiet === void 0 ? void 0 : String(config.quiet)],
164
- ["params", config.params?.map(formatParam).join(", ")]
165
- ];
166
- return lines.filter((l) => l[1] !== void 0);
167
- }
168
- function formatRunEntry(config, source) {
169
- const args = config.args?.length ? ` ${config.args.join(" ")}` : "";
170
- const props = [["source", formatRunSource(source)], ...propertyLines(config)];
171
- return [
172
- `${config.name}: ${config.command}${args}`,
173
- ...props.map(([key, value]) => ` ${key}: ${value}`)
174
- ].join("\n");
175
- }
176
-
177
- // src/commands/run/runEntrySourceOf.ts
178
- function layerHas(layer, entry) {
179
- const run3 = layer.run;
180
- if (!Array.isArray(run3)) return false;
181
- return run3.some(
182
- (raw) => isRunLink(entry) ? raw.link === entry.link && raw.prefix === entry.prefix : raw.name === entry.name
183
- );
184
- }
185
- function runEntrySourceOf(entry, layers) {
186
- if (layerHas(layers.project, entry))
187
- return { kind: "project", path: layers.projectPath };
188
- if (layerHas(layers.repo, entry))
189
- return { kind: "repo", from: layers.repoSource ?? "db" };
190
- if (layerHas(layers.user, entry) && !layerHas(layers.global, entry))
191
- return { kind: "user" };
192
- return { kind: "global", path: layers.globalPath };
193
- }
194
-
195
- // src/commands/run/loadSourcedRunConfigs.ts
196
- function loadSourcedRunConfigs(cwd, globalConfigPath = getGlobalConfigPath()) {
197
- const { run: entries = [] } = loadConfigFrom(cwd, globalConfigPath);
198
- const layers = loadRawConfigLayers(
199
- cwd,
200
- globalConfigPath,
201
- projectConfigPathFrom(cwd)
202
- );
203
- const baseDir = runConfigBaseDirFrom(cwd);
204
- const sourced = entries.flatMap((entry) => {
205
- const source = runEntrySourceOf(entry, layers);
206
- return resolveRunConfigs([entry], baseDir).map((config) => ({
207
- config,
208
- source
209
- }));
210
- });
211
- assertNoDuplicateRunNames(sourced.map((s) => s.config));
212
- return sourced;
213
- }
214
-
215
117
  // src/commands/run/spawnRunCommand.ts
216
118
  function spawnRunCommand(command, args, env, cwd, quiet) {
217
119
  const start = Date.now();
@@ -232,16 +134,6 @@ Done in ${elapsed}`);
232
134
  }
233
135
 
234
136
  // src/commands/run.ts
235
- function listRunConfigs(verbose) {
236
- if (!verbose) {
237
- for (const config of requireRunConfigs()) console.log(config.name);
238
- return;
239
- }
240
- const sourced = loadSourcedRunConfigs(process.cwd());
241
- if (sourced.length === 0) exitNoRunConfigs();
242
- for (const { config, source } of sourced)
243
- console.log(formatRunEntry(config, source));
244
- }
245
137
  function execRunConfig(config, args) {
246
138
  const cwd = resolveRunCwd(config);
247
139
  if (config.pre) runPreCommands(config.pre, cwd);
@@ -283,6 +175,5 @@ async function run2(name, args) {
283
175
  execRunConfig(findRunConfig(name), args);
284
176
  }
285
177
  export {
286
- listRunConfigs,
287
178
  run2 as run
288
179
  };
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  parseQuestions
3
3
  } from "./chunk-XRWFZJJI.js";
4
+ import {
5
+ isPidAlive,
6
+ readDaemonPidFile
7
+ } from "./chunk-YRA6OXG2.js";
4
8
  import {
5
9
  cleanLeftoversEnabled,
6
10
  currentDeclared,
7
11
  nodeRuntimeMismatch
8
12
  } from "./chunk-52CSKRSE.js";
9
- import {
10
- isPidAlive,
11
- readDaemonPidFile
12
- } from "./chunk-YRA6OXG2.js";
13
13
  import {
14
14
  simulatedDivergenceNote,
15
15
  watchControlPaths
@@ -135,7 +135,7 @@ import {
135
135
  isHello,
136
136
  linkVersionCheck,
137
137
  negotiateProtocol
138
- } from "./chunk-CUXEYG7A.js";
138
+ } from "./chunk-SJFRDRTL.js";
139
139
  import {
140
140
  loadLinkSpecs
141
141
  } from "./chunk-UJLBG2R3.js";
@@ -279,7 +279,7 @@ import {
279
279
  import "./chunk-APZ6ZTDA.js";
280
280
  import "./chunk-K4DJEFDZ.js";
281
281
  import "./chunk-D7UZLH36.js";
282
- import "./chunk-VIJS3NOM.js";
282
+ import "./chunk-RM5PQGPB.js";
283
283
  import "./chunk-EW2ZM2PC.js";
284
284
  import "./chunk-OTSOBFW2.js";
285
285
  import {
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-W7TRZLEM.js";
10
10
  import {
11
11
  package_default
12
- } from "./chunk-VIJS3NOM.js";
12
+ } from "./chunk-RM5PQGPB.js";
13
13
 
14
14
  // src/commands/extension/signExtension.ts
15
15
  import { rm as rm2 } from "fs/promises";
@@ -2,16 +2,16 @@ import {
2
2
  linkStatus,
3
3
  postToPeer,
4
4
  startPeerAction
5
- } from "./chunk-V77DTDMI.js";
6
- import "./chunk-O533L26O.js";
7
- import "./chunk-TZ63Z24T.js";
5
+ } from "./chunk-HBWLFJSN.js";
6
+ import "./chunk-QMBNUR7U.js";
7
+ import "./chunk-GKRLPB3D.js";
8
8
  import "./chunk-VABNWHSE.js";
9
9
  import "./chunk-DS2YJZZY.js";
10
+ import "./chunk-B7VOTF5Q.js";
10
11
  import "./chunk-4HKB2TAG.js";
11
- import "./chunk-CUXEYG7A.js";
12
+ import "./chunk-SJFRDRTL.js";
12
13
  import "./chunk-UJLBG2R3.js";
13
14
  import "./chunk-KJZDQHIL.js";
14
- import "./chunk-B7VOTF5Q.js";
15
15
  import "./chunk-E36L7ASL.js";
16
16
  import "./chunk-5H7EHZ3J.js";
17
17
  import {
@@ -19,7 +19,7 @@ import {
19
19
  } from "./chunk-A7ONLVZD.js";
20
20
  import "./chunk-GIHVMELY.js";
21
21
  import "./chunk-2EW62DM5.js";
22
- import "./chunk-VIJS3NOM.js";
22
+ import "./chunk-RM5PQGPB.js";
23
23
  import "./chunk-SYGYDZIB.js";
24
24
  import "./chunk-DFNJ6LGL.js";
25
25
  import "./chunk-GRXFWFGP.js";
@@ -1,12 +1,14 @@
1
1
  import {
2
- findRunConfig,
3
2
  resolveParams,
4
3
  runPreCommands
5
- } from "./chunk-VRZ2CLBW.js";
4
+ } from "./chunk-7FGWWOVO.js";
6
5
  import {
7
6
  MissingRunCwdError,
8
7
  resolveRunCwd
9
8
  } from "./chunk-T3GNPWG4.js";
9
+ import {
10
+ findRunConfig
11
+ } from "./chunk-RUHAC73Q.js";
10
12
  import {
11
13
  simulatedDivergenceNote,
12
14
  watchControlPaths
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  web
3
- } from "./chunk-HZBKJZNB.js";
3
+ } from "./chunk-GPTEPLA4.js";
4
4
  import "./chunk-SURCYYQ6.js";
5
5
  import "./chunk-JNCFHWBK.js";
6
6
  import "./chunk-JM57BCD6.js";
7
- import "./chunk-O533L26O.js";
8
- import "./chunk-TZ63Z24T.js";
7
+ import "./chunk-XGWZHDYC.js";
8
+ import "./chunk-QMBNUR7U.js";
9
+ import "./chunk-GKRLPB3D.js";
9
10
  import "./chunk-VABNWHSE.js";
10
11
  import "./chunk-DS2YJZZY.js";
11
- import "./chunk-XGWZHDYC.js";
12
+ import "./chunk-B7VOTF5Q.js";
12
13
  import "./chunk-OBC7IRZM.js";
13
14
  import "./chunk-4HKB2TAG.js";
14
- import "./chunk-CUXEYG7A.js";
15
+ import "./chunk-SJFRDRTL.js";
15
16
  import "./chunk-UJLBG2R3.js";
16
17
  import "./chunk-KJZDQHIL.js";
17
- import "./chunk-B7VOTF5Q.js";
18
18
  import "./chunk-2KG6ZPX4.js";
19
19
  import "./chunk-Z2YQQYCQ.js";
20
20
  import "./chunk-VEZ3FL5H.js";
@@ -140,7 +140,7 @@ import "./chunk-P3TBNIM2.js";
140
140
  import "./chunk-APZ6ZTDA.js";
141
141
  import "./chunk-K4DJEFDZ.js";
142
142
  import "./chunk-D7UZLH36.js";
143
- import "./chunk-VIJS3NOM.js";
143
+ import "./chunk-RM5PQGPB.js";
144
144
  import "./chunk-7YNKDSEP.js";
145
145
  import "./chunk-YVL3NXEB.js";
146
146
  import "./chunk-UEWARAPX.js";
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  web
3
- } from "./chunk-HZBKJZNB.js";
3
+ } from "./chunk-GPTEPLA4.js";
4
4
  import "./chunk-SURCYYQ6.js";
5
5
  import "./chunk-JNCFHWBK.js";
6
6
  import "./chunk-JM57BCD6.js";
7
- import "./chunk-O533L26O.js";
8
- import "./chunk-TZ63Z24T.js";
7
+ import "./chunk-XGWZHDYC.js";
8
+ import "./chunk-QMBNUR7U.js";
9
+ import "./chunk-GKRLPB3D.js";
9
10
  import "./chunk-VABNWHSE.js";
10
11
  import "./chunk-DS2YJZZY.js";
11
- import "./chunk-XGWZHDYC.js";
12
+ import "./chunk-B7VOTF5Q.js";
12
13
  import "./chunk-OBC7IRZM.js";
13
14
  import "./chunk-4HKB2TAG.js";
14
- import "./chunk-CUXEYG7A.js";
15
+ import "./chunk-SJFRDRTL.js";
15
16
  import "./chunk-UJLBG2R3.js";
16
17
  import "./chunk-KJZDQHIL.js";
17
- import "./chunk-B7VOTF5Q.js";
18
18
  import "./chunk-2KG6ZPX4.js";
19
19
  import "./chunk-Z2YQQYCQ.js";
20
20
  import "./chunk-VEZ3FL5H.js";
@@ -140,7 +140,7 @@ import "./chunk-P3TBNIM2.js";
140
140
  import "./chunk-APZ6ZTDA.js";
141
141
  import "./chunk-K4DJEFDZ.js";
142
142
  import "./chunk-D7UZLH36.js";
143
- import "./chunk-VIJS3NOM.js";
143
+ import "./chunk-RM5PQGPB.js";
144
144
  import "./chunk-7YNKDSEP.js";
145
145
  import "./chunk-YVL3NXEB.js";
146
146
  import "./chunk-UEWARAPX.js";