@paigy/harness 0.3.45 → 0.3.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -32
- package/dist/cli.js +632 -222
- package/dist/main.js +597 -206
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -901,14 +901,14 @@ var require_regex = __commonJS({
|
|
|
901
901
|
var TEST_KANJI = new RegExp("^" + kanji + "$");
|
|
902
902
|
var TEST_NUMERIC = new RegExp("^" + numeric + "$");
|
|
903
903
|
var TEST_ALPHANUMERIC = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
|
|
904
|
-
exports.testKanji = function testKanji(
|
|
905
|
-
return TEST_KANJI.test(
|
|
904
|
+
exports.testKanji = function testKanji(str) {
|
|
905
|
+
return TEST_KANJI.test(str);
|
|
906
906
|
};
|
|
907
|
-
exports.testNumeric = function testNumeric(
|
|
908
|
-
return TEST_NUMERIC.test(
|
|
907
|
+
exports.testNumeric = function testNumeric(str) {
|
|
908
|
+
return TEST_NUMERIC.test(str);
|
|
909
909
|
};
|
|
910
|
-
exports.testAlphanumeric = function testAlphanumeric(
|
|
911
|
-
return TEST_ALPHANUMERIC.test(
|
|
910
|
+
exports.testAlphanumeric = function testAlphanumeric(str) {
|
|
911
|
+
return TEST_ALPHANUMERIC.test(str);
|
|
912
912
|
};
|
|
913
913
|
}
|
|
914
914
|
});
|
|
@@ -1410,13 +1410,13 @@ var require_segments = __commonJS({
|
|
|
1410
1410
|
var Regex = require_regex();
|
|
1411
1411
|
var Utils = require_utils();
|
|
1412
1412
|
var dijkstra = require_dijkstra();
|
|
1413
|
-
function getStringByteLength(
|
|
1414
|
-
return unescape(encodeURIComponent(
|
|
1413
|
+
function getStringByteLength(str) {
|
|
1414
|
+
return unescape(encodeURIComponent(str)).length;
|
|
1415
1415
|
}
|
|
1416
|
-
function getSegments(regex, mode,
|
|
1416
|
+
function getSegments(regex, mode, str) {
|
|
1417
1417
|
const segments = [];
|
|
1418
1418
|
let result;
|
|
1419
|
-
while ((result = regex.exec(
|
|
1419
|
+
while ((result = regex.exec(str)) !== null) {
|
|
1420
1420
|
segments.push({
|
|
1421
1421
|
data: result[0],
|
|
1422
1422
|
index: result.index,
|
|
@@ -4250,13 +4250,13 @@ var require_svg_tag = __commonJS({
|
|
|
4250
4250
|
var Utils = require_utils2();
|
|
4251
4251
|
function getColorAttrib(color, attrib) {
|
|
4252
4252
|
const alpha = color.a / 255;
|
|
4253
|
-
const
|
|
4254
|
-
return alpha < 1 ?
|
|
4253
|
+
const str = attrib + '="' + color.hex + '"';
|
|
4254
|
+
return alpha < 1 ? str + " " + attrib + '-opacity="' + alpha.toFixed(2).slice(1) + '"' : str;
|
|
4255
4255
|
}
|
|
4256
4256
|
function svgCmd(cmd, x, y) {
|
|
4257
|
-
let
|
|
4258
|
-
if (typeof y !== "undefined")
|
|
4259
|
-
return
|
|
4257
|
+
let str = cmd + x;
|
|
4258
|
+
if (typeof y !== "undefined") str += " " + y;
|
|
4259
|
+
return str;
|
|
4260
4260
|
}
|
|
4261
4261
|
function qrToPath(data, size, margin) {
|
|
4262
4262
|
let path = "";
|
|
@@ -10006,7 +10006,7 @@ var OptionInputSchema = external_exports.object({
|
|
|
10006
10006
|
imgUrl: OptionSchema.shape.image
|
|
10007
10007
|
}).strict();
|
|
10008
10008
|
var NIGHT = { from: 23, to: 7 };
|
|
10009
|
-
var ASK_MAX =
|
|
10009
|
+
var ASK_MAX = 80;
|
|
10010
10010
|
var UNITS_MAX = 12;
|
|
10011
10011
|
var UNIT_TITLE_MAX = 50;
|
|
10012
10012
|
var UNIT_BODY_MAX = 200;
|
|
@@ -10071,15 +10071,15 @@ var CompletionSchema = external_exports.object({
|
|
|
10071
10071
|
}).strict();
|
|
10072
10072
|
var CompleteChangeSchema = CompletionSchema.extend({ kind: external_exports.literal("complete") });
|
|
10073
10073
|
var ASKING_RULES = `HOW TO ASK:
|
|
10074
|
-
1.
|
|
10075
|
-
2.
|
|
10076
|
-
3. \`workItBlocks\` only
|
|
10077
|
-
4.
|
|
10078
|
-
5. One question, one row
|
|
10079
|
-
6. Read the Goal
|
|
10080
|
-
7.
|
|
10081
|
-
8. A diagnosis says when, why and how it happens, then proposes one fix.
|
|
10082
|
-
9.
|
|
10074
|
+
1. One question per object in \`questions\`, so each is answered on its own.
|
|
10075
|
+
2. \`goalId\` names the existing Goal it is about (create one with manage_goals first); the answer comes back there.
|
|
10076
|
+
3. \`workItBlocks\` only when you are truly blocked: it asks for a call.
|
|
10077
|
+
4. No while-loops. While any Call is open, even one your question joined from their items, keep receiving through empty windows; otherwise stop at one: the answer reaches you on the Goal. Yield only with a listener or wakeup.
|
|
10078
|
+
5. One question, one row: never re-send one still waiting; take back one that no longer matters with \`withdrawQuestionIds\`.
|
|
10079
|
+
6. Read the Goal before asking; never re-ask what was answered or shipped. \`replied\` means they chose no option: it is still yours to settle.
|
|
10080
|
+
7. Give options when you have them. Each label names its choice in full (never "Option 2"); never add "Other". \`pickMode\`: one (default), many, rank.
|
|
10081
|
+
8. A diagnosis says when, why and how it happens, then proposes one fix.
|
|
10082
|
+
9. Give a report its \`reply\`: one line in THEIR voice for THAT report, so you learn whether they verified it or only received it. Required when it is delivered or its Goal is done.`;
|
|
10083
10083
|
function draft2020(node) {
|
|
10084
10084
|
if (Array.isArray(node)) return node.map(draft2020);
|
|
10085
10085
|
if (node && typeof node === "object") {
|
|
@@ -10122,7 +10122,7 @@ var userExplicitlyRequested = external_exports.enum(["any", "call"]).optional().
|
|
|
10122
10122
|
`Only what the person said about THIS message, in so many words: "any" when they asked you to send it to them ("send it to my phone", "message me the result"), "call" when they asked to be called about it. It is then delivered (a call rings for the whole contact, and carries everything waiting on them); omitted, an update is only recorded as the Goal's progress unless the person needs it. Never set it to make a message louder.`
|
|
10123
10123
|
);
|
|
10124
10124
|
var units = external_exports.array(UnitInputSchema).optional().describe(
|
|
10125
|
-
`The context this message needs, as up to ${UNITS_MAX} units in reading order, each {title, body}: a title of at most ${UNIT_TITLE_MAX} characters and a body of at most ${UNIT_BODY_MAX}. One idea per unit. Leave it out when the main text says it all.`
|
|
10125
|
+
`The context this message needs, as up to ${UNITS_MAX} units in reading order, each {title, body}: a title of at most ${UNIT_TITLE_MAX} characters and a body of at most ${UNIT_BODY_MAX}. One idea per unit. Leave it out when the main text says it all. Over a cap is refused by name (ask_too_long, too_many_units, unit_title_too_long, unit_body_too_long) and nothing is sent.`
|
|
10126
10126
|
);
|
|
10127
10127
|
var UpdateInputSchema = external_exports.object({
|
|
10128
10128
|
message: external_exports.string().trim().min(1).describe(`The one point, at most ${ASK_MAX} characters; the context goes in units.`),
|
|
@@ -10177,11 +10177,11 @@ var questionFields = {
|
|
|
10177
10177
|
),
|
|
10178
10178
|
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."),
|
|
10179
10179
|
units,
|
|
10180
|
-
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."),
|
|
10180
|
+
options: external_exports.array(OptionInputSchema).min(1).max(6).optional().describe("The choices, when you have them. Each label stands on its own and differs from the others (duplicate_option_label), at most 50 characters; a hint, at most 200. They can always answer in their own words, so no 'Other' or 'None of these'."),
|
|
10181
10181
|
// HOW THE OPTIONS ARE ANSWERED, SAID BY THE AGENT (owner, 2026-10-02: "one and many makes sense";
|
|
10182
10182
|
// brain_prompts.md §1: structured agent questions need no model). The app draws all three.
|
|
10183
10183
|
pickMode: external_exports.enum(["one", "many", "rank"]).optional().describe(
|
|
10184
|
-
'How the options are answered: "one" (the default) a pick, for alternatives; "many" a checklist, for independent options they may want several of; "rank" an order of all of them. Only with options.'
|
|
10184
|
+
'How the options are answered: "one" (the default) a pick, for alternatives; "many" a checklist, for independent options they may want several of; "rank" an order of all of them. Only with options; "many" and "rank" need at least two (too_few_options).'
|
|
10185
10185
|
),
|
|
10186
10186
|
// WHAT THE QUESTION HOLDS UP (brain_prompts.md §2.1): replaces `waiting: 'hard'`. A question that
|
|
10187
10187
|
// blocks work asks for a call (the person's settings and ring cooldowns still decide).
|
|
@@ -10193,11 +10193,39 @@ var questionFields = {
|
|
|
10193
10193
|
var refineQuestion = (q, ctx) => {
|
|
10194
10194
|
refuseOverCaps(q.question, q.units, "question", ctx);
|
|
10195
10195
|
if (q.pickMode && !q.options) ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["pickMode"], message: "pickMode comes only with options" });
|
|
10196
|
+
refuseThinOptions(q, ctx);
|
|
10196
10197
|
const ids = (q.options ?? []).map((o) => o.id);
|
|
10197
10198
|
if (ids.some((id22) => id22) && (ids.some((id22) => !id22) || new Set(ids).size !== ids.length)) {
|
|
10198
10199
|
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["options"], message: "give every option a distinct id, or none" });
|
|
10199
10200
|
}
|
|
10200
10201
|
};
|
|
10202
|
+
var MIN_LIST_OPTIONS = 2;
|
|
10203
|
+
function refuseThinOptions(q, ctx) {
|
|
10204
|
+
const options = q.options ?? [];
|
|
10205
|
+
if ((q.pickMode === "many" || q.pickMode === "rank") && options.length < MIN_LIST_OPTIONS) {
|
|
10206
|
+
ctx.addIssue({
|
|
10207
|
+
code: external_exports.ZodIssueCode.custom,
|
|
10208
|
+
path: ["options"],
|
|
10209
|
+
params: { refusal: "too_few_options", length: options.length, min: MIN_LIST_OPTIONS },
|
|
10210
|
+
message: `too_few_options: pickMode "${q.pickMode}" needs at least ${MIN_LIST_OPTIONS} options; this question has ${options.length}. Add the other choices, or leave pickMode out.`
|
|
10211
|
+
});
|
|
10212
|
+
}
|
|
10213
|
+
const seen = /* @__PURE__ */ new Map();
|
|
10214
|
+
options.forEach((o, index) => {
|
|
10215
|
+
const key22 = o.label.trim().toLowerCase();
|
|
10216
|
+
const first = seen.get(key22);
|
|
10217
|
+
if (first === void 0) {
|
|
10218
|
+
seen.set(key22, index);
|
|
10219
|
+
return;
|
|
10220
|
+
}
|
|
10221
|
+
ctx.addIssue({
|
|
10222
|
+
code: external_exports.ZodIssueCode.custom,
|
|
10223
|
+
path: ["options", index, "label"],
|
|
10224
|
+
params: { refusal: "duplicate_option_label", index, first },
|
|
10225
|
+
message: `duplicate_option_label: options[${index}] repeats the label of options[${first}]. Each option names a different choice.`
|
|
10226
|
+
});
|
|
10227
|
+
});
|
|
10228
|
+
}
|
|
10201
10229
|
var QuestionInputSchema = external_exports.object({
|
|
10202
10230
|
questionId: external_exports.string().uuid().optional().describe("Optional: your own stable id for this question (a UUID), so a resend is the same question. Minted for you when omitted; the result returns it."),
|
|
10203
10231
|
...questionFields
|
|
@@ -10219,21 +10247,26 @@ var QuestionDependencySchema = external_exports.object({
|
|
|
10219
10247
|
reason: reason.optional()
|
|
10220
10248
|
}).strict().refine(actionFits, ACTION_FITS);
|
|
10221
10249
|
var sendFields = {
|
|
10222
|
-
completions: external_exports.array(CompletionSchema).min(1).max(20).optional().describe(
|
|
10250
|
+
completions: external_exports.array(CompletionSchema).min(1).max(20).optional().describe(
|
|
10251
|
+
"COMPLETIONS close and report in one operation, the same contract as manage_goals kind:complete: closure and the report commit together or neither does. Required children and dependencies must already be finished. options suggest next steps: a tap acknowledges the report and requests that step, and never reopens the Goal (follow-up work needs a new one). No reviewer rejudges it: say only what your evidence supports. Ordinary updates never close a Goal."
|
|
10252
|
+
),
|
|
10223
10253
|
updates: external_exports.array(UpdateInputSchema).min(1).max(20).optional().describe(
|
|
10224
|
-
"News: progress, findings, a result. An update asks nothing. It reaches the person only when they asked for it (userExplicitlyRequested), when it answers something they said, or once its Goal is done; otherwise it is recorded as the Goal's progress
|
|
10254
|
+
"News: progress, findings, a result. An update asks nothing. It reaches the person only when they asked for it (userExplicitlyRequested), when it answers something they said, or once its Goal is done; otherwise it is recorded as the Goal's progress, which the person is not told. Every update reaches the other agents that wrote on its Goal in the last hour: to tell another agent something, write it as an update on that agent's Goal."
|
|
10225
10255
|
),
|
|
10226
10256
|
answers: external_exports.array(AnswerInputSchema).min(1).max(20).optional().describe("Answers to Questions addressed to you."),
|
|
10227
10257
|
withdrawQuestionIds: external_exports.array(questionHandle).min(1).max(10).optional().describe(
|
|
10228
10258
|
"Questions you asked that no longer need an answer: you acted on them yourself, they no longer matter, or you asked wrongly. Each is cancelled, not answered: its card closes and nothing rings for it."
|
|
10229
10259
|
),
|
|
10260
|
+
bumpQuestionIds: external_exports.array(questionHandle).min(1).max(10).optional().describe(
|
|
10261
|
+
"Your own questions still waiting on the person that you want them to notice again. Each moves back to the top of its card with one new notification; nothing is resent and no second card is made."
|
|
10262
|
+
),
|
|
10230
10263
|
questionDependencies: external_exports.array(QuestionDependencySchema).min(1).max(20).optional().describe(
|
|
10231
10264
|
"Add or remove what a Question you asked holds up, after asking it."
|
|
10232
10265
|
)
|
|
10233
10266
|
};
|
|
10234
10267
|
var ContactSchema = external_exports.object({
|
|
10235
10268
|
...sendFields,
|
|
10236
|
-
questions: external_exports.array(QuestionInputSchema).min(1).max(20).optional().describe("Questions for the person, one per object."),
|
|
10269
|
+
questions: external_exports.array(QuestionInputSchema).min(1).max(20).optional().describe("Questions for the person, one per object, each sent exactly as written, with no reading in between."),
|
|
10237
10270
|
/** RECEIVING (2I, I2; brain_prompts.md §2.2): the events this agent handled. */
|
|
10238
10271
|
ackEventIds: external_exports.array(external_exports.string().uuid()).min(1).max(100).optional().describe(
|
|
10239
10272
|
"The exact eventIds of the events you have handled: an acknowledgment (ACK). Reading alone acknowledges nothing, so an event comes back until you acknowledge it; after that the next batch can come. Each recipient acknowledges separately, for itself only. A Question you owe is answered (answers), never acknowledged away."
|
|
@@ -10242,22 +10275,34 @@ var ContactSchema = external_exports.object({
|
|
|
10242
10275
|
"Only controls when this returns. Sending: false (the default) returns at once; true waits up to about 45 seconds for a response to what you sent. Sending nothing: true (the default) waits up to about 45 seconds for anything addressed to you; false returns what is waiting now. It does not mean work is blocked, set urgency, or ask for a call. `waitOutcome` says which happened: `available`, `expired` (nothing arrived; wait again without sending again), or `not_waited`."
|
|
10243
10276
|
)
|
|
10244
10277
|
}).strict();
|
|
10245
|
-
var sendsAnything = (c) => !!(c.completions?.length || c.updates?.length || c.questions?.length || c.answers?.length || c.withdrawQuestionIds?.length || c.questionDependencies?.length);
|
|
10278
|
+
var sendsAnything = (c) => !!(c.completions?.length || c.updates?.length || c.questions?.length || c.answers?.length || c.withdrawQuestionIds?.length || c.bumpQuestionIds?.length || c.questionDependencies?.length);
|
|
10246
10279
|
var ContactWireSchema = external_exports.object({
|
|
10247
10280
|
operationId: external_exports.string().uuid(),
|
|
10248
10281
|
...sendFields,
|
|
10249
10282
|
questions: external_exports.array(QuestionWireSchema).min(1).max(20).optional()
|
|
10250
10283
|
}).strict().refine(sendsAnything, "a contact sends at least one update, question, answer, withdrawal or question dependency");
|
|
10251
10284
|
var CONTACT_SCHEMA = { type: "object", ...mcpInputSchema(ContactSchema) };
|
|
10252
|
-
var CONTACT_DESCRIPTION = "Send to and receive from the person: completions, updates, questions, answers to questions addressed to you, withdrawals
|
|
10253
|
-
|
|
10254
|
-
CUT A LONG MESSAGE BEFORE YOU SEND IT: a question, an update's message or an answer is the one point, in at most ${ASK_MAX} characters; everything else it needs goes in 'units', up to ${UNITS_MAX} {title, body} in reading order, one idea each, every title at most ${UNIT_TITLE_MAX} characters and every body at most ${UNIT_BODY_MAX}. The person sees the main text and the titles, and opens a unit to read its body. Over a cap is refused by name (ask_too_long, too_many_units, unit_title_too_long, unit_body_too_long) and nothing is sent.
|
|
10285
|
+
var CONTACT_DESCRIPTION = "Send to and receive from the person: completions, updates, questions, answers to questions addressed to you, withdrawals, and what a question holds up. Every Goal named must exist: an unknown one refuses the whole contact. Each item applies on its own: read `results`, where a failed one names why.\n\n" + ASKING_RULES + `
|
|
10255
10286
|
|
|
10256
|
-
|
|
10287
|
+
LENGTH: the question, message or answer is the one point, at most ${ASK_MAX} characters; the rest goes in \`units\`, one idea each. Over a cap is refused by name and nothing is sent. Several results are several updates.
|
|
10257
10288
|
|
|
10258
|
-
|
|
10289
|
+
UPDATES ask nothing. One reaches the person only when they asked for it, it answers something they said, or its Goal is done; else it is kept as progress. One that reaches them joins an open report card or a live call.
|
|
10259
10290
|
|
|
10260
|
-
RECEIVING:
|
|
10291
|
+
RECEIVING: contact({}) waits ~45 s; contact({wait:false}) returns \`events\` at once. Confirm the ones you handled with contact({ackEventIds}).`;
|
|
10292
|
+
var HELP_TOPICS = ["pairing", "listening", "receiving", "asking", "updates", "goals", "calls"];
|
|
10293
|
+
var unknownTopic = (topic) => `unknown_topic: ${JSON.stringify(topic)} is not a section of the guide. Topics: ${HELP_TOPICS.join(", ")}; or omit topic for the whole guide.`;
|
|
10294
|
+
var HelpSchema = external_exports.object({
|
|
10295
|
+
topic: external_exports.enum(HELP_TOPICS, { errorMap: (_issue, ctx) => ({ message: unknownTopic(ctx.data) }) }).optional().describe("One section of the guide. Omit it for the whole guide.")
|
|
10296
|
+
}).strict();
|
|
10297
|
+
var HELP_DESCRIPTION = "Start here: how to use Paigy, in full \u2014 pairing, listening, receiving, asking, updates and completions, Goals and calls. Pass a topic for one section. Read-only; needs no setup.";
|
|
10298
|
+
var AGENT_PROMPTS = [
|
|
10299
|
+
{
|
|
10300
|
+
name: "help",
|
|
10301
|
+
description: "How to use Paigy: the whole guide, or one topic of it.",
|
|
10302
|
+
arguments: [{ name: "topic", description: `One section: ${HELP_TOPICS.join(", ")}. Omit it for the whole guide.`, required: false }]
|
|
10303
|
+
},
|
|
10304
|
+
{ name: "welcome", description: "Start here: who you are on Paigy, then listen and collect your open work." }
|
|
10305
|
+
];
|
|
10261
10306
|
var CreateGoalSchema = external_exports.object({
|
|
10262
10307
|
outcome: external_exports.string().trim().min(1).max(1e4),
|
|
10263
10308
|
/** The work's NAME (#2115) — one to five words, how a person refers to it out loud ("the night
|
|
@@ -10358,9 +10403,12 @@ var GetGoalsSchema = external_exports.object({
|
|
|
10358
10403
|
history: external_exports.boolean().optional()
|
|
10359
10404
|
}).strict();
|
|
10360
10405
|
var GetDeliverySchema = external_exports.object({
|
|
10361
|
-
deliveryId: external_exports.string().uuid().describe("The Delivery id returned by contact or receive.")
|
|
10406
|
+
deliveryId: external_exports.string().uuid().describe("The Delivery id returned by contact or receive."),
|
|
10407
|
+
// WHAT WAS SAID ON A CALL (owner, 2026-10-26, Goal c743f4a4: "A flag on get_delivery", "Any of my agents").
|
|
10408
|
+
transcript: external_exports.boolean().optional().describe("For a Call: also return what was said on it, one page of spoken lines."),
|
|
10409
|
+
after: external_exports.string().max(40).optional().describe("With transcript: the next value the previous page returned, to read the next page.")
|
|
10362
10410
|
}).strict();
|
|
10363
|
-
var GET_DELIVERY_DESCRIPTION = "Read a Delivery in full: its whole ask, units, options and answers, plus current callState and callOutcome for a Call. Any agent of the same account may read it; another account is not disclosed. Reading never acknowledges or resends anything. Use this after a call or when receive names a Call you are waiting on.";
|
|
10411
|
+
var GET_DELIVERY_DESCRIPTION = "Read a Delivery in full: its whole ask, units, options and answers, plus current callState and callOutcome for a Call. For a Call, transcript: true adds what was said: each spoken line in order, who said it, and when from pickup, a page at a time. A line from the room, not the person, is marked room. Any agent of the same account may read it; another account is not disclosed. Reading never acknowledges or resends anything. Use this after a call or when receive names a Call you are waiting on.";
|
|
10364
10412
|
var GET_GOALS_DESCRIPTION = "Read one to ten Goals by goalIds, returned in the same order under goals (a read never puts you on them). history applies to every requested Goal. A refused read fails the call with its original refusal; no partial result is presented as complete. Each Goal includes its ten most recent other contributors (names, latest entry headlines and times), outcome, state, revision, progress, blockers, the conversation on it (each question with its options and what was decided), `next`, the one step to take, and `more`, where to read further. A question in that conversation reads `open` (nothing yet), `answered` (a choice was made, and `answer` carries it), `replied` (they said something and the read settled the question on their words \u2014 NO option of yours was chosen, and the words are the reply line beside it, so read that before you act), or `closed`. The conversation carries everything the person said, every open question and your newest entry; your older entries are left out and counted \u2014 history: true reads every entry in full. Every Goal of your person is readable, whichever of their agents owns it; another account's Goals are not disclosed.";
|
|
10365
10413
|
var SearchToolSchema = external_exports.object({
|
|
10366
10414
|
query: external_exports.string().trim().min(1).max(500),
|
|
@@ -10387,7 +10435,9 @@ var AGENT_TOOLS = [
|
|
|
10387
10435
|
{ name: "get_goals", description: GET_GOALS_DESCRIPTION, inputSchema: mcpInputSchema(GetGoalsSchema) },
|
|
10388
10436
|
{ name: "search", description: SEARCH_DESCRIPTION, inputSchema: mcpInputSchema(SearchToolSchema) },
|
|
10389
10437
|
{ name: "check_activity", description: "Read your person's agents that contributed in the last 24 hours, newest first: at most 30 agents and their five most recently touched Goals, with their latest entry headline and time. Use get_goals to read a Goal and its other contributors before starting overlapping work. Read-only; no arguments.", inputSchema: mcpInputSchema(CheckActivitySchema) },
|
|
10390
|
-
{ name: "send_feedback", description: SEND_FEEDBACK_DESCRIPTION, inputSchema: mcpInputSchema(SendFeedbackSchema) }
|
|
10438
|
+
{ name: "send_feedback", description: SEND_FEEDBACK_DESCRIPTION, inputSchema: mcpInputSchema(SendFeedbackSchema) },
|
|
10439
|
+
// THE GUIDE FROM INSIDE THE MCP (owner, 2026-10-27): the skill's text, needing no identity (`help.ts`).
|
|
10440
|
+
{ name: "help", description: HELP_DESCRIPTION, inputSchema: mcpInputSchema(HelpSchema) }
|
|
10391
10441
|
];
|
|
10392
10442
|
var AGENT_TOOL_NAMES = AGENT_TOOLS.map((t) => t.name);
|
|
10393
10443
|
var id = external_exports.string().uuid();
|
|
@@ -10475,11 +10525,22 @@ var BrainMessageSchema = external_exports.union([
|
|
|
10475
10525
|
// A MESSAGE TO THE PERSON KEEPS ITS SENTENCES (turns.md): the talker writes them one by one, and each is
|
|
10476
10526
|
// its own unit of speech (`<cycle>:<key>:<n>`). `text` is the same words joined, for every reader of a
|
|
10477
10527
|
// message's words. Absent on results written before sentences.
|
|
10478
|
-
external_exports.object({
|
|
10528
|
+
external_exports.object({
|
|
10529
|
+
...messageBase,
|
|
10530
|
+
to: external_exports.object({ kind: external_exports.literal("user") }).strict(),
|
|
10531
|
+
sentences: external_exports.array(external_exports.string().min(1)).min(1).optional(),
|
|
10532
|
+
// THE REPORTS IT TELLS, BY THEIR OWN IDENTITY (call 9d1c096c, 2026-10-15): the talker's message names the report
|
|
10533
|
+
// Entries it speaks of, so the plan's line names that report rather than re-finding it by its Goal. Absent on
|
|
10534
|
+
// results written before it.
|
|
10535
|
+
tells: external_exports.array(external_exports.object({ id }).strict()).optional()
|
|
10536
|
+
}).strict(),
|
|
10479
10537
|
external_exports.object({
|
|
10480
10538
|
...messageBase,
|
|
10481
10539
|
to: external_exports.object({ kind: external_exports.literal("agent"), agentId: external_exports.string().regex(/^agent:(?!paigy$)\S+$/) }).strict(),
|
|
10482
10540
|
call: external_exports.object({ callId: id, listen: external_exports.literal(true) }).strict().optional(),
|
|
10541
|
+
// WHAT IT ASKS THE AGENT, IN UNDER TEN WORDS (owner, 2026-10-15: "Yes, add the summary"): the talker's own, stored
|
|
10542
|
+
// as the sent Entry's summary, which the recap's "Sent to <agent>: …" row shows. Absent on results written before it.
|
|
10543
|
+
summary: external_exports.string().optional(),
|
|
10483
10544
|
// THE PERSON ASKED TO BE CALLED BACK ONCE THIS AGENT'S WORK IS DONE (turns.md, step 0): the agent owes
|
|
10484
10545
|
// the call, and its next contact about it rings them (`public.callbacks`).
|
|
10485
10546
|
callback: external_exports.literal(true).optional()
|
|
@@ -10506,95 +10567,98 @@ var BrainResultSchema = external_exports.object({
|
|
|
10506
10567
|
next: BrainNextSchema,
|
|
10507
10568
|
search: BrainSearchSchema.optional()
|
|
10508
10569
|
}).strict();
|
|
10509
|
-
var
|
|
10570
|
+
var str2 = external_exports.string();
|
|
10510
10571
|
var strs = external_exports.array(external_exports.string());
|
|
10511
10572
|
var CompactResultSchema = external_exports.object({
|
|
10512
|
-
next: external_exports.object({ say: strs, then: external_exports.enum(["listen", "hold", "end", "none"]), waitFor: strs, reason:
|
|
10513
|
-
messages: external_exports.array(external_exports.object({ key:
|
|
10514
|
-
entries: external_exports.array(external_exports.object({ key:
|
|
10515
|
-
answers: external_exports.array(external_exports.object({ question:
|
|
10573
|
+
next: external_exports.object({ say: strs, then: external_exports.enum(["listen", "hold", "end", "none"]), waitFor: strs, reason: str2, instructions: strs }).strict(),
|
|
10574
|
+
messages: external_exports.array(external_exports.object({ key: str2, to: str2, text: str2, about: strs, entries: strs, owed: strs, inviteToCall: external_exports.boolean() }).strict()),
|
|
10575
|
+
entries: external_exports.array(external_exports.object({ key: str2, from: str2, on: strs }).strict()),
|
|
10576
|
+
answers: external_exports.array(external_exports.object({ question: str2, entries: strs, summary: str2, picked: strs }).strict()),
|
|
10516
10577
|
changes: external_exports.array(external_exports.object({
|
|
10517
|
-
key:
|
|
10578
|
+
key: str2,
|
|
10518
10579
|
what: external_exports.enum(["goal", "question", "lesson"]),
|
|
10519
10580
|
op: external_exports.enum(["create", "edit", "assign", "open", "complete", "cancel", "defer", "move", "block", "unblock", "withdraw", "remember", "revise"]),
|
|
10520
|
-
id:
|
|
10521
|
-
text:
|
|
10522
|
-
title:
|
|
10523
|
-
who:
|
|
10524
|
-
under:
|
|
10581
|
+
id: str2,
|
|
10582
|
+
text: str2,
|
|
10583
|
+
title: str2,
|
|
10584
|
+
who: str2,
|
|
10585
|
+
under: str2,
|
|
10525
10586
|
gate: external_exports.enum(["start", "complete", "answer", "none"]),
|
|
10526
|
-
options: external_exports.array(external_exports.object({ id:
|
|
10587
|
+
options: external_exports.array(external_exports.object({ id: str2, label: str2 }).strict()),
|
|
10527
10588
|
pick: external_exports.enum(["one", "many", "rank", "words"]),
|
|
10528
10589
|
entries: strs
|
|
10529
10590
|
}).strict()),
|
|
10530
10591
|
feedback: external_exports.array(strs),
|
|
10531
|
-
search: external_exports.object({ query:
|
|
10592
|
+
search: external_exports.object({ query: str2, within: strs, goal: str2 }).strict()
|
|
10532
10593
|
}).strict();
|
|
10533
10594
|
var COMPACT_RESULT_JSON_SCHEMA = (({ $schema: _, ...rest }) => rest)(
|
|
10534
10595
|
zodToJsonSchema(CompactResultSchema, { $refStrategy: "none" })
|
|
10535
10596
|
);
|
|
10536
|
-
var
|
|
10597
|
+
var str3 = external_exports.string();
|
|
10537
10598
|
var strs2 = external_exports.array(external_exports.string());
|
|
10538
10599
|
var TalkerReplySchema = external_exports.object({
|
|
10539
10600
|
/** What to say and send, messages to the person first: spoken in the order written. `to` is "user"
|
|
10540
10601
|
* or an agent's handle; `sentences` is what a message to the person says, one short sentence each
|
|
10541
|
-
* ([] to an agent); `text` is what a message to an agent says ("" to the person); `
|
|
10602
|
+
* ([] to an agent); `text` is what a message to an agent says ("" to the person); `summary` is what it
|
|
10603
|
+
* asks the agent, in under ten words, as the person would put it ("" to the person; owner, 2026-10-15:
|
|
10604
|
+
* "Yes, add the summary"), which the recap's "Sent to <agent>: …" row shows; `about` names
|
|
10542
10605
|
* handles; `blocks` is the item a question to an agent must be answered before ("" for none);
|
|
10543
10606
|
* `callback` is true on a message to the agent doing work the person asked to be called back about
|
|
10544
10607
|
* once it is done (false otherwise): that agent then owes the call (turns.md, step 0). */
|
|
10545
|
-
messages: external_exports.array(external_exports.object({ key:
|
|
10608
|
+
messages: external_exports.array(external_exports.object({ key: str3, to: str3, sentences: strs2, text: str3, summary: str3, about: strs2, blocks: str3, callback: external_exports.boolean() }).strict()),
|
|
10546
10609
|
/** What the call does next: listen, hold (the person asked for a moment) or end (they asked to). */
|
|
10547
10610
|
then: external_exports.enum(["listen", "hold", "end"]),
|
|
10548
10611
|
/** The person's replies to items (replies, owner 2026-10-07): the item's handle, the chosen option
|
|
10549
10612
|
* IDs, the line handles, how they replied in under ten words (keeping any condition), and `defer`:
|
|
10550
10613
|
* "" when their words settle the item, else what a reply that puts it off waits for -- "call" (the
|
|
10551
10614
|
* end of this call), a question's handle (that question's answer) or an ISO time. */
|
|
10552
|
-
replies: external_exports.array(external_exports.object({ item:
|
|
10615
|
+
replies: external_exports.array(external_exports.object({ item: str3, options: strs2, lines: strs2, summary: str3, defer: str3 }).strict()),
|
|
10553
10616
|
/** The line handles that tell the talker how to run this call; they last until it ends and reach no agent. */
|
|
10554
10617
|
instruction: strs2,
|
|
10555
10618
|
/** The line handles the filer acts on, and the only ones it reads (3e): new work, a change to existing
|
|
10556
10619
|
* work, feedback on Paigy, anything said to an agent, and any rule meant to outlast the call. */
|
|
10557
10620
|
file: strs2,
|
|
10558
10621
|
/** Evidence to fetch for a second round: a search, an item's full text, or an agent by name. */
|
|
10559
|
-
need: external_exports.object({ kind: external_exports.enum(["search", "item", "agent", ""]), text:
|
|
10622
|
+
need: external_exports.object({ kind: external_exports.enum(["search", "item", "agent", ""]), text: str3 }).strict(),
|
|
10560
10623
|
/** The handle of the item to explain ("" for none). */
|
|
10561
|
-
explain:
|
|
10624
|
+
explain: str3
|
|
10562
10625
|
}).strict();
|
|
10563
10626
|
var TALKER_REPLY_JSON_SCHEMA = (({ $schema: _, ...rest }) => rest)(
|
|
10564
10627
|
zodToJsonSchema(TalkerReplySchema, { $refStrategy: "none" })
|
|
10565
10628
|
);
|
|
10566
|
-
var
|
|
10629
|
+
var str4 = external_exports.string();
|
|
10567
10630
|
var strs3 = external_exports.array(external_exports.string());
|
|
10568
10631
|
var FilerReplySchema = external_exports.object({
|
|
10569
|
-
/** Which Goals each new line goes on: a line's handle, Goal handles (or keys of new Goals
|
|
10570
|
-
* the line says in at most
|
|
10571
|
-
|
|
10632
|
+
/** Which Goals each new line goes on: a line's handle, Goal handles (or keys of new Goals: a line that asks
|
|
10633
|
+
* for new work goes on the Goal it creates, owner 2026-10-26), and what the line says in at most twenty
|
|
10634
|
+
* words (owner, 2026-10-26: "bump it from 10 to 20 words"). */
|
|
10635
|
+
filed: external_exports.array(external_exports.object({ line: str4, goals: strs3, summary: str4 }).strict()),
|
|
10572
10636
|
goals: external_exports.array(external_exports.object({
|
|
10573
10637
|
op: external_exports.enum(["create", "edit", "complete", "cancel", "reopen", "assign", "defer", "move", "block", "unblock"]),
|
|
10574
|
-
key:
|
|
10575
|
-
goal:
|
|
10576
|
-
title:
|
|
10577
|
-
outcome:
|
|
10578
|
-
owner:
|
|
10579
|
-
under:
|
|
10580
|
-
until:
|
|
10581
|
-
on:
|
|
10638
|
+
key: str4,
|
|
10639
|
+
goal: str4,
|
|
10640
|
+
title: str4,
|
|
10641
|
+
outcome: str4,
|
|
10642
|
+
owner: str4,
|
|
10643
|
+
under: str4,
|
|
10644
|
+
until: str4,
|
|
10645
|
+
on: str4,
|
|
10582
10646
|
gate: external_exports.enum(["start", "complete", "answer", ""]),
|
|
10583
|
-
why:
|
|
10647
|
+
why: str4
|
|
10584
10648
|
}).strict()),
|
|
10585
10649
|
questions: external_exports.array(external_exports.object({
|
|
10586
10650
|
op: external_exports.enum(["create", "edit", "assign", "withdraw"]),
|
|
10587
|
-
key:
|
|
10588
|
-
question:
|
|
10589
|
-
text:
|
|
10590
|
-
summary:
|
|
10591
|
-
to:
|
|
10592
|
-
goal:
|
|
10593
|
-
options: external_exports.array(external_exports.object({ id:
|
|
10651
|
+
key: str4,
|
|
10652
|
+
question: str4,
|
|
10653
|
+
text: str4,
|
|
10654
|
+
summary: str4,
|
|
10655
|
+
to: str4,
|
|
10656
|
+
goal: str4,
|
|
10657
|
+
options: external_exports.array(external_exports.object({ id: str4, label: str4 }).strict()),
|
|
10594
10658
|
pick: external_exports.enum(["one", "many", "rank", "words", ""]),
|
|
10595
|
-
blocks:
|
|
10659
|
+
blocks: str4
|
|
10596
10660
|
}).strict()),
|
|
10597
|
-
lessons: external_exports.array(external_exports.object({ op: external_exports.enum(["remember", "revise", "withdraw"]), lesson:
|
|
10661
|
+
lessons: external_exports.array(external_exports.object({ op: external_exports.enum(["remember", "revise", "withdraw"]), lesson: str4, text: str4, scope: str4 }).strict()),
|
|
10598
10662
|
/** Line handles whose words comment on Paigy itself. */
|
|
10599
10663
|
feedback: strs3
|
|
10600
10664
|
}).strict();
|
|
@@ -10655,6 +10719,27 @@ var TidyReplySchema = external_exports.object({
|
|
|
10655
10719
|
var TIDY_REPLY_JSON_SCHEMA = (({ $schema: _, ...rest }) => rest)(
|
|
10656
10720
|
zodToJsonSchema(TidyReplySchema, { $refStrategy: "none" })
|
|
10657
10721
|
);
|
|
10722
|
+
var HandoutReplySchema = external_exports.object({
|
|
10723
|
+
assign: external_exports.array(external_exports.object({
|
|
10724
|
+
/** The Goal's handle (G). */
|
|
10725
|
+
goal: external_exports.string(),
|
|
10726
|
+
/** The agent's handle (A). */
|
|
10727
|
+
to: external_exports.string(),
|
|
10728
|
+
/** At most ten words, naming the Goal of theirs it is most like: the reason the hand-out records. */
|
|
10729
|
+
why: external_exports.string()
|
|
10730
|
+
}).strict()),
|
|
10731
|
+
/** The Goals no listed agent's work is even loosely like: Paigy starts a session for them (owner, 2026-10-24,
|
|
10732
|
+
* Goal 37603006, "One per family of related Goals"). */
|
|
10733
|
+
new: external_exports.array(external_exports.object({
|
|
10734
|
+
/** The Goal's handle (G). */
|
|
10735
|
+
goal: external_exports.string(),
|
|
10736
|
+
/** At most ten words: why nothing active fits it. */
|
|
10737
|
+
why: external_exports.string()
|
|
10738
|
+
}).strict())
|
|
10739
|
+
}).strict();
|
|
10740
|
+
var HANDOUT_REPLY_JSON_SCHEMA = (({ $schema: _, ...rest }) => rest)(
|
|
10741
|
+
zodToJsonSchema(HandoutReplySchema, { $refStrategy: "none" })
|
|
10742
|
+
);
|
|
10658
10743
|
function entryUnit(entry) {
|
|
10659
10744
|
if (entry.kind !== "contribution" || !entry.aboutId) return null;
|
|
10660
10745
|
const plain = entry.content && "plain" in entry.content ? entry.content.plain : null;
|
|
@@ -10790,7 +10875,7 @@ var NotifyRequestFields = external_exports.object({
|
|
|
10790
10875
|
* derive agent-side before sealing, so the server only ever shapes plaintext). */
|
|
10791
10876
|
// 10k, not a sentence budget. What the human hears is bounded by the BROKER — it splits
|
|
10792
10877
|
// the ask into topics and gives each one at most three sentences and one question
|
|
10793
|
-
// (docs/
|
|
10878
|
+
// (docs/history/agenda-design.md) — not by a wire cap the agent has to pre-summarize under.
|
|
10794
10879
|
// Owner, 2026-07-28: "our actual limitation on how long something is to the user should
|
|
10795
10880
|
// come from the broker splitting and summarizing." The cap that remains is a size guard.
|
|
10796
10881
|
ask: external_exports.string().min(1).max(1e4).optional().describe(
|
|
@@ -10867,7 +10952,7 @@ var UserAnswerSchema = external_exports.discriminatedUnion("kind", [
|
|
|
10867
10952
|
external_exports.object({ kind: external_exports.literal("clarify"), chunks: external_exports.array(external_exports.string()).min(1) }),
|
|
10868
10953
|
external_exports.object({ kind: external_exports.literal("confirm"), approved: external_exports.boolean() }),
|
|
10869
10954
|
external_exports.object({ kind: external_exports.literal("turns"), turns: external_exports.array(TurnSchema).min(1) }),
|
|
10870
|
-
/** An auto-answer derived from the user's PAST decisions (docs/
|
|
10955
|
+
/** An auto-answer derived from the user's PAST decisions (docs/history/precedent-design.md §2):
|
|
10871
10956
|
* delivered through the same settle/await path as a human answer, carrying the judge's
|
|
10872
10957
|
* derivation and the precedent ids it grew from. Always paired with a visible trail
|
|
10873
10958
|
* card the user can reply to — the broker never overrides the user. */
|
|
@@ -11018,6 +11103,21 @@ var AgendaTurnSchema = external_exports.object({
|
|
|
11018
11103
|
* the phone (`asking`, so the agenda goes gold and its options show) without treating the line as a
|
|
11019
11104
|
* question turn — the talker owns re-asking and the waits, so `question` stays null. */
|
|
11020
11105
|
onTable: external_exports.boolean().optional(),
|
|
11106
|
+
/** THE CARRIED ITEM THIS LINE TELLS (Goal 2a1e50eb, owner 2026-10-14: "Build the whole design") — a
|
|
11107
|
+
* request the Call carries that asks NOTHING: a report, a progress note, another agent's waiting news.
|
|
11108
|
+
* Its request Entry id, so the phone can make that agenda row the current one while it is read
|
|
11109
|
+
* (`telling` on the `turn` topic, `docs/clients/app/walk/design.md` §11).
|
|
11110
|
+
*
|
|
11111
|
+
* A FIELD OF ITS OWN, NEVER `claimId`: the claim is the RETURN identity — answers route by it and the
|
|
11112
|
+
* record tags the line with it (`workId`) — and an answer must never route to an Entry that asks
|
|
11113
|
+
* nothing. Absent on a turn speaking for a question (`claimId` says that) and on one speaking for no
|
|
11114
|
+
* carried item at all (an opener, a sign-off, Paigy's own line). */
|
|
11115
|
+
telling: external_exports.string().optional(),
|
|
11116
|
+
/** PAIGY'S OWN LINE (owner, 2026-10-15; calls ed2cbdce, ad50ad25): a turn that speaks for no item -- an
|
|
11117
|
+
* opener, a sign-off, a reply about nothing an agent asked or told -- is recorded as Paigy's, not as the
|
|
11118
|
+
* agent that rang. Absent on every turn that speaks for an item (`agentId` names whose), and on plans
|
|
11119
|
+
* from before it: a bot that does not know it records the ringing agent, as before. */
|
|
11120
|
+
speaksFor: external_exports.literal("paigy").optional(),
|
|
11021
11121
|
select: SelectShapeSchema.optional(),
|
|
11022
11122
|
options: external_exports.array(OptionSchema.omit({ id: true })).optional(),
|
|
11023
11123
|
/* `pace` STOOD HERE (#826). A turn could carry seconds and the model chose them. The walk
|
|
@@ -11106,7 +11206,7 @@ var InboxItemSchema = external_exports.object({
|
|
|
11106
11206
|
questions: external_exports.array(CallQuestionSchema).optional(),
|
|
11107
11207
|
/** The same call carrying order, including request Entries with no DecisionNeed as reports.
|
|
11108
11208
|
* Additive: questions stays decision-only for every other surface and older bundles. */
|
|
11109
|
-
callItems: external_exports.array(CallQuestionSchema.extend({ state: external_exports.enum(["open", "answered", "report"]) })).optional(),
|
|
11209
|
+
callItems: external_exports.array(CallQuestionSchema.extend({ state: external_exports.enum(["open", "answered", "report"]), acknowledged: external_exports.boolean().optional() })).optional(),
|
|
11110
11210
|
visuals: external_exports.array(VisualSchema).optional(),
|
|
11111
11211
|
/** The connected agent's name (the single pairing name — user-typed, or the
|
|
11112
11212
|
* agent's suggestion, or a default silly name). */
|
|
@@ -11126,11 +11226,6 @@ var InboxItemSchema = external_exports.object({
|
|
|
11126
11226
|
* the agent (provider-agnostic; set server-side). Absent = no hard error. Drives the inbox
|
|
11127
11227
|
* error badge + Retry. */
|
|
11128
11228
|
error: external_exports.string().optional(),
|
|
11129
|
-
/** WHEN THIS AGENT WORK WENT QUIET (turn="agent"), by the one rule (`coldSince`: three days
|
|
11130
|
-
* with nothing said), or absent while it is not stalled. The inbox's stalled badge reads
|
|
11131
|
-
* this and nothing else (2026-09-23: a 3-minute age rule badged every live Goal stalled,
|
|
11132
|
-
* and "dismiss the stalled ones" cancelled 37 pieces of live work). */
|
|
11133
|
-
cold: external_exports.string().datetime().optional(),
|
|
11134
11229
|
clarifies: external_exports.string().optional(),
|
|
11135
11230
|
/** THIS CARD'S QUESTION IS ON A LIVE CALL (owner, 2026-09-24: "Mark it while the call is
|
|
11136
11231
|
* live"). Present only while an open Call Delivery carries the card's request Entry — read
|
|
@@ -11168,9 +11263,35 @@ var InboxItemSchema = external_exports.object({
|
|
|
11168
11263
|
"Labels for a select:'confirm' paige \u2014 'yesno' (Yes/No) or 'approve' (Approve/Deny). Ignored unless select is 'confirm'."
|
|
11169
11264
|
),
|
|
11170
11265
|
/** Real downstream work is stuck behind this one — set by the agent, independent of
|
|
11171
|
-
* urgency (see the main README's "premier use case" + docs/
|
|
11266
|
+
* urgency (see the main README's "premier use case" + docs/history/notify-states.md). Drives the
|
|
11172
11267
|
* inbox's blocking badge and the extra confirm step before dismissing it. */
|
|
11173
11268
|
blocking: external_exports.boolean().default(false),
|
|
11269
|
+
/** WHAT FREED THIS QUESTION (owner, 2026-10-16, Goal 2383ef14: "we don't really show the question
|
|
11270
|
+
* at the top until the question it could reply to with is resolved. And then we show it again
|
|
11271
|
+
* with the context of the other thing that was resolved"; asked how it should carry that, "The
|
|
11272
|
+
* answer above it"). A question they answered with a question of their own waits for theirs
|
|
11273
|
+
* (`private.ask_back`) and drops out of the front while it waits; when it comes back, the card
|
|
11274
|
+
* draws their question and the answer it got ABOVE the ask, as one card. Absent on a question
|
|
11275
|
+
* nothing ever held back. */
|
|
11276
|
+
freedBy: external_exports.object({
|
|
11277
|
+
questionId: external_exports.string(),
|
|
11278
|
+
asked: external_exports.string(),
|
|
11279
|
+
answer: external_exports.string(),
|
|
11280
|
+
answeredAt: external_exports.string(),
|
|
11281
|
+
/** The answer in ten words, when the talker wrote one beside it. */
|
|
11282
|
+
summary: external_exports.string().optional()
|
|
11283
|
+
}).optional(),
|
|
11284
|
+
/** WHAT THIS CARD ANSWERS (owner, 2026-10-27, Goal 81b6a9d6: "this reads very clearly as an answer to
|
|
11285
|
+
* something I asked, but I don't see the question… To show the question near the top of the card").
|
|
11286
|
+
* An agent's card that is its answer to one of the person's own questions carries that question's
|
|
11287
|
+
* words, drawn above it as "You asked" (`public.questions_answered_by`, read beside the card read).
|
|
11288
|
+
* Absent on every card that answers nothing of theirs, and on a held question, which has `freedBy`. */
|
|
11289
|
+
answering: external_exports.object({ asked: external_exports.string() }).optional(),
|
|
11290
|
+
/** WHEN ITS AGENT LAST BUMPED THIS QUESTION (#2855, `contact`'s `bumpQuestionIds`): the agent asked
|
|
11291
|
+
* the person to notice it again, and For you puts it first, the latest bump on top
|
|
11292
|
+
* (`question/order.ts`). Absent on a question never bumped, and on every card from an API older
|
|
11293
|
+
* than the bump. */
|
|
11294
|
+
bumpedAt: external_exports.string().optional(),
|
|
11174
11295
|
/** The user's locked-in answer; present only for replied items (GET /api/replied/:id). */
|
|
11175
11296
|
answer: UserAnswerSchema.optional(),
|
|
11176
11297
|
/** THE TARGET FACTS A CARD RENDERS (#1796 point 5, 2026-09-11): the Delivery it is a view of,
|
|
@@ -11197,7 +11318,7 @@ var InboxItemSchema = external_exports.object({
|
|
|
11197
11318
|
*
|
|
11198
11319
|
* THE PAYLOAD'S OWN HASH, NEVER A STAMP ON THE WORK — the same mechanism as `QueueItem.rev`
|
|
11199
11320
|
* (#2928) and an entry's (#3018), for the same reason: a card shows facts no `updated_at` of its
|
|
11200
|
-
* own moves (its Goal's state and name,
|
|
11321
|
+
* own moves (its Goal's state and name, whether a ring is
|
|
11201
11322
|
* live). Optional, so a fixture, the demo and the archive lens need not spell one, and a card
|
|
11202
11323
|
* with no rev is simply always re-sent. */
|
|
11203
11324
|
rev: external_exports.string().optional()
|
|
@@ -11232,6 +11353,7 @@ var MissedCallSchema = external_exports.enum([
|
|
|
11232
11353
|
]);
|
|
11233
11354
|
var clock = (h) => h === 0 ? "midnight" : h === 12 ? "noon" : h < 12 ? `${h} am` : `${h - 12} pm`;
|
|
11234
11355
|
var QUIET = ` Nothing rings from ${clock(NIGHT.from)} to ${clock(NIGHT.to)} your time; the count waits for morning.`;
|
|
11356
|
+
var THEIR_QUIET = ` Nothing rings from ${clock(NIGHT.from)} to ${clock(NIGHT.to)} their time; the count waits for morning.`;
|
|
11235
11357
|
var BrokerTuningSchema = external_exports.object({
|
|
11236
11358
|
/** 'none' = skip the spoken ack after a mapped answer (power users find it slow). */
|
|
11237
11359
|
ackVerbosity: external_exports.enum(["normal", "none"]).optional(),
|
|
@@ -11274,12 +11396,9 @@ var UserSettingsSchema = external_exports.object({
|
|
|
11274
11396
|
* must not silently reset this privacy choice. Absent = leave unchanged on
|
|
11275
11397
|
* write, 'hosted' on read (see store.ts). */
|
|
11276
11398
|
voiceMode: external_exports.enum(["hosted", "on_device"]).optional(),
|
|
11277
|
-
/**
|
|
11278
|
-
*
|
|
11279
|
-
*
|
|
11280
|
-
* object must not silently turn it back on. Absent = leave unchanged on write, true on
|
|
11281
|
-
* read (see store.ts). */
|
|
11282
|
-
talk: external_exports.boolean().optional(),
|
|
11399
|
+
/** `talk` lived here until #2373: it gated auto-play, which went in #2374. An older bundle's
|
|
11400
|
+
* `talk` is stripped like `silentPush` was; the `user_settings.talk` column outlives it until
|
|
11401
|
+
* its own drop migration (#2373, step two). */
|
|
11283
11402
|
/** CALL DIAGNOSTICS (owner, 2026-10-01): the call report carries each listen and the bot's own
|
|
11284
11403
|
* load timings. SERVER-SET, no UI — on for every account that existed on 2026-10-01, off for
|
|
11285
11404
|
* newer ones (migration 20261001132859). Read-only here: the settings PATCH never writes it. */
|
|
@@ -11356,7 +11475,8 @@ var ConnectionSummarySchema = external_exports.object({
|
|
|
11356
11475
|
kind: external_exports.enum(["device", "agent"]).optional(),
|
|
11357
11476
|
/** For an agent, the token id of the DEVICE that minted it — so agents group under their
|
|
11358
11477
|
* machine, and revoking a device cascades to them. Null on devices, and on unlinked
|
|
11359
|
-
* agents (
|
|
11478
|
+
* agents (provider-managed, hatched by another agent, or minted before the link existed);
|
|
11479
|
+
* a phone-launched agent is linked to the computer it runs on since #1602. */
|
|
11360
11480
|
mintedByDevice: external_exports.string().nullable().optional(),
|
|
11361
11481
|
device: external_exports.string().nullable(),
|
|
11362
11482
|
/** The agent's display name (the single pairing name). */
|
|
@@ -11370,7 +11490,7 @@ var ConnectionSummarySchema = external_exports.object({
|
|
|
11370
11490
|
* user on the agent's own page. null = no ceiling (today's behaviour for every
|
|
11371
11491
|
* connection). Android binds importance to a relationship rather than to each message,
|
|
11372
11492
|
* and that is the thing our roster could not say: "Marlow may always call me; Otto
|
|
11373
|
-
* never may" (docs/
|
|
11493
|
+
* never may" (docs/history/party-navigation-design.md, gap 2). Clamped in `arbitrateLevel`, so it binds
|
|
11374
11494
|
* every surface at once and outranks even `sessionMode: all_calls` — a mode the user
|
|
11375
11495
|
* set once must not overrule a rule they set about one agent. */
|
|
11376
11496
|
reach: NotifyLevelSchema.nullable().optional(),
|
|
@@ -11529,12 +11649,14 @@ var QueueItemSchema = external_exports.object({
|
|
|
11529
11649
|
/** Its questions: every OPEN one, and at most ten settled, newest settled first
|
|
11530
11650
|
* (20260929133308) — the page decides which of them to show. NOT the whole set: `asked` and
|
|
11531
11651
|
* `answered` are, and a settled one's words are a line (280 characters), its body read when the
|
|
11532
|
-
* question is opened.
|
|
11652
|
+
* question is opened. Never a CANCELLED one (withdrawn, dismissed, or its Goal or call ended): it
|
|
11653
|
+
* asks nothing of anyone (#3723). */
|
|
11533
11654
|
questions: external_exports.array(QueueQuestionSchema).default([]),
|
|
11534
11655
|
/** HOW MANY QUESTIONS THIS WORK HAS ASKED, and how many are answered — the Goal's own totals,
|
|
11535
11656
|
* bounded at 100 server-side. A tally counted off `questions` is a wrong number that looks
|
|
11536
11657
|
* right once the cap bites (`walk/trees.ts` `tallyOf`). Optional, and defaulted from the array
|
|
11537
|
-
* by the projection, so hand-built queues (fixtures, the demo) need not spell them.
|
|
11658
|
+
* by the projection, so hand-built queues (fixtures, the demo) need not spell them. A cancelled
|
|
11659
|
+
* question is not asked (#3725). */
|
|
11538
11660
|
asked: external_exports.number().optional(),
|
|
11539
11661
|
answered: external_exports.number().optional(),
|
|
11540
11662
|
/** Every note on it the person replied to (`QueueReplySchema`) — the page decides which to show.
|
|
@@ -11549,6 +11671,10 @@ var QueueItemSchema = external_exports.object({
|
|
|
11549
11671
|
* as progress). `updatedAt` moves for reasons nobody chose — a
|
|
11550
11672
|
* state recomputed, a review flag — so it cannot tell work in hand from work gone quiet. */
|
|
11551
11673
|
lastProgressAt: external_exports.string().nullable().optional(),
|
|
11674
|
+
/** WHEN AN AGENT LAST ACTED ON IT (owner, 2026-10-27: "Move it now", Goal 567258dc): its newest agent write, an
|
|
11675
|
+
* Entry or a Goal change, Paigy's excluded (`goals.worked_at`). What keeps work an agent is writing on from
|
|
11676
|
+
* reading as gone quiet (`coldSince`); absent on a door that does not carry it. */
|
|
11677
|
+
workedAt: external_exports.string().nullable().optional(),
|
|
11552
11678
|
/** THE GOAL'S NEWEST WORD, FROM EITHER SIDE (owner, 2026-09-27): the newest Entry on it, of any
|
|
11553
11679
|
* kind — what the person added ("Add to this"), their reply, the agent's ask or its progress
|
|
11554
11680
|
* note. A progress note is an Entry, so this is already the newer of the two: the person's note
|
|
@@ -11795,9 +11921,6 @@ var AgentRowSchema = ComputerRowSchema.extend({
|
|
|
11795
11921
|
* (`agent_holds`); null when that read failed. */
|
|
11796
11922
|
holds: external_exports.array(external_exports.object({ id: external_exports.string(), title: external_exports.string() })).nullable(),
|
|
11797
11923
|
held: external_exports.number().int().nullable(),
|
|
11798
|
-
/** The earliest instant any Goal it holds went quiet, by the one rule (`coldSince`); null
|
|
11799
|
-
* while none has, or when that read failed. */
|
|
11800
|
-
cold: external_exports.string().datetime().nullable(),
|
|
11801
11924
|
/** The newest line of its working log, and when the harness saw it. */
|
|
11802
11925
|
line: external_exports.string().nullable(),
|
|
11803
11926
|
lineAt: external_exports.string().datetime().nullable()
|
|
@@ -11841,6 +11964,11 @@ var CallRecapSchema = external_exports.object({
|
|
|
11841
11964
|
durationMs: external_exports.number().nullable(),
|
|
11842
11965
|
/** Bot-clock pickup offset; absent before the timestamp release, null before its report lands. */
|
|
11843
11966
|
pickupMs: external_exports.number().nullable().optional(),
|
|
11967
|
+
/** STILL FILING (20261026182117): the call has not ended on the server, or it has and a brain cycle on it is
|
|
11968
|
+
* still pending, the next writer, which may still settle, file or start something. What the close itself
|
|
11969
|
+
* waits for (`private.close_call`). `status` cannot say it: nothing writes "finalizing", and a call reads
|
|
11970
|
+
* "open" until the sweep closes it, after nothing is pending. Absent from an API before it. */
|
|
11971
|
+
filing: external_exports.boolean().optional(),
|
|
11844
11972
|
agents: external_exports.array(external_exports.object({ id: external_exports.string(), name: external_exports.string().nullable() }))
|
|
11845
11973
|
}),
|
|
11846
11974
|
topics: external_exports.array(external_exports.object({
|
|
@@ -11849,7 +11977,7 @@ var CallRecapSchema = external_exports.object({
|
|
|
11849
11977
|
owner: external_exports.string(),
|
|
11850
11978
|
state: external_exports.string(),
|
|
11851
11979
|
/** Presented Entry content and its author, separately from the current Goal owner. */
|
|
11852
|
-
items: external_exports.array(external_exports.object({ entryId: external_exports.string(), author: external_exports.string(), text: external_exports.string(), summary: external_exports.string().nullable() })).optional(),
|
|
11980
|
+
items: external_exports.array(external_exports.object({ entryId: external_exports.string(), author: external_exports.string(), text: external_exports.string(), summary: external_exports.string().nullable(), acknowledged: external_exports.boolean().optional() })).optional(),
|
|
11853
11981
|
/** Whether the call put it to the person. An item it carried and never said has no row on the
|
|
11854
11982
|
* review (owner, 2026-10-08: "why do we get the third one when it didn't happen in the call?"). */
|
|
11855
11983
|
presented: external_exports.boolean(),
|
|
@@ -11895,9 +12023,65 @@ var CallRecapSchema = external_exports.object({
|
|
|
11895
12023
|
words: external_exports.string(),
|
|
11896
12024
|
atMs: external_exports.number()
|
|
11897
12025
|
})),
|
|
11898
|
-
|
|
12026
|
+
/** What did not fit, counted. `settles` counts items past the recap's 100; absent before 20261026165518. */
|
|
12027
|
+
more: external_exports.object({ lines: external_exports.number(), entries: external_exports.number(), topics: external_exports.number(), settles: external_exports.number().optional() }),
|
|
11899
12028
|
/** Last stored position on this page when another exists; absent before paging shipped. */
|
|
11900
|
-
next: external_exports.number().int().nonnegative().nullable().optional()
|
|
12029
|
+
next: external_exports.number().int().nonnegative().nullable().optional(),
|
|
12030
|
+
/** THE CALL AS ONE LIST OF ROWS (owner, 2026-10-14: "we only really want a thing like transcript but
|
|
12031
|
+
* built from the summaries", then "the transcript tabs should show the same but with full words").
|
|
12032
|
+
* Both tabs draw these rows, in this order: Summary from `summary`, Transcript from `words`.
|
|
12033
|
+
* - `put`: an item put to the person, at the first agent line that voiced it. Paigy's sentences
|
|
12034
|
+
* that voiced it are folded into `spoken`, never rows of their own.
|
|
12035
|
+
* - `said`: the person's words, one row per reply or per filed line no reply covers.
|
|
12036
|
+
* - `did`: what Paigy did ("Sent to Mouth: …", "Recorded: …", "Filed on …").
|
|
12037
|
+
* `by` is the row's real author, never inferred from `kind`: a relay Paigy sent to an agent is
|
|
12038
|
+
* Paigy's, not the person's. Optional and additive (owner: "make sure whatever you do is backward
|
|
12039
|
+
* compatible"): an API before it sends none, and the screen falls back to `topics` and `said`. */
|
|
12040
|
+
timeline: external_exports.array(external_exports.object({
|
|
12041
|
+
id: external_exports.string(),
|
|
12042
|
+
position: external_exports.number(),
|
|
12043
|
+
atMs: external_exports.number(),
|
|
12044
|
+
kind: external_exports.enum(["put", "said", "did"]),
|
|
12045
|
+
by: external_exports.object({ participant: external_exports.string().nullable(), agentId: external_exports.string().nullable(), name: external_exports.string().nullable() }),
|
|
12046
|
+
goalId: external_exports.string().uuid().nullable(),
|
|
12047
|
+
requestId: external_exports.string().nullable(),
|
|
12048
|
+
summary: external_exports.string().nullable(),
|
|
12049
|
+
words: external_exports.string(),
|
|
12050
|
+
/** Paigy's sentences folded into this row: on a `put` row, what it said putting the item to the
|
|
12051
|
+
* person (before their next row); on a `said` row, what it said in reply (until their next row).
|
|
12052
|
+
* `atMs` is when each was said; optional, absent before 2026-10-14's fix. */
|
|
12053
|
+
spoken: external_exports.array(external_exports.object({ lineId: external_exports.string(), words: external_exports.string(), atMs: external_exports.number().optional() })),
|
|
12054
|
+
/** On a `said` row: the work these words were filed on, and whether they answered (recorded) a
|
|
12055
|
+
* question. They replace the "Filed on ..." and "Recorded: ..." rows that repeated the person's own
|
|
12056
|
+
* summary (Brain, 2026-10-14). Optional: absent from an API before it. */
|
|
12057
|
+
filedOn: external_exports.array(external_exports.object({ goalId: external_exports.string().uuid(), title: external_exports.string() })).optional(),
|
|
12058
|
+
recorded: external_exports.boolean().optional(),
|
|
12059
|
+
settled: external_exports.object({ requestId: external_exports.string(), answer: external_exports.string() }).nullable().optional(),
|
|
12060
|
+
acknowledged: external_exports.boolean().optional(),
|
|
12061
|
+
/** On a `put` row: still waiting for the person's answer (not settled, not answered, not put off).
|
|
12062
|
+
* The server's judgement; the screen draws "Still waiting for your answer" from it. Optional: absent
|
|
12063
|
+
* from an API before it, where the screen falls back to its own reading. */
|
|
12064
|
+
waiting: external_exports.boolean().optional(),
|
|
12065
|
+
lineIds: external_exports.array(external_exports.string())
|
|
12066
|
+
})).optional(),
|
|
12067
|
+
/** THE RECAP (owner, 2026-10-26: "the transcript should just be the entries that settled or
|
|
12068
|
+
* acknowledged the items; that's it"). Each item the person's words settled on this call, in the
|
|
12069
|
+
* order they said them: who asked it (`by`), the item in its agent's words (`title`), and only the
|
|
12070
|
+
* words of theirs that settled it (`lines`: each line once, verbatim, with when it was said on the
|
|
12071
|
+
* bot clock like `said[].atMs`). Built from their replies, not from what the call put, so an item
|
|
12072
|
+
* settled without being put is still here. Beside them (owner: "List them too, with the words that
|
|
12073
|
+
* said them"), each Goal his words told something (`kind` "told") or the call started ("started"),
|
|
12074
|
+
* with `requestId` null and the Goal's name as `title`; a started Goal may have no `lines` yet. `kind`
|
|
12075
|
+
* is a string, not an enum, so a later kind never fails an older build's parse; `requestId` is the
|
|
12076
|
+
* request the words settled. On the first page only; absent from an API before it. */
|
|
12077
|
+
settles: external_exports.array(external_exports.object({
|
|
12078
|
+
requestId: external_exports.string().nullable(),
|
|
12079
|
+
kind: external_exports.string(),
|
|
12080
|
+
by: external_exports.object({ participant: external_exports.string(), agentId: external_exports.string().nullable(), name: external_exports.string() }),
|
|
12081
|
+
goalId: external_exports.string().uuid().nullable(),
|
|
12082
|
+
title: external_exports.string(),
|
|
12083
|
+
lines: external_exports.array(external_exports.object({ lineId: external_exports.string(), words: external_exports.string(), atMs: external_exports.number() }))
|
|
12084
|
+
})).optional()
|
|
11901
12085
|
});
|
|
11902
12086
|
function sessionSlot(sessionId2) {
|
|
11903
12087
|
const id22 = sessionId2 ?? sessionId();
|
|
@@ -11983,6 +12167,14 @@ async function requestCode(suggestedName = agentName(), device) {
|
|
|
11983
12167
|
if (!res.ok) throw new Error(`/api/device/code failed: ${res.status} ${await res.text()}`);
|
|
11984
12168
|
return await res.json();
|
|
11985
12169
|
}
|
|
12170
|
+
var ServerFault = class extends Error {
|
|
12171
|
+
constructor(status) {
|
|
12172
|
+
super(`Paigy's server failed (HTTP ${status}) while checking the code.`);
|
|
12173
|
+
this.status = status;
|
|
12174
|
+
this.name = "ServerFault";
|
|
12175
|
+
}
|
|
12176
|
+
status;
|
|
12177
|
+
};
|
|
11986
12178
|
async function pollToken(deviceCode) {
|
|
11987
12179
|
const res = await reach(`${BACKEND_URL}/api/device/token`, {
|
|
11988
12180
|
method: "POST",
|
|
@@ -11990,6 +12182,7 @@ async function pollToken(deviceCode) {
|
|
|
11990
12182
|
body: JSON.stringify({ device_code: deviceCode })
|
|
11991
12183
|
});
|
|
11992
12184
|
if (res.ok) return await res.json();
|
|
12185
|
+
if (res.status >= 500) throw new ServerFault(res.status);
|
|
11993
12186
|
const body = await res.json().catch(() => ({ error: "unknown" }));
|
|
11994
12187
|
const err = body.error ?? "unknown";
|
|
11995
12188
|
if (err === "authorization_pending") return null;
|
|
@@ -12138,11 +12331,12 @@ async function listConnections(opts = {}) {
|
|
|
12138
12331
|
if (!res.ok) throw new Error(`list_connections failed: ${res.status} ${await res.text()}`);
|
|
12139
12332
|
return await res.json();
|
|
12140
12333
|
}
|
|
12141
|
-
var NOT_SENT = `Recorded as the Goal's progress, not sent
|
|
12334
|
+
var NOT_SENT = `Recorded as the Goal's progress, not sent to the person; the other agents that wrote on the Goal in the last hour are told. The person is told only a question, an answer to one they asked you, and what you say once the Goal is done. To close the work, send contact.completions or manage_goals kind:complete with the shared completion report, closing and reporting together. If the person asked you, in so many words, to send them this, send it again with userExplicitlyRequested: "any" on that update.`;
|
|
12142
12335
|
var APPLIED = "Applied; nothing was sent to the person.";
|
|
12143
12336
|
var DEMOTED = "Delivered as a card, not a call: the person's settings do not allow a call right now (silent, quiet hours, or a mode). It has reached them; do not send it again.";
|
|
12144
12337
|
async function readDelivery(deliveryId, opts = {}) {
|
|
12145
|
-
const
|
|
12338
|
+
const query = opts.transcript ? `?transcript=1${opts.after ? `&after=${encodeURIComponent(opts.after)}` : ""}` : "";
|
|
12339
|
+
const res = await ensureAuthed(await (opts.reach ?? reach)(`${BACKEND_URL}/api/deliveries/${encodeURIComponent(deliveryId)}${query}`, {
|
|
12146
12340
|
headers: { authorization: `Bearer ${authToken(opts.token) ?? ""}` },
|
|
12147
12341
|
signal: opts.signal
|
|
12148
12342
|
}));
|
|
@@ -12167,6 +12361,7 @@ async function contact(input, opts = {}) {
|
|
|
12167
12361
|
...questions ? { questions } : {},
|
|
12168
12362
|
...parsed.answers ? { answers: parsed.answers } : {},
|
|
12169
12363
|
...parsed.withdrawQuestionIds ? { withdrawQuestionIds: parsed.withdrawQuestionIds } : {},
|
|
12364
|
+
...parsed.bumpQuestionIds ? { bumpQuestionIds: parsed.bumpQuestionIds } : {},
|
|
12170
12365
|
...parsed.questionDependencies ? { questionDependencies: parsed.questionDependencies } : {}
|
|
12171
12366
|
})
|
|
12172
12367
|
}));
|
|
@@ -12195,7 +12390,9 @@ async function contact(input, opts = {}) {
|
|
|
12195
12390
|
// IT WENT ONTO A CALL ALREADY HAPPENING (owner, 2026-09-28): the view words it as that call.
|
|
12196
12391
|
...lead.joinedCall ? { joinedCall: true } : {},
|
|
12197
12392
|
...demoted ? { demoted } : {},
|
|
12198
|
-
...acked
|
|
12393
|
+
...acked,
|
|
12394
|
+
...receipt.ringPolicy ? { ringPolicy: receipt.ringPolicy, ...receipt.message ? { ringHeld: receipt.message } : {} } : {},
|
|
12395
|
+
...receipt.recheckAt ? { recheckAt: receipt.recheckAt } : {}
|
|
12199
12396
|
};
|
|
12200
12397
|
};
|
|
12201
12398
|
const settled = (d) => d.state === "closed" || d.answers.length > 0 || d.entries.some((e) => e.kind === "contribution" && !entryUnit(e));
|
|
@@ -13809,7 +14006,7 @@ var OptionInputSchema2 = external_exports.object({
|
|
|
13809
14006
|
imgUrl: OptionSchema2.shape.image
|
|
13810
14007
|
}).strict();
|
|
13811
14008
|
var NIGHT2 = { from: 23, to: 7 };
|
|
13812
|
-
var ASK_MAX2 =
|
|
14009
|
+
var ASK_MAX2 = 80;
|
|
13813
14010
|
var UNITS_MAX2 = 12;
|
|
13814
14011
|
var UNIT_TITLE_MAX2 = 50;
|
|
13815
14012
|
var UNIT_BODY_MAX2 = 200;
|
|
@@ -13874,15 +14071,15 @@ var CompletionSchema2 = external_exports.object({
|
|
|
13874
14071
|
}).strict();
|
|
13875
14072
|
var CompleteChangeSchema2 = CompletionSchema2.extend({ kind: external_exports.literal("complete") });
|
|
13876
14073
|
var ASKING_RULES2 = `HOW TO ASK:
|
|
13877
|
-
1.
|
|
13878
|
-
2.
|
|
13879
|
-
3. \`workItBlocks\` only
|
|
13880
|
-
4.
|
|
13881
|
-
5. One question, one row
|
|
13882
|
-
6. Read the Goal
|
|
13883
|
-
7.
|
|
13884
|
-
8. A diagnosis says when, why and how it happens, then proposes one fix.
|
|
13885
|
-
9.
|
|
14074
|
+
1. One question per object in \`questions\`, so each is answered on its own.
|
|
14075
|
+
2. \`goalId\` names the existing Goal it is about (create one with manage_goals first); the answer comes back there.
|
|
14076
|
+
3. \`workItBlocks\` only when you are truly blocked: it asks for a call.
|
|
14077
|
+
4. No while-loops. While any Call is open, even one your question joined from their items, keep receiving through empty windows; otherwise stop at one: the answer reaches you on the Goal. Yield only with a listener or wakeup.
|
|
14078
|
+
5. One question, one row: never re-send one still waiting; take back one that no longer matters with \`withdrawQuestionIds\`.
|
|
14079
|
+
6. Read the Goal before asking; never re-ask what was answered or shipped. \`replied\` means they chose no option: it is still yours to settle.
|
|
14080
|
+
7. Give options when you have them. Each label names its choice in full (never "Option 2"); never add "Other". \`pickMode\`: one (default), many, rank.
|
|
14081
|
+
8. A diagnosis says when, why and how it happens, then proposes one fix.
|
|
14082
|
+
9. Give a report its \`reply\`: one line in THEIR voice for THAT report, so you learn whether they verified it or only received it. Required when it is delivered or its Goal is done.`;
|
|
13886
14083
|
function draft20202(node) {
|
|
13887
14084
|
if (Array.isArray(node)) return node.map(draft20202);
|
|
13888
14085
|
if (node && typeof node === "object") {
|
|
@@ -13925,7 +14122,7 @@ var userExplicitlyRequested2 = external_exports.enum(["any", "call"]).optional()
|
|
|
13925
14122
|
`Only what the person said about THIS message, in so many words: "any" when they asked you to send it to them ("send it to my phone", "message me the result"), "call" when they asked to be called about it. It is then delivered (a call rings for the whole contact, and carries everything waiting on them); omitted, an update is only recorded as the Goal's progress unless the person needs it. Never set it to make a message louder.`
|
|
13926
14123
|
);
|
|
13927
14124
|
var units2 = external_exports.array(UnitInputSchema2).optional().describe(
|
|
13928
|
-
`The context this message needs, as up to ${UNITS_MAX2} units in reading order, each {title, body}: a title of at most ${UNIT_TITLE_MAX2} characters and a body of at most ${UNIT_BODY_MAX2}. One idea per unit. Leave it out when the main text says it all.`
|
|
14125
|
+
`The context this message needs, as up to ${UNITS_MAX2} units in reading order, each {title, body}: a title of at most ${UNIT_TITLE_MAX2} characters and a body of at most ${UNIT_BODY_MAX2}. One idea per unit. Leave it out when the main text says it all. Over a cap is refused by name (ask_too_long, too_many_units, unit_title_too_long, unit_body_too_long) and nothing is sent.`
|
|
13929
14126
|
);
|
|
13930
14127
|
var UpdateInputSchema2 = external_exports.object({
|
|
13931
14128
|
message: external_exports.string().trim().min(1).describe(`The one point, at most ${ASK_MAX2} characters; the context goes in units.`),
|
|
@@ -13980,11 +14177,11 @@ var questionFields2 = {
|
|
|
13980
14177
|
),
|
|
13981
14178
|
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."),
|
|
13982
14179
|
units: units2,
|
|
13983
|
-
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."),
|
|
14180
|
+
options: external_exports.array(OptionInputSchema2).min(1).max(6).optional().describe("The choices, when you have them. Each label stands on its own and differs from the others (duplicate_option_label), at most 50 characters; a hint, at most 200. They can always answer in their own words, so no 'Other' or 'None of these'."),
|
|
13984
14181
|
// HOW THE OPTIONS ARE ANSWERED, SAID BY THE AGENT (owner, 2026-10-02: "one and many makes sense";
|
|
13985
14182
|
// brain_prompts.md §1: structured agent questions need no model). The app draws all three.
|
|
13986
14183
|
pickMode: external_exports.enum(["one", "many", "rank"]).optional().describe(
|
|
13987
|
-
'How the options are answered: "one" (the default) a pick, for alternatives; "many" a checklist, for independent options they may want several of; "rank" an order of all of them. Only with options.'
|
|
14184
|
+
'How the options are answered: "one" (the default) a pick, for alternatives; "many" a checklist, for independent options they may want several of; "rank" an order of all of them. Only with options; "many" and "rank" need at least two (too_few_options).'
|
|
13988
14185
|
),
|
|
13989
14186
|
// WHAT THE QUESTION HOLDS UP (brain_prompts.md §2.1): replaces `waiting: 'hard'`. A question that
|
|
13990
14187
|
// blocks work asks for a call (the person's settings and ring cooldowns still decide).
|
|
@@ -13996,11 +14193,39 @@ var questionFields2 = {
|
|
|
13996
14193
|
var refineQuestion2 = (q, ctx) => {
|
|
13997
14194
|
refuseOverCaps2(q.question, q.units, "question", ctx);
|
|
13998
14195
|
if (q.pickMode && !q.options) ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["pickMode"], message: "pickMode comes only with options" });
|
|
14196
|
+
refuseThinOptions2(q, ctx);
|
|
13999
14197
|
const ids = (q.options ?? []).map((o) => o.id);
|
|
14000
14198
|
if (ids.some((id22) => id22) && (ids.some((id22) => !id22) || new Set(ids).size !== ids.length)) {
|
|
14001
14199
|
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["options"], message: "give every option a distinct id, or none" });
|
|
14002
14200
|
}
|
|
14003
14201
|
};
|
|
14202
|
+
var MIN_LIST_OPTIONS2 = 2;
|
|
14203
|
+
function refuseThinOptions2(q, ctx) {
|
|
14204
|
+
const options = q.options ?? [];
|
|
14205
|
+
if ((q.pickMode === "many" || q.pickMode === "rank") && options.length < MIN_LIST_OPTIONS2) {
|
|
14206
|
+
ctx.addIssue({
|
|
14207
|
+
code: external_exports.ZodIssueCode.custom,
|
|
14208
|
+
path: ["options"],
|
|
14209
|
+
params: { refusal: "too_few_options", length: options.length, min: MIN_LIST_OPTIONS2 },
|
|
14210
|
+
message: `too_few_options: pickMode "${q.pickMode}" needs at least ${MIN_LIST_OPTIONS2} options; this question has ${options.length}. Add the other choices, or leave pickMode out.`
|
|
14211
|
+
});
|
|
14212
|
+
}
|
|
14213
|
+
const seen = /* @__PURE__ */ new Map();
|
|
14214
|
+
options.forEach((o, index) => {
|
|
14215
|
+
const key22 = o.label.trim().toLowerCase();
|
|
14216
|
+
const first = seen.get(key22);
|
|
14217
|
+
if (first === void 0) {
|
|
14218
|
+
seen.set(key22, index);
|
|
14219
|
+
return;
|
|
14220
|
+
}
|
|
14221
|
+
ctx.addIssue({
|
|
14222
|
+
code: external_exports.ZodIssueCode.custom,
|
|
14223
|
+
path: ["options", index, "label"],
|
|
14224
|
+
params: { refusal: "duplicate_option_label", index, first },
|
|
14225
|
+
message: `duplicate_option_label: options[${index}] repeats the label of options[${first}]. Each option names a different choice.`
|
|
14226
|
+
});
|
|
14227
|
+
});
|
|
14228
|
+
}
|
|
14004
14229
|
var QuestionInputSchema2 = external_exports.object({
|
|
14005
14230
|
questionId: external_exports.string().uuid().optional().describe("Optional: your own stable id for this question (a UUID), so a resend is the same question. Minted for you when omitted; the result returns it."),
|
|
14006
14231
|
...questionFields2
|
|
@@ -14022,21 +14247,26 @@ var QuestionDependencySchema2 = external_exports.object({
|
|
|
14022
14247
|
reason: reason2.optional()
|
|
14023
14248
|
}).strict().refine(actionFits2, ACTION_FITS2);
|
|
14024
14249
|
var sendFields2 = {
|
|
14025
|
-
completions: external_exports.array(CompletionSchema2).min(1).max(20).optional().describe(
|
|
14250
|
+
completions: external_exports.array(CompletionSchema2).min(1).max(20).optional().describe(
|
|
14251
|
+
"COMPLETIONS close and report in one operation, the same contract as manage_goals kind:complete: closure and the report commit together or neither does. Required children and dependencies must already be finished. options suggest next steps: a tap acknowledges the report and requests that step, and never reopens the Goal (follow-up work needs a new one). No reviewer rejudges it: say only what your evidence supports. Ordinary updates never close a Goal."
|
|
14252
|
+
),
|
|
14026
14253
|
updates: external_exports.array(UpdateInputSchema2).min(1).max(20).optional().describe(
|
|
14027
|
-
"News: progress, findings, a result. An update asks nothing. It reaches the person only when they asked for it (userExplicitlyRequested), when it answers something they said, or once its Goal is done; otherwise it is recorded as the Goal's progress
|
|
14254
|
+
"News: progress, findings, a result. An update asks nothing. It reaches the person only when they asked for it (userExplicitlyRequested), when it answers something they said, or once its Goal is done; otherwise it is recorded as the Goal's progress, which the person is not told. Every update reaches the other agents that wrote on its Goal in the last hour: to tell another agent something, write it as an update on that agent's Goal."
|
|
14028
14255
|
),
|
|
14029
14256
|
answers: external_exports.array(AnswerInputSchema2).min(1).max(20).optional().describe("Answers to Questions addressed to you."),
|
|
14030
14257
|
withdrawQuestionIds: external_exports.array(questionHandle2).min(1).max(10).optional().describe(
|
|
14031
14258
|
"Questions you asked that no longer need an answer: you acted on them yourself, they no longer matter, or you asked wrongly. Each is cancelled, not answered: its card closes and nothing rings for it."
|
|
14032
14259
|
),
|
|
14260
|
+
bumpQuestionIds: external_exports.array(questionHandle2).min(1).max(10).optional().describe(
|
|
14261
|
+
"Your own questions still waiting on the person that you want them to notice again. Each moves back to the top of its card with one new notification; nothing is resent and no second card is made."
|
|
14262
|
+
),
|
|
14033
14263
|
questionDependencies: external_exports.array(QuestionDependencySchema2).min(1).max(20).optional().describe(
|
|
14034
14264
|
"Add or remove what a Question you asked holds up, after asking it."
|
|
14035
14265
|
)
|
|
14036
14266
|
};
|
|
14037
14267
|
var ContactSchema2 = external_exports.object({
|
|
14038
14268
|
...sendFields2,
|
|
14039
|
-
questions: external_exports.array(QuestionInputSchema2).min(1).max(20).optional().describe("Questions for the person, one per object."),
|
|
14269
|
+
questions: external_exports.array(QuestionInputSchema2).min(1).max(20).optional().describe("Questions for the person, one per object, each sent exactly as written, with no reading in between."),
|
|
14040
14270
|
/** RECEIVING (2I, I2; brain_prompts.md §2.2): the events this agent handled. */
|
|
14041
14271
|
ackEventIds: external_exports.array(external_exports.string().uuid()).min(1).max(100).optional().describe(
|
|
14042
14272
|
"The exact eventIds of the events you have handled: an acknowledgment (ACK). Reading alone acknowledges nothing, so an event comes back until you acknowledge it; after that the next batch can come. Each recipient acknowledges separately, for itself only. A Question you owe is answered (answers), never acknowledged away."
|
|
@@ -14045,22 +14275,34 @@ var ContactSchema2 = external_exports.object({
|
|
|
14045
14275
|
"Only controls when this returns. Sending: false (the default) returns at once; true waits up to about 45 seconds for a response to what you sent. Sending nothing: true (the default) waits up to about 45 seconds for anything addressed to you; false returns what is waiting now. It does not mean work is blocked, set urgency, or ask for a call. `waitOutcome` says which happened: `available`, `expired` (nothing arrived; wait again without sending again), or `not_waited`."
|
|
14046
14276
|
)
|
|
14047
14277
|
}).strict();
|
|
14048
|
-
var sendsAnything2 = (c) => !!(c.completions?.length || c.updates?.length || c.questions?.length || c.answers?.length || c.withdrawQuestionIds?.length || c.questionDependencies?.length);
|
|
14278
|
+
var sendsAnything2 = (c) => !!(c.completions?.length || c.updates?.length || c.questions?.length || c.answers?.length || c.withdrawQuestionIds?.length || c.bumpQuestionIds?.length || c.questionDependencies?.length);
|
|
14049
14279
|
var ContactWireSchema2 = external_exports.object({
|
|
14050
14280
|
operationId: external_exports.string().uuid(),
|
|
14051
14281
|
...sendFields2,
|
|
14052
14282
|
questions: external_exports.array(QuestionWireSchema2).min(1).max(20).optional()
|
|
14053
14283
|
}).strict().refine(sendsAnything2, "a contact sends at least one update, question, answer, withdrawal or question dependency");
|
|
14054
14284
|
var CONTACT_SCHEMA2 = { type: "object", ...mcpInputSchema2(ContactSchema2) };
|
|
14055
|
-
var CONTACT_DESCRIPTION2 = "Send to and receive from the person: completions, updates, questions, answers to questions addressed to you, withdrawals
|
|
14056
|
-
|
|
14057
|
-
CUT A LONG MESSAGE BEFORE YOU SEND IT: a question, an update's message or an answer is the one point, in at most ${ASK_MAX2} characters; everything else it needs goes in 'units', up to ${UNITS_MAX2} {title, body} in reading order, one idea each, every title at most ${UNIT_TITLE_MAX2} characters and every body at most ${UNIT_BODY_MAX2}. The person sees the main text and the titles, and opens a unit to read its body. Over a cap is refused by name (ask_too_long, too_many_units, unit_title_too_long, unit_body_too_long) and nothing is sent.
|
|
14285
|
+
var CONTACT_DESCRIPTION2 = "Send to and receive from the person: completions, updates, questions, answers to questions addressed to you, withdrawals, and what a question holds up. Every Goal named must exist: an unknown one refuses the whole contact. Each item applies on its own: read `results`, where a failed one names why.\n\n" + ASKING_RULES2 + `
|
|
14058
14286
|
|
|
14059
|
-
|
|
14287
|
+
LENGTH: the question, message or answer is the one point, at most ${ASK_MAX2} characters; the rest goes in \`units\`, one idea each. Over a cap is refused by name and nothing is sent. Several results are several updates.
|
|
14060
14288
|
|
|
14061
|
-
|
|
14289
|
+
UPDATES ask nothing. One reaches the person only when they asked for it, it answers something they said, or its Goal is done; else it is kept as progress. One that reaches them joins an open report card or a live call.
|
|
14062
14290
|
|
|
14063
|
-
RECEIVING:
|
|
14291
|
+
RECEIVING: contact({}) waits ~45 s; contact({wait:false}) returns \`events\` at once. Confirm the ones you handled with contact({ackEventIds}).`;
|
|
14292
|
+
var HELP_TOPICS2 = ["pairing", "listening", "receiving", "asking", "updates", "goals", "calls"];
|
|
14293
|
+
var unknownTopic2 = (topic) => `unknown_topic: ${JSON.stringify(topic)} is not a section of the guide. Topics: ${HELP_TOPICS2.join(", ")}; or omit topic for the whole guide.`;
|
|
14294
|
+
var HelpSchema2 = external_exports.object({
|
|
14295
|
+
topic: external_exports.enum(HELP_TOPICS2, { errorMap: (_issue, ctx) => ({ message: unknownTopic2(ctx.data) }) }).optional().describe("One section of the guide. Omit it for the whole guide.")
|
|
14296
|
+
}).strict();
|
|
14297
|
+
var HELP_DESCRIPTION2 = "Start here: how to use Paigy, in full \u2014 pairing, listening, receiving, asking, updates and completions, Goals and calls. Pass a topic for one section. Read-only; needs no setup.";
|
|
14298
|
+
var AGENT_PROMPTS2 = [
|
|
14299
|
+
{
|
|
14300
|
+
name: "help",
|
|
14301
|
+
description: "How to use Paigy: the whole guide, or one topic of it.",
|
|
14302
|
+
arguments: [{ name: "topic", description: `One section: ${HELP_TOPICS2.join(", ")}. Omit it for the whole guide.`, required: false }]
|
|
14303
|
+
},
|
|
14304
|
+
{ name: "welcome", description: "Start here: who you are on Paigy, then listen and collect your open work." }
|
|
14305
|
+
];
|
|
14064
14306
|
var CreateGoalSchema2 = external_exports.object({
|
|
14065
14307
|
outcome: external_exports.string().trim().min(1).max(1e4),
|
|
14066
14308
|
/** The work's NAME (#2115) — one to five words, how a person refers to it out loud ("the night
|
|
@@ -14161,9 +14403,12 @@ var GetGoalsSchema2 = external_exports.object({
|
|
|
14161
14403
|
history: external_exports.boolean().optional()
|
|
14162
14404
|
}).strict();
|
|
14163
14405
|
var GetDeliverySchema2 = external_exports.object({
|
|
14164
|
-
deliveryId: external_exports.string().uuid().describe("The Delivery id returned by contact or receive.")
|
|
14406
|
+
deliveryId: external_exports.string().uuid().describe("The Delivery id returned by contact or receive."),
|
|
14407
|
+
// WHAT WAS SAID ON A CALL (owner, 2026-10-26, Goal c743f4a4: "A flag on get_delivery", "Any of my agents").
|
|
14408
|
+
transcript: external_exports.boolean().optional().describe("For a Call: also return what was said on it, one page of spoken lines."),
|
|
14409
|
+
after: external_exports.string().max(40).optional().describe("With transcript: the next value the previous page returned, to read the next page.")
|
|
14165
14410
|
}).strict();
|
|
14166
|
-
var GET_DELIVERY_DESCRIPTION2 = "Read a Delivery in full: its whole ask, units, options and answers, plus current callState and callOutcome for a Call. Any agent of the same account may read it; another account is not disclosed. Reading never acknowledges or resends anything. Use this after a call or when receive names a Call you are waiting on.";
|
|
14411
|
+
var GET_DELIVERY_DESCRIPTION2 = "Read a Delivery in full: its whole ask, units, options and answers, plus current callState and callOutcome for a Call. For a Call, transcript: true adds what was said: each spoken line in order, who said it, and when from pickup, a page at a time. A line from the room, not the person, is marked room. Any agent of the same account may read it; another account is not disclosed. Reading never acknowledges or resends anything. Use this after a call or when receive names a Call you are waiting on.";
|
|
14167
14412
|
var GET_GOALS_DESCRIPTION2 = "Read one to ten Goals by goalIds, returned in the same order under goals (a read never puts you on them). history applies to every requested Goal. A refused read fails the call with its original refusal; no partial result is presented as complete. Each Goal includes its ten most recent other contributors (names, latest entry headlines and times), outcome, state, revision, progress, blockers, the conversation on it (each question with its options and what was decided), `next`, the one step to take, and `more`, where to read further. A question in that conversation reads `open` (nothing yet), `answered` (a choice was made, and `answer` carries it), `replied` (they said something and the read settled the question on their words \u2014 NO option of yours was chosen, and the words are the reply line beside it, so read that before you act), or `closed`. The conversation carries everything the person said, every open question and your newest entry; your older entries are left out and counted \u2014 history: true reads every entry in full. Every Goal of your person is readable, whichever of their agents owns it; another account's Goals are not disclosed.";
|
|
14168
14413
|
var SearchToolSchema2 = external_exports.object({
|
|
14169
14414
|
query: external_exports.string().trim().min(1).max(500),
|
|
@@ -14190,7 +14435,9 @@ var AGENT_TOOLS2 = [
|
|
|
14190
14435
|
{ name: "get_goals", description: GET_GOALS_DESCRIPTION2, inputSchema: mcpInputSchema2(GetGoalsSchema2) },
|
|
14191
14436
|
{ name: "search", description: SEARCH_DESCRIPTION2, inputSchema: mcpInputSchema2(SearchToolSchema2) },
|
|
14192
14437
|
{ name: "check_activity", description: "Read your person's agents that contributed in the last 24 hours, newest first: at most 30 agents and their five most recently touched Goals, with their latest entry headline and time. Use get_goals to read a Goal and its other contributors before starting overlapping work. Read-only; no arguments.", inputSchema: mcpInputSchema2(CheckActivitySchema2) },
|
|
14193
|
-
{ name: "send_feedback", description: SEND_FEEDBACK_DESCRIPTION2, inputSchema: mcpInputSchema2(SendFeedbackSchema2) }
|
|
14438
|
+
{ name: "send_feedback", description: SEND_FEEDBACK_DESCRIPTION2, inputSchema: mcpInputSchema2(SendFeedbackSchema2) },
|
|
14439
|
+
// THE GUIDE FROM INSIDE THE MCP (owner, 2026-10-27): the skill's text, needing no identity (`help.ts`).
|
|
14440
|
+
{ name: "help", description: HELP_DESCRIPTION2, inputSchema: mcpInputSchema2(HelpSchema2) }
|
|
14194
14441
|
];
|
|
14195
14442
|
var AGENT_TOOL_NAMES2 = AGENT_TOOLS2.map((t) => t.name);
|
|
14196
14443
|
var id2 = external_exports.string().uuid();
|
|
@@ -14278,11 +14525,22 @@ var BrainMessageSchema2 = external_exports.union([
|
|
|
14278
14525
|
// A MESSAGE TO THE PERSON KEEPS ITS SENTENCES (turns.md): the talker writes them one by one, and each is
|
|
14279
14526
|
// its own unit of speech (`<cycle>:<key>:<n>`). `text` is the same words joined, for every reader of a
|
|
14280
14527
|
// message's words. Absent on results written before sentences.
|
|
14281
|
-
external_exports.object({
|
|
14528
|
+
external_exports.object({
|
|
14529
|
+
...messageBase2,
|
|
14530
|
+
to: external_exports.object({ kind: external_exports.literal("user") }).strict(),
|
|
14531
|
+
sentences: external_exports.array(external_exports.string().min(1)).min(1).optional(),
|
|
14532
|
+
// THE REPORTS IT TELLS, BY THEIR OWN IDENTITY (call 9d1c096c, 2026-10-15): the talker's message names the report
|
|
14533
|
+
// Entries it speaks of, so the plan's line names that report rather than re-finding it by its Goal. Absent on
|
|
14534
|
+
// results written before it.
|
|
14535
|
+
tells: external_exports.array(external_exports.object({ id: id2 }).strict()).optional()
|
|
14536
|
+
}).strict(),
|
|
14282
14537
|
external_exports.object({
|
|
14283
14538
|
...messageBase2,
|
|
14284
14539
|
to: external_exports.object({ kind: external_exports.literal("agent"), agentId: external_exports.string().regex(/^agent:(?!paigy$)\S+$/) }).strict(),
|
|
14285
14540
|
call: external_exports.object({ callId: id2, listen: external_exports.literal(true) }).strict().optional(),
|
|
14541
|
+
// WHAT IT ASKS THE AGENT, IN UNDER TEN WORDS (owner, 2026-10-15: "Yes, add the summary"): the talker's own, stored
|
|
14542
|
+
// as the sent Entry's summary, which the recap's "Sent to <agent>: …" row shows. Absent on results written before it.
|
|
14543
|
+
summary: external_exports.string().optional(),
|
|
14286
14544
|
// THE PERSON ASKED TO BE CALLED BACK ONCE THIS AGENT'S WORK IS DONE (turns.md, step 0): the agent owes
|
|
14287
14545
|
// the call, and its next contact about it rings them (`public.callbacks`).
|
|
14288
14546
|
callback: external_exports.literal(true).optional()
|
|
@@ -14309,95 +14567,98 @@ var BrainResultSchema2 = external_exports.object({
|
|
|
14309
14567
|
next: BrainNextSchema2,
|
|
14310
14568
|
search: BrainSearchSchema2.optional()
|
|
14311
14569
|
}).strict();
|
|
14312
|
-
var
|
|
14570
|
+
var str22 = external_exports.string();
|
|
14313
14571
|
var strs4 = external_exports.array(external_exports.string());
|
|
14314
14572
|
var CompactResultSchema2 = external_exports.object({
|
|
14315
|
-
next: external_exports.object({ say: strs4, then: external_exports.enum(["listen", "hold", "end", "none"]), waitFor: strs4, reason:
|
|
14316
|
-
messages: external_exports.array(external_exports.object({ key:
|
|
14317
|
-
entries: external_exports.array(external_exports.object({ key:
|
|
14318
|
-
answers: external_exports.array(external_exports.object({ question:
|
|
14573
|
+
next: external_exports.object({ say: strs4, then: external_exports.enum(["listen", "hold", "end", "none"]), waitFor: strs4, reason: str22, instructions: strs4 }).strict(),
|
|
14574
|
+
messages: external_exports.array(external_exports.object({ key: str22, to: str22, text: str22, about: strs4, entries: strs4, owed: strs4, inviteToCall: external_exports.boolean() }).strict()),
|
|
14575
|
+
entries: external_exports.array(external_exports.object({ key: str22, from: str22, on: strs4 }).strict()),
|
|
14576
|
+
answers: external_exports.array(external_exports.object({ question: str22, entries: strs4, summary: str22, picked: strs4 }).strict()),
|
|
14319
14577
|
changes: external_exports.array(external_exports.object({
|
|
14320
|
-
key:
|
|
14578
|
+
key: str22,
|
|
14321
14579
|
what: external_exports.enum(["goal", "question", "lesson"]),
|
|
14322
14580
|
op: external_exports.enum(["create", "edit", "assign", "open", "complete", "cancel", "defer", "move", "block", "unblock", "withdraw", "remember", "revise"]),
|
|
14323
|
-
id:
|
|
14324
|
-
text:
|
|
14325
|
-
title:
|
|
14326
|
-
who:
|
|
14327
|
-
under:
|
|
14581
|
+
id: str22,
|
|
14582
|
+
text: str22,
|
|
14583
|
+
title: str22,
|
|
14584
|
+
who: str22,
|
|
14585
|
+
under: str22,
|
|
14328
14586
|
gate: external_exports.enum(["start", "complete", "answer", "none"]),
|
|
14329
|
-
options: external_exports.array(external_exports.object({ id:
|
|
14587
|
+
options: external_exports.array(external_exports.object({ id: str22, label: str22 }).strict()),
|
|
14330
14588
|
pick: external_exports.enum(["one", "many", "rank", "words"]),
|
|
14331
14589
|
entries: strs4
|
|
14332
14590
|
}).strict()),
|
|
14333
14591
|
feedback: external_exports.array(strs4),
|
|
14334
|
-
search: external_exports.object({ query:
|
|
14592
|
+
search: external_exports.object({ query: str22, within: strs4, goal: str22 }).strict()
|
|
14335
14593
|
}).strict();
|
|
14336
14594
|
var COMPACT_RESULT_JSON_SCHEMA2 = (({ $schema: _, ...rest }) => rest)(
|
|
14337
14595
|
zodToJsonSchema2(CompactResultSchema2, { $refStrategy: "none" })
|
|
14338
14596
|
);
|
|
14339
|
-
var
|
|
14597
|
+
var str32 = external_exports.string();
|
|
14340
14598
|
var strs22 = external_exports.array(external_exports.string());
|
|
14341
14599
|
var TalkerReplySchema2 = external_exports.object({
|
|
14342
14600
|
/** What to say and send, messages to the person first: spoken in the order written. `to` is "user"
|
|
14343
14601
|
* or an agent's handle; `sentences` is what a message to the person says, one short sentence each
|
|
14344
|
-
* ([] to an agent); `text` is what a message to an agent says ("" to the person); `
|
|
14602
|
+
* ([] to an agent); `text` is what a message to an agent says ("" to the person); `summary` is what it
|
|
14603
|
+
* asks the agent, in under ten words, as the person would put it ("" to the person; owner, 2026-10-15:
|
|
14604
|
+
* "Yes, add the summary"), which the recap's "Sent to <agent>: …" row shows; `about` names
|
|
14345
14605
|
* handles; `blocks` is the item a question to an agent must be answered before ("" for none);
|
|
14346
14606
|
* `callback` is true on a message to the agent doing work the person asked to be called back about
|
|
14347
14607
|
* once it is done (false otherwise): that agent then owes the call (turns.md, step 0). */
|
|
14348
|
-
messages: external_exports.array(external_exports.object({ key:
|
|
14608
|
+
messages: external_exports.array(external_exports.object({ key: str32, to: str32, sentences: strs22, text: str32, summary: str32, about: strs22, blocks: str32, callback: external_exports.boolean() }).strict()),
|
|
14349
14609
|
/** What the call does next: listen, hold (the person asked for a moment) or end (they asked to). */
|
|
14350
14610
|
then: external_exports.enum(["listen", "hold", "end"]),
|
|
14351
14611
|
/** The person's replies to items (replies, owner 2026-10-07): the item's handle, the chosen option
|
|
14352
14612
|
* IDs, the line handles, how they replied in under ten words (keeping any condition), and `defer`:
|
|
14353
14613
|
* "" when their words settle the item, else what a reply that puts it off waits for -- "call" (the
|
|
14354
14614
|
* end of this call), a question's handle (that question's answer) or an ISO time. */
|
|
14355
|
-
replies: external_exports.array(external_exports.object({ item:
|
|
14615
|
+
replies: external_exports.array(external_exports.object({ item: str32, options: strs22, lines: strs22, summary: str32, defer: str32 }).strict()),
|
|
14356
14616
|
/** The line handles that tell the talker how to run this call; they last until it ends and reach no agent. */
|
|
14357
14617
|
instruction: strs22,
|
|
14358
14618
|
/** The line handles the filer acts on, and the only ones it reads (3e): new work, a change to existing
|
|
14359
14619
|
* work, feedback on Paigy, anything said to an agent, and any rule meant to outlast the call. */
|
|
14360
14620
|
file: strs22,
|
|
14361
14621
|
/** Evidence to fetch for a second round: a search, an item's full text, or an agent by name. */
|
|
14362
|
-
need: external_exports.object({ kind: external_exports.enum(["search", "item", "agent", ""]), text:
|
|
14622
|
+
need: external_exports.object({ kind: external_exports.enum(["search", "item", "agent", ""]), text: str32 }).strict(),
|
|
14363
14623
|
/** The handle of the item to explain ("" for none). */
|
|
14364
|
-
explain:
|
|
14624
|
+
explain: str32
|
|
14365
14625
|
}).strict();
|
|
14366
14626
|
var TALKER_REPLY_JSON_SCHEMA2 = (({ $schema: _, ...rest }) => rest)(
|
|
14367
14627
|
zodToJsonSchema2(TalkerReplySchema2, { $refStrategy: "none" })
|
|
14368
14628
|
);
|
|
14369
|
-
var
|
|
14629
|
+
var str42 = external_exports.string();
|
|
14370
14630
|
var strs32 = external_exports.array(external_exports.string());
|
|
14371
14631
|
var FilerReplySchema2 = external_exports.object({
|
|
14372
|
-
/** Which Goals each new line goes on: a line's handle, Goal handles (or keys of new Goals
|
|
14373
|
-
* the line says in at most
|
|
14374
|
-
|
|
14632
|
+
/** Which Goals each new line goes on: a line's handle, Goal handles (or keys of new Goals: a line that asks
|
|
14633
|
+
* for new work goes on the Goal it creates, owner 2026-10-26), and what the line says in at most twenty
|
|
14634
|
+
* words (owner, 2026-10-26: "bump it from 10 to 20 words"). */
|
|
14635
|
+
filed: external_exports.array(external_exports.object({ line: str42, goals: strs32, summary: str42 }).strict()),
|
|
14375
14636
|
goals: external_exports.array(external_exports.object({
|
|
14376
14637
|
op: external_exports.enum(["create", "edit", "complete", "cancel", "reopen", "assign", "defer", "move", "block", "unblock"]),
|
|
14377
|
-
key:
|
|
14378
|
-
goal:
|
|
14379
|
-
title:
|
|
14380
|
-
outcome:
|
|
14381
|
-
owner:
|
|
14382
|
-
under:
|
|
14383
|
-
until:
|
|
14384
|
-
on:
|
|
14638
|
+
key: str42,
|
|
14639
|
+
goal: str42,
|
|
14640
|
+
title: str42,
|
|
14641
|
+
outcome: str42,
|
|
14642
|
+
owner: str42,
|
|
14643
|
+
under: str42,
|
|
14644
|
+
until: str42,
|
|
14645
|
+
on: str42,
|
|
14385
14646
|
gate: external_exports.enum(["start", "complete", "answer", ""]),
|
|
14386
|
-
why:
|
|
14647
|
+
why: str42
|
|
14387
14648
|
}).strict()),
|
|
14388
14649
|
questions: external_exports.array(external_exports.object({
|
|
14389
14650
|
op: external_exports.enum(["create", "edit", "assign", "withdraw"]),
|
|
14390
|
-
key:
|
|
14391
|
-
question:
|
|
14392
|
-
text:
|
|
14393
|
-
summary:
|
|
14394
|
-
to:
|
|
14395
|
-
goal:
|
|
14396
|
-
options: external_exports.array(external_exports.object({ id:
|
|
14651
|
+
key: str42,
|
|
14652
|
+
question: str42,
|
|
14653
|
+
text: str42,
|
|
14654
|
+
summary: str42,
|
|
14655
|
+
to: str42,
|
|
14656
|
+
goal: str42,
|
|
14657
|
+
options: external_exports.array(external_exports.object({ id: str42, label: str42 }).strict()),
|
|
14397
14658
|
pick: external_exports.enum(["one", "many", "rank", "words", ""]),
|
|
14398
|
-
blocks:
|
|
14659
|
+
blocks: str42
|
|
14399
14660
|
}).strict()),
|
|
14400
|
-
lessons: external_exports.array(external_exports.object({ op: external_exports.enum(["remember", "revise", "withdraw"]), lesson:
|
|
14661
|
+
lessons: external_exports.array(external_exports.object({ op: external_exports.enum(["remember", "revise", "withdraw"]), lesson: str42, text: str42, scope: str42 }).strict()),
|
|
14401
14662
|
/** Line handles whose words comment on Paigy itself. */
|
|
14402
14663
|
feedback: strs32
|
|
14403
14664
|
}).strict();
|
|
@@ -14458,6 +14719,27 @@ var TidyReplySchema2 = external_exports.object({
|
|
|
14458
14719
|
var TIDY_REPLY_JSON_SCHEMA2 = (({ $schema: _, ...rest }) => rest)(
|
|
14459
14720
|
zodToJsonSchema2(TidyReplySchema2, { $refStrategy: "none" })
|
|
14460
14721
|
);
|
|
14722
|
+
var HandoutReplySchema2 = external_exports.object({
|
|
14723
|
+
assign: external_exports.array(external_exports.object({
|
|
14724
|
+
/** The Goal's handle (G). */
|
|
14725
|
+
goal: external_exports.string(),
|
|
14726
|
+
/** The agent's handle (A). */
|
|
14727
|
+
to: external_exports.string(),
|
|
14728
|
+
/** At most ten words, naming the Goal of theirs it is most like: the reason the hand-out records. */
|
|
14729
|
+
why: external_exports.string()
|
|
14730
|
+
}).strict()),
|
|
14731
|
+
/** The Goals no listed agent's work is even loosely like: Paigy starts a session for them (owner, 2026-10-24,
|
|
14732
|
+
* Goal 37603006, "One per family of related Goals"). */
|
|
14733
|
+
new: external_exports.array(external_exports.object({
|
|
14734
|
+
/** The Goal's handle (G). */
|
|
14735
|
+
goal: external_exports.string(),
|
|
14736
|
+
/** At most ten words: why nothing active fits it. */
|
|
14737
|
+
why: external_exports.string()
|
|
14738
|
+
}).strict())
|
|
14739
|
+
}).strict();
|
|
14740
|
+
var HANDOUT_REPLY_JSON_SCHEMA2 = (({ $schema: _, ...rest }) => rest)(
|
|
14741
|
+
zodToJsonSchema2(HandoutReplySchema2, { $refStrategy: "none" })
|
|
14742
|
+
);
|
|
14461
14743
|
function entryWords(entry) {
|
|
14462
14744
|
const content = entry.content;
|
|
14463
14745
|
if (content && "sealed" in content) return "";
|
|
@@ -14604,7 +14886,7 @@ var NotifyRequestFields2 = external_exports.object({
|
|
|
14604
14886
|
* derive agent-side before sealing, so the server only ever shapes plaintext). */
|
|
14605
14887
|
// 10k, not a sentence budget. What the human hears is bounded by the BROKER — it splits
|
|
14606
14888
|
// the ask into topics and gives each one at most three sentences and one question
|
|
14607
|
-
// (docs/
|
|
14889
|
+
// (docs/history/agenda-design.md) — not by a wire cap the agent has to pre-summarize under.
|
|
14608
14890
|
// Owner, 2026-07-28: "our actual limitation on how long something is to the user should
|
|
14609
14891
|
// come from the broker splitting and summarizing." The cap that remains is a size guard.
|
|
14610
14892
|
ask: external_exports.string().min(1).max(1e4).optional().describe(
|
|
@@ -14681,7 +14963,7 @@ var UserAnswerSchema2 = external_exports.discriminatedUnion("kind", [
|
|
|
14681
14963
|
external_exports.object({ kind: external_exports.literal("clarify"), chunks: external_exports.array(external_exports.string()).min(1) }),
|
|
14682
14964
|
external_exports.object({ kind: external_exports.literal("confirm"), approved: external_exports.boolean() }),
|
|
14683
14965
|
external_exports.object({ kind: external_exports.literal("turns"), turns: external_exports.array(TurnSchema2).min(1) }),
|
|
14684
|
-
/** An auto-answer derived from the user's PAST decisions (docs/
|
|
14966
|
+
/** An auto-answer derived from the user's PAST decisions (docs/history/precedent-design.md §2):
|
|
14685
14967
|
* delivered through the same settle/await path as a human answer, carrying the judge's
|
|
14686
14968
|
* derivation and the precedent ids it grew from. Always paired with a visible trail
|
|
14687
14969
|
* card the user can reply to — the broker never overrides the user. */
|
|
@@ -14832,6 +15114,21 @@ var AgendaTurnSchema2 = external_exports.object({
|
|
|
14832
15114
|
* the phone (`asking`, so the agenda goes gold and its options show) without treating the line as a
|
|
14833
15115
|
* question turn — the talker owns re-asking and the waits, so `question` stays null. */
|
|
14834
15116
|
onTable: external_exports.boolean().optional(),
|
|
15117
|
+
/** THE CARRIED ITEM THIS LINE TELLS (Goal 2a1e50eb, owner 2026-10-14: "Build the whole design") — a
|
|
15118
|
+
* request the Call carries that asks NOTHING: a report, a progress note, another agent's waiting news.
|
|
15119
|
+
* Its request Entry id, so the phone can make that agenda row the current one while it is read
|
|
15120
|
+
* (`telling` on the `turn` topic, `docs/clients/app/walk/design.md` §11).
|
|
15121
|
+
*
|
|
15122
|
+
* A FIELD OF ITS OWN, NEVER `claimId`: the claim is the RETURN identity — answers route by it and the
|
|
15123
|
+
* record tags the line with it (`workId`) — and an answer must never route to an Entry that asks
|
|
15124
|
+
* nothing. Absent on a turn speaking for a question (`claimId` says that) and on one speaking for no
|
|
15125
|
+
* carried item at all (an opener, a sign-off, Paigy's own line). */
|
|
15126
|
+
telling: external_exports.string().optional(),
|
|
15127
|
+
/** PAIGY'S OWN LINE (owner, 2026-10-15; calls ed2cbdce, ad50ad25): a turn that speaks for no item -- an
|
|
15128
|
+
* opener, a sign-off, a reply about nothing an agent asked or told -- is recorded as Paigy's, not as the
|
|
15129
|
+
* agent that rang. Absent on every turn that speaks for an item (`agentId` names whose), and on plans
|
|
15130
|
+
* from before it: a bot that does not know it records the ringing agent, as before. */
|
|
15131
|
+
speaksFor: external_exports.literal("paigy").optional(),
|
|
14835
15132
|
select: SelectShapeSchema2.optional(),
|
|
14836
15133
|
options: external_exports.array(OptionSchema2.omit({ id: true })).optional(),
|
|
14837
15134
|
/* `pace` STOOD HERE (#826). A turn could carry seconds and the model chose them. The walk
|
|
@@ -14920,7 +15217,7 @@ var InboxItemSchema2 = external_exports.object({
|
|
|
14920
15217
|
questions: external_exports.array(CallQuestionSchema2).optional(),
|
|
14921
15218
|
/** The same call carrying order, including request Entries with no DecisionNeed as reports.
|
|
14922
15219
|
* Additive: questions stays decision-only for every other surface and older bundles. */
|
|
14923
|
-
callItems: external_exports.array(CallQuestionSchema2.extend({ state: external_exports.enum(["open", "answered", "report"]) })).optional(),
|
|
15220
|
+
callItems: external_exports.array(CallQuestionSchema2.extend({ state: external_exports.enum(["open", "answered", "report"]), acknowledged: external_exports.boolean().optional() })).optional(),
|
|
14924
15221
|
visuals: external_exports.array(VisualSchema2).optional(),
|
|
14925
15222
|
/** The connected agent's name (the single pairing name — user-typed, or the
|
|
14926
15223
|
* agent's suggestion, or a default silly name). */
|
|
@@ -14940,11 +15237,6 @@ var InboxItemSchema2 = external_exports.object({
|
|
|
14940
15237
|
* the agent (provider-agnostic; set server-side). Absent = no hard error. Drives the inbox
|
|
14941
15238
|
* error badge + Retry. */
|
|
14942
15239
|
error: external_exports.string().optional(),
|
|
14943
|
-
/** WHEN THIS AGENT WORK WENT QUIET (turn="agent"), by the one rule (`coldSince`: three days
|
|
14944
|
-
* with nothing said), or absent while it is not stalled. The inbox's stalled badge reads
|
|
14945
|
-
* this and nothing else (2026-09-23: a 3-minute age rule badged every live Goal stalled,
|
|
14946
|
-
* and "dismiss the stalled ones" cancelled 37 pieces of live work). */
|
|
14947
|
-
cold: external_exports.string().datetime().optional(),
|
|
14948
15240
|
clarifies: external_exports.string().optional(),
|
|
14949
15241
|
/** THIS CARD'S QUESTION IS ON A LIVE CALL (owner, 2026-09-24: "Mark it while the call is
|
|
14950
15242
|
* live"). Present only while an open Call Delivery carries the card's request Entry — read
|
|
@@ -14982,9 +15274,35 @@ var InboxItemSchema2 = external_exports.object({
|
|
|
14982
15274
|
"Labels for a select:'confirm' paige \u2014 'yesno' (Yes/No) or 'approve' (Approve/Deny). Ignored unless select is 'confirm'."
|
|
14983
15275
|
),
|
|
14984
15276
|
/** Real downstream work is stuck behind this one — set by the agent, independent of
|
|
14985
|
-
* urgency (see the main README's "premier use case" + docs/
|
|
15277
|
+
* urgency (see the main README's "premier use case" + docs/history/notify-states.md). Drives the
|
|
14986
15278
|
* inbox's blocking badge and the extra confirm step before dismissing it. */
|
|
14987
15279
|
blocking: external_exports.boolean().default(false),
|
|
15280
|
+
/** WHAT FREED THIS QUESTION (owner, 2026-10-16, Goal 2383ef14: "we don't really show the question
|
|
15281
|
+
* at the top until the question it could reply to with is resolved. And then we show it again
|
|
15282
|
+
* with the context of the other thing that was resolved"; asked how it should carry that, "The
|
|
15283
|
+
* answer above it"). A question they answered with a question of their own waits for theirs
|
|
15284
|
+
* (`private.ask_back`) and drops out of the front while it waits; when it comes back, the card
|
|
15285
|
+
* draws their question and the answer it got ABOVE the ask, as one card. Absent on a question
|
|
15286
|
+
* nothing ever held back. */
|
|
15287
|
+
freedBy: external_exports.object({
|
|
15288
|
+
questionId: external_exports.string(),
|
|
15289
|
+
asked: external_exports.string(),
|
|
15290
|
+
answer: external_exports.string(),
|
|
15291
|
+
answeredAt: external_exports.string(),
|
|
15292
|
+
/** The answer in ten words, when the talker wrote one beside it. */
|
|
15293
|
+
summary: external_exports.string().optional()
|
|
15294
|
+
}).optional(),
|
|
15295
|
+
/** WHAT THIS CARD ANSWERS (owner, 2026-10-27, Goal 81b6a9d6: "this reads very clearly as an answer to
|
|
15296
|
+
* something I asked, but I don't see the question… To show the question near the top of the card").
|
|
15297
|
+
* An agent's card that is its answer to one of the person's own questions carries that question's
|
|
15298
|
+
* words, drawn above it as "You asked" (`public.questions_answered_by`, read beside the card read).
|
|
15299
|
+
* Absent on every card that answers nothing of theirs, and on a held question, which has `freedBy`. */
|
|
15300
|
+
answering: external_exports.object({ asked: external_exports.string() }).optional(),
|
|
15301
|
+
/** WHEN ITS AGENT LAST BUMPED THIS QUESTION (#2855, `contact`'s `bumpQuestionIds`): the agent asked
|
|
15302
|
+
* the person to notice it again, and For you puts it first, the latest bump on top
|
|
15303
|
+
* (`question/order.ts`). Absent on a question never bumped, and on every card from an API older
|
|
15304
|
+
* than the bump. */
|
|
15305
|
+
bumpedAt: external_exports.string().optional(),
|
|
14988
15306
|
/** The user's locked-in answer; present only for replied items (GET /api/replied/:id). */
|
|
14989
15307
|
answer: UserAnswerSchema2.optional(),
|
|
14990
15308
|
/** THE TARGET FACTS A CARD RENDERS (#1796 point 5, 2026-09-11): the Delivery it is a view of,
|
|
@@ -15011,7 +15329,7 @@ var InboxItemSchema2 = external_exports.object({
|
|
|
15011
15329
|
*
|
|
15012
15330
|
* THE PAYLOAD'S OWN HASH, NEVER A STAMP ON THE WORK — the same mechanism as `QueueItem.rev`
|
|
15013
15331
|
* (#2928) and an entry's (#3018), for the same reason: a card shows facts no `updated_at` of its
|
|
15014
|
-
* own moves (its Goal's state and name,
|
|
15332
|
+
* own moves (its Goal's state and name, whether a ring is
|
|
15015
15333
|
* live). Optional, so a fixture, the demo and the archive lens need not spell one, and a card
|
|
15016
15334
|
* with no rev is simply always re-sent. */
|
|
15017
15335
|
rev: external_exports.string().optional()
|
|
@@ -15046,6 +15364,7 @@ var MissedCallSchema2 = external_exports.enum([
|
|
|
15046
15364
|
]);
|
|
15047
15365
|
var clock2 = (h) => h === 0 ? "midnight" : h === 12 ? "noon" : h < 12 ? `${h} am` : `${h - 12} pm`;
|
|
15048
15366
|
var QUIET2 = ` Nothing rings from ${clock2(NIGHT2.from)} to ${clock2(NIGHT2.to)} your time; the count waits for morning.`;
|
|
15367
|
+
var THEIR_QUIET2 = ` Nothing rings from ${clock2(NIGHT2.from)} to ${clock2(NIGHT2.to)} their time; the count waits for morning.`;
|
|
15049
15368
|
var BrokerTuningSchema2 = external_exports.object({
|
|
15050
15369
|
/** 'none' = skip the spoken ack after a mapped answer (power users find it slow). */
|
|
15051
15370
|
ackVerbosity: external_exports.enum(["normal", "none"]).optional(),
|
|
@@ -15088,12 +15407,9 @@ var UserSettingsSchema2 = external_exports.object({
|
|
|
15088
15407
|
* must not silently reset this privacy choice. Absent = leave unchanged on
|
|
15089
15408
|
* write, 'hosted' on read (see store.ts). */
|
|
15090
15409
|
voiceMode: external_exports.enum(["hosted", "on_device"]).optional(),
|
|
15091
|
-
/**
|
|
15092
|
-
*
|
|
15093
|
-
*
|
|
15094
|
-
* object must not silently turn it back on. Absent = leave unchanged on write, true on
|
|
15095
|
-
* read (see store.ts). */
|
|
15096
|
-
talk: external_exports.boolean().optional(),
|
|
15410
|
+
/** `talk` lived here until #2373: it gated auto-play, which went in #2374. An older bundle's
|
|
15411
|
+
* `talk` is stripped like `silentPush` was; the `user_settings.talk` column outlives it until
|
|
15412
|
+
* its own drop migration (#2373, step two). */
|
|
15097
15413
|
/** CALL DIAGNOSTICS (owner, 2026-10-01): the call report carries each listen and the bot's own
|
|
15098
15414
|
* load timings. SERVER-SET, no UI — on for every account that existed on 2026-10-01, off for
|
|
15099
15415
|
* newer ones (migration 20261001132859). Read-only here: the settings PATCH never writes it. */
|
|
@@ -15170,7 +15486,8 @@ var ConnectionSummarySchema2 = external_exports.object({
|
|
|
15170
15486
|
kind: external_exports.enum(["device", "agent"]).optional(),
|
|
15171
15487
|
/** For an agent, the token id of the DEVICE that minted it — so agents group under their
|
|
15172
15488
|
* machine, and revoking a device cascades to them. Null on devices, and on unlinked
|
|
15173
|
-
* agents (
|
|
15489
|
+
* agents (provider-managed, hatched by another agent, or minted before the link existed);
|
|
15490
|
+
* a phone-launched agent is linked to the computer it runs on since #1602. */
|
|
15174
15491
|
mintedByDevice: external_exports.string().nullable().optional(),
|
|
15175
15492
|
device: external_exports.string().nullable(),
|
|
15176
15493
|
/** The agent's display name (the single pairing name). */
|
|
@@ -15184,7 +15501,7 @@ var ConnectionSummarySchema2 = external_exports.object({
|
|
|
15184
15501
|
* user on the agent's own page. null = no ceiling (today's behaviour for every
|
|
15185
15502
|
* connection). Android binds importance to a relationship rather than to each message,
|
|
15186
15503
|
* and that is the thing our roster could not say: "Marlow may always call me; Otto
|
|
15187
|
-
* never may" (docs/
|
|
15504
|
+
* never may" (docs/history/party-navigation-design.md, gap 2). Clamped in `arbitrateLevel`, so it binds
|
|
15188
15505
|
* every surface at once and outranks even `sessionMode: all_calls` — a mode the user
|
|
15189
15506
|
* set once must not overrule a rule they set about one agent. */
|
|
15190
15507
|
reach: NotifyLevelSchema2.nullable().optional(),
|
|
@@ -15343,12 +15660,14 @@ var QueueItemSchema2 = external_exports.object({
|
|
|
15343
15660
|
/** Its questions: every OPEN one, and at most ten settled, newest settled first
|
|
15344
15661
|
* (20260929133308) — the page decides which of them to show. NOT the whole set: `asked` and
|
|
15345
15662
|
* `answered` are, and a settled one's words are a line (280 characters), its body read when the
|
|
15346
|
-
* question is opened.
|
|
15663
|
+
* question is opened. Never a CANCELLED one (withdrawn, dismissed, or its Goal or call ended): it
|
|
15664
|
+
* asks nothing of anyone (#3723). */
|
|
15347
15665
|
questions: external_exports.array(QueueQuestionSchema2).default([]),
|
|
15348
15666
|
/** HOW MANY QUESTIONS THIS WORK HAS ASKED, and how many are answered — the Goal's own totals,
|
|
15349
15667
|
* bounded at 100 server-side. A tally counted off `questions` is a wrong number that looks
|
|
15350
15668
|
* right once the cap bites (`walk/trees.ts` `tallyOf`). Optional, and defaulted from the array
|
|
15351
|
-
* by the projection, so hand-built queues (fixtures, the demo) need not spell them.
|
|
15669
|
+
* by the projection, so hand-built queues (fixtures, the demo) need not spell them. A cancelled
|
|
15670
|
+
* question is not asked (#3725). */
|
|
15352
15671
|
asked: external_exports.number().optional(),
|
|
15353
15672
|
answered: external_exports.number().optional(),
|
|
15354
15673
|
/** Every note on it the person replied to (`QueueReplySchema`) — the page decides which to show.
|
|
@@ -15363,6 +15682,10 @@ var QueueItemSchema2 = external_exports.object({
|
|
|
15363
15682
|
* as progress). `updatedAt` moves for reasons nobody chose — a
|
|
15364
15683
|
* state recomputed, a review flag — so it cannot tell work in hand from work gone quiet. */
|
|
15365
15684
|
lastProgressAt: external_exports.string().nullable().optional(),
|
|
15685
|
+
/** WHEN AN AGENT LAST ACTED ON IT (owner, 2026-10-27: "Move it now", Goal 567258dc): its newest agent write, an
|
|
15686
|
+
* Entry or a Goal change, Paigy's excluded (`goals.worked_at`). What keeps work an agent is writing on from
|
|
15687
|
+
* reading as gone quiet (`coldSince`); absent on a door that does not carry it. */
|
|
15688
|
+
workedAt: external_exports.string().nullable().optional(),
|
|
15366
15689
|
/** THE GOAL'S NEWEST WORD, FROM EITHER SIDE (owner, 2026-09-27): the newest Entry on it, of any
|
|
15367
15690
|
* kind — what the person added ("Add to this"), their reply, the agent's ask or its progress
|
|
15368
15691
|
* note. A progress note is an Entry, so this is already the newer of the two: the person's note
|
|
@@ -15607,9 +15930,6 @@ var AgentRowSchema2 = ComputerRowSchema2.extend({
|
|
|
15607
15930
|
* (`agent_holds`); null when that read failed. */
|
|
15608
15931
|
holds: external_exports.array(external_exports.object({ id: external_exports.string(), title: external_exports.string() })).nullable(),
|
|
15609
15932
|
held: external_exports.number().int().nullable(),
|
|
15610
|
-
/** The earliest instant any Goal it holds went quiet, by the one rule (`coldSince`); null
|
|
15611
|
-
* while none has, or when that read failed. */
|
|
15612
|
-
cold: external_exports.string().datetime().nullable(),
|
|
15613
15933
|
/** The newest line of its working log, and when the harness saw it. */
|
|
15614
15934
|
line: external_exports.string().nullable(),
|
|
15615
15935
|
lineAt: external_exports.string().datetime().nullable()
|
|
@@ -15653,6 +15973,11 @@ var CallRecapSchema2 = external_exports.object({
|
|
|
15653
15973
|
durationMs: external_exports.number().nullable(),
|
|
15654
15974
|
/** Bot-clock pickup offset; absent before the timestamp release, null before its report lands. */
|
|
15655
15975
|
pickupMs: external_exports.number().nullable().optional(),
|
|
15976
|
+
/** STILL FILING (20261026182117): the call has not ended on the server, or it has and a brain cycle on it is
|
|
15977
|
+
* still pending, the next writer, which may still settle, file or start something. What the close itself
|
|
15978
|
+
* waits for (`private.close_call`). `status` cannot say it: nothing writes "finalizing", and a call reads
|
|
15979
|
+
* "open" until the sweep closes it, after nothing is pending. Absent from an API before it. */
|
|
15980
|
+
filing: external_exports.boolean().optional(),
|
|
15656
15981
|
agents: external_exports.array(external_exports.object({ id: external_exports.string(), name: external_exports.string().nullable() }))
|
|
15657
15982
|
}),
|
|
15658
15983
|
topics: external_exports.array(external_exports.object({
|
|
@@ -15661,7 +15986,7 @@ var CallRecapSchema2 = external_exports.object({
|
|
|
15661
15986
|
owner: external_exports.string(),
|
|
15662
15987
|
state: external_exports.string(),
|
|
15663
15988
|
/** Presented Entry content and its author, separately from the current Goal owner. */
|
|
15664
|
-
items: external_exports.array(external_exports.object({ entryId: external_exports.string(), author: external_exports.string(), text: external_exports.string(), summary: external_exports.string().nullable() })).optional(),
|
|
15989
|
+
items: external_exports.array(external_exports.object({ entryId: external_exports.string(), author: external_exports.string(), text: external_exports.string(), summary: external_exports.string().nullable(), acknowledged: external_exports.boolean().optional() })).optional(),
|
|
15665
15990
|
/** Whether the call put it to the person. An item it carried and never said has no row on the
|
|
15666
15991
|
* review (owner, 2026-10-08: "why do we get the third one when it didn't happen in the call?"). */
|
|
15667
15992
|
presented: external_exports.boolean(),
|
|
@@ -15707,9 +16032,65 @@ var CallRecapSchema2 = external_exports.object({
|
|
|
15707
16032
|
words: external_exports.string(),
|
|
15708
16033
|
atMs: external_exports.number()
|
|
15709
16034
|
})),
|
|
15710
|
-
|
|
16035
|
+
/** What did not fit, counted. `settles` counts items past the recap's 100; absent before 20261026165518. */
|
|
16036
|
+
more: external_exports.object({ lines: external_exports.number(), entries: external_exports.number(), topics: external_exports.number(), settles: external_exports.number().optional() }),
|
|
15711
16037
|
/** Last stored position on this page when another exists; absent before paging shipped. */
|
|
15712
|
-
next: external_exports.number().int().nonnegative().nullable().optional()
|
|
16038
|
+
next: external_exports.number().int().nonnegative().nullable().optional(),
|
|
16039
|
+
/** THE CALL AS ONE LIST OF ROWS (owner, 2026-10-14: "we only really want a thing like transcript but
|
|
16040
|
+
* built from the summaries", then "the transcript tabs should show the same but with full words").
|
|
16041
|
+
* Both tabs draw these rows, in this order: Summary from `summary`, Transcript from `words`.
|
|
16042
|
+
* - `put`: an item put to the person, at the first agent line that voiced it. Paigy's sentences
|
|
16043
|
+
* that voiced it are folded into `spoken`, never rows of their own.
|
|
16044
|
+
* - `said`: the person's words, one row per reply or per filed line no reply covers.
|
|
16045
|
+
* - `did`: what Paigy did ("Sent to Mouth: …", "Recorded: …", "Filed on …").
|
|
16046
|
+
* `by` is the row's real author, never inferred from `kind`: a relay Paigy sent to an agent is
|
|
16047
|
+
* Paigy's, not the person's. Optional and additive (owner: "make sure whatever you do is backward
|
|
16048
|
+
* compatible"): an API before it sends none, and the screen falls back to `topics` and `said`. */
|
|
16049
|
+
timeline: external_exports.array(external_exports.object({
|
|
16050
|
+
id: external_exports.string(),
|
|
16051
|
+
position: external_exports.number(),
|
|
16052
|
+
atMs: external_exports.number(),
|
|
16053
|
+
kind: external_exports.enum(["put", "said", "did"]),
|
|
16054
|
+
by: external_exports.object({ participant: external_exports.string().nullable(), agentId: external_exports.string().nullable(), name: external_exports.string().nullable() }),
|
|
16055
|
+
goalId: external_exports.string().uuid().nullable(),
|
|
16056
|
+
requestId: external_exports.string().nullable(),
|
|
16057
|
+
summary: external_exports.string().nullable(),
|
|
16058
|
+
words: external_exports.string(),
|
|
16059
|
+
/** Paigy's sentences folded into this row: on a `put` row, what it said putting the item to the
|
|
16060
|
+
* person (before their next row); on a `said` row, what it said in reply (until their next row).
|
|
16061
|
+
* `atMs` is when each was said; optional, absent before 2026-10-14's fix. */
|
|
16062
|
+
spoken: external_exports.array(external_exports.object({ lineId: external_exports.string(), words: external_exports.string(), atMs: external_exports.number().optional() })),
|
|
16063
|
+
/** On a `said` row: the work these words were filed on, and whether they answered (recorded) a
|
|
16064
|
+
* question. They replace the "Filed on ..." and "Recorded: ..." rows that repeated the person's own
|
|
16065
|
+
* summary (Brain, 2026-10-14). Optional: absent from an API before it. */
|
|
16066
|
+
filedOn: external_exports.array(external_exports.object({ goalId: external_exports.string().uuid(), title: external_exports.string() })).optional(),
|
|
16067
|
+
recorded: external_exports.boolean().optional(),
|
|
16068
|
+
settled: external_exports.object({ requestId: external_exports.string(), answer: external_exports.string() }).nullable().optional(),
|
|
16069
|
+
acknowledged: external_exports.boolean().optional(),
|
|
16070
|
+
/** On a `put` row: still waiting for the person's answer (not settled, not answered, not put off).
|
|
16071
|
+
* The server's judgement; the screen draws "Still waiting for your answer" from it. Optional: absent
|
|
16072
|
+
* from an API before it, where the screen falls back to its own reading. */
|
|
16073
|
+
waiting: external_exports.boolean().optional(),
|
|
16074
|
+
lineIds: external_exports.array(external_exports.string())
|
|
16075
|
+
})).optional(),
|
|
16076
|
+
/** THE RECAP (owner, 2026-10-26: "the transcript should just be the entries that settled or
|
|
16077
|
+
* acknowledged the items; that's it"). Each item the person's words settled on this call, in the
|
|
16078
|
+
* order they said them: who asked it (`by`), the item in its agent's words (`title`), and only the
|
|
16079
|
+
* words of theirs that settled it (`lines`: each line once, verbatim, with when it was said on the
|
|
16080
|
+
* bot clock like `said[].atMs`). Built from their replies, not from what the call put, so an item
|
|
16081
|
+
* settled without being put is still here. Beside them (owner: "List them too, with the words that
|
|
16082
|
+
* said them"), each Goal his words told something (`kind` "told") or the call started ("started"),
|
|
16083
|
+
* with `requestId` null and the Goal's name as `title`; a started Goal may have no `lines` yet. `kind`
|
|
16084
|
+
* is a string, not an enum, so a later kind never fails an older build's parse; `requestId` is the
|
|
16085
|
+
* request the words settled. On the first page only; absent from an API before it. */
|
|
16086
|
+
settles: external_exports.array(external_exports.object({
|
|
16087
|
+
requestId: external_exports.string().nullable(),
|
|
16088
|
+
kind: external_exports.string(),
|
|
16089
|
+
by: external_exports.object({ participant: external_exports.string(), agentId: external_exports.string().nullable(), name: external_exports.string() }),
|
|
16090
|
+
goalId: external_exports.string().uuid().nullable(),
|
|
16091
|
+
title: external_exports.string(),
|
|
16092
|
+
lines: external_exports.array(external_exports.object({ lineId: external_exports.string(), words: external_exports.string(), atMs: external_exports.number() }))
|
|
16093
|
+
})).optional()
|
|
15713
16094
|
});
|
|
15714
16095
|
|
|
15715
16096
|
// src/host.ts
|
|
@@ -17530,6 +17911,11 @@ function wakeHarness(slot, saved, claudeTranscript) {
|
|
|
17530
17911
|
if (slot === "antigravity") return "agy";
|
|
17531
17912
|
return void 0;
|
|
17532
17913
|
}
|
|
17914
|
+
function claudeOnFolderSession(harness, slot, sessionId2) {
|
|
17915
|
+
if (harness !== "claude") return null;
|
|
17916
|
+
const folder = sessionId2?.startsWith("cwd-") ? sessionId2 : slot.startsWith("session:cwd-") ? slot.slice("session:".length) : null;
|
|
17917
|
+
return folder ? `is recorded as claude but its session (${folder.slice(0, 12)}) is a folder's, which only Codex or Antigravity mint \u2014 not waking it as claude; correct its runtime` : null;
|
|
17918
|
+
}
|
|
17533
17919
|
function readHostState() {
|
|
17534
17920
|
try {
|
|
17535
17921
|
const s = JSON.parse(readFileSync6(HOST_FILE, "utf8"));
|
|
@@ -17847,6 +18233,11 @@ function startHost(opts) {
|
|
|
17847
18233
|
skip("has no recorded harness; select its runtime before recovery");
|
|
17848
18234
|
return;
|
|
17849
18235
|
}
|
|
18236
|
+
const mislabelled = claudeOnFolderSession(harness, slot, identity.sessionId);
|
|
18237
|
+
if (mislabelled) {
|
|
18238
|
+
skip(mislabelled);
|
|
18239
|
+
return;
|
|
18240
|
+
}
|
|
17850
18241
|
if (owner && !allowed(owner.cwd, opts.wsDeps)) {
|
|
17851
18242
|
skip(`ran in ${owner.cwd}, outside the folders this machine granted`);
|
|
17852
18243
|
return;
|