@wirecat/cli-memo 0.131.62 → 0.131.64

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 (163) hide show
  1. package/dist/bin/memo.js +2 -2
  2. package/dist/bundle/{app-server-QBJG7OGQ.js → app-server-7KM4MSDA.js} +9 -9
  3. package/dist/bundle/{auto-Z4MEU5OY.js → auto-V3FUD6RW.js} +16 -16
  4. package/dist/bundle/{chunk-LK6D26RK.js → chunk-3SCHFNUH.js} +5 -5
  5. package/dist/bundle/{chunk-HGNWJJDT.js → chunk-3YNJBKGV.js} +13 -1
  6. package/dist/bundle/{chunk-Q3VEUHC7.js → chunk-6OS7PTOC.js} +3 -3
  7. package/dist/bundle/{chunk-2UCLF4AO.js → chunk-DXTNBVLV.js} +394 -115
  8. package/dist/bundle/{chunk-2VDRVJCR.js → chunk-EDBZEHAU.js} +5 -4
  9. package/dist/bundle/{chunk-H3COKFXP.js → chunk-FHZKHKBJ.js} +1651 -11
  10. package/dist/bundle/{chunk-TBSWOVM3.js → chunk-FKUA3BTM.js} +14 -14
  11. package/dist/bundle/{chunk-TSKGEK2S.js → chunk-LVLFLWGY.js} +3 -3
  12. package/dist/bundle/{chunk-O2NQCWRM.js → chunk-ML46T7UC.js} +8 -8
  13. package/dist/bundle/{chunk-XX37LSNV.js → chunk-MYXB2T77.js} +25 -1
  14. package/dist/bundle/{chunk-WDZOEBTE.js → chunk-NH3A5QTW.js} +2 -2
  15. package/dist/bundle/{chunk-6OZ2WI7Y.js → chunk-NIJZXGJN.js} +1 -1
  16. package/dist/bundle/{chunk-EGI6JHIA.js → chunk-NRHF7TQ4.js} +2 -2
  17. package/dist/bundle/{chunk-WDWKG7FJ.js → chunk-PVGK67AJ.js} +17 -0
  18. package/dist/bundle/{chunk-E5JQFEIQ.js → chunk-QHNAPLVB.js} +4 -4
  19. package/dist/bundle/{chunk-SJ55SMBE.js → chunk-QTF4ZXOL.js} +2 -1
  20. package/dist/bundle/chunk-T3LVSUNZ.js +301 -0
  21. package/dist/bundle/{chunk-OXBETHGN.js → chunk-UXAP7MNL.js} +4 -4
  22. package/dist/bundle/{chunk-3ZXWLFUG.js → chunk-VLUDHCCX.js} +3 -3
  23. package/dist/bundle/{chunk-KREN56SX.js → chunk-WINH45XG.js} +4 -4
  24. package/dist/bundle/{chunk-FD3OQYFL.js → chunk-XPT5PX7H.js} +4 -4
  25. package/dist/bundle/{chunk-SJ36WSEI.js → chunk-ZX6SWNSR.js} +3 -3
  26. package/dist/bundle/{command-contract-SIXWLKAS.js → command-contract-PLB2JGFJ.js} +2 -2
  27. package/dist/bundle/{entry-SFLEGFSN.js → entry-MUE6HWX3.js} +1 -1
  28. package/dist/bundle/{failure-B33C3BFU.js → failure-6SP64Q66.js} +14 -14
  29. package/dist/bundle/{first-run-ZKDGFY6P.js → first-run-3JYWLJCH.js} +1 -1
  30. package/dist/bundle/{first-screen-IQEU7XF2.js → first-screen-QH34AIFV.js} +3 -3
  31. package/dist/bundle/{mcp-Y4XMDC5Q.js → mcp-QX2D6EXA.js} +6 -6
  32. package/dist/bundle/memo.js +6 -6
  33. package/dist/bundle/{program-DSQWICNB.js → program-LXQLWUAG.js} +1789 -422
  34. package/dist/bundle/{server-IQILK5YP.js → server-L622PMVC.js} +9 -9
  35. package/dist/bundle/{server-ZHFC3PIP.js → server-MVJU7QG4.js} +19 -19
  36. package/dist/bundle/{server-NKI7SVK5.js → server-SJVP2XXD.js} +6 -6
  37. package/dist/bundle/{store-6H4FPFTX.js → store-M5QSIRWJ.js} +1 -1
  38. package/dist/bundle/{store-maintenance-command-IFVWSQMJ.js → store-maintenance-command-PQCO5ICC.js} +5 -5
  39. package/dist/bundle/{update-LR5BVLBD.js → update-MQUCCIBB.js} +15 -15
  40. package/dist/contract-overrides/search.js +2 -2
  41. package/dist/contract-overrides/search.js.map +1 -1
  42. package/dist/discovery/command.d.ts.map +1 -1
  43. package/dist/discovery/command.js +6 -0
  44. package/dist/discovery/command.js.map +1 -1
  45. package/dist/events/command.d.ts +4 -0
  46. package/dist/events/command.d.ts.map +1 -0
  47. package/dist/events/command.js +35 -0
  48. package/dist/events/command.js.map +1 -0
  49. package/dist/events/events.d.ts +52 -0
  50. package/dist/events/events.d.ts.map +1 -0
  51. package/dist/events/events.js +199 -0
  52. package/dist/events/events.js.map +1 -0
  53. package/dist/examples.d.ts.map +1 -1
  54. package/dist/examples.js +90 -3
  55. package/dist/examples.js.map +1 -1
  56. package/dist/finance/command.d.ts +1 -1
  57. package/dist/finance/command.d.ts.map +1 -1
  58. package/dist/finance/command.js +13 -30
  59. package/dist/finance/command.js.map +1 -1
  60. package/dist/finance/contracts-command.d.ts +12 -0
  61. package/dist/finance/contracts-command.d.ts.map +1 -0
  62. package/dist/finance/contracts-command.js +110 -0
  63. package/dist/finance/contracts-command.js.map +1 -0
  64. package/dist/finance/deals-command.d.ts.map +1 -1
  65. package/dist/finance/deals-command.js +5 -4
  66. package/dist/finance/deals-command.js.map +1 -1
  67. package/dist/finance/lines-command.d.ts +37 -0
  68. package/dist/finance/lines-command.d.ts.map +1 -0
  69. package/dist/finance/lines-command.js +70 -0
  70. package/dist/finance/lines-command.js.map +1 -0
  71. package/dist/finance/orders-command.d.ts.map +1 -1
  72. package/dist/finance/orders-command.js +5 -2
  73. package/dist/finance/orders-command.js.map +1 -1
  74. package/dist/finance/products-command.d.ts +12 -0
  75. package/dist/finance/products-command.d.ts.map +1 -0
  76. package/dist/finance/products-command.js +99 -0
  77. package/dist/finance/products-command.js.map +1 -0
  78. package/dist/finance/subscriptions-command.d.ts +12 -0
  79. package/dist/finance/subscriptions-command.d.ts.map +1 -0
  80. package/dist/finance/subscriptions-command.js +153 -0
  81. package/dist/finance/subscriptions-command.js.map +1 -0
  82. package/dist/finance/transactions-command.d.ts +12 -0
  83. package/dist/finance/transactions-command.d.ts.map +1 -0
  84. package/dist/finance/transactions-command.js +137 -0
  85. package/dist/finance/transactions-command.js.map +1 -0
  86. package/dist/finance/wallets-command.d.ts +12 -0
  87. package/dist/finance/wallets-command.d.ts.map +1 -0
  88. package/dist/finance/wallets-command.js +106 -0
  89. package/dist/finance/wallets-command.js.map +1 -0
  90. package/dist/finance/written.d.ts +37 -0
  91. package/dist/finance/written.d.ts.map +1 -0
  92. package/dist/finance/written.js +36 -0
  93. package/dist/finance/written.js.map +1 -0
  94. package/dist/knowledge/command.d.ts.map +1 -1
  95. package/dist/knowledge/command.js +3 -2
  96. package/dist/knowledge/command.js.map +1 -1
  97. package/dist/mcp/permissions.d.ts +1 -1
  98. package/dist/mcp/permissions.d.ts.map +1 -1
  99. package/dist/mcp/permissions.js +1 -0
  100. package/dist/mcp/permissions.js.map +1 -1
  101. package/dist/options.d.ts +2 -0
  102. package/dist/options.d.ts.map +1 -1
  103. package/dist/options.js +2 -0
  104. package/dist/options.js.map +1 -1
  105. package/dist/program.d.ts.map +1 -1
  106. package/dist/program.js +174 -0
  107. package/dist/program.js.map +1 -1
  108. package/dist/reasons.d.ts.map +1 -1
  109. package/dist/reasons.js +24 -0
  110. package/dist/reasons.js.map +1 -1
  111. package/dist/records/import.d.ts +2 -4
  112. package/dist/records/import.d.ts.map +1 -1
  113. package/dist/records/import.js +41 -41
  114. package/dist/records/import.js.map +1 -1
  115. package/dist/records/input.d.ts +20 -0
  116. package/dist/records/input.d.ts.map +1 -0
  117. package/dist/records/input.js +115 -0
  118. package/dist/records/input.js.map +1 -0
  119. package/dist/records/mapping.d.ts +16 -1
  120. package/dist/records/mapping.d.ts.map +1 -1
  121. package/dist/records/mapping.js +24 -11
  122. package/dist/records/mapping.js.map +1 -1
  123. package/dist/records/record-commands.d.ts +8 -0
  124. package/dist/records/record-commands.d.ts.map +1 -0
  125. package/dist/records/record-commands.js +89 -0
  126. package/dist/records/record-commands.js.map +1 -0
  127. package/dist/records/sources.d.ts +48 -0
  128. package/dist/records/sources.d.ts.map +1 -0
  129. package/dist/records/sources.js +72 -0
  130. package/dist/records/sources.js.map +1 -0
  131. package/dist/review/kinds.d.ts +1 -1
  132. package/dist/review/kinds.d.ts.map +1 -1
  133. package/dist/review/kinds.js +4 -0
  134. package/dist/review/kinds.js.map +1 -1
  135. package/dist/review/review.d.ts.map +1 -1
  136. package/dist/review/review.js +4 -0
  137. package/dist/review/review.js.map +1 -1
  138. package/dist/rows.d.ts.map +1 -1
  139. package/dist/rows.js +34 -0
  140. package/dist/rows.js.map +1 -1
  141. package/dist/search/command.d.ts.map +1 -1
  142. package/dist/search/command.js +9 -4
  143. package/dist/search/command.js.map +1 -1
  144. package/dist/search/lane-gates.d.ts +3 -0
  145. package/dist/search/lane-gates.d.ts.map +1 -1
  146. package/dist/search/lane-gates.js +9 -3
  147. package/dist/search/lane-gates.js.map +1 -1
  148. package/dist/search/search.d.ts +3 -1
  149. package/dist/search/search.d.ts.map +1 -1
  150. package/dist/search/search.js +2 -1
  151. package/dist/search/search.js.map +1 -1
  152. package/dist/show/command.d.ts +6 -1
  153. package/dist/show/command.d.ts.map +1 -1
  154. package/dist/show/command.js +49 -4
  155. package/dist/show/command.js.map +1 -1
  156. package/dist/version.d.ts +1 -1
  157. package/dist/version.js +1 -1
  158. package/package.json +1 -1
  159. package/skills/cli-memo/SKILL.md +8 -5
  160. package/skills/cli-memo/topics/money.md +20 -1
  161. package/skills/cli-memo/topics/proposals.md +8 -5
  162. package/skills/cli-memo/topics/search.md +7 -0
  163. package/dist/bundle/chunk-HMJ3D7XE.js +0 -1901
@@ -42,7 +42,7 @@ import {
42
42
  syncsFirst,
43
43
  taskStatsAnswer,
44
44
  waitingAnswer
45
- } from "./chunk-LK6D26RK.js";
45
+ } from "./chunk-3SCHFNUH.js";
46
46
  import {
47
47
  mcpUrlOf,
48
48
  portOf,
@@ -52,7 +52,7 @@ import {
52
52
  UNTRUSTED_NEUTRAL,
53
53
  failureContext,
54
54
  skillCommand
55
- } from "./chunk-SJ55SMBE.js";
55
+ } from "./chunk-QTF4ZXOL.js";
56
56
  import {
57
57
  DAY_MS,
58
58
  DRY_RUN_DAYS,
@@ -90,7 +90,7 @@ import {
90
90
  writeRepliesFile,
91
91
  writeRepliesState,
92
92
  writeReplyConsent
93
- } from "./chunk-E5JQFEIQ.js";
93
+ } from "./chunk-QHNAPLVB.js";
94
94
  import {
95
95
  DEFAULT_PACE,
96
96
  FloodMemory,
@@ -111,7 +111,7 @@ import {
111
111
  sendsPathFor,
112
112
  terminalAsker,
113
113
  unknownPermissionIssues
114
- } from "./chunk-3ZXWLFUG.js";
114
+ } from "./chunk-VLUDHCCX.js";
115
115
  import {
116
116
  ADMIN_RIGHTS,
117
117
  AGENDA_QUERY,
@@ -295,7 +295,7 @@ import {
295
295
  withoutPhone,
296
296
  writeEnrichmentSetting,
297
297
  wrongAccount
298
- } from "./chunk-2UCLF4AO.js";
298
+ } from "./chunk-DXTNBVLV.js";
299
299
  import {
300
300
  acquireLock,
301
301
  readBoundedUtf8File,
@@ -304,13 +304,13 @@ import {
304
304
  } from "./chunk-FC5PK6M6.js";
305
305
  import {
306
306
  commandsText
307
- } from "./chunk-WDZOEBTE.js";
307
+ } from "./chunk-NH3A5QTW.js";
308
308
  import {
309
309
  SCHEMA_DIALECT,
310
310
  commandContract,
311
311
  commandPathOf,
312
312
  findCommand
313
- } from "./chunk-6OZ2WI7Y.js";
313
+ } from "./chunk-NIJZXGJN.js";
314
314
  import {
315
315
  AUTHORITY_KEY,
316
316
  Argument,
@@ -473,7 +473,7 @@ import {
473
473
  wasSettled,
474
474
  withoutProviderRefs,
475
475
  writesNewFileOnlyWith
476
- } from "./chunk-WDWKG7FJ.js";
476
+ } from "./chunk-PVGK67AJ.js";
477
477
  import {
478
478
  agentOf,
479
479
  keepsSuccess,
@@ -557,7 +557,7 @@ import {
557
557
  titlePart,
558
558
  validateEvidenceFindings,
559
559
  validateMailFindings
560
- } from "./chunk-HGNWJJDT.js";
560
+ } from "./chunk-3YNJBKGV.js";
561
561
  import {
562
562
  PRIORITY_LABELS,
563
563
  SAVE_HELP,
@@ -3174,11 +3174,11 @@ var messengerHost = /* @__PURE__ */ __name((messenger) => ({
3174
3174
  context: /* @__PURE__ */ __name((self, options) => messengerContext(self, messenger, options), "context"),
3175
3175
  permissionExample: "messages.send=deny",
3176
3176
  serveStdio: /* @__PURE__ */ __name(async (self, context) => {
3177
- const { serveOverStdio } = await import("./server-IQILK5YP.js");
3177
+ const { serveOverStdio } = await import("./server-L622PMVC.js");
3178
3178
  await serveOverStdio(self, context, messenger, {});
3179
3179
  }, "serveStdio"),
3180
3180
  serveHttp: /* @__PURE__ */ __name(async (self, context, http) => {
3181
- const { serveOverHttpUntilStopped } = await import("./server-IQILK5YP.js");
3181
+ const { serveOverHttpUntilStopped } = await import("./server-L622PMVC.js");
3182
3182
  await serveOverHttpUntilStopped(self, context, messenger, {}, http);
3183
3183
  }, "serveHttp"),
3184
3184
  instructions: /* @__PURE__ */ __name(async (profiles) => {
@@ -3537,12 +3537,12 @@ var appMcpCommand = /* @__PURE__ */ __name((app, configuration, options) => {
3537
3537
  permissionExample: options.permissionExample,
3538
3538
  serveStdio: /* @__PURE__ */ __name(async (self, context) => {
3539
3539
  checked3(self, context);
3540
- const { serveAppOverStdio } = await import("./app-server-QBJG7OGQ.js");
3540
+ const { serveAppOverStdio } = await import("./app-server-7KM4MSDA.js");
3541
3541
  await serveAppOverStdio(self, context, server());
3542
3542
  }, "serveStdio"),
3543
3543
  serveHttp: /* @__PURE__ */ __name(async (self, context, http) => {
3544
3544
  checked3(self, context);
3545
- const { serveAppOverHttp } = await import("./app-server-QBJG7OGQ.js");
3545
+ const { serveAppOverHttp } = await import("./app-server-7KM4MSDA.js");
3546
3546
  await serveAppOverHttp(self, context, server(), http);
3547
3547
  }, "serveHttp"),
3548
3548
  instructions: /* @__PURE__ */ __name(async (profiles) => {
@@ -4908,7 +4908,7 @@ var botMcpCommand = /* @__PURE__ */ __name((bot) => {
4908
4908
  const mcp = bot.mcp;
4909
4909
  if (!mcp)
4910
4910
  throw new Error("bot mcp is mounted only with BotMessenger.mcp");
4911
- const [{ serveBotOverStdio }, run2] = await Promise.all([import("./server-NKI7SVK5.js"), mcp.program()]);
4911
+ const [{ serveBotOverStdio }, run2] = await Promise.all([import("./server-SJVP2XXD.js"), mcp.program()]);
4912
4912
  await serveBotOverStdio({
4913
4913
  bot,
4914
4914
  program: { run: run2, commands: describeProgram(rootOf2(this)) },
@@ -84,7 +84,7 @@ var suggested = /* @__PURE__ */ __name((env, contentLanguages) => {
84
84
  return (own.length ? own : LANGUAGES.filter(({ code }) => code === "en" || code === system)).map(({ name }) => name);
85
85
  }, "suggested");
86
86
  var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLanguages }) => {
87
- const { openStore } = await import("./store-6H4FPFTX.js");
87
+ const { openStore } = await import("./store-M5QSIRWJ.js");
88
88
  const store = await openStore({ env });
89
89
  let rebuild = false;
90
90
  try {
@@ -114,7 +114,7 @@ var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLang
114
114
  return;
115
115
  const [{ openCache }, { buildStems }] = await Promise.all([
116
116
  import("./open-5YYG2VWH.js"),
117
- import("./store-maintenance-command-IFVWSQMJ.js")
117
+ import("./store-maintenance-command-PQCO5ICC.js")
118
118
  ]);
119
119
  const database = await openCache(storePath(env));
120
120
  try {
@@ -126,7 +126,7 @@ var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLang
126
126
  var askTools = /* @__PURE__ */ __name(async (run) => {
127
127
  const { command, env, io } = run;
128
128
  const installed = run.installed ?? ((name) => onPath(name, env));
129
- const { WIRECAT_TOOLS } = await import("./first-screen-IQEU7XF2.js");
129
+ const { WIRECAT_TOOLS } = await import("./first-screen-QH34AIFV.js");
130
130
  const others = WIRECAT_TOOLS.filter((tool) => tool.command !== command);
131
131
  const missing = others.filter((tool) => !installed(tool.command));
132
132
  io.say("Other WireCat tools \u2014 they share this store, so one search finds everything:");
@@ -20,7 +20,7 @@ import {
20
20
  tool,
21
21
  toolKey,
22
22
  toolsFromCommands
23
- } from "./chunk-Q3VEUHC7.js";
23
+ } from "./chunk-6OS7PTOC.js";
24
24
  import {
25
25
  CHART_KINDS,
26
26
  CHART_SIZE,
@@ -33,14 +33,14 @@ import {
33
33
  registerPrompts,
34
34
  stdinFieldOf,
35
35
  syncsFirst
36
- } from "./chunk-LK6D26RK.js";
36
+ } from "./chunk-3SCHFNUH.js";
37
37
  import {
38
38
  mcpUrlOf
39
39
  } from "./chunk-DKO7WEXJ.js";
40
40
  import {
41
41
  agentJson,
42
42
  skillResource
43
- } from "./chunk-SJ55SMBE.js";
43
+ } from "./chunk-QTF4ZXOL.js";
44
44
  import {
45
45
  instructions
46
46
  } from "./chunk-I5L7MLZ6.js";
@@ -62,7 +62,7 @@ import {
62
62
  import {
63
63
  connectedFor,
64
64
  guardFor
65
- } from "./chunk-3ZXWLFUG.js";
65
+ } from "./chunk-VLUDHCCX.js";
66
66
  import {
67
67
  capability,
68
68
  dateWindow,
@@ -71,10 +71,10 @@ import {
71
71
  servicesFor,
72
72
  storedDeps,
73
73
  wholeList
74
- } from "./chunk-2UCLF4AO.js";
74
+ } from "./chunk-DXTNBVLV.js";
75
75
  import {
76
76
  findCommand
77
- } from "./chunk-6OZ2WI7Y.js";
77
+ } from "./chunk-NIJZXGJN.js";
78
78
  import {
79
79
  DEFAULT_OUTPUT_BYTES,
80
80
  changesAuthorityAt,
@@ -90,7 +90,7 @@ import {
90
90
  sealed,
91
91
  snakeKeys,
92
92
  typedCommand
93
- } from "./chunk-WDWKG7FJ.js";
93
+ } from "./chunk-PVGK67AJ.js";
94
94
  import {
95
95
  withCaller
96
96
  } from "./chunk-SIJA2UYC.js";
@@ -103,7 +103,7 @@ import {
103
103
  import {
104
104
  openStore,
105
105
  pdfPreviewLimits
106
- } from "./chunk-HGNWJJDT.js";
106
+ } from "./chunk-3YNJBKGV.js";
107
107
  import {
108
108
  timezoneOf
109
109
  } from "./chunk-37E74SKW.js";
@@ -30,6 +30,24 @@ var REASONS = defineReasons([
30
30
  message: "no findings file {path}: give the findings JSON itself, a file that exists, or - for stdin",
31
31
  details: ["path"]
32
32
  },
33
+ {
34
+ reason: "records.not-stored",
35
+ code: "not_found",
36
+ message: "no record {record} from that source; memo records list shows them",
37
+ details: ["record"]
38
+ },
39
+ {
40
+ reason: "records.file-missing",
41
+ code: "not_found",
42
+ message: "no records file {path}: give a file that exists, or - for stdin",
43
+ details: ["path"]
44
+ },
45
+ {
46
+ reason: "records.file-unreadable",
47
+ code: "validation_error",
48
+ message: "the records file {path} cannot be read: {why}",
49
+ details: ["path", "why"]
50
+ },
33
51
  {
34
52
  reason: "findings.key-mismatch",
35
53
  code: "validation_error",
@@ -73,6 +91,12 @@ var REASONS = defineReasons([
73
91
  message: "the note is not imported; memo sync --only notes",
74
92
  details: []
75
93
  },
94
+ {
95
+ reason: "events.account-unknown",
96
+ code: "not_found",
97
+ message: "account: names no calendar account in the store; the message lists the ones it holds",
98
+ details: []
99
+ },
76
100
  {
77
101
  reason: "mail.account-unknown",
78
102
  code: "not_found",
@@ -102,7 +126,7 @@ var REASONS = defineReasons([
102
126
  ]);
103
127
 
104
128
  // dist/version.js
105
- var VERSION = "0.131.62";
129
+ var VERSION = "0.131.64";
106
130
 
107
131
  // dist/app.js
108
132
  var APP = {
@@ -7,7 +7,7 @@ import {
7
7
  commandPathOf,
8
8
  findCommand,
9
9
  outputOf
10
- } from "./chunk-6OZ2WI7Y.js";
10
+ } from "./chunk-NIJZXGJN.js";
11
11
  import {
12
12
  Command,
13
13
  Help,
@@ -18,7 +18,7 @@ import {
18
18
  environmentOf,
19
19
  metaOf,
20
20
  takesProfile
21
- } from "./chunk-WDWKG7FJ.js";
21
+ } from "./chunk-PVGK67AJ.js";
22
22
  import {
23
23
  writes
24
24
  } from "./chunk-RCGFSWZE.js";
@@ -7,7 +7,7 @@ import {
7
7
  describeOptions,
8
8
  keyForCommand,
9
9
  metaOf
10
- } from "./chunk-WDWKG7FJ.js";
10
+ } from "./chunk-PVGK67AJ.js";
11
11
  import {
12
12
  jsonSchemaOf
13
13
  } from "./chunk-RCGFSWZE.js";
@@ -173,8 +173,8 @@ var startCli = /* @__PURE__ */ __name(async (entry) => {
173
173
  if (command.optsWithGlobals().dryRun === true)
174
174
  return;
175
175
  const [{ setupAtStart }, { commandPathOf }] = await Promise.all([
176
- import("./first-run-ZKDGFY6P.js"),
177
- import("./command-contract-SIXWLKAS.js")
176
+ import("./first-run-3JYWLJCH.js"),
177
+ import("./command-contract-PLB2JGFJ.js")
178
178
  ]);
179
179
  await setupAtStart({
180
180
  command: entry.app.command,
@@ -8932,6 +8932,21 @@ var progressOf = /* @__PURE__ */ __name((input) => {
8932
8932
  cursor_age_ms: updated === null ? null : Math.max(0, (input.now ?? /* @__PURE__ */ new Date()).getTime() - Date.parse(updated))
8933
8933
  };
8934
8934
  }, "progressOf");
8935
+ var ago = /* @__PURE__ */ __name((ms2) => {
8936
+ const minutes2 = Math.round(ms2 / 6e4);
8937
+ if (minutes2 < 1)
8938
+ return "just now";
8939
+ if (minutes2 < 60)
8940
+ return `${minutes2}m ago`;
8941
+ const hours = Math.round(minutes2 / 60);
8942
+ return hours < 48 ? `${hours}h ago` : `${Math.round(hours / 24)}d ago`;
8943
+ }, "ago");
8944
+ var progressLine = /* @__PURE__ */ __name((progress2) => {
8945
+ const count6 = /* @__PURE__ */ __name((n) => n.toLocaleString("en-US"), "count");
8946
+ const of = progress2.total === null ? count6(progress2.done) : `${count6(progress2.done)} of ${count6(progress2.total)} (${progress2.total === 0 ? 100 : Math.floor(progress2.done / progress2.total * 100)}%), ${count6(progress2.remaining ?? 0)} left`;
8947
+ const when = progress2.cursor_age_ms === null ? "" : `, updated ${ago(progress2.cursor_age_ms)}`;
8948
+ return `${progress2.job} ${progress2.profile}: ${of} \u2014 ${progress2.state}${when}`;
8949
+ }, "progressLine");
8935
8950
 
8936
8951
  // node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/runs/record-log.js
8937
8952
  var recordLogFor = /* @__PURE__ */ __name((to, app, { traceId, command } = {}) => {
@@ -12674,6 +12689,8 @@ export {
12674
12689
  contactNote,
12675
12690
  conversation,
12676
12691
  documentLink,
12692
+ progressOf,
12693
+ progressLine,
12677
12694
  recordLogFor,
12678
12695
  spawnDetached,
12679
12696
  jobsDir,
@@ -3,7 +3,7 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  answerOf,
5
5
  messengerContext
6
- } from "./chunk-3ZXWLFUG.js";
6
+ } from "./chunk-VLUDHCCX.js";
7
7
  import {
8
8
  FETCHING,
9
9
  QUICK_HEALTH_CHECKS,
@@ -32,7 +32,7 @@ import {
32
32
  typedQuery,
33
33
  withQuery,
34
34
  withTimeLimit
35
- } from "./chunk-2UCLF4AO.js";
35
+ } from "./chunk-DXTNBVLV.js";
36
36
  import {
37
37
  stringWidth,
38
38
  wrapAnsi
@@ -63,7 +63,7 @@ import {
63
63
  snakeKeys,
64
64
  storeTable,
65
65
  withoutProviderRefs
66
- } from "./chunk-WDWKG7FJ.js";
66
+ } from "./chunk-PVGK67AJ.js";
67
67
  import {
68
68
  holdLock,
69
69
  lockPath,
@@ -109,7 +109,7 @@ import {
109
109
  storeClients,
110
110
  storeContents,
111
111
  vectorIndexCounts
112
- } from "./chunk-HGNWJJDT.js";
112
+ } from "./chunk-3YNJBKGV.js";
113
113
  import {
114
114
  queryFieldsOf,
115
115
  readDamageMark,
@@ -13,7 +13,7 @@ import {
13
13
  keyForCommand,
14
14
  levelFor,
15
15
  readKeysForCommand
16
- } from "./chunk-WDWKG7FJ.js";
16
+ } from "./chunk-PVGK67AJ.js";
17
17
  import {
18
18
  isNewer
19
19
  } from "./chunk-ASWLM74P.js";
@@ -1026,6 +1026,7 @@ var commandAvailability = /* @__PURE__ */ __name((info, levels, keyOf, authority
1026
1026
  }, "commandAvailability");
1027
1027
 
1028
1028
  export {
1029
+ REASONS,
1029
1030
  failureContext,
1030
1031
  UNTRUSTED,
1031
1032
  UNTRUSTED_NEUTRAL,
@@ -0,0 +1,301 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ decisionPolicy
5
+ } from "./chunk-FHZKHKBJ.js";
6
+ import {
7
+ compactText,
8
+ currentRun,
9
+ itemOf,
10
+ listOf,
11
+ renderAnswer,
12
+ resolveOutput,
13
+ rootOf,
14
+ rowShapeOf,
15
+ rowsOfEntity,
16
+ sealed,
17
+ snakeKeysKeeping
18
+ } from "./chunk-PVGK67AJ.js";
19
+ import {
20
+ openStore
21
+ } from "./chunk-3YNJBKGV.js";
22
+ import {
23
+ STORE_CLIENT
24
+ } from "./chunk-MYXB2T77.js";
25
+ import {
26
+ createRenderer
27
+ } from "./chunk-EMNQPMZO.js";
28
+ import {
29
+ COMPACT_FLAG
30
+ } from "./chunk-RCGFSWZE.js";
31
+ import {
32
+ CliError
33
+ } from "./chunk-4ZW6ZJ2V.js";
34
+ import {
35
+ __name
36
+ } from "./chunk-ZVVMGPBJ.js";
37
+
38
+ // dist/output.js
39
+ var snakeKeys = snakeKeysKeeping(["front_matter", "metadata", "headers"]);
40
+ var atDetail = /* @__PURE__ */ __name((value, level) => {
41
+ let picked = "";
42
+ resolveOutput({
43
+ json: true,
44
+ streams: { data: /* @__PURE__ */ __name((chunk) => picked += chunk, "data"), diagnostic: /* @__PURE__ */ __name(() => void 0, "diagnostic"), progress: /* @__PURE__ */ __name(() => void 0, "progress") },
45
+ ...level === void 0 ? {} : { hitDetail: level }
46
+ }).renderer.result(value);
47
+ return JSON.parse(picked);
48
+ }, "atDetail");
49
+
50
+ // dist/rows.js
51
+ var sender = { field: ["sender_is_me", "sender_name"], tag: "me" };
52
+ var fact = {
53
+ columns: [
54
+ { field: "ref" },
55
+ { field: "kind" },
56
+ { field: "status" },
57
+ { field: "subject_name" },
58
+ { field: "project_name" },
59
+ { field: ["occurred_at", "created_at"], as: "day" }
60
+ ],
61
+ text: ["text"]
62
+ };
63
+ var LINED = {
64
+ columns: [{ field: "ref" }, { field: "title" }, { field: "status" }, { field: "review" }],
65
+ sections: { lines: "memo_money_line" }
66
+ };
67
+ var ROWS = {
68
+ "search all": {
69
+ columns: [{ field: "ref" }, { field: "kind" }, { field: "timestamp", as: "time" }, { field: "title" }, sender],
70
+ text: ["excerpt"]
71
+ },
72
+ "search notes": {
73
+ columns: [{ field: "ref" }, { field: "updated_at", as: "day" }, { field: ["title", "path"] }],
74
+ text: ["excerpt"]
75
+ },
76
+ "search memories": fact,
77
+ "search people": { columns: [{ field: "ref" }, { field: "name" }] },
78
+ "notes list": {
79
+ columns: [
80
+ { field: "ref" },
81
+ { field: "updated_at", as: "day" },
82
+ { field: "source" },
83
+ { field: ["title", "path"] },
84
+ { field: "via" }
85
+ ],
86
+ text: ["text"]
87
+ },
88
+ "facts list": fact,
89
+ "invoices list": {
90
+ columns: [{ field: "ref" }, { field: "project_name" }, { field: ["issue_date", "created_at"], as: "day" }],
91
+ text: ["title"]
92
+ },
93
+ "payments list": {
94
+ columns: [{ field: "ref" }, { field: "project_name" }, { field: "date", as: "day" }],
95
+ text: ["title"]
96
+ },
97
+ "deals list": {
98
+ columns: [{ field: "ref" }, { field: "project_name" }, { field: "close_date", as: "day" }],
99
+ text: ["summary"]
100
+ },
101
+ "leads list": {
102
+ columns: [{ field: "ref" }, { field: "project_name" }, { field: "created_at", as: "day" }],
103
+ text: ["summary"]
104
+ },
105
+ "memories list": fact,
106
+ "people list": {
107
+ columns: [
108
+ { field: "ref" },
109
+ { field: "name" },
110
+ { field: "owner", tag: "owner" },
111
+ { field: "tasks", as: "count", tag: "tasks" }
112
+ ]
113
+ },
114
+ "events list": {
115
+ columns: [
116
+ { field: "ref" },
117
+ { field: ["starts_at", "ends_at"], as: "time" },
118
+ { field: "event_type" },
119
+ { field: "in" },
120
+ { field: "title" }
121
+ ],
122
+ text: ["description"]
123
+ },
124
+ "organizations list": { columns: [{ field: "ref" }, { field: "name" }, { field: "kind" }] },
125
+ "projects list": { columns: [{ field: "ref" }, { field: "key" }, { field: "name" }, { field: "kind" }] },
126
+ "relationships list": {
127
+ columns: [
128
+ { field: "id" },
129
+ { field: "from" },
130
+ { field: "kind" },
131
+ { field: "to" },
132
+ { field: "role" },
133
+ { field: "purpose" },
134
+ { field: "confirmed", tag: "confirmed" }
135
+ ]
136
+ },
137
+ "tasks list": {
138
+ columns: [
139
+ { field: ["key", "ref", "id"] },
140
+ { field: "state" },
141
+ { field: "kind" },
142
+ { field: "priority_label" },
143
+ { field: "project_key" },
144
+ { field: "due_at", as: "day" },
145
+ { field: "source" }
146
+ ],
147
+ text: ["title", "message.text"]
148
+ },
149
+ "messages show": {
150
+ columns: [
151
+ { field: "ref" },
152
+ { field: ["timestamp", "date"], as: "time" },
153
+ { field: "chat_title" },
154
+ { field: ["from", "sender_is_me", "sender_name"], tag: "me" },
155
+ { field: "subject" },
156
+ { field: "attachments", as: "files" }
157
+ ],
158
+ text: ["text", "excerpt"]
159
+ },
160
+ "projects evidence": {
161
+ columns: [{ field: "project_ref" }],
162
+ sections: { items: "memo_evidence_item", people: "memo_evidence_person", linked_chats: "linked_chat" }
163
+ },
164
+ show: {
165
+ columns: [{ field: "ref" }, { field: "kind" }, { field: "state" }, { field: "title" }, { field: "open.line" }]
166
+ },
167
+ "wallets list": {
168
+ columns: [{ field: "ref" }, { field: "title" }, { field: "balance.amount" }, { field: "balance.currency" }]
169
+ },
170
+ "orders show": LINED,
171
+ "orders lines add": LINED,
172
+ "orders lines remove": LINED,
173
+ "invoices show": LINED,
174
+ "invoices lines add": LINED,
175
+ "invoices lines remove": LINED
176
+ };
177
+ var SECTION_ROWS = {
178
+ memo_evidence_item: {
179
+ columns: [{ field: "ref" }, { field: "context" }, { field: "kind" }, { field: "title" }],
180
+ text: ["text"]
181
+ },
182
+ memo_finance: {
183
+ columns: [
184
+ { field: "direction" },
185
+ { field: "currency" },
186
+ { field: "billed" },
187
+ { field: "paid" },
188
+ { field: "owed" },
189
+ { field: "invoices", as: "count", tag: "invoices" },
190
+ { field: "payments", as: "count", tag: "payments" }
191
+ ]
192
+ },
193
+ memo_deal: {
194
+ columns: [
195
+ { field: "ref" },
196
+ { field: "stage" },
197
+ { field: "amount" },
198
+ { field: "currency" },
199
+ { field: "close_date", as: "day" }
200
+ ],
201
+ text: ["title"]
202
+ },
203
+ memo_money_line: {
204
+ columns: [
205
+ { field: "position" },
206
+ { field: "quantity" },
207
+ { field: "unit_price" },
208
+ { field: "amount" },
209
+ { field: "product" }
210
+ ],
211
+ text: ["description"]
212
+ },
213
+ memo_evidence_person: {
214
+ columns: [{ field: "person" }, { field: "name" }, { field: "items", as: "count", tag: "items" }]
215
+ }
216
+ };
217
+ var shared = rowsOfEntity();
218
+ var sectionRowOf = /* @__PURE__ */ __name((entity) => SECTION_ROWS[entity] ?? shared(entity), "sectionRowOf");
219
+ var pathOf = /* @__PURE__ */ __name((command) => {
220
+ const words = [];
221
+ for (let at = command; at?.parent; at = at.parent)
222
+ words.unshift(at.name());
223
+ return words.join(" ");
224
+ }, "pathOf");
225
+ var rowOf = /* @__PURE__ */ __name((command) => command && ROWS[pathOf(command)] || rowShapeOf(command), "rowOf");
226
+
227
+ // dist/answer.js
228
+ var itemAnswer = /* @__PURE__ */ __name((value, extra) => itemOf(snakeKeys(value), extra), "itemAnswer");
229
+ var listAnswer = /* @__PURE__ */ __name((command, input) => {
230
+ const body = listOf(command, { ...input, items: snakeKeys(input.items) });
231
+ if (input.cursor !== void 0 || input.page !== void 0)
232
+ return body;
233
+ if (body.page.mode === "page")
234
+ delete body.page.next_page;
235
+ const next = body.next?.filter(({ step }) => step !== "page.next") ?? [];
236
+ if (next.length > 0)
237
+ body.next = next;
238
+ else
239
+ delete body.next;
240
+ return body;
241
+ }, "listAnswer");
242
+ var wholeList = /* @__PURE__ */ __name((command, items) => listAnswer(command, { items, limit: Math.max(1, items.length), has_more: false }), "wholeList");
243
+ var withStore = /* @__PURE__ */ __name(async (env, work) => {
244
+ const store = await openStore({ env, ...STORE_CLIENT, decisions: decisionPolicy(env) });
245
+ try {
246
+ return await work(store);
247
+ } finally {
248
+ await store.close();
249
+ }
250
+ }, "withStore");
251
+ var running = /* @__PURE__ */ new WeakMap();
252
+ var timezone = /* @__PURE__ */ __name(() => Intl.DateTimeFormat().resolvedOptions().timeZone, "timezone");
253
+ var plainText = /* @__PURE__ */ __name((body, command) => {
254
+ const { next: _, ...rest } = body;
255
+ return compactText(rest, rowOf(command), { timezone: timezone() }, sectionRowOf);
256
+ }, "plainText");
257
+ var compactView = /* @__PURE__ */ __name((command, full) => (kept) => {
258
+ const whole = sealed(kept);
259
+ const next = whole.next?.map((step) => step.kind === "command" && step.line ? { ...step, line: `${step.line} ${COMPACT_FLAG}` } : step);
260
+ return compactText(next ? { ...whole, next } : whole, rowOf(command), {
261
+ timezone: timezone(),
262
+ ...full ? { textChars: 0 } : {}
263
+ }, sectionRowOf);
264
+ }, "compactView");
265
+ var trackAnswers = /* @__PURE__ */ __name((program) => {
266
+ currentRun();
267
+ program.option(COMPACT_FLAG, "one line per item for an agent: reference first, text last, paging and next steps as # lines").hook("preAction", (root, leaf) => {
268
+ const { compact, json, brief } = leaf.optsWithGlobals();
269
+ if (compact && (json || brief))
270
+ throw new CliError("validation_error", `${COMPACT_FLAG} and ${json ? "--json" : "--brief"} are two forms \u2014 pick one`);
271
+ running.set(root, leaf);
272
+ });
273
+ }, "trackAnswers");
274
+ var answers = /* @__PURE__ */ __name((program, streams, env) => {
275
+ const print = /* @__PURE__ */ __name((json, body, text, asked) => {
276
+ const format = json ? "json" : "pretty";
277
+ const root = rootOf(program);
278
+ const leaf = running.get(root) ?? root;
279
+ const { compact = asked, full } = leaf.optsWithGlobals();
280
+ const renderer = createRenderer({ format, color: false, streams });
281
+ const drawn = compact === true && !json;
282
+ renderAnswer(leaf, { renderer: drawn ? { ...renderer, note: /* @__PURE__ */ __name(() => void 0, "note") } : renderer, format, streams }, body, drawn ? compactView(leaf, full === true) : () => `${text ?? plainText(body, leaf)}
283
+ `);
284
+ }, "print");
285
+ return {
286
+ print,
287
+ run: /* @__PURE__ */ __name(async (json, work) => print(json, await withStore(env, work)), "run")
288
+ };
289
+ }, "answers");
290
+
291
+ export {
292
+ snakeKeys,
293
+ atDetail,
294
+ itemAnswer,
295
+ listAnswer,
296
+ wholeList,
297
+ withStore,
298
+ plainText,
299
+ trackAnswers,
300
+ answers
301
+ };