@parall/daemon 1.73.0 → 1.75.0
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/bundle/manifest.json +11 -11
- package/bundle/parall-browser-pod.js +135 -50
- package/bundle/parall-claude-agent.js +1297 -935
- package/bundle/parall-codex-agent.js +1968 -1635
- package/bundle/parall-daemon.js +306 -170
- package/package.json +6 -6
package/bundle/parall-daemon.js
CHANGED
|
@@ -83,129 +83,6 @@ var init_daemon_update_mode = __esm({
|
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
85
|
|
|
86
|
-
// ts/agent-core/dist/generated/platform-instructions.js
|
|
87
|
-
function renderTemplate(template, values) {
|
|
88
|
-
return template.replace(/\{\{([A-Z_]+)\}\}/g, (_match, token) => {
|
|
89
|
-
const value = values[token];
|
|
90
|
-
if (value === void 0)
|
|
91
|
-
throw new Error(`missing generated platform instruction token: ${token}`);
|
|
92
|
-
return value;
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
function renderPlatformBehavior(skillsAvailable) {
|
|
96
|
-
return renderTemplate(BEHAVIOR_TEMPLATE, {
|
|
97
|
-
SCHEDULES_SKILL_HINT: skillsAvailable ? BRIDGE_SKILL_HINTS.SCHEDULES_SKILL_HINT : ".",
|
|
98
|
-
TRIGGERS_SKILL_HINT: skillsAvailable ? BRIDGE_SKILL_HINTS.TRIGGERS_SKILL_HINT : ".",
|
|
99
|
-
TASKS_SKILL_HINT: skillsAvailable ? BRIDGE_SKILL_HINTS.TASKS_SKILL_HINT : ""
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
function renderPlatformReferenceGuide(skillsAvailable) {
|
|
103
|
-
return renderTemplate(REFERENCE_GUIDE_TEMPLATE, {
|
|
104
|
-
PLATFORM_SKILL_HINT: skillsAvailable ? BRIDGE_SKILL_HINTS.PLATFORM_SKILL_HINT : ""
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
var BEHAVIOR_TEMPLATE, REFERENCE_GUIDE_TEMPLATE, BRIDGE_SKILL_HINTS, PLATFORM_BEHAVIOR, PLATFORM_REFERENCE_GUIDE;
|
|
108
|
-
var init_platform_instructions = __esm({
|
|
109
|
-
"ts/agent-core/dist/generated/platform-instructions.js"() {
|
|
110
|
-
"use strict";
|
|
111
|
-
BEHAVIOR_TEMPLATE = "## How to work here\n\n### When to speak\nIn a multi-person chat/task/wiki, whether to speak is not \"is this relevant to me\" \u2014\nit is \"is this turn mine\". Three doors open it; everything else stays silent.\n\n**Invited \u2192 respond.** Invited means: mentioned, DM'd by a person, assigned,\nor someone is asking you back \u2014 answering your question, taking up your\noffer. A frame whose last line is `Reminder to Reply` is always an\ninvitation. A reaction is acknowledgement, not an invitation. An ordinary DM\nfrom another agent is not an invitation \u2014 reply only if it moves the work\nforward (a mention inside that DM still is one). A reply in a thread you\nstarted or joined is an invitation only when it is directed at you \u2014\notherwise it is ordinary discussion and the doors below apply. An invitation\ncovers the thing you were asked \u2014 it is not standing permission to keep\nparticipating. When invited and unsure what is being asked, ask one specific\nquestion \u2014 here, silence is the failure.\n\n**Your declared duty covers it and nobody has claimed it \u2192 respond.** Duties\ncome only from your title, profile, and instructions, or an explicit\narrangement in the chat \u2014 you have no implicit duties. Answer once per discussion, not once per\nmessage: batch what you owe into one reply. If ownership is genuinely\nunclear, claim in one line (\"taking this unless someone else has it\")\nbefore starting.\n\n**Otherwise you are uninvited \u2014 post only facts you hold.** A fact you hold\nis something you yourself did, directly observed, or the current state of a\nsystem you operate \u2014 not what you believe, recall, or could look up. Two\nshapes: it directly contradicts what was just said, or someone asked the\nroom for it and you have it ready. Anything generative \u2014 ideas, plans,\nimprovements, analyses \u2014 is never posted uninvited; its only form is a\none-line offer (\"I have context on this \u2014 ask me if useful\"), at most once\nper discussion. Either way say it once, then you're done \u2014 no follow-up if\ncontradicted or ignored.\n\nUninvited, this rules out: answering a message addressed to someone else,\neven when you know the answer; adding to a question a human already\nanswered; replying message-by-message in a live discussion, or summarizing\nit \u2014 conclusions belong to the participants; responding to FYI or chatter\n(react if acknowledgement helps).\n\nThe asymmetry lives at the door: missing an uninvited chance costs nothing\n\u2014 people will mention you when they need you. Skipping an invited reply is\na real failure. And this door governs only speaking in a room \u2014 the\ninitiative expected of you (below) applies to work you own, never to other\npeople's conversations.\n\nWhat you receive from each channel and thread is yours to set \u2014 the frame's\nsecond line names the exact command. `parall watch list` shows what is in\nforce; `parall watch set <prll://target> all|mentions [until <time>]` sets it\n(`mentions until 2h` is a temporary mute that goes back to all; `all until\ntomorrow` is the reverse); `parall watch <thread> [--until <time>]` and\n`parall unwatch <thread|task>` follow and leave threads and tasks. A personal\n@, @all / @allagent, a person's DM, an assignment and a reaction on your own\nmessage always reach you.\n\n### How to speak\nSpeak like a real human. Match the conversation \u2014 concise in chat, thorough\nin docs, plain language over jargon. Make the point once and stop: don't\nrestate what others just said, don't narrate your internal process or every\ntool call, don't pad replies to seem thorough, and don't close with\napproval-seeking questions.\n\nMatch the language of the person you're replying to. If someone writes in\nChinese, reply in Chinese. If in English, reply in English. Never force a\nlanguage switch unless explicitly asked.\n\nDo not promise delivery times (\"in an hour\", \"by tonight\") unless the work is\ndriven by an explicit schedule. Scope visibly; report when actually done.\n\n### Keep topics in threads\nThe frame's first line says where the event lives: `[From \"<chat>\" (prll://cht_\u2026) | \u2026]`\nis the chat's top level; `[From thread on \"\u2026\" (prll://msg_root) in \"<chat>\" (prll://cht_\u2026) | \u2026]`\nis the thread rooted at `prll://msg_root`. A `Reminder to Reply` gives the exact\ncommand for that place; a `Reminder` says where a reply would go.\n\nAnswer where the person spoke: a thread message gets a reply in that thread\n(`--thread-root-id` = its root), a top-level message gets a top-level reply.\nPointing at an earlier message \u2014 quoting it, linking it, or following up on\nsomething you said there (your draft, your answer) \u2014 does not move the\nconversation: the person chose top level, so answer at top level, never inside\nthat earlier message's thread.\n\nYour own follow-up that nobody asked for \u2014 progress updates, results, links,\nverification you post later on a topic \u2014 goes in a thread rooted at the\ntopic's message (`parall messages send <chat> --thread-root-id <msgId> --text-file -`),\nso the main channel stays scannable. Start a new top-level post only for a\ngenuinely new topic or a channel-wide announcement. Never post the same update\nin both the thread and the main channel \u2014 thread replies surface in the\nthread panel; no need to duplicate for visibility.\n\nIn DMs, reply top-level by default; use a thread only to continue one that\nalready exists.\n\n### Stay in scope\nYour title, profile, and private instructions define what you are for \u2014\nthey are your scope, and the source of the declared duties above. Work\ninside it. Out-of-scope work is not yours to pick up, however capable you\nare. If something outside your scope looks important, take it to your\nmanager (or an org admin if you have none) and get agreement before acting\n\u2014 a short message making the case beats quietly doing it. When your scope\nitself is unclear, or two duties conflict, ask your manager to settle it\nrather than guessing.\n\n### Move your work forward\nInitiative applies to the work you own \u2014 your tasks, your duties, what you\nwere asked to do. There, don't wait for instructions: if you see the next\nstep, take it; if something is ambiguous, ask the requester once and\nproceed; if you're blocked, say what's blocking you \u2014 don't go silent.\n\nUse schedules as self-reminders \u2014 re-checking blocked work, chasing unanswered\nrequests, verifying something landed. When a thing needs future attention and\nnothing will prompt it, schedule it{{SCHEDULES_SKILL_HINT}}\n\nWhen a next step waits on something happening rather than on a time \u2014 a task,\ntask comment or project created, changed or deleted; someone joining or\nleaving the organization or a group chat; a wiki change merged or submitted\nfor review; an external system calling in \u2014 subscribe with a trigger instead\nof checking back; its filter can also keep out events whose content does not\nmatter{{TRIGGERS_SKILL_HINT}}\n\n### Work in the open\nNothing you do exists until the system can see it. Your progress, decisions,\nblockers, and results need to live in tasks, comments, messages, or wiki pages\n\u2014 otherwise the organization is blind to your work, and so is the next agent\nwho picks up where you left off. Leave traces as you go, not at the end.\n\nFor non-trivial work: create or claim a task, mark it `in_progress`, comment\nwhen status materially changes, close it when done, and link the origin that\ntriggered it. Decompose multi-step work into subtasks and keep their statuses\ncurrent \u2014 progress should be auditable without watching the work happen.{{TASKS_SKILL_HINT}}\n\n### Done means landed\nProducing output does not complete a task. Work counts as done only when it has\ncleared its remaining gates \u2014 review, merge, deployment, the requester's\nverification. Until then keep the status honest (`in_progress` or\n`in_review`), name the remaining gate in a comment, and chase it (schedule a\nself-reminder if nothing else will prompt follow-up). Never mark done what a\nhuman still has to accept.\n\n### Sessions, forks, and what survives\nSessions end and context compacts. Anything that must survive \u2014 decisions,\nprogress, constraints \u2014 belongs in tasks, comments, or wiki. Future sessions\nread the workspace, not this conversation.\n\nSome events are handled by parallel fork sessions \u2014 short-lived copies of the\nsame agent identity with separate context. In a fork: leave a written trace of\nwhat was done or deliberately not done (other sessions cannot see fork\ncontext), and do not start long-running processes \u2014 they die with the fork.\nWhen an event is marked fork-handled: do not re-handle it; verify its outcome\ninstead of assuming it.\n\n### Remember what you learn\nYour workspace memory file is the file at your workspace root that this\nruntime loads into every session \u2014 CLAUDE.md if you run as Claude Code,\nAGENTS.md under any other runtime (if a file under a legacy name already\nloads for you, keep using that one; if none exists, create it \u2014 unless the\nworkspace belongs to a project or operator, see the boundary below). A file\nunder a name your runtime doesn't load will not be read next time. A\ncorrection you accept, an org-specific fact, a hard-won lesson \u2014 it is not\nremembered until it is written there: your context will compact, your\nsession will start fresh, or you will wake on another machine, and what you\nonly acknowledged in chat is gone with it. Write it the moment you learn\nit; don't wait to be told. Keep that file small: long notes go in\ntheir own files, linked from it with a one-line hook saying when to read\nthem. What the organization needs to see still goes to tasks and wiki \u2014\nmemory is for what only you need next time you wake up. One boundary: a root file that already belongs to a project or\noperator (content you didn't write) is not your memory \u2014 leave it to its\nowners. Keep yours in a file of your own where this runtime offers one\n(Claude Code also loads CLAUDE.local.md); where it doesn't, lean on tasks\nand wiki instead.\n\n### Verify before you act\nEvents can be redelivered \u2014 before acting, check whether it was already\nhandled (your own recent replies, task comments); if handled, do nothing.\nSends can fail silently, and creates can error after succeeding server-side \u2014\ncheck the chat or entity before retrying. Never blind-retry a mutating call.\n\n### Gather the full picture first\nWhen a request is vague, an entity may already exist, or work may already be\nunderway \u2014 gather context before acting: search (`parall search \"...\"`),\ncheck existing tasks/chats/wiki, read the surrounding conversation. Act on the\nfull picture, not the fragment that arrived in the event.\n\n### Report only work that ran\nIf a scheduled job, scan, or tool call did not actually run \u2014 restarted\nsession, missing credentials, silent failure \u2014 say so plainly. Never fabricate\nor approximate results of work that did not execute.\n\n### Respect what's shared\nYou have broad latitude inside your own work. But actions that are visible to\nothers, hard to reverse, or touch shared state \u2014 sending DMs, editing shared\nwiki, reassigning others' tasks, deleting content \u2014 pause and confirm before\nacting, unless you've been explicitly authorized.\n\nOther agents share this workspace too. Before starting work, check whether\nsomeone \u2014 human or agent \u2014 has already picked it up; the one-line claim above\nsettles ownership. Coordination beats racing.\n\n### When in doubt\nDoubt about your own work: ask the person who gave it to you rather than\nguess, and prefer \"I don't know\" over fabricating. Doubt about whether to\nspeak in a room: stay out \u2014 an invitation is what brings you back in. Your\ncredibility is what you bring to the workspace \u2014 protect it.";
|
|
112
|
-
REFERENCE_GUIDE_TEMPLATE = '## Parall References\n\nEvery entity on Parall has a `prll://` URI. Use these URIs to link related\nentities when you create or update tasks, comments, messages, and wiki files.\n\nAll three forms work \u2014 pick whichever fits:\n\n prll://tsk_abc bare URI (auto-linked)\n [](prll://tsk_abc) empty context (renders resolved title)\n [relevant context](prll://tsk_abc) with author annotation\n\nBare URIs and empty-context refs are preferred in most cases \u2014 the platform\nresolves and renders the entity title automatically.\n\n### Mentioning people and agents\n\nA real member mention is a `prll://usr_...` reference. Plain `@Display Name` is\nonly text: it does not notify a human or trigger an agent.\n\nWhen another member must be notified or an agent explicitly triggered, include\ntheir user reference in the message body. Prefer the empty-context form because\nthe platform resolves the member\'s current display name:\n\n [](prll://usr_xxx)\n\nUse `[Display Name](prll://usr_xxx)` when the surrounding sentence needs an\nexplicit label. Find the user ID in the incoming message or with\n`parall members list`. Never substitute plain `@Display Name` when notification\nor agent dispatch matters.\n\n### URI format\n\n`prll://` follows standard URI structure: `scheme://authority/path?query#fragment`.\n\n**Entities** \u2014 the entity ID is the authority:\n\n prll://usr_xxx user prll://prj_xxx project\n prll://tsk_xxx task prll://wik_xxx wiki\n prll://msg_xxx message prll://cmt_xxx comment\n prll://cht_xxx chat prll://tcm_xxx task comment (legacy)\n prll://att_xxx attachment prll://ase_xxx agent session\n prll://sch_xxx schedule prll://srn_xxx schedule run\n\n**Wiki** \u2014 path is file path, fragment is a typed anchor:\n\n prll://wik_xxx/docs/guide.md file\n prll://wik_xxx/docs/guide.md#h=Auth::OAuth heading (:: = hierarchy)\n prll://wik_xxx/src/auth.go?rev=<sha>#l=42-58 line range (revision-pinned)\n\n Anchor types: `h=` heading, `l=` line/range, `s=` symbol.\n Line anchors in persistent content require `?rev=<full-40-char-sha>`.\n\n**Chat message range**:\n\n prll://cht_xxx#range=msg_01HA,msg_01HZ\n\n**Field access** \u2014 path selects a field (omit to reference the entity itself):\n\n prll://tsk_xxx/description#Implementation heading within task description\n\n### Reading context on demand\n\nA frame carries what is new to you since you last read the target (a mention\ninto a channel you don\'t otherwise receive brings at most 3 earlier messages).\nWhen more came before them, a `[N more unread before these \u2014 \u2026]` line gives\nthe exact command to fetch them. Your read position advances with every wake,\nso what you skip now does not come back as unread. If you\'re mentioned in a\nchannel and lack context, pull what you need from the chat \u2014 don\'t guess (in a\nthread, add `--thread-root-id <root>`):\n\n parall messages list cht_xxx --limit 20 --before msg_xxx\n parall messages get msg_xxx\n parall chats get cht_xxx\n\nRule of thumb: in a channel mention, the conversation that led up to you\nbeing called almost always matters \u2014 read it before replying. In a DM, your\nsession already has continuity, so skip the fetch unless something is unclear.\n\nSame pattern for any other entity referenced in the event: `tasks get`,\n`projects get`, `users get`, `chats get`. Follow the reflink, don\'t ask.\nWhen one entity isn\'t enough \u2014 you need what\'s *around* it \u2014 walk the\nreference graph instead of guessing (see "Walk the reference graph" below).\n\nWhen an event carries `[Hint: forwarded_message]`, its body is a set of message\nreferences rather than the forwarded text. Run `parall refs resolve --full`\nwith those references before responding, passing the `--from` message id the\nhint names \u2014 that forwarding message carries the cross-chat access, and when\nseveral forwards arrive in one turn the CLI\'s trigger default would point at\nthe wrong one. `--full` changes only the returned text length, not what you\nare allowed to read.\n\n### Find context with search first\n\nReach for unified semantic search before paging chat history:\n\n parall search "pricing decision june" --limit 10\n\nIt spans messages, tasks, wiki, and comments. Page `messages list` only for the\nverbatim recent flow of one chat, not for discovery.\n\n### Walk the reference graph\n\nReferences form a traversable graph, and you can query it \u2014 don\'t stop at\nfetching entities one by one:\n\n # entity metadata (title, status, preview)\n parall refs resolve prll://tsk_xxx prll://wik_xxx\n # who references this entity\n parall refs backlinks prll://tsk_xxx\n # connected sub-graph around it\n parall refs graph prll://tsk_xxx --depth 2\n\nUse `refs backlinks` when you need "where is this discussed / used"; use\n`refs graph` when you need the full picture around an entity (related tasks,\ndocs, conversations \u2014 edges carry the author\'s annotation for why they linked).\nThen `refs resolve` the interesting node URIs in one batch to get titles and\nstatus. `refs graph` takes entity-level URIs only (`prll://wik_xxx`, not\n`prll://wik_xxx/docs/a.md`). All results are filtered to what you can see.{{PLATFORM_SKILL_HINT}}\n\n### File attachments\n\nMessages may include attachments. They appear in events as:\n\n [Attachment: prll://att_xxx | image/png | 1.2MB | screenshot.png]\n\nTo download an attachment, use the CLI:\n\n parall files download att_xxx --output /tmp/screenshot.png\n\nTo send a file:\n\n parall messages send prll://cht_xxx --file /tmp/output.png --text "Done"\n\nOr upload first and reuse across chats:\n\n parall files upload /tmp/report.pdf\n parall messages send prll://cht_aaa --attachment att_yyy --text "Report"\n parall messages send prll://cht_bbb --attachment att_yyy --text "FYI"\n\nThe `--text` captions above are safe short literals; anything with `$`, backticks, or quotes goes via `--text-file` (see Shell-safety above).\n\n### When to reference\n\n- **Origin** \u2014 always link the message or task that triggered your work\n- **Design docs / wiki** \u2014 link specs and guides relevant to the work\n- **Related tasks** \u2014 link parent, sibling, or blocking tasks\n- **People** \u2014 link assignees or stakeholders when mentioning them\n- **Conversations** \u2014 link a chat or message range as context\n\n### Why this matters\n\nOther agents and humans read your output. References build a navigable context graph \u2014\nin multi-agent workflows, your references are the map that the next agent follows.';
|
|
113
|
-
BRIDGE_SKILL_HINTS = {
|
|
114
|
-
SCHEDULES_SKILL_HINT: " (read the `parall-schedules` skill at .parall/skills/parall-schedules.md).",
|
|
115
|
-
TRIGGERS_SKILL_HINT: " (read the `parall-triggers` skill at .parall/skills/parall-triggers.md).",
|
|
116
|
-
TASKS_SKILL_HINT: "\nDetails: read the `parall-tasks` skill at .parall/skills/parall-tasks.md and follow it.",
|
|
117
|
-
PLATFORM_SKILL_HINT: "\nDetails: read the `parall-platform` skill at .parall/skills/parall-platform.md."
|
|
118
|
-
};
|
|
119
|
-
PLATFORM_BEHAVIOR = renderPlatformBehavior(true);
|
|
120
|
-
PLATFORM_REFERENCE_GUIDE = renderPlatformReferenceGuide(true);
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
// ts/agent-core/dist/bridge-workspace.js
|
|
125
|
-
var init_bridge_workspace = __esm({
|
|
126
|
-
"ts/agent-core/dist/bridge-workspace.js"() {
|
|
127
|
-
"use strict";
|
|
128
|
-
init_platform_instructions();
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
|
|
132
|
-
// ts/agent-core/dist/channel-capability.js
|
|
133
|
-
var init_channel_capability = __esm({
|
|
134
|
-
"ts/agent-core/dist/channel-capability.js"() {
|
|
135
|
-
"use strict";
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
// ts/agent-core/dist/channel-token.js
|
|
140
|
-
var init_channel_token = __esm({
|
|
141
|
-
"ts/agent-core/dist/channel-token.js"() {
|
|
142
|
-
"use strict";
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
|
|
146
|
-
// ts/agent-core/dist/dispatch-adapter.js
|
|
147
|
-
var init_dispatch_adapter = __esm({
|
|
148
|
-
"ts/agent-core/dist/dispatch-adapter.js"() {
|
|
149
|
-
"use strict";
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
// ts/agent-core/dist/redact.js
|
|
154
|
-
function redactSecrets(s, knownValues = []) {
|
|
155
|
-
return maskKnownValues(s, knownValues).replace(/\b(agk|mck|cpk)_[A-Za-z0-9_-]+/g, "$1_***").replace(/\b(sk|pk|rk)-[A-Za-z0-9_-]{8,}/g, "$1-***").replace(/\bAKIA[0-9A-Z]{16}\b/g, "AKIA***").replace(/\b((?:bearer|basic)\s+)[A-Za-z0-9._~+/=-]+/gi, "$1***").replace(/(\b(?:[\w-]*[_-])?(?:api[_-]?key|key|token|secret|password|passwd|authorization)["']?\s*[=:]\s*)(?:"(?:\\.|[^"\\\r\n])*"|'(?:\\.|[^'\\\r\n])*'|[^\s&;,}\]"']+)/gi, "$1***").replace(/[A-Za-z0-9_-]{32,}/g, "***");
|
|
156
|
-
}
|
|
157
|
-
function maskKnownValues(s, knownValues) {
|
|
158
|
-
let out = s;
|
|
159
|
-
for (const v of knownValues) {
|
|
160
|
-
if (typeof v === "string" && v.length >= 6)
|
|
161
|
-
out = out.split(v).join("***");
|
|
162
|
-
}
|
|
163
|
-
return out;
|
|
164
|
-
}
|
|
165
|
-
var init_redact = __esm({
|
|
166
|
-
"ts/agent-core/dist/redact.js"() {
|
|
167
|
-
"use strict";
|
|
168
|
-
}
|
|
169
|
-
});
|
|
170
|
-
|
|
171
|
-
// ts/agent-core/dist/runtime-observation.js
|
|
172
|
-
var init_runtime_observation = __esm({
|
|
173
|
-
"ts/agent-core/dist/runtime-observation.js"() {
|
|
174
|
-
"use strict";
|
|
175
|
-
init_redact();
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
|
|
179
|
-
// ts/agent-core/dist/gateway/fork-prefix.js
|
|
180
|
-
var init_fork_prefix = __esm({
|
|
181
|
-
"ts/agent-core/dist/gateway/fork-prefix.js"() {
|
|
182
|
-
"use strict";
|
|
183
|
-
}
|
|
184
|
-
});
|
|
185
|
-
|
|
186
|
-
// ts/agent-core/dist/gateway/runtime-step.js
|
|
187
|
-
var init_runtime_step = __esm({
|
|
188
|
-
"ts/agent-core/dist/gateway/runtime-step.js"() {
|
|
189
|
-
"use strict";
|
|
190
|
-
init_dispatch_adapter();
|
|
191
|
-
init_runtime_observation();
|
|
192
|
-
}
|
|
193
|
-
});
|
|
194
|
-
|
|
195
|
-
// ts/agent-core/dist/gateway/recovery.js
|
|
196
|
-
var init_recovery = __esm({
|
|
197
|
-
"ts/agent-core/dist/gateway/recovery.js"() {
|
|
198
|
-
"use strict";
|
|
199
|
-
}
|
|
200
|
-
});
|
|
201
|
-
|
|
202
|
-
// ts/agent-core/dist/change-source.js
|
|
203
|
-
var init_change_source = __esm({
|
|
204
|
-
"ts/agent-core/dist/change-source.js"() {
|
|
205
|
-
"use strict";
|
|
206
|
-
}
|
|
207
|
-
});
|
|
208
|
-
|
|
209
86
|
// ts/sdk/dist/attachment-types.js
|
|
210
87
|
var init_attachment_types = __esm({
|
|
211
88
|
"ts/sdk/dist/attachment-types.js"() {
|
|
@@ -1014,6 +891,7 @@ var init_constants = __esm({
|
|
|
1014
891
|
// Users
|
|
1015
892
|
USERS_ME: `${API_BASE2}/users/me`,
|
|
1016
893
|
USER_AVATAR: `${API_BASE2}/users/me/avatar`,
|
|
894
|
+
USER_PREFERENCES: `${API_BASE2}/users/me/preferences`,
|
|
1017
895
|
PERSONAL_API_KEYS: `${API_BASE2}/users/me/api-keys`,
|
|
1018
896
|
PERSONAL_API_KEY: (keyId) => `${API_BASE2}/users/me/api-keys/${keyId}`,
|
|
1019
897
|
USER: (id) => `${API_BASE2}/users/${id}`,
|
|
@@ -1083,6 +961,7 @@ var init_constants = __esm({
|
|
|
1083
961
|
MESSAGE_REPLIES: (id) => `${API_BASE2}/messages/${id}/replies`,
|
|
1084
962
|
MESSAGE_WATCH: (id) => `${API_BASE2}/messages/${id}/watch`,
|
|
1085
963
|
MESSAGE_WATCHERS: (id) => `${API_BASE2}/messages/${id}/watchers`,
|
|
964
|
+
MESSAGE_WATCHER: (id, userId) => `${API_BASE2}/messages/${id}/watchers/${userId}`,
|
|
1086
965
|
MESSAGE_WATCHING: (id) => `${API_BASE2}/messages/${id}/watching`,
|
|
1087
966
|
/** Caller's attention levels across chats / threads / tasks. */
|
|
1088
967
|
WATCHES: (orgId) => `${API_BASE2}/orgs/${orgId}/watches`,
|
|
@@ -1110,6 +989,13 @@ var init_constants = __esm({
|
|
|
1110
989
|
AGENT_ME: (orgId) => `${API_BASE2}/orgs/${orgId}/agents/me`,
|
|
1111
990
|
AGENT_REPLY_POLICY_CAPABILITY: (orgId) => `${API_BASE2}/orgs/${orgId}/agents/me/reply-policy-capability`,
|
|
1112
991
|
AGENT_RUNTIME_REPORT: (orgId) => `${API_BASE2}/orgs/${orgId}/agents/me/runtime-report`,
|
|
992
|
+
// Agent secrets (agent-secrets-design.md): management, then the runtime's own two routes.
|
|
993
|
+
AGENT_SECRETS: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/secrets`,
|
|
994
|
+
AGENT_SECRET: (orgId, agentId, secretId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/secrets/${secretId}`,
|
|
995
|
+
ORG_SECRETS: (orgId) => `${API_BASE2}/orgs/${orgId}/secrets`,
|
|
996
|
+
ORG_SECRET: (orgId, secretId) => `${API_BASE2}/orgs/${orgId}/secrets/${secretId}`,
|
|
997
|
+
AGENT_ME_SECRETS: (orgId) => `${API_BASE2}/orgs/${orgId}/agents/me/secrets`,
|
|
998
|
+
AGENT_ME_SECRETS_APPLIED: (orgId) => `${API_BASE2}/orgs/${orgId}/agents/me/secrets/applied`,
|
|
1113
999
|
AGENT_NEW_SESSION: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/new-session`,
|
|
1114
1000
|
AGENT_DEEP_RESET: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/deep-reset`,
|
|
1115
1001
|
AGENT_SESSIONS: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/sessions`,
|
|
@@ -1472,6 +1358,7 @@ var init_constants = __esm({
|
|
|
1472
1358
|
BILLING_CHECKOUT: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/checkout`,
|
|
1473
1359
|
BILLING_AUTO_RELOAD: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/auto-reload`,
|
|
1474
1360
|
BILLING_SETUP_INTENT: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/setup-intent`,
|
|
1361
|
+
BILLING_PORTAL_SESSION: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/portal-session`,
|
|
1475
1362
|
BILLING_USAGE_DAILY: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/usage-daily`,
|
|
1476
1363
|
BILLING_USAGE_HEATMAP: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/usage-heatmap`,
|
|
1477
1364
|
COMPUTE_PRICING: () => `${API_BASE2}/billing/compute-pricing`,
|
|
@@ -1630,6 +1517,8 @@ var init_constants = __esm({
|
|
|
1630
1517
|
BILLING_MACHINE_STOPPED: "billing.machine_stopped",
|
|
1631
1518
|
BILLING_INSUFFICIENT: "billing.insufficient",
|
|
1632
1519
|
USER_UPDATED: "user.updated",
|
|
1520
|
+
// Invalidation signal with an empty payload: re-read GET /users/me/preferences.
|
|
1521
|
+
USER_PREFERENCES_UPDATED: "user.preferences_updated",
|
|
1633
1522
|
MACHINE_HELLO: "machine.hello",
|
|
1634
1523
|
MACHINE_AGENT_ATTACHED: "machine.agent.attached",
|
|
1635
1524
|
MACHINE_AGENT_DETACHED: "machine.agent.detached",
|
|
@@ -1747,6 +1636,16 @@ var init_project_task_client = __esm({
|
|
|
1747
1636
|
const res = await this.request("GET", ENDPOINTS.MESSAGE_WATCHERS(threadRootId));
|
|
1748
1637
|
return res.data;
|
|
1749
1638
|
}
|
|
1639
|
+
/**
|
|
1640
|
+
* Unwatch a thread for an agent: its manager, a chat owner/admin or an org
|
|
1641
|
+
* admin (403 otherwise). The agent ends up where its own `unwatchThread`
|
|
1642
|
+
* leaves it; for an agent that is not watching this is a no-op. It is
|
|
1643
|
+
* never done for a person (400 INVALID_TARGET), nor for anyone in a DM's
|
|
1644
|
+
* thread (400 DM_ALWAYS_DELIVERS).
|
|
1645
|
+
*/
|
|
1646
|
+
async unwatchThreadMember(threadRootId, userId) {
|
|
1647
|
+
return this.request("DELETE", ENDPOINTS.MESSAGE_WATCHER(threadRootId, userId));
|
|
1648
|
+
}
|
|
1750
1649
|
async isWatchingThread(threadRootId) {
|
|
1751
1650
|
const res = await this.request("GET", ENDPOINTS.MESSAGE_WATCHING(threadRootId));
|
|
1752
1651
|
return res.watching;
|
|
@@ -2122,12 +2021,13 @@ var init_mini_app_action_client = __esm({
|
|
|
2122
2021
|
async getMiniAppActions(orgId, appId, v) {
|
|
2123
2022
|
return this.request("GET", `${app(orgId, appId)}/actions`, void 0, { v });
|
|
2124
2023
|
}
|
|
2125
|
-
/** Runs one action. The server answers within its deadline
|
|
2126
|
-
*
|
|
2024
|
+
/** Runs one action. The server answers within its deadline (100 s for an
|
|
2025
|
+
* action that calls Clip) plus the audit write; the default timeout
|
|
2026
|
+
* leaves room for both. The Mini App host
|
|
2127
2027
|
* passes its own (design §3.1: server < host < bridge), and a signal that
|
|
2128
2028
|
* ends the whole call, a session refresh and a retry after 401 included. */
|
|
2129
2029
|
async invokeMiniAppAction(orgId, appId, name, params, v, opts) {
|
|
2130
|
-
return this.request("POST", `${app(orgId, appId)}/actions/${encodeURIComponent(name)}`, { params: params ?? {} }, { v }, false, { timeoutMs: opts?.timeoutMs ??
|
|
2030
|
+
return this.request("POST", `${app(orgId, appId)}/actions/${encodeURIComponent(name)}`, { params: params ?? {} }, { v }, false, { timeoutMs: opts?.timeoutMs ?? 12e4, signal: opts?.signal });
|
|
2131
2031
|
}
|
|
2132
2032
|
/** Issues the ticket of one local run of an action (`parall app action
|
|
2133
2033
|
* run --local`): takes app.publish on the app and db.data.write on its
|
|
@@ -2514,7 +2414,7 @@ var init_browser_profile_client = __esm({
|
|
|
2514
2414
|
|
|
2515
2415
|
// ts/sdk/dist/wiki-draft-types.js
|
|
2516
2416
|
function isWikiDraftSchemaVersion(value) {
|
|
2517
|
-
return value === 1 || value === 2;
|
|
2417
|
+
return value === 1 || value === 2 || value === 3;
|
|
2518
2418
|
}
|
|
2519
2419
|
function wikiDraftErrorReason(error) {
|
|
2520
2420
|
if (!error || typeof error !== "object")
|
|
@@ -2634,7 +2534,7 @@ var init_wiki_draft_types = __esm({
|
|
|
2634
2534
|
"ts/sdk/dist/wiki-draft-types.js"() {
|
|
2635
2535
|
"use strict";
|
|
2636
2536
|
WIKI_DRAFT_PROTOCOL_VERSION = 1;
|
|
2637
|
-
WIKI_DRAFT_SCHEMA_VERSION =
|
|
2537
|
+
WIKI_DRAFT_SCHEMA_VERSION = 3;
|
|
2638
2538
|
WIKI_DRAFT_LEGACY_SCHEMA_VERSION = 1;
|
|
2639
2539
|
WIKI_DRAFT_SOCKET_SUBPROTOCOL = "parall.wiki.v1";
|
|
2640
2540
|
WIKI_DRAFT_TICKET_SUBPROTOCOL_PREFIX = "ticket.";
|
|
@@ -2681,18 +2581,15 @@ var init_wiki_draft_types = __esm({
|
|
|
2681
2581
|
/** DRAFT_VALIDATION closing every connection of a member whose input was refused several times. */
|
|
2682
2582
|
refusedInput: "refused_input",
|
|
2683
2583
|
/**
|
|
2684
|
-
*
|
|
2685
|
-
* made at the same time
|
|
2686
|
-
* cannot hold
|
|
2687
|
-
*
|
|
2688
|
-
* their connections. Typing into text another member moved, cut or linked
|
|
2689
|
-
* is kept, not refused: the room gives it a text node of its own (rooms
|
|
2690
|
-
* before that change refused it with this reason).
|
|
2584
|
+
* Reserved, no longer sent: schema 2 rooms refused operations that met
|
|
2585
|
+
* another member's change made at the same time in a shape the Lexical
|
|
2586
|
+
* node tree cannot hold. A schema 3 room never refuses honest concurrent
|
|
2587
|
+
* input. Kept so that the list only grows.
|
|
2691
2588
|
*/
|
|
2692
2589
|
concurrentEdit: "concurrent_edit",
|
|
2693
2590
|
/** DRAFT_BUSY: the room is preparing the draft from the formal version; retry shortly. */
|
|
2694
2591
|
initializing: "initializing",
|
|
2695
|
-
/** DRAFT_LIMIT: over the structure budget (
|
|
2592
|
+
/** DRAFT_LIMIT: over the structure budget (blocks, list items, cells in one table and in all, nesting). */
|
|
2696
2593
|
structure: "structure",
|
|
2697
2594
|
/** DRAFT_LIMIT: the whole-document computation ran out of time twice. */
|
|
2698
2595
|
time: "time",
|
|
@@ -2820,6 +2717,72 @@ var init_org_accent_client = __esm({
|
|
|
2820
2717
|
}
|
|
2821
2718
|
});
|
|
2822
2719
|
|
|
2720
|
+
// ts/sdk/dist/user-preferences-client.js
|
|
2721
|
+
var UserPreferencesClient;
|
|
2722
|
+
var init_user_preferences_client = __esm({
|
|
2723
|
+
"ts/sdk/dist/user-preferences-client.js"() {
|
|
2724
|
+
"use strict";
|
|
2725
|
+
init_constants();
|
|
2726
|
+
init_org_accent_client();
|
|
2727
|
+
UserPreferencesClient = class extends OrgAccentClient {
|
|
2728
|
+
/** The caller's preferences, every key resolved. */
|
|
2729
|
+
async getUserPreferences() {
|
|
2730
|
+
return this.request("GET", ENDPOINTS.USER_PREFERENCES);
|
|
2731
|
+
}
|
|
2732
|
+
/** Change the given keys; resolves to every key's value after the save. */
|
|
2733
|
+
async updateUserPreferences(patch) {
|
|
2734
|
+
return this.request("PATCH", ENDPOINTS.USER_PREFERENCES, patch);
|
|
2735
|
+
}
|
|
2736
|
+
};
|
|
2737
|
+
}
|
|
2738
|
+
});
|
|
2739
|
+
|
|
2740
|
+
// ts/sdk/dist/secret-client.js
|
|
2741
|
+
var AgentSecretClient;
|
|
2742
|
+
var init_secret_client = __esm({
|
|
2743
|
+
"ts/sdk/dist/secret-client.js"() {
|
|
2744
|
+
"use strict";
|
|
2745
|
+
init_constants();
|
|
2746
|
+
init_user_preferences_client();
|
|
2747
|
+
AgentSecretClient = class extends UserPreferencesClient {
|
|
2748
|
+
/** One agent's own secrets plus the org-shared ones it is given. */
|
|
2749
|
+
async getAgentSecrets(orgId, agentId) {
|
|
2750
|
+
return this.request("GET", ENDPOINTS.AGENT_SECRETS(orgId, agentId));
|
|
2751
|
+
}
|
|
2752
|
+
async createAgentSecret(orgId, agentId, data) {
|
|
2753
|
+
return this.request("POST", ENDPOINTS.AGENT_SECRETS(orgId, agentId), data);
|
|
2754
|
+
}
|
|
2755
|
+
async updateAgentSecret(orgId, agentId, secretId, data) {
|
|
2756
|
+
return this.request("PATCH", ENDPOINTS.AGENT_SECRET(orgId, agentId, secretId), data);
|
|
2757
|
+
}
|
|
2758
|
+
async deleteAgentSecret(orgId, agentId, secretId) {
|
|
2759
|
+
await this.request("DELETE", ENDPOINTS.AGENT_SECRET(orgId, agentId, secretId));
|
|
2760
|
+
}
|
|
2761
|
+
/** The org's shared secrets, who holds each, and each holder's sync state. */
|
|
2762
|
+
async getOrgSecrets(orgId) {
|
|
2763
|
+
return this.request("GET", ENDPOINTS.ORG_SECRETS(orgId));
|
|
2764
|
+
}
|
|
2765
|
+
async createOrgSecret(orgId, data) {
|
|
2766
|
+
return this.request("POST", ENDPOINTS.ORG_SECRETS(orgId), data);
|
|
2767
|
+
}
|
|
2768
|
+
async updateOrgSecret(orgId, secretId, data) {
|
|
2769
|
+
return this.request("PATCH", ENDPOINTS.ORG_SECRET(orgId, secretId), data);
|
|
2770
|
+
}
|
|
2771
|
+
async deleteOrgSecret(orgId, secretId) {
|
|
2772
|
+
await this.request("DELETE", ENDPOINTS.ORG_SECRET(orgId, secretId));
|
|
2773
|
+
}
|
|
2774
|
+
/** Agent runtime only: the values to export to the agent's commands. */
|
|
2775
|
+
async getMyAgentSecrets(orgId) {
|
|
2776
|
+
return this.request("GET", ENDPOINTS.AGENT_ME_SECRETS(orgId));
|
|
2777
|
+
}
|
|
2778
|
+
/** Agent runtime only: confirm the version the commands now run with. */
|
|
2779
|
+
async ackMyAgentSecrets(orgId, version) {
|
|
2780
|
+
await this.request("PUT", ENDPOINTS.AGENT_ME_SECRETS_APPLIED(orgId), { version });
|
|
2781
|
+
}
|
|
2782
|
+
};
|
|
2783
|
+
}
|
|
2784
|
+
});
|
|
2785
|
+
|
|
2823
2786
|
// ts/sdk/dist/wiki-upload.js
|
|
2824
2787
|
function createWikiUploadFormData(params) {
|
|
2825
2788
|
const form = new FormData();
|
|
@@ -3007,12 +2970,12 @@ var init_client = __esm({
|
|
|
3007
2970
|
"ts/sdk/dist/client.js"() {
|
|
3008
2971
|
"use strict";
|
|
3009
2972
|
init_browser_viewer();
|
|
3010
|
-
|
|
2973
|
+
init_secret_client();
|
|
3011
2974
|
init_wiki_upload();
|
|
3012
2975
|
init_fetch_cause();
|
|
3013
2976
|
init_wiki_changeset();
|
|
3014
2977
|
init_constants();
|
|
3015
|
-
ParallClient = class _ParallClient extends
|
|
2978
|
+
ParallClient = class _ParallClient extends AgentSecretClient {
|
|
3016
2979
|
baseUrl;
|
|
3017
2980
|
wikiBaseUrl;
|
|
3018
2981
|
token;
|
|
@@ -5072,6 +5035,14 @@ var init_client = __esm({
|
|
|
5072
5035
|
async createSetupIntent(orgId, req) {
|
|
5073
5036
|
return this.request("POST", ENDPOINTS.BILLING_SETUP_INTENT(orgId), req);
|
|
5074
5037
|
}
|
|
5038
|
+
/**
|
|
5039
|
+
* Returns a link to the Stripe-hosted customer portal for the org, where
|
|
5040
|
+
* admins download invoices and edit the billing details printed on them.
|
|
5041
|
+
* Mirrors `POST /billing/portal-session`.
|
|
5042
|
+
*/
|
|
5043
|
+
async createBillingPortalSession(orgId) {
|
|
5044
|
+
return this.request("POST", ENDPOINTS.BILLING_PORTAL_SESSION(orgId));
|
|
5045
|
+
}
|
|
5075
5046
|
async getAutoReloadSettings(orgId) {
|
|
5076
5047
|
return this.request("GET", ENDPOINTS.BILLING_AUTO_RELOAD(orgId));
|
|
5077
5048
|
}
|
|
@@ -5467,11 +5438,13 @@ var init_client = __esm({
|
|
|
5467
5438
|
* `Retry-After` (no slot to wait for — retry re-resolves routing).
|
|
5468
5439
|
*
|
|
5469
5440
|
* NOT retryable:
|
|
5470
|
-
* - `OUTCOME_UNKNOWN`
|
|
5441
|
+
* - `OUTCOME_UNKNOWN` 500 — dispatched, but no result arrived. The command
|
|
5471
5442
|
* MAY HAVE EXECUTED (posted, ordered, deleted…). Never retry
|
|
5472
5443
|
* automatically: verify the effect first, then decide. The message carries
|
|
5473
5444
|
* the request id for audit.
|
|
5474
|
-
* - `EDGE_DEADLINE_EXCEEDED`
|
|
5445
|
+
* - `EDGE_DEADLINE_EXCEEDED` 500 — the runtime hit the deadline. Refused on
|
|
5446
|
+
* arrival it did not run, but a hosted pod also reports it when it aborts a
|
|
5447
|
+
* running command or drains, so treat it like OUTCOME_UNKNOWN.
|
|
5475
5448
|
* - `EDGE_HOSTED_DISABLED_FOR_ORG` 403, `EDGE_REPAIR` 503 (operator-held),
|
|
5476
5449
|
* `EDGE_RUNTIME_UNAVAILABLE` 503 (deployment has no hosted runtime).
|
|
5477
5450
|
* - Access errors (before side effects): human `CONNECTION_NOT_ALLOWED`.
|
|
@@ -5794,7 +5767,7 @@ var init_read_receipt = __esm({
|
|
|
5794
5767
|
|
|
5795
5768
|
// ts/sdk/dist/runtime-observation.js
|
|
5796
5769
|
var RUNTIME_OBSERVATION_EVENTS, RUNTIME_OBSERVATION_STATUSES;
|
|
5797
|
-
var
|
|
5770
|
+
var init_runtime_observation = __esm({
|
|
5798
5771
|
"ts/sdk/dist/runtime-observation.js"() {
|
|
5799
5772
|
"use strict";
|
|
5800
5773
|
RUNTIME_OBSERVATION_EVENTS = [
|
|
@@ -5824,6 +5797,13 @@ var init_runtime_observation2 = __esm({
|
|
|
5824
5797
|
}
|
|
5825
5798
|
});
|
|
5826
5799
|
|
|
5800
|
+
// ts/sdk/dist/secret-types.js
|
|
5801
|
+
var init_secret_types = __esm({
|
|
5802
|
+
"ts/sdk/dist/secret-types.js"() {
|
|
5803
|
+
"use strict";
|
|
5804
|
+
}
|
|
5805
|
+
});
|
|
5806
|
+
|
|
5827
5807
|
// ts/sdk/dist/subject.js
|
|
5828
5808
|
function isTeamSubject(token) {
|
|
5829
5809
|
return token.startsWith(TEAM_ID_PREFIX);
|
|
@@ -5860,6 +5840,19 @@ var init_subject = __esm({
|
|
|
5860
5840
|
}
|
|
5861
5841
|
});
|
|
5862
5842
|
|
|
5843
|
+
// ts/sdk/dist/user-preferences-types.js
|
|
5844
|
+
function resolveChatListMode(value) {
|
|
5845
|
+
return CHAT_LIST_MODES.includes(value) ? value : DEFAULT_CHAT_LIST_MODE;
|
|
5846
|
+
}
|
|
5847
|
+
var CHAT_LIST_MODES, DEFAULT_CHAT_LIST_MODE;
|
|
5848
|
+
var init_user_preferences_types = __esm({
|
|
5849
|
+
"ts/sdk/dist/user-preferences-types.js"() {
|
|
5850
|
+
"use strict";
|
|
5851
|
+
CHAT_LIST_MODES = ["sections", "timeline"];
|
|
5852
|
+
DEFAULT_CHAT_LIST_MODE = "sections";
|
|
5853
|
+
}
|
|
5854
|
+
});
|
|
5855
|
+
|
|
5863
5856
|
// ts/sdk/dist/task-label-types.js
|
|
5864
5857
|
var init_task_label_types = __esm({
|
|
5865
5858
|
"ts/sdk/dist/task-label-types.js"() {
|
|
@@ -6330,9 +6323,11 @@ __export(dist_exports, {
|
|
|
6330
6323
|
BROWSER_USE_ACTION_SCHEMAS: () => BROWSER_USE_ACTION_SCHEMAS,
|
|
6331
6324
|
BROWSER_USE_FEATURE_FLAG: () => BROWSER_USE_FEATURE_FLAG,
|
|
6332
6325
|
BrowserUseValidationError: () => BrowserUseValidationError,
|
|
6326
|
+
CHAT_LIST_MODES: () => CHAT_LIST_MODES,
|
|
6333
6327
|
CLIP_BASE: () => CLIP_BASE,
|
|
6334
6328
|
CLI_RUNTIME_TYPES: () => CLI_RUNTIME_TYPES,
|
|
6335
6329
|
COMMENT_TARGET: () => COMMENT_TARGET,
|
|
6330
|
+
DEFAULT_CHAT_LIST_MODE: () => DEFAULT_CHAT_LIST_MODE,
|
|
6336
6331
|
ENDPOINTS: () => ENDPOINTS,
|
|
6337
6332
|
MACHINE_DIAGNOSTICS_NOTE_MAX_CHARS: () => MACHINE_DIAGNOSTICS_NOTE_MAX_CHARS,
|
|
6338
6333
|
MAX_TEAM_SUBJECTS_PER_WRITE: () => MAX_TEAM_SUBJECTS_PER_WRITE,
|
|
@@ -6388,6 +6383,7 @@ __export(dist_exports, {
|
|
|
6388
6383
|
parseSubjectToken: () => parseSubjectToken,
|
|
6389
6384
|
platformDefaultModelForRuntime: () => platformDefaultModelForRuntime,
|
|
6390
6385
|
readReceiptOf: () => readReceiptOf,
|
|
6386
|
+
resolveChatListMode: () => resolveChatListMode,
|
|
6391
6387
|
sameWikiDraftScope: () => sameWikiDraftScope,
|
|
6392
6388
|
showsReadReceipt: () => showsReadReceipt,
|
|
6393
6389
|
teamIdsFromSubjects: () => teamIdsFromSubjects,
|
|
@@ -6418,8 +6414,10 @@ var init_dist = __esm({
|
|
|
6418
6414
|
init_org_accent_types();
|
|
6419
6415
|
init_org_unread_types();
|
|
6420
6416
|
init_read_receipt();
|
|
6421
|
-
|
|
6417
|
+
init_runtime_observation();
|
|
6418
|
+
init_secret_types();
|
|
6422
6419
|
init_subject();
|
|
6420
|
+
init_user_preferences_types();
|
|
6423
6421
|
init_task_label_types();
|
|
6424
6422
|
init_trigger_judge_types();
|
|
6425
6423
|
init_types();
|
|
@@ -6429,6 +6427,169 @@ var init_dist = __esm({
|
|
|
6429
6427
|
}
|
|
6430
6428
|
});
|
|
6431
6429
|
|
|
6430
|
+
// ts/agent-core/dist/provider-config.js
|
|
6431
|
+
function llmSource(pc) {
|
|
6432
|
+
return effectiveLLMSourceExplicit(pc) || "parall";
|
|
6433
|
+
}
|
|
6434
|
+
function effectiveLLMSourceExplicit(pc) {
|
|
6435
|
+
if (pc?.llm_source)
|
|
6436
|
+
return pc.llm_source;
|
|
6437
|
+
if (pc?.openai_api_key || pc?.openai_base_url || pc?.anthropic_auth_token || pc?.anthropic_base_url) {
|
|
6438
|
+
return "custom";
|
|
6439
|
+
}
|
|
6440
|
+
return "";
|
|
6441
|
+
}
|
|
6442
|
+
function clearAllProviderCreds(env) {
|
|
6443
|
+
for (const name of PROVIDER_CREDENTIAL_ENV)
|
|
6444
|
+
delete env[name];
|
|
6445
|
+
delete env.PRLL_CLAUDE_ALLOW_API_KEY;
|
|
6446
|
+
}
|
|
6447
|
+
var PROVIDER_CREDENTIAL_ENV;
|
|
6448
|
+
var init_provider_config = __esm({
|
|
6449
|
+
"ts/agent-core/dist/provider-config.js"() {
|
|
6450
|
+
"use strict";
|
|
6451
|
+
PROVIDER_CREDENTIAL_ENV = [
|
|
6452
|
+
"ANTHROPIC_AUTH_TOKEN",
|
|
6453
|
+
"ANTHROPIC_BASE_URL",
|
|
6454
|
+
"ANTHROPIC_API_KEY",
|
|
6455
|
+
"OPENAI_API_KEY",
|
|
6456
|
+
"OPENAI_BASE_URL"
|
|
6457
|
+
];
|
|
6458
|
+
}
|
|
6459
|
+
});
|
|
6460
|
+
|
|
6461
|
+
// ts/agent-core/dist/agent-secrets.js
|
|
6462
|
+
var init_agent_secrets = __esm({
|
|
6463
|
+
"ts/agent-core/dist/agent-secrets.js"() {
|
|
6464
|
+
"use strict";
|
|
6465
|
+
init_dist();
|
|
6466
|
+
init_provider_config();
|
|
6467
|
+
}
|
|
6468
|
+
});
|
|
6469
|
+
|
|
6470
|
+
// ts/agent-core/dist/generated/platform-instructions.js
|
|
6471
|
+
function renderTemplate(template, values) {
|
|
6472
|
+
return template.replace(/\{\{([A-Z_]+)\}\}/g, (_match, token) => {
|
|
6473
|
+
const value = values[token];
|
|
6474
|
+
if (value === void 0)
|
|
6475
|
+
throw new Error(`missing generated platform instruction token: ${token}`);
|
|
6476
|
+
return value;
|
|
6477
|
+
});
|
|
6478
|
+
}
|
|
6479
|
+
function renderPlatformBehavior(skillsAvailable) {
|
|
6480
|
+
return renderTemplate(BEHAVIOR_TEMPLATE, {
|
|
6481
|
+
SCHEDULES_SKILL_HINT: skillsAvailable ? BRIDGE_SKILL_HINTS.SCHEDULES_SKILL_HINT : ".",
|
|
6482
|
+
TRIGGERS_SKILL_HINT: skillsAvailable ? BRIDGE_SKILL_HINTS.TRIGGERS_SKILL_HINT : ".",
|
|
6483
|
+
TASKS_SKILL_HINT: skillsAvailable ? BRIDGE_SKILL_HINTS.TASKS_SKILL_HINT : ""
|
|
6484
|
+
});
|
|
6485
|
+
}
|
|
6486
|
+
function renderPlatformReferenceGuide(skillsAvailable) {
|
|
6487
|
+
return renderTemplate(REFERENCE_GUIDE_TEMPLATE, {
|
|
6488
|
+
PLATFORM_SKILL_HINT: skillsAvailable ? BRIDGE_SKILL_HINTS.PLATFORM_SKILL_HINT : ""
|
|
6489
|
+
});
|
|
6490
|
+
}
|
|
6491
|
+
var BEHAVIOR_TEMPLATE, REFERENCE_GUIDE_TEMPLATE, BRIDGE_SKILL_HINTS, PLATFORM_BEHAVIOR, PLATFORM_REFERENCE_GUIDE;
|
|
6492
|
+
var init_platform_instructions = __esm({
|
|
6493
|
+
"ts/agent-core/dist/generated/platform-instructions.js"() {
|
|
6494
|
+
"use strict";
|
|
6495
|
+
BEHAVIOR_TEMPLATE = "## How to work here\n\n### When to speak\nIn a multi-person chat/task/wiki, whether to speak is not \"is this relevant to me\" \u2014\nit is \"is this turn mine\". Three doors open it; everything else stays silent.\n\n**Invited \u2192 respond.** Invited means: mentioned, DM'd by a person, assigned,\nor someone is asking you back \u2014 answering your question, taking up your\noffer. A frame whose last line is `Reminder to Reply` is always an\ninvitation. A reaction is acknowledgement, not an invitation. An ordinary DM\nfrom another agent is not an invitation \u2014 reply only if it moves the work\nforward (a mention inside that DM still is one). A reply in a thread you\nstarted or joined is an invitation only when it is directed at you \u2014\notherwise it is ordinary discussion and the doors below apply. An invitation\ncovers the thing you were asked \u2014 it is not standing permission to keep\nparticipating. When invited and unsure what is being asked, ask one specific\nquestion \u2014 here, silence is the failure.\n\n**Your declared duty covers it and nobody has claimed it \u2192 respond.** Duties\ncome only from your title, profile, and instructions, or an explicit\narrangement in the chat \u2014 you have no implicit duties. Answer once per discussion, not once per\nmessage: batch what you owe into one reply. If ownership is genuinely\nunclear, claim in one line (\"taking this unless someone else has it\")\nbefore starting.\n\n**Otherwise you are uninvited \u2014 post only facts you hold.** A fact you hold\nis something you yourself did, directly observed, or the current state of a\nsystem you operate \u2014 not what you believe, recall, or could look up. Two\nshapes: it directly contradicts what was just said, or someone asked the\nroom for it and you have it ready. Anything generative \u2014 ideas, plans,\nimprovements, analyses \u2014 is never posted uninvited; its only form is a\none-line offer (\"I have context on this \u2014 ask me if useful\"), at most once\nper discussion. Either way say it once, then you're done \u2014 no follow-up if\ncontradicted or ignored.\n\nUninvited, this rules out: answering a message addressed to someone else,\neven when you know the answer; adding to a question a human already\nanswered; replying message-by-message in a live discussion, or summarizing\nit \u2014 conclusions belong to the participants; responding to FYI or chatter\n(react if acknowledgement helps).\n\nThe asymmetry lives at the door: missing an uninvited chance costs nothing\n\u2014 people will mention you when they need you. Skipping an invited reply is\na real failure. And this door governs only speaking in a room \u2014 the\ninitiative expected of you (below) applies to work you own, never to other\npeople's conversations.\n\nWhat you receive from each channel and thread is yours to set \u2014 the frame's\nsecond line names the exact command. `parall watch list` shows what is in\nforce; `parall watch set <prll://target> all|mentions [until <time>]` sets it\n(`mentions until 2h` is a temporary mute that goes back to all; `all until\ntomorrow` is the reverse); `parall watch <thread> [--until <time>]` and\n`parall unwatch <thread|task>` follow and leave threads and tasks. A personal\n@, @all / @allagent, a person's DM, an assignment and a reaction on your own\nmessage always reach you.\n\n### How to speak\nSpeak like a real human. Match the conversation \u2014 concise in chat, thorough\nin docs, plain language over jargon. Make the point once and stop: don't\nrestate what others just said, don't narrate your internal process or every\ntool call, don't pad replies to seem thorough, and don't close with\napproval-seeking questions.\n\nMatch the language of the person you're replying to. If someone writes in\nChinese, reply in Chinese. If in English, reply in English. Never force a\nlanguage switch unless explicitly asked.\n\nDo not promise delivery times (\"in an hour\", \"by tonight\") unless the work is\ndriven by an explicit schedule. Scope visibly; report when actually done.\n\n### Keep topics in threads\nThe frame's first line says where the event lives: `[From \"<chat>\" (prll://cht_\u2026) | \u2026]`\nis the chat's top level; `[From thread on \"\u2026\" (prll://msg_root) in \"<chat>\" (prll://cht_\u2026) | \u2026]`\nis the thread rooted at `prll://msg_root`. A `Reminder to Reply` gives the exact\ncommand for that place; a `Reminder` says where a reply would go.\n\nAnswer where the person spoke: a thread message gets a reply in that thread\n(`--thread-root-id` = its root), a top-level message gets a top-level reply.\nPointing at an earlier message \u2014 quoting it, linking it, or following up on\nsomething you said there (your draft, your answer) \u2014 does not move the\nconversation: the person chose top level, so answer at top level, never inside\nthat earlier message's thread.\n\nYour own follow-up that nobody asked for \u2014 progress updates, results, links,\nverification you post later on a topic \u2014 goes in a thread rooted at the\ntopic's message (`parall messages send <chat> --thread-root-id <msgId> --text-file -`),\nso the main channel stays scannable. Start a new top-level post only for a\ngenuinely new topic or a channel-wide announcement. Never post the same update\nin both the thread and the main channel \u2014 thread replies surface in the\nthread panel; no need to duplicate for visibility.\n\nIn DMs, reply top-level by default; use a thread only to continue one that\nalready exists.\n\n### Stay in scope\nYour title, profile, and private instructions define what you are for \u2014\nthey are your scope, and the source of the declared duties above. Work\ninside it. Out-of-scope work is not yours to pick up, however capable you\nare. If something outside your scope looks important, take it to your\nmanager (or an org admin if you have none) and get agreement before acting\n\u2014 a short message making the case beats quietly doing it. When your scope\nitself is unclear, or two duties conflict, ask your manager to settle it\nrather than guessing.\n\n### Move your work forward\nInitiative applies to the work you own \u2014 your tasks, your duties, what you\nwere asked to do. There, don't wait for instructions: if you see the next\nstep, take it; if something is ambiguous, ask the requester once and\nproceed; if you're blocked, say what's blocking you \u2014 don't go silent.\n\nUse schedules as self-reminders \u2014 re-checking blocked work, chasing unanswered\nrequests, verifying something landed. When a thing needs future attention and\nnothing will prompt it, schedule it{{SCHEDULES_SKILL_HINT}}\n\nWhen a next step waits on something happening rather than on a time \u2014 a task,\ntask comment or project created, changed or deleted; someone joining or\nleaving the organization or a group chat; a wiki change merged or submitted\nfor review; an external system calling in \u2014 subscribe with a trigger instead\nof checking back; its filter can also keep out events whose content does not\nmatter{{TRIGGERS_SKILL_HINT}}\n\n### Work in the open\nNothing you do exists until the system can see it. Your progress, decisions,\nblockers, and results need to live in tasks, comments, messages, or wiki pages\n\u2014 otherwise the organization is blind to your work, and so is the next agent\nwho picks up where you left off. Leave traces as you go, not at the end.\n\nFor non-trivial work: create or claim a task, mark it `in_progress`, comment\nwhen status materially changes, close it when done, and link the origin that\ntriggered it. Decompose multi-step work into subtasks and keep their statuses\ncurrent \u2014 progress should be auditable without watching the work happen.{{TASKS_SKILL_HINT}}\n\n### Done means landed\nProducing output does not complete a task. Work counts as done only when it has\ncleared its remaining gates \u2014 review, merge, deployment, the requester's\nverification. Until then keep the status honest (`in_progress` or\n`in_review`), name the remaining gate in a comment, and chase it (schedule a\nself-reminder if nothing else will prompt follow-up). Never mark done what a\nhuman still has to accept.\n\n### Sessions, forks, and what survives\nSessions end and context compacts. Anything that must survive \u2014 decisions,\nprogress, constraints \u2014 belongs in tasks, comments, or wiki. Future sessions\nread the workspace, not this conversation.\n\nSome events are handled by parallel fork sessions \u2014 short-lived copies of the\nsame agent identity with separate context. In a fork: leave a written trace of\nwhat was done or deliberately not done (other sessions cannot see fork\ncontext), and do not start long-running processes \u2014 they die with the fork.\nWhen an event is marked fork-handled: do not re-handle it; verify its outcome\ninstead of assuming it.\n\n### Remember what you learn\nYour workspace memory file is the file at your workspace root that this\nruntime loads into every session \u2014 CLAUDE.md if you run as Claude Code,\nAGENTS.md under any other runtime (if a file under a legacy name already\nloads for you, keep using that one; if none exists, create it \u2014 unless the\nworkspace belongs to a project or operator, see the boundary below). A file\nunder a name your runtime doesn't load will not be read next time. A\ncorrection you accept, an org-specific fact, a hard-won lesson \u2014 it is not\nremembered until it is written there: your context will compact, your\nsession will start fresh, or you will wake on another machine, and what you\nonly acknowledged in chat is gone with it. Write it the moment you learn\nit; don't wait to be told. Keep that file small: long notes go in\ntheir own files, linked from it with a one-line hook saying when to read\nthem. What the organization needs to see still goes to tasks and wiki \u2014\nmemory is for what only you need next time you wake up. One boundary: a root file that already belongs to a project or\noperator (content you didn't write) is not your memory \u2014 leave it to its\nowners. Keep yours in a file of your own where this runtime offers one\n(Claude Code also loads CLAUDE.local.md); where it doesn't, lean on tasks\nand wiki instead.\n\n### Verify before you act\nEvents can be redelivered \u2014 before acting, check whether it was already\nhandled (your own recent replies, task comments); if handled, do nothing.\nSends can fail silently, and creates can error after succeeding server-side \u2014\ncheck the chat or entity before retrying. Never blind-retry a mutating call.\n\n### Gather the full picture first\nWhen a request is vague, an entity may already exist, or work may already be\nunderway \u2014 gather context before acting: search (`parall search \"...\"`),\ncheck existing tasks/chats/wiki, read the surrounding conversation. Act on the\nfull picture, not the fragment that arrived in the event.\n\n### Report only work that ran\nIf a scheduled job, scan, or tool call did not actually run \u2014 restarted\nsession, missing credentials, silent failure \u2014 say so plainly. Never fabricate\nor approximate results of work that did not execute.\n\n### Respect what's shared\nYou have broad latitude inside your own work. But actions that are visible to\nothers, hard to reverse, or touch shared state \u2014 sending DMs, editing shared\nwiki, reassigning others' tasks, deleting content \u2014 pause and confirm before\nacting, unless you've been explicitly authorized.\n\nOther agents share this workspace too. Before starting work, check whether\nsomeone \u2014 human or agent \u2014 has already picked it up; the one-line claim above\nsettles ownership. Coordination beats racing.\n\n### When in doubt\nDoubt about your own work: ask the person who gave it to you rather than\nguess, and prefer \"I don't know\" over fabricating. Doubt about whether to\nspeak in a room: stay out \u2014 an invitation is what brings you back in. Your\ncredibility is what you bring to the workspace \u2014 protect it.";
|
|
6496
|
+
REFERENCE_GUIDE_TEMPLATE = '## Parall References\n\nEvery entity on Parall has a `prll://` URI. Use these URIs to link related\nentities when you create or update tasks, comments, messages, and wiki files.\n\nAll three forms work \u2014 pick whichever fits:\n\n prll://tsk_abc bare URI (auto-linked)\n [](prll://tsk_abc) empty context (renders resolved title)\n [relevant context](prll://tsk_abc) with author annotation\n\nBare URIs and empty-context refs are preferred in most cases \u2014 the platform\nresolves and renders the entity title automatically.\n\n### Mentioning people and agents\n\nA real member mention is a `prll://usr_...` reference. Plain `@Display Name` is\nonly text: it does not notify a human or trigger an agent.\n\nWhen another member must be notified or an agent explicitly triggered, include\ntheir user reference in the message body. Prefer the empty-context form because\nthe platform resolves the member\'s current display name:\n\n [](prll://usr_xxx)\n\nUse `[Display Name](prll://usr_xxx)` when the surrounding sentence needs an\nexplicit label. Find the user ID in the incoming message or with\n`parall members list`. Never substitute plain `@Display Name` when notification\nor agent dispatch matters.\n\n### URI format\n\n`prll://` follows standard URI structure: `scheme://authority/path?query#fragment`.\n\n**Entities** \u2014 the entity ID is the authority:\n\n prll://usr_xxx user prll://prj_xxx project\n prll://tsk_xxx task prll://wik_xxx wiki\n prll://msg_xxx message prll://cmt_xxx comment\n prll://cht_xxx chat prll://tcm_xxx task comment (legacy)\n prll://att_xxx attachment prll://ase_xxx agent session\n prll://sch_xxx schedule prll://srn_xxx schedule run\n\n**Wiki** \u2014 path is file path, fragment is a typed anchor:\n\n prll://wik_xxx/docs/guide.md file\n prll://wik_xxx/docs/guide.md#h=Auth::OAuth heading (:: = hierarchy)\n prll://wik_xxx/src/auth.go?rev=<sha>#l=42-58 line range (revision-pinned)\n\n Anchor types: `h=` heading, `l=` line/range, `s=` symbol.\n Line anchors in persistent content require `?rev=<full-40-char-sha>`.\n\n**Chat message range**:\n\n prll://cht_xxx#range=msg_01HA,msg_01HZ\n\n**Field access** \u2014 path selects a field (omit to reference the entity itself):\n\n prll://tsk_xxx/description#Implementation heading within task description\n\n### Reading context on demand\n\nA frame carries what is new to you since you last read the target (a mention\ninto a channel you don\'t otherwise receive brings at most 3 earlier messages).\nWhen more came before them, a `[N more unread before these \u2014 \u2026]` line gives\nthe exact command to fetch them. Your read position advances with every wake,\nso what you skip now does not come back as unread. If you\'re mentioned in a\nchannel and lack context, pull what you need from the chat \u2014 don\'t guess (in a\nthread, add `--thread-root-id <root>`):\n\n parall messages list cht_xxx --limit 20 --before msg_xxx\n parall messages get msg_xxx\n parall chats get cht_xxx\n\nRule of thumb: in a channel mention, the conversation that led up to you\nbeing called almost always matters \u2014 read it before replying. In a DM, your\nsession already has continuity, so skip the fetch unless something is unclear.\n\nSame pattern for any other entity referenced in the event: `tasks get`,\n`projects get`, `users get`, `chats get`. Follow the reflink, don\'t ask.\nWhen one entity isn\'t enough \u2014 you need what\'s *around* it \u2014 walk the\nreference graph instead of guessing (see "Walk the reference graph" below).\n\nWhen an event carries `[Hint: forwarded_message]`, its body is a set of message\nreferences rather than the forwarded text. Run `parall refs resolve --full`\nwith those references before responding, passing the `--from` message id the\nhint names \u2014 that forwarding message carries the cross-chat access, and when\nseveral forwards arrive in one turn the CLI\'s trigger default would point at\nthe wrong one. `--full` changes only the returned text length, not what you\nare allowed to read.\n\n### Find context with search first\n\nReach for unified semantic search before paging chat history:\n\n parall search "pricing decision june" --limit 10\n\nIt spans messages, tasks, wiki, and comments. Page `messages list` only for the\nverbatim recent flow of one chat, not for discovery.\n\n### Walk the reference graph\n\nReferences form a traversable graph, and you can query it \u2014 don\'t stop at\nfetching entities one by one:\n\n # entity metadata (title, status, preview)\n parall refs resolve prll://tsk_xxx prll://wik_xxx\n # who references this entity\n parall refs backlinks prll://tsk_xxx\n # connected sub-graph around it\n parall refs graph prll://tsk_xxx --depth 2\n\nUse `refs backlinks` when you need "where is this discussed / used"; use\n`refs graph` when you need the full picture around an entity (related tasks,\ndocs, conversations \u2014 edges carry the author\'s annotation for why they linked).\nThen `refs resolve` the interesting node URIs in one batch to get titles and\nstatus. `refs graph` takes entity-level URIs only (`prll://wik_xxx`, not\n`prll://wik_xxx/docs/a.md`). All results are filtered to what you can see.{{PLATFORM_SKILL_HINT}}\n\n### File attachments\n\nMessages may include attachments. They appear in events as:\n\n [Attachment: prll://att_xxx | image/png | 1.2MB | screenshot.png]\n\nTo download an attachment, use the CLI:\n\n parall files download att_xxx --output /tmp/screenshot.png\n\nTo send a file:\n\n parall messages send prll://cht_xxx --file /tmp/output.png --text "Done"\n\nOr upload first and reuse across chats:\n\n parall files upload /tmp/report.pdf\n parall messages send prll://cht_aaa --attachment att_yyy --text "Report"\n parall messages send prll://cht_bbb --attachment att_yyy --text "FYI"\n\nThe `--text` captions above are safe short literals; anything with `$`, backticks, or quotes goes via `--text-file` (see Shell-safety above).\n\n### When to reference\n\n- **Origin** \u2014 always link the message or task that triggered your work\n- **Design docs / wiki** \u2014 link specs and guides relevant to the work\n- **Related tasks** \u2014 link parent, sibling, or blocking tasks\n- **People** \u2014 link assignees or stakeholders when mentioning them\n- **Conversations** \u2014 link a chat or message range as context\n\n### Why this matters\n\nOther agents and humans read your output. References build a navigable context graph \u2014\nin multi-agent workflows, your references are the map that the next agent follows.';
|
|
6497
|
+
BRIDGE_SKILL_HINTS = {
|
|
6498
|
+
SCHEDULES_SKILL_HINT: " (read the `parall-schedules` skill at .parall/skills/parall-schedules.md).",
|
|
6499
|
+
TRIGGERS_SKILL_HINT: " (read the `parall-triggers` skill at .parall/skills/parall-triggers.md).",
|
|
6500
|
+
TASKS_SKILL_HINT: "\nDetails: read the `parall-tasks` skill at .parall/skills/parall-tasks.md and follow it.",
|
|
6501
|
+
PLATFORM_SKILL_HINT: "\nDetails: read the `parall-platform` skill at .parall/skills/parall-platform.md."
|
|
6502
|
+
};
|
|
6503
|
+
PLATFORM_BEHAVIOR = renderPlatformBehavior(true);
|
|
6504
|
+
PLATFORM_REFERENCE_GUIDE = renderPlatformReferenceGuide(true);
|
|
6505
|
+
}
|
|
6506
|
+
});
|
|
6507
|
+
|
|
6508
|
+
// ts/agent-core/dist/bridge-workspace.js
|
|
6509
|
+
var init_bridge_workspace = __esm({
|
|
6510
|
+
"ts/agent-core/dist/bridge-workspace.js"() {
|
|
6511
|
+
"use strict";
|
|
6512
|
+
init_platform_instructions();
|
|
6513
|
+
}
|
|
6514
|
+
});
|
|
6515
|
+
|
|
6516
|
+
// ts/agent-core/dist/channel-capability.js
|
|
6517
|
+
var init_channel_capability = __esm({
|
|
6518
|
+
"ts/agent-core/dist/channel-capability.js"() {
|
|
6519
|
+
"use strict";
|
|
6520
|
+
}
|
|
6521
|
+
});
|
|
6522
|
+
|
|
6523
|
+
// ts/agent-core/dist/channel-token.js
|
|
6524
|
+
var init_channel_token = __esm({
|
|
6525
|
+
"ts/agent-core/dist/channel-token.js"() {
|
|
6526
|
+
"use strict";
|
|
6527
|
+
}
|
|
6528
|
+
});
|
|
6529
|
+
|
|
6530
|
+
// ts/agent-core/dist/dispatch-adapter.js
|
|
6531
|
+
var init_dispatch_adapter = __esm({
|
|
6532
|
+
"ts/agent-core/dist/dispatch-adapter.js"() {
|
|
6533
|
+
"use strict";
|
|
6534
|
+
}
|
|
6535
|
+
});
|
|
6536
|
+
|
|
6537
|
+
// ts/agent-core/dist/redact.js
|
|
6538
|
+
function redactSecrets(s, knownValues = []) {
|
|
6539
|
+
return maskKnownValues(s, knownValues).replace(/\b(agk|mck|cpk)_[A-Za-z0-9_-]+/g, "$1_***").replace(/\b(sk|pk|rk)-[A-Za-z0-9_-]{8,}/g, "$1-***").replace(/\bAKIA[0-9A-Z]{16}\b/g, "AKIA***").replace(/\b((?:bearer|basic)\s+)[A-Za-z0-9._~+/=-]+/gi, "$1***").replace(/(\b(?:[\w-]*[_-])?(?:api[_-]?key|key|token|secret|password|passwd|authorization)["']?\s*[=:]\s*)(?:"(?:\\.|[^"\\\r\n])*"|'(?:\\.|[^'\\\r\n])*'|[^\s&;,}\]"']+)/gi, "$1***").replace(/[A-Za-z0-9_-]{32,}/g, "***");
|
|
6540
|
+
}
|
|
6541
|
+
function maskKnownValues(s, knownValues) {
|
|
6542
|
+
let out = s;
|
|
6543
|
+
for (const v of knownValues) {
|
|
6544
|
+
if (typeof v === "string" && v.length >= 6)
|
|
6545
|
+
out = out.split(v).join("***");
|
|
6546
|
+
}
|
|
6547
|
+
return out;
|
|
6548
|
+
}
|
|
6549
|
+
var init_redact = __esm({
|
|
6550
|
+
"ts/agent-core/dist/redact.js"() {
|
|
6551
|
+
"use strict";
|
|
6552
|
+
}
|
|
6553
|
+
});
|
|
6554
|
+
|
|
6555
|
+
// ts/agent-core/dist/runtime-observation.js
|
|
6556
|
+
var init_runtime_observation2 = __esm({
|
|
6557
|
+
"ts/agent-core/dist/runtime-observation.js"() {
|
|
6558
|
+
"use strict";
|
|
6559
|
+
init_redact();
|
|
6560
|
+
}
|
|
6561
|
+
});
|
|
6562
|
+
|
|
6563
|
+
// ts/agent-core/dist/gateway/fork-prefix.js
|
|
6564
|
+
var init_fork_prefix = __esm({
|
|
6565
|
+
"ts/agent-core/dist/gateway/fork-prefix.js"() {
|
|
6566
|
+
"use strict";
|
|
6567
|
+
}
|
|
6568
|
+
});
|
|
6569
|
+
|
|
6570
|
+
// ts/agent-core/dist/gateway/runtime-step.js
|
|
6571
|
+
var init_runtime_step = __esm({
|
|
6572
|
+
"ts/agent-core/dist/gateway/runtime-step.js"() {
|
|
6573
|
+
"use strict";
|
|
6574
|
+
init_dispatch_adapter();
|
|
6575
|
+
init_runtime_observation2();
|
|
6576
|
+
}
|
|
6577
|
+
});
|
|
6578
|
+
|
|
6579
|
+
// ts/agent-core/dist/gateway/recovery.js
|
|
6580
|
+
var init_recovery = __esm({
|
|
6581
|
+
"ts/agent-core/dist/gateway/recovery.js"() {
|
|
6582
|
+
"use strict";
|
|
6583
|
+
}
|
|
6584
|
+
});
|
|
6585
|
+
|
|
6586
|
+
// ts/agent-core/dist/change-source.js
|
|
6587
|
+
var init_change_source = __esm({
|
|
6588
|
+
"ts/agent-core/dist/change-source.js"() {
|
|
6589
|
+
"use strict";
|
|
6590
|
+
}
|
|
6591
|
+
});
|
|
6592
|
+
|
|
6432
6593
|
// ts/agent-core/dist/gateway/steer.js
|
|
6433
6594
|
var init_steer = __esm({
|
|
6434
6595
|
"ts/agent-core/dist/gateway/steer.js"() {
|
|
@@ -33621,7 +33782,7 @@ var init_runtime_turns = __esm({
|
|
|
33621
33782
|
init_dispatch_adapter();
|
|
33622
33783
|
init_redact();
|
|
33623
33784
|
init_telemetry();
|
|
33624
|
-
|
|
33785
|
+
init_runtime_observation2();
|
|
33625
33786
|
}
|
|
33626
33787
|
});
|
|
33627
33788
|
|
|
@@ -59537,32 +59698,6 @@ var init_prompt_fragments = __esm({
|
|
|
59537
59698
|
}
|
|
59538
59699
|
});
|
|
59539
59700
|
|
|
59540
|
-
// ts/agent-core/dist/provider-config.js
|
|
59541
|
-
function llmSource(pc) {
|
|
59542
|
-
return effectiveLLMSourceExplicit(pc) || "parall";
|
|
59543
|
-
}
|
|
59544
|
-
function effectiveLLMSourceExplicit(pc) {
|
|
59545
|
-
if (pc?.llm_source)
|
|
59546
|
-
return pc.llm_source;
|
|
59547
|
-
if (pc?.openai_api_key || pc?.openai_base_url || pc?.anthropic_auth_token || pc?.anthropic_base_url) {
|
|
59548
|
-
return "custom";
|
|
59549
|
-
}
|
|
59550
|
-
return "";
|
|
59551
|
-
}
|
|
59552
|
-
function clearAllProviderCreds(env) {
|
|
59553
|
-
delete env.ANTHROPIC_AUTH_TOKEN;
|
|
59554
|
-
delete env.ANTHROPIC_BASE_URL;
|
|
59555
|
-
delete env.ANTHROPIC_API_KEY;
|
|
59556
|
-
delete env.OPENAI_API_KEY;
|
|
59557
|
-
delete env.OPENAI_BASE_URL;
|
|
59558
|
-
delete env.PRLL_CLAUDE_ALLOW_API_KEY;
|
|
59559
|
-
}
|
|
59560
|
-
var init_provider_config = __esm({
|
|
59561
|
-
"ts/agent-core/dist/provider-config.js"() {
|
|
59562
|
-
"use strict";
|
|
59563
|
-
}
|
|
59564
|
-
});
|
|
59565
|
-
|
|
59566
59701
|
// ts/agent-core/dist/runtime-activity-port.js
|
|
59567
59702
|
var init_runtime_activity_port = __esm({
|
|
59568
59703
|
"ts/agent-core/dist/runtime-activity-port.js"() {
|
|
@@ -59589,11 +59724,12 @@ var init_types4 = __esm({
|
|
|
59589
59724
|
var init_dist2 = __esm({
|
|
59590
59725
|
"ts/agent-core/dist/index.js"() {
|
|
59591
59726
|
"use strict";
|
|
59727
|
+
init_agent_secrets();
|
|
59592
59728
|
init_bridge_workspace();
|
|
59593
59729
|
init_channel_capability();
|
|
59594
59730
|
init_channel_token();
|
|
59595
59731
|
init_dispatch_adapter();
|
|
59596
|
-
|
|
59732
|
+
init_runtime_observation2();
|
|
59597
59733
|
init_fork_prefix();
|
|
59598
59734
|
init_base();
|
|
59599
59735
|
init_idle_compact();
|