@paigy/harness 0.3.45 → 0.3.47
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 +26 -33
- package/dist/cli.js +856 -260
- package/dist/main.js +811 -239
- 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 = "";
|
|
@@ -8744,7 +8744,7 @@ function parseSessionRecord(text) {
|
|
|
8744
8744
|
return void 0;
|
|
8745
8745
|
}
|
|
8746
8746
|
function sessionId() {
|
|
8747
|
-
return envSession("PAIGY_SESSION_ID") ?? claudeConversation() ?? envSession("CLAUDE_CODE_SESSION_ID") ?? envSession("CODEX_THREAD_ID") ?? envSession("CODEX_SESSION_ID") ?? // A Codex thread that was handed no id is its own agent, not the folder's (`underCodex`).
|
|
8747
|
+
return envSession("PAIGY_SESSION_ID") ?? claudeConversation() ?? envSession("CLAUDE_CODE_SESSION_ID") ?? envSession("GROK_SESSION_ID") ?? envSession("CODEX_THREAD_ID") ?? envSession("CODEX_SESSION_ID") ?? // A Codex thread that was handed no id is its own agent, not the folder's (`underCodex`).
|
|
8748
8748
|
(underCodex() ? INSTANCE_ID : WORKSPACE_ID);
|
|
8749
8749
|
}
|
|
8750
8750
|
async function reach(url, init) {
|
|
@@ -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;
|
|
@@ -10055,10 +10055,22 @@ function capRefusals(text, units22, field) {
|
|
|
10055
10055
|
function refuseOverCaps(text, units22, field, ctx) {
|
|
10056
10056
|
for (const { path, message, ...params } of capRefusals(text, units22, field)) ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path, message, params });
|
|
10057
10057
|
}
|
|
10058
|
+
var SHIPPED = ["phone", "calls", "server", "store", "agents"];
|
|
10059
|
+
var CAUSES_MAX = 10;
|
|
10060
|
+
var shipped = external_exports.enum(SHIPPED, {
|
|
10061
|
+
errorMap: () => ({ message: `shipped_unknown: one of ${SHIPPED.join(", ")}.` })
|
|
10062
|
+
}).optional().describe(
|
|
10063
|
+
"Only when this reports a result that LANDED somewhere the person can see it: phone (an app update reached their phone), calls (the voice bot), server, store (the App Store) or agents (the MCP or SDK). Leave it out for work in progress."
|
|
10064
|
+
);
|
|
10065
|
+
var causedBy = external_exports.array(
|
|
10066
|
+
external_exports.string().trim().regex(/^[0-9a-fA-F-]{8,36}$/, "cause_not_found: an Entry id, or the short id get_goals prints for the person's words.")
|
|
10067
|
+
).min(1).max(CAUSES_MAX, `too_many_causes: at most ${CAUSES_MAX}.`).optional().describe(
|
|
10068
|
+
`The person's own words this acts on: the ids (or the short ids get_goals prints) of their answers or notes that led to it, at most ${CAUSES_MAX}. Their app shows each result under the words that caused it, so name every one this follows from. An id that is not their words is refused by name (cause_not_found, cause_ambiguous) and nothing is written.`
|
|
10069
|
+
);
|
|
10058
10070
|
var COMPLETION_MESSAGE_MAX = 50;
|
|
10059
10071
|
var CompletionSchema = external_exports.object({
|
|
10060
10072
|
goalId: external_exports.string().uuid().describe("The existing Goal to complete."),
|
|
10061
|
-
message: external_exports.string().trim().min(1).max(COMPLETION_MESSAGE_MAX, "completion_message_too_long: at most 50 characters; put detail in units.").describe("Completion headline, at most 50 characters."),
|
|
10073
|
+
message: external_exports.string().trim().min(1).max(COMPLETION_MESSAGE_MAX, "completion_message_too_long: at most 50 characters; put detail in units.").describe("Completion headline, at most 50 characters: the one thing that would go wrong or stay unclear later if they missed it."),
|
|
10062
10074
|
units: external_exports.array(UnitInputSchema.extend({
|
|
10063
10075
|
title: external_exports.string().trim().min(1).max(UNIT_TITLE_MAX),
|
|
10064
10076
|
body: external_exports.string().trim().min(1).max(UNIT_BODY_MAX)
|
|
@@ -10067,19 +10079,21 @@ var CompletionSchema = external_exports.object({
|
|
|
10067
10079
|
options: external_exports.array(external_exports.object({
|
|
10068
10080
|
label: external_exports.string().trim().min(1).max(OPTION_LABEL_MAX),
|
|
10069
10081
|
hint: external_exports.string().trim().min(1).max(OPTION_HINT_MAX)
|
|
10070
|
-
}).strict()).max(5).optional().describe("Optional next steps the person may initiate: label (50 characters) and consequence in hint (200). Selecting one acknowledges the report and requests that step from its author; it never reopens this Goal.")
|
|
10082
|
+
}).strict()).max(5).optional().describe("Optional next steps the person may initiate: label (50 characters) and consequence in hint (200). Selecting one acknowledges the report and requests that step from its author; it never reopens this Goal."),
|
|
10083
|
+
causedBy,
|
|
10084
|
+
shipped
|
|
10071
10085
|
}).strict();
|
|
10072
|
-
var CompleteChangeSchema = CompletionSchema.extend({ kind: external_exports.literal("complete") });
|
|
10086
|
+
var CompleteChangeSchema = CompletionSchema.omit({ causedBy: true, shipped: true }).extend({ kind: external_exports.literal("complete") });
|
|
10073
10087
|
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.
|
|
10088
|
+
1. One question per object in \`questions\`, so each is answered on its own.
|
|
10089
|
+
2. \`goalId\` names the existing Goal it is about (create one with manage_goals first); the answer comes back there.
|
|
10090
|
+
3. \`workItBlocks\` only when you are truly blocked: it asks for a call.
|
|
10091
|
+
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.
|
|
10092
|
+
5. One question, one row: never re-send one still waiting; take back one that no longer matters with \`withdrawQuestionIds\`.
|
|
10093
|
+
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.
|
|
10094
|
+
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.
|
|
10095
|
+
8. A diagnosis says when, why and how it happens, then proposes one fix.
|
|
10096
|
+
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
10097
|
function draft2020(node) {
|
|
10084
10098
|
if (Array.isArray(node)) return node.map(draft2020);
|
|
10085
10099
|
if (node && typeof node === "object") {
|
|
@@ -10122,12 +10136,55 @@ var userExplicitlyRequested = external_exports.enum(["any", "call"]).optional().
|
|
|
10122
10136
|
`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
10137
|
);
|
|
10124
10138
|
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.`
|
|
10139
|
+
`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: context they may open, never something they must hear. 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
10140
|
);
|
|
10141
|
+
var KIND_IDS = { "handing": "none", "replaced-by": "goal", "blocked-by": "node", "asking": "none", "found": "none" };
|
|
10142
|
+
var KIND_GRAMMAR = "handing, replaced-by <goalId>, blocked-by <goalId|questionId>, asking, found";
|
|
10143
|
+
var uuid = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;
|
|
10144
|
+
var handle = /^[0-9a-fA-F-]{8,36}$/;
|
|
10145
|
+
function refuseKind(u, ctx) {
|
|
10146
|
+
if (!u.kind) return;
|
|
10147
|
+
const refuse = (refusal, kind, message) => ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["kind"], params: { refusal, kind }, message });
|
|
10148
|
+
const [name, ...rest] = u.kind.trim().split(/\s+/);
|
|
10149
|
+
const shape = KIND_IDS[name];
|
|
10150
|
+
if (!shape) {
|
|
10151
|
+
refuse("kind_unknown", name, `kind_unknown: "${name}" is not a kind. One of: ${KIND_GRAMMAR}.`);
|
|
10152
|
+
return;
|
|
10153
|
+
}
|
|
10154
|
+
const id22 = rest.join(" ");
|
|
10155
|
+
if (shape === "none" && id22) {
|
|
10156
|
+
refuse("kind_takes_no_id", name, `kind_takes_no_id: "${name}" is the whole kind, so drop the "${id22}" after it.`);
|
|
10157
|
+
}
|
|
10158
|
+
if (shape !== "none" && !(shape === "goal" ? uuid.test(id22) : handle.test(id22))) {
|
|
10159
|
+
refuse("kind_needs_id", name, shape === "goal" ? `kind_needs_id: "${name}" names the Goal it is about, as "${name} <goalId>".` : `kind_needs_id: "${name}" names the Goal or Question it is about, as "${name} <goalId|questionId>".`);
|
|
10160
|
+
}
|
|
10161
|
+
if (name === "asking") {
|
|
10162
|
+
refuse("kind_is_a_question", name, 'kind_is_a_question: "asking" owes them an answer, so send it in `questions`, where it opens one.');
|
|
10163
|
+
}
|
|
10164
|
+
if (u.userExplicitlyRequested) {
|
|
10165
|
+
refuse("kind_not_for_the_person", name, `kind_not_for_the_person: "${name}" is written for the other agents on the Goal, and userExplicitlyRequested delivers these words to the person. Split it: one message for them, one for the agent.`);
|
|
10166
|
+
}
|
|
10167
|
+
}
|
|
10127
10168
|
var UpdateInputSchema = external_exports.object({
|
|
10128
|
-
|
|
10169
|
+
// ONE LOAD-BEARING POINT PER REPORT (owner, 2026-10-27 14:10 on call, Goal 1b1750e9, settling
|
|
10170
|
+
// #3633's pacing: "one point at a time is better, but make sure that it's [load-]bearing ... if
|
|
10171
|
+
// there is a lot of key points that I need to be aware of ... meaning something bad would happen
|
|
10172
|
+
// if I didn't know them or I wouldn't be able to understand something in the future ... They
|
|
10173
|
+
// should go separately. Basically, it should be like one load-bearing thing per report").
|
|
10174
|
+
//
|
|
10175
|
+
// The call's half of that ruling shipped in #3771: the talker settles an item only once the
|
|
10176
|
+
// transcript shows he heard its load-bearing point. This is the author's half, and without it the
|
|
10177
|
+
// talker has to guess which of a report's parts was load-bearing. Measured 2026-11-01 on prod:
|
|
10178
|
+
// 458 of 866 reports in 21 days carried two or more units, and since the pacing shipped on 10-23
|
|
10179
|
+
// only 18 of 72 units that reached a call were ever said -- so a point written as a unit has about
|
|
10180
|
+
// a one-in-four chance of being heard, and one ok after the headline settles the whole report.
|
|
10181
|
+
// Hence the wording, not a `mustHear` flag (the-heard-record.md P3): he asked for less mechanism
|
|
10182
|
+
// and more judgment from the agent, so a point he must not miss is simply its own report.
|
|
10183
|
+
message: external_exports.string().trim().min(1).describe(`The one point, at most ${ASK_MAX} characters: the one thing that would go wrong or stay unclear later if they missed it, said as what changed for them, in their words ("The screen reader speaks Spanish too", not "Merged #3896"). A second point like that is its own update; the rest goes in units.`),
|
|
10129
10184
|
goalIds: external_exports.array(external_exports.string().uuid()).min(1).max(10).describe("The Goals it is about, each one that exists: the one it is mainly about first."),
|
|
10130
10185
|
units,
|
|
10186
|
+
causedBy,
|
|
10187
|
+
shipped,
|
|
10131
10188
|
// A REPORT KEEPS ITS TAP (#2799, #3260; owner, 2026-10-08, settling #2776: "keep the reports open
|
|
10132
10189
|
// until the user acknowledges them"). A report asks nothing, so it opens no Question -- but it
|
|
10133
10190
|
// still waits to be acknowledged, and it carries the ONE tap that closes it. Never a decision: the
|
|
@@ -10151,6 +10208,12 @@ var UpdateInputSchema = external_exports.object({
|
|
|
10151
10208
|
reply: external_exports.string().trim().min(1).describe(
|
|
10152
10209
|
`What this report's button says instead of "Got it", at most ${OPTION_LABEL_MAX} characters, written in THEIR voice for THIS report ("Sounds good, I'll test later") -- the care you give a question's options, so what they tap tells you whether they verified your work or only received it. One tap sends exactly these words back to you. Words that would CHANGE what happens next are a question, not a reply to a report: it still asks nothing and still owes you no answer. The reply is required for requested delivery and completed Goals; ordinary progress may omit it.`
|
|
10153
10210
|
).optional(),
|
|
10211
|
+
// THE KIND, WHICH WAS THE FIRST LINE OF THE MESSAGE UNTIL NOW (`KIND_IDS` above). Optional on
|
|
10212
|
+
// purpose: every agent writing updates today sends none, and a door that refused them would turn a
|
|
10213
|
+
// convention nobody was obliged to follow into a 400 on live traffic.
|
|
10214
|
+
kind: external_exports.string().trim().min(1).optional().describe(
|
|
10215
|
+
`What an agent writing on ANOTHER agent's Goal expects of its reader, as one token: ${KIND_GRAMMAR}. \`handing\` the work is yours now, nothing is asked; \`replaced-by <goalId>\` this Goal is dead and that one carries its work; \`blocked-by <goalId|questionId>\` I cannot go on until that moves, no action unless you own it; \`found\` evidence on your Goal, nothing is asked and nothing has changed. \`asking\` is a question, so it belongs in \`questions\`, not here. It is written for the other agents on the Goal, never the person, so it does not go with userExplicitlyRequested; leave it out for your own progress. Refused by name (kind_unknown, kind_needs_id, kind_takes_no_id, kind_is_a_question, kind_not_for_the_person).`
|
|
10216
|
+
),
|
|
10154
10217
|
userExplicitlyRequested
|
|
10155
10218
|
}).strict().superRefine((u, ctx) => {
|
|
10156
10219
|
if (u.userExplicitlyRequested && !u.reply) {
|
|
@@ -10162,6 +10225,7 @@ var UpdateInputSchema = external_exports.object({
|
|
|
10162
10225
|
});
|
|
10163
10226
|
}
|
|
10164
10227
|
refuseOverCaps(u.message, u.units, "message", ctx);
|
|
10228
|
+
refuseKind(u, ctx);
|
|
10165
10229
|
if (u.reply && u.reply.length > OPTION_LABEL_MAX) {
|
|
10166
10230
|
ctx.addIssue({
|
|
10167
10231
|
code: external_exports.ZodIssueCode.custom,
|
|
@@ -10177,11 +10241,11 @@ var questionFields = {
|
|
|
10177
10241
|
),
|
|
10178
10242
|
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
10243
|
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."),
|
|
10244
|
+
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
10245
|
// HOW THE OPTIONS ARE ANSWERED, SAID BY THE AGENT (owner, 2026-10-02: "one and many makes sense";
|
|
10182
10246
|
// brain_prompts.md §1: structured agent questions need no model). The app draws all three.
|
|
10183
10247
|
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.'
|
|
10248
|
+
'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
10249
|
),
|
|
10186
10250
|
// WHAT THE QUESTION HOLDS UP (brain_prompts.md §2.1): replaces `waiting: 'hard'`. A question that
|
|
10187
10251
|
// blocks work asks for a call (the person's settings and ring cooldowns still decide).
|
|
@@ -10193,11 +10257,39 @@ var questionFields = {
|
|
|
10193
10257
|
var refineQuestion = (q, ctx) => {
|
|
10194
10258
|
refuseOverCaps(q.question, q.units, "question", ctx);
|
|
10195
10259
|
if (q.pickMode && !q.options) ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["pickMode"], message: "pickMode comes only with options" });
|
|
10260
|
+
refuseThinOptions(q, ctx);
|
|
10196
10261
|
const ids = (q.options ?? []).map((o) => o.id);
|
|
10197
10262
|
if (ids.some((id22) => id22) && (ids.some((id22) => !id22) || new Set(ids).size !== ids.length)) {
|
|
10198
10263
|
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["options"], message: "give every option a distinct id, or none" });
|
|
10199
10264
|
}
|
|
10200
10265
|
};
|
|
10266
|
+
var MIN_LIST_OPTIONS = 2;
|
|
10267
|
+
function refuseThinOptions(q, ctx) {
|
|
10268
|
+
const options = q.options ?? [];
|
|
10269
|
+
if ((q.pickMode === "many" || q.pickMode === "rank") && options.length < MIN_LIST_OPTIONS) {
|
|
10270
|
+
ctx.addIssue({
|
|
10271
|
+
code: external_exports.ZodIssueCode.custom,
|
|
10272
|
+
path: ["options"],
|
|
10273
|
+
params: { refusal: "too_few_options", length: options.length, min: MIN_LIST_OPTIONS },
|
|
10274
|
+
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.`
|
|
10275
|
+
});
|
|
10276
|
+
}
|
|
10277
|
+
const seen = /* @__PURE__ */ new Map();
|
|
10278
|
+
options.forEach((o, index) => {
|
|
10279
|
+
const key22 = o.label.trim().toLowerCase();
|
|
10280
|
+
const first = seen.get(key22);
|
|
10281
|
+
if (first === void 0) {
|
|
10282
|
+
seen.set(key22, index);
|
|
10283
|
+
return;
|
|
10284
|
+
}
|
|
10285
|
+
ctx.addIssue({
|
|
10286
|
+
code: external_exports.ZodIssueCode.custom,
|
|
10287
|
+
path: ["options", index, "label"],
|
|
10288
|
+
params: { refusal: "duplicate_option_label", index, first },
|
|
10289
|
+
message: `duplicate_option_label: options[${index}] repeats the label of options[${first}]. Each option names a different choice.`
|
|
10290
|
+
});
|
|
10291
|
+
});
|
|
10292
|
+
}
|
|
10201
10293
|
var QuestionInputSchema = external_exports.object({
|
|
10202
10294
|
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
10295
|
...questionFields
|
|
@@ -10219,21 +10311,26 @@ var QuestionDependencySchema = external_exports.object({
|
|
|
10219
10311
|
reason: reason.optional()
|
|
10220
10312
|
}).strict().refine(actionFits, ACTION_FITS);
|
|
10221
10313
|
var sendFields = {
|
|
10222
|
-
completions: external_exports.array(CompletionSchema).min(1).max(20).optional().describe(
|
|
10314
|
+
completions: external_exports.array(CompletionSchema).min(1).max(20).optional().describe(
|
|
10315
|
+
"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."
|
|
10316
|
+
),
|
|
10223
10317
|
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
|
|
10318
|
+
"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, with its `kind`.\n\nONE LOAD-BEARING POINT PER REPORT: the message is the point they must not miss; a second point that would go wrong or stay unclear later if they missed it is its own update, never a unit."
|
|
10225
10319
|
),
|
|
10226
10320
|
answers: external_exports.array(AnswerInputSchema).min(1).max(20).optional().describe("Answers to Questions addressed to you."),
|
|
10227
10321
|
withdrawQuestionIds: external_exports.array(questionHandle).min(1).max(10).optional().describe(
|
|
10228
10322
|
"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
10323
|
),
|
|
10324
|
+
bumpQuestionIds: external_exports.array(questionHandle).min(1).max(10).optional().describe(
|
|
10325
|
+
"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."
|
|
10326
|
+
),
|
|
10230
10327
|
questionDependencies: external_exports.array(QuestionDependencySchema).min(1).max(20).optional().describe(
|
|
10231
10328
|
"Add or remove what a Question you asked holds up, after asking it."
|
|
10232
10329
|
)
|
|
10233
10330
|
};
|
|
10234
10331
|
var ContactSchema = external_exports.object({
|
|
10235
10332
|
...sendFields,
|
|
10236
|
-
questions: external_exports.array(QuestionInputSchema).min(1).max(20).optional().describe("Questions for the person, one per object."),
|
|
10333
|
+
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
10334
|
/** RECEIVING (2I, I2; brain_prompts.md §2.2): the events this agent handled. */
|
|
10238
10335
|
ackEventIds: external_exports.array(external_exports.string().uuid()).min(1).max(100).optional().describe(
|
|
10239
10336
|
"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 +10339,34 @@ var ContactSchema = external_exports.object({
|
|
|
10242
10339
|
"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
10340
|
)
|
|
10244
10341
|
}).strict();
|
|
10245
|
-
var sendsAnything = (c) => !!(c.completions?.length || c.updates?.length || c.questions?.length || c.answers?.length || c.withdrawQuestionIds?.length || c.questionDependencies?.length);
|
|
10342
|
+
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
10343
|
var ContactWireSchema = external_exports.object({
|
|
10247
10344
|
operationId: external_exports.string().uuid(),
|
|
10248
10345
|
...sendFields,
|
|
10249
10346
|
questions: external_exports.array(QuestionWireSchema).min(1).max(20).optional()
|
|
10250
10347
|
}).strict().refine(sendsAnything, "a contact sends at least one update, question, answer, withdrawal or question dependency");
|
|
10251
10348
|
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.
|
|
10349
|
+
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
10350
|
|
|
10256
|
-
|
|
10351
|
+
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
10352
|
|
|
10258
|
-
|
|
10353
|
+
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
10354
|
|
|
10260
|
-
RECEIVING:
|
|
10355
|
+
RECEIVING: contact({}) waits ~45 s; contact({wait:false}) returns \`events\` at once. Confirm the ones you handled with contact({ackEventIds}).`;
|
|
10356
|
+
var HELP_TOPICS = ["pairing", "listening", "receiving", "asking", "updates", "goals", "calls"];
|
|
10357
|
+
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.`;
|
|
10358
|
+
var HelpSchema = external_exports.object({
|
|
10359
|
+
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.")
|
|
10360
|
+
}).strict();
|
|
10361
|
+
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.";
|
|
10362
|
+
var AGENT_PROMPTS = [
|
|
10363
|
+
{
|
|
10364
|
+
name: "help",
|
|
10365
|
+
description: "How to use Paigy: the whole guide, or one topic of it.",
|
|
10366
|
+
arguments: [{ name: "topic", description: `One section: ${HELP_TOPICS.join(", ")}. Omit it for the whole guide.`, required: false }]
|
|
10367
|
+
},
|
|
10368
|
+
{ name: "welcome", description: "Start here: who you are on Paigy, then listen and collect your open work." }
|
|
10369
|
+
];
|
|
10261
10370
|
var CreateGoalSchema = external_exports.object({
|
|
10262
10371
|
outcome: external_exports.string().trim().min(1).max(1e4),
|
|
10263
10372
|
/** The work's NAME (#2115) — one to five words, how a person refers to it out loud ("the night
|
|
@@ -10358,9 +10467,12 @@ var GetGoalsSchema = external_exports.object({
|
|
|
10358
10467
|
history: external_exports.boolean().optional()
|
|
10359
10468
|
}).strict();
|
|
10360
10469
|
var GetDeliverySchema = external_exports.object({
|
|
10361
|
-
deliveryId: external_exports.string().uuid().describe("The Delivery id returned by contact or receive.")
|
|
10470
|
+
deliveryId: external_exports.string().uuid().describe("The Delivery id returned by contact or receive."),
|
|
10471
|
+
// WHAT WAS SAID ON A CALL (owner, 2026-10-26, Goal c743f4a4: "A flag on get_delivery", "Any of my agents").
|
|
10472
|
+
transcript: external_exports.boolean().optional().describe("For a Call: also return what was said on it, one page of spoken lines."),
|
|
10473
|
+
after: external_exports.string().max(40).optional().describe("With transcript: the next value the previous page returned, to read the next page.")
|
|
10362
10474
|
}).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.";
|
|
10475
|
+
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
10476
|
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
10477
|
var SearchToolSchema = external_exports.object({
|
|
10366
10478
|
query: external_exports.string().trim().min(1).max(500),
|
|
@@ -10369,6 +10481,8 @@ var SearchToolSchema = external_exports.object({
|
|
|
10369
10481
|
limit: external_exports.number().int().min(1).max(20).optional()
|
|
10370
10482
|
}).strict();
|
|
10371
10483
|
var SEARCH_DESCRIPTION = "Search your person's history across all of their agents: Entries (what anyone said or wrote, typed or spoken on a call), Goals (by title and outcome) and replies -- the person's answers, acknowledgements and deferrals (type answer; found by their summary, by the question or report they reply to, or by the words that gave them). query is words to look for; records sharing more of its words rank first, and exact names work. types narrows it to entry, goal and/or answer (default: all three). goalId searches under one Goal: its Entries, the replies to its items, and it and its immediate children. limit is matches per type, 1 to 20 (default 8). Read-only. Each match carries its whole saved words, its ID and its links (a reply carries its kind -- answered, acknowledged or deferred -- whether it is closed (a deferral is not), its summary in under ten words, its question or report, the choice made and the Entries that support it); `omitted` counts what matched but was left out, so narrow the words or add a goalId to see it. Nothing found is not proof that nothing exists; a refused search says why. Sealed (encrypted) content is never searched or returned.";
|
|
10484
|
+
var READS = { readOnlyHint: true, destructiveHint: false, openWorldHint: false };
|
|
10485
|
+
var SENDS = { readOnlyHint: false, destructiveHint: true, openWorldHint: false };
|
|
10372
10486
|
var ConfigureIdentitySchema = external_exports.object({}).strict();
|
|
10373
10487
|
var CONFIGURE_IDENTITY_DESCRIPTION = "Read this authenticated agent\u2019s current name, voice and token ID. Read-only; no arguments. Pairing, renaming and logout are available only through the local configure driver.";
|
|
10374
10488
|
var CheckActivitySchema = external_exports.object({}).strict();
|
|
@@ -10380,14 +10494,16 @@ var SendFeedbackSchema = external_exports.object({
|
|
|
10380
10494
|
}).strict();
|
|
10381
10495
|
var SEND_FEEDBACK_DESCRIPTION = "Send feedback about Paigy itself (a bug report, an idea) straight to the Paigy team. Send it only when the person asked you to, or agreed when you offered: it goes to Paigy, never to the person, and nobody answers it here. Not for your work or a question for the person: use contact for those. Returns whether it was stored.";
|
|
10382
10496
|
var AGENT_TOOLS = [
|
|
10383
|
-
{ name: "configure", description: CONFIGURE_IDENTITY_DESCRIPTION, inputSchema: mcpInputSchema(ConfigureIdentitySchema) },
|
|
10384
|
-
{ name: "contact", description: CONTACT_DESCRIPTION, inputSchema: CONTACT_SCHEMA },
|
|
10385
|
-
{ name: "manage_goals", description: MANAGE_GOALS_DESCRIPTION, inputSchema: mcpInputSchema(ManageGoalsToolSchema) },
|
|
10386
|
-
{ name: "get_delivery", description: GET_DELIVERY_DESCRIPTION, inputSchema: mcpInputSchema(GetDeliverySchema) },
|
|
10387
|
-
{ name: "get_goals", description: GET_GOALS_DESCRIPTION, inputSchema: mcpInputSchema(GetGoalsSchema) },
|
|
10388
|
-
{ name: "search", description: SEARCH_DESCRIPTION, inputSchema: mcpInputSchema(SearchToolSchema) },
|
|
10389
|
-
{ 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) }
|
|
10497
|
+
{ name: "configure", title: "Who am I", annotations: READS, description: CONFIGURE_IDENTITY_DESCRIPTION, inputSchema: mcpInputSchema(ConfigureIdentitySchema) },
|
|
10498
|
+
{ name: "contact", title: "Contact the person", annotations: SENDS, description: CONTACT_DESCRIPTION, inputSchema: CONTACT_SCHEMA },
|
|
10499
|
+
{ name: "manage_goals", title: "Manage Goals", annotations: SENDS, description: MANAGE_GOALS_DESCRIPTION, inputSchema: mcpInputSchema(ManageGoalsToolSchema) },
|
|
10500
|
+
{ name: "get_delivery", title: "Read a delivery", annotations: READS, description: GET_DELIVERY_DESCRIPTION, inputSchema: mcpInputSchema(GetDeliverySchema) },
|
|
10501
|
+
{ name: "get_goals", title: "Read Goals", annotations: READS, description: GET_GOALS_DESCRIPTION, inputSchema: mcpInputSchema(GetGoalsSchema) },
|
|
10502
|
+
{ name: "search", title: "Search history", annotations: READS, description: SEARCH_DESCRIPTION, inputSchema: mcpInputSchema(SearchToolSchema) },
|
|
10503
|
+
{ name: "check_activity", title: "Recent agent activity", annotations: READS, 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) },
|
|
10504
|
+
{ name: "send_feedback", title: "Send feedback to Paigy", annotations: SENDS, description: SEND_FEEDBACK_DESCRIPTION, inputSchema: mcpInputSchema(SendFeedbackSchema) },
|
|
10505
|
+
// THE GUIDE FROM INSIDE THE MCP (owner, 2026-10-27): the skill's text, needing no identity (`help.ts`).
|
|
10506
|
+
{ name: "help", title: "Paigy guide", annotations: READS, description: HELP_DESCRIPTION, inputSchema: mcpInputSchema(HelpSchema) }
|
|
10391
10507
|
];
|
|
10392
10508
|
var AGENT_TOOL_NAMES = AGENT_TOOLS.map((t) => t.name);
|
|
10393
10509
|
var id = external_exports.string().uuid();
|
|
@@ -10475,11 +10591,22 @@ var BrainMessageSchema = external_exports.union([
|
|
|
10475
10591
|
// A MESSAGE TO THE PERSON KEEPS ITS SENTENCES (turns.md): the talker writes them one by one, and each is
|
|
10476
10592
|
// its own unit of speech (`<cycle>:<key>:<n>`). `text` is the same words joined, for every reader of a
|
|
10477
10593
|
// message's words. Absent on results written before sentences.
|
|
10478
|
-
external_exports.object({
|
|
10594
|
+
external_exports.object({
|
|
10595
|
+
...messageBase,
|
|
10596
|
+
to: external_exports.object({ kind: external_exports.literal("user") }).strict(),
|
|
10597
|
+
sentences: external_exports.array(external_exports.string().min(1)).min(1).optional(),
|
|
10598
|
+
// THE REPORTS IT TELLS, BY THEIR OWN IDENTITY (call 9d1c096c, 2026-10-15): the talker's message names the report
|
|
10599
|
+
// Entries it speaks of, so the plan's line names that report rather than re-finding it by its Goal. Absent on
|
|
10600
|
+
// results written before it.
|
|
10601
|
+
tells: external_exports.array(external_exports.object({ id }).strict()).optional()
|
|
10602
|
+
}).strict(),
|
|
10479
10603
|
external_exports.object({
|
|
10480
10604
|
...messageBase,
|
|
10481
10605
|
to: external_exports.object({ kind: external_exports.literal("agent"), agentId: external_exports.string().regex(/^agent:(?!paigy$)\S+$/) }).strict(),
|
|
10482
10606
|
call: external_exports.object({ callId: id, listen: external_exports.literal(true) }).strict().optional(),
|
|
10607
|
+
// WHAT IT ASKS THE AGENT, IN UNDER TEN WORDS (owner, 2026-10-15: "Yes, add the summary"): the talker's own, stored
|
|
10608
|
+
// as the sent Entry's summary, which the recap's "Sent to <agent>: …" row shows. Absent on results written before it.
|
|
10609
|
+
summary: external_exports.string().optional(),
|
|
10483
10610
|
// THE PERSON ASKED TO BE CALLED BACK ONCE THIS AGENT'S WORK IS DONE (turns.md, step 0): the agent owes
|
|
10484
10611
|
// the call, and its next contact about it rings them (`public.callbacks`).
|
|
10485
10612
|
callback: external_exports.literal(true).optional()
|
|
@@ -10506,95 +10633,98 @@ var BrainResultSchema = external_exports.object({
|
|
|
10506
10633
|
next: BrainNextSchema,
|
|
10507
10634
|
search: BrainSearchSchema.optional()
|
|
10508
10635
|
}).strict();
|
|
10509
|
-
var
|
|
10636
|
+
var str2 = external_exports.string();
|
|
10510
10637
|
var strs = external_exports.array(external_exports.string());
|
|
10511
10638
|
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:
|
|
10639
|
+
next: external_exports.object({ say: strs, then: external_exports.enum(["listen", "hold", "end", "none"]), waitFor: strs, reason: str2, instructions: strs }).strict(),
|
|
10640
|
+
messages: external_exports.array(external_exports.object({ key: str2, to: str2, text: str2, about: strs, entries: strs, owed: strs, inviteToCall: external_exports.boolean() }).strict()),
|
|
10641
|
+
entries: external_exports.array(external_exports.object({ key: str2, from: str2, on: strs }).strict()),
|
|
10642
|
+
answers: external_exports.array(external_exports.object({ question: str2, entries: strs, summary: str2, picked: strs }).strict()),
|
|
10516
10643
|
changes: external_exports.array(external_exports.object({
|
|
10517
|
-
key:
|
|
10644
|
+
key: str2,
|
|
10518
10645
|
what: external_exports.enum(["goal", "question", "lesson"]),
|
|
10519
10646
|
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:
|
|
10647
|
+
id: str2,
|
|
10648
|
+
text: str2,
|
|
10649
|
+
title: str2,
|
|
10650
|
+
who: str2,
|
|
10651
|
+
under: str2,
|
|
10525
10652
|
gate: external_exports.enum(["start", "complete", "answer", "none"]),
|
|
10526
|
-
options: external_exports.array(external_exports.object({ id:
|
|
10653
|
+
options: external_exports.array(external_exports.object({ id: str2, label: str2 }).strict()),
|
|
10527
10654
|
pick: external_exports.enum(["one", "many", "rank", "words"]),
|
|
10528
10655
|
entries: strs
|
|
10529
10656
|
}).strict()),
|
|
10530
10657
|
feedback: external_exports.array(strs),
|
|
10531
|
-
search: external_exports.object({ query:
|
|
10658
|
+
search: external_exports.object({ query: str2, within: strs, goal: str2 }).strict()
|
|
10532
10659
|
}).strict();
|
|
10533
10660
|
var COMPACT_RESULT_JSON_SCHEMA = (({ $schema: _, ...rest }) => rest)(
|
|
10534
10661
|
zodToJsonSchema(CompactResultSchema, { $refStrategy: "none" })
|
|
10535
10662
|
);
|
|
10536
|
-
var
|
|
10663
|
+
var str3 = external_exports.string();
|
|
10537
10664
|
var strs2 = external_exports.array(external_exports.string());
|
|
10538
10665
|
var TalkerReplySchema = external_exports.object({
|
|
10539
10666
|
/** What to say and send, messages to the person first: spoken in the order written. `to` is "user"
|
|
10540
10667
|
* 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); `
|
|
10668
|
+
* ([] to an agent); `text` is what a message to an agent says ("" to the person); `summary` is what it
|
|
10669
|
+
* asks the agent, in under ten words, as the person would put it ("" to the person; owner, 2026-10-15:
|
|
10670
|
+
* "Yes, add the summary"), which the recap's "Sent to <agent>: …" row shows; `about` names
|
|
10542
10671
|
* handles; `blocks` is the item a question to an agent must be answered before ("" for none);
|
|
10543
10672
|
* `callback` is true on a message to the agent doing work the person asked to be called back about
|
|
10544
10673
|
* 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:
|
|
10674
|
+
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
10675
|
/** What the call does next: listen, hold (the person asked for a moment) or end (they asked to). */
|
|
10547
10676
|
then: external_exports.enum(["listen", "hold", "end"]),
|
|
10548
10677
|
/** The person's replies to items (replies, owner 2026-10-07): the item's handle, the chosen option
|
|
10549
10678
|
* IDs, the line handles, how they replied in under ten words (keeping any condition), and `defer`:
|
|
10550
10679
|
* "" when their words settle the item, else what a reply that puts it off waits for -- "call" (the
|
|
10551
10680
|
* 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:
|
|
10681
|
+
replies: external_exports.array(external_exports.object({ item: str3, options: strs2, lines: strs2, summary: str3, defer: str3 }).strict()),
|
|
10553
10682
|
/** The line handles that tell the talker how to run this call; they last until it ends and reach no agent. */
|
|
10554
10683
|
instruction: strs2,
|
|
10555
10684
|
/** The line handles the filer acts on, and the only ones it reads (3e): new work, a change to existing
|
|
10556
10685
|
* work, feedback on Paigy, anything said to an agent, and any rule meant to outlast the call. */
|
|
10557
10686
|
file: strs2,
|
|
10558
10687
|
/** 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:
|
|
10688
|
+
need: external_exports.object({ kind: external_exports.enum(["search", "item", "agent", ""]), text: str3 }).strict(),
|
|
10560
10689
|
/** The handle of the item to explain ("" for none). */
|
|
10561
|
-
explain:
|
|
10690
|
+
explain: str3
|
|
10562
10691
|
}).strict();
|
|
10563
10692
|
var TALKER_REPLY_JSON_SCHEMA = (({ $schema: _, ...rest }) => rest)(
|
|
10564
10693
|
zodToJsonSchema(TalkerReplySchema, { $refStrategy: "none" })
|
|
10565
10694
|
);
|
|
10566
|
-
var
|
|
10695
|
+
var str4 = external_exports.string();
|
|
10567
10696
|
var strs3 = external_exports.array(external_exports.string());
|
|
10568
10697
|
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
|
-
|
|
10698
|
+
/** Which Goals each new line goes on: a line's handle, Goal handles (or keys of new Goals: a line that asks
|
|
10699
|
+
* for new work goes on the Goal it creates, owner 2026-10-26), and what the line says in at most twenty
|
|
10700
|
+
* words (owner, 2026-10-26: "bump it from 10 to 20 words"). */
|
|
10701
|
+
filed: external_exports.array(external_exports.object({ line: str4, goals: strs3, summary: str4 }).strict()),
|
|
10572
10702
|
goals: external_exports.array(external_exports.object({
|
|
10573
10703
|
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:
|
|
10704
|
+
key: str4,
|
|
10705
|
+
goal: str4,
|
|
10706
|
+
title: str4,
|
|
10707
|
+
outcome: str4,
|
|
10708
|
+
owner: str4,
|
|
10709
|
+
under: str4,
|
|
10710
|
+
until: str4,
|
|
10711
|
+
on: str4,
|
|
10582
10712
|
gate: external_exports.enum(["start", "complete", "answer", ""]),
|
|
10583
|
-
why:
|
|
10713
|
+
why: str4
|
|
10584
10714
|
}).strict()),
|
|
10585
10715
|
questions: external_exports.array(external_exports.object({
|
|
10586
10716
|
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:
|
|
10717
|
+
key: str4,
|
|
10718
|
+
question: str4,
|
|
10719
|
+
text: str4,
|
|
10720
|
+
summary: str4,
|
|
10721
|
+
to: str4,
|
|
10722
|
+
goal: str4,
|
|
10723
|
+
options: external_exports.array(external_exports.object({ id: str4, label: str4 }).strict()),
|
|
10594
10724
|
pick: external_exports.enum(["one", "many", "rank", "words", ""]),
|
|
10595
|
-
blocks:
|
|
10725
|
+
blocks: str4
|
|
10596
10726
|
}).strict()),
|
|
10597
|
-
lessons: external_exports.array(external_exports.object({ op: external_exports.enum(["remember", "revise", "withdraw"]), lesson:
|
|
10727
|
+
lessons: external_exports.array(external_exports.object({ op: external_exports.enum(["remember", "revise", "withdraw"]), lesson: str4, text: str4, scope: str4 }).strict()),
|
|
10598
10728
|
/** Line handles whose words comment on Paigy itself. */
|
|
10599
10729
|
feedback: strs3
|
|
10600
10730
|
}).strict();
|
|
@@ -10655,6 +10785,27 @@ var TidyReplySchema = external_exports.object({
|
|
|
10655
10785
|
var TIDY_REPLY_JSON_SCHEMA = (({ $schema: _, ...rest }) => rest)(
|
|
10656
10786
|
zodToJsonSchema(TidyReplySchema, { $refStrategy: "none" })
|
|
10657
10787
|
);
|
|
10788
|
+
var HandoutReplySchema = external_exports.object({
|
|
10789
|
+
assign: external_exports.array(external_exports.object({
|
|
10790
|
+
/** The Goal's handle (G). */
|
|
10791
|
+
goal: external_exports.string(),
|
|
10792
|
+
/** The agent's handle (A). */
|
|
10793
|
+
to: external_exports.string(),
|
|
10794
|
+
/** At most ten words, naming the Goal of theirs it is most like: the reason the hand-out records. */
|
|
10795
|
+
why: external_exports.string()
|
|
10796
|
+
}).strict()),
|
|
10797
|
+
/** The Goals no listed agent's work is even loosely like: Paigy starts a session for them (owner, 2026-10-24,
|
|
10798
|
+
* Goal 37603006, "One per family of related Goals"). */
|
|
10799
|
+
new: external_exports.array(external_exports.object({
|
|
10800
|
+
/** The Goal's handle (G). */
|
|
10801
|
+
goal: external_exports.string(),
|
|
10802
|
+
/** At most ten words: why nothing active fits it. */
|
|
10803
|
+
why: external_exports.string()
|
|
10804
|
+
}).strict())
|
|
10805
|
+
}).strict();
|
|
10806
|
+
var HANDOUT_REPLY_JSON_SCHEMA = (({ $schema: _, ...rest }) => rest)(
|
|
10807
|
+
zodToJsonSchema(HandoutReplySchema, { $refStrategy: "none" })
|
|
10808
|
+
);
|
|
10658
10809
|
function entryUnit(entry) {
|
|
10659
10810
|
if (entry.kind !== "contribution" || !entry.aboutId) return null;
|
|
10660
10811
|
const plain = entry.content && "plain" in entry.content ? entry.content.plain : null;
|
|
@@ -10790,7 +10941,7 @@ var NotifyRequestFields = external_exports.object({
|
|
|
10790
10941
|
* derive agent-side before sealing, so the server only ever shapes plaintext). */
|
|
10791
10942
|
// 10k, not a sentence budget. What the human hears is bounded by the BROKER — it splits
|
|
10792
10943
|
// the ask into topics and gives each one at most three sentences and one question
|
|
10793
|
-
// (docs/
|
|
10944
|
+
// (docs/history/agenda-design.md) — not by a wire cap the agent has to pre-summarize under.
|
|
10794
10945
|
// Owner, 2026-07-28: "our actual limitation on how long something is to the user should
|
|
10795
10946
|
// come from the broker splitting and summarizing." The cap that remains is a size guard.
|
|
10796
10947
|
ask: external_exports.string().min(1).max(1e4).optional().describe(
|
|
@@ -10867,7 +11018,7 @@ var UserAnswerSchema = external_exports.discriminatedUnion("kind", [
|
|
|
10867
11018
|
external_exports.object({ kind: external_exports.literal("clarify"), chunks: external_exports.array(external_exports.string()).min(1) }),
|
|
10868
11019
|
external_exports.object({ kind: external_exports.literal("confirm"), approved: external_exports.boolean() }),
|
|
10869
11020
|
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/
|
|
11021
|
+
/** An auto-answer derived from the user's PAST decisions (docs/history/precedent-design.md §2):
|
|
10871
11022
|
* delivered through the same settle/await path as a human answer, carrying the judge's
|
|
10872
11023
|
* derivation and the precedent ids it grew from. Always paired with a visible trail
|
|
10873
11024
|
* card the user can reply to — the broker never overrides the user. */
|
|
@@ -11018,6 +11169,21 @@ var AgendaTurnSchema = external_exports.object({
|
|
|
11018
11169
|
* the phone (`asking`, so the agenda goes gold and its options show) without treating the line as a
|
|
11019
11170
|
* question turn — the talker owns re-asking and the waits, so `question` stays null. */
|
|
11020
11171
|
onTable: external_exports.boolean().optional(),
|
|
11172
|
+
/** THE CARRIED ITEM THIS LINE TELLS (Goal 2a1e50eb, owner 2026-10-14: "Build the whole design") — a
|
|
11173
|
+
* request the Call carries that asks NOTHING: a report, a progress note, another agent's waiting news.
|
|
11174
|
+
* Its request Entry id, so the phone can make that agenda row the current one while it is read
|
|
11175
|
+
* (`telling` on the `turn` topic, `docs/clients/app/walk/design.md` §11).
|
|
11176
|
+
*
|
|
11177
|
+
* A FIELD OF ITS OWN, NEVER `claimId`: the claim is the RETURN identity — answers route by it and the
|
|
11178
|
+
* record tags the line with it (`workId`) — and an answer must never route to an Entry that asks
|
|
11179
|
+
* nothing. Absent on a turn speaking for a question (`claimId` says that) and on one speaking for no
|
|
11180
|
+
* carried item at all (an opener, a sign-off, Paigy's own line). */
|
|
11181
|
+
telling: external_exports.string().optional(),
|
|
11182
|
+
/** PAIGY'S OWN LINE (owner, 2026-10-15; calls ed2cbdce, ad50ad25): a turn that speaks for no item -- an
|
|
11183
|
+
* opener, a sign-off, a reply about nothing an agent asked or told -- is recorded as Paigy's, not as the
|
|
11184
|
+
* agent that rang. Absent on every turn that speaks for an item (`agentId` names whose), and on plans
|
|
11185
|
+
* from before it: a bot that does not know it records the ringing agent, as before. */
|
|
11186
|
+
speaksFor: external_exports.literal("paigy").optional(),
|
|
11021
11187
|
select: SelectShapeSchema.optional(),
|
|
11022
11188
|
options: external_exports.array(OptionSchema.omit({ id: true })).optional(),
|
|
11023
11189
|
/* `pace` STOOD HERE (#826). A turn could carry seconds and the model chose them. The walk
|
|
@@ -11106,7 +11272,7 @@ var InboxItemSchema = external_exports.object({
|
|
|
11106
11272
|
questions: external_exports.array(CallQuestionSchema).optional(),
|
|
11107
11273
|
/** The same call carrying order, including request Entries with no DecisionNeed as reports.
|
|
11108
11274
|
* 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(),
|
|
11275
|
+
callItems: external_exports.array(CallQuestionSchema.extend({ state: external_exports.enum(["open", "answered", "report"]), acknowledged: external_exports.boolean().optional() })).optional(),
|
|
11110
11276
|
visuals: external_exports.array(VisualSchema).optional(),
|
|
11111
11277
|
/** The connected agent's name (the single pairing name — user-typed, or the
|
|
11112
11278
|
* agent's suggestion, or a default silly name). */
|
|
@@ -11117,6 +11283,10 @@ var InboxItemSchema = external_exports.object({
|
|
|
11117
11283
|
branch: external_exports.string().optional(),
|
|
11118
11284
|
createdAt: external_exports.string().datetime(),
|
|
11119
11285
|
snoozedUntil: external_exports.string().datetime().optional(),
|
|
11286
|
+
/** A past card the person dismissed that Restore can take back (#2699): its newest close is their
|
|
11287
|
+
* dismissal, with what it withdrew recorded (`private.restore_delivery`). Absent on everything else —
|
|
11288
|
+
* a put-off, a card an ended Goal or a settled question closed, and every open card. */
|
|
11289
|
+
restorable: external_exports.boolean().optional(),
|
|
11120
11290
|
agentState: AgentStateSchema.default("idle"),
|
|
11121
11291
|
/** Whose action the item is waiting on: "you" = an agent asked you (the default,
|
|
11122
11292
|
* every agent→user notification); "agent" = you sent a request and it's awaiting the
|
|
@@ -11126,11 +11296,6 @@ var InboxItemSchema = external_exports.object({
|
|
|
11126
11296
|
* the agent (provider-agnostic; set server-side). Absent = no hard error. Drives the inbox
|
|
11127
11297
|
* error badge + Retry. */
|
|
11128
11298
|
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
11299
|
clarifies: external_exports.string().optional(),
|
|
11135
11300
|
/** THIS CARD'S QUESTION IS ON A LIVE CALL (owner, 2026-09-24: "Mark it while the call is
|
|
11136
11301
|
* live"). Present only while an open Call Delivery carries the card's request Entry — read
|
|
@@ -11168,9 +11333,35 @@ var InboxItemSchema = external_exports.object({
|
|
|
11168
11333
|
"Labels for a select:'confirm' paige \u2014 'yesno' (Yes/No) or 'approve' (Approve/Deny). Ignored unless select is 'confirm'."
|
|
11169
11334
|
),
|
|
11170
11335
|
/** 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/
|
|
11336
|
+
* urgency (see the main README's "premier use case" + docs/history/notify-states.md). Drives the
|
|
11172
11337
|
* inbox's blocking badge and the extra confirm step before dismissing it. */
|
|
11173
11338
|
blocking: external_exports.boolean().default(false),
|
|
11339
|
+
/** WHAT FREED THIS QUESTION (owner, 2026-10-16, Goal 2383ef14: "we don't really show the question
|
|
11340
|
+
* at the top until the question it could reply to with is resolved. And then we show it again
|
|
11341
|
+
* with the context of the other thing that was resolved"; asked how it should carry that, "The
|
|
11342
|
+
* answer above it"). A question they answered with a question of their own waits for theirs
|
|
11343
|
+
* (`private.ask_back`) and drops out of the front while it waits; when it comes back, the card
|
|
11344
|
+
* draws their question and the answer it got ABOVE the ask, as one card. Absent on a question
|
|
11345
|
+
* nothing ever held back. */
|
|
11346
|
+
freedBy: external_exports.object({
|
|
11347
|
+
questionId: external_exports.string(),
|
|
11348
|
+
asked: external_exports.string(),
|
|
11349
|
+
answer: external_exports.string(),
|
|
11350
|
+
answeredAt: external_exports.string(),
|
|
11351
|
+
/** The answer in ten words, when the talker wrote one beside it. */
|
|
11352
|
+
summary: external_exports.string().optional()
|
|
11353
|
+
}).optional(),
|
|
11354
|
+
/** WHAT THIS CARD ANSWERS (owner, 2026-10-27, Goal 81b6a9d6: "this reads very clearly as an answer to
|
|
11355
|
+
* something I asked, but I don't see the question… To show the question near the top of the card").
|
|
11356
|
+
* An agent's card that is its answer to one of the person's own questions carries that question's
|
|
11357
|
+
* words, drawn above it as "You asked" (`public.questions_answered_by`, read beside the card read).
|
|
11358
|
+
* Absent on every card that answers nothing of theirs, and on a held question, which has `freedBy`. */
|
|
11359
|
+
answering: external_exports.object({ asked: external_exports.string() }).optional(),
|
|
11360
|
+
/** WHEN ITS AGENT LAST BUMPED THIS QUESTION (#2855, `contact`'s `bumpQuestionIds`): the agent asked
|
|
11361
|
+
* the person to notice it again, and For you puts it first, the latest bump on top
|
|
11362
|
+
* (`question/order.ts`). Absent on a question never bumped, and on every card from an API older
|
|
11363
|
+
* than the bump. */
|
|
11364
|
+
bumpedAt: external_exports.string().optional(),
|
|
11174
11365
|
/** The user's locked-in answer; present only for replied items (GET /api/replied/:id). */
|
|
11175
11366
|
answer: UserAnswerSchema.optional(),
|
|
11176
11367
|
/** THE TARGET FACTS A CARD RENDERS (#1796 point 5, 2026-09-11): the Delivery it is a view of,
|
|
@@ -11197,7 +11388,7 @@ var InboxItemSchema = external_exports.object({
|
|
|
11197
11388
|
*
|
|
11198
11389
|
* THE PAYLOAD'S OWN HASH, NEVER A STAMP ON THE WORK — the same mechanism as `QueueItem.rev`
|
|
11199
11390
|
* (#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,
|
|
11391
|
+
* own moves (its Goal's state and name, whether a ring is
|
|
11201
11392
|
* live). Optional, so a fixture, the demo and the archive lens need not spell one, and a card
|
|
11202
11393
|
* with no rev is simply always re-sent. */
|
|
11203
11394
|
rev: external_exports.string().optional()
|
|
@@ -11232,6 +11423,7 @@ var MissedCallSchema = external_exports.enum([
|
|
|
11232
11423
|
]);
|
|
11233
11424
|
var clock = (h) => h === 0 ? "midnight" : h === 12 ? "noon" : h < 12 ? `${h} am` : `${h - 12} pm`;
|
|
11234
11425
|
var QUIET = ` Nothing rings from ${clock(NIGHT.from)} to ${clock(NIGHT.to)} your time; the count waits for morning.`;
|
|
11426
|
+
var THEIR_QUIET = ` Nothing rings from ${clock(NIGHT.from)} to ${clock(NIGHT.to)} their time; the count waits for morning.`;
|
|
11235
11427
|
var BrokerTuningSchema = external_exports.object({
|
|
11236
11428
|
/** 'none' = skip the spoken ack after a mapped answer (power users find it slow). */
|
|
11237
11429
|
ackVerbosity: external_exports.enum(["normal", "none"]).optional(),
|
|
@@ -11274,12 +11466,9 @@ var UserSettingsSchema = external_exports.object({
|
|
|
11274
11466
|
* must not silently reset this privacy choice. Absent = leave unchanged on
|
|
11275
11467
|
* write, 'hosted' on read (see store.ts). */
|
|
11276
11468
|
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(),
|
|
11469
|
+
/** `talk` lived here until #2373: it gated auto-play, which went in #2374. An older bundle's
|
|
11470
|
+
* `talk` is stripped like `silentPush` was, and the `user_settings.talk` column went in
|
|
11471
|
+
* 20261028142255. */
|
|
11283
11472
|
/** CALL DIAGNOSTICS (owner, 2026-10-01): the call report carries each listen and the bot's own
|
|
11284
11473
|
* load timings. SERVER-SET, no UI — on for every account that existed on 2026-10-01, off for
|
|
11285
11474
|
* newer ones (migration 20261001132859). Read-only here: the settings PATCH never writes it. */
|
|
@@ -11356,7 +11545,8 @@ var ConnectionSummarySchema = external_exports.object({
|
|
|
11356
11545
|
kind: external_exports.enum(["device", "agent"]).optional(),
|
|
11357
11546
|
/** For an agent, the token id of the DEVICE that minted it — so agents group under their
|
|
11358
11547
|
* machine, and revoking a device cascades to them. Null on devices, and on unlinked
|
|
11359
|
-
* agents (
|
|
11548
|
+
* agents (provider-managed, hatched by another agent, or minted before the link existed);
|
|
11549
|
+
* a phone-launched agent is linked to the computer it runs on since #1602. */
|
|
11360
11550
|
mintedByDevice: external_exports.string().nullable().optional(),
|
|
11361
11551
|
device: external_exports.string().nullable(),
|
|
11362
11552
|
/** The agent's display name (the single pairing name). */
|
|
@@ -11370,7 +11560,7 @@ var ConnectionSummarySchema = external_exports.object({
|
|
|
11370
11560
|
* user on the agent's own page. null = no ceiling (today's behaviour for every
|
|
11371
11561
|
* connection). Android binds importance to a relationship rather than to each message,
|
|
11372
11562
|
* and that is the thing our roster could not say: "Marlow may always call me; Otto
|
|
11373
|
-
* never may" (docs/
|
|
11563
|
+
* never may" (docs/history/party-navigation-design.md, gap 2). Clamped in `arbitrateLevel`, so it binds
|
|
11374
11564
|
* every surface at once and outranks even `sessionMode: all_calls` — a mode the user
|
|
11375
11565
|
* set once must not overrule a rule they set about one agent. */
|
|
11376
11566
|
reach: NotifyLevelSchema.nullable().optional(),
|
|
@@ -11385,6 +11575,12 @@ var ConnectionSummarySchema = external_exports.object({
|
|
|
11385
11575
|
* its Goals — wrote on one or recorded an operation (`tokens.last_worked_at`). Within
|
|
11386
11576
|
* `WORKING_MS` it is working; otherwise it is connected but idle. Null = not seen working yet. */
|
|
11387
11577
|
lastWorkedAt: external_exports.string().datetime().nullable().optional(),
|
|
11578
|
+
/** A TERMINAL SESSION'S ONLY PULSE (`tokens.listened_at`): `paigy-listen` stamps it on every sweep
|
|
11579
|
+
* (90 s). It is deliberately NOT presence — `last_seen_at` is the desktop host's beat, and a
|
|
11580
|
+
* listener orphaned from a dead conversation must not light the live dot — but it is the one fact
|
|
11581
|
+
* that says a terminal session's process is UP, which is why the wake already reads it
|
|
11582
|
+
* (`wake.ts`, `listener`). Null = no listener sweeping. */
|
|
11583
|
+
listenedAt: external_exports.string().datetime().nullable().optional(),
|
|
11388
11584
|
/** The oldest of its Goals that is `ready` for it — work handed to it that nobody has started.
|
|
11389
11585
|
* With no work of its own for `WORKING_MS`, an agent sitting on this is not taking its work. */
|
|
11390
11586
|
oldestReadyAt: external_exports.string().datetime().nullable().optional(),
|
|
@@ -11529,12 +11725,14 @@ var QueueItemSchema = external_exports.object({
|
|
|
11529
11725
|
/** Its questions: every OPEN one, and at most ten settled, newest settled first
|
|
11530
11726
|
* (20260929133308) — the page decides which of them to show. NOT the whole set: `asked` and
|
|
11531
11727
|
* `answered` are, and a settled one's words are a line (280 characters), its body read when the
|
|
11532
|
-
* question is opened.
|
|
11728
|
+
* question is opened. Never a CANCELLED one (withdrawn, dismissed, or its Goal or call ended): it
|
|
11729
|
+
* asks nothing of anyone (#3723). */
|
|
11533
11730
|
questions: external_exports.array(QueueQuestionSchema).default([]),
|
|
11534
11731
|
/** HOW MANY QUESTIONS THIS WORK HAS ASKED, and how many are answered — the Goal's own totals,
|
|
11535
11732
|
* bounded at 100 server-side. A tally counted off `questions` is a wrong number that looks
|
|
11536
11733
|
* 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.
|
|
11734
|
+
* by the projection, so hand-built queues (fixtures, the demo) need not spell them. A cancelled
|
|
11735
|
+
* question is not asked (#3725). */
|
|
11538
11736
|
asked: external_exports.number().optional(),
|
|
11539
11737
|
answered: external_exports.number().optional(),
|
|
11540
11738
|
/** Every note on it the person replied to (`QueueReplySchema`) — the page decides which to show.
|
|
@@ -11549,6 +11747,10 @@ var QueueItemSchema = external_exports.object({
|
|
|
11549
11747
|
* as progress). `updatedAt` moves for reasons nobody chose — a
|
|
11550
11748
|
* state recomputed, a review flag — so it cannot tell work in hand from work gone quiet. */
|
|
11551
11749
|
lastProgressAt: external_exports.string().nullable().optional(),
|
|
11750
|
+
/** WHEN AN AGENT LAST ACTED ON IT (owner, 2026-10-27: "Move it now", Goal 567258dc): its newest agent write, an
|
|
11751
|
+
* Entry or a Goal change, Paigy's excluded (`goals.worked_at`). What keeps work an agent is writing on from
|
|
11752
|
+
* reading as gone quiet (`coldSince`); absent on a door that does not carry it. */
|
|
11753
|
+
workedAt: external_exports.string().nullable().optional(),
|
|
11552
11754
|
/** THE GOAL'S NEWEST WORD, FROM EITHER SIDE (owner, 2026-09-27): the newest Entry on it, of any
|
|
11553
11755
|
* kind — what the person added ("Add to this"), their reply, the agent's ask or its progress
|
|
11554
11756
|
* note. A progress note is an Entry, so this is already the newer of the two: the person's note
|
|
@@ -11708,7 +11910,7 @@ var DeviceTokenSchema = external_exports.object({
|
|
|
11708
11910
|
* the thread each time (host.ts, live catch 2026-08-06 — prompt-papered until now). */
|
|
11709
11911
|
workspace: external_exports.string().nullable().optional(),
|
|
11710
11912
|
/** Local host recovery must preserve the launch's runtime and Paigy identity. */
|
|
11711
|
-
harness: external_exports.enum(["claude", "codex", "agy"]).optional(),
|
|
11913
|
+
harness: external_exports.enum(["claude", "codex", "agy", "grok"]).optional(),
|
|
11712
11914
|
session_id: external_exports.string().uuid().optional(),
|
|
11713
11915
|
/** A conversation the host must not resume: its context is full, so every turn fails
|
|
11714
11916
|
* ("Prompt is too long"). Written when a run hits it (`run.ts` `onFull`); the host skips a slot
|
|
@@ -11795,9 +11997,6 @@ var AgentRowSchema = ComputerRowSchema.extend({
|
|
|
11795
11997
|
* (`agent_holds`); null when that read failed. */
|
|
11796
11998
|
holds: external_exports.array(external_exports.object({ id: external_exports.string(), title: external_exports.string() })).nullable(),
|
|
11797
11999
|
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
12000
|
/** The newest line of its working log, and when the harness saw it. */
|
|
11802
12001
|
line: external_exports.string().nullable(),
|
|
11803
12002
|
lineAt: external_exports.string().datetime().nullable()
|
|
@@ -11841,6 +12040,11 @@ var CallRecapSchema = external_exports.object({
|
|
|
11841
12040
|
durationMs: external_exports.number().nullable(),
|
|
11842
12041
|
/** Bot-clock pickup offset; absent before the timestamp release, null before its report lands. */
|
|
11843
12042
|
pickupMs: external_exports.number().nullable().optional(),
|
|
12043
|
+
/** STILL FILING (20261026182117): the call has not ended on the server, or it has and a brain cycle on it is
|
|
12044
|
+
* still pending, the next writer, which may still settle, file or start something. What the close itself
|
|
12045
|
+
* waits for (`private.close_call`). `status` cannot say it: nothing writes "finalizing", and a call reads
|
|
12046
|
+
* "open" until the sweep closes it, after nothing is pending. Absent from an API before it. */
|
|
12047
|
+
filing: external_exports.boolean().optional(),
|
|
11844
12048
|
agents: external_exports.array(external_exports.object({ id: external_exports.string(), name: external_exports.string().nullable() }))
|
|
11845
12049
|
}),
|
|
11846
12050
|
topics: external_exports.array(external_exports.object({
|
|
@@ -11849,7 +12053,7 @@ var CallRecapSchema = external_exports.object({
|
|
|
11849
12053
|
owner: external_exports.string(),
|
|
11850
12054
|
state: external_exports.string(),
|
|
11851
12055
|
/** 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(),
|
|
12056
|
+
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
12057
|
/** Whether the call put it to the person. An item it carried and never said has no row on the
|
|
11854
12058
|
* review (owner, 2026-10-08: "why do we get the third one when it didn't happen in the call?"). */
|
|
11855
12059
|
presented: external_exports.boolean(),
|
|
@@ -11895,9 +12099,65 @@ var CallRecapSchema = external_exports.object({
|
|
|
11895
12099
|
words: external_exports.string(),
|
|
11896
12100
|
atMs: external_exports.number()
|
|
11897
12101
|
})),
|
|
11898
|
-
|
|
12102
|
+
/** What did not fit, counted. `settles` counts items past the recap's 100; absent before 20261026165518. */
|
|
12103
|
+
more: external_exports.object({ lines: external_exports.number(), entries: external_exports.number(), topics: external_exports.number(), settles: external_exports.number().optional() }),
|
|
11899
12104
|
/** Last stored position on this page when another exists; absent before paging shipped. */
|
|
11900
|
-
next: external_exports.number().int().nonnegative().nullable().optional()
|
|
12105
|
+
next: external_exports.number().int().nonnegative().nullable().optional(),
|
|
12106
|
+
/** THE CALL AS ONE LIST OF ROWS (owner, 2026-10-14: "we only really want a thing like transcript but
|
|
12107
|
+
* built from the summaries", then "the transcript tabs should show the same but with full words").
|
|
12108
|
+
* Both tabs draw these rows, in this order: Summary from `summary`, Transcript from `words`.
|
|
12109
|
+
* - `put`: an item put to the person, at the first agent line that voiced it. Paigy's sentences
|
|
12110
|
+
* that voiced it are folded into `spoken`, never rows of their own.
|
|
12111
|
+
* - `said`: the person's words, one row per reply or per filed line no reply covers.
|
|
12112
|
+
* - `did`: what Paigy did ("Sent to Mouth: …", "Recorded: …", "Filed on …").
|
|
12113
|
+
* `by` is the row's real author, never inferred from `kind`: a relay Paigy sent to an agent is
|
|
12114
|
+
* Paigy's, not the person's. Optional and additive (owner: "make sure whatever you do is backward
|
|
12115
|
+
* compatible"): an API before it sends none, and the screen falls back to `topics` and `said`. */
|
|
12116
|
+
timeline: external_exports.array(external_exports.object({
|
|
12117
|
+
id: external_exports.string(),
|
|
12118
|
+
position: external_exports.number(),
|
|
12119
|
+
atMs: external_exports.number(),
|
|
12120
|
+
kind: external_exports.enum(["put", "said", "did"]),
|
|
12121
|
+
by: external_exports.object({ participant: external_exports.string().nullable(), agentId: external_exports.string().nullable(), name: external_exports.string().nullable() }),
|
|
12122
|
+
goalId: external_exports.string().uuid().nullable(),
|
|
12123
|
+
requestId: external_exports.string().nullable(),
|
|
12124
|
+
summary: external_exports.string().nullable(),
|
|
12125
|
+
words: external_exports.string(),
|
|
12126
|
+
/** Paigy's sentences folded into this row: on a `put` row, what it said putting the item to the
|
|
12127
|
+
* person (before their next row); on a `said` row, what it said in reply (until their next row).
|
|
12128
|
+
* `atMs` is when each was said; optional, absent before 2026-10-14's fix. */
|
|
12129
|
+
spoken: external_exports.array(external_exports.object({ lineId: external_exports.string(), words: external_exports.string(), atMs: external_exports.number().optional() })),
|
|
12130
|
+
/** On a `said` row: the work these words were filed on, and whether they answered (recorded) a
|
|
12131
|
+
* question. They replace the "Filed on ..." and "Recorded: ..." rows that repeated the person's own
|
|
12132
|
+
* summary (Brain, 2026-10-14). Optional: absent from an API before it. */
|
|
12133
|
+
filedOn: external_exports.array(external_exports.object({ goalId: external_exports.string().uuid(), title: external_exports.string() })).optional(),
|
|
12134
|
+
recorded: external_exports.boolean().optional(),
|
|
12135
|
+
settled: external_exports.object({ requestId: external_exports.string(), answer: external_exports.string() }).nullable().optional(),
|
|
12136
|
+
acknowledged: external_exports.boolean().optional(),
|
|
12137
|
+
/** On a `put` row: still waiting for the person's answer (not settled, not answered, not put off).
|
|
12138
|
+
* The server's judgement; the screen draws "Still waiting for your answer" from it. Optional: absent
|
|
12139
|
+
* from an API before it, where the screen falls back to its own reading. */
|
|
12140
|
+
waiting: external_exports.boolean().optional(),
|
|
12141
|
+
lineIds: external_exports.array(external_exports.string())
|
|
12142
|
+
})).optional(),
|
|
12143
|
+
/** THE RECAP (owner, 2026-10-26: "the transcript should just be the entries that settled or
|
|
12144
|
+
* acknowledged the items; that's it"). Each item the person's words settled on this call, in the
|
|
12145
|
+
* order they said them: who asked it (`by`), the item in its agent's words (`title`), and only the
|
|
12146
|
+
* words of theirs that settled it (`lines`: each line once, verbatim, with when it was said on the
|
|
12147
|
+
* bot clock like `said[].atMs`). Built from their replies, not from what the call put, so an item
|
|
12148
|
+
* settled without being put is still here. Beside them (owner: "List them too, with the words that
|
|
12149
|
+
* said them"), each Goal his words told something (`kind` "told") or the call started ("started"),
|
|
12150
|
+
* with `requestId` null and the Goal's name as `title`; a started Goal may have no `lines` yet. `kind`
|
|
12151
|
+
* is a string, not an enum, so a later kind never fails an older build's parse; `requestId` is the
|
|
12152
|
+
* request the words settled. On the first page only; absent from an API before it. */
|
|
12153
|
+
settles: external_exports.array(external_exports.object({
|
|
12154
|
+
requestId: external_exports.string().nullable(),
|
|
12155
|
+
kind: external_exports.string(),
|
|
12156
|
+
by: external_exports.object({ participant: external_exports.string(), agentId: external_exports.string().nullable(), name: external_exports.string() }),
|
|
12157
|
+
goalId: external_exports.string().uuid().nullable(),
|
|
12158
|
+
title: external_exports.string(),
|
|
12159
|
+
lines: external_exports.array(external_exports.object({ lineId: external_exports.string(), words: external_exports.string(), atMs: external_exports.number() }))
|
|
12160
|
+
})).optional()
|
|
11901
12161
|
});
|
|
11902
12162
|
function sessionSlot(sessionId2) {
|
|
11903
12163
|
const id22 = sessionId2 ?? sessionId();
|
|
@@ -11983,6 +12243,14 @@ async function requestCode(suggestedName = agentName(), device) {
|
|
|
11983
12243
|
if (!res.ok) throw new Error(`/api/device/code failed: ${res.status} ${await res.text()}`);
|
|
11984
12244
|
return await res.json();
|
|
11985
12245
|
}
|
|
12246
|
+
var ServerFault = class extends Error {
|
|
12247
|
+
constructor(status) {
|
|
12248
|
+
super(`Paigy's server failed (HTTP ${status}) while checking the code.`);
|
|
12249
|
+
this.status = status;
|
|
12250
|
+
this.name = "ServerFault";
|
|
12251
|
+
}
|
|
12252
|
+
status;
|
|
12253
|
+
};
|
|
11986
12254
|
async function pollToken(deviceCode) {
|
|
11987
12255
|
const res = await reach(`${BACKEND_URL}/api/device/token`, {
|
|
11988
12256
|
method: "POST",
|
|
@@ -11990,6 +12258,7 @@ async function pollToken(deviceCode) {
|
|
|
11990
12258
|
body: JSON.stringify({ device_code: deviceCode })
|
|
11991
12259
|
});
|
|
11992
12260
|
if (res.ok) return await res.json();
|
|
12261
|
+
if (res.status >= 500) throw new ServerFault(res.status);
|
|
11993
12262
|
const body = await res.json().catch(() => ({ error: "unknown" }));
|
|
11994
12263
|
const err = body.error ?? "unknown";
|
|
11995
12264
|
if (err === "authorization_pending") return null;
|
|
@@ -12138,11 +12407,16 @@ async function listConnections(opts = {}) {
|
|
|
12138
12407
|
if (!res.ok) throw new Error(`list_connections failed: ${res.status} ${await res.text()}`);
|
|
12139
12408
|
return await res.json();
|
|
12140
12409
|
}
|
|
12141
|
-
var NOT_SENT = `Recorded as the Goal's progress, not sent
|
|
12410
|
+
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
12411
|
var APPLIED = "Applied; nothing was sent to the person.";
|
|
12143
12412
|
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.";
|
|
12413
|
+
function citeOf(receipt) {
|
|
12414
|
+
if (!receipt.uncited?.length) return {};
|
|
12415
|
+
return { uncited: receipt.uncited, ...receipt.cite ? { cite: receipt.cite } : {} };
|
|
12416
|
+
}
|
|
12144
12417
|
async function readDelivery(deliveryId, opts = {}) {
|
|
12145
|
-
const
|
|
12418
|
+
const query = opts.transcript ? `?transcript=1${opts.after ? `&after=${encodeURIComponent(opts.after)}` : ""}` : "";
|
|
12419
|
+
const res = await ensureAuthed(await (opts.reach ?? reach)(`${BACKEND_URL}/api/deliveries/${encodeURIComponent(deliveryId)}${query}`, {
|
|
12146
12420
|
headers: { authorization: `Bearer ${authToken(opts.token) ?? ""}` },
|
|
12147
12421
|
signal: opts.signal
|
|
12148
12422
|
}));
|
|
@@ -12167,6 +12441,7 @@ async function contact(input, opts = {}) {
|
|
|
12167
12441
|
...questions ? { questions } : {},
|
|
12168
12442
|
...parsed.answers ? { answers: parsed.answers } : {},
|
|
12169
12443
|
...parsed.withdrawQuestionIds ? { withdrawQuestionIds: parsed.withdrawQuestionIds } : {},
|
|
12444
|
+
...parsed.bumpQuestionIds ? { bumpQuestionIds: parsed.bumpQuestionIds } : {},
|
|
12170
12445
|
...parsed.questionDependencies ? { questionDependencies: parsed.questionDependencies } : {}
|
|
12171
12446
|
})
|
|
12172
12447
|
}));
|
|
@@ -12180,7 +12455,7 @@ async function contact(input, opts = {}) {
|
|
|
12180
12455
|
const demoted = askedCall && receipt.channel && receipt.channel !== "call" ? DEMOTED : void 0;
|
|
12181
12456
|
const acked = acknowledged ? { acknowledged } : {};
|
|
12182
12457
|
if (!deliveries.length) {
|
|
12183
|
-
return { sent: false, ok, results, ...recorded.length ? { recorded } : {}, message: recorded.length ? NOT_SENT : APPLIED, waitOutcome: "not_waited", ...acked };
|
|
12458
|
+
return { sent: false, ok, results, ...recorded.length ? { recorded } : {}, message: recorded.length ? NOT_SENT : APPLIED, waitOutcome: "not_waited", ...acked, ...citeOf(receipt) };
|
|
12184
12459
|
}
|
|
12185
12460
|
const lead = deliveries.find((d) => d.kind === "question") ?? deliveries[0];
|
|
12186
12461
|
const read3 = async (signal2) => {
|
|
@@ -12195,7 +12470,10 @@ async function contact(input, opts = {}) {
|
|
|
12195
12470
|
// IT WENT ONTO A CALL ALREADY HAPPENING (owner, 2026-09-28): the view words it as that call.
|
|
12196
12471
|
...lead.joinedCall ? { joinedCall: true } : {},
|
|
12197
12472
|
...demoted ? { demoted } : {},
|
|
12198
|
-
...acked
|
|
12473
|
+
...acked,
|
|
12474
|
+
...receipt.ringPolicy ? { ringPolicy: receipt.ringPolicy, ...receipt.message ? { ringHeld: receipt.message } : {} } : {},
|
|
12475
|
+
...receipt.recheckAt ? { recheckAt: receipt.recheckAt } : {},
|
|
12476
|
+
...citeOf(receipt)
|
|
12199
12477
|
};
|
|
12200
12478
|
};
|
|
12201
12479
|
const settled = (d) => d.state === "closed" || d.answers.length > 0 || d.entries.some((e) => e.kind === "contribution" && !entryUnit(e));
|
|
@@ -12440,12 +12718,23 @@ var CATALOG = [
|
|
|
12440
12718
|
loginHint: "Install and set up Antigravity (`agy`).",
|
|
12441
12719
|
installCli: "curl -fsSL https://antigravity.dev/install.sh | bash",
|
|
12442
12720
|
models: ["gemini-1.5-pro", "gemini-1.5-flash", "gemini-2.0-pro-exp"]
|
|
12721
|
+
},
|
|
12722
|
+
{
|
|
12723
|
+
name: "grok",
|
|
12724
|
+
label: "Grok",
|
|
12725
|
+
cli: "grok",
|
|
12726
|
+
// `grok agent stdio` speaks ACP itself. A separate adapter would be a second binary
|
|
12727
|
+
// to miss, and detection would report adapter-missing on a machine that can already launch.
|
|
12728
|
+
authProbe: ["sh", "-c", 'test -s "$HOME/.grok/auth.json"'],
|
|
12729
|
+
loginHint: "Run `grok` once in a terminal and sign in.",
|
|
12730
|
+
installCli: "curl -fsSL https://x.ai/cli/install.sh | bash"
|
|
12443
12731
|
}
|
|
12444
12732
|
];
|
|
12445
12733
|
function probeDirs(home = homedir3()) {
|
|
12446
12734
|
return [
|
|
12447
12735
|
dirname(process.execPath),
|
|
12448
12736
|
join4(home, ".local", "bin"),
|
|
12737
|
+
join4(home, ".grok", "bin"),
|
|
12449
12738
|
"/usr/local/bin",
|
|
12450
12739
|
"/opt/homebrew/bin",
|
|
12451
12740
|
join4(home, ".npm-global", "bin")
|
|
@@ -13809,7 +14098,7 @@ var OptionInputSchema2 = external_exports.object({
|
|
|
13809
14098
|
imgUrl: OptionSchema2.shape.image
|
|
13810
14099
|
}).strict();
|
|
13811
14100
|
var NIGHT2 = { from: 23, to: 7 };
|
|
13812
|
-
var ASK_MAX2 =
|
|
14101
|
+
var ASK_MAX2 = 80;
|
|
13813
14102
|
var UNITS_MAX2 = 12;
|
|
13814
14103
|
var UNIT_TITLE_MAX2 = 50;
|
|
13815
14104
|
var UNIT_BODY_MAX2 = 200;
|
|
@@ -13858,10 +14147,22 @@ function capRefusals2(text, units22, field) {
|
|
|
13858
14147
|
function refuseOverCaps2(text, units22, field, ctx) {
|
|
13859
14148
|
for (const { path, message, ...params } of capRefusals2(text, units22, field)) ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path, message, params });
|
|
13860
14149
|
}
|
|
14150
|
+
var SHIPPED2 = ["phone", "calls", "server", "store", "agents"];
|
|
14151
|
+
var CAUSES_MAX2 = 10;
|
|
14152
|
+
var shipped2 = external_exports.enum(SHIPPED2, {
|
|
14153
|
+
errorMap: () => ({ message: `shipped_unknown: one of ${SHIPPED2.join(", ")}.` })
|
|
14154
|
+
}).optional().describe(
|
|
14155
|
+
"Only when this reports a result that LANDED somewhere the person can see it: phone (an app update reached their phone), calls (the voice bot), server, store (the App Store) or agents (the MCP or SDK). Leave it out for work in progress."
|
|
14156
|
+
);
|
|
14157
|
+
var causedBy2 = external_exports.array(
|
|
14158
|
+
external_exports.string().trim().regex(/^[0-9a-fA-F-]{8,36}$/, "cause_not_found: an Entry id, or the short id get_goals prints for the person's words.")
|
|
14159
|
+
).min(1).max(CAUSES_MAX2, `too_many_causes: at most ${CAUSES_MAX2}.`).optional().describe(
|
|
14160
|
+
`The person's own words this acts on: the ids (or the short ids get_goals prints) of their answers or notes that led to it, at most ${CAUSES_MAX2}. Their app shows each result under the words that caused it, so name every one this follows from. An id that is not their words is refused by name (cause_not_found, cause_ambiguous) and nothing is written.`
|
|
14161
|
+
);
|
|
13861
14162
|
var COMPLETION_MESSAGE_MAX2 = 50;
|
|
13862
14163
|
var CompletionSchema2 = external_exports.object({
|
|
13863
14164
|
goalId: external_exports.string().uuid().describe("The existing Goal to complete."),
|
|
13864
|
-
message: external_exports.string().trim().min(1).max(COMPLETION_MESSAGE_MAX2, "completion_message_too_long: at most 50 characters; put detail in units.").describe("Completion headline, at most 50 characters."),
|
|
14165
|
+
message: external_exports.string().trim().min(1).max(COMPLETION_MESSAGE_MAX2, "completion_message_too_long: at most 50 characters; put detail in units.").describe("Completion headline, at most 50 characters: the one thing that would go wrong or stay unclear later if they missed it."),
|
|
13865
14166
|
units: external_exports.array(UnitInputSchema2.extend({
|
|
13866
14167
|
title: external_exports.string().trim().min(1).max(UNIT_TITLE_MAX2),
|
|
13867
14168
|
body: external_exports.string().trim().min(1).max(UNIT_BODY_MAX2)
|
|
@@ -13870,19 +14171,21 @@ var CompletionSchema2 = external_exports.object({
|
|
|
13870
14171
|
options: external_exports.array(external_exports.object({
|
|
13871
14172
|
label: external_exports.string().trim().min(1).max(OPTION_LABEL_MAX2),
|
|
13872
14173
|
hint: external_exports.string().trim().min(1).max(OPTION_HINT_MAX2)
|
|
13873
|
-
}).strict()).max(5).optional().describe("Optional next steps the person may initiate: label (50 characters) and consequence in hint (200). Selecting one acknowledges the report and requests that step from its author; it never reopens this Goal.")
|
|
14174
|
+
}).strict()).max(5).optional().describe("Optional next steps the person may initiate: label (50 characters) and consequence in hint (200). Selecting one acknowledges the report and requests that step from its author; it never reopens this Goal."),
|
|
14175
|
+
causedBy: causedBy2,
|
|
14176
|
+
shipped: shipped2
|
|
13874
14177
|
}).strict();
|
|
13875
|
-
var CompleteChangeSchema2 = CompletionSchema2.extend({ kind: external_exports.literal("complete") });
|
|
14178
|
+
var CompleteChangeSchema2 = CompletionSchema2.omit({ causedBy: true, shipped: true }).extend({ kind: external_exports.literal("complete") });
|
|
13876
14179
|
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.
|
|
14180
|
+
1. One question per object in \`questions\`, so each is answered on its own.
|
|
14181
|
+
2. \`goalId\` names the existing Goal it is about (create one with manage_goals first); the answer comes back there.
|
|
14182
|
+
3. \`workItBlocks\` only when you are truly blocked: it asks for a call.
|
|
14183
|
+
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.
|
|
14184
|
+
5. One question, one row: never re-send one still waiting; take back one that no longer matters with \`withdrawQuestionIds\`.
|
|
14185
|
+
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.
|
|
14186
|
+
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.
|
|
14187
|
+
8. A diagnosis says when, why and how it happens, then proposes one fix.
|
|
14188
|
+
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
14189
|
function draft20202(node) {
|
|
13887
14190
|
if (Array.isArray(node)) return node.map(draft20202);
|
|
13888
14191
|
if (node && typeof node === "object") {
|
|
@@ -13925,12 +14228,55 @@ var userExplicitlyRequested2 = external_exports.enum(["any", "call"]).optional()
|
|
|
13925
14228
|
`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
14229
|
);
|
|
13927
14230
|
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.`
|
|
14231
|
+
`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: context they may open, never something they must hear. 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
14232
|
);
|
|
14233
|
+
var KIND_IDS2 = { "handing": "none", "replaced-by": "goal", "blocked-by": "node", "asking": "none", "found": "none" };
|
|
14234
|
+
var KIND_GRAMMAR2 = "handing, replaced-by <goalId>, blocked-by <goalId|questionId>, asking, found";
|
|
14235
|
+
var uuid2 = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;
|
|
14236
|
+
var handle2 = /^[0-9a-fA-F-]{8,36}$/;
|
|
14237
|
+
function refuseKind2(u, ctx) {
|
|
14238
|
+
if (!u.kind) return;
|
|
14239
|
+
const refuse = (refusal, kind, message) => ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["kind"], params: { refusal, kind }, message });
|
|
14240
|
+
const [name, ...rest] = u.kind.trim().split(/\s+/);
|
|
14241
|
+
const shape = KIND_IDS2[name];
|
|
14242
|
+
if (!shape) {
|
|
14243
|
+
refuse("kind_unknown", name, `kind_unknown: "${name}" is not a kind. One of: ${KIND_GRAMMAR2}.`);
|
|
14244
|
+
return;
|
|
14245
|
+
}
|
|
14246
|
+
const id22 = rest.join(" ");
|
|
14247
|
+
if (shape === "none" && id22) {
|
|
14248
|
+
refuse("kind_takes_no_id", name, `kind_takes_no_id: "${name}" is the whole kind, so drop the "${id22}" after it.`);
|
|
14249
|
+
}
|
|
14250
|
+
if (shape !== "none" && !(shape === "goal" ? uuid2.test(id22) : handle2.test(id22))) {
|
|
14251
|
+
refuse("kind_needs_id", name, shape === "goal" ? `kind_needs_id: "${name}" names the Goal it is about, as "${name} <goalId>".` : `kind_needs_id: "${name}" names the Goal or Question it is about, as "${name} <goalId|questionId>".`);
|
|
14252
|
+
}
|
|
14253
|
+
if (name === "asking") {
|
|
14254
|
+
refuse("kind_is_a_question", name, 'kind_is_a_question: "asking" owes them an answer, so send it in `questions`, where it opens one.');
|
|
14255
|
+
}
|
|
14256
|
+
if (u.userExplicitlyRequested) {
|
|
14257
|
+
refuse("kind_not_for_the_person", name, `kind_not_for_the_person: "${name}" is written for the other agents on the Goal, and userExplicitlyRequested delivers these words to the person. Split it: one message for them, one for the agent.`);
|
|
14258
|
+
}
|
|
14259
|
+
}
|
|
13930
14260
|
var UpdateInputSchema2 = external_exports.object({
|
|
13931
|
-
|
|
14261
|
+
// ONE LOAD-BEARING POINT PER REPORT (owner, 2026-10-27 14:10 on call, Goal 1b1750e9, settling
|
|
14262
|
+
// #3633's pacing: "one point at a time is better, but make sure that it's [load-]bearing ... if
|
|
14263
|
+
// there is a lot of key points that I need to be aware of ... meaning something bad would happen
|
|
14264
|
+
// if I didn't know them or I wouldn't be able to understand something in the future ... They
|
|
14265
|
+
// should go separately. Basically, it should be like one load-bearing thing per report").
|
|
14266
|
+
//
|
|
14267
|
+
// The call's half of that ruling shipped in #3771: the talker settles an item only once the
|
|
14268
|
+
// transcript shows he heard its load-bearing point. This is the author's half, and without it the
|
|
14269
|
+
// talker has to guess which of a report's parts was load-bearing. Measured 2026-11-01 on prod:
|
|
14270
|
+
// 458 of 866 reports in 21 days carried two or more units, and since the pacing shipped on 10-23
|
|
14271
|
+
// only 18 of 72 units that reached a call were ever said -- so a point written as a unit has about
|
|
14272
|
+
// a one-in-four chance of being heard, and one ok after the headline settles the whole report.
|
|
14273
|
+
// Hence the wording, not a `mustHear` flag (the-heard-record.md P3): he asked for less mechanism
|
|
14274
|
+
// and more judgment from the agent, so a point he must not miss is simply its own report.
|
|
14275
|
+
message: external_exports.string().trim().min(1).describe(`The one point, at most ${ASK_MAX2} characters: the one thing that would go wrong or stay unclear later if they missed it, said as what changed for them, in their words ("The screen reader speaks Spanish too", not "Merged #3896"). A second point like that is its own update; the rest goes in units.`),
|
|
13932
14276
|
goalIds: external_exports.array(external_exports.string().uuid()).min(1).max(10).describe("The Goals it is about, each one that exists: the one it is mainly about first."),
|
|
13933
14277
|
units: units2,
|
|
14278
|
+
causedBy: causedBy2,
|
|
14279
|
+
shipped: shipped2,
|
|
13934
14280
|
// A REPORT KEEPS ITS TAP (#2799, #3260; owner, 2026-10-08, settling #2776: "keep the reports open
|
|
13935
14281
|
// until the user acknowledges them"). A report asks nothing, so it opens no Question -- but it
|
|
13936
14282
|
// still waits to be acknowledged, and it carries the ONE tap that closes it. Never a decision: the
|
|
@@ -13954,6 +14300,12 @@ var UpdateInputSchema2 = external_exports.object({
|
|
|
13954
14300
|
reply: external_exports.string().trim().min(1).describe(
|
|
13955
14301
|
`What this report's button says instead of "Got it", at most ${OPTION_LABEL_MAX2} characters, written in THEIR voice for THIS report ("Sounds good, I'll test later") -- the care you give a question's options, so what they tap tells you whether they verified your work or only received it. One tap sends exactly these words back to you. Words that would CHANGE what happens next are a question, not a reply to a report: it still asks nothing and still owes you no answer. The reply is required for requested delivery and completed Goals; ordinary progress may omit it.`
|
|
13956
14302
|
).optional(),
|
|
14303
|
+
// THE KIND, WHICH WAS THE FIRST LINE OF THE MESSAGE UNTIL NOW (`KIND_IDS` above). Optional on
|
|
14304
|
+
// purpose: every agent writing updates today sends none, and a door that refused them would turn a
|
|
14305
|
+
// convention nobody was obliged to follow into a 400 on live traffic.
|
|
14306
|
+
kind: external_exports.string().trim().min(1).optional().describe(
|
|
14307
|
+
`What an agent writing on ANOTHER agent's Goal expects of its reader, as one token: ${KIND_GRAMMAR2}. \`handing\` the work is yours now, nothing is asked; \`replaced-by <goalId>\` this Goal is dead and that one carries its work; \`blocked-by <goalId|questionId>\` I cannot go on until that moves, no action unless you own it; \`found\` evidence on your Goal, nothing is asked and nothing has changed. \`asking\` is a question, so it belongs in \`questions\`, not here. It is written for the other agents on the Goal, never the person, so it does not go with userExplicitlyRequested; leave it out for your own progress. Refused by name (kind_unknown, kind_needs_id, kind_takes_no_id, kind_is_a_question, kind_not_for_the_person).`
|
|
14308
|
+
),
|
|
13957
14309
|
userExplicitlyRequested: userExplicitlyRequested2
|
|
13958
14310
|
}).strict().superRefine((u, ctx) => {
|
|
13959
14311
|
if (u.userExplicitlyRequested && !u.reply) {
|
|
@@ -13965,6 +14317,7 @@ var UpdateInputSchema2 = external_exports.object({
|
|
|
13965
14317
|
});
|
|
13966
14318
|
}
|
|
13967
14319
|
refuseOverCaps2(u.message, u.units, "message", ctx);
|
|
14320
|
+
refuseKind2(u, ctx);
|
|
13968
14321
|
if (u.reply && u.reply.length > OPTION_LABEL_MAX2) {
|
|
13969
14322
|
ctx.addIssue({
|
|
13970
14323
|
code: external_exports.ZodIssueCode.custom,
|
|
@@ -13980,11 +14333,11 @@ var questionFields2 = {
|
|
|
13980
14333
|
),
|
|
13981
14334
|
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
14335
|
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."),
|
|
14336
|
+
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
14337
|
// HOW THE OPTIONS ARE ANSWERED, SAID BY THE AGENT (owner, 2026-10-02: "one and many makes sense";
|
|
13985
14338
|
// brain_prompts.md §1: structured agent questions need no model). The app draws all three.
|
|
13986
14339
|
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.'
|
|
14340
|
+
'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
14341
|
),
|
|
13989
14342
|
// WHAT THE QUESTION HOLDS UP (brain_prompts.md §2.1): replaces `waiting: 'hard'`. A question that
|
|
13990
14343
|
// blocks work asks for a call (the person's settings and ring cooldowns still decide).
|
|
@@ -13996,11 +14349,39 @@ var questionFields2 = {
|
|
|
13996
14349
|
var refineQuestion2 = (q, ctx) => {
|
|
13997
14350
|
refuseOverCaps2(q.question, q.units, "question", ctx);
|
|
13998
14351
|
if (q.pickMode && !q.options) ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["pickMode"], message: "pickMode comes only with options" });
|
|
14352
|
+
refuseThinOptions2(q, ctx);
|
|
13999
14353
|
const ids = (q.options ?? []).map((o) => o.id);
|
|
14000
14354
|
if (ids.some((id22) => id22) && (ids.some((id22) => !id22) || new Set(ids).size !== ids.length)) {
|
|
14001
14355
|
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["options"], message: "give every option a distinct id, or none" });
|
|
14002
14356
|
}
|
|
14003
14357
|
};
|
|
14358
|
+
var MIN_LIST_OPTIONS2 = 2;
|
|
14359
|
+
function refuseThinOptions2(q, ctx) {
|
|
14360
|
+
const options = q.options ?? [];
|
|
14361
|
+
if ((q.pickMode === "many" || q.pickMode === "rank") && options.length < MIN_LIST_OPTIONS2) {
|
|
14362
|
+
ctx.addIssue({
|
|
14363
|
+
code: external_exports.ZodIssueCode.custom,
|
|
14364
|
+
path: ["options"],
|
|
14365
|
+
params: { refusal: "too_few_options", length: options.length, min: MIN_LIST_OPTIONS2 },
|
|
14366
|
+
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.`
|
|
14367
|
+
});
|
|
14368
|
+
}
|
|
14369
|
+
const seen = /* @__PURE__ */ new Map();
|
|
14370
|
+
options.forEach((o, index) => {
|
|
14371
|
+
const key22 = o.label.trim().toLowerCase();
|
|
14372
|
+
const first = seen.get(key22);
|
|
14373
|
+
if (first === void 0) {
|
|
14374
|
+
seen.set(key22, index);
|
|
14375
|
+
return;
|
|
14376
|
+
}
|
|
14377
|
+
ctx.addIssue({
|
|
14378
|
+
code: external_exports.ZodIssueCode.custom,
|
|
14379
|
+
path: ["options", index, "label"],
|
|
14380
|
+
params: { refusal: "duplicate_option_label", index, first },
|
|
14381
|
+
message: `duplicate_option_label: options[${index}] repeats the label of options[${first}]. Each option names a different choice.`
|
|
14382
|
+
});
|
|
14383
|
+
});
|
|
14384
|
+
}
|
|
14004
14385
|
var QuestionInputSchema2 = external_exports.object({
|
|
14005
14386
|
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
14387
|
...questionFields2
|
|
@@ -14022,21 +14403,26 @@ var QuestionDependencySchema2 = external_exports.object({
|
|
|
14022
14403
|
reason: reason2.optional()
|
|
14023
14404
|
}).strict().refine(actionFits2, ACTION_FITS2);
|
|
14024
14405
|
var sendFields2 = {
|
|
14025
|
-
completions: external_exports.array(CompletionSchema2).min(1).max(20).optional().describe(
|
|
14406
|
+
completions: external_exports.array(CompletionSchema2).min(1).max(20).optional().describe(
|
|
14407
|
+
"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."
|
|
14408
|
+
),
|
|
14026
14409
|
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
|
|
14410
|
+
"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, with its `kind`.\n\nONE LOAD-BEARING POINT PER REPORT: the message is the point they must not miss; a second point that would go wrong or stay unclear later if they missed it is its own update, never a unit."
|
|
14028
14411
|
),
|
|
14029
14412
|
answers: external_exports.array(AnswerInputSchema2).min(1).max(20).optional().describe("Answers to Questions addressed to you."),
|
|
14030
14413
|
withdrawQuestionIds: external_exports.array(questionHandle2).min(1).max(10).optional().describe(
|
|
14031
14414
|
"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
14415
|
),
|
|
14416
|
+
bumpQuestionIds: external_exports.array(questionHandle2).min(1).max(10).optional().describe(
|
|
14417
|
+
"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."
|
|
14418
|
+
),
|
|
14033
14419
|
questionDependencies: external_exports.array(QuestionDependencySchema2).min(1).max(20).optional().describe(
|
|
14034
14420
|
"Add or remove what a Question you asked holds up, after asking it."
|
|
14035
14421
|
)
|
|
14036
14422
|
};
|
|
14037
14423
|
var ContactSchema2 = external_exports.object({
|
|
14038
14424
|
...sendFields2,
|
|
14039
|
-
questions: external_exports.array(QuestionInputSchema2).min(1).max(20).optional().describe("Questions for the person, one per object."),
|
|
14425
|
+
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
14426
|
/** RECEIVING (2I, I2; brain_prompts.md §2.2): the events this agent handled. */
|
|
14041
14427
|
ackEventIds: external_exports.array(external_exports.string().uuid()).min(1).max(100).optional().describe(
|
|
14042
14428
|
"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 +14431,34 @@ var ContactSchema2 = external_exports.object({
|
|
|
14045
14431
|
"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
14432
|
)
|
|
14047
14433
|
}).strict();
|
|
14048
|
-
var sendsAnything2 = (c) => !!(c.completions?.length || c.updates?.length || c.questions?.length || c.answers?.length || c.withdrawQuestionIds?.length || c.questionDependencies?.length);
|
|
14434
|
+
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
14435
|
var ContactWireSchema2 = external_exports.object({
|
|
14050
14436
|
operationId: external_exports.string().uuid(),
|
|
14051
14437
|
...sendFields2,
|
|
14052
14438
|
questions: external_exports.array(QuestionWireSchema2).min(1).max(20).optional()
|
|
14053
14439
|
}).strict().refine(sendsAnything2, "a contact sends at least one update, question, answer, withdrawal or question dependency");
|
|
14054
14440
|
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
|
|
14441
|
+
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 + `
|
|
14056
14442
|
|
|
14057
|
-
|
|
14443
|
+
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.
|
|
14058
14444
|
|
|
14059
|
-
UPDATES ask nothing
|
|
14445
|
+
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.
|
|
14060
14446
|
|
|
14061
|
-
|
|
14062
|
-
|
|
14063
|
-
|
|
14447
|
+
RECEIVING: contact({}) waits ~45 s; contact({wait:false}) returns \`events\` at once. Confirm the ones you handled with contact({ackEventIds}).`;
|
|
14448
|
+
var HELP_TOPICS2 = ["pairing", "listening", "receiving", "asking", "updates", "goals", "calls"];
|
|
14449
|
+
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.`;
|
|
14450
|
+
var HelpSchema2 = external_exports.object({
|
|
14451
|
+
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.")
|
|
14452
|
+
}).strict();
|
|
14453
|
+
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.";
|
|
14454
|
+
var AGENT_PROMPTS2 = [
|
|
14455
|
+
{
|
|
14456
|
+
name: "help",
|
|
14457
|
+
description: "How to use Paigy: the whole guide, or one topic of it.",
|
|
14458
|
+
arguments: [{ name: "topic", description: `One section: ${HELP_TOPICS2.join(", ")}. Omit it for the whole guide.`, required: false }]
|
|
14459
|
+
},
|
|
14460
|
+
{ name: "welcome", description: "Start here: who you are on Paigy, then listen and collect your open work." }
|
|
14461
|
+
];
|
|
14064
14462
|
var CreateGoalSchema2 = external_exports.object({
|
|
14065
14463
|
outcome: external_exports.string().trim().min(1).max(1e4),
|
|
14066
14464
|
/** The work's NAME (#2115) — one to five words, how a person refers to it out loud ("the night
|
|
@@ -14161,9 +14559,12 @@ var GetGoalsSchema2 = external_exports.object({
|
|
|
14161
14559
|
history: external_exports.boolean().optional()
|
|
14162
14560
|
}).strict();
|
|
14163
14561
|
var GetDeliverySchema2 = external_exports.object({
|
|
14164
|
-
deliveryId: external_exports.string().uuid().describe("The Delivery id returned by contact or receive.")
|
|
14562
|
+
deliveryId: external_exports.string().uuid().describe("The Delivery id returned by contact or receive."),
|
|
14563
|
+
// WHAT WAS SAID ON A CALL (owner, 2026-10-26, Goal c743f4a4: "A flag on get_delivery", "Any of my agents").
|
|
14564
|
+
transcript: external_exports.boolean().optional().describe("For a Call: also return what was said on it, one page of spoken lines."),
|
|
14565
|
+
after: external_exports.string().max(40).optional().describe("With transcript: the next value the previous page returned, to read the next page.")
|
|
14165
14566
|
}).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.";
|
|
14567
|
+
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
14568
|
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
14569
|
var SearchToolSchema2 = external_exports.object({
|
|
14169
14570
|
query: external_exports.string().trim().min(1).max(500),
|
|
@@ -14172,6 +14573,8 @@ var SearchToolSchema2 = external_exports.object({
|
|
|
14172
14573
|
limit: external_exports.number().int().min(1).max(20).optional()
|
|
14173
14574
|
}).strict();
|
|
14174
14575
|
var SEARCH_DESCRIPTION2 = "Search your person's history across all of their agents: Entries (what anyone said or wrote, typed or spoken on a call), Goals (by title and outcome) and replies -- the person's answers, acknowledgements and deferrals (type answer; found by their summary, by the question or report they reply to, or by the words that gave them). query is words to look for; records sharing more of its words rank first, and exact names work. types narrows it to entry, goal and/or answer (default: all three). goalId searches under one Goal: its Entries, the replies to its items, and it and its immediate children. limit is matches per type, 1 to 20 (default 8). Read-only. Each match carries its whole saved words, its ID and its links (a reply carries its kind -- answered, acknowledged or deferred -- whether it is closed (a deferral is not), its summary in under ten words, its question or report, the choice made and the Entries that support it); `omitted` counts what matched but was left out, so narrow the words or add a goalId to see it. Nothing found is not proof that nothing exists; a refused search says why. Sealed (encrypted) content is never searched or returned.";
|
|
14576
|
+
var READS2 = { readOnlyHint: true, destructiveHint: false, openWorldHint: false };
|
|
14577
|
+
var SENDS2 = { readOnlyHint: false, destructiveHint: true, openWorldHint: false };
|
|
14175
14578
|
var ConfigureIdentitySchema2 = external_exports.object({}).strict();
|
|
14176
14579
|
var CONFIGURE_IDENTITY_DESCRIPTION2 = "Read this authenticated agent\u2019s current name, voice and token ID. Read-only; no arguments. Pairing, renaming and logout are available only through the local configure driver.";
|
|
14177
14580
|
var CheckActivitySchema2 = external_exports.object({}).strict();
|
|
@@ -14183,14 +14586,16 @@ var SendFeedbackSchema2 = external_exports.object({
|
|
|
14183
14586
|
}).strict();
|
|
14184
14587
|
var SEND_FEEDBACK_DESCRIPTION2 = "Send feedback about Paigy itself (a bug report, an idea) straight to the Paigy team. Send it only when the person asked you to, or agreed when you offered: it goes to Paigy, never to the person, and nobody answers it here. Not for your work or a question for the person: use contact for those. Returns whether it was stored.";
|
|
14185
14588
|
var AGENT_TOOLS2 = [
|
|
14186
|
-
{ name: "configure", description: CONFIGURE_IDENTITY_DESCRIPTION2, inputSchema: mcpInputSchema2(ConfigureIdentitySchema2) },
|
|
14187
|
-
{ name: "contact", description: CONTACT_DESCRIPTION2, inputSchema: CONTACT_SCHEMA2 },
|
|
14188
|
-
{ name: "manage_goals", description: MANAGE_GOALS_DESCRIPTION2, inputSchema: mcpInputSchema2(ManageGoalsToolSchema2) },
|
|
14189
|
-
{ name: "get_delivery", description: GET_DELIVERY_DESCRIPTION2, inputSchema: mcpInputSchema2(GetDeliverySchema2) },
|
|
14190
|
-
{ name: "get_goals", description: GET_GOALS_DESCRIPTION2, inputSchema: mcpInputSchema2(GetGoalsSchema2) },
|
|
14191
|
-
{ name: "search", description: SEARCH_DESCRIPTION2, inputSchema: mcpInputSchema2(SearchToolSchema2) },
|
|
14192
|
-
{ 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) }
|
|
14589
|
+
{ name: "configure", title: "Who am I", annotations: READS2, description: CONFIGURE_IDENTITY_DESCRIPTION2, inputSchema: mcpInputSchema2(ConfigureIdentitySchema2) },
|
|
14590
|
+
{ name: "contact", title: "Contact the person", annotations: SENDS2, description: CONTACT_DESCRIPTION2, inputSchema: CONTACT_SCHEMA2 },
|
|
14591
|
+
{ name: "manage_goals", title: "Manage Goals", annotations: SENDS2, description: MANAGE_GOALS_DESCRIPTION2, inputSchema: mcpInputSchema2(ManageGoalsToolSchema2) },
|
|
14592
|
+
{ name: "get_delivery", title: "Read a delivery", annotations: READS2, description: GET_DELIVERY_DESCRIPTION2, inputSchema: mcpInputSchema2(GetDeliverySchema2) },
|
|
14593
|
+
{ name: "get_goals", title: "Read Goals", annotations: READS2, description: GET_GOALS_DESCRIPTION2, inputSchema: mcpInputSchema2(GetGoalsSchema2) },
|
|
14594
|
+
{ name: "search", title: "Search history", annotations: READS2, description: SEARCH_DESCRIPTION2, inputSchema: mcpInputSchema2(SearchToolSchema2) },
|
|
14595
|
+
{ name: "check_activity", title: "Recent agent activity", annotations: READS2, 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) },
|
|
14596
|
+
{ name: "send_feedback", title: "Send feedback to Paigy", annotations: SENDS2, description: SEND_FEEDBACK_DESCRIPTION2, inputSchema: mcpInputSchema2(SendFeedbackSchema2) },
|
|
14597
|
+
// THE GUIDE FROM INSIDE THE MCP (owner, 2026-10-27): the skill's text, needing no identity (`help.ts`).
|
|
14598
|
+
{ name: "help", title: "Paigy guide", annotations: READS2, description: HELP_DESCRIPTION2, inputSchema: mcpInputSchema2(HelpSchema2) }
|
|
14194
14599
|
];
|
|
14195
14600
|
var AGENT_TOOL_NAMES2 = AGENT_TOOLS2.map((t) => t.name);
|
|
14196
14601
|
var id2 = external_exports.string().uuid();
|
|
@@ -14278,11 +14683,22 @@ var BrainMessageSchema2 = external_exports.union([
|
|
|
14278
14683
|
// A MESSAGE TO THE PERSON KEEPS ITS SENTENCES (turns.md): the talker writes them one by one, and each is
|
|
14279
14684
|
// its own unit of speech (`<cycle>:<key>:<n>`). `text` is the same words joined, for every reader of a
|
|
14280
14685
|
// message's words. Absent on results written before sentences.
|
|
14281
|
-
external_exports.object({
|
|
14686
|
+
external_exports.object({
|
|
14687
|
+
...messageBase2,
|
|
14688
|
+
to: external_exports.object({ kind: external_exports.literal("user") }).strict(),
|
|
14689
|
+
sentences: external_exports.array(external_exports.string().min(1)).min(1).optional(),
|
|
14690
|
+
// THE REPORTS IT TELLS, BY THEIR OWN IDENTITY (call 9d1c096c, 2026-10-15): the talker's message names the report
|
|
14691
|
+
// Entries it speaks of, so the plan's line names that report rather than re-finding it by its Goal. Absent on
|
|
14692
|
+
// results written before it.
|
|
14693
|
+
tells: external_exports.array(external_exports.object({ id: id2 }).strict()).optional()
|
|
14694
|
+
}).strict(),
|
|
14282
14695
|
external_exports.object({
|
|
14283
14696
|
...messageBase2,
|
|
14284
14697
|
to: external_exports.object({ kind: external_exports.literal("agent"), agentId: external_exports.string().regex(/^agent:(?!paigy$)\S+$/) }).strict(),
|
|
14285
14698
|
call: external_exports.object({ callId: id2, listen: external_exports.literal(true) }).strict().optional(),
|
|
14699
|
+
// WHAT IT ASKS THE AGENT, IN UNDER TEN WORDS (owner, 2026-10-15: "Yes, add the summary"): the talker's own, stored
|
|
14700
|
+
// as the sent Entry's summary, which the recap's "Sent to <agent>: …" row shows. Absent on results written before it.
|
|
14701
|
+
summary: external_exports.string().optional(),
|
|
14286
14702
|
// THE PERSON ASKED TO BE CALLED BACK ONCE THIS AGENT'S WORK IS DONE (turns.md, step 0): the agent owes
|
|
14287
14703
|
// the call, and its next contact about it rings them (`public.callbacks`).
|
|
14288
14704
|
callback: external_exports.literal(true).optional()
|
|
@@ -14309,95 +14725,98 @@ var BrainResultSchema2 = external_exports.object({
|
|
|
14309
14725
|
next: BrainNextSchema2,
|
|
14310
14726
|
search: BrainSearchSchema2.optional()
|
|
14311
14727
|
}).strict();
|
|
14312
|
-
var
|
|
14728
|
+
var str22 = external_exports.string();
|
|
14313
14729
|
var strs4 = external_exports.array(external_exports.string());
|
|
14314
14730
|
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:
|
|
14731
|
+
next: external_exports.object({ say: strs4, then: external_exports.enum(["listen", "hold", "end", "none"]), waitFor: strs4, reason: str22, instructions: strs4 }).strict(),
|
|
14732
|
+
messages: external_exports.array(external_exports.object({ key: str22, to: str22, text: str22, about: strs4, entries: strs4, owed: strs4, inviteToCall: external_exports.boolean() }).strict()),
|
|
14733
|
+
entries: external_exports.array(external_exports.object({ key: str22, from: str22, on: strs4 }).strict()),
|
|
14734
|
+
answers: external_exports.array(external_exports.object({ question: str22, entries: strs4, summary: str22, picked: strs4 }).strict()),
|
|
14319
14735
|
changes: external_exports.array(external_exports.object({
|
|
14320
|
-
key:
|
|
14736
|
+
key: str22,
|
|
14321
14737
|
what: external_exports.enum(["goal", "question", "lesson"]),
|
|
14322
14738
|
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:
|
|
14739
|
+
id: str22,
|
|
14740
|
+
text: str22,
|
|
14741
|
+
title: str22,
|
|
14742
|
+
who: str22,
|
|
14743
|
+
under: str22,
|
|
14328
14744
|
gate: external_exports.enum(["start", "complete", "answer", "none"]),
|
|
14329
|
-
options: external_exports.array(external_exports.object({ id:
|
|
14745
|
+
options: external_exports.array(external_exports.object({ id: str22, label: str22 }).strict()),
|
|
14330
14746
|
pick: external_exports.enum(["one", "many", "rank", "words"]),
|
|
14331
14747
|
entries: strs4
|
|
14332
14748
|
}).strict()),
|
|
14333
14749
|
feedback: external_exports.array(strs4),
|
|
14334
|
-
search: external_exports.object({ query:
|
|
14750
|
+
search: external_exports.object({ query: str22, within: strs4, goal: str22 }).strict()
|
|
14335
14751
|
}).strict();
|
|
14336
14752
|
var COMPACT_RESULT_JSON_SCHEMA2 = (({ $schema: _, ...rest }) => rest)(
|
|
14337
14753
|
zodToJsonSchema2(CompactResultSchema2, { $refStrategy: "none" })
|
|
14338
14754
|
);
|
|
14339
|
-
var
|
|
14755
|
+
var str32 = external_exports.string();
|
|
14340
14756
|
var strs22 = external_exports.array(external_exports.string());
|
|
14341
14757
|
var TalkerReplySchema2 = external_exports.object({
|
|
14342
14758
|
/** What to say and send, messages to the person first: spoken in the order written. `to` is "user"
|
|
14343
14759
|
* 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); `
|
|
14760
|
+
* ([] to an agent); `text` is what a message to an agent says ("" to the person); `summary` is what it
|
|
14761
|
+
* asks the agent, in under ten words, as the person would put it ("" to the person; owner, 2026-10-15:
|
|
14762
|
+
* "Yes, add the summary"), which the recap's "Sent to <agent>: …" row shows; `about` names
|
|
14345
14763
|
* handles; `blocks` is the item a question to an agent must be answered before ("" for none);
|
|
14346
14764
|
* `callback` is true on a message to the agent doing work the person asked to be called back about
|
|
14347
14765
|
* 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:
|
|
14766
|
+
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
14767
|
/** What the call does next: listen, hold (the person asked for a moment) or end (they asked to). */
|
|
14350
14768
|
then: external_exports.enum(["listen", "hold", "end"]),
|
|
14351
14769
|
/** The person's replies to items (replies, owner 2026-10-07): the item's handle, the chosen option
|
|
14352
14770
|
* IDs, the line handles, how they replied in under ten words (keeping any condition), and `defer`:
|
|
14353
14771
|
* "" when their words settle the item, else what a reply that puts it off waits for -- "call" (the
|
|
14354
14772
|
* 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:
|
|
14773
|
+
replies: external_exports.array(external_exports.object({ item: str32, options: strs22, lines: strs22, summary: str32, defer: str32 }).strict()),
|
|
14356
14774
|
/** The line handles that tell the talker how to run this call; they last until it ends and reach no agent. */
|
|
14357
14775
|
instruction: strs22,
|
|
14358
14776
|
/** The line handles the filer acts on, and the only ones it reads (3e): new work, a change to existing
|
|
14359
14777
|
* work, feedback on Paigy, anything said to an agent, and any rule meant to outlast the call. */
|
|
14360
14778
|
file: strs22,
|
|
14361
14779
|
/** 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:
|
|
14780
|
+
need: external_exports.object({ kind: external_exports.enum(["search", "item", "agent", ""]), text: str32 }).strict(),
|
|
14363
14781
|
/** The handle of the item to explain ("" for none). */
|
|
14364
|
-
explain:
|
|
14782
|
+
explain: str32
|
|
14365
14783
|
}).strict();
|
|
14366
14784
|
var TALKER_REPLY_JSON_SCHEMA2 = (({ $schema: _, ...rest }) => rest)(
|
|
14367
14785
|
zodToJsonSchema2(TalkerReplySchema2, { $refStrategy: "none" })
|
|
14368
14786
|
);
|
|
14369
|
-
var
|
|
14787
|
+
var str42 = external_exports.string();
|
|
14370
14788
|
var strs32 = external_exports.array(external_exports.string());
|
|
14371
14789
|
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
|
-
|
|
14790
|
+
/** Which Goals each new line goes on: a line's handle, Goal handles (or keys of new Goals: a line that asks
|
|
14791
|
+
* for new work goes on the Goal it creates, owner 2026-10-26), and what the line says in at most twenty
|
|
14792
|
+
* words (owner, 2026-10-26: "bump it from 10 to 20 words"). */
|
|
14793
|
+
filed: external_exports.array(external_exports.object({ line: str42, goals: strs32, summary: str42 }).strict()),
|
|
14375
14794
|
goals: external_exports.array(external_exports.object({
|
|
14376
14795
|
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:
|
|
14796
|
+
key: str42,
|
|
14797
|
+
goal: str42,
|
|
14798
|
+
title: str42,
|
|
14799
|
+
outcome: str42,
|
|
14800
|
+
owner: str42,
|
|
14801
|
+
under: str42,
|
|
14802
|
+
until: str42,
|
|
14803
|
+
on: str42,
|
|
14385
14804
|
gate: external_exports.enum(["start", "complete", "answer", ""]),
|
|
14386
|
-
why:
|
|
14805
|
+
why: str42
|
|
14387
14806
|
}).strict()),
|
|
14388
14807
|
questions: external_exports.array(external_exports.object({
|
|
14389
14808
|
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:
|
|
14809
|
+
key: str42,
|
|
14810
|
+
question: str42,
|
|
14811
|
+
text: str42,
|
|
14812
|
+
summary: str42,
|
|
14813
|
+
to: str42,
|
|
14814
|
+
goal: str42,
|
|
14815
|
+
options: external_exports.array(external_exports.object({ id: str42, label: str42 }).strict()),
|
|
14397
14816
|
pick: external_exports.enum(["one", "many", "rank", "words", ""]),
|
|
14398
|
-
blocks:
|
|
14817
|
+
blocks: str42
|
|
14399
14818
|
}).strict()),
|
|
14400
|
-
lessons: external_exports.array(external_exports.object({ op: external_exports.enum(["remember", "revise", "withdraw"]), lesson:
|
|
14819
|
+
lessons: external_exports.array(external_exports.object({ op: external_exports.enum(["remember", "revise", "withdraw"]), lesson: str42, text: str42, scope: str42 }).strict()),
|
|
14401
14820
|
/** Line handles whose words comment on Paigy itself. */
|
|
14402
14821
|
feedback: strs32
|
|
14403
14822
|
}).strict();
|
|
@@ -14458,6 +14877,27 @@ var TidyReplySchema2 = external_exports.object({
|
|
|
14458
14877
|
var TIDY_REPLY_JSON_SCHEMA2 = (({ $schema: _, ...rest }) => rest)(
|
|
14459
14878
|
zodToJsonSchema2(TidyReplySchema2, { $refStrategy: "none" })
|
|
14460
14879
|
);
|
|
14880
|
+
var HandoutReplySchema2 = external_exports.object({
|
|
14881
|
+
assign: external_exports.array(external_exports.object({
|
|
14882
|
+
/** The Goal's handle (G). */
|
|
14883
|
+
goal: external_exports.string(),
|
|
14884
|
+
/** The agent's handle (A). */
|
|
14885
|
+
to: external_exports.string(),
|
|
14886
|
+
/** At most ten words, naming the Goal of theirs it is most like: the reason the hand-out records. */
|
|
14887
|
+
why: external_exports.string()
|
|
14888
|
+
}).strict()),
|
|
14889
|
+
/** The Goals no listed agent's work is even loosely like: Paigy starts a session for them (owner, 2026-10-24,
|
|
14890
|
+
* Goal 37603006, "One per family of related Goals"). */
|
|
14891
|
+
new: external_exports.array(external_exports.object({
|
|
14892
|
+
/** The Goal's handle (G). */
|
|
14893
|
+
goal: external_exports.string(),
|
|
14894
|
+
/** At most ten words: why nothing active fits it. */
|
|
14895
|
+
why: external_exports.string()
|
|
14896
|
+
}).strict())
|
|
14897
|
+
}).strict();
|
|
14898
|
+
var HANDOUT_REPLY_JSON_SCHEMA2 = (({ $schema: _, ...rest }) => rest)(
|
|
14899
|
+
zodToJsonSchema2(HandoutReplySchema2, { $refStrategy: "none" })
|
|
14900
|
+
);
|
|
14461
14901
|
function entryWords(entry) {
|
|
14462
14902
|
const content = entry.content;
|
|
14463
14903
|
if (content && "sealed" in content) return "";
|
|
@@ -14604,7 +15044,7 @@ var NotifyRequestFields2 = external_exports.object({
|
|
|
14604
15044
|
* derive agent-side before sealing, so the server only ever shapes plaintext). */
|
|
14605
15045
|
// 10k, not a sentence budget. What the human hears is bounded by the BROKER — it splits
|
|
14606
15046
|
// the ask into topics and gives each one at most three sentences and one question
|
|
14607
|
-
// (docs/
|
|
15047
|
+
// (docs/history/agenda-design.md) — not by a wire cap the agent has to pre-summarize under.
|
|
14608
15048
|
// Owner, 2026-07-28: "our actual limitation on how long something is to the user should
|
|
14609
15049
|
// come from the broker splitting and summarizing." The cap that remains is a size guard.
|
|
14610
15050
|
ask: external_exports.string().min(1).max(1e4).optional().describe(
|
|
@@ -14681,7 +15121,7 @@ var UserAnswerSchema2 = external_exports.discriminatedUnion("kind", [
|
|
|
14681
15121
|
external_exports.object({ kind: external_exports.literal("clarify"), chunks: external_exports.array(external_exports.string()).min(1) }),
|
|
14682
15122
|
external_exports.object({ kind: external_exports.literal("confirm"), approved: external_exports.boolean() }),
|
|
14683
15123
|
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/
|
|
15124
|
+
/** An auto-answer derived from the user's PAST decisions (docs/history/precedent-design.md §2):
|
|
14685
15125
|
* delivered through the same settle/await path as a human answer, carrying the judge's
|
|
14686
15126
|
* derivation and the precedent ids it grew from. Always paired with a visible trail
|
|
14687
15127
|
* card the user can reply to — the broker never overrides the user. */
|
|
@@ -14832,6 +15272,21 @@ var AgendaTurnSchema2 = external_exports.object({
|
|
|
14832
15272
|
* the phone (`asking`, so the agenda goes gold and its options show) without treating the line as a
|
|
14833
15273
|
* question turn — the talker owns re-asking and the waits, so `question` stays null. */
|
|
14834
15274
|
onTable: external_exports.boolean().optional(),
|
|
15275
|
+
/** THE CARRIED ITEM THIS LINE TELLS (Goal 2a1e50eb, owner 2026-10-14: "Build the whole design") — a
|
|
15276
|
+
* request the Call carries that asks NOTHING: a report, a progress note, another agent's waiting news.
|
|
15277
|
+
* Its request Entry id, so the phone can make that agenda row the current one while it is read
|
|
15278
|
+
* (`telling` on the `turn` topic, `docs/clients/app/walk/design.md` §11).
|
|
15279
|
+
*
|
|
15280
|
+
* A FIELD OF ITS OWN, NEVER `claimId`: the claim is the RETURN identity — answers route by it and the
|
|
15281
|
+
* record tags the line with it (`workId`) — and an answer must never route to an Entry that asks
|
|
15282
|
+
* nothing. Absent on a turn speaking for a question (`claimId` says that) and on one speaking for no
|
|
15283
|
+
* carried item at all (an opener, a sign-off, Paigy's own line). */
|
|
15284
|
+
telling: external_exports.string().optional(),
|
|
15285
|
+
/** PAIGY'S OWN LINE (owner, 2026-10-15; calls ed2cbdce, ad50ad25): a turn that speaks for no item -- an
|
|
15286
|
+
* opener, a sign-off, a reply about nothing an agent asked or told -- is recorded as Paigy's, not as the
|
|
15287
|
+
* agent that rang. Absent on every turn that speaks for an item (`agentId` names whose), and on plans
|
|
15288
|
+
* from before it: a bot that does not know it records the ringing agent, as before. */
|
|
15289
|
+
speaksFor: external_exports.literal("paigy").optional(),
|
|
14835
15290
|
select: SelectShapeSchema2.optional(),
|
|
14836
15291
|
options: external_exports.array(OptionSchema2.omit({ id: true })).optional(),
|
|
14837
15292
|
/* `pace` STOOD HERE (#826). A turn could carry seconds and the model chose them. The walk
|
|
@@ -14920,7 +15375,7 @@ var InboxItemSchema2 = external_exports.object({
|
|
|
14920
15375
|
questions: external_exports.array(CallQuestionSchema2).optional(),
|
|
14921
15376
|
/** The same call carrying order, including request Entries with no DecisionNeed as reports.
|
|
14922
15377
|
* 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(),
|
|
15378
|
+
callItems: external_exports.array(CallQuestionSchema2.extend({ state: external_exports.enum(["open", "answered", "report"]), acknowledged: external_exports.boolean().optional() })).optional(),
|
|
14924
15379
|
visuals: external_exports.array(VisualSchema2).optional(),
|
|
14925
15380
|
/** The connected agent's name (the single pairing name — user-typed, or the
|
|
14926
15381
|
* agent's suggestion, or a default silly name). */
|
|
@@ -14931,6 +15386,10 @@ var InboxItemSchema2 = external_exports.object({
|
|
|
14931
15386
|
branch: external_exports.string().optional(),
|
|
14932
15387
|
createdAt: external_exports.string().datetime(),
|
|
14933
15388
|
snoozedUntil: external_exports.string().datetime().optional(),
|
|
15389
|
+
/** A past card the person dismissed that Restore can take back (#2699): its newest close is their
|
|
15390
|
+
* dismissal, with what it withdrew recorded (`private.restore_delivery`). Absent on everything else —
|
|
15391
|
+
* a put-off, a card an ended Goal or a settled question closed, and every open card. */
|
|
15392
|
+
restorable: external_exports.boolean().optional(),
|
|
14934
15393
|
agentState: AgentStateSchema2.default("idle"),
|
|
14935
15394
|
/** Whose action the item is waiting on: "you" = an agent asked you (the default,
|
|
14936
15395
|
* every agent→user notification); "agent" = you sent a request and it's awaiting the
|
|
@@ -14940,11 +15399,6 @@ var InboxItemSchema2 = external_exports.object({
|
|
|
14940
15399
|
* the agent (provider-agnostic; set server-side). Absent = no hard error. Drives the inbox
|
|
14941
15400
|
* error badge + Retry. */
|
|
14942
15401
|
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
15402
|
clarifies: external_exports.string().optional(),
|
|
14949
15403
|
/** THIS CARD'S QUESTION IS ON A LIVE CALL (owner, 2026-09-24: "Mark it while the call is
|
|
14950
15404
|
* live"). Present only while an open Call Delivery carries the card's request Entry — read
|
|
@@ -14982,9 +15436,35 @@ var InboxItemSchema2 = external_exports.object({
|
|
|
14982
15436
|
"Labels for a select:'confirm' paige \u2014 'yesno' (Yes/No) or 'approve' (Approve/Deny). Ignored unless select is 'confirm'."
|
|
14983
15437
|
),
|
|
14984
15438
|
/** 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/
|
|
15439
|
+
* urgency (see the main README's "premier use case" + docs/history/notify-states.md). Drives the
|
|
14986
15440
|
* inbox's blocking badge and the extra confirm step before dismissing it. */
|
|
14987
15441
|
blocking: external_exports.boolean().default(false),
|
|
15442
|
+
/** WHAT FREED THIS QUESTION (owner, 2026-10-16, Goal 2383ef14: "we don't really show the question
|
|
15443
|
+
* at the top until the question it could reply to with is resolved. And then we show it again
|
|
15444
|
+
* with the context of the other thing that was resolved"; asked how it should carry that, "The
|
|
15445
|
+
* answer above it"). A question they answered with a question of their own waits for theirs
|
|
15446
|
+
* (`private.ask_back`) and drops out of the front while it waits; when it comes back, the card
|
|
15447
|
+
* draws their question and the answer it got ABOVE the ask, as one card. Absent on a question
|
|
15448
|
+
* nothing ever held back. */
|
|
15449
|
+
freedBy: external_exports.object({
|
|
15450
|
+
questionId: external_exports.string(),
|
|
15451
|
+
asked: external_exports.string(),
|
|
15452
|
+
answer: external_exports.string(),
|
|
15453
|
+
answeredAt: external_exports.string(),
|
|
15454
|
+
/** The answer in ten words, when the talker wrote one beside it. */
|
|
15455
|
+
summary: external_exports.string().optional()
|
|
15456
|
+
}).optional(),
|
|
15457
|
+
/** WHAT THIS CARD ANSWERS (owner, 2026-10-27, Goal 81b6a9d6: "this reads very clearly as an answer to
|
|
15458
|
+
* something I asked, but I don't see the question… To show the question near the top of the card").
|
|
15459
|
+
* An agent's card that is its answer to one of the person's own questions carries that question's
|
|
15460
|
+
* words, drawn above it as "You asked" (`public.questions_answered_by`, read beside the card read).
|
|
15461
|
+
* Absent on every card that answers nothing of theirs, and on a held question, which has `freedBy`. */
|
|
15462
|
+
answering: external_exports.object({ asked: external_exports.string() }).optional(),
|
|
15463
|
+
/** WHEN ITS AGENT LAST BUMPED THIS QUESTION (#2855, `contact`'s `bumpQuestionIds`): the agent asked
|
|
15464
|
+
* the person to notice it again, and For you puts it first, the latest bump on top
|
|
15465
|
+
* (`question/order.ts`). Absent on a question never bumped, and on every card from an API older
|
|
15466
|
+
* than the bump. */
|
|
15467
|
+
bumpedAt: external_exports.string().optional(),
|
|
14988
15468
|
/** The user's locked-in answer; present only for replied items (GET /api/replied/:id). */
|
|
14989
15469
|
answer: UserAnswerSchema2.optional(),
|
|
14990
15470
|
/** THE TARGET FACTS A CARD RENDERS (#1796 point 5, 2026-09-11): the Delivery it is a view of,
|
|
@@ -15011,7 +15491,7 @@ var InboxItemSchema2 = external_exports.object({
|
|
|
15011
15491
|
*
|
|
15012
15492
|
* THE PAYLOAD'S OWN HASH, NEVER A STAMP ON THE WORK — the same mechanism as `QueueItem.rev`
|
|
15013
15493
|
* (#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,
|
|
15494
|
+
* own moves (its Goal's state and name, whether a ring is
|
|
15015
15495
|
* live). Optional, so a fixture, the demo and the archive lens need not spell one, and a card
|
|
15016
15496
|
* with no rev is simply always re-sent. */
|
|
15017
15497
|
rev: external_exports.string().optional()
|
|
@@ -15046,6 +15526,7 @@ var MissedCallSchema2 = external_exports.enum([
|
|
|
15046
15526
|
]);
|
|
15047
15527
|
var clock2 = (h) => h === 0 ? "midnight" : h === 12 ? "noon" : h < 12 ? `${h} am` : `${h - 12} pm`;
|
|
15048
15528
|
var QUIET2 = ` Nothing rings from ${clock2(NIGHT2.from)} to ${clock2(NIGHT2.to)} your time; the count waits for morning.`;
|
|
15529
|
+
var THEIR_QUIET2 = ` Nothing rings from ${clock2(NIGHT2.from)} to ${clock2(NIGHT2.to)} their time; the count waits for morning.`;
|
|
15049
15530
|
var BrokerTuningSchema2 = external_exports.object({
|
|
15050
15531
|
/** 'none' = skip the spoken ack after a mapped answer (power users find it slow). */
|
|
15051
15532
|
ackVerbosity: external_exports.enum(["normal", "none"]).optional(),
|
|
@@ -15088,12 +15569,9 @@ var UserSettingsSchema2 = external_exports.object({
|
|
|
15088
15569
|
* must not silently reset this privacy choice. Absent = leave unchanged on
|
|
15089
15570
|
* write, 'hosted' on read (see store.ts). */
|
|
15090
15571
|
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(),
|
|
15572
|
+
/** `talk` lived here until #2373: it gated auto-play, which went in #2374. An older bundle's
|
|
15573
|
+
* `talk` is stripped like `silentPush` was, and the `user_settings.talk` column went in
|
|
15574
|
+
* 20261028142255. */
|
|
15097
15575
|
/** CALL DIAGNOSTICS (owner, 2026-10-01): the call report carries each listen and the bot's own
|
|
15098
15576
|
* load timings. SERVER-SET, no UI — on for every account that existed on 2026-10-01, off for
|
|
15099
15577
|
* newer ones (migration 20261001132859). Read-only here: the settings PATCH never writes it. */
|
|
@@ -15170,7 +15648,8 @@ var ConnectionSummarySchema2 = external_exports.object({
|
|
|
15170
15648
|
kind: external_exports.enum(["device", "agent"]).optional(),
|
|
15171
15649
|
/** For an agent, the token id of the DEVICE that minted it — so agents group under their
|
|
15172
15650
|
* machine, and revoking a device cascades to them. Null on devices, and on unlinked
|
|
15173
|
-
* agents (
|
|
15651
|
+
* agents (provider-managed, hatched by another agent, or minted before the link existed);
|
|
15652
|
+
* a phone-launched agent is linked to the computer it runs on since #1602. */
|
|
15174
15653
|
mintedByDevice: external_exports.string().nullable().optional(),
|
|
15175
15654
|
device: external_exports.string().nullable(),
|
|
15176
15655
|
/** The agent's display name (the single pairing name). */
|
|
@@ -15184,7 +15663,7 @@ var ConnectionSummarySchema2 = external_exports.object({
|
|
|
15184
15663
|
* user on the agent's own page. null = no ceiling (today's behaviour for every
|
|
15185
15664
|
* connection). Android binds importance to a relationship rather than to each message,
|
|
15186
15665
|
* and that is the thing our roster could not say: "Marlow may always call me; Otto
|
|
15187
|
-
* never may" (docs/
|
|
15666
|
+
* never may" (docs/history/party-navigation-design.md, gap 2). Clamped in `arbitrateLevel`, so it binds
|
|
15188
15667
|
* every surface at once and outranks even `sessionMode: all_calls` — a mode the user
|
|
15189
15668
|
* set once must not overrule a rule they set about one agent. */
|
|
15190
15669
|
reach: NotifyLevelSchema2.nullable().optional(),
|
|
@@ -15199,6 +15678,12 @@ var ConnectionSummarySchema2 = external_exports.object({
|
|
|
15199
15678
|
* its Goals — wrote on one or recorded an operation (`tokens.last_worked_at`). Within
|
|
15200
15679
|
* `WORKING_MS` it is working; otherwise it is connected but idle. Null = not seen working yet. */
|
|
15201
15680
|
lastWorkedAt: external_exports.string().datetime().nullable().optional(),
|
|
15681
|
+
/** A TERMINAL SESSION'S ONLY PULSE (`tokens.listened_at`): `paigy-listen` stamps it on every sweep
|
|
15682
|
+
* (90 s). It is deliberately NOT presence — `last_seen_at` is the desktop host's beat, and a
|
|
15683
|
+
* listener orphaned from a dead conversation must not light the live dot — but it is the one fact
|
|
15684
|
+
* that says a terminal session's process is UP, which is why the wake already reads it
|
|
15685
|
+
* (`wake.ts`, `listener`). Null = no listener sweeping. */
|
|
15686
|
+
listenedAt: external_exports.string().datetime().nullable().optional(),
|
|
15202
15687
|
/** The oldest of its Goals that is `ready` for it — work handed to it that nobody has started.
|
|
15203
15688
|
* With no work of its own for `WORKING_MS`, an agent sitting on this is not taking its work. */
|
|
15204
15689
|
oldestReadyAt: external_exports.string().datetime().nullable().optional(),
|
|
@@ -15343,12 +15828,14 @@ var QueueItemSchema2 = external_exports.object({
|
|
|
15343
15828
|
/** Its questions: every OPEN one, and at most ten settled, newest settled first
|
|
15344
15829
|
* (20260929133308) — the page decides which of them to show. NOT the whole set: `asked` and
|
|
15345
15830
|
* `answered` are, and a settled one's words are a line (280 characters), its body read when the
|
|
15346
|
-
* question is opened.
|
|
15831
|
+
* question is opened. Never a CANCELLED one (withdrawn, dismissed, or its Goal or call ended): it
|
|
15832
|
+
* asks nothing of anyone (#3723). */
|
|
15347
15833
|
questions: external_exports.array(QueueQuestionSchema2).default([]),
|
|
15348
15834
|
/** HOW MANY QUESTIONS THIS WORK HAS ASKED, and how many are answered — the Goal's own totals,
|
|
15349
15835
|
* bounded at 100 server-side. A tally counted off `questions` is a wrong number that looks
|
|
15350
15836
|
* 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.
|
|
15837
|
+
* by the projection, so hand-built queues (fixtures, the demo) need not spell them. A cancelled
|
|
15838
|
+
* question is not asked (#3725). */
|
|
15352
15839
|
asked: external_exports.number().optional(),
|
|
15353
15840
|
answered: external_exports.number().optional(),
|
|
15354
15841
|
/** Every note on it the person replied to (`QueueReplySchema`) — the page decides which to show.
|
|
@@ -15363,6 +15850,10 @@ var QueueItemSchema2 = external_exports.object({
|
|
|
15363
15850
|
* as progress). `updatedAt` moves for reasons nobody chose — a
|
|
15364
15851
|
* state recomputed, a review flag — so it cannot tell work in hand from work gone quiet. */
|
|
15365
15852
|
lastProgressAt: external_exports.string().nullable().optional(),
|
|
15853
|
+
/** WHEN AN AGENT LAST ACTED ON IT (owner, 2026-10-27: "Move it now", Goal 567258dc): its newest agent write, an
|
|
15854
|
+
* Entry or a Goal change, Paigy's excluded (`goals.worked_at`). What keeps work an agent is writing on from
|
|
15855
|
+
* reading as gone quiet (`coldSince`); absent on a door that does not carry it. */
|
|
15856
|
+
workedAt: external_exports.string().nullable().optional(),
|
|
15366
15857
|
/** THE GOAL'S NEWEST WORD, FROM EITHER SIDE (owner, 2026-09-27): the newest Entry on it, of any
|
|
15367
15858
|
* kind — what the person added ("Add to this"), their reply, the agent's ask or its progress
|
|
15368
15859
|
* note. A progress note is an Entry, so this is already the newer of the two: the person's note
|
|
@@ -15520,7 +16011,7 @@ var DeviceTokenSchema2 = external_exports.object({
|
|
|
15520
16011
|
* the thread each time (host.ts, live catch 2026-08-06 — prompt-papered until now). */
|
|
15521
16012
|
workspace: external_exports.string().nullable().optional(),
|
|
15522
16013
|
/** Local host recovery must preserve the launch's runtime and Paigy identity. */
|
|
15523
|
-
harness: external_exports.enum(["claude", "codex", "agy"]).optional(),
|
|
16014
|
+
harness: external_exports.enum(["claude", "codex", "agy", "grok"]).optional(),
|
|
15524
16015
|
session_id: external_exports.string().uuid().optional(),
|
|
15525
16016
|
/** A conversation the host must not resume: its context is full, so every turn fails
|
|
15526
16017
|
* ("Prompt is too long"). Written when a run hits it (`run.ts` `onFull`); the host skips a slot
|
|
@@ -15607,9 +16098,6 @@ var AgentRowSchema2 = ComputerRowSchema2.extend({
|
|
|
15607
16098
|
* (`agent_holds`); null when that read failed. */
|
|
15608
16099
|
holds: external_exports.array(external_exports.object({ id: external_exports.string(), title: external_exports.string() })).nullable(),
|
|
15609
16100
|
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
16101
|
/** The newest line of its working log, and when the harness saw it. */
|
|
15614
16102
|
line: external_exports.string().nullable(),
|
|
15615
16103
|
lineAt: external_exports.string().datetime().nullable()
|
|
@@ -15653,6 +16141,11 @@ var CallRecapSchema2 = external_exports.object({
|
|
|
15653
16141
|
durationMs: external_exports.number().nullable(),
|
|
15654
16142
|
/** Bot-clock pickup offset; absent before the timestamp release, null before its report lands. */
|
|
15655
16143
|
pickupMs: external_exports.number().nullable().optional(),
|
|
16144
|
+
/** STILL FILING (20261026182117): the call has not ended on the server, or it has and a brain cycle on it is
|
|
16145
|
+
* still pending, the next writer, which may still settle, file or start something. What the close itself
|
|
16146
|
+
* waits for (`private.close_call`). `status` cannot say it: nothing writes "finalizing", and a call reads
|
|
16147
|
+
* "open" until the sweep closes it, after nothing is pending. Absent from an API before it. */
|
|
16148
|
+
filing: external_exports.boolean().optional(),
|
|
15656
16149
|
agents: external_exports.array(external_exports.object({ id: external_exports.string(), name: external_exports.string().nullable() }))
|
|
15657
16150
|
}),
|
|
15658
16151
|
topics: external_exports.array(external_exports.object({
|
|
@@ -15661,7 +16154,7 @@ var CallRecapSchema2 = external_exports.object({
|
|
|
15661
16154
|
owner: external_exports.string(),
|
|
15662
16155
|
state: external_exports.string(),
|
|
15663
16156
|
/** 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(),
|
|
16157
|
+
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
16158
|
/** Whether the call put it to the person. An item it carried and never said has no row on the
|
|
15666
16159
|
* review (owner, 2026-10-08: "why do we get the third one when it didn't happen in the call?"). */
|
|
15667
16160
|
presented: external_exports.boolean(),
|
|
@@ -15707,9 +16200,65 @@ var CallRecapSchema2 = external_exports.object({
|
|
|
15707
16200
|
words: external_exports.string(),
|
|
15708
16201
|
atMs: external_exports.number()
|
|
15709
16202
|
})),
|
|
15710
|
-
|
|
16203
|
+
/** What did not fit, counted. `settles` counts items past the recap's 100; absent before 20261026165518. */
|
|
16204
|
+
more: external_exports.object({ lines: external_exports.number(), entries: external_exports.number(), topics: external_exports.number(), settles: external_exports.number().optional() }),
|
|
15711
16205
|
/** Last stored position on this page when another exists; absent before paging shipped. */
|
|
15712
|
-
next: external_exports.number().int().nonnegative().nullable().optional()
|
|
16206
|
+
next: external_exports.number().int().nonnegative().nullable().optional(),
|
|
16207
|
+
/** THE CALL AS ONE LIST OF ROWS (owner, 2026-10-14: "we only really want a thing like transcript but
|
|
16208
|
+
* built from the summaries", then "the transcript tabs should show the same but with full words").
|
|
16209
|
+
* Both tabs draw these rows, in this order: Summary from `summary`, Transcript from `words`.
|
|
16210
|
+
* - `put`: an item put to the person, at the first agent line that voiced it. Paigy's sentences
|
|
16211
|
+
* that voiced it are folded into `spoken`, never rows of their own.
|
|
16212
|
+
* - `said`: the person's words, one row per reply or per filed line no reply covers.
|
|
16213
|
+
* - `did`: what Paigy did ("Sent to Mouth: …", "Recorded: …", "Filed on …").
|
|
16214
|
+
* `by` is the row's real author, never inferred from `kind`: a relay Paigy sent to an agent is
|
|
16215
|
+
* Paigy's, not the person's. Optional and additive (owner: "make sure whatever you do is backward
|
|
16216
|
+
* compatible"): an API before it sends none, and the screen falls back to `topics` and `said`. */
|
|
16217
|
+
timeline: external_exports.array(external_exports.object({
|
|
16218
|
+
id: external_exports.string(),
|
|
16219
|
+
position: external_exports.number(),
|
|
16220
|
+
atMs: external_exports.number(),
|
|
16221
|
+
kind: external_exports.enum(["put", "said", "did"]),
|
|
16222
|
+
by: external_exports.object({ participant: external_exports.string().nullable(), agentId: external_exports.string().nullable(), name: external_exports.string().nullable() }),
|
|
16223
|
+
goalId: external_exports.string().uuid().nullable(),
|
|
16224
|
+
requestId: external_exports.string().nullable(),
|
|
16225
|
+
summary: external_exports.string().nullable(),
|
|
16226
|
+
words: external_exports.string(),
|
|
16227
|
+
/** Paigy's sentences folded into this row: on a `put` row, what it said putting the item to the
|
|
16228
|
+
* person (before their next row); on a `said` row, what it said in reply (until their next row).
|
|
16229
|
+
* `atMs` is when each was said; optional, absent before 2026-10-14's fix. */
|
|
16230
|
+
spoken: external_exports.array(external_exports.object({ lineId: external_exports.string(), words: external_exports.string(), atMs: external_exports.number().optional() })),
|
|
16231
|
+
/** On a `said` row: the work these words were filed on, and whether they answered (recorded) a
|
|
16232
|
+
* question. They replace the "Filed on ..." and "Recorded: ..." rows that repeated the person's own
|
|
16233
|
+
* summary (Brain, 2026-10-14). Optional: absent from an API before it. */
|
|
16234
|
+
filedOn: external_exports.array(external_exports.object({ goalId: external_exports.string().uuid(), title: external_exports.string() })).optional(),
|
|
16235
|
+
recorded: external_exports.boolean().optional(),
|
|
16236
|
+
settled: external_exports.object({ requestId: external_exports.string(), answer: external_exports.string() }).nullable().optional(),
|
|
16237
|
+
acknowledged: external_exports.boolean().optional(),
|
|
16238
|
+
/** On a `put` row: still waiting for the person's answer (not settled, not answered, not put off).
|
|
16239
|
+
* The server's judgement; the screen draws "Still waiting for your answer" from it. Optional: absent
|
|
16240
|
+
* from an API before it, where the screen falls back to its own reading. */
|
|
16241
|
+
waiting: external_exports.boolean().optional(),
|
|
16242
|
+
lineIds: external_exports.array(external_exports.string())
|
|
16243
|
+
})).optional(),
|
|
16244
|
+
/** THE RECAP (owner, 2026-10-26: "the transcript should just be the entries that settled or
|
|
16245
|
+
* acknowledged the items; that's it"). Each item the person's words settled on this call, in the
|
|
16246
|
+
* order they said them: who asked it (`by`), the item in its agent's words (`title`), and only the
|
|
16247
|
+
* words of theirs that settled it (`lines`: each line once, verbatim, with when it was said on the
|
|
16248
|
+
* bot clock like `said[].atMs`). Built from their replies, not from what the call put, so an item
|
|
16249
|
+
* settled without being put is still here. Beside them (owner: "List them too, with the words that
|
|
16250
|
+
* said them"), each Goal his words told something (`kind` "told") or the call started ("started"),
|
|
16251
|
+
* with `requestId` null and the Goal's name as `title`; a started Goal may have no `lines` yet. `kind`
|
|
16252
|
+
* is a string, not an enum, so a later kind never fails an older build's parse; `requestId` is the
|
|
16253
|
+
* request the words settled. On the first page only; absent from an API before it. */
|
|
16254
|
+
settles: external_exports.array(external_exports.object({
|
|
16255
|
+
requestId: external_exports.string().nullable(),
|
|
16256
|
+
kind: external_exports.string(),
|
|
16257
|
+
by: external_exports.object({ participant: external_exports.string(), agentId: external_exports.string().nullable(), name: external_exports.string() }),
|
|
16258
|
+
goalId: external_exports.string().uuid().nullable(),
|
|
16259
|
+
title: external_exports.string(),
|
|
16260
|
+
lines: external_exports.array(external_exports.object({ lineId: external_exports.string(), words: external_exports.string(), atMs: external_exports.number() }))
|
|
16261
|
+
})).optional()
|
|
15713
16262
|
});
|
|
15714
16263
|
|
|
15715
16264
|
// src/host.ts
|
|
@@ -16075,6 +16624,11 @@ import { resolve as resolve2, delimiter as delimiter2, join as join9 } from "pat
|
|
|
16075
16624
|
// src/harness/acp.ts
|
|
16076
16625
|
var none = { events: [], writes: [] };
|
|
16077
16626
|
var NOTHING_TO_RESUME = /* @__PURE__ */ new Set([-32002, -32601]);
|
|
16627
|
+
function nothingToResume(error) {
|
|
16628
|
+
if (!error || error.code === void 0) return false;
|
|
16629
|
+
if (NOTHING_TO_RESUME.has(error.code)) return true;
|
|
16630
|
+
return error.code === -32603 && (error.data?.code === "FS_NOT_FOUND" || /^Path not found\b/.test(error.message ?? ""));
|
|
16631
|
+
}
|
|
16078
16632
|
function optionFor(options, decision) {
|
|
16079
16633
|
const want = decision.allow ? "allow_once" : "reject_once";
|
|
16080
16634
|
return options.find((o) => o.kind === want)?.optionId ?? null;
|
|
@@ -16211,11 +16765,11 @@ var AcpDriver = class {
|
|
|
16211
16765
|
if (msg.id === this.sessionNewId) {
|
|
16212
16766
|
this.sessionNewId = void 0;
|
|
16213
16767
|
const resuming = this.resume !== void 0;
|
|
16214
|
-
if (resuming &&
|
|
16768
|
+
if (resuming && nothingToResume(msg.error)) {
|
|
16215
16769
|
this.resume = void 0;
|
|
16216
16770
|
this.sessionNewId = this.nextId++;
|
|
16217
16771
|
return {
|
|
16218
|
-
events: [{ kind: "error", message: `session/resume found nothing to resume (${msg.error.message}) \u2014 opening a new conversation` }],
|
|
16772
|
+
events: [{ kind: "error", message: `session/resume found nothing to resume (${msg.error.message ?? "no message"}) \u2014 opening a new conversation` }],
|
|
16219
16773
|
writes: [frame2(this.opening(this.sessionNewId))]
|
|
16220
16774
|
};
|
|
16221
16775
|
}
|
|
@@ -16415,8 +16969,16 @@ function inboxFor(root = INBOX_ROOT) {
|
|
|
16415
16969
|
var ADAPTER_BIN = {
|
|
16416
16970
|
claude: "claude-agent-acp",
|
|
16417
16971
|
codex: "codex-acp",
|
|
16418
|
-
agy: "paigy-agy-acp"
|
|
16972
|
+
agy: "paigy-agy-acp",
|
|
16973
|
+
grok: "grok"
|
|
16419
16974
|
};
|
|
16975
|
+
function grokArgs(opts) {
|
|
16976
|
+
const args = ["agent"];
|
|
16977
|
+
if (opts.mode === "bypass") args.push("--always-approve");
|
|
16978
|
+
if (opts.model) args.push("--model", opts.model);
|
|
16979
|
+
args.push("stdio");
|
|
16980
|
+
return args;
|
|
16981
|
+
}
|
|
16420
16982
|
var CLAUDE_ONE_WAY_IN = {
|
|
16421
16983
|
env: { CLAUDE_CODE_DISABLE_BACKGROUND_TASKS: "1" },
|
|
16422
16984
|
disallowedTools: ["Monitor", "ScheduleWakeup", "CronCreate", "Workflow"]
|
|
@@ -16457,7 +17019,7 @@ function startSession(opts) {
|
|
|
16457
17019
|
const inherited = [...savedVars.matchAll(/["']([A-Za-z_][A-Za-z0-9_]*)["']/g)].map((match) => match[1]);
|
|
16458
17020
|
codexConfig[key3] = [.../* @__PURE__ */ new Set([...inherited, ...codexConfig[key3] ?? codexConfig.mcp_servers?.paigy?.env_vars ?? [], ...CODEX_ENV])];
|
|
16459
17021
|
}
|
|
16460
|
-
const child = (opts.spawnFn ?? spawn)(opts.bin ?? ADAPTER_BIN[opts.harness], [], {
|
|
17022
|
+
const child = (opts.spawnFn ?? spawn)(opts.bin ?? ADAPTER_BIN[opts.harness], opts.harness === "grok" ? grokArgs(opts) : [], {
|
|
16461
17023
|
cwd,
|
|
16462
17024
|
// The adapter shells out to its vendor CLI (`claude`, `codex`), and a GUI- or
|
|
16463
17025
|
// launchd-launched process's PATH won't have it — probe dirs plus the RUNNING
|
|
@@ -17355,7 +17917,7 @@ function runHarness(opts) {
|
|
|
17355
17917
|
opts.log("\u25B6 running again after the limit");
|
|
17356
17918
|
LIMITS.running(name, (text) => callForResume(text, state, rail), opts.log);
|
|
17357
17919
|
}
|
|
17358
|
-
async function
|
|
17920
|
+
async function handle3(event) {
|
|
17359
17921
|
if (event.kind === "error") {
|
|
17360
17922
|
opts.log(`\u26A0 ${event.message}`);
|
|
17361
17923
|
if (event.fatal && running) {
|
|
@@ -17414,7 +17976,7 @@ ${event.message}`, state, rail, { log: opts.log });
|
|
|
17414
17976
|
inbox?.close();
|
|
17415
17977
|
opts.onExit?.();
|
|
17416
17978
|
},
|
|
17417
|
-
onEvent: (event) => void
|
|
17979
|
+
onEvent: (event) => void handle3(event).catch((err) => opts.log(`\u26A0 ${err.message}`))
|
|
17418
17980
|
});
|
|
17419
17981
|
void pump(session, state, rail, { onIdle: () => running, beat: clock4, initialPrompt: opts.prompt, log: opts.log, ...inbox ? { inbox } : {} }).catch(
|
|
17420
17982
|
(e) => opts.log(`\u26A0 conversation loop stopped: ${e.message}`)
|
|
@@ -17523,13 +18085,18 @@ function selfUpdater(deps) {
|
|
|
17523
18085
|
var HOST_FILE = join11(homedir9(), ".paigy", "host.json");
|
|
17524
18086
|
function wakeHarness(slot, saved, claudeTranscript) {
|
|
17525
18087
|
if (slot === "Desktop") return void 0;
|
|
17526
|
-
if (saved !== null) return saved === "agy" || saved === "codex" || saved === "claude" ? saved : void 0;
|
|
18088
|
+
if (saved !== null) return saved === "agy" || saved === "codex" || saved === "claude" || saved === "grok" ? saved : void 0;
|
|
17527
18089
|
if (claudeTranscript) return "claude";
|
|
17528
18090
|
if (slot === "mcp-agent" || slot === "Claude Code") return "claude";
|
|
17529
18091
|
if (slot === "codex") return "codex";
|
|
17530
18092
|
if (slot === "antigravity") return "agy";
|
|
17531
18093
|
return void 0;
|
|
17532
18094
|
}
|
|
18095
|
+
function claudeOnFolderSession(harness, slot, sessionId2) {
|
|
18096
|
+
if (harness !== "claude") return null;
|
|
18097
|
+
const folder = sessionId2?.startsWith("cwd-") ? sessionId2 : slot.startsWith("session:cwd-") ? slot.slice("session:".length) : null;
|
|
18098
|
+
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;
|
|
18099
|
+
}
|
|
17533
18100
|
function readHostState() {
|
|
17534
18101
|
try {
|
|
17535
18102
|
const s = JSON.parse(readFileSync6(HOST_FILE, "utf8"));
|
|
@@ -17847,6 +18414,11 @@ function startHost(opts) {
|
|
|
17847
18414
|
skip("has no recorded harness; select its runtime before recovery");
|
|
17848
18415
|
return;
|
|
17849
18416
|
}
|
|
18417
|
+
const mislabelled = claudeOnFolderSession(harness, slot, identity.sessionId);
|
|
18418
|
+
if (mislabelled) {
|
|
18419
|
+
skip(mislabelled);
|
|
18420
|
+
return;
|
|
18421
|
+
}
|
|
17850
18422
|
if (owner && !allowed(owner.cwd, opts.wsDeps)) {
|
|
17851
18423
|
skip(`ran in ${owner.cwd}, outside the folders this machine granted`);
|
|
17852
18424
|
return;
|