@paigy/harness 0.3.36 → 0.3.37

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 (3) hide show
  1. package/dist/cli.js +179 -51
  2. package/dist/main.js +174 -50
  3. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -24254,7 +24254,7 @@ ${block2}`;
24254
24254
  }
24255
24255
  return text.slice(0, start) + updated + text.slice(end);
24256
24256
  }
24257
- var import_undici, require2, CODEX_ENV, BACKEND_URL, NETWORK_MSG, PROXY_ENV, agent, INSTANCE_ID, WORKSPACE_ID, envSession, lineage, CLIENT, ignoreOverride, defaultOptions, getDefaultOptions, getRefs, getRelativePath, parseCatchDef, integerDateParser, isJsonSchema7AllOfType, emojiRegex2, zodPatterns, ALPHA_NUMERIC, primitiveMappings, asAnyOf, parseOptionalDef, parsePipelineDef, parseReadonlyDef, selectParser, get$ref, addMeta, zodToJsonSchema, OPTIONS_MIN, OPTIONS_MAX, OptionSchema, OptionInputSchema, NIGHT, ASK_MAX, UNITS_MAX, UNIT_TITLE_MAX, UNIT_BODY_MAX, UnitInputSchema, questionHandle, NodeRef, BlockedAction, reason, actionFits, ACTION_FITS, userExplicitlyRequested, units, UpdateInputSchema, questionFields, refineQuestion, QuestionInputSchema, QuestionWireSchema, AnswerInputSchema, QuestionDependencySchema, sendFields, ContactSchema, sendsAnything, ContactWireSchema, CONTACT_SCHEMA, CONTACT_DESCRIPTION, CreateGoalSchema, UpdateGoalSchema, changedGoal, goalTitle, goalOutcome, CreateChange, EditChange, StateChange, AssignChange, DeferChange, MoveChange, DependencyChange, read, GoalChangeSchema, editNames, ManageGoalsSchema, ManageGoalsToolSchema, MANAGE_GOALS_DESCRIPTION, GetGoalSchema, GET_GOAL_DESCRIPTION, SearchToolSchema, SEARCH_DESCRIPTION, CheckActivitySchema, FEEDBACK_TEXT_MAX, SendFeedbackSchema, SEND_FEEDBACK_DESCRIPTION, AGENT_TOOLS, AGENT_TOOL_NAMES, id, key, participant, SourceSchema, ResultRefSchema, NodeRefSchema, DependencySchema, goalState, existingGoalChanges, BrainGoalChangeSchema, option, QuestionChangeSchema, lessonScope, LessonChangeSchema, BrainNextSchema, messageBase, BrainMessageSchema, BrainSearchSchema, BrainResultSchema, str, strs, CompactResultSchema, COMPACT_RESULT_JSON_SCHEMA, str2, strs2, TalkerReplySchema, TALKER_REPLY_JSON_SCHEMA, str3, strs3, FilerReplySchema, FILER_REPLY_JSON_SCHEMA, LIVE_MS, WORKING_MS, ContextSchema, ParticipantSchema, TransformSchema, VisualSchema, NotifyLevelSchema, SelectShapeSchema, ReceiptEventSchema, AttentionSchema, NotifyRequestFields, NotifyRequestSchema, NotifyStatusSchema, AgentStateSchema, TurnSchema, UserAnswerSchema, IntentSchema, RideAlongSchema, AwaitItemSchema, VoiceKeySchema, AgendaTurnSchema, CLAIM_STALE_MS, InboxItemSchema, APNS_TOKEN_RE, PushTokenSchema, MissedCallSchema, clock, QUIET, BrokerTuningSchema, UserSettingsSchema, HistoryWorkSchema, HistoryEntrySchema, HistoryPageSchema, ACTIVITY_LINES, ACTIVITY_LINE_MAX, AgentActivitySchema, ConnectionSummarySchema, LedgerItemSchema, AgentLedgerSchema, ReassignResultSchema, LessonStateSchema, LessonViewSchema, QueueQuestionSchema, QueueReplySchema, QueueItemSchema, QueueDeltaSchema, COLD_AFTER_MS, NoteSourceSchema, NoteStatusSchema, NoteRepeatSchema, DecisionSchema, NoteSchema, TriageItemSchema, TriageAssignmentSchema, TriageStatusSchema, SubmitTriageSchema, TriageProposalSchema, AcceptTriageSchema, AcceptTriageResultSchema, DeliveryModeSchema, WAKE_EVENT, wakeChannel, RegisterDeliverySchema, OAuthStartSchema, DeliveryConfigSchema, HostDecisionSchema, WakeNudgeSchema, PairingStatusSchema, DeviceCodeSchema, DeviceInfoSchema, DeviceTokenSchema, SupportRequestSchema, NotificationFeedbackKindSchema, SlimOptionSchema, QuestionRowSchema, WorkStateSchema, WorkRowSchema, ComputerRowSchema, AgentRowSchema, SnapshotSchema, CallRecapSchema, TOKEN_PATH, KEY_PATH, sleep, UnpairedError, RevokedError, ApiError, tokenOverride, authToken, AWAIT_WINDOW_MS, NOT_SENT, APPLIED, DEMOTED, HEARTBEAT_MS, RETRY_MS, JOIN, JOIN_TIMEOUT_MS, lines;
24257
+ var import_undici, require2, CODEX_ENV, BACKEND_URL, NETWORK_MSG, PROXY_ENV, agent, INSTANCE_ID, WORKSPACE_ID, envSession, lineage, CLIENT, ignoreOverride, defaultOptions, getDefaultOptions, getRefs, getRelativePath, parseCatchDef, integerDateParser, isJsonSchema7AllOfType, emojiRegex2, zodPatterns, ALPHA_NUMERIC, primitiveMappings, asAnyOf, parseOptionalDef, parsePipelineDef, parseReadonlyDef, selectParser, get$ref, addMeta, zodToJsonSchema, OPTIONS_MIN, OPTIONS_MAX, OPTION_LABEL_MAX, OPTION_HINT_MAX, OptionSchema, OptionInputSchema, NIGHT, ASK_MAX, UNITS_MAX, UNIT_TITLE_MAX, UNIT_BODY_MAX, UnitInputSchema, questionHandle, NodeRef, BlockedAction, reason, actionFits, ACTION_FITS, userExplicitlyRequested, units, UpdateInputSchema, questionFields, refineQuestion, QuestionInputSchema, QuestionWireSchema, AnswerInputSchema, QuestionDependencySchema, sendFields, ContactSchema, sendsAnything, ContactWireSchema, CONTACT_SCHEMA, CONTACT_DESCRIPTION, CreateGoalSchema, UpdateGoalSchema, changedGoal, goalTitle, GOAL_OUTCOME_MAX, goalOutcome, CreateChange, EditChange, StateChange, AssignChange, DeferChange, MoveChange, DependencyChange, read, GoalChangeSchema, editNames, ManageGoalsSchema, ManageGoalsToolSchema, MANAGE_GOALS_DESCRIPTION, GetGoalSchema, GET_GOAL_DESCRIPTION, SearchToolSchema, SEARCH_DESCRIPTION, CheckActivitySchema, FEEDBACK_TEXT_MAX, SendFeedbackSchema, SEND_FEEDBACK_DESCRIPTION, AGENT_TOOLS, AGENT_TOOL_NAMES, id, key, participant, SourceSchema, ResultRefSchema, NodeRefSchema, DependencySchema, goalState, existingGoalChanges, BrainGoalChangeSchema, option, QuestionChangeSchema, lessonScope, LessonChangeSchema, BrainNextSchema, messageBase, BrainMessageSchema, BrainSearchSchema, BrainResultSchema, str, strs, CompactResultSchema, COMPACT_RESULT_JSON_SCHEMA, str2, strs2, TalkerReplySchema, TALKER_REPLY_JSON_SCHEMA, str3, strs3, FilerReplySchema, FILER_REPLY_JSON_SCHEMA, ExplainerReplySchema, EXPLAINER_REPLY_JSON_SCHEMA, DISTILLER_DEFECTS, DistillerReplySchema, DISTILLER_REPLY_JSON_SCHEMA, TIDY_AUDIENCES, TidyReplySchema, TIDY_REPLY_JSON_SCHEMA, LIVE_MS, WORKING_MS, ContextSchema, ParticipantSchema, TransformSchema, VisualSchema, NotifyLevelSchema, SelectShapeSchema, ReceiptEventSchema, AttentionSchema, NotifyRequestFields, NotifyRequestSchema, NotifyStatusSchema, AgentStateSchema, TurnSchema, UserAnswerSchema, IntentSchema, RideAlongSchema, AwaitItemSchema, VoiceKeySchema, AgendaTurnSchema, CLAIM_STALE_MS, InboxItemSchema, APNS_TOKEN_RE, PushTokenSchema, MissedCallSchema, clock, QUIET, BrokerTuningSchema, UserSettingsSchema, HistoryWorkSchema, HistoryEntrySchema, HistoryPageSchema, ACTIVITY_LINES, ACTIVITY_LINE_MAX, AgentActivitySchema, ConnectionSummarySchema, LedgerItemSchema, AgentLedgerSchema, ReassignResultSchema, LessonStateSchema, LessonViewSchema, QueueQuestionSchema, QueueReplySchema, QueueItemSchema, QueueDeltaSchema, COLD_AFTER_MS, NoteSourceSchema, NoteStatusSchema, NoteRepeatSchema, DecisionSchema, NoteSchema, TriageItemSchema, TriageAssignmentSchema, TriageStatusSchema, SubmitTriageSchema, TriageProposalSchema, AcceptTriageSchema, AcceptTriageResultSchema, DeliveryModeSchema, WAKE_EVENT, wakeChannel, RegisterDeliverySchema, OAuthStartSchema, DeliveryConfigSchema, HostDecisionSchema, WakeNudgeSchema, PairingStatusSchema, DeviceCodeSchema, DeviceInfoSchema, DeviceTokenSchema, SupportRequestSchema, NotificationFeedbackKindSchema, SlimOptionSchema, QuestionRowSchema, WorkStateSchema, WorkRowSchema, ComputerRowSchema, AgentRowSchema, SnapshotSchema, CallRecapSchema, TOKEN_PATH, KEY_PATH, sleep, UnpairedError, RevokedError, ApiError, tokenOverride, authToken, AWAIT_WINDOW_MS, NOT_SENT, APPLIED, DEMOTED, HEARTBEAT_MS, RETRY_MS, JOIN, JOIN_TIMEOUT_MS, lines;
24258
24258
  var init_dist = __esm({
24259
24259
  "../../packages/sdk/dist/index.js"() {
24260
24260
  "use strict";
@@ -24268,6 +24268,8 @@ var init_dist = __esm({
24268
24268
  init_zod();
24269
24269
  init_zod();
24270
24270
  init_zod();
24271
+ init_zod();
24272
+ init_zod();
24271
24273
  import_undici = __toESM(require_undici(), 1);
24272
24274
  require2 = __sdkCreateRequire(import.meta.url);
24273
24275
  CODEX_ENV = ["CODEX_THREAD_ID", "CODEX_SESSION_ID", "CODEX_HOME", "PAIGY_TOKEN", "PAIGY_SESSION_ID", "PAIGY_HARNESS", "PAIGY_INSTANCE_ID", "PAIGY_ON_WAKE"];
@@ -24649,10 +24651,12 @@ var init_dist = __esm({
24649
24651
  };
24650
24652
  OPTIONS_MIN = 2;
24651
24653
  OPTIONS_MAX = 6;
24654
+ OPTION_LABEL_MAX = 50;
24655
+ OPTION_HINT_MAX = 200;
24652
24656
  OptionSchema = external_exports.object({
24653
24657
  id: external_exports.string(),
24654
24658
  label: external_exports.string(),
24655
- hint: external_exports.string().max(500).describe("Optional short projection of consequence or action if this option is chosen (e.g. 'Reruns test suite', 'Merges to main').").optional(),
24659
+ hint: external_exports.string().max(500).describe(`Optional: what choosing it does, at most ${OPTION_HINT_MAX} characters (e.g. 'Reruns test suite', 'Merges to main').`).optional(),
24656
24660
  // .describe() flows into the MCP contact JSON schema (zodToJsonSchema), so
24657
24661
  // the constraints below are what an agent reads when deciding to use these.
24658
24662
  html: external_exports.string().max(16384).describe(
@@ -24666,8 +24670,10 @@ var init_dist = __esm({
24666
24670
  id: external_exports.string().trim().min(1).max(64).regex(/^[A-Za-z0-9_.:-]+$/).optional().describe(
24667
24671
  `Optional: this option's own id, which answers name it by (selectedOptionIds). Give every option one, or none: without them the options are numbered "1", "2", \u2026 in order.`
24668
24672
  ),
24669
- label: external_exports.string().trim().min(1).max(1e3),
24670
- hint: OptionSchema.shape.hint,
24673
+ // SHORT CHOICES (owner, 2026-10-07: "options label should be maybe max 50 characters and the hint 200"):
24674
+ // a label is one choice the person reads, or hears on a call; a hint says its consequence in a line.
24675
+ label: external_exports.string().trim().min(1).max(OPTION_LABEL_MAX, `option_label_too_long: an option's label is at most ${OPTION_LABEL_MAX} characters; say the choice, and put its consequence in the hint.`).describe(`The choice, at most ${OPTION_LABEL_MAX} characters, standing on its own.`),
24676
+ hint: external_exports.string().max(OPTION_HINT_MAX, `option_hint_too_long: an option's hint is at most ${OPTION_HINT_MAX} characters.`).describe(`Optional: what choosing it does, at most ${OPTION_HINT_MAX} characters (e.g. 'Reruns test suite', 'Merges to main').`).optional(),
24671
24677
  htmlPreview: OptionSchema.shape.html,
24672
24678
  imgUrl: OptionSchema.shape.image
24673
24679
  }).strict();
@@ -24707,7 +24713,7 @@ var init_dist = __esm({
24707
24713
  ),
24708
24714
  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."),
24709
24715
  units,
24710
- options: external_exports.array(OptionInputSchema).min(1).max(6).optional().describe("The choices, when you have them. Each label stands on its own."),
24716
+ 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."),
24711
24717
  // HOW THE OPTIONS ARE ANSWERED, SAID BY THE AGENT (owner, 2026-10-02: "one and many makes sense";
24712
24718
  // brain_prompts.md §1: structured agent questions need no model). The app draws all three.
24713
24719
  pickMode: external_exports.enum(["one", "many", "rank"]).optional().describe(
@@ -24827,7 +24833,8 @@ RECEIVING: a contact that sends nothing returns \`events\`, a limited batch of w
24827
24833
  }).strict();
24828
24834
  changedGoal = external_exports.string().uuid().describe("The Goal to change, as a read shows it.");
24829
24835
  goalTitle = external_exports.string().trim().min(1).max(80).describe("The Goal's short display name: one to five words, how a person refers to it out loud.");
24830
- goalOutcome = external_exports.string().trim().min(1).max(1e4).describe("The full desired result. There is no third description field.");
24836
+ GOAL_OUTCOME_MAX = 500;
24837
+ goalOutcome = external_exports.string().trim().min(1).max(GOAL_OUTCOME_MAX, `outcome_too_long: a Goal's outcome is one paragraph, at most ${GOAL_OUTCOME_MAX} characters; split the rest into child Goals (create with parentGoalId).`).describe(`The desired result, one paragraph of at most ${GOAL_OUTCOME_MAX} characters. More than that is more work: create child Goals under it (parentGoalId). There is no third description field.`);
24831
24838
  CreateChange = external_exports.object({
24832
24839
  kind: external_exports.literal("create"),
24833
24840
  title: goalTitle,
@@ -24853,7 +24860,7 @@ RECEIVING: a contact that sends nothing returns \`events\`, a limited batch of w
24853
24860
  goalId: changedGoal,
24854
24861
  dependsOnGoalId: external_exports.string().uuid().describe("The Goal it waits on."),
24855
24862
  action: external_exports.enum(["start", "complete"]).describe("What waits: starting goalId, or completing it."),
24856
- reason: external_exports.string().trim().min(1).max(2e3).optional().describe("Why, as an explanation, never as policy.")
24863
+ reason: external_exports.string().trim().min(1).max(250).optional().describe("Why, at most 250 characters, as an explanation, never as policy.")
24857
24864
  }).strict();
24858
24865
  read = { revision: external_exports.number().int().positive().optional() };
24859
24866
  GoalChangeSchema = external_exports.discriminatedUnion("kind", [
@@ -24877,7 +24884,7 @@ RECEIVING: a contact that sends nothing returns \`events\`, a limited batch of w
24877
24884
  ManageGoalsToolSchema = external_exports.object({
24878
24885
  changes: external_exports.array(external_exports.discriminatedUnion("kind", [CreateChange, EditChange, StateChange, AssignChange, DeferChange, MoveChange, DependencyChange])).min(1).max(50).describe("The changes, applied in order, each on its own.")
24879
24886
  }).strict().superRefine((v, ctx) => editNames(v.changes, ctx));
24880
- MANAGE_GOALS_DESCRIPTION = "Create, edit, assign, organize or close work. Every change here changes Goals; answering, withdrawing or asking Questions stays in contact. Each change applies independently: a refused one names why (`results[i].error`, e.g. goal_revision_conflict, goal_children_open, goal_not_found) and the rest still apply, so read every result: a partial result is never a complete success. Kinds: create (title, outcome, ownerId, parentGoalId, sourceEntryIds) returns the new Goal's id in `results[i].goalId`, in the order requested, to use in later calls; edit (title and/or outcome); state (open, completed, canceled); assign (ownerId); defer (until: the Goal waits until then and its owner is woken when it passes; null takes it back); move (parentGoalId, or null for a root: only this Goal moves); dependency (add or remove: goalId waits on dependsOnGoalId to start or to complete). A Goal cannot be completed while its required children or dependencies remain open: finish or move them first. Finishing the children does not prove the parent's own work is done. An edit applies at the version you last read: if someone changed the Goal since, it is refused as goal_revision_conflict, so read it again (get_goal) and reconsider. You may change any Goal of your person; a change puts you on it. Returns `ok` (every change applied), `results` per change (applied or failed), and `goals`, each changed Goal's id, state, title, outcome and revision.";
24887
+ MANAGE_GOALS_DESCRIPTION = "Create, edit, assign, organize or close work. Every change here changes Goals; answering, withdrawing or asking Questions stays in contact. Each change applies independently: a refused one names why (`results[i].error`, e.g. goal_revision_conflict, goal_children_open, goal_not_found) and the rest still apply, so read every result: a partial result is never a complete success. Kinds: create (title, outcome, ownerId, parentGoalId, sourceEntryIds) returns the new Goal's id in `results[i].goalId`, in the order requested, to use in later calls (an outcome is one paragraph, at most 500 characters: split more into child Goals with parentGoalId); edit (title and/or outcome); state (open, completed, canceled); assign (ownerId); defer (until: the Goal waits until then and its owner is woken when it passes; null takes it back); move (parentGoalId, or null for a root: only this Goal moves); dependency (add or remove: goalId waits on dependsOnGoalId to start or to complete). A Goal cannot be completed while its required children or dependencies remain open: finish or move them first. Finishing the children does not prove the parent's own work is done. An edit applies at the version you last read: if someone changed the Goal since, it is refused as goal_revision_conflict, so read it again (get_goal) and reconsider. You may change any Goal of your person; a change puts you on it. Returns `ok` (every change applied), `results` per change (applied or failed), and `goals`, each changed Goal's id, state, title, outcome and revision.";
24881
24888
  GetGoalSchema = external_exports.object({
24882
24889
  goalId: external_exports.string().uuid(),
24883
24890
  /** Every entry in full. Without it the read carries the person's words, open questions and your
@@ -24895,7 +24902,7 @@ RECEIVING: a contact that sends nothing returns \`events\`, a limited batch of w
24895
24902
  goalId: external_exports.string().uuid().optional(),
24896
24903
  limit: external_exports.number().int().min(1).max(20).optional()
24897
24904
  }).strict();
24898
- SEARCH_DESCRIPTION = "Search your person's history across all of their agents: Entries (what anyone said or wrote, typed or spoken on a call), Goals (by title and outcome) and Answers (found by their Question or by the words that gave them). query is words to look for; records sharing more of its words rank first, and exact names work. types narrows it to entry, goal and/or answer (default: all three). goalId searches under one Goal: its Entries, its Questions' Answers, and it and its immediate children. limit is matches per type, 1 to 20 (default 8). Read-only. Each match carries its whole saved words, its ID and its links (an Answer carries its Question, the choice made and the Entries that support it); `omitted` counts what matched but was left out, so narrow the words or add a goalId to see it. Nothing found is not proof that nothing exists; a refused search says why. Sealed (encrypted) content is never searched or returned.";
24905
+ SEARCH_DESCRIPTION = "Search your person's history across all of their agents: Entries (what anyone said or wrote, typed or spoken on a call), Goals (by title and outcome) and replies -- the person's answers, acknowledgements and deferrals (type answer; found by their summary, by the question or report they reply to, or by the words that gave them). query is words to look for; records sharing more of its words rank first, and exact names work. types narrows it to entry, goal and/or answer (default: all three). goalId searches under one Goal: its Entries, the replies to its items, and it and its immediate children. limit is matches per type, 1 to 20 (default 8). Read-only. Each match carries its whole saved words, its ID and its links (a reply carries its kind -- answered, acknowledged or deferred -- whether it is closed (a deferral is not), its summary in under ten words, its question or report, the choice made and the Entries that support it); `omitted` counts what matched but was left out, so narrow the words or add a goalId to see it. Nothing found is not proof that nothing exists; a refused search says why. Sealed (encrypted) content is never searched or returned.";
24899
24906
  CheckActivitySchema = external_exports.object({}).strict();
24900
24907
  FEEDBACK_TEXT_MAX = 5e4;
24901
24908
  SendFeedbackSchema = external_exports.object({
@@ -24958,6 +24965,7 @@ RECEIVING: a contact that sends nothing returns \`events\`, a limited batch of w
24958
24965
  external_exports.object({
24959
24966
  kind: external_exports.literal("create"),
24960
24967
  text: external_exports.string().min(1),
24968
+ summary: external_exports.string().optional(),
24961
24969
  answererId: participant,
24962
24970
  goal: ResultRefSchema.optional(),
24963
24971
  blocks: external_exports.array(external_exports.object({ question: ResultRefSchema }).strict()),
@@ -25008,12 +25016,12 @@ RECEIVING: a contact that sends nothing returns \`events\`, a limited batch of w
25008
25016
  }).strict();
25009
25017
  BrainResultSchema = external_exports.object({
25010
25018
  messages: external_exports.array(BrainMessageSchema),
25011
- entries: external_exports.array(external_exports.object({ key, sources: external_exports.array(SourceSchema).min(1), goals: external_exports.array(ResultRefSchema) }).strict()),
25019
+ entries: external_exports.array(external_exports.object({ key, sources: external_exports.array(SourceSchema).min(1), goals: external_exports.array(ResultRefSchema), summary: external_exports.string().optional() }).strict()),
25012
25020
  questions: external_exports.array(external_exports.object({ key, entryKeys: external_exports.array(key), change: QuestionChangeSchema }).strict()),
25013
25021
  answers: external_exports.array(external_exports.object({
25014
25022
  question: ResultRefSchema,
25015
25023
  entryKeys: external_exports.array(key).min(1),
25016
- summary: external_exports.string().min(1),
25024
+ summary: external_exports.string(),
25017
25025
  selectedOptionIds: external_exports.array(external_exports.string().min(1)).optional()
25018
25026
  }).strict()),
25019
25027
  goals: external_exports.array(external_exports.object({ key, entryKeys: external_exports.array(key), change: BrainGoalChangeSchema }).strict()),
@@ -25058,12 +25066,15 @@ RECEIVING: a contact that sends nothing returns \`events\`, a limited batch of w
25058
25066
  messages: external_exports.array(external_exports.object({ key: str2, to: str2, text: str2, about: strs2, blocks: str2 }).strict()),
25059
25067
  /** What the call does next: listen, hold (the person asked for a moment) or end (they asked to). */
25060
25068
  then: external_exports.enum(["listen", "hold", "end"]),
25061
- /** Items the person's words settle: the item's handle, the chosen option IDs, the line handles. */
25062
- answers: external_exports.array(external_exports.object({ item: str2, options: strs2, lines: strs2 }).strict()),
25063
- /** The line handles that hold a new instruction from the person. */
25069
+ /** The person's replies to items (replies, owner 2026-10-07): the item's handle, the chosen option
25070
+ * IDs, the line handles, how they replied in under ten words (keeping any condition), and `defer`:
25071
+ * "" when their words settle the item, else what a reply that puts it off waits for -- "call" (the
25072
+ * end of this call), a question's handle (that question's answer) or an ISO time. */
25073
+ replies: external_exports.array(external_exports.object({ item: str2, options: strs2, lines: strs2, summary: str2, defer: str2 }).strict()),
25074
+ /** The line handles that tell the talker how to run this call; they last until it ends and reach no agent. */
25064
25075
  instruction: strs2,
25065
- /** The line handles that ask for new work, a change to existing work, or a standing rule: the filer
25066
- * reads only these (3e). */
25076
+ /** The line handles the filer acts on, and the only ones it reads (3e): new work, a change to existing
25077
+ * work, feedback on Paigy, anything said to an agent, and any rule meant to outlast the call. */
25067
25078
  file: strs2,
25068
25079
  /** Evidence to fetch for a second round: a search, an item's full text, or an agent by name. */
25069
25080
  need: external_exports.object({ kind: external_exports.enum(["search", "item", "agent", ""]), text: str2 }).strict(),
@@ -25076,8 +25087,9 @@ RECEIVING: a contact that sends nothing returns \`events\`, a limited batch of w
25076
25087
  str3 = external_exports.string();
25077
25088
  strs3 = external_exports.array(external_exports.string());
25078
25089
  FilerReplySchema = external_exports.object({
25079
- /** Which Goals each new line goes on: a line's handle and Goal handles (or keys of new Goals). */
25080
- filed: external_exports.array(external_exports.object({ line: str3, goals: strs3 }).strict()),
25090
+ /** Which Goals each new line goes on: a line's handle, Goal handles (or keys of new Goals), and what
25091
+ * the line says in at most ten words. */
25092
+ filed: external_exports.array(external_exports.object({ line: str3, goals: strs3, summary: str3 }).strict()),
25081
25093
  goals: external_exports.array(external_exports.object({
25082
25094
  op: external_exports.enum(["create", "edit", "complete", "cancel", "reopen", "assign", "defer", "move", "block", "unblock"]),
25083
25095
  key: str3,
@@ -25096,6 +25108,7 @@ RECEIVING: a contact that sends nothing returns \`events\`, a limited batch of w
25096
25108
  key: str3,
25097
25109
  question: str3,
25098
25110
  text: str3,
25111
+ summary: str3,
25099
25112
  to: str3,
25100
25113
  goal: str3,
25101
25114
  options: external_exports.array(external_exports.object({ id: str3, label: str3 }).strict()),
@@ -25109,6 +25122,58 @@ RECEIVING: a contact that sends nothing returns \`events\`, a limited batch of w
25109
25122
  FILER_REPLY_JSON_SCHEMA = (({ $schema: _, ...rest }) => rest)(
25110
25123
  zodToJsonSchema(FilerReplySchema, { $refStrategy: "none" })
25111
25124
  );
25125
+ ExplainerReplySchema = external_exports.object({
25126
+ /** The explanation, as sentences, spoken in order. */
25127
+ say: external_exports.array(external_exports.string()),
25128
+ /** Questions to an agent about gaps in what it read: the agent's handle and the question. */
25129
+ followUps: external_exports.array(external_exports.object({ to: external_exports.string(), text: external_exports.string() }).strict())
25130
+ }).strict();
25131
+ EXPLAINER_REPLY_JSON_SCHEMA = (({ $schema: _, ...rest }) => rest)(
25132
+ zodToJsonSchema(ExplainerReplySchema, { $refStrategy: "none" })
25133
+ );
25134
+ DISTILLER_DEFECTS = [
25135
+ "reasked",
25136
+ // a question put to the person again after they answered it
25137
+ "unsupported",
25138
+ // a fact stated that nothing in the input supports
25139
+ "unsaid",
25140
+ // an agent's answer arrived during the call and was never said
25141
+ "skipped",
25142
+ // an agenda item never put to the person
25143
+ "unsaved",
25144
+ // something the person answered or asked for did not save, was refused or dropped
25145
+ "ignored",
25146
+ // the person asked or said something and was never answered (the critic's ignored_a_question)
25147
+ "promised"
25148
+ // said it did or would do something, and nothing shows it done (the critic's broken_promise)
25149
+ ];
25150
+ DistillerReplySchema = external_exports.object({
25151
+ defects: external_exports.array(external_exports.object({
25152
+ kind: external_exports.enum(DISTILLER_DEFECTS),
25153
+ /** The handles of the lines it shows in. */
25154
+ lines: external_exports.array(external_exports.string()),
25155
+ /** The handle of the record it concerns, or "". */
25156
+ about: external_exports.string(),
25157
+ /** One plain sentence, in words, never handles: it is what the feedback row keeps. */
25158
+ why: external_exports.string()
25159
+ }).strict())
25160
+ }).strict();
25161
+ DISTILLER_REPLY_JSON_SCHEMA = (({ $schema: _, ...rest }) => rest)(
25162
+ zodToJsonSchema(DistillerReplySchema, { $refStrategy: "none" })
25163
+ );
25164
+ TIDY_AUDIENCES = ["talker", "filer", "agents"];
25165
+ TidyReplySchema = external_exports.object({
25166
+ lessons: external_exports.array(external_exports.object({
25167
+ lesson: external_exports.string(),
25168
+ op: external_exports.enum(["keep", "revise", "withdraw"]),
25169
+ text: external_exports.string(),
25170
+ for: external_exports.enum([...TIDY_AUDIENCES, ""]),
25171
+ into: external_exports.string()
25172
+ }).strict())
25173
+ }).strict();
25174
+ TIDY_REPLY_JSON_SCHEMA = (({ $schema: _, ...rest }) => rest)(
25175
+ zodToJsonSchema(TidyReplySchema, { $refStrategy: "none" })
25176
+ );
25112
25177
  LIVE_MS = 3 * 6e4;
25113
25178
  WORKING_MS = 60 * 6e4;
25114
25179
  ContextSchema = external_exports.object({
@@ -25791,7 +25856,7 @@ RECEIVING: a contact that sends nothing returns \`events\`, a limited batch of w
25791
25856
  * desktop app while open. Null = never seen; stale = offline. */
25792
25857
  lastSeenAt: external_exports.string().datetime().nullable().optional(),
25793
25858
  /** WORKING, NOT JUST CONNECTED (owner, 2026-09-30): the last time the agent itself acted on one of
25794
- * its Goals — took its lease or recorded an operation (`tokens.last_worked_at`). Within
25859
+ * its Goals — wrote on one or recorded an operation (`tokens.last_worked_at`). Within
25795
25860
  * `WORKING_MS` it is working; otherwise it is connected but idle. Null = not seen working yet. */
25796
25861
  lastWorkedAt: external_exports.string().datetime().nullable().optional(),
25797
25862
  /** The oldest of its Goals that is `ready` for it — work handed to it that nobody has started.
@@ -25989,7 +26054,7 @@ RECEIVING: a contact that sends nothing returns \`events\`, a limited batch of w
25989
26054
  *
25990
26055
  * IT IS THE PAYLOAD'S OWN HASH, NEVER A STAMP ON THE WORK. Nothing here reasons about which
25991
26056
  * writes change which field — the comparison is over the bytes the phone is holding, so a fact
25992
- * the row shows that no `updated_at` moves for (a lease lapsing, a dependency's state, a
26057
+ * the row shows that no `updated_at` moves for (`active` lapsing, a dependency's state, a
25993
26058
  * sibling appearing in `childGoalIds`) cannot go unnoticed. Optional because a hand-built
25994
26059
  * queue (a fixture, the demo) spells none, and a row with no rev is simply always re-sent. */
25995
26060
  rev: external_exports.string().optional()
@@ -26306,14 +26371,13 @@ RECEIVING: a contact that sends nothing returns \`events\`, a limited batch of w
26306
26371
  owner: external_exports.string(),
26307
26372
  state: external_exports.string(),
26308
26373
  questions: external_exports.array(external_exports.object({ id: external_exports.string().uuid(), state: external_exports.string(), title: external_exports.string() })),
26309
- /** `words` is always what they SAID, verbatim — the record, never replaced. `headline` is
26310
- * their answer on one line when the call's read wrote one (owner, 2026-10-01: "render them
26311
- * summarized like a pre-made option is"), so the row scans like a chosen option and their
26312
- * own words stay under it. Absent on every line stored before the read wrote them, and on
26313
- * anything that is not an answer. */
26374
+ /** `words` is always what they SAID, verbatim — the record, never replaced. `summary` is what
26375
+ * the line says in ten words (owner, 2026-10-07): the filer's, or the talker's for the answer it
26376
+ * gave, so the row scans like a chosen option and their own words stay under it. Absent when
26377
+ * neither wrote one. */
26314
26378
  /** `about` is the request the line answered (its question), null for words that answered none —
26315
26379
  * the key the screen groups on, so one question is one row however many times it was answered. */
26316
- lines: external_exports.array(external_exports.object({ entryId: external_exports.string().uuid(), words: external_exports.string(), headline: external_exports.string().optional(), about: external_exports.string().nullable().optional() }))
26380
+ lines: external_exports.array(external_exports.object({ entryId: external_exports.string().uuid(), words: external_exports.string(), summary: external_exports.string().optional(), about: external_exports.string().nullable().optional() }))
26317
26381
  })),
26318
26382
  unfiled: external_exports.array(external_exports.object({ lineId: external_exports.string().uuid(), words: external_exports.string(), atMs: external_exports.number() })),
26319
26383
  more: external_exports.object({ lines: external_exports.number(), entries: external_exports.number(), topics: external_exports.number() })
@@ -33409,12 +33473,16 @@ init_zod();
33409
33473
  init_zod();
33410
33474
  init_zod();
33411
33475
  init_zod();
33476
+ init_zod();
33477
+ init_zod();
33412
33478
  var OPTIONS_MIN2 = 2;
33413
33479
  var OPTIONS_MAX2 = 6;
33480
+ var OPTION_LABEL_MAX2 = 50;
33481
+ var OPTION_HINT_MAX2 = 200;
33414
33482
  var OptionSchema2 = external_exports.object({
33415
33483
  id: external_exports.string(),
33416
33484
  label: external_exports.string(),
33417
- hint: external_exports.string().max(500).describe("Optional short projection of consequence or action if this option is chosen (e.g. 'Reruns test suite', 'Merges to main').").optional(),
33485
+ hint: external_exports.string().max(500).describe(`Optional: what choosing it does, at most ${OPTION_HINT_MAX2} characters (e.g. 'Reruns test suite', 'Merges to main').`).optional(),
33418
33486
  // .describe() flows into the MCP contact JSON schema (zodToJsonSchema), so
33419
33487
  // the constraints below are what an agent reads when deciding to use these.
33420
33488
  html: external_exports.string().max(16384).describe(
@@ -33428,8 +33496,10 @@ var OptionInputSchema2 = external_exports.object({
33428
33496
  id: external_exports.string().trim().min(1).max(64).regex(/^[A-Za-z0-9_.:-]+$/).optional().describe(
33429
33497
  `Optional: this option's own id, which answers name it by (selectedOptionIds). Give every option one, or none: without them the options are numbered "1", "2", \u2026 in order.`
33430
33498
  ),
33431
- label: external_exports.string().trim().min(1).max(1e3),
33432
- hint: OptionSchema2.shape.hint,
33499
+ // SHORT CHOICES (owner, 2026-10-07: "options label should be maybe max 50 characters and the hint 200"):
33500
+ // a label is one choice the person reads, or hears on a call; a hint says its consequence in a line.
33501
+ label: external_exports.string().trim().min(1).max(OPTION_LABEL_MAX2, `option_label_too_long: an option's label is at most ${OPTION_LABEL_MAX2} characters; say the choice, and put its consequence in the hint.`).describe(`The choice, at most ${OPTION_LABEL_MAX2} characters, standing on its own.`),
33502
+ hint: external_exports.string().max(OPTION_HINT_MAX2, `option_hint_too_long: an option's hint is at most ${OPTION_HINT_MAX2} characters.`).describe(`Optional: what choosing it does, at most ${OPTION_HINT_MAX2} characters (e.g. 'Reruns test suite', 'Merges to main').`).optional(),
33433
33503
  htmlPreview: OptionSchema2.shape.html,
33434
33504
  imgUrl: OptionSchema2.shape.image
33435
33505
  }).strict();
@@ -33539,7 +33609,7 @@ var questionFields2 = {
33539
33609
  ),
33540
33610
  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."),
33541
33611
  units: units2,
33542
- options: external_exports.array(OptionInputSchema2).min(1).max(6).optional().describe("The choices, when you have them. Each label stands on its own."),
33612
+ 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."),
33543
33613
  // HOW THE OPTIONS ARE ANSWERED, SAID BY THE AGENT (owner, 2026-10-02: "one and many makes sense";
33544
33614
  // brain_prompts.md §1: structured agent questions need no model). The app draws all three.
33545
33615
  pickMode: external_exports.enum(["one", "many", "rank"]).optional().describe(
@@ -33659,7 +33729,8 @@ var UpdateGoalSchema2 = external_exports.object({
33659
33729
  }).strict();
33660
33730
  var changedGoal2 = external_exports.string().uuid().describe("The Goal to change, as a read shows it.");
33661
33731
  var goalTitle2 = external_exports.string().trim().min(1).max(80).describe("The Goal's short display name: one to five words, how a person refers to it out loud.");
33662
- var goalOutcome2 = external_exports.string().trim().min(1).max(1e4).describe("The full desired result. There is no third description field.");
33732
+ var GOAL_OUTCOME_MAX2 = 500;
33733
+ var goalOutcome2 = external_exports.string().trim().min(1).max(GOAL_OUTCOME_MAX2, `outcome_too_long: a Goal's outcome is one paragraph, at most ${GOAL_OUTCOME_MAX2} characters; split the rest into child Goals (create with parentGoalId).`).describe(`The desired result, one paragraph of at most ${GOAL_OUTCOME_MAX2} characters. More than that is more work: create child Goals under it (parentGoalId). There is no third description field.`);
33663
33734
  var CreateChange2 = external_exports.object({
33664
33735
  kind: external_exports.literal("create"),
33665
33736
  title: goalTitle2,
@@ -33685,7 +33756,7 @@ var DependencyChange2 = external_exports.object({
33685
33756
  goalId: changedGoal2,
33686
33757
  dependsOnGoalId: external_exports.string().uuid().describe("The Goal it waits on."),
33687
33758
  action: external_exports.enum(["start", "complete"]).describe("What waits: starting goalId, or completing it."),
33688
- reason: external_exports.string().trim().min(1).max(2e3).optional().describe("Why, as an explanation, never as policy.")
33759
+ reason: external_exports.string().trim().min(1).max(250).optional().describe("Why, at most 250 characters, as an explanation, never as policy.")
33689
33760
  }).strict();
33690
33761
  var read2 = { revision: external_exports.number().int().positive().optional() };
33691
33762
  var GoalChangeSchema2 = external_exports.discriminatedUnion("kind", [
@@ -33709,7 +33780,7 @@ var ManageGoalsSchema2 = external_exports.object({
33709
33780
  var ManageGoalsToolSchema2 = external_exports.object({
33710
33781
  changes: external_exports.array(external_exports.discriminatedUnion("kind", [CreateChange2, EditChange2, StateChange2, AssignChange2, DeferChange2, MoveChange2, DependencyChange2])).min(1).max(50).describe("The changes, applied in order, each on its own.")
33711
33782
  }).strict().superRefine((v, ctx) => editNames2(v.changes, ctx));
33712
- var MANAGE_GOALS_DESCRIPTION2 = "Create, edit, assign, organize or close work. Every change here changes Goals; answering, withdrawing or asking Questions stays in contact. Each change applies independently: a refused one names why (`results[i].error`, e.g. goal_revision_conflict, goal_children_open, goal_not_found) and the rest still apply, so read every result: a partial result is never a complete success. Kinds: create (title, outcome, ownerId, parentGoalId, sourceEntryIds) returns the new Goal's id in `results[i].goalId`, in the order requested, to use in later calls; edit (title and/or outcome); state (open, completed, canceled); assign (ownerId); defer (until: the Goal waits until then and its owner is woken when it passes; null takes it back); move (parentGoalId, or null for a root: only this Goal moves); dependency (add or remove: goalId waits on dependsOnGoalId to start or to complete). A Goal cannot be completed while its required children or dependencies remain open: finish or move them first. Finishing the children does not prove the parent's own work is done. An edit applies at the version you last read: if someone changed the Goal since, it is refused as goal_revision_conflict, so read it again (get_goal) and reconsider. You may change any Goal of your person; a change puts you on it. Returns `ok` (every change applied), `results` per change (applied or failed), and `goals`, each changed Goal's id, state, title, outcome and revision.";
33783
+ var MANAGE_GOALS_DESCRIPTION2 = "Create, edit, assign, organize or close work. Every change here changes Goals; answering, withdrawing or asking Questions stays in contact. Each change applies independently: a refused one names why (`results[i].error`, e.g. goal_revision_conflict, goal_children_open, goal_not_found) and the rest still apply, so read every result: a partial result is never a complete success. Kinds: create (title, outcome, ownerId, parentGoalId, sourceEntryIds) returns the new Goal's id in `results[i].goalId`, in the order requested, to use in later calls (an outcome is one paragraph, at most 500 characters: split more into child Goals with parentGoalId); edit (title and/or outcome); state (open, completed, canceled); assign (ownerId); defer (until: the Goal waits until then and its owner is woken when it passes; null takes it back); move (parentGoalId, or null for a root: only this Goal moves); dependency (add or remove: goalId waits on dependsOnGoalId to start or to complete). A Goal cannot be completed while its required children or dependencies remain open: finish or move them first. Finishing the children does not prove the parent's own work is done. An edit applies at the version you last read: if someone changed the Goal since, it is refused as goal_revision_conflict, so read it again (get_goal) and reconsider. You may change any Goal of your person; a change puts you on it. Returns `ok` (every change applied), `results` per change (applied or failed), and `goals`, each changed Goal's id, state, title, outcome and revision.";
33713
33784
  var GetGoalSchema2 = external_exports.object({
33714
33785
  goalId: external_exports.string().uuid(),
33715
33786
  /** Every entry in full. Without it the read carries the person's words, open questions and your
@@ -33727,7 +33798,7 @@ var SearchToolSchema2 = external_exports.object({
33727
33798
  goalId: external_exports.string().uuid().optional(),
33728
33799
  limit: external_exports.number().int().min(1).max(20).optional()
33729
33800
  }).strict();
33730
- var SEARCH_DESCRIPTION2 = "Search your person's history across all of their agents: Entries (what anyone said or wrote, typed or spoken on a call), Goals (by title and outcome) and Answers (found by their Question or by the words that gave them). query is words to look for; records sharing more of its words rank first, and exact names work. types narrows it to entry, goal and/or answer (default: all three). goalId searches under one Goal: its Entries, its Questions' Answers, and it and its immediate children. limit is matches per type, 1 to 20 (default 8). Read-only. Each match carries its whole saved words, its ID and its links (an Answer carries its Question, the choice made and the Entries that support it); `omitted` counts what matched but was left out, so narrow the words or add a goalId to see it. Nothing found is not proof that nothing exists; a refused search says why. Sealed (encrypted) content is never searched or returned.";
33801
+ var SEARCH_DESCRIPTION2 = "Search your person's history across all of their agents: Entries (what anyone said or wrote, typed or spoken on a call), Goals (by title and outcome) and replies -- the person's answers, acknowledgements and deferrals (type answer; found by their summary, by the question or report they reply to, or by the words that gave them). query is words to look for; records sharing more of its words rank first, and exact names work. types narrows it to entry, goal and/or answer (default: all three). goalId searches under one Goal: its Entries, the replies to its items, and it and its immediate children. limit is matches per type, 1 to 20 (default 8). Read-only. Each match carries its whole saved words, its ID and its links (a reply carries its kind -- answered, acknowledged or deferred -- whether it is closed (a deferral is not), its summary in under ten words, its question or report, the choice made and the Entries that support it); `omitted` counts what matched but was left out, so narrow the words or add a goalId to see it. Nothing found is not proof that nothing exists; a refused search says why. Sealed (encrypted) content is never searched or returned.";
33731
33802
  var CheckActivitySchema2 = external_exports.object({}).strict();
33732
33803
  var FEEDBACK_TEXT_MAX2 = 5e4;
33733
33804
  var SendFeedbackSchema2 = external_exports.object({
@@ -33790,6 +33861,7 @@ var QuestionChangeSchema2 = external_exports.union([
33790
33861
  external_exports.object({
33791
33862
  kind: external_exports.literal("create"),
33792
33863
  text: external_exports.string().min(1),
33864
+ summary: external_exports.string().optional(),
33793
33865
  answererId: participant2,
33794
33866
  goal: ResultRefSchema2.optional(),
33795
33867
  blocks: external_exports.array(external_exports.object({ question: ResultRefSchema2 }).strict()),
@@ -33840,12 +33912,12 @@ var BrainSearchSchema2 = external_exports.object({
33840
33912
  }).strict();
33841
33913
  var BrainResultSchema2 = external_exports.object({
33842
33914
  messages: external_exports.array(BrainMessageSchema2),
33843
- entries: external_exports.array(external_exports.object({ key: key2, sources: external_exports.array(SourceSchema2).min(1), goals: external_exports.array(ResultRefSchema2) }).strict()),
33915
+ entries: external_exports.array(external_exports.object({ key: key2, sources: external_exports.array(SourceSchema2).min(1), goals: external_exports.array(ResultRefSchema2), summary: external_exports.string().optional() }).strict()),
33844
33916
  questions: external_exports.array(external_exports.object({ key: key2, entryKeys: external_exports.array(key2), change: QuestionChangeSchema2 }).strict()),
33845
33917
  answers: external_exports.array(external_exports.object({
33846
33918
  question: ResultRefSchema2,
33847
33919
  entryKeys: external_exports.array(key2).min(1),
33848
- summary: external_exports.string().min(1),
33920
+ summary: external_exports.string(),
33849
33921
  selectedOptionIds: external_exports.array(external_exports.string().min(1)).optional()
33850
33922
  }).strict()),
33851
33923
  goals: external_exports.array(external_exports.object({ key: key2, entryKeys: external_exports.array(key2), change: BrainGoalChangeSchema2 }).strict()),
@@ -33890,12 +33962,15 @@ var TalkerReplySchema2 = external_exports.object({
33890
33962
  messages: external_exports.array(external_exports.object({ key: str22, to: str22, text: str22, about: strs22, blocks: str22 }).strict()),
33891
33963
  /** What the call does next: listen, hold (the person asked for a moment) or end (they asked to). */
33892
33964
  then: external_exports.enum(["listen", "hold", "end"]),
33893
- /** Items the person's words settle: the item's handle, the chosen option IDs, the line handles. */
33894
- answers: external_exports.array(external_exports.object({ item: str22, options: strs22, lines: strs22 }).strict()),
33895
- /** The line handles that hold a new instruction from the person. */
33965
+ /** The person's replies to items (replies, owner 2026-10-07): the item's handle, the chosen option
33966
+ * IDs, the line handles, how they replied in under ten words (keeping any condition), and `defer`:
33967
+ * "" when their words settle the item, else what a reply that puts it off waits for -- "call" (the
33968
+ * end of this call), a question's handle (that question's answer) or an ISO time. */
33969
+ replies: external_exports.array(external_exports.object({ item: str22, options: strs22, lines: strs22, summary: str22, defer: str22 }).strict()),
33970
+ /** The line handles that tell the talker how to run this call; they last until it ends and reach no agent. */
33896
33971
  instruction: strs22,
33897
- /** The line handles that ask for new work, a change to existing work, or a standing rule: the filer
33898
- * reads only these (3e). */
33972
+ /** The line handles the filer acts on, and the only ones it reads (3e): new work, a change to existing
33973
+ * work, feedback on Paigy, anything said to an agent, and any rule meant to outlast the call. */
33899
33974
  file: strs22,
33900
33975
  /** Evidence to fetch for a second round: a search, an item's full text, or an agent by name. */
33901
33976
  need: external_exports.object({ kind: external_exports.enum(["search", "item", "agent", ""]), text: str22 }).strict(),
@@ -33908,8 +33983,9 @@ var TALKER_REPLY_JSON_SCHEMA2 = (({ $schema: _, ...rest }) => rest)(
33908
33983
  var str32 = external_exports.string();
33909
33984
  var strs32 = external_exports.array(external_exports.string());
33910
33985
  var FilerReplySchema2 = external_exports.object({
33911
- /** Which Goals each new line goes on: a line's handle and Goal handles (or keys of new Goals). */
33912
- filed: external_exports.array(external_exports.object({ line: str32, goals: strs32 }).strict()),
33986
+ /** Which Goals each new line goes on: a line's handle, Goal handles (or keys of new Goals), and what
33987
+ * the line says in at most ten words. */
33988
+ filed: external_exports.array(external_exports.object({ line: str32, goals: strs32, summary: str32 }).strict()),
33913
33989
  goals: external_exports.array(external_exports.object({
33914
33990
  op: external_exports.enum(["create", "edit", "complete", "cancel", "reopen", "assign", "defer", "move", "block", "unblock"]),
33915
33991
  key: str32,
@@ -33928,6 +34004,7 @@ var FilerReplySchema2 = external_exports.object({
33928
34004
  key: str32,
33929
34005
  question: str32,
33930
34006
  text: str32,
34007
+ summary: str32,
33931
34008
  to: str32,
33932
34009
  goal: str32,
33933
34010
  options: external_exports.array(external_exports.object({ id: str32, label: str32 }).strict()),
@@ -33941,6 +34018,58 @@ var FilerReplySchema2 = external_exports.object({
33941
34018
  var FILER_REPLY_JSON_SCHEMA2 = (({ $schema: _, ...rest }) => rest)(
33942
34019
  zodToJsonSchema2(FilerReplySchema2, { $refStrategy: "none" })
33943
34020
  );
34021
+ var ExplainerReplySchema2 = external_exports.object({
34022
+ /** The explanation, as sentences, spoken in order. */
34023
+ say: external_exports.array(external_exports.string()),
34024
+ /** Questions to an agent about gaps in what it read: the agent's handle and the question. */
34025
+ followUps: external_exports.array(external_exports.object({ to: external_exports.string(), text: external_exports.string() }).strict())
34026
+ }).strict();
34027
+ var EXPLAINER_REPLY_JSON_SCHEMA2 = (({ $schema: _, ...rest }) => rest)(
34028
+ zodToJsonSchema2(ExplainerReplySchema2, { $refStrategy: "none" })
34029
+ );
34030
+ var DISTILLER_DEFECTS2 = [
34031
+ "reasked",
34032
+ // a question put to the person again after they answered it
34033
+ "unsupported",
34034
+ // a fact stated that nothing in the input supports
34035
+ "unsaid",
34036
+ // an agent's answer arrived during the call and was never said
34037
+ "skipped",
34038
+ // an agenda item never put to the person
34039
+ "unsaved",
34040
+ // something the person answered or asked for did not save, was refused or dropped
34041
+ "ignored",
34042
+ // the person asked or said something and was never answered (the critic's ignored_a_question)
34043
+ "promised"
34044
+ // said it did or would do something, and nothing shows it done (the critic's broken_promise)
34045
+ ];
34046
+ var DistillerReplySchema2 = external_exports.object({
34047
+ defects: external_exports.array(external_exports.object({
34048
+ kind: external_exports.enum(DISTILLER_DEFECTS2),
34049
+ /** The handles of the lines it shows in. */
34050
+ lines: external_exports.array(external_exports.string()),
34051
+ /** The handle of the record it concerns, or "". */
34052
+ about: external_exports.string(),
34053
+ /** One plain sentence, in words, never handles: it is what the feedback row keeps. */
34054
+ why: external_exports.string()
34055
+ }).strict())
34056
+ }).strict();
34057
+ var DISTILLER_REPLY_JSON_SCHEMA2 = (({ $schema: _, ...rest }) => rest)(
34058
+ zodToJsonSchema2(DistillerReplySchema2, { $refStrategy: "none" })
34059
+ );
34060
+ var TIDY_AUDIENCES2 = ["talker", "filer", "agents"];
34061
+ var TidyReplySchema2 = external_exports.object({
34062
+ lessons: external_exports.array(external_exports.object({
34063
+ lesson: external_exports.string(),
34064
+ op: external_exports.enum(["keep", "revise", "withdraw"]),
34065
+ text: external_exports.string(),
34066
+ for: external_exports.enum([...TIDY_AUDIENCES2, ""]),
34067
+ into: external_exports.string()
34068
+ }).strict())
34069
+ }).strict();
34070
+ var TIDY_REPLY_JSON_SCHEMA2 = (({ $schema: _, ...rest }) => rest)(
34071
+ zodToJsonSchema2(TidyReplySchema2, { $refStrategy: "none" })
34072
+ );
33944
34073
  function entryWords(entry) {
33945
34074
  const content = entry.content;
33946
34075
  if (content && "sealed" in content) return "";
@@ -34640,7 +34769,7 @@ var ConnectionSummarySchema2 = external_exports.object({
34640
34769
  * desktop app while open. Null = never seen; stale = offline. */
34641
34770
  lastSeenAt: external_exports.string().datetime().nullable().optional(),
34642
34771
  /** WORKING, NOT JUST CONNECTED (owner, 2026-09-30): the last time the agent itself acted on one of
34643
- * its Goals — took its lease or recorded an operation (`tokens.last_worked_at`). Within
34772
+ * its Goals — wrote on one or recorded an operation (`tokens.last_worked_at`). Within
34644
34773
  * `WORKING_MS` it is working; otherwise it is connected but idle. Null = not seen working yet. */
34645
34774
  lastWorkedAt: external_exports.string().datetime().nullable().optional(),
34646
34775
  /** The oldest of its Goals that is `ready` for it — work handed to it that nobody has started.
@@ -34838,7 +34967,7 @@ var QueueItemSchema2 = external_exports.object({
34838
34967
  *
34839
34968
  * IT IS THE PAYLOAD'S OWN HASH, NEVER A STAMP ON THE WORK. Nothing here reasons about which
34840
34969
  * writes change which field — the comparison is over the bytes the phone is holding, so a fact
34841
- * the row shows that no `updated_at` moves for (a lease lapsing, a dependency's state, a
34970
+ * the row shows that no `updated_at` moves for (`active` lapsing, a dependency's state, a
34842
34971
  * sibling appearing in `childGoalIds`) cannot go unnoticed. Optional because a hand-built
34843
34972
  * queue (a fixture, the demo) spells none, and a row with no rev is simply always re-sent. */
34844
34973
  rev: external_exports.string().optional()
@@ -35153,14 +35282,13 @@ var CallRecapSchema2 = external_exports.object({
35153
35282
  owner: external_exports.string(),
35154
35283
  state: external_exports.string(),
35155
35284
  questions: external_exports.array(external_exports.object({ id: external_exports.string().uuid(), state: external_exports.string(), title: external_exports.string() })),
35156
- /** `words` is always what they SAID, verbatim — the record, never replaced. `headline` is
35157
- * their answer on one line when the call's read wrote one (owner, 2026-10-01: "render them
35158
- * summarized like a pre-made option is"), so the row scans like a chosen option and their
35159
- * own words stay under it. Absent on every line stored before the read wrote them, and on
35160
- * anything that is not an answer. */
35285
+ /** `words` is always what they SAID, verbatim — the record, never replaced. `summary` is what
35286
+ * the line says in ten words (owner, 2026-10-07): the filer's, or the talker's for the answer it
35287
+ * gave, so the row scans like a chosen option and their own words stay under it. Absent when
35288
+ * neither wrote one. */
35161
35289
  /** `about` is the request the line answered (its question), null for words that answered none —
35162
35290
  * the key the screen groups on, so one question is one row however many times it was answered. */
35163
- lines: external_exports.array(external_exports.object({ entryId: external_exports.string().uuid(), words: external_exports.string(), headline: external_exports.string().optional(), about: external_exports.string().nullable().optional() }))
35291
+ lines: external_exports.array(external_exports.object({ entryId: external_exports.string().uuid(), words: external_exports.string(), summary: external_exports.string().optional(), about: external_exports.string().nullable().optional() }))
35164
35292
  })),
35165
35293
  unfiled: external_exports.array(external_exports.object({ lineId: external_exports.string().uuid(), words: external_exports.string(), atMs: external_exports.number() })),
35166
35294
  more: external_exports.object({ lines: external_exports.number(), entries: external_exports.number(), topics: external_exports.number() })
package/dist/main.js CHANGED
@@ -9923,10 +9923,12 @@ var zodToJsonSchema = (schema, options) => {
9923
9923
  };
9924
9924
  var OPTIONS_MIN = 2;
9925
9925
  var OPTIONS_MAX = 6;
9926
+ var OPTION_LABEL_MAX = 50;
9927
+ var OPTION_HINT_MAX = 200;
9926
9928
  var OptionSchema = external_exports.object({
9927
9929
  id: external_exports.string(),
9928
9930
  label: external_exports.string(),
9929
- hint: external_exports.string().max(500).describe("Optional short projection of consequence or action if this option is chosen (e.g. 'Reruns test suite', 'Merges to main').").optional(),
9931
+ hint: external_exports.string().max(500).describe(`Optional: what choosing it does, at most ${OPTION_HINT_MAX} characters (e.g. 'Reruns test suite', 'Merges to main').`).optional(),
9930
9932
  // .describe() flows into the MCP contact JSON schema (zodToJsonSchema), so
9931
9933
  // the constraints below are what an agent reads when deciding to use these.
9932
9934
  html: external_exports.string().max(16384).describe(
@@ -9940,8 +9942,10 @@ var OptionInputSchema = external_exports.object({
9940
9942
  id: external_exports.string().trim().min(1).max(64).regex(/^[A-Za-z0-9_.:-]+$/).optional().describe(
9941
9943
  `Optional: this option's own id, which answers name it by (selectedOptionIds). Give every option one, or none: without them the options are numbered "1", "2", \u2026 in order.`
9942
9944
  ),
9943
- label: external_exports.string().trim().min(1).max(1e3),
9944
- hint: OptionSchema.shape.hint,
9945
+ // SHORT CHOICES (owner, 2026-10-07: "options label should be maybe max 50 characters and the hint 200"):
9946
+ // a label is one choice the person reads, or hears on a call; a hint says its consequence in a line.
9947
+ label: external_exports.string().trim().min(1).max(OPTION_LABEL_MAX, `option_label_too_long: an option's label is at most ${OPTION_LABEL_MAX} characters; say the choice, and put its consequence in the hint.`).describe(`The choice, at most ${OPTION_LABEL_MAX} characters, standing on its own.`),
9948
+ hint: external_exports.string().max(OPTION_HINT_MAX, `option_hint_too_long: an option's hint is at most ${OPTION_HINT_MAX} characters.`).describe(`Optional: what choosing it does, at most ${OPTION_HINT_MAX} characters (e.g. 'Reruns test suite', 'Merges to main').`).optional(),
9945
9949
  htmlPreview: OptionSchema.shape.html,
9946
9950
  imgUrl: OptionSchema.shape.image
9947
9951
  }).strict();
@@ -10051,7 +10055,7 @@ var questionFields = {
10051
10055
  ),
10052
10056
  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."),
10053
10057
  units,
10054
- options: external_exports.array(OptionInputSchema).min(1).max(6).optional().describe("The choices, when you have them. Each label stands on its own."),
10058
+ 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."),
10055
10059
  // HOW THE OPTIONS ARE ANSWERED, SAID BY THE AGENT (owner, 2026-10-02: "one and many makes sense";
10056
10060
  // brain_prompts.md §1: structured agent questions need no model). The app draws all three.
10057
10061
  pickMode: external_exports.enum(["one", "many", "rank"]).optional().describe(
@@ -10171,7 +10175,8 @@ var UpdateGoalSchema = external_exports.object({
10171
10175
  }).strict();
10172
10176
  var changedGoal = external_exports.string().uuid().describe("The Goal to change, as a read shows it.");
10173
10177
  var goalTitle = external_exports.string().trim().min(1).max(80).describe("The Goal's short display name: one to five words, how a person refers to it out loud.");
10174
- var goalOutcome = external_exports.string().trim().min(1).max(1e4).describe("The full desired result. There is no third description field.");
10178
+ var GOAL_OUTCOME_MAX = 500;
10179
+ var goalOutcome = external_exports.string().trim().min(1).max(GOAL_OUTCOME_MAX, `outcome_too_long: a Goal's outcome is one paragraph, at most ${GOAL_OUTCOME_MAX} characters; split the rest into child Goals (create with parentGoalId).`).describe(`The desired result, one paragraph of at most ${GOAL_OUTCOME_MAX} characters. More than that is more work: create child Goals under it (parentGoalId). There is no third description field.`);
10175
10180
  var CreateChange = external_exports.object({
10176
10181
  kind: external_exports.literal("create"),
10177
10182
  title: goalTitle,
@@ -10197,7 +10202,7 @@ var DependencyChange = external_exports.object({
10197
10202
  goalId: changedGoal,
10198
10203
  dependsOnGoalId: external_exports.string().uuid().describe("The Goal it waits on."),
10199
10204
  action: external_exports.enum(["start", "complete"]).describe("What waits: starting goalId, or completing it."),
10200
- reason: external_exports.string().trim().min(1).max(2e3).optional().describe("Why, as an explanation, never as policy.")
10205
+ reason: external_exports.string().trim().min(1).max(250).optional().describe("Why, at most 250 characters, as an explanation, never as policy.")
10201
10206
  }).strict();
10202
10207
  var read = { revision: external_exports.number().int().positive().optional() };
10203
10208
  var GoalChangeSchema = external_exports.discriminatedUnion("kind", [
@@ -10221,7 +10226,7 @@ var ManageGoalsSchema = external_exports.object({
10221
10226
  var ManageGoalsToolSchema = external_exports.object({
10222
10227
  changes: external_exports.array(external_exports.discriminatedUnion("kind", [CreateChange, EditChange, StateChange, AssignChange, DeferChange, MoveChange, DependencyChange])).min(1).max(50).describe("The changes, applied in order, each on its own.")
10223
10228
  }).strict().superRefine((v, ctx) => editNames(v.changes, ctx));
10224
- var MANAGE_GOALS_DESCRIPTION = "Create, edit, assign, organize or close work. Every change here changes Goals; answering, withdrawing or asking Questions stays in contact. Each change applies independently: a refused one names why (`results[i].error`, e.g. goal_revision_conflict, goal_children_open, goal_not_found) and the rest still apply, so read every result: a partial result is never a complete success. Kinds: create (title, outcome, ownerId, parentGoalId, sourceEntryIds) returns the new Goal's id in `results[i].goalId`, in the order requested, to use in later calls; edit (title and/or outcome); state (open, completed, canceled); assign (ownerId); defer (until: the Goal waits until then and its owner is woken when it passes; null takes it back); move (parentGoalId, or null for a root: only this Goal moves); dependency (add or remove: goalId waits on dependsOnGoalId to start or to complete). A Goal cannot be completed while its required children or dependencies remain open: finish or move them first. Finishing the children does not prove the parent's own work is done. An edit applies at the version you last read: if someone changed the Goal since, it is refused as goal_revision_conflict, so read it again (get_goal) and reconsider. You may change any Goal of your person; a change puts you on it. Returns `ok` (every change applied), `results` per change (applied or failed), and `goals`, each changed Goal's id, state, title, outcome and revision.";
10229
+ var MANAGE_GOALS_DESCRIPTION = "Create, edit, assign, organize or close work. Every change here changes Goals; answering, withdrawing or asking Questions stays in contact. Each change applies independently: a refused one names why (`results[i].error`, e.g. goal_revision_conflict, goal_children_open, goal_not_found) and the rest still apply, so read every result: a partial result is never a complete success. Kinds: create (title, outcome, ownerId, parentGoalId, sourceEntryIds) returns the new Goal's id in `results[i].goalId`, in the order requested, to use in later calls (an outcome is one paragraph, at most 500 characters: split more into child Goals with parentGoalId); edit (title and/or outcome); state (open, completed, canceled); assign (ownerId); defer (until: the Goal waits until then and its owner is woken when it passes; null takes it back); move (parentGoalId, or null for a root: only this Goal moves); dependency (add or remove: goalId waits on dependsOnGoalId to start or to complete). A Goal cannot be completed while its required children or dependencies remain open: finish or move them first. Finishing the children does not prove the parent's own work is done. An edit applies at the version you last read: if someone changed the Goal since, it is refused as goal_revision_conflict, so read it again (get_goal) and reconsider. You may change any Goal of your person; a change puts you on it. Returns `ok` (every change applied), `results` per change (applied or failed), and `goals`, each changed Goal's id, state, title, outcome and revision.";
10225
10230
  var GetGoalSchema = external_exports.object({
10226
10231
  goalId: external_exports.string().uuid(),
10227
10232
  /** Every entry in full. Without it the read carries the person's words, open questions and your
@@ -10239,7 +10244,7 @@ var SearchToolSchema = external_exports.object({
10239
10244
  goalId: external_exports.string().uuid().optional(),
10240
10245
  limit: external_exports.number().int().min(1).max(20).optional()
10241
10246
  }).strict();
10242
- var SEARCH_DESCRIPTION = "Search your person's history across all of their agents: Entries (what anyone said or wrote, typed or spoken on a call), Goals (by title and outcome) and Answers (found by their Question or by the words that gave them). query is words to look for; records sharing more of its words rank first, and exact names work. types narrows it to entry, goal and/or answer (default: all three). goalId searches under one Goal: its Entries, its Questions' Answers, and it and its immediate children. limit is matches per type, 1 to 20 (default 8). Read-only. Each match carries its whole saved words, its ID and its links (an Answer carries its Question, the choice made and the Entries that support it); `omitted` counts what matched but was left out, so narrow the words or add a goalId to see it. Nothing found is not proof that nothing exists; a refused search says why. Sealed (encrypted) content is never searched or returned.";
10247
+ var SEARCH_DESCRIPTION = "Search your person's history across all of their agents: Entries (what anyone said or wrote, typed or spoken on a call), Goals (by title and outcome) and replies -- the person's answers, acknowledgements and deferrals (type answer; found by their summary, by the question or report they reply to, or by the words that gave them). query is words to look for; records sharing more of its words rank first, and exact names work. types narrows it to entry, goal and/or answer (default: all three). goalId searches under one Goal: its Entries, the replies to its items, and it and its immediate children. limit is matches per type, 1 to 20 (default 8). Read-only. Each match carries its whole saved words, its ID and its links (a reply carries its kind -- answered, acknowledged or deferred -- whether it is closed (a deferral is not), its summary in under ten words, its question or report, the choice made and the Entries that support it); `omitted` counts what matched but was left out, so narrow the words or add a goalId to see it. Nothing found is not proof that nothing exists; a refused search says why. Sealed (encrypted) content is never searched or returned.";
10243
10248
  var CheckActivitySchema = external_exports.object({}).strict();
10244
10249
  var FEEDBACK_TEXT_MAX = 5e4;
10245
10250
  var SendFeedbackSchema = external_exports.object({
@@ -10302,6 +10307,7 @@ var QuestionChangeSchema = external_exports.union([
10302
10307
  external_exports.object({
10303
10308
  kind: external_exports.literal("create"),
10304
10309
  text: external_exports.string().min(1),
10310
+ summary: external_exports.string().optional(),
10305
10311
  answererId: participant,
10306
10312
  goal: ResultRefSchema.optional(),
10307
10313
  blocks: external_exports.array(external_exports.object({ question: ResultRefSchema }).strict()),
@@ -10352,12 +10358,12 @@ var BrainSearchSchema = external_exports.object({
10352
10358
  }).strict();
10353
10359
  var BrainResultSchema = external_exports.object({
10354
10360
  messages: external_exports.array(BrainMessageSchema),
10355
- entries: external_exports.array(external_exports.object({ key, sources: external_exports.array(SourceSchema).min(1), goals: external_exports.array(ResultRefSchema) }).strict()),
10361
+ entries: external_exports.array(external_exports.object({ key, sources: external_exports.array(SourceSchema).min(1), goals: external_exports.array(ResultRefSchema), summary: external_exports.string().optional() }).strict()),
10356
10362
  questions: external_exports.array(external_exports.object({ key, entryKeys: external_exports.array(key), change: QuestionChangeSchema }).strict()),
10357
10363
  answers: external_exports.array(external_exports.object({
10358
10364
  question: ResultRefSchema,
10359
10365
  entryKeys: external_exports.array(key).min(1),
10360
- summary: external_exports.string().min(1),
10366
+ summary: external_exports.string(),
10361
10367
  selectedOptionIds: external_exports.array(external_exports.string().min(1)).optional()
10362
10368
  }).strict()),
10363
10369
  goals: external_exports.array(external_exports.object({ key, entryKeys: external_exports.array(key), change: BrainGoalChangeSchema }).strict()),
@@ -10402,12 +10408,15 @@ var TalkerReplySchema = external_exports.object({
10402
10408
  messages: external_exports.array(external_exports.object({ key: str2, to: str2, text: str2, about: strs2, blocks: str2 }).strict()),
10403
10409
  /** What the call does next: listen, hold (the person asked for a moment) or end (they asked to). */
10404
10410
  then: external_exports.enum(["listen", "hold", "end"]),
10405
- /** Items the person's words settle: the item's handle, the chosen option IDs, the line handles. */
10406
- answers: external_exports.array(external_exports.object({ item: str2, options: strs2, lines: strs2 }).strict()),
10407
- /** The line handles that hold a new instruction from the person. */
10411
+ /** The person's replies to items (replies, owner 2026-10-07): the item's handle, the chosen option
10412
+ * IDs, the line handles, how they replied in under ten words (keeping any condition), and `defer`:
10413
+ * "" when their words settle the item, else what a reply that puts it off waits for -- "call" (the
10414
+ * end of this call), a question's handle (that question's answer) or an ISO time. */
10415
+ replies: external_exports.array(external_exports.object({ item: str2, options: strs2, lines: strs2, summary: str2, defer: str2 }).strict()),
10416
+ /** The line handles that tell the talker how to run this call; they last until it ends and reach no agent. */
10408
10417
  instruction: strs2,
10409
- /** The line handles that ask for new work, a change to existing work, or a standing rule: the filer
10410
- * reads only these (3e). */
10418
+ /** The line handles the filer acts on, and the only ones it reads (3e): new work, a change to existing
10419
+ * work, feedback on Paigy, anything said to an agent, and any rule meant to outlast the call. */
10411
10420
  file: strs2,
10412
10421
  /** Evidence to fetch for a second round: a search, an item's full text, or an agent by name. */
10413
10422
  need: external_exports.object({ kind: external_exports.enum(["search", "item", "agent", ""]), text: str2 }).strict(),
@@ -10420,8 +10429,9 @@ var TALKER_REPLY_JSON_SCHEMA = (({ $schema: _, ...rest }) => rest)(
10420
10429
  var str3 = external_exports.string();
10421
10430
  var strs3 = external_exports.array(external_exports.string());
10422
10431
  var FilerReplySchema = external_exports.object({
10423
- /** Which Goals each new line goes on: a line's handle and Goal handles (or keys of new Goals). */
10424
- filed: external_exports.array(external_exports.object({ line: str3, goals: strs3 }).strict()),
10432
+ /** Which Goals each new line goes on: a line's handle, Goal handles (or keys of new Goals), and what
10433
+ * the line says in at most ten words. */
10434
+ filed: external_exports.array(external_exports.object({ line: str3, goals: strs3, summary: str3 }).strict()),
10425
10435
  goals: external_exports.array(external_exports.object({
10426
10436
  op: external_exports.enum(["create", "edit", "complete", "cancel", "reopen", "assign", "defer", "move", "block", "unblock"]),
10427
10437
  key: str3,
@@ -10440,6 +10450,7 @@ var FilerReplySchema = external_exports.object({
10440
10450
  key: str3,
10441
10451
  question: str3,
10442
10452
  text: str3,
10453
+ summary: str3,
10443
10454
  to: str3,
10444
10455
  goal: str3,
10445
10456
  options: external_exports.array(external_exports.object({ id: str3, label: str3 }).strict()),
@@ -10453,6 +10464,58 @@ var FilerReplySchema = external_exports.object({
10453
10464
  var FILER_REPLY_JSON_SCHEMA = (({ $schema: _, ...rest }) => rest)(
10454
10465
  zodToJsonSchema(FilerReplySchema, { $refStrategy: "none" })
10455
10466
  );
10467
+ var ExplainerReplySchema = external_exports.object({
10468
+ /** The explanation, as sentences, spoken in order. */
10469
+ say: external_exports.array(external_exports.string()),
10470
+ /** Questions to an agent about gaps in what it read: the agent's handle and the question. */
10471
+ followUps: external_exports.array(external_exports.object({ to: external_exports.string(), text: external_exports.string() }).strict())
10472
+ }).strict();
10473
+ var EXPLAINER_REPLY_JSON_SCHEMA = (({ $schema: _, ...rest }) => rest)(
10474
+ zodToJsonSchema(ExplainerReplySchema, { $refStrategy: "none" })
10475
+ );
10476
+ var DISTILLER_DEFECTS = [
10477
+ "reasked",
10478
+ // a question put to the person again after they answered it
10479
+ "unsupported",
10480
+ // a fact stated that nothing in the input supports
10481
+ "unsaid",
10482
+ // an agent's answer arrived during the call and was never said
10483
+ "skipped",
10484
+ // an agenda item never put to the person
10485
+ "unsaved",
10486
+ // something the person answered or asked for did not save, was refused or dropped
10487
+ "ignored",
10488
+ // the person asked or said something and was never answered (the critic's ignored_a_question)
10489
+ "promised"
10490
+ // said it did or would do something, and nothing shows it done (the critic's broken_promise)
10491
+ ];
10492
+ var DistillerReplySchema = external_exports.object({
10493
+ defects: external_exports.array(external_exports.object({
10494
+ kind: external_exports.enum(DISTILLER_DEFECTS),
10495
+ /** The handles of the lines it shows in. */
10496
+ lines: external_exports.array(external_exports.string()),
10497
+ /** The handle of the record it concerns, or "". */
10498
+ about: external_exports.string(),
10499
+ /** One plain sentence, in words, never handles: it is what the feedback row keeps. */
10500
+ why: external_exports.string()
10501
+ }).strict())
10502
+ }).strict();
10503
+ var DISTILLER_REPLY_JSON_SCHEMA = (({ $schema: _, ...rest }) => rest)(
10504
+ zodToJsonSchema(DistillerReplySchema, { $refStrategy: "none" })
10505
+ );
10506
+ var TIDY_AUDIENCES = ["talker", "filer", "agents"];
10507
+ var TidyReplySchema = external_exports.object({
10508
+ lessons: external_exports.array(external_exports.object({
10509
+ lesson: external_exports.string(),
10510
+ op: external_exports.enum(["keep", "revise", "withdraw"]),
10511
+ text: external_exports.string(),
10512
+ for: external_exports.enum([...TIDY_AUDIENCES, ""]),
10513
+ into: external_exports.string()
10514
+ }).strict())
10515
+ }).strict();
10516
+ var TIDY_REPLY_JSON_SCHEMA = (({ $schema: _, ...rest }) => rest)(
10517
+ zodToJsonSchema(TidyReplySchema, { $refStrategy: "none" })
10518
+ );
10456
10519
  function entryUnit(entry) {
10457
10520
  if (entry.kind !== "contribution" || !entry.aboutId) return null;
10458
10521
  const plain = entry.content && "plain" in entry.content ? entry.content.plain : null;
@@ -11142,7 +11205,7 @@ var ConnectionSummarySchema = external_exports.object({
11142
11205
  * desktop app while open. Null = never seen; stale = offline. */
11143
11206
  lastSeenAt: external_exports.string().datetime().nullable().optional(),
11144
11207
  /** WORKING, NOT JUST CONNECTED (owner, 2026-09-30): the last time the agent itself acted on one of
11145
- * its Goals — took its lease or recorded an operation (`tokens.last_worked_at`). Within
11208
+ * its Goals — wrote on one or recorded an operation (`tokens.last_worked_at`). Within
11146
11209
  * `WORKING_MS` it is working; otherwise it is connected but idle. Null = not seen working yet. */
11147
11210
  lastWorkedAt: external_exports.string().datetime().nullable().optional(),
11148
11211
  /** The oldest of its Goals that is `ready` for it — work handed to it that nobody has started.
@@ -11340,7 +11403,7 @@ var QueueItemSchema = external_exports.object({
11340
11403
  *
11341
11404
  * IT IS THE PAYLOAD'S OWN HASH, NEVER A STAMP ON THE WORK. Nothing here reasons about which
11342
11405
  * writes change which field — the comparison is over the bytes the phone is holding, so a fact
11343
- * the row shows that no `updated_at` moves for (a lease lapsing, a dependency's state, a
11406
+ * the row shows that no `updated_at` moves for (`active` lapsing, a dependency's state, a
11344
11407
  * sibling appearing in `childGoalIds`) cannot go unnoticed. Optional because a hand-built
11345
11408
  * queue (a fixture, the demo) spells none, and a row with no rev is simply always re-sent. */
11346
11409
  rev: external_exports.string().optional()
@@ -11657,14 +11720,13 @@ var CallRecapSchema = external_exports.object({
11657
11720
  owner: external_exports.string(),
11658
11721
  state: external_exports.string(),
11659
11722
  questions: external_exports.array(external_exports.object({ id: external_exports.string().uuid(), state: external_exports.string(), title: external_exports.string() })),
11660
- /** `words` is always what they SAID, verbatim — the record, never replaced. `headline` is
11661
- * their answer on one line when the call's read wrote one (owner, 2026-10-01: "render them
11662
- * summarized like a pre-made option is"), so the row scans like a chosen option and their
11663
- * own words stay under it. Absent on every line stored before the read wrote them, and on
11664
- * anything that is not an answer. */
11723
+ /** `words` is always what they SAID, verbatim — the record, never replaced. `summary` is what
11724
+ * the line says in ten words (owner, 2026-10-07): the filer's, or the talker's for the answer it
11725
+ * gave, so the row scans like a chosen option and their own words stay under it. Absent when
11726
+ * neither wrote one. */
11665
11727
  /** `about` is the request the line answered (its question), null for words that answered none —
11666
11728
  * the key the screen groups on, so one question is one row however many times it was answered. */
11667
- lines: external_exports.array(external_exports.object({ entryId: external_exports.string().uuid(), words: external_exports.string(), headline: external_exports.string().optional(), about: external_exports.string().nullable().optional() }))
11729
+ lines: external_exports.array(external_exports.object({ entryId: external_exports.string().uuid(), words: external_exports.string(), summary: external_exports.string().optional(), about: external_exports.string().nullable().optional() }))
11668
11730
  })),
11669
11731
  unfiled: external_exports.array(external_exports.object({ lineId: external_exports.string().uuid(), words: external_exports.string(), atMs: external_exports.number() })),
11670
11732
  more: external_exports.object({ lines: external_exports.number(), entries: external_exports.number(), topics: external_exports.number() })
@@ -14457,10 +14519,12 @@ var zodToJsonSchema2 = (schema, options) => {
14457
14519
  // ../../packages/schema/dist/index.js
14458
14520
  var OPTIONS_MIN2 = 2;
14459
14521
  var OPTIONS_MAX2 = 6;
14522
+ var OPTION_LABEL_MAX2 = 50;
14523
+ var OPTION_HINT_MAX2 = 200;
14460
14524
  var OptionSchema2 = external_exports.object({
14461
14525
  id: external_exports.string(),
14462
14526
  label: external_exports.string(),
14463
- hint: external_exports.string().max(500).describe("Optional short projection of consequence or action if this option is chosen (e.g. 'Reruns test suite', 'Merges to main').").optional(),
14527
+ hint: external_exports.string().max(500).describe(`Optional: what choosing it does, at most ${OPTION_HINT_MAX2} characters (e.g. 'Reruns test suite', 'Merges to main').`).optional(),
14464
14528
  // .describe() flows into the MCP contact JSON schema (zodToJsonSchema), so
14465
14529
  // the constraints below are what an agent reads when deciding to use these.
14466
14530
  html: external_exports.string().max(16384).describe(
@@ -14474,8 +14538,10 @@ var OptionInputSchema2 = external_exports.object({
14474
14538
  id: external_exports.string().trim().min(1).max(64).regex(/^[A-Za-z0-9_.:-]+$/).optional().describe(
14475
14539
  `Optional: this option's own id, which answers name it by (selectedOptionIds). Give every option one, or none: without them the options are numbered "1", "2", \u2026 in order.`
14476
14540
  ),
14477
- label: external_exports.string().trim().min(1).max(1e3),
14478
- hint: OptionSchema2.shape.hint,
14541
+ // SHORT CHOICES (owner, 2026-10-07: "options label should be maybe max 50 characters and the hint 200"):
14542
+ // a label is one choice the person reads, or hears on a call; a hint says its consequence in a line.
14543
+ label: external_exports.string().trim().min(1).max(OPTION_LABEL_MAX2, `option_label_too_long: an option's label is at most ${OPTION_LABEL_MAX2} characters; say the choice, and put its consequence in the hint.`).describe(`The choice, at most ${OPTION_LABEL_MAX2} characters, standing on its own.`),
14544
+ hint: external_exports.string().max(OPTION_HINT_MAX2, `option_hint_too_long: an option's hint is at most ${OPTION_HINT_MAX2} characters.`).describe(`Optional: what choosing it does, at most ${OPTION_HINT_MAX2} characters (e.g. 'Reruns test suite', 'Merges to main').`).optional(),
14479
14545
  htmlPreview: OptionSchema2.shape.html,
14480
14546
  imgUrl: OptionSchema2.shape.image
14481
14547
  }).strict();
@@ -14585,7 +14651,7 @@ var questionFields2 = {
14585
14651
  ),
14586
14652
  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."),
14587
14653
  units: units2,
14588
- options: external_exports.array(OptionInputSchema2).min(1).max(6).optional().describe("The choices, when you have them. Each label stands on its own."),
14654
+ 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."),
14589
14655
  // HOW THE OPTIONS ARE ANSWERED, SAID BY THE AGENT (owner, 2026-10-02: "one and many makes sense";
14590
14656
  // brain_prompts.md §1: structured agent questions need no model). The app draws all three.
14591
14657
  pickMode: external_exports.enum(["one", "many", "rank"]).optional().describe(
@@ -14705,7 +14771,8 @@ var UpdateGoalSchema2 = external_exports.object({
14705
14771
  }).strict();
14706
14772
  var changedGoal2 = external_exports.string().uuid().describe("The Goal to change, as a read shows it.");
14707
14773
  var goalTitle2 = external_exports.string().trim().min(1).max(80).describe("The Goal's short display name: one to five words, how a person refers to it out loud.");
14708
- var goalOutcome2 = external_exports.string().trim().min(1).max(1e4).describe("The full desired result. There is no third description field.");
14774
+ var GOAL_OUTCOME_MAX2 = 500;
14775
+ var goalOutcome2 = external_exports.string().trim().min(1).max(GOAL_OUTCOME_MAX2, `outcome_too_long: a Goal's outcome is one paragraph, at most ${GOAL_OUTCOME_MAX2} characters; split the rest into child Goals (create with parentGoalId).`).describe(`The desired result, one paragraph of at most ${GOAL_OUTCOME_MAX2} characters. More than that is more work: create child Goals under it (parentGoalId). There is no third description field.`);
14709
14776
  var CreateChange2 = external_exports.object({
14710
14777
  kind: external_exports.literal("create"),
14711
14778
  title: goalTitle2,
@@ -14731,7 +14798,7 @@ var DependencyChange2 = external_exports.object({
14731
14798
  goalId: changedGoal2,
14732
14799
  dependsOnGoalId: external_exports.string().uuid().describe("The Goal it waits on."),
14733
14800
  action: external_exports.enum(["start", "complete"]).describe("What waits: starting goalId, or completing it."),
14734
- reason: external_exports.string().trim().min(1).max(2e3).optional().describe("Why, as an explanation, never as policy.")
14801
+ reason: external_exports.string().trim().min(1).max(250).optional().describe("Why, at most 250 characters, as an explanation, never as policy.")
14735
14802
  }).strict();
14736
14803
  var read2 = { revision: external_exports.number().int().positive().optional() };
14737
14804
  var GoalChangeSchema2 = external_exports.discriminatedUnion("kind", [
@@ -14755,7 +14822,7 @@ var ManageGoalsSchema2 = external_exports.object({
14755
14822
  var ManageGoalsToolSchema2 = external_exports.object({
14756
14823
  changes: external_exports.array(external_exports.discriminatedUnion("kind", [CreateChange2, EditChange2, StateChange2, AssignChange2, DeferChange2, MoveChange2, DependencyChange2])).min(1).max(50).describe("The changes, applied in order, each on its own.")
14757
14824
  }).strict().superRefine((v, ctx) => editNames2(v.changes, ctx));
14758
- var MANAGE_GOALS_DESCRIPTION2 = "Create, edit, assign, organize or close work. Every change here changes Goals; answering, withdrawing or asking Questions stays in contact. Each change applies independently: a refused one names why (`results[i].error`, e.g. goal_revision_conflict, goal_children_open, goal_not_found) and the rest still apply, so read every result: a partial result is never a complete success. Kinds: create (title, outcome, ownerId, parentGoalId, sourceEntryIds) returns the new Goal's id in `results[i].goalId`, in the order requested, to use in later calls; edit (title and/or outcome); state (open, completed, canceled); assign (ownerId); defer (until: the Goal waits until then and its owner is woken when it passes; null takes it back); move (parentGoalId, or null for a root: only this Goal moves); dependency (add or remove: goalId waits on dependsOnGoalId to start or to complete). A Goal cannot be completed while its required children or dependencies remain open: finish or move them first. Finishing the children does not prove the parent's own work is done. An edit applies at the version you last read: if someone changed the Goal since, it is refused as goal_revision_conflict, so read it again (get_goal) and reconsider. You may change any Goal of your person; a change puts you on it. Returns `ok` (every change applied), `results` per change (applied or failed), and `goals`, each changed Goal's id, state, title, outcome and revision.";
14825
+ var MANAGE_GOALS_DESCRIPTION2 = "Create, edit, assign, organize or close work. Every change here changes Goals; answering, withdrawing or asking Questions stays in contact. Each change applies independently: a refused one names why (`results[i].error`, e.g. goal_revision_conflict, goal_children_open, goal_not_found) and the rest still apply, so read every result: a partial result is never a complete success. Kinds: create (title, outcome, ownerId, parentGoalId, sourceEntryIds) returns the new Goal's id in `results[i].goalId`, in the order requested, to use in later calls (an outcome is one paragraph, at most 500 characters: split more into child Goals with parentGoalId); edit (title and/or outcome); state (open, completed, canceled); assign (ownerId); defer (until: the Goal waits until then and its owner is woken when it passes; null takes it back); move (parentGoalId, or null for a root: only this Goal moves); dependency (add or remove: goalId waits on dependsOnGoalId to start or to complete). A Goal cannot be completed while its required children or dependencies remain open: finish or move them first. Finishing the children does not prove the parent's own work is done. An edit applies at the version you last read: if someone changed the Goal since, it is refused as goal_revision_conflict, so read it again (get_goal) and reconsider. You may change any Goal of your person; a change puts you on it. Returns `ok` (every change applied), `results` per change (applied or failed), and `goals`, each changed Goal's id, state, title, outcome and revision.";
14759
14826
  var GetGoalSchema2 = external_exports.object({
14760
14827
  goalId: external_exports.string().uuid(),
14761
14828
  /** Every entry in full. Without it the read carries the person's words, open questions and your
@@ -14773,7 +14840,7 @@ var SearchToolSchema2 = external_exports.object({
14773
14840
  goalId: external_exports.string().uuid().optional(),
14774
14841
  limit: external_exports.number().int().min(1).max(20).optional()
14775
14842
  }).strict();
14776
- var SEARCH_DESCRIPTION2 = "Search your person's history across all of their agents: Entries (what anyone said or wrote, typed or spoken on a call), Goals (by title and outcome) and Answers (found by their Question or by the words that gave them). query is words to look for; records sharing more of its words rank first, and exact names work. types narrows it to entry, goal and/or answer (default: all three). goalId searches under one Goal: its Entries, its Questions' Answers, and it and its immediate children. limit is matches per type, 1 to 20 (default 8). Read-only. Each match carries its whole saved words, its ID and its links (an Answer carries its Question, the choice made and the Entries that support it); `omitted` counts what matched but was left out, so narrow the words or add a goalId to see it. Nothing found is not proof that nothing exists; a refused search says why. Sealed (encrypted) content is never searched or returned.";
14843
+ var SEARCH_DESCRIPTION2 = "Search your person's history across all of their agents: Entries (what anyone said or wrote, typed or spoken on a call), Goals (by title and outcome) and replies -- the person's answers, acknowledgements and deferrals (type answer; found by their summary, by the question or report they reply to, or by the words that gave them). query is words to look for; records sharing more of its words rank first, and exact names work. types narrows it to entry, goal and/or answer (default: all three). goalId searches under one Goal: its Entries, the replies to its items, and it and its immediate children. limit is matches per type, 1 to 20 (default 8). Read-only. Each match carries its whole saved words, its ID and its links (a reply carries its kind -- answered, acknowledged or deferred -- whether it is closed (a deferral is not), its summary in under ten words, its question or report, the choice made and the Entries that support it); `omitted` counts what matched but was left out, so narrow the words or add a goalId to see it. Nothing found is not proof that nothing exists; a refused search says why. Sealed (encrypted) content is never searched or returned.";
14777
14844
  var CheckActivitySchema2 = external_exports.object({}).strict();
14778
14845
  var FEEDBACK_TEXT_MAX2 = 5e4;
14779
14846
  var SendFeedbackSchema2 = external_exports.object({
@@ -14836,6 +14903,7 @@ var QuestionChangeSchema2 = external_exports.union([
14836
14903
  external_exports.object({
14837
14904
  kind: external_exports.literal("create"),
14838
14905
  text: external_exports.string().min(1),
14906
+ summary: external_exports.string().optional(),
14839
14907
  answererId: participant2,
14840
14908
  goal: ResultRefSchema2.optional(),
14841
14909
  blocks: external_exports.array(external_exports.object({ question: ResultRefSchema2 }).strict()),
@@ -14886,12 +14954,12 @@ var BrainSearchSchema2 = external_exports.object({
14886
14954
  }).strict();
14887
14955
  var BrainResultSchema2 = external_exports.object({
14888
14956
  messages: external_exports.array(BrainMessageSchema2),
14889
- entries: external_exports.array(external_exports.object({ key: key2, sources: external_exports.array(SourceSchema2).min(1), goals: external_exports.array(ResultRefSchema2) }).strict()),
14957
+ entries: external_exports.array(external_exports.object({ key: key2, sources: external_exports.array(SourceSchema2).min(1), goals: external_exports.array(ResultRefSchema2), summary: external_exports.string().optional() }).strict()),
14890
14958
  questions: external_exports.array(external_exports.object({ key: key2, entryKeys: external_exports.array(key2), change: QuestionChangeSchema2 }).strict()),
14891
14959
  answers: external_exports.array(external_exports.object({
14892
14960
  question: ResultRefSchema2,
14893
14961
  entryKeys: external_exports.array(key2).min(1),
14894
- summary: external_exports.string().min(1),
14962
+ summary: external_exports.string(),
14895
14963
  selectedOptionIds: external_exports.array(external_exports.string().min(1)).optional()
14896
14964
  }).strict()),
14897
14965
  goals: external_exports.array(external_exports.object({ key: key2, entryKeys: external_exports.array(key2), change: BrainGoalChangeSchema2 }).strict()),
@@ -14936,12 +15004,15 @@ var TalkerReplySchema2 = external_exports.object({
14936
15004
  messages: external_exports.array(external_exports.object({ key: str22, to: str22, text: str22, about: strs22, blocks: str22 }).strict()),
14937
15005
  /** What the call does next: listen, hold (the person asked for a moment) or end (they asked to). */
14938
15006
  then: external_exports.enum(["listen", "hold", "end"]),
14939
- /** Items the person's words settle: the item's handle, the chosen option IDs, the line handles. */
14940
- answers: external_exports.array(external_exports.object({ item: str22, options: strs22, lines: strs22 }).strict()),
14941
- /** The line handles that hold a new instruction from the person. */
15007
+ /** The person's replies to items (replies, owner 2026-10-07): the item's handle, the chosen option
15008
+ * IDs, the line handles, how they replied in under ten words (keeping any condition), and `defer`:
15009
+ * "" when their words settle the item, else what a reply that puts it off waits for -- "call" (the
15010
+ * end of this call), a question's handle (that question's answer) or an ISO time. */
15011
+ replies: external_exports.array(external_exports.object({ item: str22, options: strs22, lines: strs22, summary: str22, defer: str22 }).strict()),
15012
+ /** The line handles that tell the talker how to run this call; they last until it ends and reach no agent. */
14942
15013
  instruction: strs22,
14943
- /** The line handles that ask for new work, a change to existing work, or a standing rule: the filer
14944
- * reads only these (3e). */
15014
+ /** The line handles the filer acts on, and the only ones it reads (3e): new work, a change to existing
15015
+ * work, feedback on Paigy, anything said to an agent, and any rule meant to outlast the call. */
14945
15016
  file: strs22,
14946
15017
  /** Evidence to fetch for a second round: a search, an item's full text, or an agent by name. */
14947
15018
  need: external_exports.object({ kind: external_exports.enum(["search", "item", "agent", ""]), text: str22 }).strict(),
@@ -14954,8 +15025,9 @@ var TALKER_REPLY_JSON_SCHEMA2 = (({ $schema: _, ...rest }) => rest)(
14954
15025
  var str32 = external_exports.string();
14955
15026
  var strs32 = external_exports.array(external_exports.string());
14956
15027
  var FilerReplySchema2 = external_exports.object({
14957
- /** Which Goals each new line goes on: a line's handle and Goal handles (or keys of new Goals). */
14958
- filed: external_exports.array(external_exports.object({ line: str32, goals: strs32 }).strict()),
15028
+ /** Which Goals each new line goes on: a line's handle, Goal handles (or keys of new Goals), and what
15029
+ * the line says in at most ten words. */
15030
+ filed: external_exports.array(external_exports.object({ line: str32, goals: strs32, summary: str32 }).strict()),
14959
15031
  goals: external_exports.array(external_exports.object({
14960
15032
  op: external_exports.enum(["create", "edit", "complete", "cancel", "reopen", "assign", "defer", "move", "block", "unblock"]),
14961
15033
  key: str32,
@@ -14974,6 +15046,7 @@ var FilerReplySchema2 = external_exports.object({
14974
15046
  key: str32,
14975
15047
  question: str32,
14976
15048
  text: str32,
15049
+ summary: str32,
14977
15050
  to: str32,
14978
15051
  goal: str32,
14979
15052
  options: external_exports.array(external_exports.object({ id: str32, label: str32 }).strict()),
@@ -14987,6 +15060,58 @@ var FilerReplySchema2 = external_exports.object({
14987
15060
  var FILER_REPLY_JSON_SCHEMA2 = (({ $schema: _, ...rest }) => rest)(
14988
15061
  zodToJsonSchema2(FilerReplySchema2, { $refStrategy: "none" })
14989
15062
  );
15063
+ var ExplainerReplySchema2 = external_exports.object({
15064
+ /** The explanation, as sentences, spoken in order. */
15065
+ say: external_exports.array(external_exports.string()),
15066
+ /** Questions to an agent about gaps in what it read: the agent's handle and the question. */
15067
+ followUps: external_exports.array(external_exports.object({ to: external_exports.string(), text: external_exports.string() }).strict())
15068
+ }).strict();
15069
+ var EXPLAINER_REPLY_JSON_SCHEMA2 = (({ $schema: _, ...rest }) => rest)(
15070
+ zodToJsonSchema2(ExplainerReplySchema2, { $refStrategy: "none" })
15071
+ );
15072
+ var DISTILLER_DEFECTS2 = [
15073
+ "reasked",
15074
+ // a question put to the person again after they answered it
15075
+ "unsupported",
15076
+ // a fact stated that nothing in the input supports
15077
+ "unsaid",
15078
+ // an agent's answer arrived during the call and was never said
15079
+ "skipped",
15080
+ // an agenda item never put to the person
15081
+ "unsaved",
15082
+ // something the person answered or asked for did not save, was refused or dropped
15083
+ "ignored",
15084
+ // the person asked or said something and was never answered (the critic's ignored_a_question)
15085
+ "promised"
15086
+ // said it did or would do something, and nothing shows it done (the critic's broken_promise)
15087
+ ];
15088
+ var DistillerReplySchema2 = external_exports.object({
15089
+ defects: external_exports.array(external_exports.object({
15090
+ kind: external_exports.enum(DISTILLER_DEFECTS2),
15091
+ /** The handles of the lines it shows in. */
15092
+ lines: external_exports.array(external_exports.string()),
15093
+ /** The handle of the record it concerns, or "". */
15094
+ about: external_exports.string(),
15095
+ /** One plain sentence, in words, never handles: it is what the feedback row keeps. */
15096
+ why: external_exports.string()
15097
+ }).strict())
15098
+ }).strict();
15099
+ var DISTILLER_REPLY_JSON_SCHEMA2 = (({ $schema: _, ...rest }) => rest)(
15100
+ zodToJsonSchema2(DistillerReplySchema2, { $refStrategy: "none" })
15101
+ );
15102
+ var TIDY_AUDIENCES2 = ["talker", "filer", "agents"];
15103
+ var TidyReplySchema2 = external_exports.object({
15104
+ lessons: external_exports.array(external_exports.object({
15105
+ lesson: external_exports.string(),
15106
+ op: external_exports.enum(["keep", "revise", "withdraw"]),
15107
+ text: external_exports.string(),
15108
+ for: external_exports.enum([...TIDY_AUDIENCES2, ""]),
15109
+ into: external_exports.string()
15110
+ }).strict())
15111
+ }).strict();
15112
+ var TIDY_REPLY_JSON_SCHEMA2 = (({ $schema: _, ...rest }) => rest)(
15113
+ zodToJsonSchema2(TidyReplySchema2, { $refStrategy: "none" })
15114
+ );
14990
15115
  function entryWords(entry) {
14991
15116
  const content = entry.content;
14992
15117
  if (content && "sealed" in content) return "";
@@ -15686,7 +15811,7 @@ var ConnectionSummarySchema2 = external_exports.object({
15686
15811
  * desktop app while open. Null = never seen; stale = offline. */
15687
15812
  lastSeenAt: external_exports.string().datetime().nullable().optional(),
15688
15813
  /** WORKING, NOT JUST CONNECTED (owner, 2026-09-30): the last time the agent itself acted on one of
15689
- * its Goals — took its lease or recorded an operation (`tokens.last_worked_at`). Within
15814
+ * its Goals — wrote on one or recorded an operation (`tokens.last_worked_at`). Within
15690
15815
  * `WORKING_MS` it is working; otherwise it is connected but idle. Null = not seen working yet. */
15691
15816
  lastWorkedAt: external_exports.string().datetime().nullable().optional(),
15692
15817
  /** The oldest of its Goals that is `ready` for it — work handed to it that nobody has started.
@@ -15884,7 +16009,7 @@ var QueueItemSchema2 = external_exports.object({
15884
16009
  *
15885
16010
  * IT IS THE PAYLOAD'S OWN HASH, NEVER A STAMP ON THE WORK. Nothing here reasons about which
15886
16011
  * writes change which field — the comparison is over the bytes the phone is holding, so a fact
15887
- * the row shows that no `updated_at` moves for (a lease lapsing, a dependency's state, a
16012
+ * the row shows that no `updated_at` moves for (`active` lapsing, a dependency's state, a
15888
16013
  * sibling appearing in `childGoalIds`) cannot go unnoticed. Optional because a hand-built
15889
16014
  * queue (a fixture, the demo) spells none, and a row with no rev is simply always re-sent. */
15890
16015
  rev: external_exports.string().optional()
@@ -16199,14 +16324,13 @@ var CallRecapSchema2 = external_exports.object({
16199
16324
  owner: external_exports.string(),
16200
16325
  state: external_exports.string(),
16201
16326
  questions: external_exports.array(external_exports.object({ id: external_exports.string().uuid(), state: external_exports.string(), title: external_exports.string() })),
16202
- /** `words` is always what they SAID, verbatim — the record, never replaced. `headline` is
16203
- * their answer on one line when the call's read wrote one (owner, 2026-10-01: "render them
16204
- * summarized like a pre-made option is"), so the row scans like a chosen option and their
16205
- * own words stay under it. Absent on every line stored before the read wrote them, and on
16206
- * anything that is not an answer. */
16327
+ /** `words` is always what they SAID, verbatim — the record, never replaced. `summary` is what
16328
+ * the line says in ten words (owner, 2026-10-07): the filer's, or the talker's for the answer it
16329
+ * gave, so the row scans like a chosen option and their own words stay under it. Absent when
16330
+ * neither wrote one. */
16207
16331
  /** `about` is the request the line answered (its question), null for words that answered none —
16208
16332
  * the key the screen groups on, so one question is one row however many times it was answered. */
16209
- lines: external_exports.array(external_exports.object({ entryId: external_exports.string().uuid(), words: external_exports.string(), headline: external_exports.string().optional(), about: external_exports.string().nullable().optional() }))
16333
+ lines: external_exports.array(external_exports.object({ entryId: external_exports.string().uuid(), words: external_exports.string(), summary: external_exports.string().optional(), about: external_exports.string().nullable().optional() }))
16210
16334
  })),
16211
16335
  unfiled: external_exports.array(external_exports.object({ lineId: external_exports.string().uuid(), words: external_exports.string(), atMs: external_exports.number() })),
16212
16336
  more: external_exports.object({ lines: external_exports.number(), entries: external_exports.number(), topics: external_exports.number() })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paigy/harness",
3
- "version": "0.3.36",
3
+ "version": "0.3.37",
4
4
  "description": "Run Claude Code / Codex on this machine, bridged to Paigy — launchable from your phone.",
5
5
  "license": "MIT",
6
6
  "type": "module",