@paigy/harness 0.3.44 → 0.3.46

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 (4) hide show
  1. package/README.md +25 -32
  2. package/dist/cli.js +632 -222
  3. package/dist/main.js +597 -206
  4. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -3257,25 +3257,25 @@ var require_data_url = __commonJS({
3257
3257
  function isHTTPWhiteSpace(char) {
3258
3258
  return char === 13 || char === 10 || char === 9 || char === 32;
3259
3259
  }
3260
- function removeHTTPWhitespace(str5, leading = true, trailing = true) {
3261
- return removeChars(str5, leading, trailing, isHTTPWhiteSpace);
3260
+ function removeHTTPWhitespace(str, leading = true, trailing = true) {
3261
+ return removeChars(str, leading, trailing, isHTTPWhiteSpace);
3262
3262
  }
3263
3263
  function isASCIIWhitespace(char) {
3264
3264
  return char === 13 || char === 10 || char === 9 || char === 12 || char === 32;
3265
3265
  }
3266
- function removeASCIIWhitespace(str5, leading = true, trailing = true) {
3267
- return removeChars(str5, leading, trailing, isASCIIWhitespace);
3266
+ function removeASCIIWhitespace(str, leading = true, trailing = true) {
3267
+ return removeChars(str, leading, trailing, isASCIIWhitespace);
3268
3268
  }
3269
- function removeChars(str5, leading, trailing, predicate) {
3269
+ function removeChars(str, leading, trailing, predicate) {
3270
3270
  let lead = 0;
3271
- let trail = str5.length - 1;
3271
+ let trail = str.length - 1;
3272
3272
  if (leading) {
3273
- while (lead < str5.length && predicate(str5.charCodeAt(lead))) lead++;
3273
+ while (lead < str.length && predicate(str.charCodeAt(lead))) lead++;
3274
3274
  }
3275
3275
  if (trailing) {
3276
- while (trail > 0 && predicate(str5.charCodeAt(trail))) trail--;
3276
+ while (trail > 0 && predicate(str.charCodeAt(trail))) trail--;
3277
3277
  }
3278
- return lead === 0 && trail === str5.length - 1 ? str5 : str5.slice(lead, trail + 1);
3278
+ return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1);
3279
3279
  }
3280
3280
  function isomorphicDecode(input) {
3281
3281
  const length = input.length;
@@ -5194,7 +5194,7 @@ var require_body = __commonJS({
5194
5194
  const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, "0")}`;
5195
5195
  const prefix = `--${boundary}\r
5196
5196
  Content-Disposition: form-data`;
5197
- const escape = (str5) => str5.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22");
5197
+ const escape = (str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22");
5198
5198
  const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, "\r\n");
5199
5199
  const blobParts = [];
5200
5200
  const rn = new Uint8Array([13, 10]);
@@ -16042,9 +16042,9 @@ var require_cookies = __commonJS({
16042
16042
  webidl.argumentLengthCheck(arguments, 2, "setCookie");
16043
16043
  webidl.brandCheck(headers, Headers, { strict: false });
16044
16044
  cookie = webidl.converters.Cookie(cookie);
16045
- const str5 = stringify(cookie);
16046
- if (str5) {
16047
- headers.append("Set-Cookie", str5);
16045
+ const str = stringify(cookie);
16046
+ if (str) {
16047
+ headers.append("Set-Cookie", str);
16048
16048
  }
16049
16049
  }
16050
16050
  webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([
@@ -19413,14 +19413,14 @@ var require_regex = __commonJS({
19413
19413
  var TEST_KANJI = new RegExp("^" + kanji + "$");
19414
19414
  var TEST_NUMERIC = new RegExp("^" + numeric + "$");
19415
19415
  var TEST_ALPHANUMERIC = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
19416
- exports.testKanji = function testKanji(str5) {
19417
- return TEST_KANJI.test(str5);
19416
+ exports.testKanji = function testKanji(str) {
19417
+ return TEST_KANJI.test(str);
19418
19418
  };
19419
- exports.testNumeric = function testNumeric(str5) {
19420
- return TEST_NUMERIC.test(str5);
19419
+ exports.testNumeric = function testNumeric(str) {
19420
+ return TEST_NUMERIC.test(str);
19421
19421
  };
19422
- exports.testAlphanumeric = function testAlphanumeric(str5) {
19423
- return TEST_ALPHANUMERIC.test(str5);
19422
+ exports.testAlphanumeric = function testAlphanumeric(str) {
19423
+ return TEST_ALPHANUMERIC.test(str);
19424
19424
  };
19425
19425
  }
19426
19426
  });
@@ -19922,13 +19922,13 @@ var require_segments = __commonJS({
19922
19922
  var Regex = require_regex();
19923
19923
  var Utils = require_utils2();
19924
19924
  var dijkstra = require_dijkstra();
19925
- function getStringByteLength(str5) {
19926
- return unescape(encodeURIComponent(str5)).length;
19925
+ function getStringByteLength(str) {
19926
+ return unescape(encodeURIComponent(str)).length;
19927
19927
  }
19928
- function getSegments(regex, mode, str5) {
19928
+ function getSegments(regex, mode, str) {
19929
19929
  const segments = [];
19930
19930
  let result;
19931
- while ((result = regex.exec(str5)) !== null) {
19931
+ while ((result = regex.exec(str)) !== null) {
19932
19932
  segments.push({
19933
19933
  data: result[0],
19934
19934
  index: result.index,
@@ -22762,13 +22762,13 @@ var require_svg_tag = __commonJS({
22762
22762
  var Utils = require_utils3();
22763
22763
  function getColorAttrib(color, attrib) {
22764
22764
  const alpha = color.a / 255;
22765
- const str5 = attrib + '="' + color.hex + '"';
22766
- return alpha < 1 ? str5 + " " + attrib + '-opacity="' + alpha.toFixed(2).slice(1) + '"' : str5;
22765
+ const str = attrib + '="' + color.hex + '"';
22766
+ return alpha < 1 ? str + " " + attrib + '-opacity="' + alpha.toFixed(2).slice(1) + '"' : str;
22767
22767
  }
22768
22768
  function svgCmd(cmd, x, y) {
22769
- let str5 = cmd + x;
22770
- if (typeof y !== "undefined") str5 += " " + y;
22771
- return str5;
22769
+ let str = cmd + x;
22770
+ if (typeof y !== "undefined") str += " " + y;
22771
+ return str;
22772
22772
  }
22773
22773
  function qrToPath(data, size, margin) {
22774
22774
  let path = "";
@@ -27329,6 +27329,23 @@ function onEnter(input, onLine) {
27329
27329
  };
27330
27330
  }
27331
27331
 
27332
+ // src/lineage.ts
27333
+ var NAME_MAX = 60;
27334
+ var tidy = (s) => s.replace(/\s+/gu, " ").trim().replace(/^\/+|\/+$/gu, "").trim();
27335
+ function lineageName(parent, name, max = NAME_MAX) {
27336
+ const own = tidy(name);
27337
+ const line = tidy(parent ?? "");
27338
+ if (!line || !own) return own.slice(0, max);
27339
+ const full = `${line}/${own}`;
27340
+ if (full.length <= max) return full;
27341
+ const [root] = line.split("/");
27342
+ const elided = `${root}/\u2026/${own}`;
27343
+ if (root && elided.length <= max && root !== line) return elided;
27344
+ const short2 = `${root}/${own}`;
27345
+ if (root && short2.length <= max) return short2;
27346
+ return own.slice(0, max);
27347
+ }
27348
+
27332
27349
  // ../../packages/sdk/dist/index.js
27333
27350
  import { createRequire as __sdkCreateRequire } from "module";
27334
27351
  import { execFileSync } from "child_process";
@@ -28713,7 +28730,7 @@ var OptionInputSchema = external_exports.object({
28713
28730
  imgUrl: OptionSchema.shape.image
28714
28731
  }).strict();
28715
28732
  var NIGHT = { from: 23, to: 7 };
28716
- var ASK_MAX = 250;
28733
+ var ASK_MAX = 80;
28717
28734
  var UNITS_MAX = 12;
28718
28735
  var UNIT_TITLE_MAX = 50;
28719
28736
  var UNIT_BODY_MAX = 200;
@@ -28778,15 +28795,15 @@ var CompletionSchema = external_exports.object({
28778
28795
  }).strict();
28779
28796
  var CompleteChangeSchema = CompletionSchema.extend({ kind: external_exports.literal("complete") });
28780
28797
  var ASKING_RULES = `HOW TO ASK:
28781
- 1. Write one question per object. Five questions are five objects in \`questions\`, in one contact, so each can be answered on its own; one question with five parts settles nothing until all five are answered.
28782
- 2. Name the Goal you are working on as the question's \`goalId\`: the question goes onto that Goal and its answer comes back there. It must exist: create it with manage_goals first.
28783
- 3. \`workItBlocks\` only for work you are truly blocked on (it asks for a call); leave it out for a question you can keep working around.
28784
- 4. Never hold the process open with while-loops. A wait that comes back \`expired\` is not a finished conversation: wait again with contact({wait:true}) only while you have nothing else to do. While a Call you placed is open, keep receiving window after window until it ends, even when a window is empty: the person may give follow-ups or instructions. With no open Call, STOP WAITING when a window comes back with nothing new \u2014 the question stays open, and its answer reaches you on the Goal. Otherwise, yield only with a working listener or scheduled wakeup, and collect answers with \`contact({wait:false})\` or \`get_goals\` on that wake.
28785
- 5. One question, one row. Never restate a question that is still waiting inside a new contact: keep waiting on the original, or the answer lands on one copy and the other stays open. Take back one that no longer matters with \`withdrawQuestionIds\`.
28786
- 6. Read the Goal's conversation before asking. Never ask again what was answered or already shipped \u2014 and tell its states apart: \`answered\` carries the choice in \`answer\`, while \`replied\` means they said something and chose none of your options, so that question is still yours to settle and their words are the line beside it.
28787
- 7. A question carries its options when you have them; a free-text question may omit them. Each option\u2019s label must stand on its own and name its choice in full -- never \`All three\` or \`Option 2\`. \`pickMode: "many"\` makes the card a checklist (options they may want several of); \`"one"\`, the default, a pick (one rules out the others); \`"rank"\` an ordering. Each question is sent exactly as written, with no reading in between. They can always answer in their own words, so never add an 'Other' option.
28788
- 8. A diagnosis says when, why and how it happens, then proposes one fix. Never options first.
28789
- 9. GIVE A REPORT ITS REPLY: an update takes \`reply\` too, one line the person can tap instead of typing, written in THEIR voice for THAT report ("Sounds good, I'll test later") \u2014 the same care you give a question's options. What they tap is what you read back, which tells you whether they verified your work or only received it. One line, because a report has one way to close, and it may not change what happens next: a reply that would is a question. Requested delivery and completed-Goal reports require a reply (reply_required); ordinary progress may omit it.`;
28798
+ 1. One question per object in \`questions\`, so each is answered on its own.
28799
+ 2. \`goalId\` names the existing Goal it is about (create one with manage_goals first); the answer comes back there.
28800
+ 3. \`workItBlocks\` only when you are truly blocked: it asks for a call.
28801
+ 4. No while-loops. While any Call is open, even one your question joined from their items, keep receiving through empty windows; otherwise stop at one: the answer reaches you on the Goal. Yield only with a listener or wakeup.
28802
+ 5. One question, one row: never re-send one still waiting; take back one that no longer matters with \`withdrawQuestionIds\`.
28803
+ 6. Read the Goal before asking; never re-ask what was answered or shipped. \`replied\` means they chose no option: it is still yours to settle.
28804
+ 7. Give options when you have them. Each label names its choice in full (never "Option 2"); never add "Other". \`pickMode\`: one (default), many, rank.
28805
+ 8. A diagnosis says when, why and how it happens, then proposes one fix.
28806
+ 9. Give a report its \`reply\`: one line in THEIR voice for THAT report, so you learn whether they verified it or only received it. Required when it is delivered or its Goal is done.`;
28790
28807
  function draft2020(node) {
28791
28808
  if (Array.isArray(node)) return node.map(draft2020);
28792
28809
  if (node && typeof node === "object") {
@@ -28829,7 +28846,7 @@ var userExplicitlyRequested = external_exports.enum(["any", "call"]).optional().
28829
28846
  `Only what the person said about THIS message, in so many words: "any" when they asked you to send it to them ("send it to my phone", "message me the result"), "call" when they asked to be called about it. It is then delivered (a call rings for the whole contact, and carries everything waiting on them); omitted, an update is only recorded as the Goal's progress unless the person needs it. Never set it to make a message louder.`
28830
28847
  );
28831
28848
  var units = external_exports.array(UnitInputSchema).optional().describe(
28832
- `The context this message needs, as up to ${UNITS_MAX} units in reading order, each {title, body}: a title of at most ${UNIT_TITLE_MAX} characters and a body of at most ${UNIT_BODY_MAX}. One idea per unit. Leave it out when the main text says it all.`
28849
+ `The context this message needs, as up to ${UNITS_MAX} units in reading order, each {title, body}: a title of at most ${UNIT_TITLE_MAX} characters and a body of at most ${UNIT_BODY_MAX}. One idea per unit. Leave it out when the main text says it all. Over a cap is refused by name (ask_too_long, too_many_units, unit_title_too_long, unit_body_too_long) and nothing is sent.`
28833
28850
  );
28834
28851
  var UpdateInputSchema = external_exports.object({
28835
28852
  message: external_exports.string().trim().min(1).describe(`The one point, at most ${ASK_MAX} characters; the context goes in units.`),
@@ -28884,11 +28901,11 @@ var questionFields = {
28884
28901
  ),
28885
28902
  goalId: external_exports.string().uuid().describe("The Goal the question is about, which must exist (create it with manage_goals first). Its answer comes back there."),
28886
28903
  units,
28887
- options: external_exports.array(OptionInputSchema).min(1).max(6).optional().describe("The choices, when you have them. Each label stands on its own, at most 50 characters; a hint, at most 200."),
28904
+ options: external_exports.array(OptionInputSchema).min(1).max(6).optional().describe("The choices, when you have them. Each label stands on its own and differs from the others (duplicate_option_label), at most 50 characters; a hint, at most 200. They can always answer in their own words, so no 'Other' or 'None of these'."),
28888
28905
  // HOW THE OPTIONS ARE ANSWERED, SAID BY THE AGENT (owner, 2026-10-02: "one and many makes sense";
28889
28906
  // brain_prompts.md §1: structured agent questions need no model). The app draws all three.
28890
28907
  pickMode: external_exports.enum(["one", "many", "rank"]).optional().describe(
28891
- 'How the options are answered: "one" (the default) a pick, for alternatives; "many" a checklist, for independent options they may want several of; "rank" an order of all of them. Only with options.'
28908
+ 'How the options are answered: "one" (the default) a pick, for alternatives; "many" a checklist, for independent options they may want several of; "rank" an order of all of them. Only with options; "many" and "rank" need at least two (too_few_options).'
28892
28909
  ),
28893
28910
  // WHAT THE QUESTION HOLDS UP (brain_prompts.md §2.1): replaces `waiting: 'hard'`. A question that
28894
28911
  // blocks work asks for a call (the person's settings and ring cooldowns still decide).
@@ -28900,11 +28917,39 @@ var questionFields = {
28900
28917
  var refineQuestion = (q, ctx) => {
28901
28918
  refuseOverCaps(q.question, q.units, "question", ctx);
28902
28919
  if (q.pickMode && !q.options) ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["pickMode"], message: "pickMode comes only with options" });
28920
+ refuseThinOptions(q, ctx);
28903
28921
  const ids = (q.options ?? []).map((o) => o.id);
28904
28922
  if (ids.some((id22) => id22) && (ids.some((id22) => !id22) || new Set(ids).size !== ids.length)) {
28905
28923
  ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["options"], message: "give every option a distinct id, or none" });
28906
28924
  }
28907
28925
  };
28926
+ var MIN_LIST_OPTIONS = 2;
28927
+ function refuseThinOptions(q, ctx) {
28928
+ const options = q.options ?? [];
28929
+ if ((q.pickMode === "many" || q.pickMode === "rank") && options.length < MIN_LIST_OPTIONS) {
28930
+ ctx.addIssue({
28931
+ code: external_exports.ZodIssueCode.custom,
28932
+ path: ["options"],
28933
+ params: { refusal: "too_few_options", length: options.length, min: MIN_LIST_OPTIONS },
28934
+ message: `too_few_options: pickMode "${q.pickMode}" needs at least ${MIN_LIST_OPTIONS} options; this question has ${options.length}. Add the other choices, or leave pickMode out.`
28935
+ });
28936
+ }
28937
+ const seen = /* @__PURE__ */ new Map();
28938
+ options.forEach((o, index) => {
28939
+ const key22 = o.label.trim().toLowerCase();
28940
+ const first = seen.get(key22);
28941
+ if (first === void 0) {
28942
+ seen.set(key22, index);
28943
+ return;
28944
+ }
28945
+ ctx.addIssue({
28946
+ code: external_exports.ZodIssueCode.custom,
28947
+ path: ["options", index, "label"],
28948
+ params: { refusal: "duplicate_option_label", index, first },
28949
+ message: `duplicate_option_label: options[${index}] repeats the label of options[${first}]. Each option names a different choice.`
28950
+ });
28951
+ });
28952
+ }
28908
28953
  var QuestionInputSchema = external_exports.object({
28909
28954
  questionId: external_exports.string().uuid().optional().describe("Optional: your own stable id for this question (a UUID), so a resend is the same question. Minted for you when omitted; the result returns it."),
28910
28955
  ...questionFields
@@ -28926,21 +28971,26 @@ var QuestionDependencySchema = external_exports.object({
28926
28971
  reason: reason.optional()
28927
28972
  }).strict().refine(actionFits, ACTION_FITS);
28928
28973
  var sendFields = {
28929
- completions: external_exports.array(CompletionSchema).min(1).max(20).optional().describe("Close existing Goals and deliver their completion reports atomically. Ordinary updates never close work."),
28974
+ completions: external_exports.array(CompletionSchema).min(1).max(20).optional().describe(
28975
+ "COMPLETIONS close and report in one operation, the same contract as manage_goals kind:complete: closure and the report commit together or neither does. Required children and dependencies must already be finished. options suggest next steps: a tap acknowledges the report and requests that step, and never reopens the Goal (follow-up work needs a new one). No reviewer rejudges it: say only what your evidence supports. Ordinary updates never close a Goal."
28976
+ ),
28930
28977
  updates: external_exports.array(UpdateInputSchema).min(1).max(20).optional().describe(
28931
- "News: progress, findings, a result. An update asks nothing. It reaches the person only when they asked for it (userExplicitlyRequested), when it answers something they said, or once its Goal is done; otherwise it is recorded as the Goal's progress and nobody is notified."
28978
+ "News: progress, findings, a result. An update asks nothing. It reaches the person only when they asked for it (userExplicitlyRequested), when it answers something they said, or once its Goal is done; otherwise it is recorded as the Goal's progress, which the person is not told. Every update reaches the other agents that wrote on its Goal in the last hour: to tell another agent something, write it as an update on that agent's Goal."
28932
28979
  ),
28933
28980
  answers: external_exports.array(AnswerInputSchema).min(1).max(20).optional().describe("Answers to Questions addressed to you."),
28934
28981
  withdrawQuestionIds: external_exports.array(questionHandle).min(1).max(10).optional().describe(
28935
28982
  "Questions you asked that no longer need an answer: you acted on them yourself, they no longer matter, or you asked wrongly. Each is cancelled, not answered: its card closes and nothing rings for it."
28936
28983
  ),
28984
+ bumpQuestionIds: external_exports.array(questionHandle).min(1).max(10).optional().describe(
28985
+ "Your own questions still waiting on the person that you want them to notice again. Each moves back to the top of its card with one new notification; nothing is resent and no second card is made."
28986
+ ),
28937
28987
  questionDependencies: external_exports.array(QuestionDependencySchema).min(1).max(20).optional().describe(
28938
28988
  "Add or remove what a Question you asked holds up, after asking it."
28939
28989
  )
28940
28990
  };
28941
28991
  var ContactSchema = external_exports.object({
28942
28992
  ...sendFields,
28943
- questions: external_exports.array(QuestionInputSchema).min(1).max(20).optional().describe("Questions for the person, one per object."),
28993
+ questions: external_exports.array(QuestionInputSchema).min(1).max(20).optional().describe("Questions for the person, one per object, each sent exactly as written, with no reading in between."),
28944
28994
  /** RECEIVING (2I, I2; brain_prompts.md §2.2): the events this agent handled. */
28945
28995
  ackEventIds: external_exports.array(external_exports.string().uuid()).min(1).max(100).optional().describe(
28946
28996
  "The exact eventIds of the events you have handled: an acknowledgment (ACK). Reading alone acknowledges nothing, so an event comes back until you acknowledge it; after that the next batch can come. Each recipient acknowledges separately, for itself only. A Question you owe is answered (answers), never acknowledged away."
@@ -28949,22 +28999,34 @@ var ContactSchema = external_exports.object({
28949
28999
  "Only controls when this returns. Sending: false (the default) returns at once; true waits up to about 45 seconds for a response to what you sent. Sending nothing: true (the default) waits up to about 45 seconds for anything addressed to you; false returns what is waiting now. It does not mean work is blocked, set urgency, or ask for a call. `waitOutcome` says which happened: `available`, `expired` (nothing arrived; wait again without sending again), or `not_waited`."
28950
29000
  )
28951
29001
  }).strict();
28952
- var sendsAnything = (c) => !!(c.completions?.length || c.updates?.length || c.questions?.length || c.answers?.length || c.withdrawQuestionIds?.length || c.questionDependencies?.length);
29002
+ var sendsAnything = (c) => !!(c.completions?.length || c.updates?.length || c.questions?.length || c.answers?.length || c.withdrawQuestionIds?.length || c.bumpQuestionIds?.length || c.questionDependencies?.length);
28953
29003
  var ContactWireSchema = external_exports.object({
28954
29004
  operationId: external_exports.string().uuid(),
28955
29005
  ...sendFields,
28956
29006
  questions: external_exports.array(QuestionWireSchema).min(1).max(20).optional()
28957
29007
  }).strict().refine(sendsAnything, "a contact sends at least one update, question, answer, withdrawal or question dependency");
28958
29008
  var CONTACT_SCHEMA = { type: "object", ...mcpInputSchema(ContactSchema) };
28959
- var CONTACT_DESCRIPTION = "Send to and receive from the person: completions, updates, questions, answers to questions addressed to you, withdrawals of your own questions, and what a question holds up. Every Goal you name must already exist: create it with manage_goals first; an unknown Goal is refused and nothing is sent. Every item applies on its own: read `results`, where a failed item names why while the rest still apply.\n\n" + ASKING_RULES + `
29009
+ var CONTACT_DESCRIPTION = "Send to and receive from the person: completions, updates, questions, answers to questions addressed to you, withdrawals, and what a question holds up. Every Goal named must exist: an unknown one refuses the whole contact. Each item applies on its own: read `results`, where a failed one names why.\n\n" + ASKING_RULES + `
28960
29010
 
28961
- CUT A LONG MESSAGE BEFORE YOU SEND IT: a question, an update's message or an answer is the one point, in at most ${ASK_MAX} characters; everything else it needs goes in 'units', up to ${UNITS_MAX} {title, body} in reading order, one idea each, every title at most ${UNIT_TITLE_MAX} characters and every body at most ${UNIT_BODY_MAX}. The person sees the main text and the titles, and opens a unit to read its body. Over a cap is refused by name (ask_too_long, too_many_units, unit_title_too_long, unit_body_too_long) and nothing is sent.
29011
+ LENGTH: the question, message or answer is the one point, at most ${ASK_MAX} characters; the rest goes in \`units\`, one idea each. Over a cap is refused by name and nothing is sent. Several results are several updates.
28962
29012
 
28963
- UPDATES ask nothing, so no answer is owed and none should be awaited. An update reaches the person only when they asked you for it (userExplicitlyRequested), when it answers something they said, or once its Goal is done; any other is recorded as the Goal's progress and nobody is notified. Ordinary updates never close a Goal. On a Goal whose report card is still open, an update that reaches them is added to that card, with no new push. If the person is already on a call, anything that reaches them joins that call, with no ring.
29013
+ UPDATES ask nothing. One reaches the person only when they asked for it, it answers something they said, or its Goal is done; else it is kept as progress. One that reaches them joins an open report card or a live call.
28964
29014
 
28965
- COMPLETIONS close and report in one operation: completions:[{goalId,message,units?,reply,options?}]. The same contract works in manage_goals changes with kind:complete. message is at most 50 characters; use units when useful for initial state, changes, current state (verification and limits), and next steps / leftover work with its owner. reply is one acknowledgement in the person's voice. Optional options:[{label,hint}] suggest next steps: a tap acknowledges the report and requests that step from its author. It never reopens the completed Goal; follow-up work needs a new Goal. Closure and the report commit together or neither does. Required children and dependencies must already be finished. No Reviewer rejudges your completion; say only what your evidence supports.
28966
-
28967
- RECEIVING: a contact that sends nothing returns \`events\`, a limited batch of what is addressed to you (not a history page): \`question\`, a Question you owe (answer it in answers, with its questionId); \`update\`, something new on one of your Goals (a reply, an answer: read it with get_goals); \`instruction\`, a request or note sent to you. \`hasMore\` says more are waiting. Reading acknowledges nothing: once you have handled events, confirm their eventIds with contact({ackEventIds}), and the next batch can come. contact({}) waits up to about 45 seconds for something to arrive; contact({wait:false}) returns at once. It also lists work given to you that nobody has started (\`assigned\`; your first write to it starts it) and your work gone quiet (\`stalled\`).`;
29015
+ RECEIVING: contact({}) waits ~45 s; contact({wait:false}) returns \`events\` at once. Confirm the ones you handled with contact({ackEventIds}).`;
29016
+ var HELP_TOPICS = ["pairing", "listening", "receiving", "asking", "updates", "goals", "calls"];
29017
+ var unknownTopic = (topic) => `unknown_topic: ${JSON.stringify(topic)} is not a section of the guide. Topics: ${HELP_TOPICS.join(", ")}; or omit topic for the whole guide.`;
29018
+ var HelpSchema = external_exports.object({
29019
+ topic: external_exports.enum(HELP_TOPICS, { errorMap: (_issue, ctx) => ({ message: unknownTopic(ctx.data) }) }).optional().describe("One section of the guide. Omit it for the whole guide.")
29020
+ }).strict();
29021
+ var HELP_DESCRIPTION = "Start here: how to use Paigy, in full \u2014 pairing, listening, receiving, asking, updates and completions, Goals and calls. Pass a topic for one section. Read-only; needs no setup.";
29022
+ var AGENT_PROMPTS = [
29023
+ {
29024
+ name: "help",
29025
+ description: "How to use Paigy: the whole guide, or one topic of it.",
29026
+ arguments: [{ name: "topic", description: `One section: ${HELP_TOPICS.join(", ")}. Omit it for the whole guide.`, required: false }]
29027
+ },
29028
+ { name: "welcome", description: "Start here: who you are on Paigy, then listen and collect your open work." }
29029
+ ];
28968
29030
  var CreateGoalSchema = external_exports.object({
28969
29031
  outcome: external_exports.string().trim().min(1).max(1e4),
28970
29032
  /** The work's NAME (#2115) — one to five words, how a person refers to it out loud ("the night
@@ -29065,9 +29127,12 @@ var GetGoalsSchema = external_exports.object({
29065
29127
  history: external_exports.boolean().optional()
29066
29128
  }).strict();
29067
29129
  var GetDeliverySchema = external_exports.object({
29068
- deliveryId: external_exports.string().uuid().describe("The Delivery id returned by contact or receive.")
29130
+ deliveryId: external_exports.string().uuid().describe("The Delivery id returned by contact or receive."),
29131
+ // WHAT WAS SAID ON A CALL (owner, 2026-10-26, Goal c743f4a4: "A flag on get_delivery", "Any of my agents").
29132
+ transcript: external_exports.boolean().optional().describe("For a Call: also return what was said on it, one page of spoken lines."),
29133
+ after: external_exports.string().max(40).optional().describe("With transcript: the next value the previous page returned, to read the next page.")
29069
29134
  }).strict();
29070
- var GET_DELIVERY_DESCRIPTION = "Read a Delivery in full: its whole ask, units, options and answers, plus current callState and callOutcome for a Call. Any agent of the same account may read it; another account is not disclosed. Reading never acknowledges or resends anything. Use this after a call or when receive names a Call you are waiting on.";
29135
+ var GET_DELIVERY_DESCRIPTION = "Read a Delivery in full: its whole ask, units, options and answers, plus current callState and callOutcome for a Call. For a Call, transcript: true adds what was said: each spoken line in order, who said it, and when from pickup, a page at a time. A line from the room, not the person, is marked room. Any agent of the same account may read it; another account is not disclosed. Reading never acknowledges or resends anything. Use this after a call or when receive names a Call you are waiting on.";
29071
29136
  var GET_GOALS_DESCRIPTION = "Read one to ten Goals by goalIds, returned in the same order under goals (a read never puts you on them). history applies to every requested Goal. A refused read fails the call with its original refusal; no partial result is presented as complete. Each Goal includes its ten most recent other contributors (names, latest entry headlines and times), outcome, state, revision, progress, blockers, the conversation on it (each question with its options and what was decided), `next`, the one step to take, and `more`, where to read further. A question in that conversation reads `open` (nothing yet), `answered` (a choice was made, and `answer` carries it), `replied` (they said something and the read settled the question on their words \u2014 NO option of yours was chosen, and the words are the reply line beside it, so read that before you act), or `closed`. The conversation carries everything the person said, every open question and your newest entry; your older entries are left out and counted \u2014 history: true reads every entry in full. Every Goal of your person is readable, whichever of their agents owns it; another account's Goals are not disclosed.";
29072
29137
  var SearchToolSchema = external_exports.object({
29073
29138
  query: external_exports.string().trim().min(1).max(500),
@@ -29094,7 +29159,9 @@ var AGENT_TOOLS = [
29094
29159
  { name: "get_goals", description: GET_GOALS_DESCRIPTION, inputSchema: mcpInputSchema(GetGoalsSchema) },
29095
29160
  { name: "search", description: SEARCH_DESCRIPTION, inputSchema: mcpInputSchema(SearchToolSchema) },
29096
29161
  { name: "check_activity", description: "Read your person's agents that contributed in the last 24 hours, newest first: at most 30 agents and their five most recently touched Goals, with their latest entry headline and time. Use get_goals to read a Goal and its other contributors before starting overlapping work. Read-only; no arguments.", inputSchema: mcpInputSchema(CheckActivitySchema) },
29097
- { name: "send_feedback", description: SEND_FEEDBACK_DESCRIPTION, inputSchema: mcpInputSchema(SendFeedbackSchema) }
29162
+ { name: "send_feedback", description: SEND_FEEDBACK_DESCRIPTION, inputSchema: mcpInputSchema(SendFeedbackSchema) },
29163
+ // THE GUIDE FROM INSIDE THE MCP (owner, 2026-10-27): the skill's text, needing no identity (`help.ts`).
29164
+ { name: "help", description: HELP_DESCRIPTION, inputSchema: mcpInputSchema(HelpSchema) }
29098
29165
  ];
29099
29166
  var AGENT_TOOL_NAMES = AGENT_TOOLS.map((t) => t.name);
29100
29167
  var id = external_exports.string().uuid();
@@ -29182,11 +29249,22 @@ var BrainMessageSchema = external_exports.union([
29182
29249
  // A MESSAGE TO THE PERSON KEEPS ITS SENTENCES (turns.md): the talker writes them one by one, and each is
29183
29250
  // its own unit of speech (`<cycle>:<key>:<n>`). `text` is the same words joined, for every reader of a
29184
29251
  // message's words. Absent on results written before sentences.
29185
- external_exports.object({ ...messageBase, to: external_exports.object({ kind: external_exports.literal("user") }).strict(), sentences: external_exports.array(external_exports.string().min(1)).min(1).optional() }).strict(),
29252
+ external_exports.object({
29253
+ ...messageBase,
29254
+ to: external_exports.object({ kind: external_exports.literal("user") }).strict(),
29255
+ sentences: external_exports.array(external_exports.string().min(1)).min(1).optional(),
29256
+ // THE REPORTS IT TELLS, BY THEIR OWN IDENTITY (call 9d1c096c, 2026-10-15): the talker's message names the report
29257
+ // Entries it speaks of, so the plan's line names that report rather than re-finding it by its Goal. Absent on
29258
+ // results written before it.
29259
+ tells: external_exports.array(external_exports.object({ id }).strict()).optional()
29260
+ }).strict(),
29186
29261
  external_exports.object({
29187
29262
  ...messageBase,
29188
29263
  to: external_exports.object({ kind: external_exports.literal("agent"), agentId: external_exports.string().regex(/^agent:(?!paigy$)\S+$/) }).strict(),
29189
29264
  call: external_exports.object({ callId: id, listen: external_exports.literal(true) }).strict().optional(),
29265
+ // WHAT IT ASKS THE AGENT, IN UNDER TEN WORDS (owner, 2026-10-15: "Yes, add the summary"): the talker's own, stored
29266
+ // as the sent Entry's summary, which the recap's "Sent to <agent>: …" row shows. Absent on results written before it.
29267
+ summary: external_exports.string().optional(),
29190
29268
  // THE PERSON ASKED TO BE CALLED BACK ONCE THIS AGENT'S WORK IS DONE (turns.md, step 0): the agent owes
29191
29269
  // the call, and its next contact about it rings them (`public.callbacks`).
29192
29270
  callback: external_exports.literal(true).optional()
@@ -29213,95 +29291,98 @@ var BrainResultSchema = external_exports.object({
29213
29291
  next: BrainNextSchema,
29214
29292
  search: BrainSearchSchema.optional()
29215
29293
  }).strict();
29216
- var str = external_exports.string();
29294
+ var str2 = external_exports.string();
29217
29295
  var strs = external_exports.array(external_exports.string());
29218
29296
  var CompactResultSchema = external_exports.object({
29219
- next: external_exports.object({ say: strs, then: external_exports.enum(["listen", "hold", "end", "none"]), waitFor: strs, reason: str, instructions: strs }).strict(),
29220
- messages: external_exports.array(external_exports.object({ key: str, to: str, text: str, about: strs, entries: strs, owed: strs, inviteToCall: external_exports.boolean() }).strict()),
29221
- entries: external_exports.array(external_exports.object({ key: str, from: str, on: strs }).strict()),
29222
- answers: external_exports.array(external_exports.object({ question: str, entries: strs, summary: str, picked: strs }).strict()),
29297
+ next: external_exports.object({ say: strs, then: external_exports.enum(["listen", "hold", "end", "none"]), waitFor: strs, reason: str2, instructions: strs }).strict(),
29298
+ messages: external_exports.array(external_exports.object({ key: str2, to: str2, text: str2, about: strs, entries: strs, owed: strs, inviteToCall: external_exports.boolean() }).strict()),
29299
+ entries: external_exports.array(external_exports.object({ key: str2, from: str2, on: strs }).strict()),
29300
+ answers: external_exports.array(external_exports.object({ question: str2, entries: strs, summary: str2, picked: strs }).strict()),
29223
29301
  changes: external_exports.array(external_exports.object({
29224
- key: str,
29302
+ key: str2,
29225
29303
  what: external_exports.enum(["goal", "question", "lesson"]),
29226
29304
  op: external_exports.enum(["create", "edit", "assign", "open", "complete", "cancel", "defer", "move", "block", "unblock", "withdraw", "remember", "revise"]),
29227
- id: str,
29228
- text: str,
29229
- title: str,
29230
- who: str,
29231
- under: str,
29305
+ id: str2,
29306
+ text: str2,
29307
+ title: str2,
29308
+ who: str2,
29309
+ under: str2,
29232
29310
  gate: external_exports.enum(["start", "complete", "answer", "none"]),
29233
- options: external_exports.array(external_exports.object({ id: str, label: str }).strict()),
29311
+ options: external_exports.array(external_exports.object({ id: str2, label: str2 }).strict()),
29234
29312
  pick: external_exports.enum(["one", "many", "rank", "words"]),
29235
29313
  entries: strs
29236
29314
  }).strict()),
29237
29315
  feedback: external_exports.array(strs),
29238
- search: external_exports.object({ query: str, within: strs, goal: str }).strict()
29316
+ search: external_exports.object({ query: str2, within: strs, goal: str2 }).strict()
29239
29317
  }).strict();
29240
29318
  var COMPACT_RESULT_JSON_SCHEMA = (({ $schema: _, ...rest }) => rest)(
29241
29319
  zodToJsonSchema(CompactResultSchema, { $refStrategy: "none" })
29242
29320
  );
29243
- var str2 = external_exports.string();
29321
+ var str3 = external_exports.string();
29244
29322
  var strs2 = external_exports.array(external_exports.string());
29245
29323
  var TalkerReplySchema = external_exports.object({
29246
29324
  /** What to say and send, messages to the person first: spoken in the order written. `to` is "user"
29247
29325
  * or an agent's handle; `sentences` is what a message to the person says, one short sentence each
29248
- * ([] to an agent); `text` is what a message to an agent says ("" to the person); `about` names
29326
+ * ([] to an agent); `text` is what a message to an agent says ("" to the person); `summary` is what it
29327
+ * asks the agent, in under ten words, as the person would put it ("" to the person; owner, 2026-10-15:
29328
+ * "Yes, add the summary"), which the recap's "Sent to <agent>: …" row shows; `about` names
29249
29329
  * handles; `blocks` is the item a question to an agent must be answered before ("" for none);
29250
29330
  * `callback` is true on a message to the agent doing work the person asked to be called back about
29251
29331
  * once it is done (false otherwise): that agent then owes the call (turns.md, step 0). */
29252
- messages: external_exports.array(external_exports.object({ key: str2, to: str2, sentences: strs2, text: str2, about: strs2, blocks: str2, callback: external_exports.boolean() }).strict()),
29332
+ messages: external_exports.array(external_exports.object({ key: str3, to: str3, sentences: strs2, text: str3, summary: str3, about: strs2, blocks: str3, callback: external_exports.boolean() }).strict()),
29253
29333
  /** What the call does next: listen, hold (the person asked for a moment) or end (they asked to). */
29254
29334
  then: external_exports.enum(["listen", "hold", "end"]),
29255
29335
  /** The person's replies to items (replies, owner 2026-10-07): the item's handle, the chosen option
29256
29336
  * IDs, the line handles, how they replied in under ten words (keeping any condition), and `defer`:
29257
29337
  * "" when their words settle the item, else what a reply that puts it off waits for -- "call" (the
29258
29338
  * end of this call), a question's handle (that question's answer) or an ISO time. */
29259
- replies: external_exports.array(external_exports.object({ item: str2, options: strs2, lines: strs2, summary: str2, defer: str2 }).strict()),
29339
+ replies: external_exports.array(external_exports.object({ item: str3, options: strs2, lines: strs2, summary: str3, defer: str3 }).strict()),
29260
29340
  /** The line handles that tell the talker how to run this call; they last until it ends and reach no agent. */
29261
29341
  instruction: strs2,
29262
29342
  /** The line handles the filer acts on, and the only ones it reads (3e): new work, a change to existing
29263
29343
  * work, feedback on Paigy, anything said to an agent, and any rule meant to outlast the call. */
29264
29344
  file: strs2,
29265
29345
  /** Evidence to fetch for a second round: a search, an item's full text, or an agent by name. */
29266
- need: external_exports.object({ kind: external_exports.enum(["search", "item", "agent", ""]), text: str2 }).strict(),
29346
+ need: external_exports.object({ kind: external_exports.enum(["search", "item", "agent", ""]), text: str3 }).strict(),
29267
29347
  /** The handle of the item to explain ("" for none). */
29268
- explain: str2
29348
+ explain: str3
29269
29349
  }).strict();
29270
29350
  var TALKER_REPLY_JSON_SCHEMA = (({ $schema: _, ...rest }) => rest)(
29271
29351
  zodToJsonSchema(TalkerReplySchema, { $refStrategy: "none" })
29272
29352
  );
29273
- var str3 = external_exports.string();
29353
+ var str4 = external_exports.string();
29274
29354
  var strs3 = external_exports.array(external_exports.string());
29275
29355
  var FilerReplySchema = external_exports.object({
29276
- /** Which Goals each new line goes on: a line's handle, Goal handles (or keys of new Goals), and what
29277
- * the line says in at most ten words. */
29278
- filed: external_exports.array(external_exports.object({ line: str3, goals: strs3, summary: str3 }).strict()),
29356
+ /** Which Goals each new line goes on: a line's handle, Goal handles (or keys of new Goals: a line that asks
29357
+ * for new work goes on the Goal it creates, owner 2026-10-26), and what the line says in at most twenty
29358
+ * words (owner, 2026-10-26: "bump it from 10 to 20 words"). */
29359
+ filed: external_exports.array(external_exports.object({ line: str4, goals: strs3, summary: str4 }).strict()),
29279
29360
  goals: external_exports.array(external_exports.object({
29280
29361
  op: external_exports.enum(["create", "edit", "complete", "cancel", "reopen", "assign", "defer", "move", "block", "unblock"]),
29281
- key: str3,
29282
- goal: str3,
29283
- title: str3,
29284
- outcome: str3,
29285
- owner: str3,
29286
- under: str3,
29287
- until: str3,
29288
- on: str3,
29362
+ key: str4,
29363
+ goal: str4,
29364
+ title: str4,
29365
+ outcome: str4,
29366
+ owner: str4,
29367
+ under: str4,
29368
+ until: str4,
29369
+ on: str4,
29289
29370
  gate: external_exports.enum(["start", "complete", "answer", ""]),
29290
- why: str3
29371
+ why: str4
29291
29372
  }).strict()),
29292
29373
  questions: external_exports.array(external_exports.object({
29293
29374
  op: external_exports.enum(["create", "edit", "assign", "withdraw"]),
29294
- key: str3,
29295
- question: str3,
29296
- text: str3,
29297
- summary: str3,
29298
- to: str3,
29299
- goal: str3,
29300
- options: external_exports.array(external_exports.object({ id: str3, label: str3 }).strict()),
29375
+ key: str4,
29376
+ question: str4,
29377
+ text: str4,
29378
+ summary: str4,
29379
+ to: str4,
29380
+ goal: str4,
29381
+ options: external_exports.array(external_exports.object({ id: str4, label: str4 }).strict()),
29301
29382
  pick: external_exports.enum(["one", "many", "rank", "words", ""]),
29302
- blocks: str3
29383
+ blocks: str4
29303
29384
  }).strict()),
29304
- lessons: external_exports.array(external_exports.object({ op: external_exports.enum(["remember", "revise", "withdraw"]), lesson: str3, text: str3, scope: str3 }).strict()),
29385
+ lessons: external_exports.array(external_exports.object({ op: external_exports.enum(["remember", "revise", "withdraw"]), lesson: str4, text: str4, scope: str4 }).strict()),
29305
29386
  /** Line handles whose words comment on Paigy itself. */
29306
29387
  feedback: strs3
29307
29388
  }).strict();
@@ -29362,6 +29443,27 @@ var TidyReplySchema = external_exports.object({
29362
29443
  var TIDY_REPLY_JSON_SCHEMA = (({ $schema: _, ...rest }) => rest)(
29363
29444
  zodToJsonSchema(TidyReplySchema, { $refStrategy: "none" })
29364
29445
  );
29446
+ var HandoutReplySchema = external_exports.object({
29447
+ assign: external_exports.array(external_exports.object({
29448
+ /** The Goal's handle (G). */
29449
+ goal: external_exports.string(),
29450
+ /** The agent's handle (A). */
29451
+ to: external_exports.string(),
29452
+ /** At most ten words, naming the Goal of theirs it is most like: the reason the hand-out records. */
29453
+ why: external_exports.string()
29454
+ }).strict()),
29455
+ /** The Goals no listed agent's work is even loosely like: Paigy starts a session for them (owner, 2026-10-24,
29456
+ * Goal 37603006, "One per family of related Goals"). */
29457
+ new: external_exports.array(external_exports.object({
29458
+ /** The Goal's handle (G). */
29459
+ goal: external_exports.string(),
29460
+ /** At most ten words: why nothing active fits it. */
29461
+ why: external_exports.string()
29462
+ }).strict())
29463
+ }).strict();
29464
+ var HANDOUT_REPLY_JSON_SCHEMA = (({ $schema: _, ...rest }) => rest)(
29465
+ zodToJsonSchema(HandoutReplySchema, { $refStrategy: "none" })
29466
+ );
29365
29467
  function entryUnit(entry) {
29366
29468
  if (entry.kind !== "contribution" || !entry.aboutId) return null;
29367
29469
  const plain = entry.content && "plain" in entry.content ? entry.content.plain : null;
@@ -29497,7 +29599,7 @@ var NotifyRequestFields = external_exports.object({
29497
29599
  * derive agent-side before sealing, so the server only ever shapes plaintext). */
29498
29600
  // 10k, not a sentence budget. What the human hears is bounded by the BROKER — it splits
29499
29601
  // the ask into topics and gives each one at most three sentences and one question
29500
- // (docs/brain/broker/agenda-design.md) — not by a wire cap the agent has to pre-summarize under.
29602
+ // (docs/history/agenda-design.md) — not by a wire cap the agent has to pre-summarize under.
29501
29603
  // Owner, 2026-07-28: "our actual limitation on how long something is to the user should
29502
29604
  // come from the broker splitting and summarizing." The cap that remains is a size guard.
29503
29605
  ask: external_exports.string().min(1).max(1e4).optional().describe(
@@ -29574,7 +29676,7 @@ var UserAnswerSchema = external_exports.discriminatedUnion("kind", [
29574
29676
  external_exports.object({ kind: external_exports.literal("clarify"), chunks: external_exports.array(external_exports.string()).min(1) }),
29575
29677
  external_exports.object({ kind: external_exports.literal("confirm"), approved: external_exports.boolean() }),
29576
29678
  external_exports.object({ kind: external_exports.literal("turns"), turns: external_exports.array(TurnSchema).min(1) }),
29577
- /** An auto-answer derived from the user's PAST decisions (docs/brain/broker/precedent-design.md §2):
29679
+ /** An auto-answer derived from the user's PAST decisions (docs/history/precedent-design.md §2):
29578
29680
  * delivered through the same settle/await path as a human answer, carrying the judge's
29579
29681
  * derivation and the precedent ids it grew from. Always paired with a visible trail
29580
29682
  * card the user can reply to — the broker never overrides the user. */
@@ -29725,6 +29827,21 @@ var AgendaTurnSchema = external_exports.object({
29725
29827
  * the phone (`asking`, so the agenda goes gold and its options show) without treating the line as a
29726
29828
  * question turn — the talker owns re-asking and the waits, so `question` stays null. */
29727
29829
  onTable: external_exports.boolean().optional(),
29830
+ /** THE CARRIED ITEM THIS LINE TELLS (Goal 2a1e50eb, owner 2026-10-14: "Build the whole design") — a
29831
+ * request the Call carries that asks NOTHING: a report, a progress note, another agent's waiting news.
29832
+ * Its request Entry id, so the phone can make that agenda row the current one while it is read
29833
+ * (`telling` on the `turn` topic, `docs/clients/app/walk/design.md` §11).
29834
+ *
29835
+ * A FIELD OF ITS OWN, NEVER `claimId`: the claim is the RETURN identity — answers route by it and the
29836
+ * record tags the line with it (`workId`) — and an answer must never route to an Entry that asks
29837
+ * nothing. Absent on a turn speaking for a question (`claimId` says that) and on one speaking for no
29838
+ * carried item at all (an opener, a sign-off, Paigy's own line). */
29839
+ telling: external_exports.string().optional(),
29840
+ /** PAIGY'S OWN LINE (owner, 2026-10-15; calls ed2cbdce, ad50ad25): a turn that speaks for no item -- an
29841
+ * opener, a sign-off, a reply about nothing an agent asked or told -- is recorded as Paigy's, not as the
29842
+ * agent that rang. Absent on every turn that speaks for an item (`agentId` names whose), and on plans
29843
+ * from before it: a bot that does not know it records the ringing agent, as before. */
29844
+ speaksFor: external_exports.literal("paigy").optional(),
29728
29845
  select: SelectShapeSchema.optional(),
29729
29846
  options: external_exports.array(OptionSchema.omit({ id: true })).optional(),
29730
29847
  /* `pace` STOOD HERE (#826). A turn could carry seconds and the model chose them. The walk
@@ -29813,7 +29930,7 @@ var InboxItemSchema = external_exports.object({
29813
29930
  questions: external_exports.array(CallQuestionSchema).optional(),
29814
29931
  /** The same call carrying order, including request Entries with no DecisionNeed as reports.
29815
29932
  * Additive: questions stays decision-only for every other surface and older bundles. */
29816
- callItems: external_exports.array(CallQuestionSchema.extend({ state: external_exports.enum(["open", "answered", "report"]) })).optional(),
29933
+ callItems: external_exports.array(CallQuestionSchema.extend({ state: external_exports.enum(["open", "answered", "report"]), acknowledged: external_exports.boolean().optional() })).optional(),
29817
29934
  visuals: external_exports.array(VisualSchema).optional(),
29818
29935
  /** The connected agent's name (the single pairing name — user-typed, or the
29819
29936
  * agent's suggestion, or a default silly name). */
@@ -29833,11 +29950,6 @@ var InboxItemSchema = external_exports.object({
29833
29950
  * the agent (provider-agnostic; set server-side). Absent = no hard error. Drives the inbox
29834
29951
  * error badge + Retry. */
29835
29952
  error: external_exports.string().optional(),
29836
- /** WHEN THIS AGENT WORK WENT QUIET (turn="agent"), by the one rule (`coldSince`: three days
29837
- * with nothing said), or absent while it is not stalled. The inbox's stalled badge reads
29838
- * this and nothing else (2026-09-23: a 3-minute age rule badged every live Goal stalled,
29839
- * and "dismiss the stalled ones" cancelled 37 pieces of live work). */
29840
- cold: external_exports.string().datetime().optional(),
29841
29953
  clarifies: external_exports.string().optional(),
29842
29954
  /** THIS CARD'S QUESTION IS ON A LIVE CALL (owner, 2026-09-24: "Mark it while the call is
29843
29955
  * live"). Present only while an open Call Delivery carries the card's request Entry — read
@@ -29875,9 +29987,35 @@ var InboxItemSchema = external_exports.object({
29875
29987
  "Labels for a select:'confirm' paige \u2014 'yesno' (Yes/No) or 'approve' (Approve/Deny). Ignored unless select is 'confirm'."
29876
29988
  ),
29877
29989
  /** Real downstream work is stuck behind this one — set by the agent, independent of
29878
- * urgency (see the main README's "premier use case" + docs/delivery/notify/states.md). Drives the
29990
+ * urgency (see the main README's "premier use case" + docs/history/notify-states.md). Drives the
29879
29991
  * inbox's blocking badge and the extra confirm step before dismissing it. */
29880
29992
  blocking: external_exports.boolean().default(false),
29993
+ /** WHAT FREED THIS QUESTION (owner, 2026-10-16, Goal 2383ef14: "we don't really show the question
29994
+ * at the top until the question it could reply to with is resolved. And then we show it again
29995
+ * with the context of the other thing that was resolved"; asked how it should carry that, "The
29996
+ * answer above it"). A question they answered with a question of their own waits for theirs
29997
+ * (`private.ask_back`) and drops out of the front while it waits; when it comes back, the card
29998
+ * draws their question and the answer it got ABOVE the ask, as one card. Absent on a question
29999
+ * nothing ever held back. */
30000
+ freedBy: external_exports.object({
30001
+ questionId: external_exports.string(),
30002
+ asked: external_exports.string(),
30003
+ answer: external_exports.string(),
30004
+ answeredAt: external_exports.string(),
30005
+ /** The answer in ten words, when the talker wrote one beside it. */
30006
+ summary: external_exports.string().optional()
30007
+ }).optional(),
30008
+ /** WHAT THIS CARD ANSWERS (owner, 2026-10-27, Goal 81b6a9d6: "this reads very clearly as an answer to
30009
+ * something I asked, but I don't see the question… To show the question near the top of the card").
30010
+ * An agent's card that is its answer to one of the person's own questions carries that question's
30011
+ * words, drawn above it as "You asked" (`public.questions_answered_by`, read beside the card read).
30012
+ * Absent on every card that answers nothing of theirs, and on a held question, which has `freedBy`. */
30013
+ answering: external_exports.object({ asked: external_exports.string() }).optional(),
30014
+ /** WHEN ITS AGENT LAST BUMPED THIS QUESTION (#2855, `contact`'s `bumpQuestionIds`): the agent asked
30015
+ * the person to notice it again, and For you puts it first, the latest bump on top
30016
+ * (`question/order.ts`). Absent on a question never bumped, and on every card from an API older
30017
+ * than the bump. */
30018
+ bumpedAt: external_exports.string().optional(),
29881
30019
  /** The user's locked-in answer; present only for replied items (GET /api/replied/:id). */
29882
30020
  answer: UserAnswerSchema.optional(),
29883
30021
  /** THE TARGET FACTS A CARD RENDERS (#1796 point 5, 2026-09-11): the Delivery it is a view of,
@@ -29904,7 +30042,7 @@ var InboxItemSchema = external_exports.object({
29904
30042
  *
29905
30043
  * THE PAYLOAD'S OWN HASH, NEVER A STAMP ON THE WORK — the same mechanism as `QueueItem.rev`
29906
30044
  * (#2928) and an entry's (#3018), for the same reason: a card shows facts no `updated_at` of its
29907
- * own moves (its Goal's state and name, how cold the work behind it has gone, whether a ring is
30045
+ * own moves (its Goal's state and name, whether a ring is
29908
30046
  * live). Optional, so a fixture, the demo and the archive lens need not spell one, and a card
29909
30047
  * with no rev is simply always re-sent. */
29910
30048
  rev: external_exports.string().optional()
@@ -29939,6 +30077,7 @@ var MissedCallSchema = external_exports.enum([
29939
30077
  ]);
29940
30078
  var clock = (h) => h === 0 ? "midnight" : h === 12 ? "noon" : h < 12 ? `${h} am` : `${h - 12} pm`;
29941
30079
  var QUIET = ` Nothing rings from ${clock(NIGHT.from)} to ${clock(NIGHT.to)} your time; the count waits for morning.`;
30080
+ var THEIR_QUIET = ` Nothing rings from ${clock(NIGHT.from)} to ${clock(NIGHT.to)} their time; the count waits for morning.`;
29942
30081
  var BrokerTuningSchema = external_exports.object({
29943
30082
  /** 'none' = skip the spoken ack after a mapped answer (power users find it slow). */
29944
30083
  ackVerbosity: external_exports.enum(["normal", "none"]).optional(),
@@ -29981,12 +30120,9 @@ var UserSettingsSchema = external_exports.object({
29981
30120
  * must not silently reset this privacy choice. Absent = leave unchanged on
29982
30121
  * write, 'hosted' on read (see store.ts). */
29983
30122
  voiceMode: external_exports.enum(["hosted", "on_device"]).optional(),
29984
- /** Talk — after you answer, the next step is read aloud (docs/clients/app/walk/design.md §6). ALWAYS ON until
29985
- * turned off (owner, 2026-09-18, #2249): a setting, not a per-walk toggle. Optional, NOT
29986
- * defaulted, for the same reason `voiceMode` is: a stale client PATCHing the full settings
29987
- * object must not silently turn it back on. Absent = leave unchanged on write, true on
29988
- * read (see store.ts). */
29989
- talk: external_exports.boolean().optional(),
30123
+ /** `talk` lived here until #2373: it gated auto-play, which went in #2374. An older bundle's
30124
+ * `talk` is stripped like `silentPush` was; the `user_settings.talk` column outlives it until
30125
+ * its own drop migration (#2373, step two). */
29990
30126
  /** CALL DIAGNOSTICS (owner, 2026-10-01): the call report carries each listen and the bot's own
29991
30127
  * load timings. SERVER-SET, no UI — on for every account that existed on 2026-10-01, off for
29992
30128
  * newer ones (migration 20261001132859). Read-only here: the settings PATCH never writes it. */
@@ -30063,7 +30199,8 @@ var ConnectionSummarySchema = external_exports.object({
30063
30199
  kind: external_exports.enum(["device", "agent"]).optional(),
30064
30200
  /** For an agent, the token id of the DEVICE that minted it — so agents group under their
30065
30201
  * machine, and revoking a device cascades to them. Null on devices, and on unlinked
30066
- * agents (phone-launched, provider-managed, or minted before the link existed). */
30202
+ * agents (provider-managed, hatched by another agent, or minted before the link existed);
30203
+ * a phone-launched agent is linked to the computer it runs on since #1602. */
30067
30204
  mintedByDevice: external_exports.string().nullable().optional(),
30068
30205
  device: external_exports.string().nullable(),
30069
30206
  /** The agent's display name (the single pairing name). */
@@ -30077,7 +30214,7 @@ var ConnectionSummarySchema = external_exports.object({
30077
30214
  * user on the agent's own page. null = no ceiling (today's behaviour for every
30078
30215
  * connection). Android binds importance to a relationship rather than to each message,
30079
30216
  * and that is the thing our roster could not say: "Marlow may always call me; Otto
30080
- * never may" (docs/clients/app/party/navigation-design.md, gap 2). Clamped in `arbitrateLevel`, so it binds
30217
+ * never may" (docs/history/party-navigation-design.md, gap 2). Clamped in `arbitrateLevel`, so it binds
30081
30218
  * every surface at once and outranks even `sessionMode: all_calls` — a mode the user
30082
30219
  * set once must not overrule a rule they set about one agent. */
30083
30220
  reach: NotifyLevelSchema.nullable().optional(),
@@ -30236,12 +30373,14 @@ var QueueItemSchema = external_exports.object({
30236
30373
  /** Its questions: every OPEN one, and at most ten settled, newest settled first
30237
30374
  * (20260929133308) — the page decides which of them to show. NOT the whole set: `asked` and
30238
30375
  * `answered` are, and a settled one's words are a line (280 characters), its body read when the
30239
- * question is opened. */
30376
+ * question is opened. Never a CANCELLED one (withdrawn, dismissed, or its Goal or call ended): it
30377
+ * asks nothing of anyone (#3723). */
30240
30378
  questions: external_exports.array(QueueQuestionSchema).default([]),
30241
30379
  /** HOW MANY QUESTIONS THIS WORK HAS ASKED, and how many are answered — the Goal's own totals,
30242
30380
  * bounded at 100 server-side. A tally counted off `questions` is a wrong number that looks
30243
30381
  * right once the cap bites (`walk/trees.ts` `tallyOf`). Optional, and defaulted from the array
30244
- * by the projection, so hand-built queues (fixtures, the demo) need not spell them. */
30382
+ * by the projection, so hand-built queues (fixtures, the demo) need not spell them. A cancelled
30383
+ * question is not asked (#3725). */
30245
30384
  asked: external_exports.number().optional(),
30246
30385
  answered: external_exports.number().optional(),
30247
30386
  /** Every note on it the person replied to (`QueueReplySchema`) — the page decides which to show.
@@ -30256,6 +30395,10 @@ var QueueItemSchema = external_exports.object({
30256
30395
  * as progress). `updatedAt` moves for reasons nobody chose — a
30257
30396
  * state recomputed, a review flag — so it cannot tell work in hand from work gone quiet. */
30258
30397
  lastProgressAt: external_exports.string().nullable().optional(),
30398
+ /** WHEN AN AGENT LAST ACTED ON IT (owner, 2026-10-27: "Move it now", Goal 567258dc): its newest agent write, an
30399
+ * Entry or a Goal change, Paigy's excluded (`goals.worked_at`). What keeps work an agent is writing on from
30400
+ * reading as gone quiet (`coldSince`); absent on a door that does not carry it. */
30401
+ workedAt: external_exports.string().nullable().optional(),
30259
30402
  /** THE GOAL'S NEWEST WORD, FROM EITHER SIDE (owner, 2026-09-27): the newest Entry on it, of any
30260
30403
  * kind — what the person added ("Add to this"), their reply, the agent's ask or its progress
30261
30404
  * note. A progress note is an Entry, so this is already the newer of the two: the person's note
@@ -30502,9 +30645,6 @@ var AgentRowSchema = ComputerRowSchema.extend({
30502
30645
  * (`agent_holds`); null when that read failed. */
30503
30646
  holds: external_exports.array(external_exports.object({ id: external_exports.string(), title: external_exports.string() })).nullable(),
30504
30647
  held: external_exports.number().int().nullable(),
30505
- /** The earliest instant any Goal it holds went quiet, by the one rule (`coldSince`); null
30506
- * while none has, or when that read failed. */
30507
- cold: external_exports.string().datetime().nullable(),
30508
30648
  /** The newest line of its working log, and when the harness saw it. */
30509
30649
  line: external_exports.string().nullable(),
30510
30650
  lineAt: external_exports.string().datetime().nullable()
@@ -30548,6 +30688,11 @@ var CallRecapSchema = external_exports.object({
30548
30688
  durationMs: external_exports.number().nullable(),
30549
30689
  /** Bot-clock pickup offset; absent before the timestamp release, null before its report lands. */
30550
30690
  pickupMs: external_exports.number().nullable().optional(),
30691
+ /** STILL FILING (20261026182117): the call has not ended on the server, or it has and a brain cycle on it is
30692
+ * still pending, the next writer, which may still settle, file or start something. What the close itself
30693
+ * waits for (`private.close_call`). `status` cannot say it: nothing writes "finalizing", and a call reads
30694
+ * "open" until the sweep closes it, after nothing is pending. Absent from an API before it. */
30695
+ filing: external_exports.boolean().optional(),
30551
30696
  agents: external_exports.array(external_exports.object({ id: external_exports.string(), name: external_exports.string().nullable() }))
30552
30697
  }),
30553
30698
  topics: external_exports.array(external_exports.object({
@@ -30556,7 +30701,7 @@ var CallRecapSchema = external_exports.object({
30556
30701
  owner: external_exports.string(),
30557
30702
  state: external_exports.string(),
30558
30703
  /** Presented Entry content and its author, separately from the current Goal owner. */
30559
- items: external_exports.array(external_exports.object({ entryId: external_exports.string(), author: external_exports.string(), text: external_exports.string(), summary: external_exports.string().nullable() })).optional(),
30704
+ items: external_exports.array(external_exports.object({ entryId: external_exports.string(), author: external_exports.string(), text: external_exports.string(), summary: external_exports.string().nullable(), acknowledged: external_exports.boolean().optional() })).optional(),
30560
30705
  /** Whether the call put it to the person. An item it carried and never said has no row on the
30561
30706
  * review (owner, 2026-10-08: "why do we get the third one when it didn't happen in the call?"). */
30562
30707
  presented: external_exports.boolean(),
@@ -30602,9 +30747,65 @@ var CallRecapSchema = external_exports.object({
30602
30747
  words: external_exports.string(),
30603
30748
  atMs: external_exports.number()
30604
30749
  })),
30605
- more: external_exports.object({ lines: external_exports.number(), entries: external_exports.number(), topics: external_exports.number() }),
30750
+ /** What did not fit, counted. `settles` counts items past the recap's 100; absent before 20261026165518. */
30751
+ more: external_exports.object({ lines: external_exports.number(), entries: external_exports.number(), topics: external_exports.number(), settles: external_exports.number().optional() }),
30606
30752
  /** Last stored position on this page when another exists; absent before paging shipped. */
30607
- next: external_exports.number().int().nonnegative().nullable().optional()
30753
+ next: external_exports.number().int().nonnegative().nullable().optional(),
30754
+ /** THE CALL AS ONE LIST OF ROWS (owner, 2026-10-14: "we only really want a thing like transcript but
30755
+ * built from the summaries", then "the transcript tabs should show the same but with full words").
30756
+ * Both tabs draw these rows, in this order: Summary from `summary`, Transcript from `words`.
30757
+ * - `put`: an item put to the person, at the first agent line that voiced it. Paigy's sentences
30758
+ * that voiced it are folded into `spoken`, never rows of their own.
30759
+ * - `said`: the person's words, one row per reply or per filed line no reply covers.
30760
+ * - `did`: what Paigy did ("Sent to Mouth: …", "Recorded: …", "Filed on …").
30761
+ * `by` is the row's real author, never inferred from `kind`: a relay Paigy sent to an agent is
30762
+ * Paigy's, not the person's. Optional and additive (owner: "make sure whatever you do is backward
30763
+ * compatible"): an API before it sends none, and the screen falls back to `topics` and `said`. */
30764
+ timeline: external_exports.array(external_exports.object({
30765
+ id: external_exports.string(),
30766
+ position: external_exports.number(),
30767
+ atMs: external_exports.number(),
30768
+ kind: external_exports.enum(["put", "said", "did"]),
30769
+ by: external_exports.object({ participant: external_exports.string().nullable(), agentId: external_exports.string().nullable(), name: external_exports.string().nullable() }),
30770
+ goalId: external_exports.string().uuid().nullable(),
30771
+ requestId: external_exports.string().nullable(),
30772
+ summary: external_exports.string().nullable(),
30773
+ words: external_exports.string(),
30774
+ /** Paigy's sentences folded into this row: on a `put` row, what it said putting the item to the
30775
+ * person (before their next row); on a `said` row, what it said in reply (until their next row).
30776
+ * `atMs` is when each was said; optional, absent before 2026-10-14's fix. */
30777
+ spoken: external_exports.array(external_exports.object({ lineId: external_exports.string(), words: external_exports.string(), atMs: external_exports.number().optional() })),
30778
+ /** On a `said` row: the work these words were filed on, and whether they answered (recorded) a
30779
+ * question. They replace the "Filed on ..." and "Recorded: ..." rows that repeated the person's own
30780
+ * summary (Brain, 2026-10-14). Optional: absent from an API before it. */
30781
+ filedOn: external_exports.array(external_exports.object({ goalId: external_exports.string().uuid(), title: external_exports.string() })).optional(),
30782
+ recorded: external_exports.boolean().optional(),
30783
+ settled: external_exports.object({ requestId: external_exports.string(), answer: external_exports.string() }).nullable().optional(),
30784
+ acknowledged: external_exports.boolean().optional(),
30785
+ /** On a `put` row: still waiting for the person's answer (not settled, not answered, not put off).
30786
+ * The server's judgement; the screen draws "Still waiting for your answer" from it. Optional: absent
30787
+ * from an API before it, where the screen falls back to its own reading. */
30788
+ waiting: external_exports.boolean().optional(),
30789
+ lineIds: external_exports.array(external_exports.string())
30790
+ })).optional(),
30791
+ /** THE RECAP (owner, 2026-10-26: "the transcript should just be the entries that settled or
30792
+ * acknowledged the items; that's it"). Each item the person's words settled on this call, in the
30793
+ * order they said them: who asked it (`by`), the item in its agent's words (`title`), and only the
30794
+ * words of theirs that settled it (`lines`: each line once, verbatim, with when it was said on the
30795
+ * bot clock like `said[].atMs`). Built from their replies, not from what the call put, so an item
30796
+ * settled without being put is still here. Beside them (owner: "List them too, with the words that
30797
+ * said them"), each Goal his words told something (`kind` "told") or the call started ("started"),
30798
+ * with `requestId` null and the Goal's name as `title`; a started Goal may have no `lines` yet. `kind`
30799
+ * is a string, not an enum, so a later kind never fails an older build's parse; `requestId` is the
30800
+ * request the words settled. On the first page only; absent from an API before it. */
30801
+ settles: external_exports.array(external_exports.object({
30802
+ requestId: external_exports.string().nullable(),
30803
+ kind: external_exports.string(),
30804
+ by: external_exports.object({ participant: external_exports.string(), agentId: external_exports.string().nullable(), name: external_exports.string() }),
30805
+ goalId: external_exports.string().uuid().nullable(),
30806
+ title: external_exports.string(),
30807
+ lines: external_exports.array(external_exports.object({ lineId: external_exports.string(), words: external_exports.string(), atMs: external_exports.number() }))
30808
+ })).optional()
30608
30809
  });
30609
30810
  function sessionSlot(sessionId2) {
30610
30811
  const id22 = sessionId2 ?? sessionId();
@@ -30693,6 +30894,14 @@ async function requestCode(suggestedName = agentName(), device) {
30693
30894
  if (!res.ok) throw new Error(`/api/device/code failed: ${res.status} ${await res.text()}`);
30694
30895
  return await res.json();
30695
30896
  }
30897
+ var ServerFault = class extends Error {
30898
+ constructor(status) {
30899
+ super(`Paigy's server failed (HTTP ${status}) while checking the code.`);
30900
+ this.status = status;
30901
+ this.name = "ServerFault";
30902
+ }
30903
+ status;
30904
+ };
30696
30905
  async function pollToken(deviceCode) {
30697
30906
  const res = await reach(`${BACKEND_URL}/api/device/token`, {
30698
30907
  method: "POST",
@@ -30700,6 +30909,7 @@ async function pollToken(deviceCode) {
30700
30909
  body: JSON.stringify({ device_code: deviceCode })
30701
30910
  });
30702
30911
  if (res.ok) return await res.json();
30912
+ if (res.status >= 500) throw new ServerFault(res.status);
30703
30913
  const body = await res.json().catch(() => ({ error: "unknown" }));
30704
30914
  const err = body.error ?? "unknown";
30705
30915
  if (err === "authorization_pending") return null;
@@ -30865,11 +31075,12 @@ async function listConnections(opts = {}) {
30865
31075
  if (!res.ok) throw new Error(`list_connections failed: ${res.status} ${await res.text()}`);
30866
31076
  return await res.json();
30867
31077
  }
30868
- var NOT_SENT = `Recorded as the Goal's progress, not sent: nobody was notified. The person is told only a question, an answer to one they asked you, and what you say once the Goal is done. To close the work, send contact.completions or manage_goals kind:complete with the shared completion report, closing and reporting together. If the person asked you, in so many words, to send them this, send it again with userExplicitlyRequested: "any" on that update.`;
31078
+ var NOT_SENT = `Recorded as the Goal's progress, not sent to the person; the other agents that wrote on the Goal in the last hour are told. The person is told only a question, an answer to one they asked you, and what you say once the Goal is done. To close the work, send contact.completions or manage_goals kind:complete with the shared completion report, closing and reporting together. If the person asked you, in so many words, to send them this, send it again with userExplicitlyRequested: "any" on that update.`;
30869
31079
  var APPLIED = "Applied; nothing was sent to the person.";
30870
31080
  var DEMOTED = "Delivered as a card, not a call: the person's settings do not allow a call right now (silent, quiet hours, or a mode). It has reached them; do not send it again.";
30871
31081
  async function readDelivery(deliveryId, opts = {}) {
30872
- const res = await ensureAuthed(await (opts.reach ?? reach)(`${BACKEND_URL}/api/deliveries/${encodeURIComponent(deliveryId)}`, {
31082
+ const query = opts.transcript ? `?transcript=1${opts.after ? `&after=${encodeURIComponent(opts.after)}` : ""}` : "";
31083
+ const res = await ensureAuthed(await (opts.reach ?? reach)(`${BACKEND_URL}/api/deliveries/${encodeURIComponent(deliveryId)}${query}`, {
30873
31084
  headers: { authorization: `Bearer ${authToken(opts.token) ?? ""}` },
30874
31085
  signal: opts.signal
30875
31086
  }));
@@ -30894,6 +31105,7 @@ async function contact(input, opts = {}) {
30894
31105
  ...questions ? { questions } : {},
30895
31106
  ...parsed.answers ? { answers: parsed.answers } : {},
30896
31107
  ...parsed.withdrawQuestionIds ? { withdrawQuestionIds: parsed.withdrawQuestionIds } : {},
31108
+ ...parsed.bumpQuestionIds ? { bumpQuestionIds: parsed.bumpQuestionIds } : {},
30897
31109
  ...parsed.questionDependencies ? { questionDependencies: parsed.questionDependencies } : {}
30898
31110
  })
30899
31111
  }));
@@ -30922,7 +31134,9 @@ async function contact(input, opts = {}) {
30922
31134
  // IT WENT ONTO A CALL ALREADY HAPPENING (owner, 2026-09-28): the view words it as that call.
30923
31135
  ...lead.joinedCall ? { joinedCall: true } : {},
30924
31136
  ...demoted ? { demoted } : {},
30925
- ...acked
31137
+ ...acked,
31138
+ ...receipt.ringPolicy ? { ringPolicy: receipt.ringPolicy, ...receipt.message ? { ringHeld: receipt.message } : {} } : {},
31139
+ ...receipt.recheckAt ? { recheckAt: receipt.recheckAt } : {}
30926
31140
  };
30927
31141
  };
30928
31142
  const settled = (d) => d.state === "closed" || d.answers.length > 0 || d.entries.some((e) => e.kind === "contribution" && !entryUnit(e));
@@ -32998,7 +33212,7 @@ var OptionInputSchema2 = external_exports.object({
32998
33212
  imgUrl: OptionSchema2.shape.image
32999
33213
  }).strict();
33000
33214
  var NIGHT2 = { from: 23, to: 7 };
33001
- var ASK_MAX2 = 250;
33215
+ var ASK_MAX2 = 80;
33002
33216
  var UNITS_MAX2 = 12;
33003
33217
  var UNIT_TITLE_MAX2 = 50;
33004
33218
  var UNIT_BODY_MAX2 = 200;
@@ -33063,15 +33277,15 @@ var CompletionSchema2 = external_exports.object({
33063
33277
  }).strict();
33064
33278
  var CompleteChangeSchema2 = CompletionSchema2.extend({ kind: external_exports.literal("complete") });
33065
33279
  var ASKING_RULES2 = `HOW TO ASK:
33066
- 1. Write one question per object. Five questions are five objects in \`questions\`, in one contact, so each can be answered on its own; one question with five parts settles nothing until all five are answered.
33067
- 2. Name the Goal you are working on as the question's \`goalId\`: the question goes onto that Goal and its answer comes back there. It must exist: create it with manage_goals first.
33068
- 3. \`workItBlocks\` only for work you are truly blocked on (it asks for a call); leave it out for a question you can keep working around.
33069
- 4. Never hold the process open with while-loops. A wait that comes back \`expired\` is not a finished conversation: wait again with contact({wait:true}) only while you have nothing else to do. While a Call you placed is open, keep receiving window after window until it ends, even when a window is empty: the person may give follow-ups or instructions. With no open Call, STOP WAITING when a window comes back with nothing new \u2014 the question stays open, and its answer reaches you on the Goal. Otherwise, yield only with a working listener or scheduled wakeup, and collect answers with \`contact({wait:false})\` or \`get_goals\` on that wake.
33070
- 5. One question, one row. Never restate a question that is still waiting inside a new contact: keep waiting on the original, or the answer lands on one copy and the other stays open. Take back one that no longer matters with \`withdrawQuestionIds\`.
33071
- 6. Read the Goal's conversation before asking. Never ask again what was answered or already shipped \u2014 and tell its states apart: \`answered\` carries the choice in \`answer\`, while \`replied\` means they said something and chose none of your options, so that question is still yours to settle and their words are the line beside it.
33072
- 7. A question carries its options when you have them; a free-text question may omit them. Each option\u2019s label must stand on its own and name its choice in full -- never \`All three\` or \`Option 2\`. \`pickMode: "many"\` makes the card a checklist (options they may want several of); \`"one"\`, the default, a pick (one rules out the others); \`"rank"\` an ordering. Each question is sent exactly as written, with no reading in between. They can always answer in their own words, so never add an 'Other' option.
33073
- 8. A diagnosis says when, why and how it happens, then proposes one fix. Never options first.
33074
- 9. GIVE A REPORT ITS REPLY: an update takes \`reply\` too, one line the person can tap instead of typing, written in THEIR voice for THAT report ("Sounds good, I'll test later") \u2014 the same care you give a question's options. What they tap is what you read back, which tells you whether they verified your work or only received it. One line, because a report has one way to close, and it may not change what happens next: a reply that would is a question. Requested delivery and completed-Goal reports require a reply (reply_required); ordinary progress may omit it.`;
33280
+ 1. One question per object in \`questions\`, so each is answered on its own.
33281
+ 2. \`goalId\` names the existing Goal it is about (create one with manage_goals first); the answer comes back there.
33282
+ 3. \`workItBlocks\` only when you are truly blocked: it asks for a call.
33283
+ 4. No while-loops. While any Call is open, even one your question joined from their items, keep receiving through empty windows; otherwise stop at one: the answer reaches you on the Goal. Yield only with a listener or wakeup.
33284
+ 5. One question, one row: never re-send one still waiting; take back one that no longer matters with \`withdrawQuestionIds\`.
33285
+ 6. Read the Goal before asking; never re-ask what was answered or shipped. \`replied\` means they chose no option: it is still yours to settle.
33286
+ 7. Give options when you have them. Each label names its choice in full (never "Option 2"); never add "Other". \`pickMode\`: one (default), many, rank.
33287
+ 8. A diagnosis says when, why and how it happens, then proposes one fix.
33288
+ 9. Give a report its \`reply\`: one line in THEIR voice for THAT report, so you learn whether they verified it or only received it. Required when it is delivered or its Goal is done.`;
33075
33289
  function draft20202(node) {
33076
33290
  if (Array.isArray(node)) return node.map(draft20202);
33077
33291
  if (node && typeof node === "object") {
@@ -33114,7 +33328,7 @@ var userExplicitlyRequested2 = external_exports.enum(["any", "call"]).optional()
33114
33328
  `Only what the person said about THIS message, in so many words: "any" when they asked you to send it to them ("send it to my phone", "message me the result"), "call" when they asked to be called about it. It is then delivered (a call rings for the whole contact, and carries everything waiting on them); omitted, an update is only recorded as the Goal's progress unless the person needs it. Never set it to make a message louder.`
33115
33329
  );
33116
33330
  var units2 = external_exports.array(UnitInputSchema2).optional().describe(
33117
- `The context this message needs, as up to ${UNITS_MAX2} units in reading order, each {title, body}: a title of at most ${UNIT_TITLE_MAX2} characters and a body of at most ${UNIT_BODY_MAX2}. One idea per unit. Leave it out when the main text says it all.`
33331
+ `The context this message needs, as up to ${UNITS_MAX2} units in reading order, each {title, body}: a title of at most ${UNIT_TITLE_MAX2} characters and a body of at most ${UNIT_BODY_MAX2}. One idea per unit. Leave it out when the main text says it all. Over a cap is refused by name (ask_too_long, too_many_units, unit_title_too_long, unit_body_too_long) and nothing is sent.`
33118
33332
  );
33119
33333
  var UpdateInputSchema2 = external_exports.object({
33120
33334
  message: external_exports.string().trim().min(1).describe(`The one point, at most ${ASK_MAX2} characters; the context goes in units.`),
@@ -33169,11 +33383,11 @@ var questionFields2 = {
33169
33383
  ),
33170
33384
  goalId: external_exports.string().uuid().describe("The Goal the question is about, which must exist (create it with manage_goals first). Its answer comes back there."),
33171
33385
  units: units2,
33172
- options: external_exports.array(OptionInputSchema2).min(1).max(6).optional().describe("The choices, when you have them. Each label stands on its own, at most 50 characters; a hint, at most 200."),
33386
+ options: external_exports.array(OptionInputSchema2).min(1).max(6).optional().describe("The choices, when you have them. Each label stands on its own and differs from the others (duplicate_option_label), at most 50 characters; a hint, at most 200. They can always answer in their own words, so no 'Other' or 'None of these'."),
33173
33387
  // HOW THE OPTIONS ARE ANSWERED, SAID BY THE AGENT (owner, 2026-10-02: "one and many makes sense";
33174
33388
  // brain_prompts.md §1: structured agent questions need no model). The app draws all three.
33175
33389
  pickMode: external_exports.enum(["one", "many", "rank"]).optional().describe(
33176
- 'How the options are answered: "one" (the default) a pick, for alternatives; "many" a checklist, for independent options they may want several of; "rank" an order of all of them. Only with options.'
33390
+ 'How the options are answered: "one" (the default) a pick, for alternatives; "many" a checklist, for independent options they may want several of; "rank" an order of all of them. Only with options; "many" and "rank" need at least two (too_few_options).'
33177
33391
  ),
33178
33392
  // WHAT THE QUESTION HOLDS UP (brain_prompts.md §2.1): replaces `waiting: 'hard'`. A question that
33179
33393
  // blocks work asks for a call (the person's settings and ring cooldowns still decide).
@@ -33185,11 +33399,39 @@ var questionFields2 = {
33185
33399
  var refineQuestion2 = (q, ctx) => {
33186
33400
  refuseOverCaps2(q.question, q.units, "question", ctx);
33187
33401
  if (q.pickMode && !q.options) ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["pickMode"], message: "pickMode comes only with options" });
33402
+ refuseThinOptions2(q, ctx);
33188
33403
  const ids = (q.options ?? []).map((o) => o.id);
33189
33404
  if (ids.some((id22) => id22) && (ids.some((id22) => !id22) || new Set(ids).size !== ids.length)) {
33190
33405
  ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["options"], message: "give every option a distinct id, or none" });
33191
33406
  }
33192
33407
  };
33408
+ var MIN_LIST_OPTIONS2 = 2;
33409
+ function refuseThinOptions2(q, ctx) {
33410
+ const options = q.options ?? [];
33411
+ if ((q.pickMode === "many" || q.pickMode === "rank") && options.length < MIN_LIST_OPTIONS2) {
33412
+ ctx.addIssue({
33413
+ code: external_exports.ZodIssueCode.custom,
33414
+ path: ["options"],
33415
+ params: { refusal: "too_few_options", length: options.length, min: MIN_LIST_OPTIONS2 },
33416
+ message: `too_few_options: pickMode "${q.pickMode}" needs at least ${MIN_LIST_OPTIONS2} options; this question has ${options.length}. Add the other choices, or leave pickMode out.`
33417
+ });
33418
+ }
33419
+ const seen = /* @__PURE__ */ new Map();
33420
+ options.forEach((o, index) => {
33421
+ const key22 = o.label.trim().toLowerCase();
33422
+ const first = seen.get(key22);
33423
+ if (first === void 0) {
33424
+ seen.set(key22, index);
33425
+ return;
33426
+ }
33427
+ ctx.addIssue({
33428
+ code: external_exports.ZodIssueCode.custom,
33429
+ path: ["options", index, "label"],
33430
+ params: { refusal: "duplicate_option_label", index, first },
33431
+ message: `duplicate_option_label: options[${index}] repeats the label of options[${first}]. Each option names a different choice.`
33432
+ });
33433
+ });
33434
+ }
33193
33435
  var QuestionInputSchema2 = external_exports.object({
33194
33436
  questionId: external_exports.string().uuid().optional().describe("Optional: your own stable id for this question (a UUID), so a resend is the same question. Minted for you when omitted; the result returns it."),
33195
33437
  ...questionFields2
@@ -33211,21 +33453,26 @@ var QuestionDependencySchema2 = external_exports.object({
33211
33453
  reason: reason2.optional()
33212
33454
  }).strict().refine(actionFits2, ACTION_FITS2);
33213
33455
  var sendFields2 = {
33214
- completions: external_exports.array(CompletionSchema2).min(1).max(20).optional().describe("Close existing Goals and deliver their completion reports atomically. Ordinary updates never close work."),
33456
+ completions: external_exports.array(CompletionSchema2).min(1).max(20).optional().describe(
33457
+ "COMPLETIONS close and report in one operation, the same contract as manage_goals kind:complete: closure and the report commit together or neither does. Required children and dependencies must already be finished. options suggest next steps: a tap acknowledges the report and requests that step, and never reopens the Goal (follow-up work needs a new one). No reviewer rejudges it: say only what your evidence supports. Ordinary updates never close a Goal."
33458
+ ),
33215
33459
  updates: external_exports.array(UpdateInputSchema2).min(1).max(20).optional().describe(
33216
- "News: progress, findings, a result. An update asks nothing. It reaches the person only when they asked for it (userExplicitlyRequested), when it answers something they said, or once its Goal is done; otherwise it is recorded as the Goal's progress and nobody is notified."
33460
+ "News: progress, findings, a result. An update asks nothing. It reaches the person only when they asked for it (userExplicitlyRequested), when it answers something they said, or once its Goal is done; otherwise it is recorded as the Goal's progress, which the person is not told. Every update reaches the other agents that wrote on its Goal in the last hour: to tell another agent something, write it as an update on that agent's Goal."
33217
33461
  ),
33218
33462
  answers: external_exports.array(AnswerInputSchema2).min(1).max(20).optional().describe("Answers to Questions addressed to you."),
33219
33463
  withdrawQuestionIds: external_exports.array(questionHandle2).min(1).max(10).optional().describe(
33220
33464
  "Questions you asked that no longer need an answer: you acted on them yourself, they no longer matter, or you asked wrongly. Each is cancelled, not answered: its card closes and nothing rings for it."
33221
33465
  ),
33466
+ bumpQuestionIds: external_exports.array(questionHandle2).min(1).max(10).optional().describe(
33467
+ "Your own questions still waiting on the person that you want them to notice again. Each moves back to the top of its card with one new notification; nothing is resent and no second card is made."
33468
+ ),
33222
33469
  questionDependencies: external_exports.array(QuestionDependencySchema2).min(1).max(20).optional().describe(
33223
33470
  "Add or remove what a Question you asked holds up, after asking it."
33224
33471
  )
33225
33472
  };
33226
33473
  var ContactSchema2 = external_exports.object({
33227
33474
  ...sendFields2,
33228
- questions: external_exports.array(QuestionInputSchema2).min(1).max(20).optional().describe("Questions for the person, one per object."),
33475
+ questions: external_exports.array(QuestionInputSchema2).min(1).max(20).optional().describe("Questions for the person, one per object, each sent exactly as written, with no reading in between."),
33229
33476
  /** RECEIVING (2I, I2; brain_prompts.md §2.2): the events this agent handled. */
33230
33477
  ackEventIds: external_exports.array(external_exports.string().uuid()).min(1).max(100).optional().describe(
33231
33478
  "The exact eventIds of the events you have handled: an acknowledgment (ACK). Reading alone acknowledges nothing, so an event comes back until you acknowledge it; after that the next batch can come. Each recipient acknowledges separately, for itself only. A Question you owe is answered (answers), never acknowledged away."
@@ -33234,22 +33481,34 @@ var ContactSchema2 = external_exports.object({
33234
33481
  "Only controls when this returns. Sending: false (the default) returns at once; true waits up to about 45 seconds for a response to what you sent. Sending nothing: true (the default) waits up to about 45 seconds for anything addressed to you; false returns what is waiting now. It does not mean work is blocked, set urgency, or ask for a call. `waitOutcome` says which happened: `available`, `expired` (nothing arrived; wait again without sending again), or `not_waited`."
33235
33482
  )
33236
33483
  }).strict();
33237
- var sendsAnything2 = (c) => !!(c.completions?.length || c.updates?.length || c.questions?.length || c.answers?.length || c.withdrawQuestionIds?.length || c.questionDependencies?.length);
33484
+ var sendsAnything2 = (c) => !!(c.completions?.length || c.updates?.length || c.questions?.length || c.answers?.length || c.withdrawQuestionIds?.length || c.bumpQuestionIds?.length || c.questionDependencies?.length);
33238
33485
  var ContactWireSchema2 = external_exports.object({
33239
33486
  operationId: external_exports.string().uuid(),
33240
33487
  ...sendFields2,
33241
33488
  questions: external_exports.array(QuestionWireSchema2).min(1).max(20).optional()
33242
33489
  }).strict().refine(sendsAnything2, "a contact sends at least one update, question, answer, withdrawal or question dependency");
33243
33490
  var CONTACT_SCHEMA2 = { type: "object", ...mcpInputSchema2(ContactSchema2) };
33244
- var CONTACT_DESCRIPTION2 = "Send to and receive from the person: completions, updates, questions, answers to questions addressed to you, withdrawals of your own questions, and what a question holds up. Every Goal you name must already exist: create it with manage_goals first; an unknown Goal is refused and nothing is sent. Every item applies on its own: read `results`, where a failed item names why while the rest still apply.\n\n" + ASKING_RULES2 + `
33491
+ var CONTACT_DESCRIPTION2 = "Send to and receive from the person: completions, updates, questions, answers to questions addressed to you, withdrawals, and what a question holds up. Every Goal named must exist: an unknown one refuses the whole contact. Each item applies on its own: read `results`, where a failed one names why.\n\n" + ASKING_RULES2 + `
33245
33492
 
33246
- CUT A LONG MESSAGE BEFORE YOU SEND IT: a question, an update's message or an answer is the one point, in at most ${ASK_MAX2} characters; everything else it needs goes in 'units', up to ${UNITS_MAX2} {title, body} in reading order, one idea each, every title at most ${UNIT_TITLE_MAX2} characters and every body at most ${UNIT_BODY_MAX2}. The person sees the main text and the titles, and opens a unit to read its body. Over a cap is refused by name (ask_too_long, too_many_units, unit_title_too_long, unit_body_too_long) and nothing is sent.
33493
+ LENGTH: the question, message or answer is the one point, at most ${ASK_MAX2} characters; the rest goes in \`units\`, one idea each. Over a cap is refused by name and nothing is sent. Several results are several updates.
33247
33494
 
33248
- UPDATES ask nothing, so no answer is owed and none should be awaited. An update reaches the person only when they asked you for it (userExplicitlyRequested), when it answers something they said, or once its Goal is done; any other is recorded as the Goal's progress and nobody is notified. Ordinary updates never close a Goal. On a Goal whose report card is still open, an update that reaches them is added to that card, with no new push. If the person is already on a call, anything that reaches them joins that call, with no ring.
33495
+ UPDATES ask nothing. One reaches the person only when they asked for it, it answers something they said, or its Goal is done; else it is kept as progress. One that reaches them joins an open report card or a live call.
33249
33496
 
33250
- COMPLETIONS close and report in one operation: completions:[{goalId,message,units?,reply,options?}]. The same contract works in manage_goals changes with kind:complete. message is at most 50 characters; use units when useful for initial state, changes, current state (verification and limits), and next steps / leftover work with its owner. reply is one acknowledgement in the person's voice. Optional options:[{label,hint}] suggest next steps: a tap acknowledges the report and requests that step from its author. It never reopens the completed Goal; follow-up work needs a new Goal. Closure and the report commit together or neither does. Required children and dependencies must already be finished. No Reviewer rejudges your completion; say only what your evidence supports.
33251
-
33252
- RECEIVING: a contact that sends nothing returns \`events\`, a limited batch of what is addressed to you (not a history page): \`question\`, a Question you owe (answer it in answers, with its questionId); \`update\`, something new on one of your Goals (a reply, an answer: read it with get_goals); \`instruction\`, a request or note sent to you. \`hasMore\` says more are waiting. Reading acknowledges nothing: once you have handled events, confirm their eventIds with contact({ackEventIds}), and the next batch can come. contact({}) waits up to about 45 seconds for something to arrive; contact({wait:false}) returns at once. It also lists work given to you that nobody has started (\`assigned\`; your first write to it starts it) and your work gone quiet (\`stalled\`).`;
33497
+ RECEIVING: contact({}) waits ~45 s; contact({wait:false}) returns \`events\` at once. Confirm the ones you handled with contact({ackEventIds}).`;
33498
+ var HELP_TOPICS2 = ["pairing", "listening", "receiving", "asking", "updates", "goals", "calls"];
33499
+ var unknownTopic2 = (topic) => `unknown_topic: ${JSON.stringify(topic)} is not a section of the guide. Topics: ${HELP_TOPICS2.join(", ")}; or omit topic for the whole guide.`;
33500
+ var HelpSchema2 = external_exports.object({
33501
+ topic: external_exports.enum(HELP_TOPICS2, { errorMap: (_issue, ctx) => ({ message: unknownTopic2(ctx.data) }) }).optional().describe("One section of the guide. Omit it for the whole guide.")
33502
+ }).strict();
33503
+ var HELP_DESCRIPTION2 = "Start here: how to use Paigy, in full \u2014 pairing, listening, receiving, asking, updates and completions, Goals and calls. Pass a topic for one section. Read-only; needs no setup.";
33504
+ var AGENT_PROMPTS2 = [
33505
+ {
33506
+ name: "help",
33507
+ description: "How to use Paigy: the whole guide, or one topic of it.",
33508
+ arguments: [{ name: "topic", description: `One section: ${HELP_TOPICS2.join(", ")}. Omit it for the whole guide.`, required: false }]
33509
+ },
33510
+ { name: "welcome", description: "Start here: who you are on Paigy, then listen and collect your open work." }
33511
+ ];
33253
33512
  var CreateGoalSchema2 = external_exports.object({
33254
33513
  outcome: external_exports.string().trim().min(1).max(1e4),
33255
33514
  /** The work's NAME (#2115) — one to five words, how a person refers to it out loud ("the night
@@ -33350,9 +33609,12 @@ var GetGoalsSchema2 = external_exports.object({
33350
33609
  history: external_exports.boolean().optional()
33351
33610
  }).strict();
33352
33611
  var GetDeliverySchema2 = external_exports.object({
33353
- deliveryId: external_exports.string().uuid().describe("The Delivery id returned by contact or receive.")
33612
+ deliveryId: external_exports.string().uuid().describe("The Delivery id returned by contact or receive."),
33613
+ // WHAT WAS SAID ON A CALL (owner, 2026-10-26, Goal c743f4a4: "A flag on get_delivery", "Any of my agents").
33614
+ transcript: external_exports.boolean().optional().describe("For a Call: also return what was said on it, one page of spoken lines."),
33615
+ after: external_exports.string().max(40).optional().describe("With transcript: the next value the previous page returned, to read the next page.")
33354
33616
  }).strict();
33355
- var GET_DELIVERY_DESCRIPTION2 = "Read a Delivery in full: its whole ask, units, options and answers, plus current callState and callOutcome for a Call. Any agent of the same account may read it; another account is not disclosed. Reading never acknowledges or resends anything. Use this after a call or when receive names a Call you are waiting on.";
33617
+ var GET_DELIVERY_DESCRIPTION2 = "Read a Delivery in full: its whole ask, units, options and answers, plus current callState and callOutcome for a Call. For a Call, transcript: true adds what was said: each spoken line in order, who said it, and when from pickup, a page at a time. A line from the room, not the person, is marked room. Any agent of the same account may read it; another account is not disclosed. Reading never acknowledges or resends anything. Use this after a call or when receive names a Call you are waiting on.";
33356
33618
  var GET_GOALS_DESCRIPTION2 = "Read one to ten Goals by goalIds, returned in the same order under goals (a read never puts you on them). history applies to every requested Goal. A refused read fails the call with its original refusal; no partial result is presented as complete. Each Goal includes its ten most recent other contributors (names, latest entry headlines and times), outcome, state, revision, progress, blockers, the conversation on it (each question with its options and what was decided), `next`, the one step to take, and `more`, where to read further. A question in that conversation reads `open` (nothing yet), `answered` (a choice was made, and `answer` carries it), `replied` (they said something and the read settled the question on their words \u2014 NO option of yours was chosen, and the words are the reply line beside it, so read that before you act), or `closed`. The conversation carries everything the person said, every open question and your newest entry; your older entries are left out and counted \u2014 history: true reads every entry in full. Every Goal of your person is readable, whichever of their agents owns it; another account's Goals are not disclosed.";
33357
33619
  var SearchToolSchema2 = external_exports.object({
33358
33620
  query: external_exports.string().trim().min(1).max(500),
@@ -33379,7 +33641,9 @@ var AGENT_TOOLS2 = [
33379
33641
  { name: "get_goals", description: GET_GOALS_DESCRIPTION2, inputSchema: mcpInputSchema2(GetGoalsSchema2) },
33380
33642
  { name: "search", description: SEARCH_DESCRIPTION2, inputSchema: mcpInputSchema2(SearchToolSchema2) },
33381
33643
  { name: "check_activity", description: "Read your person's agents that contributed in the last 24 hours, newest first: at most 30 agents and their five most recently touched Goals, with their latest entry headline and time. Use get_goals to read a Goal and its other contributors before starting overlapping work. Read-only; no arguments.", inputSchema: mcpInputSchema2(CheckActivitySchema2) },
33382
- { name: "send_feedback", description: SEND_FEEDBACK_DESCRIPTION2, inputSchema: mcpInputSchema2(SendFeedbackSchema2) }
33644
+ { name: "send_feedback", description: SEND_FEEDBACK_DESCRIPTION2, inputSchema: mcpInputSchema2(SendFeedbackSchema2) },
33645
+ // THE GUIDE FROM INSIDE THE MCP (owner, 2026-10-27): the skill's text, needing no identity (`help.ts`).
33646
+ { name: "help", description: HELP_DESCRIPTION2, inputSchema: mcpInputSchema2(HelpSchema2) }
33383
33647
  ];
33384
33648
  var AGENT_TOOL_NAMES2 = AGENT_TOOLS2.map((t) => t.name);
33385
33649
  var id2 = external_exports.string().uuid();
@@ -33467,11 +33731,22 @@ var BrainMessageSchema2 = external_exports.union([
33467
33731
  // A MESSAGE TO THE PERSON KEEPS ITS SENTENCES (turns.md): the talker writes them one by one, and each is
33468
33732
  // its own unit of speech (`<cycle>:<key>:<n>`). `text` is the same words joined, for every reader of a
33469
33733
  // message's words. Absent on results written before sentences.
33470
- external_exports.object({ ...messageBase2, to: external_exports.object({ kind: external_exports.literal("user") }).strict(), sentences: external_exports.array(external_exports.string().min(1)).min(1).optional() }).strict(),
33734
+ external_exports.object({
33735
+ ...messageBase2,
33736
+ to: external_exports.object({ kind: external_exports.literal("user") }).strict(),
33737
+ sentences: external_exports.array(external_exports.string().min(1)).min(1).optional(),
33738
+ // THE REPORTS IT TELLS, BY THEIR OWN IDENTITY (call 9d1c096c, 2026-10-15): the talker's message names the report
33739
+ // Entries it speaks of, so the plan's line names that report rather than re-finding it by its Goal. Absent on
33740
+ // results written before it.
33741
+ tells: external_exports.array(external_exports.object({ id: id2 }).strict()).optional()
33742
+ }).strict(),
33471
33743
  external_exports.object({
33472
33744
  ...messageBase2,
33473
33745
  to: external_exports.object({ kind: external_exports.literal("agent"), agentId: external_exports.string().regex(/^agent:(?!paigy$)\S+$/) }).strict(),
33474
33746
  call: external_exports.object({ callId: id2, listen: external_exports.literal(true) }).strict().optional(),
33747
+ // WHAT IT ASKS THE AGENT, IN UNDER TEN WORDS (owner, 2026-10-15: "Yes, add the summary"): the talker's own, stored
33748
+ // as the sent Entry's summary, which the recap's "Sent to <agent>: …" row shows. Absent on results written before it.
33749
+ summary: external_exports.string().optional(),
33475
33750
  // THE PERSON ASKED TO BE CALLED BACK ONCE THIS AGENT'S WORK IS DONE (turns.md, step 0): the agent owes
33476
33751
  // the call, and its next contact about it rings them (`public.callbacks`).
33477
33752
  callback: external_exports.literal(true).optional()
@@ -33498,95 +33773,98 @@ var BrainResultSchema2 = external_exports.object({
33498
33773
  next: BrainNextSchema2,
33499
33774
  search: BrainSearchSchema2.optional()
33500
33775
  }).strict();
33501
- var str4 = external_exports.string();
33776
+ var str22 = external_exports.string();
33502
33777
  var strs4 = external_exports.array(external_exports.string());
33503
33778
  var CompactResultSchema2 = external_exports.object({
33504
- next: external_exports.object({ say: strs4, then: external_exports.enum(["listen", "hold", "end", "none"]), waitFor: strs4, reason: str4, instructions: strs4 }).strict(),
33505
- messages: external_exports.array(external_exports.object({ key: str4, to: str4, text: str4, about: strs4, entries: strs4, owed: strs4, inviteToCall: external_exports.boolean() }).strict()),
33506
- entries: external_exports.array(external_exports.object({ key: str4, from: str4, on: strs4 }).strict()),
33507
- answers: external_exports.array(external_exports.object({ question: str4, entries: strs4, summary: str4, picked: strs4 }).strict()),
33779
+ next: external_exports.object({ say: strs4, then: external_exports.enum(["listen", "hold", "end", "none"]), waitFor: strs4, reason: str22, instructions: strs4 }).strict(),
33780
+ messages: external_exports.array(external_exports.object({ key: str22, to: str22, text: str22, about: strs4, entries: strs4, owed: strs4, inviteToCall: external_exports.boolean() }).strict()),
33781
+ entries: external_exports.array(external_exports.object({ key: str22, from: str22, on: strs4 }).strict()),
33782
+ answers: external_exports.array(external_exports.object({ question: str22, entries: strs4, summary: str22, picked: strs4 }).strict()),
33508
33783
  changes: external_exports.array(external_exports.object({
33509
- key: str4,
33784
+ key: str22,
33510
33785
  what: external_exports.enum(["goal", "question", "lesson"]),
33511
33786
  op: external_exports.enum(["create", "edit", "assign", "open", "complete", "cancel", "defer", "move", "block", "unblock", "withdraw", "remember", "revise"]),
33512
- id: str4,
33513
- text: str4,
33514
- title: str4,
33515
- who: str4,
33516
- under: str4,
33787
+ id: str22,
33788
+ text: str22,
33789
+ title: str22,
33790
+ who: str22,
33791
+ under: str22,
33517
33792
  gate: external_exports.enum(["start", "complete", "answer", "none"]),
33518
- options: external_exports.array(external_exports.object({ id: str4, label: str4 }).strict()),
33793
+ options: external_exports.array(external_exports.object({ id: str22, label: str22 }).strict()),
33519
33794
  pick: external_exports.enum(["one", "many", "rank", "words"]),
33520
33795
  entries: strs4
33521
33796
  }).strict()),
33522
33797
  feedback: external_exports.array(strs4),
33523
- search: external_exports.object({ query: str4, within: strs4, goal: str4 }).strict()
33798
+ search: external_exports.object({ query: str22, within: strs4, goal: str22 }).strict()
33524
33799
  }).strict();
33525
33800
  var COMPACT_RESULT_JSON_SCHEMA2 = (({ $schema: _, ...rest }) => rest)(
33526
33801
  zodToJsonSchema2(CompactResultSchema2, { $refStrategy: "none" })
33527
33802
  );
33528
- var str22 = external_exports.string();
33803
+ var str32 = external_exports.string();
33529
33804
  var strs22 = external_exports.array(external_exports.string());
33530
33805
  var TalkerReplySchema2 = external_exports.object({
33531
33806
  /** What to say and send, messages to the person first: spoken in the order written. `to` is "user"
33532
33807
  * or an agent's handle; `sentences` is what a message to the person says, one short sentence each
33533
- * ([] to an agent); `text` is what a message to an agent says ("" to the person); `about` names
33808
+ * ([] to an agent); `text` is what a message to an agent says ("" to the person); `summary` is what it
33809
+ * asks the agent, in under ten words, as the person would put it ("" to the person; owner, 2026-10-15:
33810
+ * "Yes, add the summary"), which the recap's "Sent to <agent>: …" row shows; `about` names
33534
33811
  * handles; `blocks` is the item a question to an agent must be answered before ("" for none);
33535
33812
  * `callback` is true on a message to the agent doing work the person asked to be called back about
33536
33813
  * once it is done (false otherwise): that agent then owes the call (turns.md, step 0). */
33537
- messages: external_exports.array(external_exports.object({ key: str22, to: str22, sentences: strs22, text: str22, about: strs22, blocks: str22, callback: external_exports.boolean() }).strict()),
33814
+ messages: external_exports.array(external_exports.object({ key: str32, to: str32, sentences: strs22, text: str32, summary: str32, about: strs22, blocks: str32, callback: external_exports.boolean() }).strict()),
33538
33815
  /** What the call does next: listen, hold (the person asked for a moment) or end (they asked to). */
33539
33816
  then: external_exports.enum(["listen", "hold", "end"]),
33540
33817
  /** The person's replies to items (replies, owner 2026-10-07): the item's handle, the chosen option
33541
33818
  * IDs, the line handles, how they replied in under ten words (keeping any condition), and `defer`:
33542
33819
  * "" when their words settle the item, else what a reply that puts it off waits for -- "call" (the
33543
33820
  * end of this call), a question's handle (that question's answer) or an ISO time. */
33544
- replies: external_exports.array(external_exports.object({ item: str22, options: strs22, lines: strs22, summary: str22, defer: str22 }).strict()),
33821
+ replies: external_exports.array(external_exports.object({ item: str32, options: strs22, lines: strs22, summary: str32, defer: str32 }).strict()),
33545
33822
  /** The line handles that tell the talker how to run this call; they last until it ends and reach no agent. */
33546
33823
  instruction: strs22,
33547
33824
  /** The line handles the filer acts on, and the only ones it reads (3e): new work, a change to existing
33548
33825
  * work, feedback on Paigy, anything said to an agent, and any rule meant to outlast the call. */
33549
33826
  file: strs22,
33550
33827
  /** Evidence to fetch for a second round: a search, an item's full text, or an agent by name. */
33551
- need: external_exports.object({ kind: external_exports.enum(["search", "item", "agent", ""]), text: str22 }).strict(),
33828
+ need: external_exports.object({ kind: external_exports.enum(["search", "item", "agent", ""]), text: str32 }).strict(),
33552
33829
  /** The handle of the item to explain ("" for none). */
33553
- explain: str22
33830
+ explain: str32
33554
33831
  }).strict();
33555
33832
  var TALKER_REPLY_JSON_SCHEMA2 = (({ $schema: _, ...rest }) => rest)(
33556
33833
  zodToJsonSchema2(TalkerReplySchema2, { $refStrategy: "none" })
33557
33834
  );
33558
- var str32 = external_exports.string();
33835
+ var str42 = external_exports.string();
33559
33836
  var strs32 = external_exports.array(external_exports.string());
33560
33837
  var FilerReplySchema2 = external_exports.object({
33561
- /** Which Goals each new line goes on: a line's handle, Goal handles (or keys of new Goals), and what
33562
- * the line says in at most ten words. */
33563
- filed: external_exports.array(external_exports.object({ line: str32, goals: strs32, summary: str32 }).strict()),
33838
+ /** Which Goals each new line goes on: a line's handle, Goal handles (or keys of new Goals: a line that asks
33839
+ * for new work goes on the Goal it creates, owner 2026-10-26), and what the line says in at most twenty
33840
+ * words (owner, 2026-10-26: "bump it from 10 to 20 words"). */
33841
+ filed: external_exports.array(external_exports.object({ line: str42, goals: strs32, summary: str42 }).strict()),
33564
33842
  goals: external_exports.array(external_exports.object({
33565
33843
  op: external_exports.enum(["create", "edit", "complete", "cancel", "reopen", "assign", "defer", "move", "block", "unblock"]),
33566
- key: str32,
33567
- goal: str32,
33568
- title: str32,
33569
- outcome: str32,
33570
- owner: str32,
33571
- under: str32,
33572
- until: str32,
33573
- on: str32,
33844
+ key: str42,
33845
+ goal: str42,
33846
+ title: str42,
33847
+ outcome: str42,
33848
+ owner: str42,
33849
+ under: str42,
33850
+ until: str42,
33851
+ on: str42,
33574
33852
  gate: external_exports.enum(["start", "complete", "answer", ""]),
33575
- why: str32
33853
+ why: str42
33576
33854
  }).strict()),
33577
33855
  questions: external_exports.array(external_exports.object({
33578
33856
  op: external_exports.enum(["create", "edit", "assign", "withdraw"]),
33579
- key: str32,
33580
- question: str32,
33581
- text: str32,
33582
- summary: str32,
33583
- to: str32,
33584
- goal: str32,
33585
- options: external_exports.array(external_exports.object({ id: str32, label: str32 }).strict()),
33857
+ key: str42,
33858
+ question: str42,
33859
+ text: str42,
33860
+ summary: str42,
33861
+ to: str42,
33862
+ goal: str42,
33863
+ options: external_exports.array(external_exports.object({ id: str42, label: str42 }).strict()),
33586
33864
  pick: external_exports.enum(["one", "many", "rank", "words", ""]),
33587
- blocks: str32
33865
+ blocks: str42
33588
33866
  }).strict()),
33589
- lessons: external_exports.array(external_exports.object({ op: external_exports.enum(["remember", "revise", "withdraw"]), lesson: str32, text: str32, scope: str32 }).strict()),
33867
+ lessons: external_exports.array(external_exports.object({ op: external_exports.enum(["remember", "revise", "withdraw"]), lesson: str42, text: str42, scope: str42 }).strict()),
33590
33868
  /** Line handles whose words comment on Paigy itself. */
33591
33869
  feedback: strs32
33592
33870
  }).strict();
@@ -33647,6 +33925,27 @@ var TidyReplySchema2 = external_exports.object({
33647
33925
  var TIDY_REPLY_JSON_SCHEMA2 = (({ $schema: _, ...rest }) => rest)(
33648
33926
  zodToJsonSchema2(TidyReplySchema2, { $refStrategy: "none" })
33649
33927
  );
33928
+ var HandoutReplySchema2 = external_exports.object({
33929
+ assign: external_exports.array(external_exports.object({
33930
+ /** The Goal's handle (G). */
33931
+ goal: external_exports.string(),
33932
+ /** The agent's handle (A). */
33933
+ to: external_exports.string(),
33934
+ /** At most ten words, naming the Goal of theirs it is most like: the reason the hand-out records. */
33935
+ why: external_exports.string()
33936
+ }).strict()),
33937
+ /** The Goals no listed agent's work is even loosely like: Paigy starts a session for them (owner, 2026-10-24,
33938
+ * Goal 37603006, "One per family of related Goals"). */
33939
+ new: external_exports.array(external_exports.object({
33940
+ /** The Goal's handle (G). */
33941
+ goal: external_exports.string(),
33942
+ /** At most ten words: why nothing active fits it. */
33943
+ why: external_exports.string()
33944
+ }).strict())
33945
+ }).strict();
33946
+ var HANDOUT_REPLY_JSON_SCHEMA2 = (({ $schema: _, ...rest }) => rest)(
33947
+ zodToJsonSchema2(HandoutReplySchema2, { $refStrategy: "none" })
33948
+ );
33650
33949
  function entryWords(entry) {
33651
33950
  const content = entry.content;
33652
33951
  if (content && "sealed" in content) return "";
@@ -33793,7 +34092,7 @@ var NotifyRequestFields2 = external_exports.object({
33793
34092
  * derive agent-side before sealing, so the server only ever shapes plaintext). */
33794
34093
  // 10k, not a sentence budget. What the human hears is bounded by the BROKER — it splits
33795
34094
  // the ask into topics and gives each one at most three sentences and one question
33796
- // (docs/brain/broker/agenda-design.md) — not by a wire cap the agent has to pre-summarize under.
34095
+ // (docs/history/agenda-design.md) — not by a wire cap the agent has to pre-summarize under.
33797
34096
  // Owner, 2026-07-28: "our actual limitation on how long something is to the user should
33798
34097
  // come from the broker splitting and summarizing." The cap that remains is a size guard.
33799
34098
  ask: external_exports.string().min(1).max(1e4).optional().describe(
@@ -33870,7 +34169,7 @@ var UserAnswerSchema2 = external_exports.discriminatedUnion("kind", [
33870
34169
  external_exports.object({ kind: external_exports.literal("clarify"), chunks: external_exports.array(external_exports.string()).min(1) }),
33871
34170
  external_exports.object({ kind: external_exports.literal("confirm"), approved: external_exports.boolean() }),
33872
34171
  external_exports.object({ kind: external_exports.literal("turns"), turns: external_exports.array(TurnSchema2).min(1) }),
33873
- /** An auto-answer derived from the user's PAST decisions (docs/brain/broker/precedent-design.md §2):
34172
+ /** An auto-answer derived from the user's PAST decisions (docs/history/precedent-design.md §2):
33874
34173
  * delivered through the same settle/await path as a human answer, carrying the judge's
33875
34174
  * derivation and the precedent ids it grew from. Always paired with a visible trail
33876
34175
  * card the user can reply to — the broker never overrides the user. */
@@ -34021,6 +34320,21 @@ var AgendaTurnSchema2 = external_exports.object({
34021
34320
  * the phone (`asking`, so the agenda goes gold and its options show) without treating the line as a
34022
34321
  * question turn — the talker owns re-asking and the waits, so `question` stays null. */
34023
34322
  onTable: external_exports.boolean().optional(),
34323
+ /** THE CARRIED ITEM THIS LINE TELLS (Goal 2a1e50eb, owner 2026-10-14: "Build the whole design") — a
34324
+ * request the Call carries that asks NOTHING: a report, a progress note, another agent's waiting news.
34325
+ * Its request Entry id, so the phone can make that agenda row the current one while it is read
34326
+ * (`telling` on the `turn` topic, `docs/clients/app/walk/design.md` §11).
34327
+ *
34328
+ * A FIELD OF ITS OWN, NEVER `claimId`: the claim is the RETURN identity — answers route by it and the
34329
+ * record tags the line with it (`workId`) — and an answer must never route to an Entry that asks
34330
+ * nothing. Absent on a turn speaking for a question (`claimId` says that) and on one speaking for no
34331
+ * carried item at all (an opener, a sign-off, Paigy's own line). */
34332
+ telling: external_exports.string().optional(),
34333
+ /** PAIGY'S OWN LINE (owner, 2026-10-15; calls ed2cbdce, ad50ad25): a turn that speaks for no item -- an
34334
+ * opener, a sign-off, a reply about nothing an agent asked or told -- is recorded as Paigy's, not as the
34335
+ * agent that rang. Absent on every turn that speaks for an item (`agentId` names whose), and on plans
34336
+ * from before it: a bot that does not know it records the ringing agent, as before. */
34337
+ speaksFor: external_exports.literal("paigy").optional(),
34024
34338
  select: SelectShapeSchema2.optional(),
34025
34339
  options: external_exports.array(OptionSchema2.omit({ id: true })).optional(),
34026
34340
  /* `pace` STOOD HERE (#826). A turn could carry seconds and the model chose them. The walk
@@ -34109,7 +34423,7 @@ var InboxItemSchema2 = external_exports.object({
34109
34423
  questions: external_exports.array(CallQuestionSchema2).optional(),
34110
34424
  /** The same call carrying order, including request Entries with no DecisionNeed as reports.
34111
34425
  * Additive: questions stays decision-only for every other surface and older bundles. */
34112
- callItems: external_exports.array(CallQuestionSchema2.extend({ state: external_exports.enum(["open", "answered", "report"]) })).optional(),
34426
+ callItems: external_exports.array(CallQuestionSchema2.extend({ state: external_exports.enum(["open", "answered", "report"]), acknowledged: external_exports.boolean().optional() })).optional(),
34113
34427
  visuals: external_exports.array(VisualSchema2).optional(),
34114
34428
  /** The connected agent's name (the single pairing name — user-typed, or the
34115
34429
  * agent's suggestion, or a default silly name). */
@@ -34129,11 +34443,6 @@ var InboxItemSchema2 = external_exports.object({
34129
34443
  * the agent (provider-agnostic; set server-side). Absent = no hard error. Drives the inbox
34130
34444
  * error badge + Retry. */
34131
34445
  error: external_exports.string().optional(),
34132
- /** WHEN THIS AGENT WORK WENT QUIET (turn="agent"), by the one rule (`coldSince`: three days
34133
- * with nothing said), or absent while it is not stalled. The inbox's stalled badge reads
34134
- * this and nothing else (2026-09-23: a 3-minute age rule badged every live Goal stalled,
34135
- * and "dismiss the stalled ones" cancelled 37 pieces of live work). */
34136
- cold: external_exports.string().datetime().optional(),
34137
34446
  clarifies: external_exports.string().optional(),
34138
34447
  /** THIS CARD'S QUESTION IS ON A LIVE CALL (owner, 2026-09-24: "Mark it while the call is
34139
34448
  * live"). Present only while an open Call Delivery carries the card's request Entry — read
@@ -34171,9 +34480,35 @@ var InboxItemSchema2 = external_exports.object({
34171
34480
  "Labels for a select:'confirm' paige \u2014 'yesno' (Yes/No) or 'approve' (Approve/Deny). Ignored unless select is 'confirm'."
34172
34481
  ),
34173
34482
  /** Real downstream work is stuck behind this one — set by the agent, independent of
34174
- * urgency (see the main README's "premier use case" + docs/delivery/notify/states.md). Drives the
34483
+ * urgency (see the main README's "premier use case" + docs/history/notify-states.md). Drives the
34175
34484
  * inbox's blocking badge and the extra confirm step before dismissing it. */
34176
34485
  blocking: external_exports.boolean().default(false),
34486
+ /** WHAT FREED THIS QUESTION (owner, 2026-10-16, Goal 2383ef14: "we don't really show the question
34487
+ * at the top until the question it could reply to with is resolved. And then we show it again
34488
+ * with the context of the other thing that was resolved"; asked how it should carry that, "The
34489
+ * answer above it"). A question they answered with a question of their own waits for theirs
34490
+ * (`private.ask_back`) and drops out of the front while it waits; when it comes back, the card
34491
+ * draws their question and the answer it got ABOVE the ask, as one card. Absent on a question
34492
+ * nothing ever held back. */
34493
+ freedBy: external_exports.object({
34494
+ questionId: external_exports.string(),
34495
+ asked: external_exports.string(),
34496
+ answer: external_exports.string(),
34497
+ answeredAt: external_exports.string(),
34498
+ /** The answer in ten words, when the talker wrote one beside it. */
34499
+ summary: external_exports.string().optional()
34500
+ }).optional(),
34501
+ /** WHAT THIS CARD ANSWERS (owner, 2026-10-27, Goal 81b6a9d6: "this reads very clearly as an answer to
34502
+ * something I asked, but I don't see the question… To show the question near the top of the card").
34503
+ * An agent's card that is its answer to one of the person's own questions carries that question's
34504
+ * words, drawn above it as "You asked" (`public.questions_answered_by`, read beside the card read).
34505
+ * Absent on every card that answers nothing of theirs, and on a held question, which has `freedBy`. */
34506
+ answering: external_exports.object({ asked: external_exports.string() }).optional(),
34507
+ /** WHEN ITS AGENT LAST BUMPED THIS QUESTION (#2855, `contact`'s `bumpQuestionIds`): the agent asked
34508
+ * the person to notice it again, and For you puts it first, the latest bump on top
34509
+ * (`question/order.ts`). Absent on a question never bumped, and on every card from an API older
34510
+ * than the bump. */
34511
+ bumpedAt: external_exports.string().optional(),
34177
34512
  /** The user's locked-in answer; present only for replied items (GET /api/replied/:id). */
34178
34513
  answer: UserAnswerSchema2.optional(),
34179
34514
  /** THE TARGET FACTS A CARD RENDERS (#1796 point 5, 2026-09-11): the Delivery it is a view of,
@@ -34200,7 +34535,7 @@ var InboxItemSchema2 = external_exports.object({
34200
34535
  *
34201
34536
  * THE PAYLOAD'S OWN HASH, NEVER A STAMP ON THE WORK — the same mechanism as `QueueItem.rev`
34202
34537
  * (#2928) and an entry's (#3018), for the same reason: a card shows facts no `updated_at` of its
34203
- * own moves (its Goal's state and name, how cold the work behind it has gone, whether a ring is
34538
+ * own moves (its Goal's state and name, whether a ring is
34204
34539
  * live). Optional, so a fixture, the demo and the archive lens need not spell one, and a card
34205
34540
  * with no rev is simply always re-sent. */
34206
34541
  rev: external_exports.string().optional()
@@ -34235,6 +34570,7 @@ var MissedCallSchema2 = external_exports.enum([
34235
34570
  ]);
34236
34571
  var clock2 = (h) => h === 0 ? "midnight" : h === 12 ? "noon" : h < 12 ? `${h} am` : `${h - 12} pm`;
34237
34572
  var QUIET2 = ` Nothing rings from ${clock2(NIGHT2.from)} to ${clock2(NIGHT2.to)} your time; the count waits for morning.`;
34573
+ var THEIR_QUIET2 = ` Nothing rings from ${clock2(NIGHT2.from)} to ${clock2(NIGHT2.to)} their time; the count waits for morning.`;
34238
34574
  var BrokerTuningSchema2 = external_exports.object({
34239
34575
  /** 'none' = skip the spoken ack after a mapped answer (power users find it slow). */
34240
34576
  ackVerbosity: external_exports.enum(["normal", "none"]).optional(),
@@ -34277,12 +34613,9 @@ var UserSettingsSchema2 = external_exports.object({
34277
34613
  * must not silently reset this privacy choice. Absent = leave unchanged on
34278
34614
  * write, 'hosted' on read (see store.ts). */
34279
34615
  voiceMode: external_exports.enum(["hosted", "on_device"]).optional(),
34280
- /** Talk — after you answer, the next step is read aloud (docs/clients/app/walk/design.md §6). ALWAYS ON until
34281
- * turned off (owner, 2026-09-18, #2249): a setting, not a per-walk toggle. Optional, NOT
34282
- * defaulted, for the same reason `voiceMode` is: a stale client PATCHing the full settings
34283
- * object must not silently turn it back on. Absent = leave unchanged on write, true on
34284
- * read (see store.ts). */
34285
- talk: external_exports.boolean().optional(),
34616
+ /** `talk` lived here until #2373: it gated auto-play, which went in #2374. An older bundle's
34617
+ * `talk` is stripped like `silentPush` was; the `user_settings.talk` column outlives it until
34618
+ * its own drop migration (#2373, step two). */
34286
34619
  /** CALL DIAGNOSTICS (owner, 2026-10-01): the call report carries each listen and the bot's own
34287
34620
  * load timings. SERVER-SET, no UI — on for every account that existed on 2026-10-01, off for
34288
34621
  * newer ones (migration 20261001132859). Read-only here: the settings PATCH never writes it. */
@@ -34359,7 +34692,8 @@ var ConnectionSummarySchema2 = external_exports.object({
34359
34692
  kind: external_exports.enum(["device", "agent"]).optional(),
34360
34693
  /** For an agent, the token id of the DEVICE that minted it — so agents group under their
34361
34694
  * machine, and revoking a device cascades to them. Null on devices, and on unlinked
34362
- * agents (phone-launched, provider-managed, or minted before the link existed). */
34695
+ * agents (provider-managed, hatched by another agent, or minted before the link existed);
34696
+ * a phone-launched agent is linked to the computer it runs on since #1602. */
34363
34697
  mintedByDevice: external_exports.string().nullable().optional(),
34364
34698
  device: external_exports.string().nullable(),
34365
34699
  /** The agent's display name (the single pairing name). */
@@ -34373,7 +34707,7 @@ var ConnectionSummarySchema2 = external_exports.object({
34373
34707
  * user on the agent's own page. null = no ceiling (today's behaviour for every
34374
34708
  * connection). Android binds importance to a relationship rather than to each message,
34375
34709
  * and that is the thing our roster could not say: "Marlow may always call me; Otto
34376
- * never may" (docs/clients/app/party/navigation-design.md, gap 2). Clamped in `arbitrateLevel`, so it binds
34710
+ * never may" (docs/history/party-navigation-design.md, gap 2). Clamped in `arbitrateLevel`, so it binds
34377
34711
  * every surface at once and outranks even `sessionMode: all_calls` — a mode the user
34378
34712
  * set once must not overrule a rule they set about one agent. */
34379
34713
  reach: NotifyLevelSchema2.nullable().optional(),
@@ -34532,12 +34866,14 @@ var QueueItemSchema2 = external_exports.object({
34532
34866
  /** Its questions: every OPEN one, and at most ten settled, newest settled first
34533
34867
  * (20260929133308) — the page decides which of them to show. NOT the whole set: `asked` and
34534
34868
  * `answered` are, and a settled one's words are a line (280 characters), its body read when the
34535
- * question is opened. */
34869
+ * question is opened. Never a CANCELLED one (withdrawn, dismissed, or its Goal or call ended): it
34870
+ * asks nothing of anyone (#3723). */
34536
34871
  questions: external_exports.array(QueueQuestionSchema2).default([]),
34537
34872
  /** HOW MANY QUESTIONS THIS WORK HAS ASKED, and how many are answered — the Goal's own totals,
34538
34873
  * bounded at 100 server-side. A tally counted off `questions` is a wrong number that looks
34539
34874
  * right once the cap bites (`walk/trees.ts` `tallyOf`). Optional, and defaulted from the array
34540
- * by the projection, so hand-built queues (fixtures, the demo) need not spell them. */
34875
+ * by the projection, so hand-built queues (fixtures, the demo) need not spell them. A cancelled
34876
+ * question is not asked (#3725). */
34541
34877
  asked: external_exports.number().optional(),
34542
34878
  answered: external_exports.number().optional(),
34543
34879
  /** Every note on it the person replied to (`QueueReplySchema`) — the page decides which to show.
@@ -34552,6 +34888,10 @@ var QueueItemSchema2 = external_exports.object({
34552
34888
  * as progress). `updatedAt` moves for reasons nobody chose — a
34553
34889
  * state recomputed, a review flag — so it cannot tell work in hand from work gone quiet. */
34554
34890
  lastProgressAt: external_exports.string().nullable().optional(),
34891
+ /** WHEN AN AGENT LAST ACTED ON IT (owner, 2026-10-27: "Move it now", Goal 567258dc): its newest agent write, an
34892
+ * Entry or a Goal change, Paigy's excluded (`goals.worked_at`). What keeps work an agent is writing on from
34893
+ * reading as gone quiet (`coldSince`); absent on a door that does not carry it. */
34894
+ workedAt: external_exports.string().nullable().optional(),
34555
34895
  /** THE GOAL'S NEWEST WORD, FROM EITHER SIDE (owner, 2026-09-27): the newest Entry on it, of any
34556
34896
  * kind — what the person added ("Add to this"), their reply, the agent's ask or its progress
34557
34897
  * note. A progress note is an Entry, so this is already the newer of the two: the person's note
@@ -34796,9 +35136,6 @@ var AgentRowSchema2 = ComputerRowSchema2.extend({
34796
35136
  * (`agent_holds`); null when that read failed. */
34797
35137
  holds: external_exports.array(external_exports.object({ id: external_exports.string(), title: external_exports.string() })).nullable(),
34798
35138
  held: external_exports.number().int().nullable(),
34799
- /** The earliest instant any Goal it holds went quiet, by the one rule (`coldSince`); null
34800
- * while none has, or when that read failed. */
34801
- cold: external_exports.string().datetime().nullable(),
34802
35139
  /** The newest line of its working log, and when the harness saw it. */
34803
35140
  line: external_exports.string().nullable(),
34804
35141
  lineAt: external_exports.string().datetime().nullable()
@@ -34842,6 +35179,11 @@ var CallRecapSchema2 = external_exports.object({
34842
35179
  durationMs: external_exports.number().nullable(),
34843
35180
  /** Bot-clock pickup offset; absent before the timestamp release, null before its report lands. */
34844
35181
  pickupMs: external_exports.number().nullable().optional(),
35182
+ /** STILL FILING (20261026182117): the call has not ended on the server, or it has and a brain cycle on it is
35183
+ * still pending, the next writer, which may still settle, file or start something. What the close itself
35184
+ * waits for (`private.close_call`). `status` cannot say it: nothing writes "finalizing", and a call reads
35185
+ * "open" until the sweep closes it, after nothing is pending. Absent from an API before it. */
35186
+ filing: external_exports.boolean().optional(),
34845
35187
  agents: external_exports.array(external_exports.object({ id: external_exports.string(), name: external_exports.string().nullable() }))
34846
35188
  }),
34847
35189
  topics: external_exports.array(external_exports.object({
@@ -34850,7 +35192,7 @@ var CallRecapSchema2 = external_exports.object({
34850
35192
  owner: external_exports.string(),
34851
35193
  state: external_exports.string(),
34852
35194
  /** Presented Entry content and its author, separately from the current Goal owner. */
34853
- items: external_exports.array(external_exports.object({ entryId: external_exports.string(), author: external_exports.string(), text: external_exports.string(), summary: external_exports.string().nullable() })).optional(),
35195
+ items: external_exports.array(external_exports.object({ entryId: external_exports.string(), author: external_exports.string(), text: external_exports.string(), summary: external_exports.string().nullable(), acknowledged: external_exports.boolean().optional() })).optional(),
34854
35196
  /** Whether the call put it to the person. An item it carried and never said has no row on the
34855
35197
  * review (owner, 2026-10-08: "why do we get the third one when it didn't happen in the call?"). */
34856
35198
  presented: external_exports.boolean(),
@@ -34896,9 +35238,65 @@ var CallRecapSchema2 = external_exports.object({
34896
35238
  words: external_exports.string(),
34897
35239
  atMs: external_exports.number()
34898
35240
  })),
34899
- more: external_exports.object({ lines: external_exports.number(), entries: external_exports.number(), topics: external_exports.number() }),
35241
+ /** What did not fit, counted. `settles` counts items past the recap's 100; absent before 20261026165518. */
35242
+ more: external_exports.object({ lines: external_exports.number(), entries: external_exports.number(), topics: external_exports.number(), settles: external_exports.number().optional() }),
34900
35243
  /** Last stored position on this page when another exists; absent before paging shipped. */
34901
- next: external_exports.number().int().nonnegative().nullable().optional()
35244
+ next: external_exports.number().int().nonnegative().nullable().optional(),
35245
+ /** THE CALL AS ONE LIST OF ROWS (owner, 2026-10-14: "we only really want a thing like transcript but
35246
+ * built from the summaries", then "the transcript tabs should show the same but with full words").
35247
+ * Both tabs draw these rows, in this order: Summary from `summary`, Transcript from `words`.
35248
+ * - `put`: an item put to the person, at the first agent line that voiced it. Paigy's sentences
35249
+ * that voiced it are folded into `spoken`, never rows of their own.
35250
+ * - `said`: the person's words, one row per reply or per filed line no reply covers.
35251
+ * - `did`: what Paigy did ("Sent to Mouth: …", "Recorded: …", "Filed on …").
35252
+ * `by` is the row's real author, never inferred from `kind`: a relay Paigy sent to an agent is
35253
+ * Paigy's, not the person's. Optional and additive (owner: "make sure whatever you do is backward
35254
+ * compatible"): an API before it sends none, and the screen falls back to `topics` and `said`. */
35255
+ timeline: external_exports.array(external_exports.object({
35256
+ id: external_exports.string(),
35257
+ position: external_exports.number(),
35258
+ atMs: external_exports.number(),
35259
+ kind: external_exports.enum(["put", "said", "did"]),
35260
+ by: external_exports.object({ participant: external_exports.string().nullable(), agentId: external_exports.string().nullable(), name: external_exports.string().nullable() }),
35261
+ goalId: external_exports.string().uuid().nullable(),
35262
+ requestId: external_exports.string().nullable(),
35263
+ summary: external_exports.string().nullable(),
35264
+ words: external_exports.string(),
35265
+ /** Paigy's sentences folded into this row: on a `put` row, what it said putting the item to the
35266
+ * person (before their next row); on a `said` row, what it said in reply (until their next row).
35267
+ * `atMs` is when each was said; optional, absent before 2026-10-14's fix. */
35268
+ spoken: external_exports.array(external_exports.object({ lineId: external_exports.string(), words: external_exports.string(), atMs: external_exports.number().optional() })),
35269
+ /** On a `said` row: the work these words were filed on, and whether they answered (recorded) a
35270
+ * question. They replace the "Filed on ..." and "Recorded: ..." rows that repeated the person's own
35271
+ * summary (Brain, 2026-10-14). Optional: absent from an API before it. */
35272
+ filedOn: external_exports.array(external_exports.object({ goalId: external_exports.string().uuid(), title: external_exports.string() })).optional(),
35273
+ recorded: external_exports.boolean().optional(),
35274
+ settled: external_exports.object({ requestId: external_exports.string(), answer: external_exports.string() }).nullable().optional(),
35275
+ acknowledged: external_exports.boolean().optional(),
35276
+ /** On a `put` row: still waiting for the person's answer (not settled, not answered, not put off).
35277
+ * The server's judgement; the screen draws "Still waiting for your answer" from it. Optional: absent
35278
+ * from an API before it, where the screen falls back to its own reading. */
35279
+ waiting: external_exports.boolean().optional(),
35280
+ lineIds: external_exports.array(external_exports.string())
35281
+ })).optional(),
35282
+ /** THE RECAP (owner, 2026-10-26: "the transcript should just be the entries that settled or
35283
+ * acknowledged the items; that's it"). Each item the person's words settled on this call, in the
35284
+ * order they said them: who asked it (`by`), the item in its agent's words (`title`), and only the
35285
+ * words of theirs that settled it (`lines`: each line once, verbatim, with when it was said on the
35286
+ * bot clock like `said[].atMs`). Built from their replies, not from what the call put, so an item
35287
+ * settled without being put is still here. Beside them (owner: "List them too, with the words that
35288
+ * said them"), each Goal his words told something (`kind` "told") or the call started ("started"),
35289
+ * with `requestId` null and the Goal's name as `title`; a started Goal may have no `lines` yet. `kind`
35290
+ * is a string, not an enum, so a later kind never fails an older build's parse; `requestId` is the
35291
+ * request the words settled. On the first page only; absent from an API before it. */
35292
+ settles: external_exports.array(external_exports.object({
35293
+ requestId: external_exports.string().nullable(),
35294
+ kind: external_exports.string(),
35295
+ by: external_exports.object({ participant: external_exports.string(), agentId: external_exports.string().nullable(), name: external_exports.string() }),
35296
+ goalId: external_exports.string().uuid().nullable(),
35297
+ title: external_exports.string(),
35298
+ lines: external_exports.array(external_exports.object({ lineId: external_exports.string(), words: external_exports.string(), atMs: external_exports.number() }))
35299
+ })).optional()
34902
35300
  });
34903
35301
 
34904
35302
  // src/paigy/activity.ts
@@ -36185,6 +36583,11 @@ function wakeHarness(slot, saved, claudeTranscript) {
36185
36583
  if (slot === "antigravity") return "agy";
36186
36584
  return void 0;
36187
36585
  }
36586
+ function claudeOnFolderSession(harness, slot, sessionId2) {
36587
+ if (harness !== "claude") return null;
36588
+ const folder = sessionId2?.startsWith("cwd-") ? sessionId2 : slot.startsWith("session:cwd-") ? slot.slice("session:".length) : null;
36589
+ return folder ? `is recorded as claude but its session (${folder.slice(0, 12)}) is a folder's, which only Codex or Antigravity mint \u2014 not waking it as claude; correct its runtime` : null;
36590
+ }
36188
36591
  var runKey = (slot) => `slot:${slot}`;
36189
36592
  var claimedRun = (sessionId2) => {
36190
36593
  const slot = sessionSlot(sessionId2);
@@ -36484,6 +36887,11 @@ function startHost(opts) {
36484
36887
  skip("has no recorded harness; select its runtime before recovery");
36485
36888
  return;
36486
36889
  }
36890
+ const mislabelled = claudeOnFolderSession(harness, slot, identity.sessionId);
36891
+ if (mislabelled) {
36892
+ skip(mislabelled);
36893
+ return;
36894
+ }
36487
36895
  if (owner && !allowed(owner.cwd, opts.wsDeps)) {
36488
36896
  skip(`ran in ${owner.cwd}, outside the folders this machine granted`);
36489
36897
  return;
@@ -36735,7 +37143,7 @@ var STATUS_MARK = { ready: "\u2713", login: "\u25D0", "adapter-missing": "\u25D0
36735
37143
  function printConnectLines(link, userCode, enter) {
36736
37144
  console.log("Connect this computer from your phone");
36737
37145
  console.log(` Open ${link}${enter ? " (press Enter to open it here)" : ""}`);
36738
- console.log(` or scan the QR above \xB7 or type ${userCode} in Paigy \u2192 Devices \u2192 Connect a computer`);
37146
+ console.log(` or scan the QR above \xB7 or type ${userCode} in Paigy \u2192 You \u203A Computers \u2192 Connect a computer`);
36739
37147
  }
36740
37148
  async function pairThisMachine() {
36741
37149
  const host = hostname().replace(/\.local$/, "");
@@ -37008,9 +37416,11 @@ async function main() {
37008
37416
  }
37009
37417
  let launched;
37010
37418
  if (parsed.launch) {
37419
+ const parent = slotName(agentName());
37420
+ const name = lineageName(parent, parsed.launch);
37011
37421
  overrideToken(readSlot("Desktop") || null);
37012
37422
  const session = randomUUID5();
37013
- const minted = await hatch(parsed.launch, parsed.voice ?? null, {
37423
+ const minted = await hatch(name, parsed.voice ?? null, {
37014
37424
  reach: reachAs(session),
37015
37425
  brief: parsed.prompt,
37016
37426
  ...parsed.under ? { parentGoalId: parsed.under } : {}
@@ -37019,7 +37429,7 @@ async function main() {
37019
37429
  process.exit(1);
37020
37430
  }).finally(() => overrideToken(null));
37021
37431
  launched = { token: minted.token, session, ...minted.goalId ? { goalId: minted.goalId } : {} };
37022
- console.log(`\u2713 launched "${minted.name ?? parsed.launch}"${minted.name ? "" : " (unnamed: you already have an agent with that name)"}, on its own session; its Goal is ${minted.goalId ?? "missing"}`);
37432
+ console.log(`\u2713 launched "${minted.name ?? name}"${minted.name ? "" : " (unnamed: you already have an agent with that name)"}, on its own session; its Goal is ${minted.goalId ?? "missing"}`);
37023
37433
  }
37024
37434
  const askTerminal = async (promptText) => {
37025
37435
  if (parsed.graceSeconds <= 0 || !process.stdin.isTTY) return null;