@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/cli.js
CHANGED
|
@@ -3257,25 +3257,25 @@ var require_data_url = __commonJS({
|
|
|
3257
3257
|
function isHTTPWhiteSpace(char) {
|
|
3258
3258
|
return char === 13 || char === 10 || char === 9 || char === 32;
|
|
3259
3259
|
}
|
|
3260
|
-
function removeHTTPWhitespace(
|
|
3261
|
-
return removeChars(
|
|
3260
|
+
function removeHTTPWhitespace(str, leading = true, trailing = true) {
|
|
3261
|
+
return removeChars(str, leading, trailing, isHTTPWhiteSpace);
|
|
3262
3262
|
}
|
|
3263
3263
|
function isASCIIWhitespace(char) {
|
|
3264
3264
|
return char === 13 || char === 10 || char === 9 || char === 12 || char === 32;
|
|
3265
3265
|
}
|
|
3266
|
-
function removeASCIIWhitespace(
|
|
3267
|
-
return removeChars(
|
|
3266
|
+
function removeASCIIWhitespace(str, leading = true, trailing = true) {
|
|
3267
|
+
return removeChars(str, leading, trailing, isASCIIWhitespace);
|
|
3268
3268
|
}
|
|
3269
|
-
function removeChars(
|
|
3269
|
+
function removeChars(str, leading, trailing, predicate) {
|
|
3270
3270
|
let lead = 0;
|
|
3271
|
-
let trail =
|
|
3271
|
+
let trail = str.length - 1;
|
|
3272
3272
|
if (leading) {
|
|
3273
|
-
while (lead <
|
|
3273
|
+
while (lead < str.length && predicate(str.charCodeAt(lead))) lead++;
|
|
3274
3274
|
}
|
|
3275
3275
|
if (trailing) {
|
|
3276
|
-
while (trail > 0 && predicate(
|
|
3276
|
+
while (trail > 0 && predicate(str.charCodeAt(trail))) trail--;
|
|
3277
3277
|
}
|
|
3278
|
-
return lead === 0 && trail ===
|
|
3278
|
+
return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1);
|
|
3279
3279
|
}
|
|
3280
3280
|
function isomorphicDecode(input) {
|
|
3281
3281
|
const length = input.length;
|
|
@@ -5194,7 +5194,7 @@ var require_body = __commonJS({
|
|
|
5194
5194
|
const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, "0")}`;
|
|
5195
5195
|
const prefix = `--${boundary}\r
|
|
5196
5196
|
Content-Disposition: form-data`;
|
|
5197
|
-
const escape = (
|
|
5197
|
+
const escape = (str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22");
|
|
5198
5198
|
const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, "\r\n");
|
|
5199
5199
|
const blobParts = [];
|
|
5200
5200
|
const rn = new Uint8Array([13, 10]);
|
|
@@ -16042,9 +16042,9 @@ var require_cookies = __commonJS({
|
|
|
16042
16042
|
webidl.argumentLengthCheck(arguments, 2, "setCookie");
|
|
16043
16043
|
webidl.brandCheck(headers, Headers, { strict: false });
|
|
16044
16044
|
cookie = webidl.converters.Cookie(cookie);
|
|
16045
|
-
const
|
|
16046
|
-
if (
|
|
16047
|
-
headers.append("Set-Cookie",
|
|
16045
|
+
const str = stringify(cookie);
|
|
16046
|
+
if (str) {
|
|
16047
|
+
headers.append("Set-Cookie", str);
|
|
16048
16048
|
}
|
|
16049
16049
|
}
|
|
16050
16050
|
webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([
|
|
@@ -19413,14 +19413,14 @@ var require_regex = __commonJS({
|
|
|
19413
19413
|
var TEST_KANJI = new RegExp("^" + kanji + "$");
|
|
19414
19414
|
var TEST_NUMERIC = new RegExp("^" + numeric + "$");
|
|
19415
19415
|
var TEST_ALPHANUMERIC = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
|
|
19416
|
-
exports.testKanji = function testKanji(
|
|
19417
|
-
return TEST_KANJI.test(
|
|
19416
|
+
exports.testKanji = function testKanji(str) {
|
|
19417
|
+
return TEST_KANJI.test(str);
|
|
19418
19418
|
};
|
|
19419
|
-
exports.testNumeric = function testNumeric(
|
|
19420
|
-
return TEST_NUMERIC.test(
|
|
19419
|
+
exports.testNumeric = function testNumeric(str) {
|
|
19420
|
+
return TEST_NUMERIC.test(str);
|
|
19421
19421
|
};
|
|
19422
|
-
exports.testAlphanumeric = function testAlphanumeric(
|
|
19423
|
-
return TEST_ALPHANUMERIC.test(
|
|
19422
|
+
exports.testAlphanumeric = function testAlphanumeric(str) {
|
|
19423
|
+
return TEST_ALPHANUMERIC.test(str);
|
|
19424
19424
|
};
|
|
19425
19425
|
}
|
|
19426
19426
|
});
|
|
@@ -19922,13 +19922,13 @@ var require_segments = __commonJS({
|
|
|
19922
19922
|
var Regex = require_regex();
|
|
19923
19923
|
var Utils = require_utils2();
|
|
19924
19924
|
var dijkstra = require_dijkstra();
|
|
19925
|
-
function getStringByteLength(
|
|
19926
|
-
return unescape(encodeURIComponent(
|
|
19925
|
+
function getStringByteLength(str) {
|
|
19926
|
+
return unescape(encodeURIComponent(str)).length;
|
|
19927
19927
|
}
|
|
19928
|
-
function getSegments(regex, mode,
|
|
19928
|
+
function getSegments(regex, mode, str) {
|
|
19929
19929
|
const segments = [];
|
|
19930
19930
|
let result;
|
|
19931
|
-
while ((result = regex.exec(
|
|
19931
|
+
while ((result = regex.exec(str)) !== null) {
|
|
19932
19932
|
segments.push({
|
|
19933
19933
|
data: result[0],
|
|
19934
19934
|
index: result.index,
|
|
@@ -22762,13 +22762,13 @@ var require_svg_tag = __commonJS({
|
|
|
22762
22762
|
var Utils = require_utils3();
|
|
22763
22763
|
function getColorAttrib(color, attrib) {
|
|
22764
22764
|
const alpha = color.a / 255;
|
|
22765
|
-
const
|
|
22766
|
-
return alpha < 1 ?
|
|
22765
|
+
const str = attrib + '="' + color.hex + '"';
|
|
22766
|
+
return alpha < 1 ? str + " " + attrib + '-opacity="' + alpha.toFixed(2).slice(1) + '"' : str;
|
|
22767
22767
|
}
|
|
22768
22768
|
function svgCmd(cmd, x, y) {
|
|
22769
|
-
let
|
|
22770
|
-
if (typeof y !== "undefined")
|
|
22771
|
-
return
|
|
22769
|
+
let str = cmd + x;
|
|
22770
|
+
if (typeof y !== "undefined") str += " " + y;
|
|
22771
|
+
return str;
|
|
22772
22772
|
}
|
|
22773
22773
|
function qrToPath(data, size, margin) {
|
|
22774
22774
|
let path = "";
|
|
@@ -23125,12 +23125,23 @@ var CATALOG = [
|
|
|
23125
23125
|
loginHint: "Install and set up Antigravity (`agy`).",
|
|
23126
23126
|
installCli: "curl -fsSL https://antigravity.dev/install.sh | bash",
|
|
23127
23127
|
models: ["gemini-1.5-pro", "gemini-1.5-flash", "gemini-2.0-pro-exp"]
|
|
23128
|
+
},
|
|
23129
|
+
{
|
|
23130
|
+
name: "grok",
|
|
23131
|
+
label: "Grok",
|
|
23132
|
+
cli: "grok",
|
|
23133
|
+
// `grok agent stdio` speaks ACP itself. A separate adapter would be a second binary
|
|
23134
|
+
// to miss, and detection would report adapter-missing on a machine that can already launch.
|
|
23135
|
+
authProbe: ["sh", "-c", 'test -s "$HOME/.grok/auth.json"'],
|
|
23136
|
+
loginHint: "Run `grok` once in a terminal and sign in.",
|
|
23137
|
+
installCli: "curl -fsSL https://x.ai/cli/install.sh | bash"
|
|
23128
23138
|
}
|
|
23129
23139
|
];
|
|
23130
23140
|
function probeDirs(home = homedir()) {
|
|
23131
23141
|
return [
|
|
23132
23142
|
dirname(process.execPath),
|
|
23133
23143
|
join(home, ".local", "bin"),
|
|
23144
|
+
join(home, ".grok", "bin"),
|
|
23134
23145
|
"/usr/local/bin",
|
|
23135
23146
|
"/opt/homebrew/bin",
|
|
23136
23147
|
join(home, ".npm-global", "bin")
|
|
@@ -27222,7 +27233,7 @@ var coerce = {
|
|
|
27222
27233
|
var NEVER = INVALID;
|
|
27223
27234
|
|
|
27224
27235
|
// src/cli-args.ts
|
|
27225
|
-
var USAGE = "usage: paigy-harness setup | pair | host [--grant DIR]\u2026 | service | enable-tools [--scope user|project] | hatch NAME [--voice KEY] [--slot SLOT] | launch NAME [--under GOAL] [--voice KEY] [--harness \u2026] [--mode \u2026] [--cwd DIR] BRIEF\u2026 | handoff | [--harness claude|codex|agy] [--mode bypass|ask] [--cwd DIR] [--grace SECONDS] [--doctor] PROMPT\u2026";
|
|
27236
|
+
var USAGE = "usage: paigy-harness setup | pair | host [--grant DIR]\u2026 | service | enable-tools [--scope user|project] | hatch NAME [--voice KEY] [--slot SLOT] | launch NAME [--under GOAL] [--voice KEY] [--harness \u2026] [--mode \u2026] [--cwd DIR] BRIEF\u2026 | handoff | [--harness claude|codex|agy|grok] [--mode bypass|ask] [--cwd DIR] [--grace SECONDS] [--doctor] PROMPT\u2026";
|
|
27226
27237
|
function parseArgs(argv) {
|
|
27227
27238
|
const args = { harness: "claude", mode: "bypass", cwd: process.cwd(), doctor: false, help: false, host: false, pair: false, service: false, setup: false, enableTools: false, scope: "user", grant: [], hatch: null, voice: null, slot: null, launch: null, under: null, graceSeconds: 90, prompt: "", handoff: false };
|
|
27228
27239
|
const words = [];
|
|
@@ -27234,7 +27245,7 @@ function parseArgs(argv) {
|
|
|
27234
27245
|
const next = () => argv[++i];
|
|
27235
27246
|
if (arg === "--harness") {
|
|
27236
27247
|
const v = next();
|
|
27237
|
-
if (v !== "claude" && v !== "codex" && v !== "agy") return { error: `--harness must be claude, codex, or
|
|
27248
|
+
if (v !== "claude" && v !== "codex" && v !== "agy" && v !== "grok") return { error: `--harness must be claude, codex, agy, or grok, got ${v ?? "nothing"}` };
|
|
27238
27249
|
args.harness = v;
|
|
27239
27250
|
} else if (arg === "--mode") {
|
|
27240
27251
|
const v = next();
|
|
@@ -27312,7 +27323,11 @@ var MCP_WIRES = [
|
|
|
27312
27323
|
// written, codex sees a half-table and rejects it ("invalid transport"), and nothing at
|
|
27313
27324
|
// all gets wired — which the old silent catch below hid entirely (found by QA 2026-09-06).
|
|
27314
27325
|
{ cli: "codex", name: "Codex", wire: "codex mcp add paigy -- npx -y @paigy/mcp@latest" },
|
|
27315
|
-
{ cli: "agy", name: "Antigravity", wire: "agy mcp list | grep -q '^paigy ' || agy mcp add paigy -- npx -y @paigy/mcp@latest" }
|
|
27326
|
+
{ cli: "agy", name: "Antigravity", wire: "agy mcp list | grep -q '^paigy ' || agy mcp add paigy -- npx -y @paigy/mcp@latest" },
|
|
27327
|
+
// `grok mcp add` replaces, the same way `agy mcp add` does. List first. No PAIGY_AGENT:
|
|
27328
|
+
// a fixed name would glue every Grok chat into one slot. GROK_SESSION_ID is already
|
|
27329
|
+
// in the server's environment; sessionId() reads it.
|
|
27330
|
+
{ cli: "grok", name: "Grok", wire: "grok mcp list | grep -q '^paigy' || grok mcp add paigy -- npx -y @paigy/mcp@latest" }
|
|
27316
27331
|
];
|
|
27317
27332
|
var ENABLE_TOOLS_COMMAND = "npx -y -p @paigy/mcp@latest paigy-enable-tools";
|
|
27318
27333
|
function onEnter(input, onLine) {
|
|
@@ -27329,6 +27344,23 @@ function onEnter(input, onLine) {
|
|
|
27329
27344
|
};
|
|
27330
27345
|
}
|
|
27331
27346
|
|
|
27347
|
+
// src/lineage.ts
|
|
27348
|
+
var NAME_MAX = 60;
|
|
27349
|
+
var tidy = (s) => s.replace(/\s+/gu, " ").trim().replace(/^\/+|\/+$/gu, "").trim();
|
|
27350
|
+
function lineageName(parent, name, max = NAME_MAX) {
|
|
27351
|
+
const own = tidy(name);
|
|
27352
|
+
const line = tidy(parent ?? "");
|
|
27353
|
+
if (!line || !own) return own.slice(0, max);
|
|
27354
|
+
const full = `${line}/${own}`;
|
|
27355
|
+
if (full.length <= max) return full;
|
|
27356
|
+
const [root] = line.split("/");
|
|
27357
|
+
const elided = `${root}/\u2026/${own}`;
|
|
27358
|
+
if (root && elided.length <= max && root !== line) return elided;
|
|
27359
|
+
const short2 = `${root}/${own}`;
|
|
27360
|
+
if (root && short2.length <= max) return short2;
|
|
27361
|
+
return own.slice(0, max);
|
|
27362
|
+
}
|
|
27363
|
+
|
|
27332
27364
|
// ../../packages/sdk/dist/index.js
|
|
27333
27365
|
import { createRequire as __sdkCreateRequire } from "module";
|
|
27334
27366
|
import { execFileSync } from "child_process";
|
|
@@ -27448,7 +27480,7 @@ function parseSessionRecord(text) {
|
|
|
27448
27480
|
return void 0;
|
|
27449
27481
|
}
|
|
27450
27482
|
function sessionId() {
|
|
27451
|
-
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`).
|
|
27483
|
+
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`).
|
|
27452
27484
|
(underCodex() ? INSTANCE_ID : WORKSPACE_ID);
|
|
27453
27485
|
}
|
|
27454
27486
|
async function reach(url, init) {
|
|
@@ -28713,7 +28745,7 @@ var OptionInputSchema = external_exports.object({
|
|
|
28713
28745
|
imgUrl: OptionSchema.shape.image
|
|
28714
28746
|
}).strict();
|
|
28715
28747
|
var NIGHT = { from: 23, to: 7 };
|
|
28716
|
-
var ASK_MAX =
|
|
28748
|
+
var ASK_MAX = 80;
|
|
28717
28749
|
var UNITS_MAX = 12;
|
|
28718
28750
|
var UNIT_TITLE_MAX = 50;
|
|
28719
28751
|
var UNIT_BODY_MAX = 200;
|
|
@@ -28762,10 +28794,22 @@ function capRefusals(text, units22, field) {
|
|
|
28762
28794
|
function refuseOverCaps(text, units22, field, ctx) {
|
|
28763
28795
|
for (const { path, message, ...params } of capRefusals(text, units22, field)) ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path, message, params });
|
|
28764
28796
|
}
|
|
28797
|
+
var SHIPPED = ["phone", "calls", "server", "store", "agents"];
|
|
28798
|
+
var CAUSES_MAX = 10;
|
|
28799
|
+
var shipped = external_exports.enum(SHIPPED, {
|
|
28800
|
+
errorMap: () => ({ message: `shipped_unknown: one of ${SHIPPED.join(", ")}.` })
|
|
28801
|
+
}).optional().describe(
|
|
28802
|
+
"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."
|
|
28803
|
+
);
|
|
28804
|
+
var causedBy = external_exports.array(
|
|
28805
|
+
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.")
|
|
28806
|
+
).min(1).max(CAUSES_MAX, `too_many_causes: at most ${CAUSES_MAX}.`).optional().describe(
|
|
28807
|
+
`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.`
|
|
28808
|
+
);
|
|
28765
28809
|
var COMPLETION_MESSAGE_MAX = 50;
|
|
28766
28810
|
var CompletionSchema = external_exports.object({
|
|
28767
28811
|
goalId: external_exports.string().uuid().describe("The existing Goal to complete."),
|
|
28768
|
-
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."),
|
|
28812
|
+
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."),
|
|
28769
28813
|
units: external_exports.array(UnitInputSchema.extend({
|
|
28770
28814
|
title: external_exports.string().trim().min(1).max(UNIT_TITLE_MAX),
|
|
28771
28815
|
body: external_exports.string().trim().min(1).max(UNIT_BODY_MAX)
|
|
@@ -28774,19 +28818,21 @@ var CompletionSchema = external_exports.object({
|
|
|
28774
28818
|
options: external_exports.array(external_exports.object({
|
|
28775
28819
|
label: external_exports.string().trim().min(1).max(OPTION_LABEL_MAX),
|
|
28776
28820
|
hint: external_exports.string().trim().min(1).max(OPTION_HINT_MAX)
|
|
28777
|
-
}).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.")
|
|
28821
|
+
}).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."),
|
|
28822
|
+
causedBy,
|
|
28823
|
+
shipped
|
|
28778
28824
|
}).strict();
|
|
28779
|
-
var CompleteChangeSchema = CompletionSchema.extend({ kind: external_exports.literal("complete") });
|
|
28825
|
+
var CompleteChangeSchema = CompletionSchema.omit({ causedBy: true, shipped: true }).extend({ kind: external_exports.literal("complete") });
|
|
28780
28826
|
var ASKING_RULES = `HOW TO ASK:
|
|
28781
|
-
1.
|
|
28782
|
-
2.
|
|
28783
|
-
3. \`workItBlocks\` only
|
|
28784
|
-
4.
|
|
28785
|
-
5. One question, one row
|
|
28786
|
-
6. Read the Goal
|
|
28787
|
-
7.
|
|
28788
|
-
8. A diagnosis says when, why and how it happens, then proposes one fix.
|
|
28789
|
-
9.
|
|
28827
|
+
1. One question per object in \`questions\`, so each is answered on its own.
|
|
28828
|
+
2. \`goalId\` names the existing Goal it is about (create one with manage_goals first); the answer comes back there.
|
|
28829
|
+
3. \`workItBlocks\` only when you are truly blocked: it asks for a call.
|
|
28830
|
+
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.
|
|
28831
|
+
5. One question, one row: never re-send one still waiting; take back one that no longer matters with \`withdrawQuestionIds\`.
|
|
28832
|
+
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.
|
|
28833
|
+
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.
|
|
28834
|
+
8. A diagnosis says when, why and how it happens, then proposes one fix.
|
|
28835
|
+
9. Give a report its \`reply\`: one line in THEIR voice for THAT report, so you learn whether they verified it or only received it. Required when it is delivered or its Goal is done.`;
|
|
28790
28836
|
function draft2020(node) {
|
|
28791
28837
|
if (Array.isArray(node)) return node.map(draft2020);
|
|
28792
28838
|
if (node && typeof node === "object") {
|
|
@@ -28829,12 +28875,55 @@ var userExplicitlyRequested = external_exports.enum(["any", "call"]).optional().
|
|
|
28829
28875
|
`Only what the person said about THIS message, in so many words: "any" when they asked you to send it to them ("send it to my phone", "message me the result"), "call" when they asked to be called about it. It is then delivered (a call rings for the whole contact, and carries everything waiting on them); omitted, an update is only recorded as the Goal's progress unless the person needs it. Never set it to make a message louder.`
|
|
28830
28876
|
);
|
|
28831
28877
|
var units = external_exports.array(UnitInputSchema).optional().describe(
|
|
28832
|
-
`The context this message needs, as up to ${UNITS_MAX} units in reading order, each {title, body}: a title of at most ${UNIT_TITLE_MAX} characters and a body of at most ${UNIT_BODY_MAX}. One idea per unit. Leave it out when the main text says it all.`
|
|
28878
|
+
`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.`
|
|
28833
28879
|
);
|
|
28880
|
+
var KIND_IDS = { "handing": "none", "replaced-by": "goal", "blocked-by": "node", "asking": "none", "found": "none" };
|
|
28881
|
+
var KIND_GRAMMAR = "handing, replaced-by <goalId>, blocked-by <goalId|questionId>, asking, found";
|
|
28882
|
+
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}$/;
|
|
28883
|
+
var handle = /^[0-9a-fA-F-]{8,36}$/;
|
|
28884
|
+
function refuseKind(u, ctx) {
|
|
28885
|
+
if (!u.kind) return;
|
|
28886
|
+
const refuse = (refusal, kind, message) => ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["kind"], params: { refusal, kind }, message });
|
|
28887
|
+
const [name, ...rest] = u.kind.trim().split(/\s+/);
|
|
28888
|
+
const shape = KIND_IDS[name];
|
|
28889
|
+
if (!shape) {
|
|
28890
|
+
refuse("kind_unknown", name, `kind_unknown: "${name}" is not a kind. One of: ${KIND_GRAMMAR}.`);
|
|
28891
|
+
return;
|
|
28892
|
+
}
|
|
28893
|
+
const id22 = rest.join(" ");
|
|
28894
|
+
if (shape === "none" && id22) {
|
|
28895
|
+
refuse("kind_takes_no_id", name, `kind_takes_no_id: "${name}" is the whole kind, so drop the "${id22}" after it.`);
|
|
28896
|
+
}
|
|
28897
|
+
if (shape !== "none" && !(shape === "goal" ? uuid.test(id22) : handle.test(id22))) {
|
|
28898
|
+
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>".`);
|
|
28899
|
+
}
|
|
28900
|
+
if (name === "asking") {
|
|
28901
|
+
refuse("kind_is_a_question", name, 'kind_is_a_question: "asking" owes them an answer, so send it in `questions`, where it opens one.');
|
|
28902
|
+
}
|
|
28903
|
+
if (u.userExplicitlyRequested) {
|
|
28904
|
+
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.`);
|
|
28905
|
+
}
|
|
28906
|
+
}
|
|
28834
28907
|
var UpdateInputSchema = external_exports.object({
|
|
28835
|
-
|
|
28908
|
+
// ONE LOAD-BEARING POINT PER REPORT (owner, 2026-10-27 14:10 on call, Goal 1b1750e9, settling
|
|
28909
|
+
// #3633's pacing: "one point at a time is better, but make sure that it's [load-]bearing ... if
|
|
28910
|
+
// there is a lot of key points that I need to be aware of ... meaning something bad would happen
|
|
28911
|
+
// if I didn't know them or I wouldn't be able to understand something in the future ... They
|
|
28912
|
+
// should go separately. Basically, it should be like one load-bearing thing per report").
|
|
28913
|
+
//
|
|
28914
|
+
// The call's half of that ruling shipped in #3771: the talker settles an item only once the
|
|
28915
|
+
// transcript shows he heard its load-bearing point. This is the author's half, and without it the
|
|
28916
|
+
// talker has to guess which of a report's parts was load-bearing. Measured 2026-11-01 on prod:
|
|
28917
|
+
// 458 of 866 reports in 21 days carried two or more units, and since the pacing shipped on 10-23
|
|
28918
|
+
// only 18 of 72 units that reached a call were ever said -- so a point written as a unit has about
|
|
28919
|
+
// a one-in-four chance of being heard, and one ok after the headline settles the whole report.
|
|
28920
|
+
// Hence the wording, not a `mustHear` flag (the-heard-record.md P3): he asked for less mechanism
|
|
28921
|
+
// and more judgment from the agent, so a point he must not miss is simply its own report.
|
|
28922
|
+
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.`),
|
|
28836
28923
|
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."),
|
|
28837
28924
|
units,
|
|
28925
|
+
causedBy,
|
|
28926
|
+
shipped,
|
|
28838
28927
|
// A REPORT KEEPS ITS TAP (#2799, #3260; owner, 2026-10-08, settling #2776: "keep the reports open
|
|
28839
28928
|
// until the user acknowledges them"). A report asks nothing, so it opens no Question -- but it
|
|
28840
28929
|
// still waits to be acknowledged, and it carries the ONE tap that closes it. Never a decision: the
|
|
@@ -28858,6 +28947,12 @@ var UpdateInputSchema = external_exports.object({
|
|
|
28858
28947
|
reply: external_exports.string().trim().min(1).describe(
|
|
28859
28948
|
`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.`
|
|
28860
28949
|
).optional(),
|
|
28950
|
+
// THE KIND, WHICH WAS THE FIRST LINE OF THE MESSAGE UNTIL NOW (`KIND_IDS` above). Optional on
|
|
28951
|
+
// purpose: every agent writing updates today sends none, and a door that refused them would turn a
|
|
28952
|
+
// convention nobody was obliged to follow into a 400 on live traffic.
|
|
28953
|
+
kind: external_exports.string().trim().min(1).optional().describe(
|
|
28954
|
+
`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).`
|
|
28955
|
+
),
|
|
28861
28956
|
userExplicitlyRequested
|
|
28862
28957
|
}).strict().superRefine((u, ctx) => {
|
|
28863
28958
|
if (u.userExplicitlyRequested && !u.reply) {
|
|
@@ -28869,6 +28964,7 @@ var UpdateInputSchema = external_exports.object({
|
|
|
28869
28964
|
});
|
|
28870
28965
|
}
|
|
28871
28966
|
refuseOverCaps(u.message, u.units, "message", ctx);
|
|
28967
|
+
refuseKind(u, ctx);
|
|
28872
28968
|
if (u.reply && u.reply.length > OPTION_LABEL_MAX) {
|
|
28873
28969
|
ctx.addIssue({
|
|
28874
28970
|
code: external_exports.ZodIssueCode.custom,
|
|
@@ -28884,11 +28980,11 @@ var questionFields = {
|
|
|
28884
28980
|
),
|
|
28885
28981
|
goalId: external_exports.string().uuid().describe("The Goal the question is about, which must exist (create it with manage_goals first). Its answer comes back there."),
|
|
28886
28982
|
units,
|
|
28887
|
-
options: external_exports.array(OptionInputSchema).min(1).max(6).optional().describe("The choices, when you have them. Each label stands on its own, at most 50 characters; a hint, at most 200."),
|
|
28983
|
+
options: external_exports.array(OptionInputSchema).min(1).max(6).optional().describe("The choices, when you have them. Each label stands on its own and differs from the others (duplicate_option_label), at most 50 characters; a hint, at most 200. They can always answer in their own words, so no 'Other' or 'None of these'."),
|
|
28888
28984
|
// HOW THE OPTIONS ARE ANSWERED, SAID BY THE AGENT (owner, 2026-10-02: "one and many makes sense";
|
|
28889
28985
|
// brain_prompts.md §1: structured agent questions need no model). The app draws all three.
|
|
28890
28986
|
pickMode: external_exports.enum(["one", "many", "rank"]).optional().describe(
|
|
28891
|
-
'How the options are answered: "one" (the default) a pick, for alternatives; "many" a checklist, for independent options they may want several of; "rank" an order of all of them. Only with options.'
|
|
28987
|
+
'How the options are answered: "one" (the default) a pick, for alternatives; "many" a checklist, for independent options they may want several of; "rank" an order of all of them. Only with options; "many" and "rank" need at least two (too_few_options).'
|
|
28892
28988
|
),
|
|
28893
28989
|
// WHAT THE QUESTION HOLDS UP (brain_prompts.md §2.1): replaces `waiting: 'hard'`. A question that
|
|
28894
28990
|
// blocks work asks for a call (the person's settings and ring cooldowns still decide).
|
|
@@ -28900,11 +28996,39 @@ var questionFields = {
|
|
|
28900
28996
|
var refineQuestion = (q, ctx) => {
|
|
28901
28997
|
refuseOverCaps(q.question, q.units, "question", ctx);
|
|
28902
28998
|
if (q.pickMode && !q.options) ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["pickMode"], message: "pickMode comes only with options" });
|
|
28999
|
+
refuseThinOptions(q, ctx);
|
|
28903
29000
|
const ids = (q.options ?? []).map((o) => o.id);
|
|
28904
29001
|
if (ids.some((id22) => id22) && (ids.some((id22) => !id22) || new Set(ids).size !== ids.length)) {
|
|
28905
29002
|
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["options"], message: "give every option a distinct id, or none" });
|
|
28906
29003
|
}
|
|
28907
29004
|
};
|
|
29005
|
+
var MIN_LIST_OPTIONS = 2;
|
|
29006
|
+
function refuseThinOptions(q, ctx) {
|
|
29007
|
+
const options = q.options ?? [];
|
|
29008
|
+
if ((q.pickMode === "many" || q.pickMode === "rank") && options.length < MIN_LIST_OPTIONS) {
|
|
29009
|
+
ctx.addIssue({
|
|
29010
|
+
code: external_exports.ZodIssueCode.custom,
|
|
29011
|
+
path: ["options"],
|
|
29012
|
+
params: { refusal: "too_few_options", length: options.length, min: MIN_LIST_OPTIONS },
|
|
29013
|
+
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.`
|
|
29014
|
+
});
|
|
29015
|
+
}
|
|
29016
|
+
const seen = /* @__PURE__ */ new Map();
|
|
29017
|
+
options.forEach((o, index) => {
|
|
29018
|
+
const key22 = o.label.trim().toLowerCase();
|
|
29019
|
+
const first = seen.get(key22);
|
|
29020
|
+
if (first === void 0) {
|
|
29021
|
+
seen.set(key22, index);
|
|
29022
|
+
return;
|
|
29023
|
+
}
|
|
29024
|
+
ctx.addIssue({
|
|
29025
|
+
code: external_exports.ZodIssueCode.custom,
|
|
29026
|
+
path: ["options", index, "label"],
|
|
29027
|
+
params: { refusal: "duplicate_option_label", index, first },
|
|
29028
|
+
message: `duplicate_option_label: options[${index}] repeats the label of options[${first}]. Each option names a different choice.`
|
|
29029
|
+
});
|
|
29030
|
+
});
|
|
29031
|
+
}
|
|
28908
29032
|
var QuestionInputSchema = external_exports.object({
|
|
28909
29033
|
questionId: external_exports.string().uuid().optional().describe("Optional: your own stable id for this question (a UUID), so a resend is the same question. Minted for you when omitted; the result returns it."),
|
|
28910
29034
|
...questionFields
|
|
@@ -28926,21 +29050,26 @@ var QuestionDependencySchema = external_exports.object({
|
|
|
28926
29050
|
reason: reason.optional()
|
|
28927
29051
|
}).strict().refine(actionFits, ACTION_FITS);
|
|
28928
29052
|
var sendFields = {
|
|
28929
|
-
completions: external_exports.array(CompletionSchema).min(1).max(20).optional().describe(
|
|
29053
|
+
completions: external_exports.array(CompletionSchema).min(1).max(20).optional().describe(
|
|
29054
|
+
"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."
|
|
29055
|
+
),
|
|
28930
29056
|
updates: external_exports.array(UpdateInputSchema).min(1).max(20).optional().describe(
|
|
28931
|
-
"News: progress, findings, a result. An update asks nothing. It reaches the person only when they asked for it (userExplicitlyRequested), when it answers something they said, or once its Goal is done; otherwise it is recorded as the Goal's progress
|
|
29057
|
+
"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."
|
|
28932
29058
|
),
|
|
28933
29059
|
answers: external_exports.array(AnswerInputSchema).min(1).max(20).optional().describe("Answers to Questions addressed to you."),
|
|
28934
29060
|
withdrawQuestionIds: external_exports.array(questionHandle).min(1).max(10).optional().describe(
|
|
28935
29061
|
"Questions you asked that no longer need an answer: you acted on them yourself, they no longer matter, or you asked wrongly. Each is cancelled, not answered: its card closes and nothing rings for it."
|
|
28936
29062
|
),
|
|
29063
|
+
bumpQuestionIds: external_exports.array(questionHandle).min(1).max(10).optional().describe(
|
|
29064
|
+
"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."
|
|
29065
|
+
),
|
|
28937
29066
|
questionDependencies: external_exports.array(QuestionDependencySchema).min(1).max(20).optional().describe(
|
|
28938
29067
|
"Add or remove what a Question you asked holds up, after asking it."
|
|
28939
29068
|
)
|
|
28940
29069
|
};
|
|
28941
29070
|
var ContactSchema = external_exports.object({
|
|
28942
29071
|
...sendFields,
|
|
28943
|
-
questions: external_exports.array(QuestionInputSchema).min(1).max(20).optional().describe("Questions for the person, one per object."),
|
|
29072
|
+
questions: external_exports.array(QuestionInputSchema).min(1).max(20).optional().describe("Questions for the person, one per object, each sent exactly as written, with no reading in between."),
|
|
28944
29073
|
/** RECEIVING (2I, I2; brain_prompts.md §2.2): the events this agent handled. */
|
|
28945
29074
|
ackEventIds: external_exports.array(external_exports.string().uuid()).min(1).max(100).optional().describe(
|
|
28946
29075
|
"The exact eventIds of the events you have handled: an acknowledgment (ACK). Reading alone acknowledges nothing, so an event comes back until you acknowledge it; after that the next batch can come. Each recipient acknowledges separately, for itself only. A Question you owe is answered (answers), never acknowledged away."
|
|
@@ -28949,22 +29078,34 @@ var ContactSchema = external_exports.object({
|
|
|
28949
29078
|
"Only controls when this returns. Sending: false (the default) returns at once; true waits up to about 45 seconds for a response to what you sent. Sending nothing: true (the default) waits up to about 45 seconds for anything addressed to you; false returns what is waiting now. It does not mean work is blocked, set urgency, or ask for a call. `waitOutcome` says which happened: `available`, `expired` (nothing arrived; wait again without sending again), or `not_waited`."
|
|
28950
29079
|
)
|
|
28951
29080
|
}).strict();
|
|
28952
|
-
var sendsAnything = (c) => !!(c.completions?.length || c.updates?.length || c.questions?.length || c.answers?.length || c.withdrawQuestionIds?.length || c.questionDependencies?.length);
|
|
29081
|
+
var sendsAnything = (c) => !!(c.completions?.length || c.updates?.length || c.questions?.length || c.answers?.length || c.withdrawQuestionIds?.length || c.bumpQuestionIds?.length || c.questionDependencies?.length);
|
|
28953
29082
|
var ContactWireSchema = external_exports.object({
|
|
28954
29083
|
operationId: external_exports.string().uuid(),
|
|
28955
29084
|
...sendFields,
|
|
28956
29085
|
questions: external_exports.array(QuestionWireSchema).min(1).max(20).optional()
|
|
28957
29086
|
}).strict().refine(sendsAnything, "a contact sends at least one update, question, answer, withdrawal or question dependency");
|
|
28958
29087
|
var CONTACT_SCHEMA = { type: "object", ...mcpInputSchema(ContactSchema) };
|
|
28959
|
-
var CONTACT_DESCRIPTION = "Send to and receive from the person: completions, updates, questions, answers to questions addressed to you, withdrawals
|
|
29088
|
+
var CONTACT_DESCRIPTION = "Send to and receive from the person: completions, updates, questions, answers to questions addressed to you, withdrawals, and what a question holds up. Every Goal named must exist: an unknown one refuses the whole contact. Each item applies on its own: read `results`, where a failed one names why.\n\n" + ASKING_RULES + `
|
|
28960
29089
|
|
|
28961
|
-
|
|
29090
|
+
LENGTH: the question, message or answer is the one point, at most ${ASK_MAX} characters; the rest goes in \`units\`, one idea each. Over a cap is refused by name and nothing is sent. Several results are several updates.
|
|
28962
29091
|
|
|
28963
|
-
UPDATES ask nothing
|
|
29092
|
+
UPDATES ask nothing. One reaches the person only when they asked for it, it answers something they said, or its Goal is done; else it is kept as progress. One that reaches them joins an open report card or a live call.
|
|
28964
29093
|
|
|
28965
|
-
|
|
28966
|
-
|
|
28967
|
-
|
|
29094
|
+
RECEIVING: contact({}) waits ~45 s; contact({wait:false}) returns \`events\` at once. Confirm the ones you handled with contact({ackEventIds}).`;
|
|
29095
|
+
var HELP_TOPICS = ["pairing", "listening", "receiving", "asking", "updates", "goals", "calls"];
|
|
29096
|
+
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.`;
|
|
29097
|
+
var HelpSchema = external_exports.object({
|
|
29098
|
+
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.")
|
|
29099
|
+
}).strict();
|
|
29100
|
+
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.";
|
|
29101
|
+
var AGENT_PROMPTS = [
|
|
29102
|
+
{
|
|
29103
|
+
name: "help",
|
|
29104
|
+
description: "How to use Paigy: the whole guide, or one topic of it.",
|
|
29105
|
+
arguments: [{ name: "topic", description: `One section: ${HELP_TOPICS.join(", ")}. Omit it for the whole guide.`, required: false }]
|
|
29106
|
+
},
|
|
29107
|
+
{ name: "welcome", description: "Start here: who you are on Paigy, then listen and collect your open work." }
|
|
29108
|
+
];
|
|
28968
29109
|
var CreateGoalSchema = external_exports.object({
|
|
28969
29110
|
outcome: external_exports.string().trim().min(1).max(1e4),
|
|
28970
29111
|
/** The work's NAME (#2115) — one to five words, how a person refers to it out loud ("the night
|
|
@@ -29065,9 +29206,12 @@ var GetGoalsSchema = external_exports.object({
|
|
|
29065
29206
|
history: external_exports.boolean().optional()
|
|
29066
29207
|
}).strict();
|
|
29067
29208
|
var GetDeliverySchema = external_exports.object({
|
|
29068
|
-
deliveryId: external_exports.string().uuid().describe("The Delivery id returned by contact or receive.")
|
|
29209
|
+
deliveryId: external_exports.string().uuid().describe("The Delivery id returned by contact or receive."),
|
|
29210
|
+
// WHAT WAS SAID ON A CALL (owner, 2026-10-26, Goal c743f4a4: "A flag on get_delivery", "Any of my agents").
|
|
29211
|
+
transcript: external_exports.boolean().optional().describe("For a Call: also return what was said on it, one page of spoken lines."),
|
|
29212
|
+
after: external_exports.string().max(40).optional().describe("With transcript: the next value the previous page returned, to read the next page.")
|
|
29069
29213
|
}).strict();
|
|
29070
|
-
var GET_DELIVERY_DESCRIPTION = "Read a Delivery in full: its whole ask, units, options and answers, plus current callState and callOutcome for a Call. Any agent of the same account may read it; another account is not disclosed. Reading never acknowledges or resends anything. Use this after a call or when receive names a Call you are waiting on.";
|
|
29214
|
+
var GET_DELIVERY_DESCRIPTION = "Read a Delivery in full: its whole ask, units, options and answers, plus current callState and callOutcome for a Call. For a Call, transcript: true adds what was said: each spoken line in order, who said it, and when from pickup, a page at a time. A line from the room, not the person, is marked room. Any agent of the same account may read it; another account is not disclosed. Reading never acknowledges or resends anything. Use this after a call or when receive names a Call you are waiting on.";
|
|
29071
29215
|
var GET_GOALS_DESCRIPTION = "Read one to ten Goals by goalIds, returned in the same order under goals (a read never puts you on them). history applies to every requested Goal. A refused read fails the call with its original refusal; no partial result is presented as complete. Each Goal includes its ten most recent other contributors (names, latest entry headlines and times), outcome, state, revision, progress, blockers, the conversation on it (each question with its options and what was decided), `next`, the one step to take, and `more`, where to read further. A question in that conversation reads `open` (nothing yet), `answered` (a choice was made, and `answer` carries it), `replied` (they said something and the read settled the question on their words \u2014 NO option of yours was chosen, and the words are the reply line beside it, so read that before you act), or `closed`. The conversation carries everything the person said, every open question and your newest entry; your older entries are left out and counted \u2014 history: true reads every entry in full. Every Goal of your person is readable, whichever of their agents owns it; another account's Goals are not disclosed.";
|
|
29072
29216
|
var SearchToolSchema = external_exports.object({
|
|
29073
29217
|
query: external_exports.string().trim().min(1).max(500),
|
|
@@ -29076,6 +29220,8 @@ var SearchToolSchema = external_exports.object({
|
|
|
29076
29220
|
limit: external_exports.number().int().min(1).max(20).optional()
|
|
29077
29221
|
}).strict();
|
|
29078
29222
|
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.";
|
|
29223
|
+
var READS = { readOnlyHint: true, destructiveHint: false, openWorldHint: false };
|
|
29224
|
+
var SENDS = { readOnlyHint: false, destructiveHint: true, openWorldHint: false };
|
|
29079
29225
|
var ConfigureIdentitySchema = external_exports.object({}).strict();
|
|
29080
29226
|
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.";
|
|
29081
29227
|
var CheckActivitySchema = external_exports.object({}).strict();
|
|
@@ -29087,14 +29233,16 @@ var SendFeedbackSchema = external_exports.object({
|
|
|
29087
29233
|
}).strict();
|
|
29088
29234
|
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.";
|
|
29089
29235
|
var AGENT_TOOLS = [
|
|
29090
|
-
{ name: "configure", description: CONFIGURE_IDENTITY_DESCRIPTION, inputSchema: mcpInputSchema(ConfigureIdentitySchema) },
|
|
29091
|
-
{ name: "contact", description: CONTACT_DESCRIPTION, inputSchema: CONTACT_SCHEMA },
|
|
29092
|
-
{ name: "manage_goals", description: MANAGE_GOALS_DESCRIPTION, inputSchema: mcpInputSchema(ManageGoalsToolSchema) },
|
|
29093
|
-
{ name: "get_delivery", description: GET_DELIVERY_DESCRIPTION, inputSchema: mcpInputSchema(GetDeliverySchema) },
|
|
29094
|
-
{ name: "get_goals", description: GET_GOALS_DESCRIPTION, inputSchema: mcpInputSchema(GetGoalsSchema) },
|
|
29095
|
-
{ name: "search", description: SEARCH_DESCRIPTION, inputSchema: mcpInputSchema(SearchToolSchema) },
|
|
29096
|
-
{ name: "check_activity", description: "Read your person's agents that contributed in the last 24 hours, newest first: at most 30 agents and their five most recently touched Goals, with their latest entry headline and time. Use get_goals to read a Goal and its other contributors before starting overlapping work. Read-only; no arguments.", inputSchema: mcpInputSchema(CheckActivitySchema) },
|
|
29097
|
-
{ name: "send_feedback", description: SEND_FEEDBACK_DESCRIPTION, inputSchema: mcpInputSchema(SendFeedbackSchema) }
|
|
29236
|
+
{ name: "configure", title: "Who am I", annotations: READS, description: CONFIGURE_IDENTITY_DESCRIPTION, inputSchema: mcpInputSchema(ConfigureIdentitySchema) },
|
|
29237
|
+
{ name: "contact", title: "Contact the person", annotations: SENDS, description: CONTACT_DESCRIPTION, inputSchema: CONTACT_SCHEMA },
|
|
29238
|
+
{ name: "manage_goals", title: "Manage Goals", annotations: SENDS, description: MANAGE_GOALS_DESCRIPTION, inputSchema: mcpInputSchema(ManageGoalsToolSchema) },
|
|
29239
|
+
{ name: "get_delivery", title: "Read a delivery", annotations: READS, description: GET_DELIVERY_DESCRIPTION, inputSchema: mcpInputSchema(GetDeliverySchema) },
|
|
29240
|
+
{ name: "get_goals", title: "Read Goals", annotations: READS, description: GET_GOALS_DESCRIPTION, inputSchema: mcpInputSchema(GetGoalsSchema) },
|
|
29241
|
+
{ name: "search", title: "Search history", annotations: READS, description: SEARCH_DESCRIPTION, inputSchema: mcpInputSchema(SearchToolSchema) },
|
|
29242
|
+
{ 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) },
|
|
29243
|
+
{ name: "send_feedback", title: "Send feedback to Paigy", annotations: SENDS, description: SEND_FEEDBACK_DESCRIPTION, inputSchema: mcpInputSchema(SendFeedbackSchema) },
|
|
29244
|
+
// THE GUIDE FROM INSIDE THE MCP (owner, 2026-10-27): the skill's text, needing no identity (`help.ts`).
|
|
29245
|
+
{ name: "help", title: "Paigy guide", annotations: READS, description: HELP_DESCRIPTION, inputSchema: mcpInputSchema(HelpSchema) }
|
|
29098
29246
|
];
|
|
29099
29247
|
var AGENT_TOOL_NAMES = AGENT_TOOLS.map((t) => t.name);
|
|
29100
29248
|
var id = external_exports.string().uuid();
|
|
@@ -29182,11 +29330,22 @@ var BrainMessageSchema = external_exports.union([
|
|
|
29182
29330
|
// A MESSAGE TO THE PERSON KEEPS ITS SENTENCES (turns.md): the talker writes them one by one, and each is
|
|
29183
29331
|
// its own unit of speech (`<cycle>:<key>:<n>`). `text` is the same words joined, for every reader of a
|
|
29184
29332
|
// message's words. Absent on results written before sentences.
|
|
29185
|
-
external_exports.object({
|
|
29333
|
+
external_exports.object({
|
|
29334
|
+
...messageBase,
|
|
29335
|
+
to: external_exports.object({ kind: external_exports.literal("user") }).strict(),
|
|
29336
|
+
sentences: external_exports.array(external_exports.string().min(1)).min(1).optional(),
|
|
29337
|
+
// THE REPORTS IT TELLS, BY THEIR OWN IDENTITY (call 9d1c096c, 2026-10-15): the talker's message names the report
|
|
29338
|
+
// Entries it speaks of, so the plan's line names that report rather than re-finding it by its Goal. Absent on
|
|
29339
|
+
// results written before it.
|
|
29340
|
+
tells: external_exports.array(external_exports.object({ id }).strict()).optional()
|
|
29341
|
+
}).strict(),
|
|
29186
29342
|
external_exports.object({
|
|
29187
29343
|
...messageBase,
|
|
29188
29344
|
to: external_exports.object({ kind: external_exports.literal("agent"), agentId: external_exports.string().regex(/^agent:(?!paigy$)\S+$/) }).strict(),
|
|
29189
29345
|
call: external_exports.object({ callId: id, listen: external_exports.literal(true) }).strict().optional(),
|
|
29346
|
+
// WHAT IT ASKS THE AGENT, IN UNDER TEN WORDS (owner, 2026-10-15: "Yes, add the summary"): the talker's own, stored
|
|
29347
|
+
// as the sent Entry's summary, which the recap's "Sent to <agent>: …" row shows. Absent on results written before it.
|
|
29348
|
+
summary: external_exports.string().optional(),
|
|
29190
29349
|
// THE PERSON ASKED TO BE CALLED BACK ONCE THIS AGENT'S WORK IS DONE (turns.md, step 0): the agent owes
|
|
29191
29350
|
// the call, and its next contact about it rings them (`public.callbacks`).
|
|
29192
29351
|
callback: external_exports.literal(true).optional()
|
|
@@ -29213,95 +29372,98 @@ var BrainResultSchema = external_exports.object({
|
|
|
29213
29372
|
next: BrainNextSchema,
|
|
29214
29373
|
search: BrainSearchSchema.optional()
|
|
29215
29374
|
}).strict();
|
|
29216
|
-
var
|
|
29375
|
+
var str2 = external_exports.string();
|
|
29217
29376
|
var strs = external_exports.array(external_exports.string());
|
|
29218
29377
|
var CompactResultSchema = external_exports.object({
|
|
29219
|
-
next: external_exports.object({ say: strs, then: external_exports.enum(["listen", "hold", "end", "none"]), waitFor: strs, reason:
|
|
29220
|
-
messages: external_exports.array(external_exports.object({ key:
|
|
29221
|
-
entries: external_exports.array(external_exports.object({ key:
|
|
29222
|
-
answers: external_exports.array(external_exports.object({ question:
|
|
29378
|
+
next: external_exports.object({ say: strs, then: external_exports.enum(["listen", "hold", "end", "none"]), waitFor: strs, reason: str2, instructions: strs }).strict(),
|
|
29379
|
+
messages: external_exports.array(external_exports.object({ key: str2, to: str2, text: str2, about: strs, entries: strs, owed: strs, inviteToCall: external_exports.boolean() }).strict()),
|
|
29380
|
+
entries: external_exports.array(external_exports.object({ key: str2, from: str2, on: strs }).strict()),
|
|
29381
|
+
answers: external_exports.array(external_exports.object({ question: str2, entries: strs, summary: str2, picked: strs }).strict()),
|
|
29223
29382
|
changes: external_exports.array(external_exports.object({
|
|
29224
|
-
key:
|
|
29383
|
+
key: str2,
|
|
29225
29384
|
what: external_exports.enum(["goal", "question", "lesson"]),
|
|
29226
29385
|
op: external_exports.enum(["create", "edit", "assign", "open", "complete", "cancel", "defer", "move", "block", "unblock", "withdraw", "remember", "revise"]),
|
|
29227
|
-
id:
|
|
29228
|
-
text:
|
|
29229
|
-
title:
|
|
29230
|
-
who:
|
|
29231
|
-
under:
|
|
29386
|
+
id: str2,
|
|
29387
|
+
text: str2,
|
|
29388
|
+
title: str2,
|
|
29389
|
+
who: str2,
|
|
29390
|
+
under: str2,
|
|
29232
29391
|
gate: external_exports.enum(["start", "complete", "answer", "none"]),
|
|
29233
|
-
options: external_exports.array(external_exports.object({ id:
|
|
29392
|
+
options: external_exports.array(external_exports.object({ id: str2, label: str2 }).strict()),
|
|
29234
29393
|
pick: external_exports.enum(["one", "many", "rank", "words"]),
|
|
29235
29394
|
entries: strs
|
|
29236
29395
|
}).strict()),
|
|
29237
29396
|
feedback: external_exports.array(strs),
|
|
29238
|
-
search: external_exports.object({ query:
|
|
29397
|
+
search: external_exports.object({ query: str2, within: strs, goal: str2 }).strict()
|
|
29239
29398
|
}).strict();
|
|
29240
29399
|
var COMPACT_RESULT_JSON_SCHEMA = (({ $schema: _, ...rest }) => rest)(
|
|
29241
29400
|
zodToJsonSchema(CompactResultSchema, { $refStrategy: "none" })
|
|
29242
29401
|
);
|
|
29243
|
-
var
|
|
29402
|
+
var str3 = external_exports.string();
|
|
29244
29403
|
var strs2 = external_exports.array(external_exports.string());
|
|
29245
29404
|
var TalkerReplySchema = external_exports.object({
|
|
29246
29405
|
/** What to say and send, messages to the person first: spoken in the order written. `to` is "user"
|
|
29247
29406
|
* or an agent's handle; `sentences` is what a message to the person says, one short sentence each
|
|
29248
|
-
* ([] to an agent); `text` is what a message to an agent says ("" to the person); `
|
|
29407
|
+
* ([] to an agent); `text` is what a message to an agent says ("" to the person); `summary` is what it
|
|
29408
|
+
* asks the agent, in under ten words, as the person would put it ("" to the person; owner, 2026-10-15:
|
|
29409
|
+
* "Yes, add the summary"), which the recap's "Sent to <agent>: …" row shows; `about` names
|
|
29249
29410
|
* handles; `blocks` is the item a question to an agent must be answered before ("" for none);
|
|
29250
29411
|
* `callback` is true on a message to the agent doing work the person asked to be called back about
|
|
29251
29412
|
* once it is done (false otherwise): that agent then owes the call (turns.md, step 0). */
|
|
29252
|
-
messages: external_exports.array(external_exports.object({ key:
|
|
29413
|
+
messages: external_exports.array(external_exports.object({ key: str3, to: str3, sentences: strs2, text: str3, summary: str3, about: strs2, blocks: str3, callback: external_exports.boolean() }).strict()),
|
|
29253
29414
|
/** What the call does next: listen, hold (the person asked for a moment) or end (they asked to). */
|
|
29254
29415
|
then: external_exports.enum(["listen", "hold", "end"]),
|
|
29255
29416
|
/** The person's replies to items (replies, owner 2026-10-07): the item's handle, the chosen option
|
|
29256
29417
|
* IDs, the line handles, how they replied in under ten words (keeping any condition), and `defer`:
|
|
29257
29418
|
* "" when their words settle the item, else what a reply that puts it off waits for -- "call" (the
|
|
29258
29419
|
* end of this call), a question's handle (that question's answer) or an ISO time. */
|
|
29259
|
-
replies: external_exports.array(external_exports.object({ item:
|
|
29420
|
+
replies: external_exports.array(external_exports.object({ item: str3, options: strs2, lines: strs2, summary: str3, defer: str3 }).strict()),
|
|
29260
29421
|
/** The line handles that tell the talker how to run this call; they last until it ends and reach no agent. */
|
|
29261
29422
|
instruction: strs2,
|
|
29262
29423
|
/** The line handles the filer acts on, and the only ones it reads (3e): new work, a change to existing
|
|
29263
29424
|
* work, feedback on Paigy, anything said to an agent, and any rule meant to outlast the call. */
|
|
29264
29425
|
file: strs2,
|
|
29265
29426
|
/** Evidence to fetch for a second round: a search, an item's full text, or an agent by name. */
|
|
29266
|
-
need: external_exports.object({ kind: external_exports.enum(["search", "item", "agent", ""]), text:
|
|
29427
|
+
need: external_exports.object({ kind: external_exports.enum(["search", "item", "agent", ""]), text: str3 }).strict(),
|
|
29267
29428
|
/** The handle of the item to explain ("" for none). */
|
|
29268
|
-
explain:
|
|
29429
|
+
explain: str3
|
|
29269
29430
|
}).strict();
|
|
29270
29431
|
var TALKER_REPLY_JSON_SCHEMA = (({ $schema: _, ...rest }) => rest)(
|
|
29271
29432
|
zodToJsonSchema(TalkerReplySchema, { $refStrategy: "none" })
|
|
29272
29433
|
);
|
|
29273
|
-
var
|
|
29434
|
+
var str4 = external_exports.string();
|
|
29274
29435
|
var strs3 = external_exports.array(external_exports.string());
|
|
29275
29436
|
var FilerReplySchema = external_exports.object({
|
|
29276
|
-
/** Which Goals each new line goes on: a line's handle, Goal handles (or keys of new Goals
|
|
29277
|
-
* the line says in at most
|
|
29278
|
-
|
|
29437
|
+
/** Which Goals each new line goes on: a line's handle, Goal handles (or keys of new Goals: a line that asks
|
|
29438
|
+
* for new work goes on the Goal it creates, owner 2026-10-26), and what the line says in at most twenty
|
|
29439
|
+
* words (owner, 2026-10-26: "bump it from 10 to 20 words"). */
|
|
29440
|
+
filed: external_exports.array(external_exports.object({ line: str4, goals: strs3, summary: str4 }).strict()),
|
|
29279
29441
|
goals: external_exports.array(external_exports.object({
|
|
29280
29442
|
op: external_exports.enum(["create", "edit", "complete", "cancel", "reopen", "assign", "defer", "move", "block", "unblock"]),
|
|
29281
|
-
key:
|
|
29282
|
-
goal:
|
|
29283
|
-
title:
|
|
29284
|
-
outcome:
|
|
29285
|
-
owner:
|
|
29286
|
-
under:
|
|
29287
|
-
until:
|
|
29288
|
-
on:
|
|
29443
|
+
key: str4,
|
|
29444
|
+
goal: str4,
|
|
29445
|
+
title: str4,
|
|
29446
|
+
outcome: str4,
|
|
29447
|
+
owner: str4,
|
|
29448
|
+
under: str4,
|
|
29449
|
+
until: str4,
|
|
29450
|
+
on: str4,
|
|
29289
29451
|
gate: external_exports.enum(["start", "complete", "answer", ""]),
|
|
29290
|
-
why:
|
|
29452
|
+
why: str4
|
|
29291
29453
|
}).strict()),
|
|
29292
29454
|
questions: external_exports.array(external_exports.object({
|
|
29293
29455
|
op: external_exports.enum(["create", "edit", "assign", "withdraw"]),
|
|
29294
|
-
key:
|
|
29295
|
-
question:
|
|
29296
|
-
text:
|
|
29297
|
-
summary:
|
|
29298
|
-
to:
|
|
29299
|
-
goal:
|
|
29300
|
-
options: external_exports.array(external_exports.object({ id:
|
|
29456
|
+
key: str4,
|
|
29457
|
+
question: str4,
|
|
29458
|
+
text: str4,
|
|
29459
|
+
summary: str4,
|
|
29460
|
+
to: str4,
|
|
29461
|
+
goal: str4,
|
|
29462
|
+
options: external_exports.array(external_exports.object({ id: str4, label: str4 }).strict()),
|
|
29301
29463
|
pick: external_exports.enum(["one", "many", "rank", "words", ""]),
|
|
29302
|
-
blocks:
|
|
29464
|
+
blocks: str4
|
|
29303
29465
|
}).strict()),
|
|
29304
|
-
lessons: external_exports.array(external_exports.object({ op: external_exports.enum(["remember", "revise", "withdraw"]), lesson:
|
|
29466
|
+
lessons: external_exports.array(external_exports.object({ op: external_exports.enum(["remember", "revise", "withdraw"]), lesson: str4, text: str4, scope: str4 }).strict()),
|
|
29305
29467
|
/** Line handles whose words comment on Paigy itself. */
|
|
29306
29468
|
feedback: strs3
|
|
29307
29469
|
}).strict();
|
|
@@ -29362,6 +29524,27 @@ var TidyReplySchema = external_exports.object({
|
|
|
29362
29524
|
var TIDY_REPLY_JSON_SCHEMA = (({ $schema: _, ...rest }) => rest)(
|
|
29363
29525
|
zodToJsonSchema(TidyReplySchema, { $refStrategy: "none" })
|
|
29364
29526
|
);
|
|
29527
|
+
var HandoutReplySchema = external_exports.object({
|
|
29528
|
+
assign: external_exports.array(external_exports.object({
|
|
29529
|
+
/** The Goal's handle (G). */
|
|
29530
|
+
goal: external_exports.string(),
|
|
29531
|
+
/** The agent's handle (A). */
|
|
29532
|
+
to: external_exports.string(),
|
|
29533
|
+
/** At most ten words, naming the Goal of theirs it is most like: the reason the hand-out records. */
|
|
29534
|
+
why: external_exports.string()
|
|
29535
|
+
}).strict()),
|
|
29536
|
+
/** The Goals no listed agent's work is even loosely like: Paigy starts a session for them (owner, 2026-10-24,
|
|
29537
|
+
* Goal 37603006, "One per family of related Goals"). */
|
|
29538
|
+
new: external_exports.array(external_exports.object({
|
|
29539
|
+
/** The Goal's handle (G). */
|
|
29540
|
+
goal: external_exports.string(),
|
|
29541
|
+
/** At most ten words: why nothing active fits it. */
|
|
29542
|
+
why: external_exports.string()
|
|
29543
|
+
}).strict())
|
|
29544
|
+
}).strict();
|
|
29545
|
+
var HANDOUT_REPLY_JSON_SCHEMA = (({ $schema: _, ...rest }) => rest)(
|
|
29546
|
+
zodToJsonSchema(HandoutReplySchema, { $refStrategy: "none" })
|
|
29547
|
+
);
|
|
29365
29548
|
function entryUnit(entry) {
|
|
29366
29549
|
if (entry.kind !== "contribution" || !entry.aboutId) return null;
|
|
29367
29550
|
const plain = entry.content && "plain" in entry.content ? entry.content.plain : null;
|
|
@@ -29497,7 +29680,7 @@ var NotifyRequestFields = external_exports.object({
|
|
|
29497
29680
|
* derive agent-side before sealing, so the server only ever shapes plaintext). */
|
|
29498
29681
|
// 10k, not a sentence budget. What the human hears is bounded by the BROKER — it splits
|
|
29499
29682
|
// the ask into topics and gives each one at most three sentences and one question
|
|
29500
|
-
// (docs/
|
|
29683
|
+
// (docs/history/agenda-design.md) — not by a wire cap the agent has to pre-summarize under.
|
|
29501
29684
|
// Owner, 2026-07-28: "our actual limitation on how long something is to the user should
|
|
29502
29685
|
// come from the broker splitting and summarizing." The cap that remains is a size guard.
|
|
29503
29686
|
ask: external_exports.string().min(1).max(1e4).optional().describe(
|
|
@@ -29574,7 +29757,7 @@ var UserAnswerSchema = external_exports.discriminatedUnion("kind", [
|
|
|
29574
29757
|
external_exports.object({ kind: external_exports.literal("clarify"), chunks: external_exports.array(external_exports.string()).min(1) }),
|
|
29575
29758
|
external_exports.object({ kind: external_exports.literal("confirm"), approved: external_exports.boolean() }),
|
|
29576
29759
|
external_exports.object({ kind: external_exports.literal("turns"), turns: external_exports.array(TurnSchema).min(1) }),
|
|
29577
|
-
/** An auto-answer derived from the user's PAST decisions (docs/
|
|
29760
|
+
/** An auto-answer derived from the user's PAST decisions (docs/history/precedent-design.md §2):
|
|
29578
29761
|
* delivered through the same settle/await path as a human answer, carrying the judge's
|
|
29579
29762
|
* derivation and the precedent ids it grew from. Always paired with a visible trail
|
|
29580
29763
|
* card the user can reply to — the broker never overrides the user. */
|
|
@@ -29725,6 +29908,21 @@ var AgendaTurnSchema = external_exports.object({
|
|
|
29725
29908
|
* the phone (`asking`, so the agenda goes gold and its options show) without treating the line as a
|
|
29726
29909
|
* question turn — the talker owns re-asking and the waits, so `question` stays null. */
|
|
29727
29910
|
onTable: external_exports.boolean().optional(),
|
|
29911
|
+
/** THE CARRIED ITEM THIS LINE TELLS (Goal 2a1e50eb, owner 2026-10-14: "Build the whole design") — a
|
|
29912
|
+
* request the Call carries that asks NOTHING: a report, a progress note, another agent's waiting news.
|
|
29913
|
+
* Its request Entry id, so the phone can make that agenda row the current one while it is read
|
|
29914
|
+
* (`telling` on the `turn` topic, `docs/clients/app/walk/design.md` §11).
|
|
29915
|
+
*
|
|
29916
|
+
* A FIELD OF ITS OWN, NEVER `claimId`: the claim is the RETURN identity — answers route by it and the
|
|
29917
|
+
* record tags the line with it (`workId`) — and an answer must never route to an Entry that asks
|
|
29918
|
+
* nothing. Absent on a turn speaking for a question (`claimId` says that) and on one speaking for no
|
|
29919
|
+
* carried item at all (an opener, a sign-off, Paigy's own line). */
|
|
29920
|
+
telling: external_exports.string().optional(),
|
|
29921
|
+
/** PAIGY'S OWN LINE (owner, 2026-10-15; calls ed2cbdce, ad50ad25): a turn that speaks for no item -- an
|
|
29922
|
+
* opener, a sign-off, a reply about nothing an agent asked or told -- is recorded as Paigy's, not as the
|
|
29923
|
+
* agent that rang. Absent on every turn that speaks for an item (`agentId` names whose), and on plans
|
|
29924
|
+
* from before it: a bot that does not know it records the ringing agent, as before. */
|
|
29925
|
+
speaksFor: external_exports.literal("paigy").optional(),
|
|
29728
29926
|
select: SelectShapeSchema.optional(),
|
|
29729
29927
|
options: external_exports.array(OptionSchema.omit({ id: true })).optional(),
|
|
29730
29928
|
/* `pace` STOOD HERE (#826). A turn could carry seconds and the model chose them. The walk
|
|
@@ -29813,7 +30011,7 @@ var InboxItemSchema = external_exports.object({
|
|
|
29813
30011
|
questions: external_exports.array(CallQuestionSchema).optional(),
|
|
29814
30012
|
/** The same call carrying order, including request Entries with no DecisionNeed as reports.
|
|
29815
30013
|
* Additive: questions stays decision-only for every other surface and older bundles. */
|
|
29816
|
-
callItems: external_exports.array(CallQuestionSchema.extend({ state: external_exports.enum(["open", "answered", "report"]) })).optional(),
|
|
30014
|
+
callItems: external_exports.array(CallQuestionSchema.extend({ state: external_exports.enum(["open", "answered", "report"]), acknowledged: external_exports.boolean().optional() })).optional(),
|
|
29817
30015
|
visuals: external_exports.array(VisualSchema).optional(),
|
|
29818
30016
|
/** The connected agent's name (the single pairing name — user-typed, or the
|
|
29819
30017
|
* agent's suggestion, or a default silly name). */
|
|
@@ -29824,6 +30022,10 @@ var InboxItemSchema = external_exports.object({
|
|
|
29824
30022
|
branch: external_exports.string().optional(),
|
|
29825
30023
|
createdAt: external_exports.string().datetime(),
|
|
29826
30024
|
snoozedUntil: external_exports.string().datetime().optional(),
|
|
30025
|
+
/** A past card the person dismissed that Restore can take back (#2699): its newest close is their
|
|
30026
|
+
* dismissal, with what it withdrew recorded (`private.restore_delivery`). Absent on everything else —
|
|
30027
|
+
* a put-off, a card an ended Goal or a settled question closed, and every open card. */
|
|
30028
|
+
restorable: external_exports.boolean().optional(),
|
|
29827
30029
|
agentState: AgentStateSchema.default("idle"),
|
|
29828
30030
|
/** Whose action the item is waiting on: "you" = an agent asked you (the default,
|
|
29829
30031
|
* every agent→user notification); "agent" = you sent a request and it's awaiting the
|
|
@@ -29833,11 +30035,6 @@ var InboxItemSchema = external_exports.object({
|
|
|
29833
30035
|
* the agent (provider-agnostic; set server-side). Absent = no hard error. Drives the inbox
|
|
29834
30036
|
* error badge + Retry. */
|
|
29835
30037
|
error: external_exports.string().optional(),
|
|
29836
|
-
/** WHEN THIS AGENT WORK WENT QUIET (turn="agent"), by the one rule (`coldSince`: three days
|
|
29837
|
-
* with nothing said), or absent while it is not stalled. The inbox's stalled badge reads
|
|
29838
|
-
* this and nothing else (2026-09-23: a 3-minute age rule badged every live Goal stalled,
|
|
29839
|
-
* and "dismiss the stalled ones" cancelled 37 pieces of live work). */
|
|
29840
|
-
cold: external_exports.string().datetime().optional(),
|
|
29841
30038
|
clarifies: external_exports.string().optional(),
|
|
29842
30039
|
/** THIS CARD'S QUESTION IS ON A LIVE CALL (owner, 2026-09-24: "Mark it while the call is
|
|
29843
30040
|
* live"). Present only while an open Call Delivery carries the card's request Entry — read
|
|
@@ -29875,9 +30072,35 @@ var InboxItemSchema = external_exports.object({
|
|
|
29875
30072
|
"Labels for a select:'confirm' paige \u2014 'yesno' (Yes/No) or 'approve' (Approve/Deny). Ignored unless select is 'confirm'."
|
|
29876
30073
|
),
|
|
29877
30074
|
/** Real downstream work is stuck behind this one — set by the agent, independent of
|
|
29878
|
-
* urgency (see the main README's "premier use case" + docs/
|
|
30075
|
+
* urgency (see the main README's "premier use case" + docs/history/notify-states.md). Drives the
|
|
29879
30076
|
* inbox's blocking badge and the extra confirm step before dismissing it. */
|
|
29880
30077
|
blocking: external_exports.boolean().default(false),
|
|
30078
|
+
/** WHAT FREED THIS QUESTION (owner, 2026-10-16, Goal 2383ef14: "we don't really show the question
|
|
30079
|
+
* at the top until the question it could reply to with is resolved. And then we show it again
|
|
30080
|
+
* with the context of the other thing that was resolved"; asked how it should carry that, "The
|
|
30081
|
+
* answer above it"). A question they answered with a question of their own waits for theirs
|
|
30082
|
+
* (`private.ask_back`) and drops out of the front while it waits; when it comes back, the card
|
|
30083
|
+
* draws their question and the answer it got ABOVE the ask, as one card. Absent on a question
|
|
30084
|
+
* nothing ever held back. */
|
|
30085
|
+
freedBy: external_exports.object({
|
|
30086
|
+
questionId: external_exports.string(),
|
|
30087
|
+
asked: external_exports.string(),
|
|
30088
|
+
answer: external_exports.string(),
|
|
30089
|
+
answeredAt: external_exports.string(),
|
|
30090
|
+
/** The answer in ten words, when the talker wrote one beside it. */
|
|
30091
|
+
summary: external_exports.string().optional()
|
|
30092
|
+
}).optional(),
|
|
30093
|
+
/** WHAT THIS CARD ANSWERS (owner, 2026-10-27, Goal 81b6a9d6: "this reads very clearly as an answer to
|
|
30094
|
+
* something I asked, but I don't see the question… To show the question near the top of the card").
|
|
30095
|
+
* An agent's card that is its answer to one of the person's own questions carries that question's
|
|
30096
|
+
* words, drawn above it as "You asked" (`public.questions_answered_by`, read beside the card read).
|
|
30097
|
+
* Absent on every card that answers nothing of theirs, and on a held question, which has `freedBy`. */
|
|
30098
|
+
answering: external_exports.object({ asked: external_exports.string() }).optional(),
|
|
30099
|
+
/** WHEN ITS AGENT LAST BUMPED THIS QUESTION (#2855, `contact`'s `bumpQuestionIds`): the agent asked
|
|
30100
|
+
* the person to notice it again, and For you puts it first, the latest bump on top
|
|
30101
|
+
* (`question/order.ts`). Absent on a question never bumped, and on every card from an API older
|
|
30102
|
+
* than the bump. */
|
|
30103
|
+
bumpedAt: external_exports.string().optional(),
|
|
29881
30104
|
/** The user's locked-in answer; present only for replied items (GET /api/replied/:id). */
|
|
29882
30105
|
answer: UserAnswerSchema.optional(),
|
|
29883
30106
|
/** THE TARGET FACTS A CARD RENDERS (#1796 point 5, 2026-09-11): the Delivery it is a view of,
|
|
@@ -29904,7 +30127,7 @@ var InboxItemSchema = external_exports.object({
|
|
|
29904
30127
|
*
|
|
29905
30128
|
* THE PAYLOAD'S OWN HASH, NEVER A STAMP ON THE WORK — the same mechanism as `QueueItem.rev`
|
|
29906
30129
|
* (#2928) and an entry's (#3018), for the same reason: a card shows facts no `updated_at` of its
|
|
29907
|
-
* own moves (its Goal's state and name,
|
|
30130
|
+
* own moves (its Goal's state and name, whether a ring is
|
|
29908
30131
|
* live). Optional, so a fixture, the demo and the archive lens need not spell one, and a card
|
|
29909
30132
|
* with no rev is simply always re-sent. */
|
|
29910
30133
|
rev: external_exports.string().optional()
|
|
@@ -29939,6 +30162,7 @@ var MissedCallSchema = external_exports.enum([
|
|
|
29939
30162
|
]);
|
|
29940
30163
|
var clock = (h) => h === 0 ? "midnight" : h === 12 ? "noon" : h < 12 ? `${h} am` : `${h - 12} pm`;
|
|
29941
30164
|
var QUIET = ` Nothing rings from ${clock(NIGHT.from)} to ${clock(NIGHT.to)} your time; the count waits for morning.`;
|
|
30165
|
+
var THEIR_QUIET = ` Nothing rings from ${clock(NIGHT.from)} to ${clock(NIGHT.to)} their time; the count waits for morning.`;
|
|
29942
30166
|
var BrokerTuningSchema = external_exports.object({
|
|
29943
30167
|
/** 'none' = skip the spoken ack after a mapped answer (power users find it slow). */
|
|
29944
30168
|
ackVerbosity: external_exports.enum(["normal", "none"]).optional(),
|
|
@@ -29981,12 +30205,9 @@ var UserSettingsSchema = external_exports.object({
|
|
|
29981
30205
|
* must not silently reset this privacy choice. Absent = leave unchanged on
|
|
29982
30206
|
* write, 'hosted' on read (see store.ts). */
|
|
29983
30207
|
voiceMode: external_exports.enum(["hosted", "on_device"]).optional(),
|
|
29984
|
-
/**
|
|
29985
|
-
*
|
|
29986
|
-
*
|
|
29987
|
-
* object must not silently turn it back on. Absent = leave unchanged on write, true on
|
|
29988
|
-
* read (see store.ts). */
|
|
29989
|
-
talk: external_exports.boolean().optional(),
|
|
30208
|
+
/** `talk` lived here until #2373: it gated auto-play, which went in #2374. An older bundle's
|
|
30209
|
+
* `talk` is stripped like `silentPush` was, and the `user_settings.talk` column went in
|
|
30210
|
+
* 20261028142255. */
|
|
29990
30211
|
/** CALL DIAGNOSTICS (owner, 2026-10-01): the call report carries each listen and the bot's own
|
|
29991
30212
|
* load timings. SERVER-SET, no UI — on for every account that existed on 2026-10-01, off for
|
|
29992
30213
|
* newer ones (migration 20261001132859). Read-only here: the settings PATCH never writes it. */
|
|
@@ -30063,7 +30284,8 @@ var ConnectionSummarySchema = external_exports.object({
|
|
|
30063
30284
|
kind: external_exports.enum(["device", "agent"]).optional(),
|
|
30064
30285
|
/** For an agent, the token id of the DEVICE that minted it — so agents group under their
|
|
30065
30286
|
* machine, and revoking a device cascades to them. Null on devices, and on unlinked
|
|
30066
|
-
* agents (
|
|
30287
|
+
* agents (provider-managed, hatched by another agent, or minted before the link existed);
|
|
30288
|
+
* a phone-launched agent is linked to the computer it runs on since #1602. */
|
|
30067
30289
|
mintedByDevice: external_exports.string().nullable().optional(),
|
|
30068
30290
|
device: external_exports.string().nullable(),
|
|
30069
30291
|
/** The agent's display name (the single pairing name). */
|
|
@@ -30077,7 +30299,7 @@ var ConnectionSummarySchema = external_exports.object({
|
|
|
30077
30299
|
* user on the agent's own page. null = no ceiling (today's behaviour for every
|
|
30078
30300
|
* connection). Android binds importance to a relationship rather than to each message,
|
|
30079
30301
|
* and that is the thing our roster could not say: "Marlow may always call me; Otto
|
|
30080
|
-
* never may" (docs/
|
|
30302
|
+
* never may" (docs/history/party-navigation-design.md, gap 2). Clamped in `arbitrateLevel`, so it binds
|
|
30081
30303
|
* every surface at once and outranks even `sessionMode: all_calls` — a mode the user
|
|
30082
30304
|
* set once must not overrule a rule they set about one agent. */
|
|
30083
30305
|
reach: NotifyLevelSchema.nullable().optional(),
|
|
@@ -30092,6 +30314,12 @@ var ConnectionSummarySchema = external_exports.object({
|
|
|
30092
30314
|
* its Goals — wrote on one or recorded an operation (`tokens.last_worked_at`). Within
|
|
30093
30315
|
* `WORKING_MS` it is working; otherwise it is connected but idle. Null = not seen working yet. */
|
|
30094
30316
|
lastWorkedAt: external_exports.string().datetime().nullable().optional(),
|
|
30317
|
+
/** A TERMINAL SESSION'S ONLY PULSE (`tokens.listened_at`): `paigy-listen` stamps it on every sweep
|
|
30318
|
+
* (90 s). It is deliberately NOT presence — `last_seen_at` is the desktop host's beat, and a
|
|
30319
|
+
* listener orphaned from a dead conversation must not light the live dot — but it is the one fact
|
|
30320
|
+
* that says a terminal session's process is UP, which is why the wake already reads it
|
|
30321
|
+
* (`wake.ts`, `listener`). Null = no listener sweeping. */
|
|
30322
|
+
listenedAt: external_exports.string().datetime().nullable().optional(),
|
|
30095
30323
|
/** The oldest of its Goals that is `ready` for it — work handed to it that nobody has started.
|
|
30096
30324
|
* With no work of its own for `WORKING_MS`, an agent sitting on this is not taking its work. */
|
|
30097
30325
|
oldestReadyAt: external_exports.string().datetime().nullable().optional(),
|
|
@@ -30236,12 +30464,14 @@ var QueueItemSchema = external_exports.object({
|
|
|
30236
30464
|
/** Its questions: every OPEN one, and at most ten settled, newest settled first
|
|
30237
30465
|
* (20260929133308) — the page decides which of them to show. NOT the whole set: `asked` and
|
|
30238
30466
|
* `answered` are, and a settled one's words are a line (280 characters), its body read when the
|
|
30239
|
-
* question is opened.
|
|
30467
|
+
* question is opened. Never a CANCELLED one (withdrawn, dismissed, or its Goal or call ended): it
|
|
30468
|
+
* asks nothing of anyone (#3723). */
|
|
30240
30469
|
questions: external_exports.array(QueueQuestionSchema).default([]),
|
|
30241
30470
|
/** HOW MANY QUESTIONS THIS WORK HAS ASKED, and how many are answered — the Goal's own totals,
|
|
30242
30471
|
* bounded at 100 server-side. A tally counted off `questions` is a wrong number that looks
|
|
30243
30472
|
* right once the cap bites (`walk/trees.ts` `tallyOf`). Optional, and defaulted from the array
|
|
30244
|
-
* by the projection, so hand-built queues (fixtures, the demo) need not spell them.
|
|
30473
|
+
* by the projection, so hand-built queues (fixtures, the demo) need not spell them. A cancelled
|
|
30474
|
+
* question is not asked (#3725). */
|
|
30245
30475
|
asked: external_exports.number().optional(),
|
|
30246
30476
|
answered: external_exports.number().optional(),
|
|
30247
30477
|
/** Every note on it the person replied to (`QueueReplySchema`) — the page decides which to show.
|
|
@@ -30256,6 +30486,10 @@ var QueueItemSchema = external_exports.object({
|
|
|
30256
30486
|
* as progress). `updatedAt` moves for reasons nobody chose — a
|
|
30257
30487
|
* state recomputed, a review flag — so it cannot tell work in hand from work gone quiet. */
|
|
30258
30488
|
lastProgressAt: external_exports.string().nullable().optional(),
|
|
30489
|
+
/** WHEN AN AGENT LAST ACTED ON IT (owner, 2026-10-27: "Move it now", Goal 567258dc): its newest agent write, an
|
|
30490
|
+
* Entry or a Goal change, Paigy's excluded (`goals.worked_at`). What keeps work an agent is writing on from
|
|
30491
|
+
* reading as gone quiet (`coldSince`); absent on a door that does not carry it. */
|
|
30492
|
+
workedAt: external_exports.string().nullable().optional(),
|
|
30259
30493
|
/** THE GOAL'S NEWEST WORD, FROM EITHER SIDE (owner, 2026-09-27): the newest Entry on it, of any
|
|
30260
30494
|
* kind — what the person added ("Add to this"), their reply, the agent's ask or its progress
|
|
30261
30495
|
* note. A progress note is an Entry, so this is already the newer of the two: the person's note
|
|
@@ -30415,7 +30649,7 @@ var DeviceTokenSchema = external_exports.object({
|
|
|
30415
30649
|
* the thread each time (host.ts, live catch 2026-08-06 — prompt-papered until now). */
|
|
30416
30650
|
workspace: external_exports.string().nullable().optional(),
|
|
30417
30651
|
/** Local host recovery must preserve the launch's runtime and Paigy identity. */
|
|
30418
|
-
harness: external_exports.enum(["claude", "codex", "agy"]).optional(),
|
|
30652
|
+
harness: external_exports.enum(["claude", "codex", "agy", "grok"]).optional(),
|
|
30419
30653
|
session_id: external_exports.string().uuid().optional(),
|
|
30420
30654
|
/** A conversation the host must not resume: its context is full, so every turn fails
|
|
30421
30655
|
* ("Prompt is too long"). Written when a run hits it (`run.ts` `onFull`); the host skips a slot
|
|
@@ -30502,9 +30736,6 @@ var AgentRowSchema = ComputerRowSchema.extend({
|
|
|
30502
30736
|
* (`agent_holds`); null when that read failed. */
|
|
30503
30737
|
holds: external_exports.array(external_exports.object({ id: external_exports.string(), title: external_exports.string() })).nullable(),
|
|
30504
30738
|
held: external_exports.number().int().nullable(),
|
|
30505
|
-
/** The earliest instant any Goal it holds went quiet, by the one rule (`coldSince`); null
|
|
30506
|
-
* while none has, or when that read failed. */
|
|
30507
|
-
cold: external_exports.string().datetime().nullable(),
|
|
30508
30739
|
/** The newest line of its working log, and when the harness saw it. */
|
|
30509
30740
|
line: external_exports.string().nullable(),
|
|
30510
30741
|
lineAt: external_exports.string().datetime().nullable()
|
|
@@ -30548,6 +30779,11 @@ var CallRecapSchema = external_exports.object({
|
|
|
30548
30779
|
durationMs: external_exports.number().nullable(),
|
|
30549
30780
|
/** Bot-clock pickup offset; absent before the timestamp release, null before its report lands. */
|
|
30550
30781
|
pickupMs: external_exports.number().nullable().optional(),
|
|
30782
|
+
/** STILL FILING (20261026182117): the call has not ended on the server, or it has and a brain cycle on it is
|
|
30783
|
+
* still pending, the next writer, which may still settle, file or start something. What the close itself
|
|
30784
|
+
* waits for (`private.close_call`). `status` cannot say it: nothing writes "finalizing", and a call reads
|
|
30785
|
+
* "open" until the sweep closes it, after nothing is pending. Absent from an API before it. */
|
|
30786
|
+
filing: external_exports.boolean().optional(),
|
|
30551
30787
|
agents: external_exports.array(external_exports.object({ id: external_exports.string(), name: external_exports.string().nullable() }))
|
|
30552
30788
|
}),
|
|
30553
30789
|
topics: external_exports.array(external_exports.object({
|
|
@@ -30556,7 +30792,7 @@ var CallRecapSchema = external_exports.object({
|
|
|
30556
30792
|
owner: external_exports.string(),
|
|
30557
30793
|
state: external_exports.string(),
|
|
30558
30794
|
/** Presented Entry content and its author, separately from the current Goal owner. */
|
|
30559
|
-
items: external_exports.array(external_exports.object({ entryId: external_exports.string(), author: external_exports.string(), text: external_exports.string(), summary: external_exports.string().nullable() })).optional(),
|
|
30795
|
+
items: external_exports.array(external_exports.object({ entryId: external_exports.string(), author: external_exports.string(), text: external_exports.string(), summary: external_exports.string().nullable(), acknowledged: external_exports.boolean().optional() })).optional(),
|
|
30560
30796
|
/** Whether the call put it to the person. An item it carried and never said has no row on the
|
|
30561
30797
|
* review (owner, 2026-10-08: "why do we get the third one when it didn't happen in the call?"). */
|
|
30562
30798
|
presented: external_exports.boolean(),
|
|
@@ -30602,9 +30838,65 @@ var CallRecapSchema = external_exports.object({
|
|
|
30602
30838
|
words: external_exports.string(),
|
|
30603
30839
|
atMs: external_exports.number()
|
|
30604
30840
|
})),
|
|
30605
|
-
|
|
30841
|
+
/** What did not fit, counted. `settles` counts items past the recap's 100; absent before 20261026165518. */
|
|
30842
|
+
more: external_exports.object({ lines: external_exports.number(), entries: external_exports.number(), topics: external_exports.number(), settles: external_exports.number().optional() }),
|
|
30606
30843
|
/** Last stored position on this page when another exists; absent before paging shipped. */
|
|
30607
|
-
next: external_exports.number().int().nonnegative().nullable().optional()
|
|
30844
|
+
next: external_exports.number().int().nonnegative().nullable().optional(),
|
|
30845
|
+
/** THE CALL AS ONE LIST OF ROWS (owner, 2026-10-14: "we only really want a thing like transcript but
|
|
30846
|
+
* built from the summaries", then "the transcript tabs should show the same but with full words").
|
|
30847
|
+
* Both tabs draw these rows, in this order: Summary from `summary`, Transcript from `words`.
|
|
30848
|
+
* - `put`: an item put to the person, at the first agent line that voiced it. Paigy's sentences
|
|
30849
|
+
* that voiced it are folded into `spoken`, never rows of their own.
|
|
30850
|
+
* - `said`: the person's words, one row per reply or per filed line no reply covers.
|
|
30851
|
+
* - `did`: what Paigy did ("Sent to Mouth: …", "Recorded: …", "Filed on …").
|
|
30852
|
+
* `by` is the row's real author, never inferred from `kind`: a relay Paigy sent to an agent is
|
|
30853
|
+
* Paigy's, not the person's. Optional and additive (owner: "make sure whatever you do is backward
|
|
30854
|
+
* compatible"): an API before it sends none, and the screen falls back to `topics` and `said`. */
|
|
30855
|
+
timeline: external_exports.array(external_exports.object({
|
|
30856
|
+
id: external_exports.string(),
|
|
30857
|
+
position: external_exports.number(),
|
|
30858
|
+
atMs: external_exports.number(),
|
|
30859
|
+
kind: external_exports.enum(["put", "said", "did"]),
|
|
30860
|
+
by: external_exports.object({ participant: external_exports.string().nullable(), agentId: external_exports.string().nullable(), name: external_exports.string().nullable() }),
|
|
30861
|
+
goalId: external_exports.string().uuid().nullable(),
|
|
30862
|
+
requestId: external_exports.string().nullable(),
|
|
30863
|
+
summary: external_exports.string().nullable(),
|
|
30864
|
+
words: external_exports.string(),
|
|
30865
|
+
/** Paigy's sentences folded into this row: on a `put` row, what it said putting the item to the
|
|
30866
|
+
* person (before their next row); on a `said` row, what it said in reply (until their next row).
|
|
30867
|
+
* `atMs` is when each was said; optional, absent before 2026-10-14's fix. */
|
|
30868
|
+
spoken: external_exports.array(external_exports.object({ lineId: external_exports.string(), words: external_exports.string(), atMs: external_exports.number().optional() })),
|
|
30869
|
+
/** On a `said` row: the work these words were filed on, and whether they answered (recorded) a
|
|
30870
|
+
* question. They replace the "Filed on ..." and "Recorded: ..." rows that repeated the person's own
|
|
30871
|
+
* summary (Brain, 2026-10-14). Optional: absent from an API before it. */
|
|
30872
|
+
filedOn: external_exports.array(external_exports.object({ goalId: external_exports.string().uuid(), title: external_exports.string() })).optional(),
|
|
30873
|
+
recorded: external_exports.boolean().optional(),
|
|
30874
|
+
settled: external_exports.object({ requestId: external_exports.string(), answer: external_exports.string() }).nullable().optional(),
|
|
30875
|
+
acknowledged: external_exports.boolean().optional(),
|
|
30876
|
+
/** On a `put` row: still waiting for the person's answer (not settled, not answered, not put off).
|
|
30877
|
+
* The server's judgement; the screen draws "Still waiting for your answer" from it. Optional: absent
|
|
30878
|
+
* from an API before it, where the screen falls back to its own reading. */
|
|
30879
|
+
waiting: external_exports.boolean().optional(),
|
|
30880
|
+
lineIds: external_exports.array(external_exports.string())
|
|
30881
|
+
})).optional(),
|
|
30882
|
+
/** THE RECAP (owner, 2026-10-26: "the transcript should just be the entries that settled or
|
|
30883
|
+
* acknowledged the items; that's it"). Each item the person's words settled on this call, in the
|
|
30884
|
+
* order they said them: who asked it (`by`), the item in its agent's words (`title`), and only the
|
|
30885
|
+
* words of theirs that settled it (`lines`: each line once, verbatim, with when it was said on the
|
|
30886
|
+
* bot clock like `said[].atMs`). Built from their replies, not from what the call put, so an item
|
|
30887
|
+
* settled without being put is still here. Beside them (owner: "List them too, with the words that
|
|
30888
|
+
* said them"), each Goal his words told something (`kind` "told") or the call started ("started"),
|
|
30889
|
+
* with `requestId` null and the Goal's name as `title`; a started Goal may have no `lines` yet. `kind`
|
|
30890
|
+
* is a string, not an enum, so a later kind never fails an older build's parse; `requestId` is the
|
|
30891
|
+
* request the words settled. On the first page only; absent from an API before it. */
|
|
30892
|
+
settles: external_exports.array(external_exports.object({
|
|
30893
|
+
requestId: external_exports.string().nullable(),
|
|
30894
|
+
kind: external_exports.string(),
|
|
30895
|
+
by: external_exports.object({ participant: external_exports.string(), agentId: external_exports.string().nullable(), name: external_exports.string() }),
|
|
30896
|
+
goalId: external_exports.string().uuid().nullable(),
|
|
30897
|
+
title: external_exports.string(),
|
|
30898
|
+
lines: external_exports.array(external_exports.object({ lineId: external_exports.string(), words: external_exports.string(), atMs: external_exports.number() }))
|
|
30899
|
+
})).optional()
|
|
30608
30900
|
});
|
|
30609
30901
|
function sessionSlot(sessionId2) {
|
|
30610
30902
|
const id22 = sessionId2 ?? sessionId();
|
|
@@ -30693,6 +30985,14 @@ async function requestCode(suggestedName = agentName(), device) {
|
|
|
30693
30985
|
if (!res.ok) throw new Error(`/api/device/code failed: ${res.status} ${await res.text()}`);
|
|
30694
30986
|
return await res.json();
|
|
30695
30987
|
}
|
|
30988
|
+
var ServerFault = class extends Error {
|
|
30989
|
+
constructor(status) {
|
|
30990
|
+
super(`Paigy's server failed (HTTP ${status}) while checking the code.`);
|
|
30991
|
+
this.status = status;
|
|
30992
|
+
this.name = "ServerFault";
|
|
30993
|
+
}
|
|
30994
|
+
status;
|
|
30995
|
+
};
|
|
30696
30996
|
async function pollToken(deviceCode) {
|
|
30697
30997
|
const res = await reach(`${BACKEND_URL}/api/device/token`, {
|
|
30698
30998
|
method: "POST",
|
|
@@ -30700,6 +31000,7 @@ async function pollToken(deviceCode) {
|
|
|
30700
31000
|
body: JSON.stringify({ device_code: deviceCode })
|
|
30701
31001
|
});
|
|
30702
31002
|
if (res.ok) return await res.json();
|
|
31003
|
+
if (res.status >= 500) throw new ServerFault(res.status);
|
|
30703
31004
|
const body = await res.json().catch(() => ({ error: "unknown" }));
|
|
30704
31005
|
const err = body.error ?? "unknown";
|
|
30705
31006
|
if (err === "authorization_pending") return null;
|
|
@@ -30865,11 +31166,16 @@ async function listConnections(opts = {}) {
|
|
|
30865
31166
|
if (!res.ok) throw new Error(`list_connections failed: ${res.status} ${await res.text()}`);
|
|
30866
31167
|
return await res.json();
|
|
30867
31168
|
}
|
|
30868
|
-
var NOT_SENT = `Recorded as the Goal's progress, not sent
|
|
31169
|
+
var NOT_SENT = `Recorded as the Goal's progress, not sent to the person; the other agents that wrote on the Goal in the last hour are told. The person is told only a question, an answer to one they asked you, and what you say once the Goal is done. To close the work, send contact.completions or manage_goals kind:complete with the shared completion report, closing and reporting together. If the person asked you, in so many words, to send them this, send it again with userExplicitlyRequested: "any" on that update.`;
|
|
30869
31170
|
var APPLIED = "Applied; nothing was sent to the person.";
|
|
30870
31171
|
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.";
|
|
31172
|
+
function citeOf(receipt) {
|
|
31173
|
+
if (!receipt.uncited?.length) return {};
|
|
31174
|
+
return { uncited: receipt.uncited, ...receipt.cite ? { cite: receipt.cite } : {} };
|
|
31175
|
+
}
|
|
30871
31176
|
async function readDelivery(deliveryId, opts = {}) {
|
|
30872
|
-
const
|
|
31177
|
+
const query = opts.transcript ? `?transcript=1${opts.after ? `&after=${encodeURIComponent(opts.after)}` : ""}` : "";
|
|
31178
|
+
const res = await ensureAuthed(await (opts.reach ?? reach)(`${BACKEND_URL}/api/deliveries/${encodeURIComponent(deliveryId)}${query}`, {
|
|
30873
31179
|
headers: { authorization: `Bearer ${authToken(opts.token) ?? ""}` },
|
|
30874
31180
|
signal: opts.signal
|
|
30875
31181
|
}));
|
|
@@ -30894,6 +31200,7 @@ async function contact(input, opts = {}) {
|
|
|
30894
31200
|
...questions ? { questions } : {},
|
|
30895
31201
|
...parsed.answers ? { answers: parsed.answers } : {},
|
|
30896
31202
|
...parsed.withdrawQuestionIds ? { withdrawQuestionIds: parsed.withdrawQuestionIds } : {},
|
|
31203
|
+
...parsed.bumpQuestionIds ? { bumpQuestionIds: parsed.bumpQuestionIds } : {},
|
|
30897
31204
|
...parsed.questionDependencies ? { questionDependencies: parsed.questionDependencies } : {}
|
|
30898
31205
|
})
|
|
30899
31206
|
}));
|
|
@@ -30907,7 +31214,7 @@ async function contact(input, opts = {}) {
|
|
|
30907
31214
|
const demoted = askedCall && receipt.channel && receipt.channel !== "call" ? DEMOTED : void 0;
|
|
30908
31215
|
const acked = acknowledged ? { acknowledged } : {};
|
|
30909
31216
|
if (!deliveries.length) {
|
|
30910
|
-
return { sent: false, ok, results, ...recorded.length ? { recorded } : {}, message: recorded.length ? NOT_SENT : APPLIED, waitOutcome: "not_waited", ...acked };
|
|
31217
|
+
return { sent: false, ok, results, ...recorded.length ? { recorded } : {}, message: recorded.length ? NOT_SENT : APPLIED, waitOutcome: "not_waited", ...acked, ...citeOf(receipt) };
|
|
30911
31218
|
}
|
|
30912
31219
|
const lead = deliveries.find((d) => d.kind === "question") ?? deliveries[0];
|
|
30913
31220
|
const read3 = async (signal2) => {
|
|
@@ -30922,7 +31229,10 @@ async function contact(input, opts = {}) {
|
|
|
30922
31229
|
// IT WENT ONTO A CALL ALREADY HAPPENING (owner, 2026-09-28): the view words it as that call.
|
|
30923
31230
|
...lead.joinedCall ? { joinedCall: true } : {},
|
|
30924
31231
|
...demoted ? { demoted } : {},
|
|
30925
|
-
...acked
|
|
31232
|
+
...acked,
|
|
31233
|
+
...receipt.ringPolicy ? { ringPolicy: receipt.ringPolicy, ...receipt.message ? { ringHeld: receipt.message } : {} } : {},
|
|
31234
|
+
...receipt.recheckAt ? { recheckAt: receipt.recheckAt } : {},
|
|
31235
|
+
...citeOf(receipt)
|
|
30926
31236
|
};
|
|
30927
31237
|
};
|
|
30928
31238
|
const settled = (d) => d.state === "closed" || d.answers.length > 0 || d.entries.some((e) => e.kind === "contribution" && !entryUnit(e));
|
|
@@ -31168,6 +31478,11 @@ import { resolve, delimiter as delimiter2, join as join5 } from "path";
|
|
|
31168
31478
|
// src/harness/acp.ts
|
|
31169
31479
|
var none = { events: [], writes: [] };
|
|
31170
31480
|
var NOTHING_TO_RESUME = /* @__PURE__ */ new Set([-32002, -32601]);
|
|
31481
|
+
function nothingToResume(error) {
|
|
31482
|
+
if (!error || error.code === void 0) return false;
|
|
31483
|
+
if (NOTHING_TO_RESUME.has(error.code)) return true;
|
|
31484
|
+
return error.code === -32603 && (error.data?.code === "FS_NOT_FOUND" || /^Path not found\b/.test(error.message ?? ""));
|
|
31485
|
+
}
|
|
31171
31486
|
function optionFor(options, decision) {
|
|
31172
31487
|
const want = decision.allow ? "allow_once" : "reject_once";
|
|
31173
31488
|
return options.find((o) => o.kind === want)?.optionId ?? null;
|
|
@@ -31304,11 +31619,11 @@ var AcpDriver = class {
|
|
|
31304
31619
|
if (msg.id === this.sessionNewId) {
|
|
31305
31620
|
this.sessionNewId = void 0;
|
|
31306
31621
|
const resuming = this.resume !== void 0;
|
|
31307
|
-
if (resuming &&
|
|
31622
|
+
if (resuming && nothingToResume(msg.error)) {
|
|
31308
31623
|
this.resume = void 0;
|
|
31309
31624
|
this.sessionNewId = this.nextId++;
|
|
31310
31625
|
return {
|
|
31311
|
-
events: [{ kind: "error", message: `session/resume found nothing to resume (${msg.error.message}) \u2014 opening a new conversation` }],
|
|
31626
|
+
events: [{ kind: "error", message: `session/resume found nothing to resume (${msg.error.message ?? "no message"}) \u2014 opening a new conversation` }],
|
|
31312
31627
|
writes: [frame2(this.opening(this.sessionNewId))]
|
|
31313
31628
|
};
|
|
31314
31629
|
}
|
|
@@ -31508,8 +31823,16 @@ function inboxFor(root = INBOX_ROOT) {
|
|
|
31508
31823
|
var ADAPTER_BIN = {
|
|
31509
31824
|
claude: "claude-agent-acp",
|
|
31510
31825
|
codex: "codex-acp",
|
|
31511
|
-
agy: "paigy-agy-acp"
|
|
31826
|
+
agy: "paigy-agy-acp",
|
|
31827
|
+
grok: "grok"
|
|
31512
31828
|
};
|
|
31829
|
+
function grokArgs(opts) {
|
|
31830
|
+
const args = ["agent"];
|
|
31831
|
+
if (opts.mode === "bypass") args.push("--always-approve");
|
|
31832
|
+
if (opts.model) args.push("--model", opts.model);
|
|
31833
|
+
args.push("stdio");
|
|
31834
|
+
return args;
|
|
31835
|
+
}
|
|
31513
31836
|
var CLAUDE_ONE_WAY_IN = {
|
|
31514
31837
|
env: { CLAUDE_CODE_DISABLE_BACKGROUND_TASKS: "1" },
|
|
31515
31838
|
disallowedTools: ["Monitor", "ScheduleWakeup", "CronCreate", "Workflow"]
|
|
@@ -31550,7 +31873,7 @@ function startSession(opts) {
|
|
|
31550
31873
|
const inherited = [...savedVars.matchAll(/["']([A-Za-z_][A-Za-z0-9_]*)["']/g)].map((match) => match[1]);
|
|
31551
31874
|
codexConfig[key3] = [.../* @__PURE__ */ new Set([...inherited, ...codexConfig[key3] ?? codexConfig.mcp_servers?.paigy?.env_vars ?? [], ...CODEX_ENV])];
|
|
31552
31875
|
}
|
|
31553
|
-
const child = (opts.spawnFn ?? spawn)(opts.bin ?? ADAPTER_BIN[opts.harness], [], {
|
|
31876
|
+
const child = (opts.spawnFn ?? spawn)(opts.bin ?? ADAPTER_BIN[opts.harness], opts.harness === "grok" ? grokArgs(opts) : [], {
|
|
31554
31877
|
cwd,
|
|
31555
31878
|
// The adapter shells out to its vendor CLI (`claude`, `codex`), and a GUI- or
|
|
31556
31879
|
// launchd-launched process's PATH won't have it — probe dirs plus the RUNNING
|
|
@@ -32998,7 +33321,7 @@ var OptionInputSchema2 = external_exports.object({
|
|
|
32998
33321
|
imgUrl: OptionSchema2.shape.image
|
|
32999
33322
|
}).strict();
|
|
33000
33323
|
var NIGHT2 = { from: 23, to: 7 };
|
|
33001
|
-
var ASK_MAX2 =
|
|
33324
|
+
var ASK_MAX2 = 80;
|
|
33002
33325
|
var UNITS_MAX2 = 12;
|
|
33003
33326
|
var UNIT_TITLE_MAX2 = 50;
|
|
33004
33327
|
var UNIT_BODY_MAX2 = 200;
|
|
@@ -33047,10 +33370,22 @@ function capRefusals2(text, units22, field) {
|
|
|
33047
33370
|
function refuseOverCaps2(text, units22, field, ctx) {
|
|
33048
33371
|
for (const { path, message, ...params } of capRefusals2(text, units22, field)) ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path, message, params });
|
|
33049
33372
|
}
|
|
33373
|
+
var SHIPPED2 = ["phone", "calls", "server", "store", "agents"];
|
|
33374
|
+
var CAUSES_MAX2 = 10;
|
|
33375
|
+
var shipped2 = external_exports.enum(SHIPPED2, {
|
|
33376
|
+
errorMap: () => ({ message: `shipped_unknown: one of ${SHIPPED2.join(", ")}.` })
|
|
33377
|
+
}).optional().describe(
|
|
33378
|
+
"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."
|
|
33379
|
+
);
|
|
33380
|
+
var causedBy2 = external_exports.array(
|
|
33381
|
+
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.")
|
|
33382
|
+
).min(1).max(CAUSES_MAX2, `too_many_causes: at most ${CAUSES_MAX2}.`).optional().describe(
|
|
33383
|
+
`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.`
|
|
33384
|
+
);
|
|
33050
33385
|
var COMPLETION_MESSAGE_MAX2 = 50;
|
|
33051
33386
|
var CompletionSchema2 = external_exports.object({
|
|
33052
33387
|
goalId: external_exports.string().uuid().describe("The existing Goal to complete."),
|
|
33053
|
-
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."),
|
|
33388
|
+
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."),
|
|
33054
33389
|
units: external_exports.array(UnitInputSchema2.extend({
|
|
33055
33390
|
title: external_exports.string().trim().min(1).max(UNIT_TITLE_MAX2),
|
|
33056
33391
|
body: external_exports.string().trim().min(1).max(UNIT_BODY_MAX2)
|
|
@@ -33059,19 +33394,21 @@ var CompletionSchema2 = external_exports.object({
|
|
|
33059
33394
|
options: external_exports.array(external_exports.object({
|
|
33060
33395
|
label: external_exports.string().trim().min(1).max(OPTION_LABEL_MAX2),
|
|
33061
33396
|
hint: external_exports.string().trim().min(1).max(OPTION_HINT_MAX2)
|
|
33062
|
-
}).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.")
|
|
33397
|
+
}).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."),
|
|
33398
|
+
causedBy: causedBy2,
|
|
33399
|
+
shipped: shipped2
|
|
33063
33400
|
}).strict();
|
|
33064
|
-
var CompleteChangeSchema2 = CompletionSchema2.extend({ kind: external_exports.literal("complete") });
|
|
33401
|
+
var CompleteChangeSchema2 = CompletionSchema2.omit({ causedBy: true, shipped: true }).extend({ kind: external_exports.literal("complete") });
|
|
33065
33402
|
var ASKING_RULES2 = `HOW TO ASK:
|
|
33066
|
-
1.
|
|
33067
|
-
2.
|
|
33068
|
-
3. \`workItBlocks\` only
|
|
33069
|
-
4.
|
|
33070
|
-
5. One question, one row
|
|
33071
|
-
6. Read the Goal
|
|
33072
|
-
7.
|
|
33073
|
-
8. A diagnosis says when, why and how it happens, then proposes one fix.
|
|
33074
|
-
9.
|
|
33403
|
+
1. One question per object in \`questions\`, so each is answered on its own.
|
|
33404
|
+
2. \`goalId\` names the existing Goal it is about (create one with manage_goals first); the answer comes back there.
|
|
33405
|
+
3. \`workItBlocks\` only when you are truly blocked: it asks for a call.
|
|
33406
|
+
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.
|
|
33407
|
+
5. One question, one row: never re-send one still waiting; take back one that no longer matters with \`withdrawQuestionIds\`.
|
|
33408
|
+
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.
|
|
33409
|
+
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.
|
|
33410
|
+
8. A diagnosis says when, why and how it happens, then proposes one fix.
|
|
33411
|
+
9. Give a report its \`reply\`: one line in THEIR voice for THAT report, so you learn whether they verified it or only received it. Required when it is delivered or its Goal is done.`;
|
|
33075
33412
|
function draft20202(node) {
|
|
33076
33413
|
if (Array.isArray(node)) return node.map(draft20202);
|
|
33077
33414
|
if (node && typeof node === "object") {
|
|
@@ -33114,12 +33451,55 @@ var userExplicitlyRequested2 = external_exports.enum(["any", "call"]).optional()
|
|
|
33114
33451
|
`Only what the person said about THIS message, in so many words: "any" when they asked you to send it to them ("send it to my phone", "message me the result"), "call" when they asked to be called about it. It is then delivered (a call rings for the whole contact, and carries everything waiting on them); omitted, an update is only recorded as the Goal's progress unless the person needs it. Never set it to make a message louder.`
|
|
33115
33452
|
);
|
|
33116
33453
|
var units2 = external_exports.array(UnitInputSchema2).optional().describe(
|
|
33117
|
-
`The context this message needs, as up to ${UNITS_MAX2} units in reading order, each {title, body}: a title of at most ${UNIT_TITLE_MAX2} characters and a body of at most ${UNIT_BODY_MAX2}. One idea per unit. Leave it out when the main text says it all.`
|
|
33454
|
+
`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.`
|
|
33118
33455
|
);
|
|
33456
|
+
var KIND_IDS2 = { "handing": "none", "replaced-by": "goal", "blocked-by": "node", "asking": "none", "found": "none" };
|
|
33457
|
+
var KIND_GRAMMAR2 = "handing, replaced-by <goalId>, blocked-by <goalId|questionId>, asking, found";
|
|
33458
|
+
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}$/;
|
|
33459
|
+
var handle2 = /^[0-9a-fA-F-]{8,36}$/;
|
|
33460
|
+
function refuseKind2(u, ctx) {
|
|
33461
|
+
if (!u.kind) return;
|
|
33462
|
+
const refuse = (refusal, kind, message) => ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["kind"], params: { refusal, kind }, message });
|
|
33463
|
+
const [name, ...rest] = u.kind.trim().split(/\s+/);
|
|
33464
|
+
const shape = KIND_IDS2[name];
|
|
33465
|
+
if (!shape) {
|
|
33466
|
+
refuse("kind_unknown", name, `kind_unknown: "${name}" is not a kind. One of: ${KIND_GRAMMAR2}.`);
|
|
33467
|
+
return;
|
|
33468
|
+
}
|
|
33469
|
+
const id22 = rest.join(" ");
|
|
33470
|
+
if (shape === "none" && id22) {
|
|
33471
|
+
refuse("kind_takes_no_id", name, `kind_takes_no_id: "${name}" is the whole kind, so drop the "${id22}" after it.`);
|
|
33472
|
+
}
|
|
33473
|
+
if (shape !== "none" && !(shape === "goal" ? uuid2.test(id22) : handle2.test(id22))) {
|
|
33474
|
+
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>".`);
|
|
33475
|
+
}
|
|
33476
|
+
if (name === "asking") {
|
|
33477
|
+
refuse("kind_is_a_question", name, 'kind_is_a_question: "asking" owes them an answer, so send it in `questions`, where it opens one.');
|
|
33478
|
+
}
|
|
33479
|
+
if (u.userExplicitlyRequested) {
|
|
33480
|
+
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.`);
|
|
33481
|
+
}
|
|
33482
|
+
}
|
|
33119
33483
|
var UpdateInputSchema2 = external_exports.object({
|
|
33120
|
-
|
|
33484
|
+
// ONE LOAD-BEARING POINT PER REPORT (owner, 2026-10-27 14:10 on call, Goal 1b1750e9, settling
|
|
33485
|
+
// #3633's pacing: "one point at a time is better, but make sure that it's [load-]bearing ... if
|
|
33486
|
+
// there is a lot of key points that I need to be aware of ... meaning something bad would happen
|
|
33487
|
+
// if I didn't know them or I wouldn't be able to understand something in the future ... They
|
|
33488
|
+
// should go separately. Basically, it should be like one load-bearing thing per report").
|
|
33489
|
+
//
|
|
33490
|
+
// The call's half of that ruling shipped in #3771: the talker settles an item only once the
|
|
33491
|
+
// transcript shows he heard its load-bearing point. This is the author's half, and without it the
|
|
33492
|
+
// talker has to guess which of a report's parts was load-bearing. Measured 2026-11-01 on prod:
|
|
33493
|
+
// 458 of 866 reports in 21 days carried two or more units, and since the pacing shipped on 10-23
|
|
33494
|
+
// only 18 of 72 units that reached a call were ever said -- so a point written as a unit has about
|
|
33495
|
+
// a one-in-four chance of being heard, and one ok after the headline settles the whole report.
|
|
33496
|
+
// Hence the wording, not a `mustHear` flag (the-heard-record.md P3): he asked for less mechanism
|
|
33497
|
+
// and more judgment from the agent, so a point he must not miss is simply its own report.
|
|
33498
|
+
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.`),
|
|
33121
33499
|
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."),
|
|
33122
33500
|
units: units2,
|
|
33501
|
+
causedBy: causedBy2,
|
|
33502
|
+
shipped: shipped2,
|
|
33123
33503
|
// A REPORT KEEPS ITS TAP (#2799, #3260; owner, 2026-10-08, settling #2776: "keep the reports open
|
|
33124
33504
|
// until the user acknowledges them"). A report asks nothing, so it opens no Question -- but it
|
|
33125
33505
|
// still waits to be acknowledged, and it carries the ONE tap that closes it. Never a decision: the
|
|
@@ -33143,6 +33523,12 @@ var UpdateInputSchema2 = external_exports.object({
|
|
|
33143
33523
|
reply: external_exports.string().trim().min(1).describe(
|
|
33144
33524
|
`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.`
|
|
33145
33525
|
).optional(),
|
|
33526
|
+
// THE KIND, WHICH WAS THE FIRST LINE OF THE MESSAGE UNTIL NOW (`KIND_IDS` above). Optional on
|
|
33527
|
+
// purpose: every agent writing updates today sends none, and a door that refused them would turn a
|
|
33528
|
+
// convention nobody was obliged to follow into a 400 on live traffic.
|
|
33529
|
+
kind: external_exports.string().trim().min(1).optional().describe(
|
|
33530
|
+
`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).`
|
|
33531
|
+
),
|
|
33146
33532
|
userExplicitlyRequested: userExplicitlyRequested2
|
|
33147
33533
|
}).strict().superRefine((u, ctx) => {
|
|
33148
33534
|
if (u.userExplicitlyRequested && !u.reply) {
|
|
@@ -33154,6 +33540,7 @@ var UpdateInputSchema2 = external_exports.object({
|
|
|
33154
33540
|
});
|
|
33155
33541
|
}
|
|
33156
33542
|
refuseOverCaps2(u.message, u.units, "message", ctx);
|
|
33543
|
+
refuseKind2(u, ctx);
|
|
33157
33544
|
if (u.reply && u.reply.length > OPTION_LABEL_MAX2) {
|
|
33158
33545
|
ctx.addIssue({
|
|
33159
33546
|
code: external_exports.ZodIssueCode.custom,
|
|
@@ -33169,11 +33556,11 @@ var questionFields2 = {
|
|
|
33169
33556
|
),
|
|
33170
33557
|
goalId: external_exports.string().uuid().describe("The Goal the question is about, which must exist (create it with manage_goals first). Its answer comes back there."),
|
|
33171
33558
|
units: units2,
|
|
33172
|
-
options: external_exports.array(OptionInputSchema2).min(1).max(6).optional().describe("The choices, when you have them. Each label stands on its own, at most 50 characters; a hint, at most 200."),
|
|
33559
|
+
options: external_exports.array(OptionInputSchema2).min(1).max(6).optional().describe("The choices, when you have them. Each label stands on its own and differs from the others (duplicate_option_label), at most 50 characters; a hint, at most 200. They can always answer in their own words, so no 'Other' or 'None of these'."),
|
|
33173
33560
|
// HOW THE OPTIONS ARE ANSWERED, SAID BY THE AGENT (owner, 2026-10-02: "one and many makes sense";
|
|
33174
33561
|
// brain_prompts.md §1: structured agent questions need no model). The app draws all three.
|
|
33175
33562
|
pickMode: external_exports.enum(["one", "many", "rank"]).optional().describe(
|
|
33176
|
-
'How the options are answered: "one" (the default) a pick, for alternatives; "many" a checklist, for independent options they may want several of; "rank" an order of all of them. Only with options.'
|
|
33563
|
+
'How the options are answered: "one" (the default) a pick, for alternatives; "many" a checklist, for independent options they may want several of; "rank" an order of all of them. Only with options; "many" and "rank" need at least two (too_few_options).'
|
|
33177
33564
|
),
|
|
33178
33565
|
// WHAT THE QUESTION HOLDS UP (brain_prompts.md §2.1): replaces `waiting: 'hard'`. A question that
|
|
33179
33566
|
// blocks work asks for a call (the person's settings and ring cooldowns still decide).
|
|
@@ -33185,11 +33572,39 @@ var questionFields2 = {
|
|
|
33185
33572
|
var refineQuestion2 = (q, ctx) => {
|
|
33186
33573
|
refuseOverCaps2(q.question, q.units, "question", ctx);
|
|
33187
33574
|
if (q.pickMode && !q.options) ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["pickMode"], message: "pickMode comes only with options" });
|
|
33575
|
+
refuseThinOptions2(q, ctx);
|
|
33188
33576
|
const ids = (q.options ?? []).map((o) => o.id);
|
|
33189
33577
|
if (ids.some((id22) => id22) && (ids.some((id22) => !id22) || new Set(ids).size !== ids.length)) {
|
|
33190
33578
|
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["options"], message: "give every option a distinct id, or none" });
|
|
33191
33579
|
}
|
|
33192
33580
|
};
|
|
33581
|
+
var MIN_LIST_OPTIONS2 = 2;
|
|
33582
|
+
function refuseThinOptions2(q, ctx) {
|
|
33583
|
+
const options = q.options ?? [];
|
|
33584
|
+
if ((q.pickMode === "many" || q.pickMode === "rank") && options.length < MIN_LIST_OPTIONS2) {
|
|
33585
|
+
ctx.addIssue({
|
|
33586
|
+
code: external_exports.ZodIssueCode.custom,
|
|
33587
|
+
path: ["options"],
|
|
33588
|
+
params: { refusal: "too_few_options", length: options.length, min: MIN_LIST_OPTIONS2 },
|
|
33589
|
+
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.`
|
|
33590
|
+
});
|
|
33591
|
+
}
|
|
33592
|
+
const seen = /* @__PURE__ */ new Map();
|
|
33593
|
+
options.forEach((o, index) => {
|
|
33594
|
+
const key22 = o.label.trim().toLowerCase();
|
|
33595
|
+
const first = seen.get(key22);
|
|
33596
|
+
if (first === void 0) {
|
|
33597
|
+
seen.set(key22, index);
|
|
33598
|
+
return;
|
|
33599
|
+
}
|
|
33600
|
+
ctx.addIssue({
|
|
33601
|
+
code: external_exports.ZodIssueCode.custom,
|
|
33602
|
+
path: ["options", index, "label"],
|
|
33603
|
+
params: { refusal: "duplicate_option_label", index, first },
|
|
33604
|
+
message: `duplicate_option_label: options[${index}] repeats the label of options[${first}]. Each option names a different choice.`
|
|
33605
|
+
});
|
|
33606
|
+
});
|
|
33607
|
+
}
|
|
33193
33608
|
var QuestionInputSchema2 = external_exports.object({
|
|
33194
33609
|
questionId: external_exports.string().uuid().optional().describe("Optional: your own stable id for this question (a UUID), so a resend is the same question. Minted for you when omitted; the result returns it."),
|
|
33195
33610
|
...questionFields2
|
|
@@ -33211,21 +33626,26 @@ var QuestionDependencySchema2 = external_exports.object({
|
|
|
33211
33626
|
reason: reason2.optional()
|
|
33212
33627
|
}).strict().refine(actionFits2, ACTION_FITS2);
|
|
33213
33628
|
var sendFields2 = {
|
|
33214
|
-
completions: external_exports.array(CompletionSchema2).min(1).max(20).optional().describe(
|
|
33629
|
+
completions: external_exports.array(CompletionSchema2).min(1).max(20).optional().describe(
|
|
33630
|
+
"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."
|
|
33631
|
+
),
|
|
33215
33632
|
updates: external_exports.array(UpdateInputSchema2).min(1).max(20).optional().describe(
|
|
33216
|
-
"News: progress, findings, a result. An update asks nothing. It reaches the person only when they asked for it (userExplicitlyRequested), when it answers something they said, or once its Goal is done; otherwise it is recorded as the Goal's progress
|
|
33633
|
+
"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."
|
|
33217
33634
|
),
|
|
33218
33635
|
answers: external_exports.array(AnswerInputSchema2).min(1).max(20).optional().describe("Answers to Questions addressed to you."),
|
|
33219
33636
|
withdrawQuestionIds: external_exports.array(questionHandle2).min(1).max(10).optional().describe(
|
|
33220
33637
|
"Questions you asked that no longer need an answer: you acted on them yourself, they no longer matter, or you asked wrongly. Each is cancelled, not answered: its card closes and nothing rings for it."
|
|
33221
33638
|
),
|
|
33639
|
+
bumpQuestionIds: external_exports.array(questionHandle2).min(1).max(10).optional().describe(
|
|
33640
|
+
"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."
|
|
33641
|
+
),
|
|
33222
33642
|
questionDependencies: external_exports.array(QuestionDependencySchema2).min(1).max(20).optional().describe(
|
|
33223
33643
|
"Add or remove what a Question you asked holds up, after asking it."
|
|
33224
33644
|
)
|
|
33225
33645
|
};
|
|
33226
33646
|
var ContactSchema2 = external_exports.object({
|
|
33227
33647
|
...sendFields2,
|
|
33228
|
-
questions: external_exports.array(QuestionInputSchema2).min(1).max(20).optional().describe("Questions for the person, one per object."),
|
|
33648
|
+
questions: external_exports.array(QuestionInputSchema2).min(1).max(20).optional().describe("Questions for the person, one per object, each sent exactly as written, with no reading in between."),
|
|
33229
33649
|
/** RECEIVING (2I, I2; brain_prompts.md §2.2): the events this agent handled. */
|
|
33230
33650
|
ackEventIds: external_exports.array(external_exports.string().uuid()).min(1).max(100).optional().describe(
|
|
33231
33651
|
"The exact eventIds of the events you have handled: an acknowledgment (ACK). Reading alone acknowledges nothing, so an event comes back until you acknowledge it; after that the next batch can come. Each recipient acknowledges separately, for itself only. A Question you owe is answered (answers), never acknowledged away."
|
|
@@ -33234,22 +33654,34 @@ var ContactSchema2 = external_exports.object({
|
|
|
33234
33654
|
"Only controls when this returns. Sending: false (the default) returns at once; true waits up to about 45 seconds for a response to what you sent. Sending nothing: true (the default) waits up to about 45 seconds for anything addressed to you; false returns what is waiting now. It does not mean work is blocked, set urgency, or ask for a call. `waitOutcome` says which happened: `available`, `expired` (nothing arrived; wait again without sending again), or `not_waited`."
|
|
33235
33655
|
)
|
|
33236
33656
|
}).strict();
|
|
33237
|
-
var sendsAnything2 = (c) => !!(c.completions?.length || c.updates?.length || c.questions?.length || c.answers?.length || c.withdrawQuestionIds?.length || c.questionDependencies?.length);
|
|
33657
|
+
var sendsAnything2 = (c) => !!(c.completions?.length || c.updates?.length || c.questions?.length || c.answers?.length || c.withdrawQuestionIds?.length || c.bumpQuestionIds?.length || c.questionDependencies?.length);
|
|
33238
33658
|
var ContactWireSchema2 = external_exports.object({
|
|
33239
33659
|
operationId: external_exports.string().uuid(),
|
|
33240
33660
|
...sendFields2,
|
|
33241
33661
|
questions: external_exports.array(QuestionWireSchema2).min(1).max(20).optional()
|
|
33242
33662
|
}).strict().refine(sendsAnything2, "a contact sends at least one update, question, answer, withdrawal or question dependency");
|
|
33243
33663
|
var CONTACT_SCHEMA2 = { type: "object", ...mcpInputSchema2(ContactSchema2) };
|
|
33244
|
-
var CONTACT_DESCRIPTION2 = "Send to and receive from the person: completions, updates, questions, answers to questions addressed to you, withdrawals
|
|
33245
|
-
|
|
33246
|
-
CUT A LONG MESSAGE BEFORE YOU SEND IT: a question, an update's message or an answer is the one point, in at most ${ASK_MAX2} characters; everything else it needs goes in 'units', up to ${UNITS_MAX2} {title, body} in reading order, one idea each, every title at most ${UNIT_TITLE_MAX2} characters and every body at most ${UNIT_BODY_MAX2}. The person sees the main text and the titles, and opens a unit to read its body. Over a cap is refused by name (ask_too_long, too_many_units, unit_title_too_long, unit_body_too_long) and nothing is sent.
|
|
33664
|
+
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 + `
|
|
33247
33665
|
|
|
33248
|
-
|
|
33666
|
+
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.
|
|
33249
33667
|
|
|
33250
|
-
|
|
33668
|
+
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.
|
|
33251
33669
|
|
|
33252
|
-
RECEIVING:
|
|
33670
|
+
RECEIVING: contact({}) waits ~45 s; contact({wait:false}) returns \`events\` at once. Confirm the ones you handled with contact({ackEventIds}).`;
|
|
33671
|
+
var HELP_TOPICS2 = ["pairing", "listening", "receiving", "asking", "updates", "goals", "calls"];
|
|
33672
|
+
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.`;
|
|
33673
|
+
var HelpSchema2 = external_exports.object({
|
|
33674
|
+
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.")
|
|
33675
|
+
}).strict();
|
|
33676
|
+
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.";
|
|
33677
|
+
var AGENT_PROMPTS2 = [
|
|
33678
|
+
{
|
|
33679
|
+
name: "help",
|
|
33680
|
+
description: "How to use Paigy: the whole guide, or one topic of it.",
|
|
33681
|
+
arguments: [{ name: "topic", description: `One section: ${HELP_TOPICS2.join(", ")}. Omit it for the whole guide.`, required: false }]
|
|
33682
|
+
},
|
|
33683
|
+
{ name: "welcome", description: "Start here: who you are on Paigy, then listen and collect your open work." }
|
|
33684
|
+
];
|
|
33253
33685
|
var CreateGoalSchema2 = external_exports.object({
|
|
33254
33686
|
outcome: external_exports.string().trim().min(1).max(1e4),
|
|
33255
33687
|
/** The work's NAME (#2115) — one to five words, how a person refers to it out loud ("the night
|
|
@@ -33350,9 +33782,12 @@ var GetGoalsSchema2 = external_exports.object({
|
|
|
33350
33782
|
history: external_exports.boolean().optional()
|
|
33351
33783
|
}).strict();
|
|
33352
33784
|
var GetDeliverySchema2 = external_exports.object({
|
|
33353
|
-
deliveryId: external_exports.string().uuid().describe("The Delivery id returned by contact or receive.")
|
|
33785
|
+
deliveryId: external_exports.string().uuid().describe("The Delivery id returned by contact or receive."),
|
|
33786
|
+
// WHAT WAS SAID ON A CALL (owner, 2026-10-26, Goal c743f4a4: "A flag on get_delivery", "Any of my agents").
|
|
33787
|
+
transcript: external_exports.boolean().optional().describe("For a Call: also return what was said on it, one page of spoken lines."),
|
|
33788
|
+
after: external_exports.string().max(40).optional().describe("With transcript: the next value the previous page returned, to read the next page.")
|
|
33354
33789
|
}).strict();
|
|
33355
|
-
var GET_DELIVERY_DESCRIPTION2 = "Read a Delivery in full: its whole ask, units, options and answers, plus current callState and callOutcome for a Call. Any agent of the same account may read it; another account is not disclosed. Reading never acknowledges or resends anything. Use this after a call or when receive names a Call you are waiting on.";
|
|
33790
|
+
var GET_DELIVERY_DESCRIPTION2 = "Read a Delivery in full: its whole ask, units, options and answers, plus current callState and callOutcome for a Call. For a Call, transcript: true adds what was said: each spoken line in order, who said it, and when from pickup, a page at a time. A line from the room, not the person, is marked room. Any agent of the same account may read it; another account is not disclosed. Reading never acknowledges or resends anything. Use this after a call or when receive names a Call you are waiting on.";
|
|
33356
33791
|
var GET_GOALS_DESCRIPTION2 = "Read one to ten Goals by goalIds, returned in the same order under goals (a read never puts you on them). history applies to every requested Goal. A refused read fails the call with its original refusal; no partial result is presented as complete. Each Goal includes its ten most recent other contributors (names, latest entry headlines and times), outcome, state, revision, progress, blockers, the conversation on it (each question with its options and what was decided), `next`, the one step to take, and `more`, where to read further. A question in that conversation reads `open` (nothing yet), `answered` (a choice was made, and `answer` carries it), `replied` (they said something and the read settled the question on their words \u2014 NO option of yours was chosen, and the words are the reply line beside it, so read that before you act), or `closed`. The conversation carries everything the person said, every open question and your newest entry; your older entries are left out and counted \u2014 history: true reads every entry in full. Every Goal of your person is readable, whichever of their agents owns it; another account's Goals are not disclosed.";
|
|
33357
33792
|
var SearchToolSchema2 = external_exports.object({
|
|
33358
33793
|
query: external_exports.string().trim().min(1).max(500),
|
|
@@ -33361,6 +33796,8 @@ var SearchToolSchema2 = external_exports.object({
|
|
|
33361
33796
|
limit: external_exports.number().int().min(1).max(20).optional()
|
|
33362
33797
|
}).strict();
|
|
33363
33798
|
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.";
|
|
33799
|
+
var READS2 = { readOnlyHint: true, destructiveHint: false, openWorldHint: false };
|
|
33800
|
+
var SENDS2 = { readOnlyHint: false, destructiveHint: true, openWorldHint: false };
|
|
33364
33801
|
var ConfigureIdentitySchema2 = external_exports.object({}).strict();
|
|
33365
33802
|
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.";
|
|
33366
33803
|
var CheckActivitySchema2 = external_exports.object({}).strict();
|
|
@@ -33372,14 +33809,16 @@ var SendFeedbackSchema2 = external_exports.object({
|
|
|
33372
33809
|
}).strict();
|
|
33373
33810
|
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.";
|
|
33374
33811
|
var AGENT_TOOLS2 = [
|
|
33375
|
-
{ name: "configure", description: CONFIGURE_IDENTITY_DESCRIPTION2, inputSchema: mcpInputSchema2(ConfigureIdentitySchema2) },
|
|
33376
|
-
{ name: "contact", description: CONTACT_DESCRIPTION2, inputSchema: CONTACT_SCHEMA2 },
|
|
33377
|
-
{ name: "manage_goals", description: MANAGE_GOALS_DESCRIPTION2, inputSchema: mcpInputSchema2(ManageGoalsToolSchema2) },
|
|
33378
|
-
{ name: "get_delivery", description: GET_DELIVERY_DESCRIPTION2, inputSchema: mcpInputSchema2(GetDeliverySchema2) },
|
|
33379
|
-
{ name: "get_goals", description: GET_GOALS_DESCRIPTION2, inputSchema: mcpInputSchema2(GetGoalsSchema2) },
|
|
33380
|
-
{ name: "search", description: SEARCH_DESCRIPTION2, inputSchema: mcpInputSchema2(SearchToolSchema2) },
|
|
33381
|
-
{ name: "check_activity", description: "Read your person's agents that contributed in the last 24 hours, newest first: at most 30 agents and their five most recently touched Goals, with their latest entry headline and time. Use get_goals to read a Goal and its other contributors before starting overlapping work. Read-only; no arguments.", inputSchema: mcpInputSchema2(CheckActivitySchema2) },
|
|
33382
|
-
{ name: "send_feedback", description: SEND_FEEDBACK_DESCRIPTION2, inputSchema: mcpInputSchema2(SendFeedbackSchema2) }
|
|
33812
|
+
{ name: "configure", title: "Who am I", annotations: READS2, description: CONFIGURE_IDENTITY_DESCRIPTION2, inputSchema: mcpInputSchema2(ConfigureIdentitySchema2) },
|
|
33813
|
+
{ name: "contact", title: "Contact the person", annotations: SENDS2, description: CONTACT_DESCRIPTION2, inputSchema: CONTACT_SCHEMA2 },
|
|
33814
|
+
{ name: "manage_goals", title: "Manage Goals", annotations: SENDS2, description: MANAGE_GOALS_DESCRIPTION2, inputSchema: mcpInputSchema2(ManageGoalsToolSchema2) },
|
|
33815
|
+
{ name: "get_delivery", title: "Read a delivery", annotations: READS2, description: GET_DELIVERY_DESCRIPTION2, inputSchema: mcpInputSchema2(GetDeliverySchema2) },
|
|
33816
|
+
{ name: "get_goals", title: "Read Goals", annotations: READS2, description: GET_GOALS_DESCRIPTION2, inputSchema: mcpInputSchema2(GetGoalsSchema2) },
|
|
33817
|
+
{ name: "search", title: "Search history", annotations: READS2, description: SEARCH_DESCRIPTION2, inputSchema: mcpInputSchema2(SearchToolSchema2) },
|
|
33818
|
+
{ 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) },
|
|
33819
|
+
{ name: "send_feedback", title: "Send feedback to Paigy", annotations: SENDS2, description: SEND_FEEDBACK_DESCRIPTION2, inputSchema: mcpInputSchema2(SendFeedbackSchema2) },
|
|
33820
|
+
// THE GUIDE FROM INSIDE THE MCP (owner, 2026-10-27): the skill's text, needing no identity (`help.ts`).
|
|
33821
|
+
{ name: "help", title: "Paigy guide", annotations: READS2, description: HELP_DESCRIPTION2, inputSchema: mcpInputSchema2(HelpSchema2) }
|
|
33383
33822
|
];
|
|
33384
33823
|
var AGENT_TOOL_NAMES2 = AGENT_TOOLS2.map((t) => t.name);
|
|
33385
33824
|
var id2 = external_exports.string().uuid();
|
|
@@ -33467,11 +33906,22 @@ var BrainMessageSchema2 = external_exports.union([
|
|
|
33467
33906
|
// A MESSAGE TO THE PERSON KEEPS ITS SENTENCES (turns.md): the talker writes them one by one, and each is
|
|
33468
33907
|
// its own unit of speech (`<cycle>:<key>:<n>`). `text` is the same words joined, for every reader of a
|
|
33469
33908
|
// message's words. Absent on results written before sentences.
|
|
33470
|
-
external_exports.object({
|
|
33909
|
+
external_exports.object({
|
|
33910
|
+
...messageBase2,
|
|
33911
|
+
to: external_exports.object({ kind: external_exports.literal("user") }).strict(),
|
|
33912
|
+
sentences: external_exports.array(external_exports.string().min(1)).min(1).optional(),
|
|
33913
|
+
// THE REPORTS IT TELLS, BY THEIR OWN IDENTITY (call 9d1c096c, 2026-10-15): the talker's message names the report
|
|
33914
|
+
// Entries it speaks of, so the plan's line names that report rather than re-finding it by its Goal. Absent on
|
|
33915
|
+
// results written before it.
|
|
33916
|
+
tells: external_exports.array(external_exports.object({ id: id2 }).strict()).optional()
|
|
33917
|
+
}).strict(),
|
|
33471
33918
|
external_exports.object({
|
|
33472
33919
|
...messageBase2,
|
|
33473
33920
|
to: external_exports.object({ kind: external_exports.literal("agent"), agentId: external_exports.string().regex(/^agent:(?!paigy$)\S+$/) }).strict(),
|
|
33474
33921
|
call: external_exports.object({ callId: id2, listen: external_exports.literal(true) }).strict().optional(),
|
|
33922
|
+
// WHAT IT ASKS THE AGENT, IN UNDER TEN WORDS (owner, 2026-10-15: "Yes, add the summary"): the talker's own, stored
|
|
33923
|
+
// as the sent Entry's summary, which the recap's "Sent to <agent>: …" row shows. Absent on results written before it.
|
|
33924
|
+
summary: external_exports.string().optional(),
|
|
33475
33925
|
// THE PERSON ASKED TO BE CALLED BACK ONCE THIS AGENT'S WORK IS DONE (turns.md, step 0): the agent owes
|
|
33476
33926
|
// the call, and its next contact about it rings them (`public.callbacks`).
|
|
33477
33927
|
callback: external_exports.literal(true).optional()
|
|
@@ -33498,95 +33948,98 @@ var BrainResultSchema2 = external_exports.object({
|
|
|
33498
33948
|
next: BrainNextSchema2,
|
|
33499
33949
|
search: BrainSearchSchema2.optional()
|
|
33500
33950
|
}).strict();
|
|
33501
|
-
var
|
|
33951
|
+
var str22 = external_exports.string();
|
|
33502
33952
|
var strs4 = external_exports.array(external_exports.string());
|
|
33503
33953
|
var CompactResultSchema2 = external_exports.object({
|
|
33504
|
-
next: external_exports.object({ say: strs4, then: external_exports.enum(["listen", "hold", "end", "none"]), waitFor: strs4, reason:
|
|
33505
|
-
messages: external_exports.array(external_exports.object({ key:
|
|
33506
|
-
entries: external_exports.array(external_exports.object({ key:
|
|
33507
|
-
answers: external_exports.array(external_exports.object({ question:
|
|
33954
|
+
next: external_exports.object({ say: strs4, then: external_exports.enum(["listen", "hold", "end", "none"]), waitFor: strs4, reason: str22, instructions: strs4 }).strict(),
|
|
33955
|
+
messages: external_exports.array(external_exports.object({ key: str22, to: str22, text: str22, about: strs4, entries: strs4, owed: strs4, inviteToCall: external_exports.boolean() }).strict()),
|
|
33956
|
+
entries: external_exports.array(external_exports.object({ key: str22, from: str22, on: strs4 }).strict()),
|
|
33957
|
+
answers: external_exports.array(external_exports.object({ question: str22, entries: strs4, summary: str22, picked: strs4 }).strict()),
|
|
33508
33958
|
changes: external_exports.array(external_exports.object({
|
|
33509
|
-
key:
|
|
33959
|
+
key: str22,
|
|
33510
33960
|
what: external_exports.enum(["goal", "question", "lesson"]),
|
|
33511
33961
|
op: external_exports.enum(["create", "edit", "assign", "open", "complete", "cancel", "defer", "move", "block", "unblock", "withdraw", "remember", "revise"]),
|
|
33512
|
-
id:
|
|
33513
|
-
text:
|
|
33514
|
-
title:
|
|
33515
|
-
who:
|
|
33516
|
-
under:
|
|
33962
|
+
id: str22,
|
|
33963
|
+
text: str22,
|
|
33964
|
+
title: str22,
|
|
33965
|
+
who: str22,
|
|
33966
|
+
under: str22,
|
|
33517
33967
|
gate: external_exports.enum(["start", "complete", "answer", "none"]),
|
|
33518
|
-
options: external_exports.array(external_exports.object({ id:
|
|
33968
|
+
options: external_exports.array(external_exports.object({ id: str22, label: str22 }).strict()),
|
|
33519
33969
|
pick: external_exports.enum(["one", "many", "rank", "words"]),
|
|
33520
33970
|
entries: strs4
|
|
33521
33971
|
}).strict()),
|
|
33522
33972
|
feedback: external_exports.array(strs4),
|
|
33523
|
-
search: external_exports.object({ query:
|
|
33973
|
+
search: external_exports.object({ query: str22, within: strs4, goal: str22 }).strict()
|
|
33524
33974
|
}).strict();
|
|
33525
33975
|
var COMPACT_RESULT_JSON_SCHEMA2 = (({ $schema: _, ...rest }) => rest)(
|
|
33526
33976
|
zodToJsonSchema2(CompactResultSchema2, { $refStrategy: "none" })
|
|
33527
33977
|
);
|
|
33528
|
-
var
|
|
33978
|
+
var str32 = external_exports.string();
|
|
33529
33979
|
var strs22 = external_exports.array(external_exports.string());
|
|
33530
33980
|
var TalkerReplySchema2 = external_exports.object({
|
|
33531
33981
|
/** What to say and send, messages to the person first: spoken in the order written. `to` is "user"
|
|
33532
33982
|
* or an agent's handle; `sentences` is what a message to the person says, one short sentence each
|
|
33533
|
-
* ([] to an agent); `text` is what a message to an agent says ("" to the person); `
|
|
33983
|
+
* ([] to an agent); `text` is what a message to an agent says ("" to the person); `summary` is what it
|
|
33984
|
+
* asks the agent, in under ten words, as the person would put it ("" to the person; owner, 2026-10-15:
|
|
33985
|
+
* "Yes, add the summary"), which the recap's "Sent to <agent>: …" row shows; `about` names
|
|
33534
33986
|
* handles; `blocks` is the item a question to an agent must be answered before ("" for none);
|
|
33535
33987
|
* `callback` is true on a message to the agent doing work the person asked to be called back about
|
|
33536
33988
|
* once it is done (false otherwise): that agent then owes the call (turns.md, step 0). */
|
|
33537
|
-
messages: external_exports.array(external_exports.object({ key:
|
|
33989
|
+
messages: external_exports.array(external_exports.object({ key: str32, to: str32, sentences: strs22, text: str32, summary: str32, about: strs22, blocks: str32, callback: external_exports.boolean() }).strict()),
|
|
33538
33990
|
/** What the call does next: listen, hold (the person asked for a moment) or end (they asked to). */
|
|
33539
33991
|
then: external_exports.enum(["listen", "hold", "end"]),
|
|
33540
33992
|
/** The person's replies to items (replies, owner 2026-10-07): the item's handle, the chosen option
|
|
33541
33993
|
* IDs, the line handles, how they replied in under ten words (keeping any condition), and `defer`:
|
|
33542
33994
|
* "" when their words settle the item, else what a reply that puts it off waits for -- "call" (the
|
|
33543
33995
|
* end of this call), a question's handle (that question's answer) or an ISO time. */
|
|
33544
|
-
replies: external_exports.array(external_exports.object({ item:
|
|
33996
|
+
replies: external_exports.array(external_exports.object({ item: str32, options: strs22, lines: strs22, summary: str32, defer: str32 }).strict()),
|
|
33545
33997
|
/** The line handles that tell the talker how to run this call; they last until it ends and reach no agent. */
|
|
33546
33998
|
instruction: strs22,
|
|
33547
33999
|
/** The line handles the filer acts on, and the only ones it reads (3e): new work, a change to existing
|
|
33548
34000
|
* work, feedback on Paigy, anything said to an agent, and any rule meant to outlast the call. */
|
|
33549
34001
|
file: strs22,
|
|
33550
34002
|
/** Evidence to fetch for a second round: a search, an item's full text, or an agent by name. */
|
|
33551
|
-
need: external_exports.object({ kind: external_exports.enum(["search", "item", "agent", ""]), text:
|
|
34003
|
+
need: external_exports.object({ kind: external_exports.enum(["search", "item", "agent", ""]), text: str32 }).strict(),
|
|
33552
34004
|
/** The handle of the item to explain ("" for none). */
|
|
33553
|
-
explain:
|
|
34005
|
+
explain: str32
|
|
33554
34006
|
}).strict();
|
|
33555
34007
|
var TALKER_REPLY_JSON_SCHEMA2 = (({ $schema: _, ...rest }) => rest)(
|
|
33556
34008
|
zodToJsonSchema2(TalkerReplySchema2, { $refStrategy: "none" })
|
|
33557
34009
|
);
|
|
33558
|
-
var
|
|
34010
|
+
var str42 = external_exports.string();
|
|
33559
34011
|
var strs32 = external_exports.array(external_exports.string());
|
|
33560
34012
|
var FilerReplySchema2 = external_exports.object({
|
|
33561
|
-
/** Which Goals each new line goes on: a line's handle, Goal handles (or keys of new Goals
|
|
33562
|
-
* the line says in at most
|
|
33563
|
-
|
|
34013
|
+
/** Which Goals each new line goes on: a line's handle, Goal handles (or keys of new Goals: a line that asks
|
|
34014
|
+
* for new work goes on the Goal it creates, owner 2026-10-26), and what the line says in at most twenty
|
|
34015
|
+
* words (owner, 2026-10-26: "bump it from 10 to 20 words"). */
|
|
34016
|
+
filed: external_exports.array(external_exports.object({ line: str42, goals: strs32, summary: str42 }).strict()),
|
|
33564
34017
|
goals: external_exports.array(external_exports.object({
|
|
33565
34018
|
op: external_exports.enum(["create", "edit", "complete", "cancel", "reopen", "assign", "defer", "move", "block", "unblock"]),
|
|
33566
|
-
key:
|
|
33567
|
-
goal:
|
|
33568
|
-
title:
|
|
33569
|
-
outcome:
|
|
33570
|
-
owner:
|
|
33571
|
-
under:
|
|
33572
|
-
until:
|
|
33573
|
-
on:
|
|
34019
|
+
key: str42,
|
|
34020
|
+
goal: str42,
|
|
34021
|
+
title: str42,
|
|
34022
|
+
outcome: str42,
|
|
34023
|
+
owner: str42,
|
|
34024
|
+
under: str42,
|
|
34025
|
+
until: str42,
|
|
34026
|
+
on: str42,
|
|
33574
34027
|
gate: external_exports.enum(["start", "complete", "answer", ""]),
|
|
33575
|
-
why:
|
|
34028
|
+
why: str42
|
|
33576
34029
|
}).strict()),
|
|
33577
34030
|
questions: external_exports.array(external_exports.object({
|
|
33578
34031
|
op: external_exports.enum(["create", "edit", "assign", "withdraw"]),
|
|
33579
|
-
key:
|
|
33580
|
-
question:
|
|
33581
|
-
text:
|
|
33582
|
-
summary:
|
|
33583
|
-
to:
|
|
33584
|
-
goal:
|
|
33585
|
-
options: external_exports.array(external_exports.object({ id:
|
|
34032
|
+
key: str42,
|
|
34033
|
+
question: str42,
|
|
34034
|
+
text: str42,
|
|
34035
|
+
summary: str42,
|
|
34036
|
+
to: str42,
|
|
34037
|
+
goal: str42,
|
|
34038
|
+
options: external_exports.array(external_exports.object({ id: str42, label: str42 }).strict()),
|
|
33586
34039
|
pick: external_exports.enum(["one", "many", "rank", "words", ""]),
|
|
33587
|
-
blocks:
|
|
34040
|
+
blocks: str42
|
|
33588
34041
|
}).strict()),
|
|
33589
|
-
lessons: external_exports.array(external_exports.object({ op: external_exports.enum(["remember", "revise", "withdraw"]), lesson:
|
|
34042
|
+
lessons: external_exports.array(external_exports.object({ op: external_exports.enum(["remember", "revise", "withdraw"]), lesson: str42, text: str42, scope: str42 }).strict()),
|
|
33590
34043
|
/** Line handles whose words comment on Paigy itself. */
|
|
33591
34044
|
feedback: strs32
|
|
33592
34045
|
}).strict();
|
|
@@ -33647,6 +34100,27 @@ var TidyReplySchema2 = external_exports.object({
|
|
|
33647
34100
|
var TIDY_REPLY_JSON_SCHEMA2 = (({ $schema: _, ...rest }) => rest)(
|
|
33648
34101
|
zodToJsonSchema2(TidyReplySchema2, { $refStrategy: "none" })
|
|
33649
34102
|
);
|
|
34103
|
+
var HandoutReplySchema2 = external_exports.object({
|
|
34104
|
+
assign: external_exports.array(external_exports.object({
|
|
34105
|
+
/** The Goal's handle (G). */
|
|
34106
|
+
goal: external_exports.string(),
|
|
34107
|
+
/** The agent's handle (A). */
|
|
34108
|
+
to: external_exports.string(),
|
|
34109
|
+
/** At most ten words, naming the Goal of theirs it is most like: the reason the hand-out records. */
|
|
34110
|
+
why: external_exports.string()
|
|
34111
|
+
}).strict()),
|
|
34112
|
+
/** The Goals no listed agent's work is even loosely like: Paigy starts a session for them (owner, 2026-10-24,
|
|
34113
|
+
* Goal 37603006, "One per family of related Goals"). */
|
|
34114
|
+
new: external_exports.array(external_exports.object({
|
|
34115
|
+
/** The Goal's handle (G). */
|
|
34116
|
+
goal: external_exports.string(),
|
|
34117
|
+
/** At most ten words: why nothing active fits it. */
|
|
34118
|
+
why: external_exports.string()
|
|
34119
|
+
}).strict())
|
|
34120
|
+
}).strict();
|
|
34121
|
+
var HANDOUT_REPLY_JSON_SCHEMA2 = (({ $schema: _, ...rest }) => rest)(
|
|
34122
|
+
zodToJsonSchema2(HandoutReplySchema2, { $refStrategy: "none" })
|
|
34123
|
+
);
|
|
33650
34124
|
function entryWords(entry) {
|
|
33651
34125
|
const content = entry.content;
|
|
33652
34126
|
if (content && "sealed" in content) return "";
|
|
@@ -33793,7 +34267,7 @@ var NotifyRequestFields2 = external_exports.object({
|
|
|
33793
34267
|
* derive agent-side before sealing, so the server only ever shapes plaintext). */
|
|
33794
34268
|
// 10k, not a sentence budget. What the human hears is bounded by the BROKER — it splits
|
|
33795
34269
|
// the ask into topics and gives each one at most three sentences and one question
|
|
33796
|
-
// (docs/
|
|
34270
|
+
// (docs/history/agenda-design.md) — not by a wire cap the agent has to pre-summarize under.
|
|
33797
34271
|
// Owner, 2026-07-28: "our actual limitation on how long something is to the user should
|
|
33798
34272
|
// come from the broker splitting and summarizing." The cap that remains is a size guard.
|
|
33799
34273
|
ask: external_exports.string().min(1).max(1e4).optional().describe(
|
|
@@ -33870,7 +34344,7 @@ var UserAnswerSchema2 = external_exports.discriminatedUnion("kind", [
|
|
|
33870
34344
|
external_exports.object({ kind: external_exports.literal("clarify"), chunks: external_exports.array(external_exports.string()).min(1) }),
|
|
33871
34345
|
external_exports.object({ kind: external_exports.literal("confirm"), approved: external_exports.boolean() }),
|
|
33872
34346
|
external_exports.object({ kind: external_exports.literal("turns"), turns: external_exports.array(TurnSchema2).min(1) }),
|
|
33873
|
-
/** An auto-answer derived from the user's PAST decisions (docs/
|
|
34347
|
+
/** An auto-answer derived from the user's PAST decisions (docs/history/precedent-design.md §2):
|
|
33874
34348
|
* delivered through the same settle/await path as a human answer, carrying the judge's
|
|
33875
34349
|
* derivation and the precedent ids it grew from. Always paired with a visible trail
|
|
33876
34350
|
* card the user can reply to — the broker never overrides the user. */
|
|
@@ -34021,6 +34495,21 @@ var AgendaTurnSchema2 = external_exports.object({
|
|
|
34021
34495
|
* the phone (`asking`, so the agenda goes gold and its options show) without treating the line as a
|
|
34022
34496
|
* question turn — the talker owns re-asking and the waits, so `question` stays null. */
|
|
34023
34497
|
onTable: external_exports.boolean().optional(),
|
|
34498
|
+
/** THE CARRIED ITEM THIS LINE TELLS (Goal 2a1e50eb, owner 2026-10-14: "Build the whole design") — a
|
|
34499
|
+
* request the Call carries that asks NOTHING: a report, a progress note, another agent's waiting news.
|
|
34500
|
+
* Its request Entry id, so the phone can make that agenda row the current one while it is read
|
|
34501
|
+
* (`telling` on the `turn` topic, `docs/clients/app/walk/design.md` §11).
|
|
34502
|
+
*
|
|
34503
|
+
* A FIELD OF ITS OWN, NEVER `claimId`: the claim is the RETURN identity — answers route by it and the
|
|
34504
|
+
* record tags the line with it (`workId`) — and an answer must never route to an Entry that asks
|
|
34505
|
+
* nothing. Absent on a turn speaking for a question (`claimId` says that) and on one speaking for no
|
|
34506
|
+
* carried item at all (an opener, a sign-off, Paigy's own line). */
|
|
34507
|
+
telling: external_exports.string().optional(),
|
|
34508
|
+
/** PAIGY'S OWN LINE (owner, 2026-10-15; calls ed2cbdce, ad50ad25): a turn that speaks for no item -- an
|
|
34509
|
+
* opener, a sign-off, a reply about nothing an agent asked or told -- is recorded as Paigy's, not as the
|
|
34510
|
+
* agent that rang. Absent on every turn that speaks for an item (`agentId` names whose), and on plans
|
|
34511
|
+
* from before it: a bot that does not know it records the ringing agent, as before. */
|
|
34512
|
+
speaksFor: external_exports.literal("paigy").optional(),
|
|
34024
34513
|
select: SelectShapeSchema2.optional(),
|
|
34025
34514
|
options: external_exports.array(OptionSchema2.omit({ id: true })).optional(),
|
|
34026
34515
|
/* `pace` STOOD HERE (#826). A turn could carry seconds and the model chose them. The walk
|
|
@@ -34109,7 +34598,7 @@ var InboxItemSchema2 = external_exports.object({
|
|
|
34109
34598
|
questions: external_exports.array(CallQuestionSchema2).optional(),
|
|
34110
34599
|
/** The same call carrying order, including request Entries with no DecisionNeed as reports.
|
|
34111
34600
|
* Additive: questions stays decision-only for every other surface and older bundles. */
|
|
34112
|
-
callItems: external_exports.array(CallQuestionSchema2.extend({ state: external_exports.enum(["open", "answered", "report"]) })).optional(),
|
|
34601
|
+
callItems: external_exports.array(CallQuestionSchema2.extend({ state: external_exports.enum(["open", "answered", "report"]), acknowledged: external_exports.boolean().optional() })).optional(),
|
|
34113
34602
|
visuals: external_exports.array(VisualSchema2).optional(),
|
|
34114
34603
|
/** The connected agent's name (the single pairing name — user-typed, or the
|
|
34115
34604
|
* agent's suggestion, or a default silly name). */
|
|
@@ -34120,6 +34609,10 @@ var InboxItemSchema2 = external_exports.object({
|
|
|
34120
34609
|
branch: external_exports.string().optional(),
|
|
34121
34610
|
createdAt: external_exports.string().datetime(),
|
|
34122
34611
|
snoozedUntil: external_exports.string().datetime().optional(),
|
|
34612
|
+
/** A past card the person dismissed that Restore can take back (#2699): its newest close is their
|
|
34613
|
+
* dismissal, with what it withdrew recorded (`private.restore_delivery`). Absent on everything else —
|
|
34614
|
+
* a put-off, a card an ended Goal or a settled question closed, and every open card. */
|
|
34615
|
+
restorable: external_exports.boolean().optional(),
|
|
34123
34616
|
agentState: AgentStateSchema2.default("idle"),
|
|
34124
34617
|
/** Whose action the item is waiting on: "you" = an agent asked you (the default,
|
|
34125
34618
|
* every agent→user notification); "agent" = you sent a request and it's awaiting the
|
|
@@ -34129,11 +34622,6 @@ var InboxItemSchema2 = external_exports.object({
|
|
|
34129
34622
|
* the agent (provider-agnostic; set server-side). Absent = no hard error. Drives the inbox
|
|
34130
34623
|
* error badge + Retry. */
|
|
34131
34624
|
error: external_exports.string().optional(),
|
|
34132
|
-
/** WHEN THIS AGENT WORK WENT QUIET (turn="agent"), by the one rule (`coldSince`: three days
|
|
34133
|
-
* with nothing said), or absent while it is not stalled. The inbox's stalled badge reads
|
|
34134
|
-
* this and nothing else (2026-09-23: a 3-minute age rule badged every live Goal stalled,
|
|
34135
|
-
* and "dismiss the stalled ones" cancelled 37 pieces of live work). */
|
|
34136
|
-
cold: external_exports.string().datetime().optional(),
|
|
34137
34625
|
clarifies: external_exports.string().optional(),
|
|
34138
34626
|
/** THIS CARD'S QUESTION IS ON A LIVE CALL (owner, 2026-09-24: "Mark it while the call is
|
|
34139
34627
|
* live"). Present only while an open Call Delivery carries the card's request Entry — read
|
|
@@ -34171,9 +34659,35 @@ var InboxItemSchema2 = external_exports.object({
|
|
|
34171
34659
|
"Labels for a select:'confirm' paige \u2014 'yesno' (Yes/No) or 'approve' (Approve/Deny). Ignored unless select is 'confirm'."
|
|
34172
34660
|
),
|
|
34173
34661
|
/** Real downstream work is stuck behind this one — set by the agent, independent of
|
|
34174
|
-
* urgency (see the main README's "premier use case" + docs/
|
|
34662
|
+
* urgency (see the main README's "premier use case" + docs/history/notify-states.md). Drives the
|
|
34175
34663
|
* inbox's blocking badge and the extra confirm step before dismissing it. */
|
|
34176
34664
|
blocking: external_exports.boolean().default(false),
|
|
34665
|
+
/** WHAT FREED THIS QUESTION (owner, 2026-10-16, Goal 2383ef14: "we don't really show the question
|
|
34666
|
+
* at the top until the question it could reply to with is resolved. And then we show it again
|
|
34667
|
+
* with the context of the other thing that was resolved"; asked how it should carry that, "The
|
|
34668
|
+
* answer above it"). A question they answered with a question of their own waits for theirs
|
|
34669
|
+
* (`private.ask_back`) and drops out of the front while it waits; when it comes back, the card
|
|
34670
|
+
* draws their question and the answer it got ABOVE the ask, as one card. Absent on a question
|
|
34671
|
+
* nothing ever held back. */
|
|
34672
|
+
freedBy: external_exports.object({
|
|
34673
|
+
questionId: external_exports.string(),
|
|
34674
|
+
asked: external_exports.string(),
|
|
34675
|
+
answer: external_exports.string(),
|
|
34676
|
+
answeredAt: external_exports.string(),
|
|
34677
|
+
/** The answer in ten words, when the talker wrote one beside it. */
|
|
34678
|
+
summary: external_exports.string().optional()
|
|
34679
|
+
}).optional(),
|
|
34680
|
+
/** WHAT THIS CARD ANSWERS (owner, 2026-10-27, Goal 81b6a9d6: "this reads very clearly as an answer to
|
|
34681
|
+
* something I asked, but I don't see the question… To show the question near the top of the card").
|
|
34682
|
+
* An agent's card that is its answer to one of the person's own questions carries that question's
|
|
34683
|
+
* words, drawn above it as "You asked" (`public.questions_answered_by`, read beside the card read).
|
|
34684
|
+
* Absent on every card that answers nothing of theirs, and on a held question, which has `freedBy`. */
|
|
34685
|
+
answering: external_exports.object({ asked: external_exports.string() }).optional(),
|
|
34686
|
+
/** WHEN ITS AGENT LAST BUMPED THIS QUESTION (#2855, `contact`'s `bumpQuestionIds`): the agent asked
|
|
34687
|
+
* the person to notice it again, and For you puts it first, the latest bump on top
|
|
34688
|
+
* (`question/order.ts`). Absent on a question never bumped, and on every card from an API older
|
|
34689
|
+
* than the bump. */
|
|
34690
|
+
bumpedAt: external_exports.string().optional(),
|
|
34177
34691
|
/** The user's locked-in answer; present only for replied items (GET /api/replied/:id). */
|
|
34178
34692
|
answer: UserAnswerSchema2.optional(),
|
|
34179
34693
|
/** THE TARGET FACTS A CARD RENDERS (#1796 point 5, 2026-09-11): the Delivery it is a view of,
|
|
@@ -34200,7 +34714,7 @@ var InboxItemSchema2 = external_exports.object({
|
|
|
34200
34714
|
*
|
|
34201
34715
|
* THE PAYLOAD'S OWN HASH, NEVER A STAMP ON THE WORK — the same mechanism as `QueueItem.rev`
|
|
34202
34716
|
* (#2928) and an entry's (#3018), for the same reason: a card shows facts no `updated_at` of its
|
|
34203
|
-
* own moves (its Goal's state and name,
|
|
34717
|
+
* own moves (its Goal's state and name, whether a ring is
|
|
34204
34718
|
* live). Optional, so a fixture, the demo and the archive lens need not spell one, and a card
|
|
34205
34719
|
* with no rev is simply always re-sent. */
|
|
34206
34720
|
rev: external_exports.string().optional()
|
|
@@ -34235,6 +34749,7 @@ var MissedCallSchema2 = external_exports.enum([
|
|
|
34235
34749
|
]);
|
|
34236
34750
|
var clock2 = (h) => h === 0 ? "midnight" : h === 12 ? "noon" : h < 12 ? `${h} am` : `${h - 12} pm`;
|
|
34237
34751
|
var QUIET2 = ` Nothing rings from ${clock2(NIGHT2.from)} to ${clock2(NIGHT2.to)} your time; the count waits for morning.`;
|
|
34752
|
+
var THEIR_QUIET2 = ` Nothing rings from ${clock2(NIGHT2.from)} to ${clock2(NIGHT2.to)} their time; the count waits for morning.`;
|
|
34238
34753
|
var BrokerTuningSchema2 = external_exports.object({
|
|
34239
34754
|
/** 'none' = skip the spoken ack after a mapped answer (power users find it slow). */
|
|
34240
34755
|
ackVerbosity: external_exports.enum(["normal", "none"]).optional(),
|
|
@@ -34277,12 +34792,9 @@ var UserSettingsSchema2 = external_exports.object({
|
|
|
34277
34792
|
* must not silently reset this privacy choice. Absent = leave unchanged on
|
|
34278
34793
|
* write, 'hosted' on read (see store.ts). */
|
|
34279
34794
|
voiceMode: external_exports.enum(["hosted", "on_device"]).optional(),
|
|
34280
|
-
/**
|
|
34281
|
-
*
|
|
34282
|
-
*
|
|
34283
|
-
* object must not silently turn it back on. Absent = leave unchanged on write, true on
|
|
34284
|
-
* read (see store.ts). */
|
|
34285
|
-
talk: external_exports.boolean().optional(),
|
|
34795
|
+
/** `talk` lived here until #2373: it gated auto-play, which went in #2374. An older bundle's
|
|
34796
|
+
* `talk` is stripped like `silentPush` was, and the `user_settings.talk` column went in
|
|
34797
|
+
* 20261028142255. */
|
|
34286
34798
|
/** CALL DIAGNOSTICS (owner, 2026-10-01): the call report carries each listen and the bot's own
|
|
34287
34799
|
* load timings. SERVER-SET, no UI — on for every account that existed on 2026-10-01, off for
|
|
34288
34800
|
* newer ones (migration 20261001132859). Read-only here: the settings PATCH never writes it. */
|
|
@@ -34359,7 +34871,8 @@ var ConnectionSummarySchema2 = external_exports.object({
|
|
|
34359
34871
|
kind: external_exports.enum(["device", "agent"]).optional(),
|
|
34360
34872
|
/** For an agent, the token id of the DEVICE that minted it — so agents group under their
|
|
34361
34873
|
* machine, and revoking a device cascades to them. Null on devices, and on unlinked
|
|
34362
|
-
* agents (
|
|
34874
|
+
* agents (provider-managed, hatched by another agent, or minted before the link existed);
|
|
34875
|
+
* a phone-launched agent is linked to the computer it runs on since #1602. */
|
|
34363
34876
|
mintedByDevice: external_exports.string().nullable().optional(),
|
|
34364
34877
|
device: external_exports.string().nullable(),
|
|
34365
34878
|
/** The agent's display name (the single pairing name). */
|
|
@@ -34373,7 +34886,7 @@ var ConnectionSummarySchema2 = external_exports.object({
|
|
|
34373
34886
|
* user on the agent's own page. null = no ceiling (today's behaviour for every
|
|
34374
34887
|
* connection). Android binds importance to a relationship rather than to each message,
|
|
34375
34888
|
* and that is the thing our roster could not say: "Marlow may always call me; Otto
|
|
34376
|
-
* never may" (docs/
|
|
34889
|
+
* never may" (docs/history/party-navigation-design.md, gap 2). Clamped in `arbitrateLevel`, so it binds
|
|
34377
34890
|
* every surface at once and outranks even `sessionMode: all_calls` — a mode the user
|
|
34378
34891
|
* set once must not overrule a rule they set about one agent. */
|
|
34379
34892
|
reach: NotifyLevelSchema2.nullable().optional(),
|
|
@@ -34388,6 +34901,12 @@ var ConnectionSummarySchema2 = external_exports.object({
|
|
|
34388
34901
|
* its Goals — wrote on one or recorded an operation (`tokens.last_worked_at`). Within
|
|
34389
34902
|
* `WORKING_MS` it is working; otherwise it is connected but idle. Null = not seen working yet. */
|
|
34390
34903
|
lastWorkedAt: external_exports.string().datetime().nullable().optional(),
|
|
34904
|
+
/** A TERMINAL SESSION'S ONLY PULSE (`tokens.listened_at`): `paigy-listen` stamps it on every sweep
|
|
34905
|
+
* (90 s). It is deliberately NOT presence — `last_seen_at` is the desktop host's beat, and a
|
|
34906
|
+
* listener orphaned from a dead conversation must not light the live dot — but it is the one fact
|
|
34907
|
+
* that says a terminal session's process is UP, which is why the wake already reads it
|
|
34908
|
+
* (`wake.ts`, `listener`). Null = no listener sweeping. */
|
|
34909
|
+
listenedAt: external_exports.string().datetime().nullable().optional(),
|
|
34391
34910
|
/** The oldest of its Goals that is `ready` for it — work handed to it that nobody has started.
|
|
34392
34911
|
* With no work of its own for `WORKING_MS`, an agent sitting on this is not taking its work. */
|
|
34393
34912
|
oldestReadyAt: external_exports.string().datetime().nullable().optional(),
|
|
@@ -34532,12 +35051,14 @@ var QueueItemSchema2 = external_exports.object({
|
|
|
34532
35051
|
/** Its questions: every OPEN one, and at most ten settled, newest settled first
|
|
34533
35052
|
* (20260929133308) — the page decides which of them to show. NOT the whole set: `asked` and
|
|
34534
35053
|
* `answered` are, and a settled one's words are a line (280 characters), its body read when the
|
|
34535
|
-
* question is opened.
|
|
35054
|
+
* question is opened. Never a CANCELLED one (withdrawn, dismissed, or its Goal or call ended): it
|
|
35055
|
+
* asks nothing of anyone (#3723). */
|
|
34536
35056
|
questions: external_exports.array(QueueQuestionSchema2).default([]),
|
|
34537
35057
|
/** HOW MANY QUESTIONS THIS WORK HAS ASKED, and how many are answered — the Goal's own totals,
|
|
34538
35058
|
* bounded at 100 server-side. A tally counted off `questions` is a wrong number that looks
|
|
34539
35059
|
* right once the cap bites (`walk/trees.ts` `tallyOf`). Optional, and defaulted from the array
|
|
34540
|
-
* by the projection, so hand-built queues (fixtures, the demo) need not spell them.
|
|
35060
|
+
* by the projection, so hand-built queues (fixtures, the demo) need not spell them. A cancelled
|
|
35061
|
+
* question is not asked (#3725). */
|
|
34541
35062
|
asked: external_exports.number().optional(),
|
|
34542
35063
|
answered: external_exports.number().optional(),
|
|
34543
35064
|
/** Every note on it the person replied to (`QueueReplySchema`) — the page decides which to show.
|
|
@@ -34552,6 +35073,10 @@ var QueueItemSchema2 = external_exports.object({
|
|
|
34552
35073
|
* as progress). `updatedAt` moves for reasons nobody chose — a
|
|
34553
35074
|
* state recomputed, a review flag — so it cannot tell work in hand from work gone quiet. */
|
|
34554
35075
|
lastProgressAt: external_exports.string().nullable().optional(),
|
|
35076
|
+
/** WHEN AN AGENT LAST ACTED ON IT (owner, 2026-10-27: "Move it now", Goal 567258dc): its newest agent write, an
|
|
35077
|
+
* Entry or a Goal change, Paigy's excluded (`goals.worked_at`). What keeps work an agent is writing on from
|
|
35078
|
+
* reading as gone quiet (`coldSince`); absent on a door that does not carry it. */
|
|
35079
|
+
workedAt: external_exports.string().nullable().optional(),
|
|
34555
35080
|
/** THE GOAL'S NEWEST WORD, FROM EITHER SIDE (owner, 2026-09-27): the newest Entry on it, of any
|
|
34556
35081
|
* kind — what the person added ("Add to this"), their reply, the agent's ask or its progress
|
|
34557
35082
|
* note. A progress note is an Entry, so this is already the newer of the two: the person's note
|
|
@@ -34709,7 +35234,7 @@ var DeviceTokenSchema2 = external_exports.object({
|
|
|
34709
35234
|
* the thread each time (host.ts, live catch 2026-08-06 — prompt-papered until now). */
|
|
34710
35235
|
workspace: external_exports.string().nullable().optional(),
|
|
34711
35236
|
/** Local host recovery must preserve the launch's runtime and Paigy identity. */
|
|
34712
|
-
harness: external_exports.enum(["claude", "codex", "agy"]).optional(),
|
|
35237
|
+
harness: external_exports.enum(["claude", "codex", "agy", "grok"]).optional(),
|
|
34713
35238
|
session_id: external_exports.string().uuid().optional(),
|
|
34714
35239
|
/** A conversation the host must not resume: its context is full, so every turn fails
|
|
34715
35240
|
* ("Prompt is too long"). Written when a run hits it (`run.ts` `onFull`); the host skips a slot
|
|
@@ -34796,9 +35321,6 @@ var AgentRowSchema2 = ComputerRowSchema2.extend({
|
|
|
34796
35321
|
* (`agent_holds`); null when that read failed. */
|
|
34797
35322
|
holds: external_exports.array(external_exports.object({ id: external_exports.string(), title: external_exports.string() })).nullable(),
|
|
34798
35323
|
held: external_exports.number().int().nullable(),
|
|
34799
|
-
/** The earliest instant any Goal it holds went quiet, by the one rule (`coldSince`); null
|
|
34800
|
-
* while none has, or when that read failed. */
|
|
34801
|
-
cold: external_exports.string().datetime().nullable(),
|
|
34802
35324
|
/** The newest line of its working log, and when the harness saw it. */
|
|
34803
35325
|
line: external_exports.string().nullable(),
|
|
34804
35326
|
lineAt: external_exports.string().datetime().nullable()
|
|
@@ -34842,6 +35364,11 @@ var CallRecapSchema2 = external_exports.object({
|
|
|
34842
35364
|
durationMs: external_exports.number().nullable(),
|
|
34843
35365
|
/** Bot-clock pickup offset; absent before the timestamp release, null before its report lands. */
|
|
34844
35366
|
pickupMs: external_exports.number().nullable().optional(),
|
|
35367
|
+
/** STILL FILING (20261026182117): the call has not ended on the server, or it has and a brain cycle on it is
|
|
35368
|
+
* still pending, the next writer, which may still settle, file or start something. What the close itself
|
|
35369
|
+
* waits for (`private.close_call`). `status` cannot say it: nothing writes "finalizing", and a call reads
|
|
35370
|
+
* "open" until the sweep closes it, after nothing is pending. Absent from an API before it. */
|
|
35371
|
+
filing: external_exports.boolean().optional(),
|
|
34845
35372
|
agents: external_exports.array(external_exports.object({ id: external_exports.string(), name: external_exports.string().nullable() }))
|
|
34846
35373
|
}),
|
|
34847
35374
|
topics: external_exports.array(external_exports.object({
|
|
@@ -34850,7 +35377,7 @@ var CallRecapSchema2 = external_exports.object({
|
|
|
34850
35377
|
owner: external_exports.string(),
|
|
34851
35378
|
state: external_exports.string(),
|
|
34852
35379
|
/** Presented Entry content and its author, separately from the current Goal owner. */
|
|
34853
|
-
items: external_exports.array(external_exports.object({ entryId: external_exports.string(), author: external_exports.string(), text: external_exports.string(), summary: external_exports.string().nullable() })).optional(),
|
|
35380
|
+
items: external_exports.array(external_exports.object({ entryId: external_exports.string(), author: external_exports.string(), text: external_exports.string(), summary: external_exports.string().nullable(), acknowledged: external_exports.boolean().optional() })).optional(),
|
|
34854
35381
|
/** Whether the call put it to the person. An item it carried and never said has no row on the
|
|
34855
35382
|
* review (owner, 2026-10-08: "why do we get the third one when it didn't happen in the call?"). */
|
|
34856
35383
|
presented: external_exports.boolean(),
|
|
@@ -34896,9 +35423,65 @@ var CallRecapSchema2 = external_exports.object({
|
|
|
34896
35423
|
words: external_exports.string(),
|
|
34897
35424
|
atMs: external_exports.number()
|
|
34898
35425
|
})),
|
|
34899
|
-
|
|
35426
|
+
/** What did not fit, counted. `settles` counts items past the recap's 100; absent before 20261026165518. */
|
|
35427
|
+
more: external_exports.object({ lines: external_exports.number(), entries: external_exports.number(), topics: external_exports.number(), settles: external_exports.number().optional() }),
|
|
34900
35428
|
/** Last stored position on this page when another exists; absent before paging shipped. */
|
|
34901
|
-
next: external_exports.number().int().nonnegative().nullable().optional()
|
|
35429
|
+
next: external_exports.number().int().nonnegative().nullable().optional(),
|
|
35430
|
+
/** THE CALL AS ONE LIST OF ROWS (owner, 2026-10-14: "we only really want a thing like transcript but
|
|
35431
|
+
* built from the summaries", then "the transcript tabs should show the same but with full words").
|
|
35432
|
+
* Both tabs draw these rows, in this order: Summary from `summary`, Transcript from `words`.
|
|
35433
|
+
* - `put`: an item put to the person, at the first agent line that voiced it. Paigy's sentences
|
|
35434
|
+
* that voiced it are folded into `spoken`, never rows of their own.
|
|
35435
|
+
* - `said`: the person's words, one row per reply or per filed line no reply covers.
|
|
35436
|
+
* - `did`: what Paigy did ("Sent to Mouth: …", "Recorded: …", "Filed on …").
|
|
35437
|
+
* `by` is the row's real author, never inferred from `kind`: a relay Paigy sent to an agent is
|
|
35438
|
+
* Paigy's, not the person's. Optional and additive (owner: "make sure whatever you do is backward
|
|
35439
|
+
* compatible"): an API before it sends none, and the screen falls back to `topics` and `said`. */
|
|
35440
|
+
timeline: external_exports.array(external_exports.object({
|
|
35441
|
+
id: external_exports.string(),
|
|
35442
|
+
position: external_exports.number(),
|
|
35443
|
+
atMs: external_exports.number(),
|
|
35444
|
+
kind: external_exports.enum(["put", "said", "did"]),
|
|
35445
|
+
by: external_exports.object({ participant: external_exports.string().nullable(), agentId: external_exports.string().nullable(), name: external_exports.string().nullable() }),
|
|
35446
|
+
goalId: external_exports.string().uuid().nullable(),
|
|
35447
|
+
requestId: external_exports.string().nullable(),
|
|
35448
|
+
summary: external_exports.string().nullable(),
|
|
35449
|
+
words: external_exports.string(),
|
|
35450
|
+
/** Paigy's sentences folded into this row: on a `put` row, what it said putting the item to the
|
|
35451
|
+
* person (before their next row); on a `said` row, what it said in reply (until their next row).
|
|
35452
|
+
* `atMs` is when each was said; optional, absent before 2026-10-14's fix. */
|
|
35453
|
+
spoken: external_exports.array(external_exports.object({ lineId: external_exports.string(), words: external_exports.string(), atMs: external_exports.number().optional() })),
|
|
35454
|
+
/** On a `said` row: the work these words were filed on, and whether they answered (recorded) a
|
|
35455
|
+
* question. They replace the "Filed on ..." and "Recorded: ..." rows that repeated the person's own
|
|
35456
|
+
* summary (Brain, 2026-10-14). Optional: absent from an API before it. */
|
|
35457
|
+
filedOn: external_exports.array(external_exports.object({ goalId: external_exports.string().uuid(), title: external_exports.string() })).optional(),
|
|
35458
|
+
recorded: external_exports.boolean().optional(),
|
|
35459
|
+
settled: external_exports.object({ requestId: external_exports.string(), answer: external_exports.string() }).nullable().optional(),
|
|
35460
|
+
acknowledged: external_exports.boolean().optional(),
|
|
35461
|
+
/** On a `put` row: still waiting for the person's answer (not settled, not answered, not put off).
|
|
35462
|
+
* The server's judgement; the screen draws "Still waiting for your answer" from it. Optional: absent
|
|
35463
|
+
* from an API before it, where the screen falls back to its own reading. */
|
|
35464
|
+
waiting: external_exports.boolean().optional(),
|
|
35465
|
+
lineIds: external_exports.array(external_exports.string())
|
|
35466
|
+
})).optional(),
|
|
35467
|
+
/** THE RECAP (owner, 2026-10-26: "the transcript should just be the entries that settled or
|
|
35468
|
+
* acknowledged the items; that's it"). Each item the person's words settled on this call, in the
|
|
35469
|
+
* order they said them: who asked it (`by`), the item in its agent's words (`title`), and only the
|
|
35470
|
+
* words of theirs that settled it (`lines`: each line once, verbatim, with when it was said on the
|
|
35471
|
+
* bot clock like `said[].atMs`). Built from their replies, not from what the call put, so an item
|
|
35472
|
+
* settled without being put is still here. Beside them (owner: "List them too, with the words that
|
|
35473
|
+
* said them"), each Goal his words told something (`kind` "told") or the call started ("started"),
|
|
35474
|
+
* with `requestId` null and the Goal's name as `title`; a started Goal may have no `lines` yet. `kind`
|
|
35475
|
+
* is a string, not an enum, so a later kind never fails an older build's parse; `requestId` is the
|
|
35476
|
+
* request the words settled. On the first page only; absent from an API before it. */
|
|
35477
|
+
settles: external_exports.array(external_exports.object({
|
|
35478
|
+
requestId: external_exports.string().nullable(),
|
|
35479
|
+
kind: external_exports.string(),
|
|
35480
|
+
by: external_exports.object({ participant: external_exports.string(), agentId: external_exports.string().nullable(), name: external_exports.string() }),
|
|
35481
|
+
goalId: external_exports.string().uuid().nullable(),
|
|
35482
|
+
title: external_exports.string(),
|
|
35483
|
+
lines: external_exports.array(external_exports.object({ lineId: external_exports.string(), words: external_exports.string(), atMs: external_exports.number() }))
|
|
35484
|
+
})).optional()
|
|
34902
35485
|
});
|
|
34903
35486
|
|
|
34904
35487
|
// src/paigy/activity.ts
|
|
@@ -35685,7 +36268,7 @@ function runHarness(opts) {
|
|
|
35685
36268
|
opts.log("\u25B6 running again after the limit");
|
|
35686
36269
|
LIMITS.running(name, (text) => callForResume(text, state, rail), opts.log);
|
|
35687
36270
|
}
|
|
35688
|
-
async function
|
|
36271
|
+
async function handle3(event) {
|
|
35689
36272
|
if (event.kind === "error") {
|
|
35690
36273
|
opts.log(`\u26A0 ${event.message}`);
|
|
35691
36274
|
if (event.fatal && running) {
|
|
@@ -35744,7 +36327,7 @@ ${event.message}`, state, rail, { log: opts.log });
|
|
|
35744
36327
|
inbox?.close();
|
|
35745
36328
|
opts.onExit?.();
|
|
35746
36329
|
},
|
|
35747
|
-
onEvent: (event) => void
|
|
36330
|
+
onEvent: (event) => void handle3(event).catch((err) => opts.log(`\u26A0 ${err.message}`))
|
|
35748
36331
|
});
|
|
35749
36332
|
void pump(session, state, rail, { onIdle: () => running, beat: clock4, initialPrompt: opts.prompt, log: opts.log, ...inbox ? { inbox } : {} }).catch(
|
|
35750
36333
|
(e) => opts.log(`\u26A0 conversation loop stopped: ${e.message}`)
|
|
@@ -36178,13 +36761,18 @@ function selfUpdater(deps) {
|
|
|
36178
36761
|
var HOST_FILE = join10(homedir8(), ".paigy", "host.json");
|
|
36179
36762
|
function wakeHarness(slot, saved, claudeTranscript) {
|
|
36180
36763
|
if (slot === "Desktop") return void 0;
|
|
36181
|
-
if (saved !== null) return saved === "agy" || saved === "codex" || saved === "claude" ? saved : void 0;
|
|
36764
|
+
if (saved !== null) return saved === "agy" || saved === "codex" || saved === "claude" || saved === "grok" ? saved : void 0;
|
|
36182
36765
|
if (claudeTranscript) return "claude";
|
|
36183
36766
|
if (slot === "mcp-agent" || slot === "Claude Code") return "claude";
|
|
36184
36767
|
if (slot === "codex") return "codex";
|
|
36185
36768
|
if (slot === "antigravity") return "agy";
|
|
36186
36769
|
return void 0;
|
|
36187
36770
|
}
|
|
36771
|
+
function claudeOnFolderSession(harness, slot, sessionId2) {
|
|
36772
|
+
if (harness !== "claude") return null;
|
|
36773
|
+
const folder = sessionId2?.startsWith("cwd-") ? sessionId2 : slot.startsWith("session:cwd-") ? slot.slice("session:".length) : null;
|
|
36774
|
+
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;
|
|
36775
|
+
}
|
|
36188
36776
|
var runKey = (slot) => `slot:${slot}`;
|
|
36189
36777
|
var claimedRun = (sessionId2) => {
|
|
36190
36778
|
const slot = sessionSlot(sessionId2);
|
|
@@ -36484,6 +37072,11 @@ function startHost(opts) {
|
|
|
36484
37072
|
skip("has no recorded harness; select its runtime before recovery");
|
|
36485
37073
|
return;
|
|
36486
37074
|
}
|
|
37075
|
+
const mislabelled = claudeOnFolderSession(harness, slot, identity.sessionId);
|
|
37076
|
+
if (mislabelled) {
|
|
37077
|
+
skip(mislabelled);
|
|
37078
|
+
return;
|
|
37079
|
+
}
|
|
36487
37080
|
if (owner && !allowed(owner.cwd, opts.wsDeps)) {
|
|
36488
37081
|
skip(`ran in ${owner.cwd}, outside the folders this machine granted`);
|
|
36489
37082
|
return;
|
|
@@ -36735,7 +37328,7 @@ var STATUS_MARK = { ready: "\u2713", login: "\u25D0", "adapter-missing": "\u25D0
|
|
|
36735
37328
|
function printConnectLines(link, userCode, enter) {
|
|
36736
37329
|
console.log("Connect this computer from your phone");
|
|
36737
37330
|
console.log(` Open ${link}${enter ? " (press Enter to open it here)" : ""}`);
|
|
36738
|
-
console.log(` or scan the QR above \xB7 or type ${userCode} in Paigy \u2192
|
|
37331
|
+
console.log(` or scan the QR above \xB7 or type ${userCode} in Paigy \u2192 You \u203A Computers \u2192 Connect a computer`);
|
|
36739
37332
|
}
|
|
36740
37333
|
async function pairThisMachine() {
|
|
36741
37334
|
const host = hostname().replace(/\.local$/, "");
|
|
@@ -36869,10 +37462,11 @@ async function main() {
|
|
|
36869
37462
|
console.log(`\u26A0 could not wire ${t.cli} (${e.message.split("\n")[0]}) \u2014 its agents cannot reach you until it is: ${t.wire}`);
|
|
36870
37463
|
}
|
|
36871
37464
|
}
|
|
36872
|
-
if (which("claude")) {
|
|
37465
|
+
if (which("claude") || which("grok")) {
|
|
36873
37466
|
try {
|
|
36874
37467
|
execSync2(ENABLE_TOOLS_COMMAND, { stdio: "ignore", shell: "/bin/sh" });
|
|
36875
|
-
console.log("\u2713 Paigy's tools allowlisted in Claude Code (they won't prompt each time)");
|
|
37468
|
+
if (which("claude")) console.log("\u2713 Paigy's tools allowlisted in Claude Code (they won't prompt each time)");
|
|
37469
|
+
if (which("grok")) console.log("\u2713 Grok will be told to listen, and reminded when a turn stalls");
|
|
36876
37470
|
} catch {
|
|
36877
37471
|
console.log(` allowlist it later with: paigy-harness enable-tools`);
|
|
36878
37472
|
}
|
|
@@ -37008,9 +37602,11 @@ async function main() {
|
|
|
37008
37602
|
}
|
|
37009
37603
|
let launched;
|
|
37010
37604
|
if (parsed.launch) {
|
|
37605
|
+
const parent = slotName(agentName());
|
|
37606
|
+
const name = lineageName(parent, parsed.launch);
|
|
37011
37607
|
overrideToken(readSlot("Desktop") || null);
|
|
37012
37608
|
const session = randomUUID5();
|
|
37013
|
-
const minted = await hatch(
|
|
37609
|
+
const minted = await hatch(name, parsed.voice ?? null, {
|
|
37014
37610
|
reach: reachAs(session),
|
|
37015
37611
|
brief: parsed.prompt,
|
|
37016
37612
|
...parsed.under ? { parentGoalId: parsed.under } : {}
|
|
@@ -37019,7 +37615,7 @@ async function main() {
|
|
|
37019
37615
|
process.exit(1);
|
|
37020
37616
|
}).finally(() => overrideToken(null));
|
|
37021
37617
|
launched = { token: minted.token, session, ...minted.goalId ? { goalId: minted.goalId } : {} };
|
|
37022
|
-
console.log(`\u2713 launched "${minted.name ??
|
|
37618
|
+
console.log(`\u2713 launched "${minted.name ?? name}"${minted.name ? "" : " (unnamed: you already have an agent with that name)"}, on its own session; its Goal is ${minted.goalId ?? "missing"}`);
|
|
37023
37619
|
}
|
|
37024
37620
|
const askTerminal = async (promptText) => {
|
|
37025
37621
|
if (parsed.graceSeconds <= 0 || !process.stdin.isTTY) return null;
|