@botiverse/raft-daemon 0.72.0 → 0.72.3
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.
|
@@ -484,7 +484,7 @@ var RUNTIME_PROVIDER_DISPLAY_NAMES = {
|
|
|
484
484
|
"openrouter": "OpenRouter",
|
|
485
485
|
"xai": "xAI",
|
|
486
486
|
"xiaomi": "Xiaomi MiMo",
|
|
487
|
-
"zai": "ZAI",
|
|
487
|
+
"zai": "ZAI Coding Plan (Global)",
|
|
488
488
|
"zai-coding-cn": "ZAI Coding Plan (China)"
|
|
489
489
|
};
|
|
490
490
|
|
|
@@ -1989,13 +1989,23 @@ var integrationUpdateAppRegistrationOperationSchema = integrationAppDraftFieldsS
|
|
|
1989
1989
|
unsafeDemoUrlOverride: z.boolean().optional(),
|
|
1990
1990
|
draftHint: draftHintSchema
|
|
1991
1991
|
});
|
|
1992
|
+
var migrationExportOperationSchema = z.object({
|
|
1993
|
+
type: z.literal("migration:export"),
|
|
1994
|
+
targetComputer: idOrHandleSchema,
|
|
1995
|
+
mode: z.enum(["cooperative", "forensic"]).default("cooperative"),
|
|
1996
|
+
prepDeadlineMs: z.number().int().positive().optional(),
|
|
1997
|
+
transferDeadlineMs: z.number().int().positive().optional(),
|
|
1998
|
+
arrivalDeadlineMs: z.number().int().positive().optional(),
|
|
1999
|
+
draftHint: draftHintSchema
|
|
2000
|
+
});
|
|
1992
2001
|
var actionCardActionSchema = z.discriminatedUnion("type", [
|
|
1993
2002
|
channelCreateOperationSchema,
|
|
1994
2003
|
agentCreateOperationSchema,
|
|
1995
2004
|
channelAddMemberOperationSchema,
|
|
1996
2005
|
integrationApproveAgentLoginOperationSchema,
|
|
1997
2006
|
integrationRegisterAppOperationSchema,
|
|
1998
|
-
integrationUpdateAppRegistrationOperationSchema
|
|
2007
|
+
integrationUpdateAppRegistrationOperationSchema,
|
|
2008
|
+
migrationExportOperationSchema
|
|
1999
2009
|
]);
|
|
2000
2010
|
|
|
2001
2011
|
// ../shared/src/agentApiContract.ts
|
|
@@ -13986,6 +13996,8 @@ For new channels, new agents, and adding members to an existing channel, post an
|
|
|
13986
13996
|
- \`{type: "channel:add_member", channel: "#existing-channel", humans?: ["@alice"], agents?: ["@scout"], draftHint?}\` \u2014 at least one of humans / agents must be non-empty
|
|
13987
13997
|
- The owner clicks the button on the card; the matching dialog opens **prefilled with your values** (editable, deselectable for add_member). They review, adjust, and submit; the action is committed under their identity.
|
|
13988
13998
|
- Runtime / model / reasoning effort are NOT yours to prefill on \`agent:create\`. If the human request explicitly binds the agent to a computer, use a structured \`requiredComputer\` (or \`suggestedComputer\` for a soft preference) instead of burying the constraint in \`draftHint\`; otherwise stay on semantic intent (name + description).
|
|
13999
|
+
- The \`name\` on \`agent:create\` must be a single token: starts with a letter, then only letters/digits/hyphen/underscore, 1-32 chars \u2014 **no spaces**, and not a reserved name (all, human, humans, agent, agents, here, idle, busy, system). "Support Bot" is invalid; prefill \`support-bot\` or \`SupportBot\`. A malformed name is rejected at submit, so put a valid handle in the card rather than a display phrase.
|
|
14000
|
+
- Seed the people who will actually work in a new channel directly into \`initialAgents\` / \`initialHumans\` on \`channel:create\` \u2014 don't create it bare and then post a separate \`channel:add_member\` card for members you already know. Being a server admin (as you are) does NOT auto-join you or anyone else to a channel: channel membership is what gates message delivery, so an agent must be listed in \`initialAgents\` (or added later) to actually operate there. Reserve \`channel:add_member\` for people you discover are needed *after* the channel exists.
|
|
13989
14001
|
- For \`channel:add_member\`, only suggest people who are actually likely candidates (already in the server, relevant to the channel's topic). The owner will deselect anyone they don't want \u2014 make their default-yes list useful, not exhaustive.
|
|
13990
14002
|
- Do not just describe or list copyable specs once action cards are available \u2014 the human input cost should land at "click the card, review, submit", not "copy this name into the dialog yourself".
|
|
13991
14003
|
- Do not imply the resource has been created or members added until the card flips to "Done".
|
|
@@ -13993,7 +14005,7 @@ For new channels, new agents, and adding members to an existing channel, post an
|
|
|
13993
14005
|
Other plan elements still apply:
|
|
13994
14006
|
- suggested channel or workstream pairing
|
|
13995
14007
|
- first task to send after the card is committed
|
|
13996
|
-
- who
|
|
14008
|
+
- who works in the channel \u2014 seed them into \`initialAgents\` / \`initialHumans\` at create when you already know them; a follow-up \`channel:add_member\` card is only for people you discover are needed later
|
|
13997
14009
|
|
|
13998
14010
|
Do not use a rigid keyword routing table. Use examples as inspiration, then adapt to the user's context.
|
|
13999
14011
|
If details are missing but not blocking, state reasonable defaults inside the action card payload (the owner can edit) and invite correction in chat.
|
|
@@ -14346,15 +14358,27 @@ Offer a guided walk: one card-as-conversation per turn, always with an exit back
|
|
|
14346
14358
|
|
|
14347
14359
|
## Setup-Scan Toolbox
|
|
14348
14360
|
|
|
14349
|
-
Only use this after explicit consent.
|
|
14361
|
+
Only use this after explicit consent. The goal: understand what agent tooling the owner already has on this computer \u2014 across Claude Code AND Codex (and any other runtime) \u2014 so your team proposal fits their real setup, not a guess.
|
|
14362
|
+
|
|
14363
|
+
Instruction/config files are safe to read directly \u2014 they hold guidance, not secrets. The ONE exception is MCP config: it can inline API keys in an \`env\` block, so read only the server NAMES (never \`cat\` the whole file).
|
|
14364
|
+
|
|
14365
|
+
Discover first, then read only what exists \u2014 don't assume a path is there:
|
|
14366
|
+
- Runtimes present: \`claude --version\`, \`codex --version\` (and any other runtime binary the owner mentions).
|
|
14367
|
+
- Config dirs: \`ls -a ~/.claude/ ~/.codex/ 2>/dev/null\` \u2014 then read what's actually there.
|
|
14368
|
+
|
|
14369
|
+
Read directly (guidance, no secrets) \u2014 this is where routines, loops, and conventions live:
|
|
14370
|
+
- Agent instructions: \`~/.claude/CLAUDE.md\`, \`~/.codex/AGENTS.md\`, plus any project-level \`CLAUDE.md\` / \`AGENTS.md\` / \`agent.md\` in the owner's working dirs.
|
|
14371
|
+
- Skills: \`ls ~/.claude/skills/ 2>/dev/null\` (names only).
|
|
14372
|
+
- Hooks / scheduled loops / routines: the \`hooks\` block in \`~/.claude/settings.json\` and any equivalent in \`~/.codex/config.toml\` \u2014 read the structure (what runs when), not any secret values.
|
|
14373
|
+
- Reminders/routines the owner drives through Raft: \`raft reminder list\`.
|
|
14350
14374
|
|
|
14351
|
-
|
|
14352
|
-
-
|
|
14353
|
-
-
|
|
14375
|
+
Names only \u2014 never \`cat\` (these can inline API keys):
|
|
14376
|
+
- Claude MCP: \`jq -r '.mcpServers|keys[]' ~/.claude/settings.json ~/.claude.json 2>/dev/null\`
|
|
14377
|
+
- Codex MCP: the \`[mcp_servers.*]\` table headers in \`~/.codex/config.toml\` \u2014 e.g. \`grep '^\\[mcp_servers' ~/.codex/config.toml\` (header names only).
|
|
14354
14378
|
|
|
14355
|
-
After scanning, post one echo line:
|
|
14379
|
+
After scanning, post one echo line naming ONLY what you read:
|
|
14356
14380
|
|
|
14357
|
-
\`read: CC v_, MCP names [...],
|
|
14381
|
+
\`read: CC v_, Codex v_, MCP names [...], skills [...], instruction files [...] - nothing else.\`
|
|
14358
14382
|
|
|
14359
14383
|
Then post the conclusion only: inferred workflow shape + team proposal + how the agents would run. Share the raw list only if the owner asks.
|
|
14360
14384
|
|
|
@@ -22658,7 +22682,7 @@ function resolveSlockCliPathOrEmpty(moduleUrl = import.meta.url) {
|
|
|
22658
22682
|
}
|
|
22659
22683
|
async function runBundledSlockCli(argv) {
|
|
22660
22684
|
process.argv = [process.execPath, "slock", ...argv];
|
|
22661
|
-
await import("./dist-
|
|
22685
|
+
await import("./dist-YOKZZD4F.js");
|
|
22662
22686
|
}
|
|
22663
22687
|
function detectRuntimes(tracer = noopTracer) {
|
|
22664
22688
|
const ids = [];
|
package/dist/cli/index.js
CHANGED
|
@@ -28567,7 +28567,7 @@ var RUNTIME_PROVIDER_DISPLAY_NAMES = {
|
|
|
28567
28567
|
"openrouter": "OpenRouter",
|
|
28568
28568
|
"xai": "xAI",
|
|
28569
28569
|
"xiaomi": "Xiaomi MiMo",
|
|
28570
|
-
"zai": "ZAI",
|
|
28570
|
+
"zai": "ZAI Coding Plan (Global)",
|
|
28571
28571
|
"zai-coding-cn": "ZAI Coding Plan (China)"
|
|
28572
28572
|
};
|
|
28573
28573
|
|
|
@@ -42876,13 +42876,23 @@ var integrationUpdateAppRegistrationOperationSchema = integrationAppDraftFieldsS
|
|
|
42876
42876
|
unsafeDemoUrlOverride: external_exports.boolean().optional(),
|
|
42877
42877
|
draftHint: draftHintSchema
|
|
42878
42878
|
});
|
|
42879
|
+
var migrationExportOperationSchema = external_exports.object({
|
|
42880
|
+
type: external_exports.literal("migration:export"),
|
|
42881
|
+
targetComputer: idOrHandleSchema,
|
|
42882
|
+
mode: external_exports.enum(["cooperative", "forensic"]).default("cooperative"),
|
|
42883
|
+
prepDeadlineMs: external_exports.number().int().positive().optional(),
|
|
42884
|
+
transferDeadlineMs: external_exports.number().int().positive().optional(),
|
|
42885
|
+
arrivalDeadlineMs: external_exports.number().int().positive().optional(),
|
|
42886
|
+
draftHint: draftHintSchema
|
|
42887
|
+
});
|
|
42879
42888
|
var actionCardActionSchema = external_exports.discriminatedUnion("type", [
|
|
42880
42889
|
channelCreateOperationSchema,
|
|
42881
42890
|
agentCreateOperationSchema,
|
|
42882
42891
|
channelAddMemberOperationSchema,
|
|
42883
42892
|
integrationApproveAgentLoginOperationSchema,
|
|
42884
42893
|
integrationRegisterAppOperationSchema,
|
|
42885
|
-
integrationUpdateAppRegistrationOperationSchema
|
|
42894
|
+
integrationUpdateAppRegistrationOperationSchema,
|
|
42895
|
+
migrationExportOperationSchema
|
|
42886
42896
|
]);
|
|
42887
42897
|
function validateActionCardAction(action) {
|
|
42888
42898
|
if (action.type === "agent:create") {
|
|
@@ -42902,9 +42912,17 @@ function validateActionCardAction(action) {
|
|
|
42902
42912
|
return "integration:update_app_registration must include at least one field to update";
|
|
42903
42913
|
}
|
|
42904
42914
|
}
|
|
42915
|
+
if (action.type === "migration:export") {
|
|
42916
|
+
if (!action.targetComputer.trim()) {
|
|
42917
|
+
return "migration:export must include a targetComputer";
|
|
42918
|
+
}
|
|
42919
|
+
}
|
|
42905
42920
|
return null;
|
|
42906
42921
|
}
|
|
42907
42922
|
|
|
42923
|
+
// ../shared/src/featureFlags.ts
|
|
42924
|
+
init_esm_shims();
|
|
42925
|
+
|
|
42908
42926
|
// ../shared/src/agentApiContract.ts
|
|
42909
42927
|
init_esm_shims();
|
|
42910
42928
|
|
|
@@ -44502,6 +44520,9 @@ var AUTH_REFRESH_ROTATION_RETRY_RTT_BUDGET_MS = 1e3;
|
|
|
44502
44520
|
var AUTH_REFRESH_ROTATION_LOSER_WORST_CHAIN_MS = AUTH_REFRESH_ROTATION_DISCOVERY_LAG_BUDGET_MS + AUTH_REFRESH_ROTATED_TOKEN_WAIT_MS + AUTH_REFRESH_ROTATION_RETRY_RTT_BUDGET_MS;
|
|
44503
44521
|
var AUTH_REFRESH_ROTATION_REPLAY_GRACE_MARGIN_MS = AUTH_REFRESH_ROTATED_REPLAY_GRACE_MS - AUTH_REFRESH_ROTATION_LOSER_WORST_CHAIN_MS;
|
|
44504
44522
|
|
|
44523
|
+
// ../shared/src/clock.ts
|
|
44524
|
+
init_esm_shims();
|
|
44525
|
+
|
|
44505
44526
|
// ../shared/src/daemonApiRawClient.ts
|
|
44506
44527
|
init_esm_shims();
|
|
44507
44528
|
function failure2(routeKey, reason, message, details = {}) {
|
|
@@ -45045,6 +45066,21 @@ var RAFT_OAUTH_SCOPES_SUPPORTED = Object.keys(RAFT_OAUTH_SCOPE_CATALOG);
|
|
|
45045
45066
|
var RAFT_OAUTH_DEFAULT_ALLOWED_SCOPES = RAFT_OAUTH_SCOPES_SUPPORTED.filter((scope) => RAFT_OAUTH_SCOPE_CATALOG[scope].defaultAllowed);
|
|
45046
45067
|
var RAFT_OAUTH_PUBLIC_DISCOVERY_SCOPES = RAFT_OAUTH_SCOPES_SUPPORTED.filter((scope) => RAFT_OAUTH_SCOPE_CATALOG[scope].publicDiscovery);
|
|
45047
45068
|
|
|
45069
|
+
// ../shared/src/sync-core/index.ts
|
|
45070
|
+
init_esm_shims();
|
|
45071
|
+
|
|
45072
|
+
// ../shared/src/sync-core/core.ts
|
|
45073
|
+
init_esm_shims();
|
|
45074
|
+
|
|
45075
|
+
// ../shared/src/sync-core/violations.ts
|
|
45076
|
+
init_esm_shims();
|
|
45077
|
+
|
|
45078
|
+
// ../shared/src/sync-core/types.ts
|
|
45079
|
+
init_esm_shims();
|
|
45080
|
+
|
|
45081
|
+
// ../shared/src/sync-core/testing.ts
|
|
45082
|
+
init_esm_shims();
|
|
45083
|
+
|
|
45048
45084
|
// ../shared/src/testing/failpoints.ts
|
|
45049
45085
|
init_esm_shims();
|
|
45050
45086
|
var NoopFailpointRegistry = class {
|
|
@@ -48402,7 +48438,7 @@ function classifyBridgeLoopError(err) {
|
|
|
48402
48438
|
}
|
|
48403
48439
|
if (err instanceof Error) {
|
|
48404
48440
|
const text = `${err.name}: ${err.message} ${err.cause?.message ?? ""}`;
|
|
48405
|
-
if (/wake-hint stream (ended|idle timeout|parse failed)|fetch failed|ECONNREFUSED|ECONNRESET|ETIMEDOUT|EAI_AGAIN|EPIPE|socket|network|UND_ERR/i.test(text)) {
|
|
48441
|
+
if (/wake-hint stream (ended|idle timeout|parse failed)|fetch failed|TypeError:\s*terminated\b|ECONNREFUSED|ECONNRESET|ETIMEDOUT|EAI_AGAIN|EPIPE|socket|network|UND_ERR/i.test(text)) {
|
|
48406
48442
|
return "retryable";
|
|
48407
48443
|
}
|
|
48408
48444
|
}
|
|
@@ -52010,6 +52046,12 @@ ${created}
|
|
|
52010
52046
|
To follow up in each task's thread:
|
|
52011
52047
|
${threadHints}`;
|
|
52012
52048
|
}
|
|
52049
|
+
function canonicalTaskTarget(target) {
|
|
52050
|
+
return target.replace(/^dm:user:/i, "dm:@");
|
|
52051
|
+
}
|
|
52052
|
+
function taskThreadTarget(target, messageId) {
|
|
52053
|
+
return `${canonicalTaskTarget(target)}:${messageId.slice(0, 8)}`;
|
|
52054
|
+
}
|
|
52013
52055
|
function formatClaimResults(channel, data) {
|
|
52014
52056
|
const lines = data.results.map((r) => {
|
|
52015
52057
|
const label = r.taskNumber ? `#${r.taskNumber}` : `msg:${r.messageId}`;
|
|
@@ -52026,7 +52068,7 @@ function formatClaimResults(channel, data) {
|
|
|
52026
52068
|
const failed = data.results.length - succeeded;
|
|
52027
52069
|
let summary = `${succeeded} claimed`;
|
|
52028
52070
|
if (failed > 0) summary += `, ${failed} failed`;
|
|
52029
|
-
const claimedMsgs = data.results.filter((r) => r.success && r.messageId).map((r) => `#${r.taskNumber} \u2192 raft message send --target "${channel
|
|
52071
|
+
const claimedMsgs = data.results.filter((r) => r.success && r.messageId).map((r) => `#${r.taskNumber} \u2192 raft message send --target "${taskThreadTarget(channel, r.messageId)}"`).join("\n");
|
|
52030
52072
|
const threadHint = claimedMsgs ? `
|
|
52031
52073
|
|
|
52032
52074
|
Follow up in each task's thread:
|
package/dist/cli/package.json
CHANGED
package/dist/core.js
CHANGED
|
@@ -28331,7 +28331,7 @@ var RUNTIME_PROVIDER_DISPLAY_NAMES = {
|
|
|
28331
28331
|
"openrouter": "OpenRouter",
|
|
28332
28332
|
"xai": "xAI",
|
|
28333
28333
|
"xiaomi": "Xiaomi MiMo",
|
|
28334
|
-
"zai": "ZAI",
|
|
28334
|
+
"zai": "ZAI Coding Plan (Global)",
|
|
28335
28335
|
"zai-coding-cn": "ZAI Coding Plan (China)"
|
|
28336
28336
|
};
|
|
28337
28337
|
function getRuntimeProviderDisplayName(providerId) {
|
|
@@ -42434,13 +42434,23 @@ var integrationUpdateAppRegistrationOperationSchema = integrationAppDraftFieldsS
|
|
|
42434
42434
|
unsafeDemoUrlOverride: external_exports.boolean().optional(),
|
|
42435
42435
|
draftHint: draftHintSchema
|
|
42436
42436
|
});
|
|
42437
|
+
var migrationExportOperationSchema = external_exports.object({
|
|
42438
|
+
type: external_exports.literal("migration:export"),
|
|
42439
|
+
targetComputer: idOrHandleSchema,
|
|
42440
|
+
mode: external_exports.enum(["cooperative", "forensic"]).default("cooperative"),
|
|
42441
|
+
prepDeadlineMs: external_exports.number().int().positive().optional(),
|
|
42442
|
+
transferDeadlineMs: external_exports.number().int().positive().optional(),
|
|
42443
|
+
arrivalDeadlineMs: external_exports.number().int().positive().optional(),
|
|
42444
|
+
draftHint: draftHintSchema
|
|
42445
|
+
});
|
|
42437
42446
|
var actionCardActionSchema = external_exports.discriminatedUnion("type", [
|
|
42438
42447
|
channelCreateOperationSchema,
|
|
42439
42448
|
agentCreateOperationSchema,
|
|
42440
42449
|
channelAddMemberOperationSchema,
|
|
42441
42450
|
integrationApproveAgentLoginOperationSchema,
|
|
42442
42451
|
integrationRegisterAppOperationSchema,
|
|
42443
|
-
integrationUpdateAppRegistrationOperationSchema
|
|
42452
|
+
integrationUpdateAppRegistrationOperationSchema,
|
|
42453
|
+
migrationExportOperationSchema
|
|
42444
42454
|
]);
|
|
42445
42455
|
function validateActionCardAction(action) {
|
|
42446
42456
|
if (action.type === "agent:create") {
|
|
@@ -42460,10 +42470,16 @@ function validateActionCardAction(action) {
|
|
|
42460
42470
|
return "integration:update_app_registration must include at least one field to update";
|
|
42461
42471
|
}
|
|
42462
42472
|
}
|
|
42473
|
+
if (action.type === "migration:export") {
|
|
42474
|
+
if (!action.targetComputer.trim()) {
|
|
42475
|
+
return "migration:export must include a targetComputer";
|
|
42476
|
+
}
|
|
42477
|
+
}
|
|
42463
42478
|
return null;
|
|
42464
42479
|
}
|
|
42465
42480
|
init_esm_shims();
|
|
42466
42481
|
init_esm_shims();
|
|
42482
|
+
init_esm_shims();
|
|
42467
42483
|
var ATTENTION_HINT_SCHEMA = "attention-dependency-hint.v1";
|
|
42468
42484
|
var ATTENTION_HINT_DEFAULT_WINDOW_MS = 7 * 24 * 60 * 60 * 1e3;
|
|
42469
42485
|
var AGENT_API_BASE_PATH = "/internal/agent-api";
|
|
@@ -44046,6 +44062,7 @@ var AUTH_REFRESH_ROTATION_RETRY_RTT_BUDGET_MS = 1e3;
|
|
|
44046
44062
|
var AUTH_REFRESH_ROTATION_LOSER_WORST_CHAIN_MS = AUTH_REFRESH_ROTATION_DISCOVERY_LAG_BUDGET_MS + AUTH_REFRESH_ROTATED_TOKEN_WAIT_MS + AUTH_REFRESH_ROTATION_RETRY_RTT_BUDGET_MS;
|
|
44047
44063
|
var AUTH_REFRESH_ROTATION_REPLAY_GRACE_MARGIN_MS = AUTH_REFRESH_ROTATED_REPLAY_GRACE_MS - AUTH_REFRESH_ROTATION_LOSER_WORST_CHAIN_MS;
|
|
44048
44064
|
init_esm_shims();
|
|
44065
|
+
init_esm_shims();
|
|
44049
44066
|
function failure2(routeKey, reason, message, details = {}) {
|
|
44050
44067
|
return {
|
|
44051
44068
|
ok: false,
|
|
@@ -44571,6 +44588,11 @@ var RAFT_OAUTH_SCOPES_SUPPORTED = Object.keys(RAFT_OAUTH_SCOPE_CATALOG);
|
|
|
44571
44588
|
var RAFT_OAUTH_DEFAULT_ALLOWED_SCOPES = RAFT_OAUTH_SCOPES_SUPPORTED.filter((scope) => RAFT_OAUTH_SCOPE_CATALOG[scope].defaultAllowed);
|
|
44572
44589
|
var RAFT_OAUTH_PUBLIC_DISCOVERY_SCOPES = RAFT_OAUTH_SCOPES_SUPPORTED.filter((scope) => RAFT_OAUTH_SCOPE_CATALOG[scope].publicDiscovery);
|
|
44573
44590
|
init_esm_shims();
|
|
44591
|
+
init_esm_shims();
|
|
44592
|
+
init_esm_shims();
|
|
44593
|
+
init_esm_shims();
|
|
44594
|
+
init_esm_shims();
|
|
44595
|
+
init_esm_shims();
|
|
44574
44596
|
var NoopFailpointRegistry = class {
|
|
44575
44597
|
get enabled() {
|
|
44576
44598
|
return false;
|
|
@@ -47864,7 +47886,7 @@ function classifyBridgeLoopError(err) {
|
|
|
47864
47886
|
}
|
|
47865
47887
|
if (err instanceof Error) {
|
|
47866
47888
|
const text = `${err.name}: ${err.message} ${err.cause?.message ?? ""}`;
|
|
47867
|
-
if (/wake-hint stream (ended|idle timeout|parse failed)|fetch failed|ECONNREFUSED|ECONNRESET|ETIMEDOUT|EAI_AGAIN|EPIPE|socket|network|UND_ERR/i.test(text)) {
|
|
47889
|
+
if (/wake-hint stream (ended|idle timeout|parse failed)|fetch failed|TypeError:\s*terminated\b|ECONNREFUSED|ECONNRESET|ETIMEDOUT|EAI_AGAIN|EPIPE|socket|network|UND_ERR/i.test(text)) {
|
|
47868
47890
|
return "retryable";
|
|
47869
47891
|
}
|
|
47870
47892
|
}
|
|
@@ -51365,6 +51387,12 @@ ${created}
|
|
|
51365
51387
|
To follow up in each task's thread:
|
|
51366
51388
|
${threadHints}`;
|
|
51367
51389
|
}
|
|
51390
|
+
function canonicalTaskTarget(target) {
|
|
51391
|
+
return target.replace(/^dm:user:/i, "dm:@");
|
|
51392
|
+
}
|
|
51393
|
+
function taskThreadTarget(target, messageId) {
|
|
51394
|
+
return `${canonicalTaskTarget(target)}:${messageId.slice(0, 8)}`;
|
|
51395
|
+
}
|
|
51368
51396
|
function formatClaimResults(channel, data) {
|
|
51369
51397
|
const lines = data.results.map((r) => {
|
|
51370
51398
|
const label = r.taskNumber ? `#${r.taskNumber}` : `msg:${r.messageId}`;
|
|
@@ -51381,7 +51409,7 @@ function formatClaimResults(channel, data) {
|
|
|
51381
51409
|
const failed = data.results.length - succeeded;
|
|
51382
51410
|
let summary = `${succeeded} claimed`;
|
|
51383
51411
|
if (failed > 0) summary += `, ${failed} failed`;
|
|
51384
|
-
const claimedMsgs = data.results.filter((r) => r.success && r.messageId).map((r) => `#${r.taskNumber} \u2192 raft message send --target "${channel
|
|
51412
|
+
const claimedMsgs = data.results.filter((r) => r.success && r.messageId).map((r) => `#${r.taskNumber} \u2192 raft message send --target "${taskThreadTarget(channel, r.messageId)}"`).join("\n");
|
|
51385
51413
|
const threadHint = claimedMsgs ? `
|
|
51386
51414
|
|
|
51387
51415
|
Follow up in each task's thread:
|
package/dist/index.js
CHANGED