@botiverse/raft-daemon 0.72.0 → 0.72.2

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.
@@ -13986,6 +13986,8 @@ For new channels, new agents, and adding members to an existing channel, post an
13986
13986
  - \`{type: "channel:add_member", channel: "#existing-channel", humans?: ["@alice"], agents?: ["@scout"], draftHint?}\` \u2014 at least one of humans / agents must be non-empty
13987
13987
  - 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
13988
  - 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).
13989
+ - 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.
13990
+ - 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
13991
  - 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
13992
  - 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
13993
  - Do not imply the resource has been created or members added until the card flips to "Done".
@@ -13993,7 +13995,7 @@ For new channels, new agents, and adding members to an existing channel, post an
13993
13995
  Other plan elements still apply:
13994
13996
  - suggested channel or workstream pairing
13995
13997
  - first task to send after the card is committed
13996
- - who to pull in once the channel exists (often a follow-up \`channel:add_member\` card)
13998
+ - 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
13999
 
13998
14000
  Do not use a rigid keyword routing table. Use examples as inspiration, then adapt to the user's context.
13999
14001
  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 +14348,27 @@ Offer a guided walk: one card-as-conversation per turn, always with an exit back
14346
14348
 
14347
14349
  ## Setup-Scan Toolbox
14348
14350
 
14349
- Only use this after explicit consent. Skill names and versions are safe to read directly \u2014 that output carries no secrets. The one exception is the MCP config (\`~/.claude/settings.json\` / \`~/.claude.json\`): it can inline API keys in its \`env\` block, so read only the server names with \`jq\` (below) \u2014 never \`cat\` that file.
14351
+ 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.
14350
14352
 
14351
- - MCP names: \`jq -r '.mcpServers|keys[]' ~/.claude/settings.json\`
14352
- - Skill names: \`ls ~/.claude/skills/\`
14353
- - Runtime versions: \`claude --version\` and \`codex --version\`
14353
+ 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).
14354
14354
 
14355
- After scanning, post one echo line:
14355
+ Discover first, then read only what exists \u2014 don't assume a path is there:
14356
+ - Runtimes present: \`claude --version\`, \`codex --version\` (and any other runtime binary the owner mentions).
14357
+ - Config dirs: \`ls -a ~/.claude/ ~/.codex/ 2>/dev/null\` \u2014 then read what's actually there.
14356
14358
 
14357
- \`read: CC v_, MCP names [...], skill names [...] - nothing else.\`
14359
+ Read directly (guidance, no secrets) \u2014 this is where routines, loops, and conventions live:
14360
+ - Agent instructions: \`~/.claude/CLAUDE.md\`, \`~/.codex/AGENTS.md\`, plus any project-level \`CLAUDE.md\` / \`AGENTS.md\` / \`agent.md\` in the owner's working dirs.
14361
+ - Skills: \`ls ~/.claude/skills/ 2>/dev/null\` (names only).
14362
+ - 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.
14363
+ - Reminders/routines the owner drives through Raft: \`raft reminder list\`.
14364
+
14365
+ Names only \u2014 never \`cat\` (these can inline API keys):
14366
+ - Claude MCP: \`jq -r '.mcpServers|keys[]' ~/.claude/settings.json ~/.claude.json 2>/dev/null\`
14367
+ - Codex MCP: the \`[mcp_servers.*]\` table headers in \`~/.codex/config.toml\` \u2014 e.g. \`grep '^\\[mcp_servers' ~/.codex/config.toml\` (header names only).
14368
+
14369
+ After scanning, post one echo line naming ONLY what you read:
14370
+
14371
+ \`read: CC v_, Codex v_, MCP names [...], skills [...], instruction files [...] - nothing else.\`
14358
14372
 
14359
14373
  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
14374
 
@@ -22658,7 +22672,7 @@ function resolveSlockCliPathOrEmpty(moduleUrl = import.meta.url) {
22658
22672
  }
22659
22673
  async function runBundledSlockCli(argv) {
22660
22674
  process.argv = [process.execPath, "slock", ...argv];
22661
- await import("./dist-UCGBT6NS.js");
22675
+ await import("./dist-V7E6IFYX.js");
22662
22676
  }
22663
22677
  function detectRuntimes(tracer = noopTracer) {
22664
22678
  const ids = [];
package/dist/cli/index.js CHANGED
@@ -44502,6 +44502,9 @@ var AUTH_REFRESH_ROTATION_RETRY_RTT_BUDGET_MS = 1e3;
44502
44502
  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
44503
  var AUTH_REFRESH_ROTATION_REPLAY_GRACE_MARGIN_MS = AUTH_REFRESH_ROTATED_REPLAY_GRACE_MS - AUTH_REFRESH_ROTATION_LOSER_WORST_CHAIN_MS;
44504
44504
 
44505
+ // ../shared/src/clock.ts
44506
+ init_esm_shims();
44507
+
44505
44508
  // ../shared/src/daemonApiRawClient.ts
44506
44509
  init_esm_shims();
44507
44510
  function failure2(routeKey, reason, message, details = {}) {
@@ -45045,6 +45048,21 @@ var RAFT_OAUTH_SCOPES_SUPPORTED = Object.keys(RAFT_OAUTH_SCOPE_CATALOG);
45045
45048
  var RAFT_OAUTH_DEFAULT_ALLOWED_SCOPES = RAFT_OAUTH_SCOPES_SUPPORTED.filter((scope) => RAFT_OAUTH_SCOPE_CATALOG[scope].defaultAllowed);
45046
45049
  var RAFT_OAUTH_PUBLIC_DISCOVERY_SCOPES = RAFT_OAUTH_SCOPES_SUPPORTED.filter((scope) => RAFT_OAUTH_SCOPE_CATALOG[scope].publicDiscovery);
45047
45050
 
45051
+ // ../shared/src/sync-core/index.ts
45052
+ init_esm_shims();
45053
+
45054
+ // ../shared/src/sync-core/core.ts
45055
+ init_esm_shims();
45056
+
45057
+ // ../shared/src/sync-core/violations.ts
45058
+ init_esm_shims();
45059
+
45060
+ // ../shared/src/sync-core/types.ts
45061
+ init_esm_shims();
45062
+
45063
+ // ../shared/src/sync-core/testing.ts
45064
+ init_esm_shims();
45065
+
45048
45066
  // ../shared/src/testing/failpoints.ts
45049
45067
  init_esm_shims();
45050
45068
  var NoopFailpointRegistry = class {
@@ -52010,6 +52028,12 @@ ${created}
52010
52028
  To follow up in each task's thread:
52011
52029
  ${threadHints}`;
52012
52030
  }
52031
+ function canonicalTaskTarget(target) {
52032
+ return target.replace(/^dm:user:/i, "dm:@");
52033
+ }
52034
+ function taskThreadTarget(target, messageId) {
52035
+ return `${canonicalTaskTarget(target)}:${messageId.slice(0, 8)}`;
52036
+ }
52013
52037
  function formatClaimResults(channel, data) {
52014
52038
  const lines = data.results.map((r) => {
52015
52039
  const label = r.taskNumber ? `#${r.taskNumber}` : `msg:${r.messageId}`;
@@ -52026,7 +52050,7 @@ function formatClaimResults(channel, data) {
52026
52050
  const failed = data.results.length - succeeded;
52027
52051
  let summary = `${succeeded} claimed`;
52028
52052
  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}:${r.messageId.slice(0, 8)}"`).join("\n");
52053
+ 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
52054
  const threadHint = claimedMsgs ? `
52031
52055
 
52032
52056
  Follow up in each task's thread:
package/dist/core.js CHANGED
@@ -16,7 +16,7 @@ import {
16
16
  runBundledSlockCli,
17
17
  scanWorkspaceDirectories,
18
18
  subscribeDaemonLogs
19
- } from "./chunk-YAI5OK4D.js";
19
+ } from "./chunk-7RB6FSFI.js";
20
20
  export {
21
21
  AGENT_MIGRATION_BUNDLE_SCHEMA_VERSION,
22
22
  AgentMigrationGrantRegistry,
@@ -44046,6 +44046,7 @@ var AUTH_REFRESH_ROTATION_RETRY_RTT_BUDGET_MS = 1e3;
44046
44046
  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
44047
  var AUTH_REFRESH_ROTATION_REPLAY_GRACE_MARGIN_MS = AUTH_REFRESH_ROTATED_REPLAY_GRACE_MS - AUTH_REFRESH_ROTATION_LOSER_WORST_CHAIN_MS;
44048
44048
  init_esm_shims();
44049
+ init_esm_shims();
44049
44050
  function failure2(routeKey, reason, message, details = {}) {
44050
44051
  return {
44051
44052
  ok: false,
@@ -44571,6 +44572,11 @@ var RAFT_OAUTH_SCOPES_SUPPORTED = Object.keys(RAFT_OAUTH_SCOPE_CATALOG);
44571
44572
  var RAFT_OAUTH_DEFAULT_ALLOWED_SCOPES = RAFT_OAUTH_SCOPES_SUPPORTED.filter((scope) => RAFT_OAUTH_SCOPE_CATALOG[scope].defaultAllowed);
44572
44573
  var RAFT_OAUTH_PUBLIC_DISCOVERY_SCOPES = RAFT_OAUTH_SCOPES_SUPPORTED.filter((scope) => RAFT_OAUTH_SCOPE_CATALOG[scope].publicDiscovery);
44573
44574
  init_esm_shims();
44575
+ init_esm_shims();
44576
+ init_esm_shims();
44577
+ init_esm_shims();
44578
+ init_esm_shims();
44579
+ init_esm_shims();
44574
44580
  var NoopFailpointRegistry = class {
44575
44581
  get enabled() {
44576
44582
  return false;
@@ -51365,6 +51371,12 @@ ${created}
51365
51371
  To follow up in each task's thread:
51366
51372
  ${threadHints}`;
51367
51373
  }
51374
+ function canonicalTaskTarget(target) {
51375
+ return target.replace(/^dm:user:/i, "dm:@");
51376
+ }
51377
+ function taskThreadTarget(target, messageId) {
51378
+ return `${canonicalTaskTarget(target)}:${messageId.slice(0, 8)}`;
51379
+ }
51368
51380
  function formatClaimResults(channel, data) {
51369
51381
  const lines = data.results.map((r) => {
51370
51382
  const label = r.taskNumber ? `#${r.taskNumber}` : `msg:${r.messageId}`;
@@ -51381,7 +51393,7 @@ function formatClaimResults(channel, data) {
51381
51393
  const failed = data.results.length - succeeded;
51382
51394
  let summary = `${succeeded} claimed`;
51383
51395
  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}:${r.messageId.slice(0, 8)}"`).join("\n");
51396
+ 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
51397
  const threadHint = claimedMsgs ? `
51386
51398
 
51387
51399
  Follow up in each task's thread:
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  DAEMON_CLI_USAGE,
4
4
  DaemonCore,
5
5
  parseDaemonCliArgs
6
- } from "./chunk-YAI5OK4D.js";
6
+ } from "./chunk-7RB6FSFI.js";
7
7
 
8
8
  // src/index.ts
9
9
  var parsedArgs = parseDaemonCliArgs(process.argv.slice(2));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botiverse/raft-daemon",
3
- "version": "0.72.0",
3
+ "version": "0.72.2",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "raft-daemon": "dist/raft-daemon.js",