@wirecat/cli-memo 0.131.53 → 0.131.54

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/bin/memo.js CHANGED
@@ -9,7 +9,7 @@ if (
9
9
  (words[0] === "--version" || words[0] === "-V") &&
10
10
  !Object.keys(process.env).some((key) => key.endsWith("_TEST_ARGV_LOG"))
11
11
  ) {
12
- process.stdout.write("0.131.53\n")
12
+ process.stdout.write("0.131.54\n")
13
13
  } else {
14
14
  // Before the bundle compiles: the bundle's own call comes after its chunks.
15
15
  module.enableCompileCache()
@@ -28,7 +28,7 @@ if (
28
28
  : next(specifier, context),
29
29
  })
30
30
  }
31
- const chunks = ["../bundle/all-profiles-PJR2VHDP.js","../bundle/anthropic-ZUDIWREK.js","../bundle/app-server-EYNQ4L2V.js","../bundle/auto-JV4T2URZ.js","../bundle/bun-W2ZP6I6Z.js","../bundle/bun-sqlite-T2CTJ6AR.js","../bundle/command-contract-EWPKHGAZ.js","../bundle/decode-UWT3Y66W.js","../bundle/dispatch-W4ZVXTJT.js","../bundle/dist-GZQWFMCL.js","../bundle/echarts-7VGTR45R.js","../bundle/embed-CM2QSTNK.js","../bundle/embedder-CDCAMVV7.js","../bundle/entry-WHEWBNJL.js","../bundle/failure-GQHAQVGH.js","../bundle/failure-XQ7TMBYM.js","../bundle/first-run-ZBIQO5RZ.js","../bundle/first-screen-CUAY5N6E.js","../bundle/instructions-LYKSTUGQ.js","../bundle/mcp-I72UY3QP.js","../bundle/mcp-RKJG22KM.js","../bundle/node-LFRTSZBZ.js","../bundle/node-P4E63KXA.js","../bundle/node-TLZSIHIJ.js","../bundle/node-sqlite-Y47T5FTT.js","../bundle/oauth-YM5C6VS3.js","../bundle/open-WPA4DW5G.js","../bundle/openai-RCPT23DA.js","../bundle/process-P2X2KFMR.js","../bundle/program-LE3UATKG.js","../bundle/prompt-65WPTVYC.js","../bundle/recognize-MEFMK7HT.js","../bundle/remote-4XIR3ZYK.js","../bundle/rerank-YRLAXFFL.js","../bundle/serve-6SPZH6CY.js","../bundle/server-FB75UHSF.js","../bundle/server-IELXA6S2.js","../bundle/server-MU43SKL5.js","../bundle/state-G34NVZ7F.js","../bundle/stdio-FRV4R7LJ.js","../bundle/store-6U4SYK4Q.js","../bundle/store-maintenance-command-ONVPBZLT.js","../bundle/update-TO3RIYTH.js"]
31
+ const chunks = ["../bundle/all-profiles-PJR2VHDP.js","../bundle/anthropic-ZUDIWREK.js","../bundle/app-server-EYNQ4L2V.js","../bundle/auto-3IGKVB3G.js","../bundle/bun-W2ZP6I6Z.js","../bundle/bun-sqlite-T2CTJ6AR.js","../bundle/command-contract-EWPKHGAZ.js","../bundle/decode-UWT3Y66W.js","../bundle/dispatch-W4ZVXTJT.js","../bundle/dist-GZQWFMCL.js","../bundle/echarts-7VGTR45R.js","../bundle/embed-CM2QSTNK.js","../bundle/embedder-CDCAMVV7.js","../bundle/entry-WHEWBNJL.js","../bundle/failure-GQHAQVGH.js","../bundle/failure-LGDSH47N.js","../bundle/first-run-ZBIQO5RZ.js","../bundle/first-screen-CUAY5N6E.js","../bundle/instructions-LYKSTUGQ.js","../bundle/mcp-I72UY3QP.js","../bundle/mcp-RKJG22KM.js","../bundle/node-LFRTSZBZ.js","../bundle/node-P4E63KXA.js","../bundle/node-TLZSIHIJ.js","../bundle/node-sqlite-Y47T5FTT.js","../bundle/oauth-YM5C6VS3.js","../bundle/open-WPA4DW5G.js","../bundle/openai-RCPT23DA.js","../bundle/process-P2X2KFMR.js","../bundle/program-AJPT7C4I.js","../bundle/prompt-65WPTVYC.js","../bundle/recognize-MEFMK7HT.js","../bundle/remote-4XIR3ZYK.js","../bundle/rerank-YRLAXFFL.js","../bundle/serve-6SPZH6CY.js","../bundle/server-FB75UHSF.js","../bundle/server-IELXA6S2.js","../bundle/server-ISFSZGGI.js","../bundle/state-G34NVZ7F.js","../bundle/stdio-FRV4R7LJ.js","../bundle/store-6U4SYK4Q.js","../bundle/store-maintenance-command-ONVPBZLT.js","../bundle/update-SAJHFRB2.js"]
32
32
  if (((words) => words
33
33
  .filter((word) => !word.startsWith("-"))
34
34
  .slice(0, 2)
@@ -15,11 +15,11 @@ import {
15
15
  recordAutoRun,
16
16
  serviceUnit,
17
17
  timerUnit
18
- } from "./chunk-I3TF3CDE.js";
19
- import "./chunk-D63QZQR7.js";
20
- import "./chunk-F3BUTC2N.js";
18
+ } from "./chunk-OQVLH2BS.js";
19
+ import "./chunk-K236JZLF.js";
20
+ import "./chunk-YHHR7NQ3.js";
21
21
  import "./chunk-QP3KNC5D.js";
22
- import "./chunk-CQPZUKTI.js";
22
+ import "./chunk-DIFRVXKQ.js";
23
23
  import "./chunk-34GJQ4ZR.js";
24
24
  import "./chunk-JB43Q2QL.js";
25
25
  import "./chunk-DDD3CXHR.js";
@@ -56,7 +56,7 @@ import "./chunk-VPCNLTME.js";
56
56
  import "./chunk-26QKDK5P.js";
57
57
  import "./chunk-OSPAMIIY.js";
58
58
  import "./chunk-RSBROHX4.js";
59
- import "./chunk-LCP4TVBX.js";
59
+ import "./chunk-ZRBXOHNH.js";
60
60
  import "./chunk-IK6KH3RE.js";
61
61
  import "./chunk-SW6C6WH5.js";
62
62
  import "./chunk-D72URWJE.js";
@@ -19274,6 +19274,7 @@ var readMailFindingsJson = /* @__PURE__ */ __name((text2) => parseFindingsJson(t
19274
19274
  var parseMailFindingsJson = /* @__PURE__ */ __name((text2) => parseFindingsJson(text2, "mail findings", validateMailFindings), "parseMailFindingsJson");
19275
19275
 
19276
19276
  export {
19277
+ AGENT_INPUT_MAX_CHARS,
19277
19278
  recordRun,
19278
19279
  failingNotice,
19279
19280
  entityFields,
@@ -18,7 +18,7 @@ import {
18
18
  } from "./chunk-BPGYTJNB.js";
19
19
  import {
20
20
  APP
21
- } from "./chunk-LCP4TVBX.js";
21
+ } from "./chunk-ZRBXOHNH.js";
22
22
  import {
23
23
  ValiError,
24
24
  errorObjectOf,
@@ -2,10 +2,10 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  loadConfig
5
- } from "./chunk-F3BUTC2N.js";
5
+ } from "./chunk-YHHR7NQ3.js";
6
6
  import {
7
7
  upgradeCommand
8
- } from "./chunk-CQPZUKTI.js";
8
+ } from "./chunk-DIFRVXKQ.js";
9
9
  import {
10
10
  FETCH,
11
11
  annotate,
@@ -19,7 +19,7 @@ import {
19
19
  import {
20
20
  APP,
21
21
  VERSION
22
- } from "./chunk-LCP4TVBX.js";
22
+ } from "./chunk-ZRBXOHNH.js";
23
23
  import {
24
24
  installerOf
25
25
  } from "./chunk-IK6KH3RE.js";
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  decisionPolicy
5
- } from "./chunk-F3BUTC2N.js";
5
+ } from "./chunk-YHHR7NQ3.js";
6
6
  import {
7
7
  compactText,
8
8
  currentRun,
@@ -21,7 +21,7 @@ import {
21
21
  } from "./chunk-4335SGVD.js";
22
22
  import {
23
23
  STORE_CLIENT
24
- } from "./chunk-LCP4TVBX.js";
24
+ } from "./chunk-ZRBXOHNH.js";
25
25
  import {
26
26
  createRenderer
27
27
  } from "./chunk-WLKDS65F.js";
@@ -4,7 +4,7 @@ import {
4
4
  inspectConfig,
5
5
  loadConfig,
6
6
  memoPermissionKeys
7
- } from "./chunk-F3BUTC2N.js";
7
+ } from "./chunk-YHHR7NQ3.js";
8
8
  import {
9
9
  CEILING_KEY,
10
10
  changesAuthority,
@@ -23,7 +23,7 @@ import {
23
23
  } from "./chunk-6NJ5OI2S.js";
24
24
  import {
25
25
  APP
26
- } from "./chunk-LCP4TVBX.js";
26
+ } from "./chunk-ZRBXOHNH.js";
27
27
  import {
28
28
  CliError
29
29
  } from "./chunk-4ZW6ZJ2V.js";
@@ -3,15 +3,15 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  answers,
5
5
  itemAnswer
6
- } from "./chunk-D63QZQR7.js";
6
+ } from "./chunk-K236JZLF.js";
7
7
  import {
8
8
  loadConfig,
9
9
  updateConfig
10
- } from "./chunk-F3BUTC2N.js";
10
+ } from "./chunk-YHHR7NQ3.js";
11
11
  import {
12
12
  failingNotice,
13
13
  recordRun
14
- } from "./chunk-CQPZUKTI.js";
14
+ } from "./chunk-DIFRVXKQ.js";
15
15
  import {
16
16
  InvalidArgumentError,
17
17
  LOCAL_READ,
@@ -27,7 +27,7 @@ import {
27
27
  serverSearchOptions,
28
28
  summaryOf,
29
29
  unansweredHours
30
- } from "./chunk-CQPZUKTI.js";
30
+ } from "./chunk-DIFRVXKQ.js";
31
31
  import {
32
32
  MAIL_HIT_UNTRUSTED,
33
33
  messagesAnswer,
@@ -102,7 +102,7 @@ var REASONS = defineReasons([
102
102
  ]);
103
103
 
104
104
  // dist/version.js
105
- var VERSION = "0.131.53";
105
+ var VERSION = "0.131.54";
106
106
 
107
107
  // dist/app.js
108
108
  var APP = {
@@ -6,8 +6,8 @@ import {
6
6
  recognisable,
7
7
  reportFailure,
8
8
  throwParseFailures
9
- } from "./chunk-WNQUOEUV.js";
10
- import "./chunk-CQPZUKTI.js";
9
+ } from "./chunk-HIF4YBD7.js";
10
+ import "./chunk-DIFRVXKQ.js";
11
11
  import "./chunk-34GJQ4ZR.js";
12
12
  import "./chunk-JB43Q2QL.js";
13
13
  import "./chunk-DDD3CXHR.js";
@@ -45,7 +45,7 @@ import "./chunk-26QKDK5P.js";
45
45
  import "./chunk-OSPAMIIY.js";
46
46
  import "./chunk-RSBROHX4.js";
47
47
  import "./chunk-BPGYTJNB.js";
48
- import "./chunk-LCP4TVBX.js";
48
+ import "./chunk-ZRBXOHNH.js";
49
49
  import "./chunk-IK6KH3RE.js";
50
50
  import "./chunk-SW6C6WH5.js";
51
51
  import "./chunk-D72URWJE.js";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-BPGYTJNB.js";
7
7
  import {
8
8
  APP
9
- } from "./chunk-LCP4TVBX.js";
9
+ } from "./chunk-ZRBXOHNH.js";
10
10
  import {
11
11
  installerOf
12
12
  } from "./chunk-IK6KH3RE.js";
@@ -197,15 +197,15 @@ if (wcat.code !== void 0) {
197
197
  interactive: interactiveOf,
198
198
  reasons: APP.errors.reasons,
199
199
  run: /* @__PURE__ */ __name(async (entry) => {
200
- failure = await import("./failure-XQ7TMBYM.js");
201
- const { createProgram, refuseJoinedPath } = await import("./program-LE3UATKG.js");
202
- const { autoNotice, followInstall } = await import("./auto-JV4T2URZ.js");
200
+ failure = await import("./failure-LGDSH47N.js");
201
+ const { createProgram, refuseJoinedPath } = await import("./program-AJPT7C4I.js");
202
+ const { autoNotice, followInstall } = await import("./auto-3IGKVB3G.js");
203
203
  if (entry.args[0] !== "jobs") {
204
204
  const notice2 = autoNotice(entry.env);
205
205
  if (notice2)
206
206
  processStreams.diagnostic(notice2);
207
207
  }
208
- const { updateNotice } = await import("./update-TO3RIYTH.js");
208
+ const { updateNotice } = await import("./update-SAJHFRB2.js");
209
209
  const notice = updateNotice(entry.args);
210
210
  program = createProgram({ signal: entry.signal });
211
211
  program.hook("preAction", (_root, command) => entry.atStart(command));
@@ -6,17 +6,17 @@ import {
6
6
  autoState,
7
7
  lastAutoRun,
8
8
  recordAutoRun
9
- } from "./chunk-I3TF3CDE.js";
9
+ } from "./chunk-OQVLH2BS.js";
10
10
  import {
11
11
  installer,
12
12
  latest,
13
13
  upgradeCommand
14
- } from "./chunk-LBGZT3W4.js";
14
+ } from "./chunk-JI4LJ563.js";
15
15
  import {
16
16
  mcpOwnerAllowed,
17
17
  readOnlyAvailability,
18
18
  refuseWritesUnderLock
19
- } from "./chunk-WXFNUZZU.js";
19
+ } from "./chunk-ME5RFKKD.js";
20
20
  import {
21
21
  answers,
22
22
  atDetail,
@@ -26,7 +26,7 @@ import {
26
26
  trackAnswers,
27
27
  wholeList,
28
28
  withStore
29
- } from "./chunk-D63QZQR7.js";
29
+ } from "./chunk-K236JZLF.js";
30
30
  import {
31
31
  ATTACHMENT_CHARS,
32
32
  DIALECTS,
@@ -56,7 +56,7 @@ import {
56
56
  showMail,
57
57
  unsetConfigKey,
58
58
  updateConfig
59
- } from "./chunk-F3BUTC2N.js";
59
+ } from "./chunk-YHHR7NQ3.js";
60
60
  import "./chunk-QP3KNC5D.js";
61
61
  import "./chunk-5UM2OEOR.js";
62
62
  import "./chunk-JBQP2M7J.js";
@@ -64,8 +64,9 @@ import "./chunk-PHP3T567.js";
64
64
  import {
65
65
  errorObject,
66
66
  recognisable
67
- } from "./chunk-WNQUOEUV.js";
67
+ } from "./chunk-HIF4YBD7.js";
68
68
  import {
69
+ AGENT_INPUT_MAX_CHARS,
69
70
  DISCOVERY_DESCRIPTIONS,
70
71
  DOCTOR_DEEP_OPTION,
71
72
  addContractInfo,
@@ -101,7 +102,7 @@ import {
101
102
  tasksCommand,
102
103
  tasksStatsCommand,
103
104
  withSqliteSidecars
104
- } from "./chunk-CQPZUKTI.js";
105
+ } from "./chunk-DIFRVXKQ.js";
105
106
  import "./chunk-34GJQ4ZR.js";
106
107
  import "./chunk-JB43Q2QL.js";
107
108
  import {
@@ -334,7 +335,7 @@ import {
334
335
  REASONS,
335
336
  STORE_CLIENT,
336
337
  VERSION
337
- } from "./chunk-LCP4TVBX.js";
338
+ } from "./chunk-ZRBXOHNH.js";
338
339
  import "./chunk-IK6KH3RE.js";
339
340
  import "./chunk-SW6C6WH5.js";
340
341
  import "./chunk-D72URWJE.js";
@@ -912,7 +913,7 @@ var reviewText = /* @__PURE__ */ __name((items, hasMore) => {
912
913
  for (const item of items)
913
914
  groups.set(sourceOf2(item), [...groups.get(sourceOf2(item)) ?? [], item]);
914
915
  const pad = " ".repeat(width);
915
- const lines = [...groups].flatMap(([source, group], at) => [
916
+ const lines2 = [...groups].flatMap(([source, group], at) => [
916
917
  ...at === 0 ? [] : [""],
917
918
  source,
918
919
  ...group.flatMap((item) => {
@@ -931,7 +932,7 @@ var reviewText = /* @__PURE__ */ __name((items, hasMore) => {
931
932
  return [head, ...why ? [`${pad} ${why}`] : [], ...parts];
932
933
  })
933
934
  ]);
934
- return [...lines, `${items.length} shown${hasMore ? ", more with --page" : ""}`].join("\n");
935
+ return [...lines2, `${items.length} shown${hasMore ? ", more with --page" : ""}`].join("\n");
935
936
  }, "reviewText");
936
937
  var decidedText = /* @__PURE__ */ __name(({ decided, refused }) => [
937
938
  ...decided.map((one2) => `${one2.status.padEnd(9)} ${one2.id}${one2.made.length ? ` \u2192 ${one2.made.join(" ")}` : ""}`),
@@ -1821,8 +1822,8 @@ var configCommand = /* @__PURE__ */ __name((program, streams, env) => {
1821
1822
  const values = rows.map((row) => `${JSON.stringify(row.value)}${row.from === "default" ? " (default)" : ""}`);
1822
1823
  const wide = /* @__PURE__ */ __name((texts) => texts.reduce((most, text3) => Math.max(most, text3.length), 0), "wide");
1823
1824
  const [settingWidth, valueWidth] = [wide(rows.map((row) => row.setting)), wide(values)];
1824
- const lines = rows.map((row, at) => `${row.setting.padEnd(settingWidth)} ${values[at]?.padEnd(valueWidth)} ${row.description}`);
1825
- print(options.json, itemAnswer({ path: configPath(env), found: raw !== void 0, settings: rows }), [configPath(env), ...lines].join("\n"));
1825
+ const lines2 = rows.map((row, at) => `${row.setting.padEnd(settingWidth)} ${values[at]?.padEnd(valueWidth)} ${row.description}`);
1826
+ print(options.json, itemAnswer({ path: configPath(env), found: raw !== void 0, settings: rows }), [configPath(env), ...lines2].join("\n"));
1826
1827
  });
1827
1828
  annotate(config.command("migrate"), { effects: LOCAL_WRITE }).description("write each setting the file lacks at its default, keeping yours").option("--json", "print JSON; --json=id,title keeps only those fields").action((options) => {
1828
1829
  const added = migrateConfig(env);
@@ -4974,9 +4975,9 @@ var financeText = /* @__PURE__ */ __name((block) => block.length === 0 ? [] : [
4974
4975
  "books (confirmed invoices and payments):",
4975
4976
  ...block.map((one2) => {
4976
4977
  const refs = [...one2.invoices, ...one2.payments];
4977
- const shown = refs.slice(0, 6).join(" ") + (refs.length > 6 ? ` +${refs.length - 6}` : "");
4978
+ const shown2 = refs.slice(0, 6).join(" ") + (refs.length > 6 ? ` +${refs.length - 6}` : "");
4978
4979
  const loose = one2.unallocated === moneyOf(0, one2.currency).amount ? "" : `, ${one2.unallocated} not matched`;
4979
- return ` ${WHO[one2.direction]} ${one2.currency}: billed ${one2.billed}, paid ${one2.paid}, owed ${one2.owed}${loose} \xB7 ${shown}`;
4980
+ return ` ${WHO[one2.direction]} ${one2.currency}: billed ${one2.billed}, paid ${one2.paid}, owed ${one2.owed}${loose} \xB7 ${shown2}`;
4980
4981
  })
4981
4982
  ], "financeText");
4982
4983
 
@@ -5795,9 +5796,9 @@ var runChild = /* @__PURE__ */ __name((command, args, { env, signal, onStderr })
5795
5796
  stdout += chunk;
5796
5797
  });
5797
5798
  child.stderr.setEncoding("utf8").on("data", (chunk) => {
5798
- const lines = (pending2 + chunk).split("\n");
5799
- pending2 = lines.pop() ?? "";
5800
- for (const line3 of lines)
5799
+ const lines2 = (pending2 + chunk).split("\n");
5800
+ pending2 = lines2.pop() ?? "";
5801
+ for (const line3 of lines2)
5801
5802
  if (line3)
5802
5803
  onStderr?.(line3);
5803
5804
  });
@@ -6871,12 +6872,12 @@ var messagesCommand = /* @__PURE__ */ __name((program, streams, env) => {
6871
6872
  return;
6872
6873
  }
6873
6874
  const emails = await withStore(env, async (store) => {
6874
- const shown = await showMail(store, reference2, {
6875
+ const shown2 = await showMail(store, reference2, {
6875
6876
  before: options.beforeN,
6876
6877
  after: options.afterN,
6877
6878
  full: options.full === true
6878
6879
  });
6879
- return Promise.all(shown.map(async (email) => ({
6880
+ return Promise.all(shown2.map(async (email) => ({
6880
6881
  ...email,
6881
6882
  ...options.trimmed ? { text: mailOwnText(email.text) } : {},
6882
6883
  ref: email.locator,
@@ -6906,7 +6907,7 @@ var mcpCommandDefinition = /* @__PURE__ */ __name((program, streams, env, create
6906
6907
  }).summary("serve this profile's commands to an AI agent").description("serve memo commands over MCP on stdio or authenticated HTTP, limited by saved permissions").option("--permission <key=level>", "tighten one saved permission for this server; repeat for more keys", (value, previous = []) => [...previous, value]).option("--http", "serve on 127.0.0.1 behind an HTTPS tunnel with an owner access-code login").option("--port <port>", `local HTTP port (default ${DEFAULT_PORT}); requires --http`).option("--public-url <url>", "tunnel's HTTPS address without /mcp, or a path of it such as https://<name>.ts.net/memo; requires --http").action(async (options) => {
6907
6908
  if (!options.http && (options.port !== void 0 || options.publicUrl !== void 0))
6908
6909
  throw new CliError("validation_error", "--port and --public-url require --http");
6909
- const { createMemoServer } = await import("./server-MU43SKL5.js");
6910
+ const { createMemoServer } = await import("./server-ISFSZGGI.js");
6910
6911
  const build = /* @__PURE__ */ __name(() => createMemoServer(env, createProgram2, options.permission), "build");
6911
6912
  if (options.http) {
6912
6913
  const { httpLockFile, mcpUrlOf, portOf, publicUrlOf, serveOverHttp } = await import("./mcp-I72UY3QP.js");
@@ -6977,7 +6978,7 @@ var mcpCommandDefinition = /* @__PURE__ */ __name((program, streams, env, create
6977
6978
  argv: ["mcp", "serve", "--http"],
6978
6979
  version: APP.version
6979
6980
  }), "target"),
6980
- answer: /* @__PURE__ */ __name((self, item, lines) => out.print(self.opts().json, itemAnswer(item), lines.join("\n")), "answer")
6981
+ answer: /* @__PURE__ */ __name((self, item, lines2) => out.print(self.opts().json, itemAnswer(item), lines2.join("\n")), "answer")
6981
6982
  });
6982
6983
  for (const command of server.commands)
6983
6984
  command.option("--json", "print JSON");
@@ -7097,46 +7098,46 @@ var prepareStoredMeeting = /* @__PURE__ */ __name(async (store, env, source, ser
7097
7098
 
7098
7099
  // dist/meetings/preparation-text.js
7099
7100
  var preparationText = /* @__PURE__ */ __name((item) => {
7100
- const lines = [
7101
+ const lines2 = [
7101
7102
  `${item.series?.title ?? item.upcoming.meeting_id} \u2014 stored meeting preparation`,
7102
7103
  "Next meeting: unverified; no provider calendar was read.",
7103
7104
  `History: ${item.history_window.after} to ${item.history_window.before} (exclusive)`,
7104
7105
  `Archive completeness: ${item.coverage.archive_completeness}`
7105
7106
  ];
7106
7107
  for (const entry of [...item.meetings, ...item.related.items]) {
7107
- lines.push("", `${entry.ref} ${entry.meeting.started_at ?? "undated"} ${entry.meeting.title ?? "untitled"}`);
7108
+ lines2.push("", `${entry.ref} ${entry.meeting.started_at ?? "undated"} ${entry.meeting.title ?? "untitled"}`);
7108
7109
  for (const cue of entry.evidence.items)
7109
- lines.push(` ${cue.ref} ${cue.speaker_name ?? "unknown speaker"}: ${cue.text}`);
7110
+ lines2.push(` ${cue.ref} ${cue.speaker_name ?? "unknown speaker"}: ${cue.text}`);
7110
7111
  if (entry.evidence.coverage.has_more)
7111
- lines.push(" More transcript evidence available; use --json for references.");
7112
+ lines2.push(" More transcript evidence available; use --json for references.");
7112
7113
  }
7113
7114
  if (!item.meetings.length)
7114
- lines.push("No stored occurrences found in this series and history window.");
7115
+ lines2.push("No stored occurrences found in this series and history window.");
7115
7116
  for (const fact of item.knowledge?.items ?? [])
7116
- lines.push(`Fact ${fact.ref}: ${fact.statement}`);
7117
+ lines2.push(`Fact ${fact.ref}: ${fact.statement}`);
7117
7118
  for (const note of item.notes?.items ?? [])
7118
- lines.push(`Note ${note.ref}: ${note.text}`);
7119
+ lines2.push(`Note ${note.ref}: ${note.text}`);
7119
7120
  if (item.project_evidence)
7120
- lines.push(`Project word evidence: ${item.project_evidence.project}; use --json to inspect candidates.`);
7121
+ lines2.push(`Project word evidence: ${item.project_evidence.project}; use --json to inspect candidates.`);
7121
7122
  if (item.communications) {
7122
- lines.push("", `Communications: literal words \u201C${item.communications.coverage.query}\u201D`);
7123
+ lines2.push("", `Communications: literal words \u201C${item.communications.coverage.query}\u201D`);
7123
7124
  for (const source of item.communications.coverage.sources) {
7124
- lines.push(` ${source.selection_id}: ${source.state}; index ${source.index}; completeness ${source.completeness}`);
7125
+ lines2.push(` ${source.selection_id}: ${source.state}; index ${source.index}; completeness ${source.completeness}`);
7125
7126
  if (source.has_more)
7126
- lines.push(" More matches available; use --json for the source cursor.");
7127
+ lines2.push(" More matches available; use --json for the source cursor.");
7127
7128
  if (source.restart_required)
7128
- lines.push(" Some matches were omitted; restart with a larger output budget.");
7129
+ lines2.push(" Some matches were omitted; restart with a larger output budget.");
7129
7130
  }
7130
7131
  for (const excerpt2 of item.communications.items)
7131
- lines.push(`${excerpt2.ref} ${excerpt2.at}: ${excerpt2.text}`);
7132
+ lines2.push(`${excerpt2.ref} ${excerpt2.at}: ${excerpt2.text}`);
7132
7133
  } else
7133
- lines.push("Communications: not queried; select --context-source and --context-query to include them.");
7134
+ lines2.push("Communications: not queried; select --context-source and --context-query to include them.");
7134
7135
  if (item.coverage.history_has_more)
7135
- lines.push("More series history available; raise --meetings.");
7136
+ lines2.push("More series history available; raise --meetings.");
7136
7137
  if (item.coverage.output_limited)
7137
- lines.push("Output limited; raise --bytes to include more evidence.");
7138
- lines.push("Use --json for linked people, projects, facts, notes, tasks and full coverage.");
7139
- return lines.join("\n");
7138
+ lines2.push("Output limited; raise --bytes to include more evidence.");
7139
+ lines2.push("Use --json for linked people, projects, facts, notes, tasks and full coverage.");
7140
+ return lines2.join("\n");
7140
7141
  }, "preparationText");
7141
7142
 
7142
7143
  // dist/meetings/preparation-command.js
@@ -8403,22 +8404,22 @@ var reviewCommand = /* @__PURE__ */ __name((program, streams, env) => {
8403
8404
  });
8404
8405
  json6(annotate(review.command("show"), { effects: LOCAL_READ })).description("one proposal with its titles, signals and the text around each piece of evidence").argument("<id>", "the proposal's id, as review lists it: 17070, fact:512, memory:88, link:17, payment:4, close:Q-15").option("--brief", "only references and their titles, without excerpts or nearby text").option("--before-n <n>", "messages or document paragraphs before the evidence, at most 5", whole, 2).option("--after-n <n>", "messages or document paragraphs after the evidence, at most 5", whole, 2).option("--compact", "one line, as review prints it").action(async (id, given) => {
8405
8406
  const body = await withStore(env, async (store) => {
8406
- const shown = await showReview(store, env, id);
8407
+ const shown2 = await showReview(store, env, id);
8407
8408
  const window = {
8408
8409
  brief: given.brief === true,
8409
8410
  before: Math.min(given.beforeN, 5),
8410
8411
  after: Math.min(given.afterN, 5)
8411
8412
  };
8412
- const evidence = await Promise.all(shown.evidence.map(async (one2) => {
8413
+ const evidence = await Promise.all(shown2.evidence.map(async (one2) => {
8413
8414
  const sender = window.brief ? null : await senderOf(store, one2.ref);
8414
8415
  return {
8415
- ...window.brief ? {} : await evidenceContext(store, one2.ref, null, shown.reason ?? "", window),
8416
+ ...window.brief ? {} : await evidenceContext(store, one2.ref, null, shown2.reason ?? "", window),
8416
8417
  ...one2,
8417
8418
  ...sender === null ? {} : { sender },
8418
8419
  untrusted: EVIDENCE_UNTRUSTED
8419
8420
  };
8420
8421
  }));
8421
- return itemAnswer({ ...shown, evidence });
8422
+ return itemAnswer({ ...shown2, evidence });
8422
8423
  });
8423
8424
  print(given.json, body, void 0, given.compact);
8424
8425
  });
@@ -8668,6 +8669,7 @@ var syncCommand = /* @__PURE__ */ __name((program, streams, env, signal) => {
8668
8669
 
8669
8670
  // dist/schedule/mail-triage-input.js
8670
8671
  var SKILL = "mail-triage";
8672
+ var INPUT_BUDGET = AGENT_INPUT_MAX_CHARS - 1e3;
8671
8673
  var FIELDS = [
8672
8674
  "ref",
8673
8675
  "chat_id",
@@ -8679,37 +8681,119 @@ var FIELDS = [
8679
8681
  "email.new_sender",
8680
8682
  "email.sender_identities",
8681
8683
  "email.bulk",
8682
- "email.excerpt_only"
8684
+ "email.excerpt_only",
8685
+ "email.cursor",
8686
+ "email.findings_key"
8683
8687
  ].join(",");
8684
8688
  var stepArg = /* @__PURE__ */ __name((review, step, arg) => review.next?.find((one2) => one2.step === step)?.args?.[arg], "stepArg");
8685
- var mailboxBlock = /* @__PURE__ */ __name((source, review) => {
8686
- const items = review.items ?? [];
8687
- const key = stepArg(review, "mail-findings.add", "key");
8688
- const cursor = stepArg(review, "mail-messages.acknowledge", "cursor");
8689
+ var shown = /* @__PURE__ */ __name((item) => {
8690
+ if (!item.email)
8691
+ return JSON.stringify(item);
8692
+ const { cursor: _cursor, findings_key: _key, ...email } = item.email;
8693
+ return JSON.stringify({ ...item, email });
8694
+ }, "shown");
8695
+ var cutsOf = /* @__PURE__ */ __name((items) => {
8696
+ const cuts = /* @__PURE__ */ new Map();
8697
+ for (const item of items) {
8698
+ const cursor = item.email?.cursor;
8699
+ if (!cursor)
8700
+ return void 0;
8701
+ const cut2 = cuts.get(cursor) ?? { cursor, key: item.email?.findings_key, items: [] };
8702
+ cut2.items.push(item);
8703
+ cuts.set(cursor, cut2);
8704
+ }
8705
+ return [...cuts.values()].sort((a, b) => Number.parseInt(a.cursor, 10) - Number.parseInt(b.cursor, 10));
8706
+ }, "cutsOf");
8707
+ var lines = /* @__PURE__ */ __name((source, review, { key, cursor, items, waiting: waiting2 }) => {
8689
8708
  const left = (review.missing ?? []).map((one2) => one2.why).filter(Boolean);
8690
8709
  return [
8691
8710
  `## ${source}`,
8692
8711
  ...key ? [`key: ${key}`] : [],
8693
8712
  `cursor: ${cursor ?? "none"}`,
8694
- `more mail waits past the cursor: ${review.meta?.complete === false}`,
8713
+ waiting2 > 0 ? `more mail waits past the cursor: true \u2014 ${waiting2} emails did not fit this input; the next run reads them, do not review this mailbox again now` : `more mail waits past the cursor: ${review.meta?.complete === false}`,
8695
8714
  ...left.length ? [`left out: ${left.join("; ")}`] : [],
8715
+ ...items.some((item) => item.text_cut) ? [
8716
+ "text_cut: only the start of that email's text fits here; read it whole with `memo messages show '<ref>' --trimmed --json` before you stage a finding from it"
8717
+ ] : [],
8696
8718
  items.length ? "emails, one JSON per line:" : "no emails; acknowledge the cursor.",
8697
- ...items.map((item) => JSON.stringify(item))
8719
+ ...items.map(shown)
8698
8720
  ].join("\n");
8721
+ }, "lines");
8722
+ var LEAST_TEXT = 300;
8723
+ var startOf = /* @__PURE__ */ __name((text3, length) => {
8724
+ const end = /[\uD800-\uDBFF]/.test(text3.charAt(length - 1)) ? length - 1 : length;
8725
+ return text3.slice(0, Math.max(0, end));
8726
+ }, "startOf");
8727
+ var shortened = /* @__PURE__ */ __name((items, room, least, block) => {
8728
+ const longest = items.reduce((most, item) => Math.max(most, item.text?.length ?? 0), 0);
8729
+ const cut2 = /* @__PURE__ */ __name((share2) => items.map((item) => (item.text?.length ?? 0) <= share2 ? item : { ...item, text: startOf(item.text ?? "", share2), text_cut: true }), "cut");
8730
+ let share = longest;
8731
+ for (let over = block(cut2(share)).length - room; over > 0; over = block(cut2(share)).length - room) {
8732
+ if (share === 0)
8733
+ return void 0;
8734
+ share = Math.max(0, share - Math.ceil(over / items.length));
8735
+ }
8736
+ return share < Math.min(least, longest) ? void 0 : cut2(share);
8737
+ }, "shortened");
8738
+ var mailboxBlock = /* @__PURE__ */ __name((source, review, room = Number.POSITIVE_INFINITY, alone = false) => {
8739
+ const items = review.items ?? [];
8740
+ const key = stepArg(review, "mail-findings.add", "key");
8741
+ const cursor = stepArg(review, "mail-messages.acknowledge", "cursor");
8742
+ const whole2 = lines(source, review, { key, cursor, items, waiting: 0 });
8743
+ if (whole2.length <= room)
8744
+ return whole2;
8745
+ const cuts = cutsOf(items) ?? [];
8746
+ let fit;
8747
+ for (let end = 1; end < cuts.length; end++) {
8748
+ const kept = new Set(cuts.slice(0, end).flatMap((cut2) => cut2.items));
8749
+ const at = cuts[end - 1];
8750
+ const block = lines(source, review, {
8751
+ key: at?.key,
8752
+ cursor: at?.cursor,
8753
+ items: items.filter((item) => kept.has(item)),
8754
+ waiting: items.length - kept.size
8755
+ });
8756
+ if (block.length > room)
8757
+ break;
8758
+ fit = block;
8759
+ }
8760
+ if (fit)
8761
+ return fit;
8762
+ const [first] = cuts;
8763
+ if (first) {
8764
+ const block = /* @__PURE__ */ __name((group2) => lines(source, review, {
8765
+ key: first.key,
8766
+ cursor: first.cursor,
8767
+ items: group2,
8768
+ waiting: items.length - group2.length
8769
+ }), "block");
8770
+ const group = shortened(first.items, room, alone ? 0 : LEAST_TEXT, block);
8771
+ if (group)
8772
+ return block(group);
8773
+ }
8774
+ return `## ${source}
8775
+ no room in this input: do not acknowledge this mailbox and do not review it now; the next run reads it.`;
8699
8776
  }, "mailboxBlock");
8700
- var PREAMBLE = "Your first reads are below, already done: the mail-triage skill and each mailbox's review. Do not run `memo skill show` or `memo mail review`. Start at step 2 of the skill. Stage each mailbox's findings in ONE `memo mail findings add` call, all mailboxes in the same turn, without `--dry-run`. Then acknowledge each mailbox's cursor (also a mailbox with nothing to stage), then write the report.";
8777
+ var PREAMBLE = "Your first reads are below, already done: the mail-triage skill and each mailbox's review. Do not run `memo skill show` or `memo mail review`. Start at step 2 of the skill. Stage each mailbox's findings in ONE `memo mail findings add` call, all mailboxes in the same turn, without `--dry-run`. Then acknowledge each mailbox's cursor (also a mailbox with nothing to stage) except one marked \"do not acknowledge\", then write the report.";
8701
8778
  var mailTriageInput = /* @__PURE__ */ __name((mailboxes) => async (schedule, run) => {
8702
8779
  const holder = schedule.onNewMail;
8703
8780
  if (!holder)
8704
8781
  return void 0;
8705
8782
  const skill2 = await run(["skill", "show", SKILL]);
8706
- const blocks = [];
8783
+ const parts = [PREAMBLE, "# The skill", skill2.trim(), "# The review"];
8784
+ const separator = "\n\n";
8785
+ let used = parts.join(separator).length + separator.length * 2;
8786
+ let alone = true;
8707
8787
  for (const address of await mailboxes()) {
8708
8788
  const source = `email:${address}`;
8709
8789
  const review = JSON.parse(await run(["mail", "review", "--holder", holder, "--source", source, `--json=${FIELDS}`]));
8710
- blocks.push(mailboxBlock(source, review));
8790
+ const block = mailboxBlock(source, review, INPUT_BUDGET - used - separator.length, alone);
8791
+ parts.push(block);
8792
+ used += block.length + separator.length;
8793
+ if (block.includes("\nemails, one JSON per line:"))
8794
+ alone = false;
8711
8795
  }
8712
- return [PREAMBLE, "# The skill", skill2.trim(), "# The review", ...blocks, ""].join("\n\n");
8796
+ return [...parts, ""].join(separator);
8713
8797
  }, "mailTriageInput");
8714
8798
 
8715
8799
  // dist/schedule/command.js
@@ -9266,9 +9350,9 @@ var tagsCommand = /* @__PURE__ */ __name((program, streams, env) => {
9266
9350
  }) : { items: [], hasMore: false };
9267
9351
  const knowledge = owned.items;
9268
9352
  answer.hasMore ||= owned.hasMore;
9269
- const lines = answer.items.map((row) => `${row.tag} ${row.type} ${row.locator ?? (row.type === "contact" ? `${row.provider}:${row.personId ?? ""}` : reference(row, row.chatId ?? ""))}`);
9353
+ const lines2 = answer.items.map((row) => `${row.tag} ${row.type} ${row.locator ?? (row.type === "contact" ? `${row.provider}:${row.personId ?? ""}` : reference(row, row.chatId ?? ""))}`);
9270
9354
  if (answer.hasMore)
9271
- lines.push("More labels match; raise --limit to see them.");
9355
+ lines2.push("More labels match; raise --limit to see them.");
9272
9356
  answer.hasMore ||= knowledge.length > options.limit;
9273
9357
  print(options.json, listAnswer("tags list", {
9274
9358
  items: [
@@ -9279,7 +9363,7 @@ var tagsCommand = /* @__PURE__ */ __name((program, streams, env) => {
9279
9363
  has_more: answer.hasMore,
9280
9364
  meta: { accounts: keys.map(accountName) }
9281
9365
  }), [
9282
- ...lines,
9366
+ ...lines2,
9283
9367
  ...knowledge.slice(0, options.limit).map((item) => `${item.labels.map(({ tag: tag2, origin }) => origin === "file" ? `${tag2} (file)` : tag2).join(", ")} ${item.target.type} ${item.target.type === "message" ? item.target.locator : `${item.target.type}:${item.target.id}`}`)
9284
9368
  ].join("\n") || "No source tags.");
9285
9369
  });
@@ -6,19 +6,19 @@ import {
6
6
  memoLevels,
7
7
  readOnly,
8
8
  refuseUnknownPermissions
9
- } from "./chunk-WXFNUZZU.js";
9
+ } from "./chunk-ME5RFKKD.js";
10
10
  import {
11
11
  itemAnswer
12
- } from "./chunk-D63QZQR7.js";
13
- import "./chunk-F3BUTC2N.js";
12
+ } from "./chunk-K236JZLF.js";
13
+ import "./chunk-YHHR7NQ3.js";
14
14
  import "./chunk-QP3KNC5D.js";
15
15
  import "./chunk-3MWNNJII.js";
16
16
  import {
17
17
  errorObject,
18
18
  mcpFailure,
19
19
  throwParseFailures
20
- } from "./chunk-WNQUOEUV.js";
21
- import "./chunk-CQPZUKTI.js";
20
+ } from "./chunk-HIF4YBD7.js";
21
+ import "./chunk-DIFRVXKQ.js";
22
22
  import "./chunk-34GJQ4ZR.js";
23
23
  import "./chunk-O7CBAY6J.js";
24
24
  import "./chunk-JB43Q2QL.js";
@@ -90,7 +90,7 @@ import {
90
90
  APP,
91
91
  STORE_CLIENT,
92
92
  VERSION
93
- } from "./chunk-LCP4TVBX.js";
93
+ } from "./chunk-ZRBXOHNH.js";
94
94
  import "./chunk-IK6KH3RE.js";
95
95
  import "./chunk-SW6C6WH5.js";
96
96
  import "./chunk-D72URWJE.js";
@@ -7,10 +7,10 @@ import {
7
7
  runUpdate,
8
8
  updateNotice,
9
9
  upgradeCommand
10
- } from "./chunk-LBGZT3W4.js";
11
- import "./chunk-F3BUTC2N.js";
10
+ } from "./chunk-JI4LJ563.js";
11
+ import "./chunk-YHHR7NQ3.js";
12
12
  import "./chunk-QP3KNC5D.js";
13
- import "./chunk-CQPZUKTI.js";
13
+ import "./chunk-DIFRVXKQ.js";
14
14
  import "./chunk-34GJQ4ZR.js";
15
15
  import "./chunk-JB43Q2QL.js";
16
16
  import "./chunk-DDD3CXHR.js";
@@ -47,7 +47,7 @@ import "./chunk-VPCNLTME.js";
47
47
  import "./chunk-26QKDK5P.js";
48
48
  import "./chunk-OSPAMIIY.js";
49
49
  import "./chunk-RSBROHX4.js";
50
- import "./chunk-LCP4TVBX.js";
50
+ import "./chunk-ZRBXOHNH.js";
51
51
  import "./chunk-IK6KH3RE.js";
52
52
  import "./chunk-SW6C6WH5.js";
53
53
  import "./chunk-D72URWJE.js";
@@ -1,10 +1,21 @@
1
- import type { AgentInput } from "@wirecat/cli-core/cli";
1
+ import { type AgentInput } from "@wirecat/cli-core/cli";
2
+ /** cli-core cuts past its cap mid-text; this input stays under it with room for the lines the cut itself adds. */
3
+ export declare const INPUT_BUDGET: number;
2
4
  interface Step {
3
5
  step?: string;
4
6
  args?: Record<string, string>;
5
7
  }
8
+ interface Item {
9
+ text?: string;
10
+ email?: {
11
+ cursor?: string;
12
+ findings_key?: string;
13
+ [field: string]: unknown;
14
+ };
15
+ [field: string]: unknown;
16
+ }
6
17
  interface Review {
7
- items?: unknown[];
18
+ items?: Item[];
8
19
  missing?: {
9
20
  why?: string;
10
21
  }[];
@@ -13,11 +24,16 @@ interface Review {
13
24
  };
14
25
  next?: Step[];
15
26
  }
16
- /** One mailbox, compactly: the key and cursor the skill's steps 1 and 6 name, then one JSON line per email. */
17
- export declare const mailboxBlock: (source: string, review: Review) => string;
27
+ /**
28
+ * One mailbox, compactly: the key and cursor the skill's steps 1 and 6 name, then one JSON line per email. Past
29
+ * `room` it keeps the emails up to a cut in store order and gives that cut's cursor and key, so acknowledging them
30
+ * never moves the mark past an email left out. When even the first cut does not fit, its texts are shortened to fit;
31
+ * `alone` (nothing else shown yet) lets them go below `LEAST_TEXT`, so some mailbox always moves on.
32
+ */
33
+ export declare const mailboxBlock: (source: string, review: Review, room?: number, alone?: boolean) => string;
18
34
  /**
19
35
  * What the scheduled mail-triage agent gets on its stdin: the skill and each mailbox's review, so it starts at the
20
- * triage and spends no turns reading them.
36
+ * triage and spends no turns reading them. It stays under `INPUT_BUDGET` by leaving whole emails out.
21
37
  */
22
38
  export declare const mailTriageInput: (mailboxes: () => Promise<string[]>) => AgentInput;
23
39
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"mail-triage-input.d.ts","sourceRoot":"","sources":["../../src/schedule/mail-triage-input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAkBvD,UAAU,IAAI;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC9B;AAED,UAAU,MAAM;IACd,KAAK,CAAC,EAAE,OAAO,EAAE,CAAA;IACjB,OAAO,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IAC5B,IAAI,CAAC,EAAE;QAAE,QAAQ,CAAC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AAM,OAAO,CAAC,MAAM,EAAE,CAAC,KAAG,UAoBrC,CAAA"}
@@ -1,4 +1,7 @@
1
+ import { AGENT_INPUT_MAX_CHARS } from "@wirecat/cli-core/cli";
1
2
  const SKILL = "mail-triage";
3
+ /** cli-core cuts past its cap mid-text; this input stays under it with room for the lines the cut itself adds. */
4
+ export const INPUT_BUDGET = AGENT_INPUT_MAX_CHARS - 1_000;
2
5
  const FIELDS = [
3
6
  "ref",
4
7
  "chat_id",
@@ -11,43 +14,139 @@ const FIELDS = [
11
14
  "email.sender_identities",
12
15
  "email.bulk",
13
16
  "email.excerpt_only",
17
+ "email.cursor",
18
+ "email.findings_key",
14
19
  ].join(",");
15
20
  const stepArg = (review, step, arg) => review.next?.find((one) => one.step === step)?.args?.[arg];
16
- /** One mailbox, compactly: the key and cursor the skill's steps 1 and 6 name, then one JSON line per email. */
17
- export const mailboxBlock = (source, review) => {
18
- const items = review.items ?? [];
19
- const key = stepArg(review, "mail-findings.add", "key");
20
- const cursor = stepArg(review, "mail-messages.acknowledge", "cursor");
21
+ /** The email as the agent sees it: the per-email cursor and key are this file's, not the agent's. */
22
+ const shown = (item) => {
23
+ if (!item.email)
24
+ return JSON.stringify(item);
25
+ const { cursor: _cursor, findings_key: _key, ...email } = item.email;
26
+ return JSON.stringify({ ...item, email });
27
+ };
28
+ const cutsOf = (items) => {
29
+ const cuts = new Map();
30
+ for (const item of items) {
31
+ const cursor = item.email?.cursor;
32
+ if (!cursor)
33
+ return undefined;
34
+ const cut = cuts.get(cursor) ?? { cursor, key: item.email?.findings_key, items: [] };
35
+ cut.items.push(item);
36
+ cuts.set(cursor, cut);
37
+ }
38
+ // A cursor is `<store id>.<read time>`, and one read gives one read time: the id orders them.
39
+ return [...cuts.values()].sort((a, b) => Number.parseInt(a.cursor, 10) - Number.parseInt(b.cursor, 10));
40
+ };
41
+ const lines = (source, review, { key, cursor, items, waiting }) => {
21
42
  const left = (review.missing ?? []).map((one) => one.why).filter(Boolean);
22
43
  return [
23
44
  `## ${source}`,
24
45
  ...(key ? [`key: ${key}`] : []),
25
46
  `cursor: ${cursor ?? "none"}`,
26
- `more mail waits past the cursor: ${review.meta?.complete === false}`,
47
+ waiting > 0
48
+ ? `more mail waits past the cursor: true — ${waiting} emails did not fit this input; the next run reads them, ` +
49
+ "do not review this mailbox again now"
50
+ : `more mail waits past the cursor: ${review.meta?.complete === false}`,
27
51
  ...(left.length ? [`left out: ${left.join("; ")}`] : []),
52
+ ...(items.some((item) => item.text_cut)
53
+ ? [
54
+ "text_cut: only the start of that email's text fits here; read it whole with " +
55
+ "`memo messages show '<ref>' --trimmed --json` before you stage a finding from it",
56
+ ]
57
+ : []),
28
58
  items.length ? "emails, one JSON per line:" : "no emails; acknowledge the cursor.",
29
- ...items.map((item) => JSON.stringify(item)),
59
+ ...items.map(shown),
30
60
  ].join("\n");
31
61
  };
62
+ /** Text shorter than this tells the agent too little to act on; past the first mailbox it waits for a run with room. */
63
+ const LEAST_TEXT = 300;
64
+ const startOf = (text, length) => {
65
+ const end = /[\uD800-\uDBFF]/.test(text.charAt(length - 1)) ? length - 1 : length;
66
+ return text.slice(0, Math.max(0, end));
67
+ };
68
+ /** The group with every text cut to one share of the room, or `undefined` when a share is under `least`. */
69
+ const shortened = (items, room, least, block) => {
70
+ const longest = items.reduce((most, item) => Math.max(most, item.text?.length ?? 0), 0);
71
+ const cut = (share) => items.map((item) => (item.text?.length ?? 0) <= share ? item : { ...item, text: startOf(item.text ?? "", share), text_cut: true });
72
+ let share = longest;
73
+ for (let over = block(cut(share)).length - room; over > 0; over = block(cut(share)).length - room) {
74
+ if (share === 0)
75
+ return undefined;
76
+ share = Math.max(0, share - Math.ceil(over / items.length));
77
+ }
78
+ return share < Math.min(least, longest) ? undefined : cut(share);
79
+ };
80
+ /**
81
+ * One mailbox, compactly: the key and cursor the skill's steps 1 and 6 name, then one JSON line per email. Past
82
+ * `room` it keeps the emails up to a cut in store order and gives that cut's cursor and key, so acknowledging them
83
+ * never moves the mark past an email left out. When even the first cut does not fit, its texts are shortened to fit;
84
+ * `alone` (nothing else shown yet) lets them go below `LEAST_TEXT`, so some mailbox always moves on.
85
+ */
86
+ export const mailboxBlock = (source, review, room = Number.POSITIVE_INFINITY, alone = false) => {
87
+ const items = review.items ?? [];
88
+ const key = stepArg(review, "mail-findings.add", "key");
89
+ const cursor = stepArg(review, "mail-messages.acknowledge", "cursor");
90
+ const whole = lines(source, review, { key, cursor, items, waiting: 0 });
91
+ if (whole.length <= room)
92
+ return whole;
93
+ const cuts = cutsOf(items) ?? [];
94
+ let fit;
95
+ for (let end = 1; end < cuts.length; end++) {
96
+ const kept = new Set(cuts.slice(0, end).flatMap((cut) => cut.items));
97
+ const at = cuts[end - 1];
98
+ const block = lines(source, review, {
99
+ key: at?.key,
100
+ cursor: at?.cursor,
101
+ items: items.filter((item) => kept.has(item)),
102
+ waiting: items.length - kept.size,
103
+ });
104
+ if (block.length > room)
105
+ break;
106
+ fit = block;
107
+ }
108
+ if (fit)
109
+ return fit;
110
+ const [first] = cuts;
111
+ if (first) {
112
+ const block = (group) => lines(source, review, {
113
+ key: first.key,
114
+ cursor: first.cursor,
115
+ items: group,
116
+ waiting: items.length - group.length,
117
+ });
118
+ const group = shortened(first.items, room, alone ? 0 : LEAST_TEXT, block);
119
+ if (group)
120
+ return block(group);
121
+ }
122
+ return `## ${source}\nno room in this input: do not acknowledge this mailbox and do not review it now; the next run reads it.`;
123
+ };
32
124
  const PREAMBLE = "Your first reads are below, already done: the mail-triage skill and each mailbox's review. Do not run " +
33
125
  "`memo skill show` or `memo mail review`. Start at step 2 of the skill. Stage each mailbox's findings in ONE " +
34
126
  "`memo mail findings add` call, all mailboxes in the same turn, without `--dry-run`. Then acknowledge each " +
35
- "mailbox's cursor (also a mailbox with nothing to stage), then write the report.";
127
+ 'mailbox\'s cursor (also a mailbox with nothing to stage) except one marked "do not acknowledge", then write the report.';
36
128
  /**
37
129
  * What the scheduled mail-triage agent gets on its stdin: the skill and each mailbox's review, so it starts at the
38
- * triage and spends no turns reading them.
130
+ * triage and spends no turns reading them. It stays under `INPUT_BUDGET` by leaving whole emails out.
39
131
  */
40
132
  export const mailTriageInput = (mailboxes) => async (schedule, run) => {
41
133
  const holder = schedule.onNewMail;
42
134
  if (!holder)
43
135
  return undefined;
44
136
  const skill = await run(["skill", "show", SKILL]);
45
- const blocks = [];
137
+ const parts = [PREAMBLE, "# The skill", skill.trim(), "# The review"];
138
+ const separator = "\n\n";
139
+ let used = parts.join(separator).length + separator.length * 2;
140
+ let alone = true;
46
141
  for (const address of await mailboxes()) {
47
142
  const source = `email:${address}`;
48
143
  const review = JSON.parse(await run(["mail", "review", "--holder", holder, "--source", source, `--json=${FIELDS}`]));
49
- blocks.push(mailboxBlock(source, review));
144
+ const block = mailboxBlock(source, review, INPUT_BUDGET - used - separator.length, alone);
145
+ parts.push(block);
146
+ used += block.length + separator.length;
147
+ if (block.includes("\nemails, one JSON per line:"))
148
+ alone = false;
50
149
  }
51
- return [PREAMBLE, "# The skill", skill.trim(), "# The review", ...blocks, ""].join("\n\n");
150
+ return [...parts, ""].join(separator);
52
151
  };
53
152
  //# sourceMappingURL=mail-triage-input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mail-triage-input.js","sourceRoot":"","sources":["../../src/schedule/mail-triage-input.ts"],"names":[],"mappings":"AAEA,MAAM,KAAK,GAAG,aAAa,CAAA;AAE3B,MAAM,MAAM,GAAG;IACb,KAAK;IACL,SAAS;IACT,cAAc;IACd,MAAM;IACN,eAAe;IACf,YAAY;IACZ,mBAAmB;IACnB,kBAAkB;IAClB,yBAAyB;IACzB,YAAY;IACZ,oBAAoB;CACrB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAcX,MAAM,OAAO,GAAG,CAAC,MAAc,EAAE,IAAY,EAAE,GAAW,EAAE,EAAE,CAC5D,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,IAA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CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,MAAM,EAAE,CAAC,CAAC,CAChF,CAAA;QACX,MAAM,KAAK,GAAG,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QACzF,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QACjB,IAAI,IAAI,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAA;QACvC,IAAI,KAAK,CAAC,QAAQ,CAAC,8BAA8B,CAAC;YAAE,KAAK,GAAG,KAAK,CAAA;IACnE,CAAC;IACD,OAAO,CAAC,GAAG,KAAK,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;AACvC,CAAC,CAAA"}
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.131.53";
1
+ export declare const VERSION = "0.131.54";
2
2
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = "0.131.53";
1
+ export const VERSION = "0.131.54";
2
2
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wirecat/cli-memo",
3
- "version": "0.131.53",
3
+ "version": "0.131.54",
4
4
  "description": "Context about people across messengers, notes and mail, from a local store",
5
5
  "mcpName": "dev.wirecat/cli-memo",
6
6
  "license": "Apache-2.0",