@botiverse/raft-daemon 0.65.0-play.20260701141606 → 0.66.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.
@@ -1356,6 +1356,7 @@ var TOOL_DISPLAY_METADATA = {
1356
1356
  claim_tasks: { logLabel: "Claiming tasks", activityLabel: "Claiming tasks\u2026", summaryKind: "claim_tasks" },
1357
1357
  unclaim_task: { logLabel: "Unclaiming task", activityLabel: "Unclaiming task\u2026", summaryKind: "task_ref" },
1358
1358
  update_task_status: { logLabel: "Updating task status", activityLabel: "Updating task status\u2026", summaryKind: "task_ref" },
1359
+ add_channel_member: { logLabel: "Adding channel member", activityLabel: "Adding channel member\u2026", summaryKind: "target" },
1359
1360
  join_channel: { logLabel: "Joining channel", activityLabel: "Joining channel\u2026", summaryKind: "target" },
1360
1361
  leave_channel: { logLabel: "Leaving channel", activityLabel: "Leaving channel\u2026", summaryKind: "target" },
1361
1362
  upload_file: { logLabel: "Uploading file", activityLabel: "Uploading file\u2026", summaryKind: "file_path" },
@@ -1387,6 +1388,7 @@ var KNOWN_TOOL_ALIASES = {
1387
1388
  claim_tasks: "claim_tasks",
1388
1389
  unclaim_task: "unclaim_task",
1389
1390
  update_task_status: "update_task_status",
1391
+ add_channel_member: "add_channel_member",
1390
1392
  join_channel: "join_channel",
1391
1393
  leave_channel: "leave_channel",
1392
1394
  upload_file: "upload_file",
@@ -1604,8 +1606,44 @@ function resolveSlockCliInvocation(toolName, input) {
1604
1606
  return { toolName: "search_messages", input: { query: readOptionValue(rest, "--query") } };
1605
1607
  case "server info":
1606
1608
  return { toolName: "list_server", input: {} };
1609
+ case "server update":
1610
+ return {
1611
+ toolName: "update_server",
1612
+ input: {
1613
+ name: readOptionValue(rest, "--name"),
1614
+ avatar_file: readOptionValue(rest, "--avatar-file")
1615
+ }
1616
+ };
1607
1617
  case "channel members":
1608
1618
  return { toolName: "list_channel_members", input: { channel: rest[0] } };
1619
+ case "channel update":
1620
+ return {
1621
+ toolName: "update_channel",
1622
+ input: {
1623
+ target: readOptionValue(rest, "--target"),
1624
+ name: readOptionValue(rest, "--name"),
1625
+ description: readOptionValue(rest, "--description"),
1626
+ visibility: rest.includes("--private") ? "private" : rest.includes("--public") ? "public" : void 0
1627
+ }
1628
+ };
1629
+ case "channel add-member":
1630
+ return {
1631
+ toolName: "add_channel_member",
1632
+ input: {
1633
+ target: readOptionValue(rest, "--target"),
1634
+ user: readOptionValue(rest, "--user"),
1635
+ agent: readOptionValue(rest, "--agent")
1636
+ }
1637
+ };
1638
+ case "channel remove-member":
1639
+ return {
1640
+ toolName: "remove_channel_member",
1641
+ input: {
1642
+ target: readOptionValue(rest, "--target"),
1643
+ user: readOptionValue(rest, "--user"),
1644
+ agent: readOptionValue(rest, "--agent")
1645
+ }
1646
+ };
1609
1647
  case "channel join":
1610
1648
  return { toolName: "join_channel", input: { target: readOptionValue(rest, "--target") } };
1611
1649
  case "channel leave":
@@ -2107,6 +2145,9 @@ var agentApiActionPrepareBodySchema = passthroughObject({
2107
2145
  var agentApiServerInfoResponseSchema = passthroughObject({
2108
2146
  runtimeContext: passthroughObject({
2109
2147
  agentId: z2.string(),
2148
+ runtime: z2.string().optional(),
2149
+ model: z2.string().optional(),
2150
+ reasoningEffort: reasoningEffortSchema.nullable().optional(),
2110
2151
  serverId: z2.string(),
2111
2152
  machineId: z2.string().nullable().optional(),
2112
2153
  machineName: z2.string().nullable().optional(),
@@ -2123,10 +2164,12 @@ var agentApiServerInfoResponseSchema = passthroughObject({
2123
2164
  joined: z2.boolean()
2124
2165
  })),
2125
2166
  agents: z2.array(passthroughObject({
2126
- name: z2.string()
2167
+ name: z2.string(),
2168
+ role: z2.enum(["owner", "admin", "member"]).nullable().optional()
2127
2169
  })),
2128
2170
  humans: z2.array(passthroughObject({
2129
- name: z2.string()
2171
+ name: z2.string(),
2172
+ role: z2.enum(["owner", "admin", "member"]).nullable().optional()
2130
2173
  }))
2131
2174
  });
2132
2175
  var agentApiMentionActionsPendingQuerySchema = passthroughObject({
@@ -4078,41 +4121,20 @@ function buildCommunicationSection(audience) {
4078
4121
  const installation = describeSlockInstallation(audience);
4079
4122
  return `## Communication \u2014 raft CLI ONLY
4080
4123
 
4081
- Use the \`raft\` CLI for chat / task / attachment operations (\`slock\` remains a legacy alias). ${installation} Use ONLY these commands for communication:
4082
-
4083
- 1. **\`raft message check\`** \u2014 Non-blocking check for new messages. Use freely during work \u2014 at natural breakpoints or after notifications.
4084
- 2. **\`raft message send\`** \u2014 Send a message to a channel or DM.
4085
- 3. **\`raft server info\`** \u2014 List channels in this server, which ones you have joined, plus all agents and humans.
4086
- 4. **\`raft channel members\`** \u2014 List the members (agents and humans) of a specific channel, DM, or thread target.
4087
- 5. **\`raft channel join\`** \u2014 Join a visible public channel. This only affects your own agent membership.
4088
- 6. **\`raft channel leave\`** \u2014 Leave a regular channel you have joined. This only affects your own agent membership.
4089
- 7. **\`raft channel mute\`** \u2014 Mute ordinary Activity delivery for a regular channel for your agent. Personal @mentions and DMs still pierce; a task pierces only when it personally @mentions you (being a task does not pierce).
4090
- 8. **\`raft channel unmute\`** \u2014 Unmute ordinary Activity delivery for a regular channel for your agent. Muted-window messages are not retroactively promoted.
4091
- 9. **\`raft thread unfollow\`** \u2014 Stop receiving ordinary delivery for a thread you no longer need to follow. This only affects your own agent attention state.
4092
- 10. **\`raft message read\`** \u2014 Read past messages from a channel, DM, or thread. Supports \`before\` / \`after\` anchors and \`around\` for centered context.
4093
- 11. **\`raft message search\`** \u2014 Search messages visible to you, then inspect a hit with \`raft message read\`.
4094
- 12. **\`raft message resolve\`** \u2014 Verify that a cited message id exists exactly and print its canonical message row. Use this when checking whether a referenced id is real; \`read --around\` is for context, not proof.
4095
- 13. **\`raft message react\`** \u2014 Add or remove your reaction on a message. Use sparingly: prefer acknowledgement/follow-up signals like \u{1F440}, and do not auto-react to every merge, deploy, or task completion with celebratory emoji.
4096
- 14. **\`raft task list\`** \u2014 View a channel's task board.
4097
- 15. **\`raft task create\`** \u2014 Create new task-messages in a channel (supports batch titles; equivalent to sending a new message and publishing it as a task-message, not claiming it for yourself).
4098
- 16. **\`raft task claim\`** \u2014 Claim tasks by number or message ID using repeatable flags; examples: \`raft task claim --channel "#channel" --number 1 --number 2\`, or \`raft task claim --channel "#channel" --message-id abc12345\`.
4099
- 17. **\`raft task unclaim\`** \u2014 Release your claim on a task.
4100
- 18. **\`raft task update\`** \u2014 Change a task's status (e.g. to in_review or done).
4101
- 19. **\`raft attachment upload\`** \u2014 Upload a file to attach to a message. Uses content sniffing for image previews; pass \`--mime-type\` only when you know the exact type. Returns an attachment ID to pass to \`raft message send\`.
4102
- 20. **\`raft attachment view\`** \u2014 Download an attached file by its attachment ID so you can inspect it locally.
4103
- 21. **\`raft profile show\`** \u2014 Show your own profile, or another visible profile via \`@handle\`. Mirrors the canonical Slock profile view.
4104
- 22. **\`raft profile update\`** \u2014 Update your own profile. Supports \`--avatar-file <path>\`, \`--avatar-url pixel:random:<seed>\`, \`--display-name <name>\`, and \`--description <text>\`. Use \`--avatar-url pixel:random:<seed>\` when you want a new pixel avatar but do not have a local image file. Values must be non-empty. Provide at least one flag per call; multiple flags can be combined.
4105
- 23. **\`raft integration list\`** \u2014 List built-in Slock apps, registered third-party services, and this agent's active Slock Agent Logins.
4106
- 24. **\`raft integration login\`** \u2014 Provision or reuse this agent's login for a built-in Slock app or registered third-party service.
4107
- 25. **\`raft integration env\`** \u2014 Print per-agent local CLI environment for a manifest-backed service that requires isolated HOME/XDG state.
4108
- 26. **\`raft integration invoke\`** \u2014 List or invoke manifest-backed HTTP API actions for Login with Raft services.
4109
- 27. **\`raft reminder schedule\`** \u2014 Schedule a reminder for yourself later, at a specific time, or on a recurring cadence.
4110
- 28. **\`raft reminder list\`** \u2014 List your reminders, including lifecycle history for each reminder.
4111
- 29. **\`raft reminder snooze\`** \u2014 Push a reminder later without replacing it.
4112
- 30. **\`raft reminder update\`** \u2014 Change a reminder's title, schedule, or recurrence without creating a new reminder.
4113
- 31. **\`raft reminder cancel\`** \u2014 Cancel one of your reminders by ID.
4114
- 32. **\`raft reminder log\`** \u2014 Show the event log for a reminder, including fires, dismissals, and reschedules.
4115
- 33. **\`raft action prepare\`** \u2014 Prepare an action card for a human to commit (B-mode quick-commit shortcut). Posts a card the human can click to execute the action under their own identity. Pass \`--target <ch>\` and pipe the action JSON on stdin (variants: \`channel:create\`, \`agent:create\`).
4124
+ Use the \`raft\` CLI for chat / task / attachment operations (\`slock\` remains a legacy alias). ${installation} Use ONLY these command families for communication and management:
4125
+
4126
+ 1. **Messages** \u2014 \`raft message check\`, \`raft message send\`, \`raft message read\`, \`raft message search\`, \`raft message resolve\`, \`raft message react\`.
4127
+ 2. **Server and channel awareness** \u2014 \`raft server info\`, \`raft channel members\`.
4128
+ 3. **Your channel/thread attention** \u2014 \`raft channel join\`, \`raft channel leave\`, \`raft channel mute\`, \`raft channel unmute\`, \`raft thread unfollow\`.
4129
+ 4. **Admin channel/server management** \u2014 \`raft channel create\`, \`raft channel update\`, \`raft channel add-member\`, \`raft channel remove-member\`, \`raft server update\`.
4130
+ 5. **Tasks** \u2014 \`raft task list\`, \`raft task create\`, \`raft task claim\`, \`raft task unclaim\`, \`raft task update\`.
4131
+ 6. **Attachments** \u2014 \`raft attachment upload\`, \`raft attachment view\`.
4132
+ 7. **Profiles** \u2014 \`raft profile show\`, \`raft profile update\`.
4133
+ 8. **Integrations** \u2014 \`raft integration list\`, \`raft integration login\`, \`raft integration env\`, \`raft integration invoke\`.
4134
+ 9. **Reminders** \u2014 \`raft reminder schedule\`, \`raft reminder list\`, \`raft reminder snooze\`, \`raft reminder update\`, \`raft reminder cancel\`, \`raft reminder log\`.
4135
+ 10. **Action cards** \u2014 \`raft action prepare\`.
4136
+
4137
+ Run any subcommand with \`--help\` for syntax.
4116
4138
 
4117
4139
  The CLI prints human-readable canonical text on success (matching the format you see in received messages and history). On failure it prints canonical labeled text to stderr:
4118
4140
  - \`Error:\` human-readable error summary
@@ -4647,19 +4669,6 @@ function listLegacySlockStatePaths(slockHome = resolveSlockHome(), homeDir = os.
4647
4669
  return candidates.filter((candidate) => existsSync(candidate.path));
4648
4670
  }
4649
4671
 
4650
- // src/authEnv.ts
4651
- var DAEMON_API_KEY_ENV = "SLOCK_MACHINE_API_KEY";
4652
- var SLOCK_AGENT_TOKEN_ENV = "SLOCK_AGENT_TOKEN";
4653
- function scrubDaemonAuthEnv(env) {
4654
- delete env[DAEMON_API_KEY_ENV];
4655
- return env;
4656
- }
4657
- function scrubDaemonChildEnv(env) {
4658
- delete env[DAEMON_API_KEY_ENV];
4659
- delete env[SLOCK_AGENT_TOKEN_ENV];
4660
- return env;
4661
- }
4662
-
4663
4672
  // src/agentCredentialProxy.ts
4664
4673
  import { randomBytes } from "crypto";
4665
4674
  import http from "http";
@@ -6228,9 +6237,7 @@ var LOOPBACK_NO_PROXY = "127.0.0.1,localhost";
6228
6237
  var CLI_TRANSPORT_TRACE_DIR_ENV = "SLOCK_CLI_TRANSPORT_TRACE_DIR";
6229
6238
  var safePathPart = (value) => value.replace(/[^a-zA-Z0-9_.-]/g, "_");
6230
6239
  var RAW_CREDENTIAL_ENV_DENYLIST = [
6231
- "SLOCK_AGENT_TOKEN",
6232
- "SLOCK_AGENT_CREDENTIAL_KEY",
6233
- "SLOCK_AGENT_CREDENTIAL_KEY_FILE"
6240
+ "SLOCK_AGENT_CREDENTIAL_KEY"
6234
6241
  ];
6235
6242
  var WORKSPACE_CLI_TRANSPORT_FILENAMES = [
6236
6243
  "agent-token",
@@ -6585,7 +6592,7 @@ set "SLOCK_AGENT_ACTIVE_CAPABILITIES=${DEFAULT_ACTIVE_CAPABILITIES}"\r
6585
6592
  SLOCK_SERVER_URL: ctx.config.serverUrl,
6586
6593
  PATH: `${slockDir}${path2.delimiter}${process.env.PATH ?? ""}`
6587
6594
  };
6588
- scrubDaemonChildEnv(spawnEnv);
6595
+ delete spawnEnv.SLOCK_AGENT_TOKEN;
6589
6596
  for (const key of RAW_CREDENTIAL_ENV_DENYLIST) {
6590
6597
  delete spawnEnv[key];
6591
6598
  }
@@ -7108,7 +7115,7 @@ function requiresWindowsShell(command, platform = process.platform) {
7108
7115
  }
7109
7116
  function resolveCommandOnPath(command, deps = {}) {
7110
7117
  const platform = deps.platform ?? process.platform;
7111
- const env = scrubDaemonChildEnv({ ...withWindowsUserEnvironment(deps.env ?? process.env, deps) });
7118
+ const env = withWindowsUserEnvironment(deps.env ?? process.env, deps);
7112
7119
  const execFileSyncFn = deps.execFileSyncFn ?? execFileSync;
7113
7120
  const existsSyncFn = deps.existsSyncFn ?? existsSync3;
7114
7121
  if (platform === "win32") {
@@ -7134,7 +7141,7 @@ function firstExistingPath(candidates, deps = {}) {
7134
7141
  return null;
7135
7142
  }
7136
7143
  function readCommandVersion(command, args = [], deps = {}) {
7137
- const env = scrubDaemonChildEnv({ ...withWindowsUserEnvironment(deps.env ?? process.env, deps) });
7144
+ const env = withWindowsUserEnvironment(deps.env ?? process.env, deps);
7138
7145
  const execFileSyncFn = deps.execFileSyncFn ?? execFileSync;
7139
7146
  try {
7140
7147
  const output = normalizeExecOutput(execFileSyncFn(command, [...args, "--version"], {
@@ -9218,11 +9225,11 @@ function detectCursorModels(runCommand = runCursorModelsCommand) {
9218
9225
  return parseCursorModelsOutput(String(result.stdout || ""));
9219
9226
  }
9220
9227
  function buildCursorModelProbeEnv(deps = {}) {
9221
- return scrubDaemonChildEnv(withWindowsUserEnvironment({
9228
+ return withWindowsUserEnvironment({
9222
9229
  ...deps.env ?? process.env,
9223
9230
  FORCE_COLOR: "0",
9224
9231
  NO_COLOR: "1"
9225
- }, deps));
9232
+ }, deps);
9226
9233
  }
9227
9234
  function runCursorModelsCommand() {
9228
9235
  return spawnSync("cursor-agent", ["models"], {
@@ -9278,7 +9285,7 @@ function resolveGeminiSpawn(commandArgs, deps = {}) {
9278
9285
  }
9279
9286
  const execFileSyncFn = deps.execFileSyncFn ?? execFileSync3;
9280
9287
  const existsSyncFn = deps.existsSyncFn ?? existsSync5;
9281
- const env = scrubDaemonChildEnv({ ...deps.env ?? process.env });
9288
+ const env = deps.env ?? process.env;
9282
9289
  const winPath = path8.win32;
9283
9290
  let geminiEntry = null;
9284
9291
  try {
@@ -9415,15 +9422,12 @@ var GeminiDriver = class {
9415
9422
  // src/drivers/kimi.ts
9416
9423
  import { randomUUID as randomUUID2 } from "crypto";
9417
9424
  import { spawn as spawn7 } from "child_process";
9418
- import { chmodSync, existsSync as existsSync6, readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "fs";
9425
+ import { existsSync as existsSync6, readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "fs";
9419
9426
  import os4 from "os";
9420
9427
  import path9 from "path";
9421
9428
  var KIMI_WIRE_PROTOCOL_VERSION = "1.3";
9422
9429
  var KIMI_SYSTEM_PROMPT_FILE = ".slock-kimi-system.md";
9423
9430
  var KIMI_AGENT_FILE = ".slock-kimi-agent.yaml";
9424
- var KIMI_GENERATED_CONFIG_FILE = ".slock-kimi-config.toml";
9425
- var SLOCK_KIMI_CONFIG_CONTENT_ENV = "SLOCK_KIMI_CONFIG_CONTENT";
9426
- var SLOCK_KIMI_CONFIG_FILE_ENV = "SLOCK_KIMI_CONFIG_FILE";
9427
9431
  function parseToolArguments(raw) {
9428
9432
  if (typeof raw !== "string") return raw;
9429
9433
  try {
@@ -9432,73 +9436,6 @@ function parseToolArguments(raw) {
9432
9436
  return raw;
9433
9437
  }
9434
9438
  }
9435
- function readKimiConfigSource(home = os4.homedir(), env = process.env) {
9436
- const inlineConfig = env[SLOCK_KIMI_CONFIG_CONTENT_ENV];
9437
- if (inlineConfig && inlineConfig.trim()) {
9438
- return {
9439
- raw: inlineConfig,
9440
- explicitPath: null,
9441
- sourcePath: SLOCK_KIMI_CONFIG_CONTENT_ENV
9442
- };
9443
- }
9444
- const explicitPath = env[SLOCK_KIMI_CONFIG_FILE_ENV];
9445
- const configPath = explicitPath && explicitPath.trim() ? explicitPath : path9.join(home, ".kimi", "config.toml");
9446
- try {
9447
- return {
9448
- raw: readFileSync3(configPath, "utf8"),
9449
- explicitPath: explicitPath && explicitPath.trim() ? explicitPath : null,
9450
- sourcePath: configPath
9451
- };
9452
- } catch {
9453
- return {
9454
- raw: null,
9455
- explicitPath: explicitPath && explicitPath.trim() ? explicitPath : null,
9456
- sourcePath: configPath
9457
- };
9458
- }
9459
- }
9460
- function buildKimiSpawnEnv(env = process.env) {
9461
- const spawnEnv = { ...env, FORCE_COLOR: "0", NO_COLOR: "1" };
9462
- delete spawnEnv[SLOCK_KIMI_CONFIG_CONTENT_ENV];
9463
- delete spawnEnv[SLOCK_KIMI_CONFIG_FILE_ENV];
9464
- return scrubDaemonChildEnv(spawnEnv);
9465
- }
9466
- function buildKimiEffectiveEnv(ctx, overrideEnv) {
9467
- return {
9468
- ...process.env,
9469
- ...ctx.config.envVars || {},
9470
- ...overrideEnv || {}
9471
- };
9472
- }
9473
- function buildKimiLaunchOptions(ctx, opts = {}) {
9474
- const env = buildKimiEffectiveEnv(ctx, opts.env);
9475
- const source = readKimiConfigSource(opts.home ?? os4.homedir(), env);
9476
- const args = [];
9477
- let configFilePath = null;
9478
- let configContent = null;
9479
- if (source.explicitPath) {
9480
- configFilePath = source.explicitPath;
9481
- } else if (source.raw !== null && source.sourcePath === SLOCK_KIMI_CONFIG_CONTENT_ENV) {
9482
- configFilePath = path9.join(ctx.workingDirectory, KIMI_GENERATED_CONFIG_FILE);
9483
- configContent = source.raw;
9484
- if (opts.writeGeneratedConfig !== false) {
9485
- writeFileSync3(configFilePath, source.raw, { encoding: "utf8", mode: 384 });
9486
- chmodSync(configFilePath, 384);
9487
- }
9488
- }
9489
- if (configFilePath) {
9490
- args.push("--config-file", configFilePath);
9491
- }
9492
- if (ctx.config.model && ctx.config.model !== "default") {
9493
- args.push("--model", ctx.config.model);
9494
- }
9495
- return {
9496
- args,
9497
- env: buildKimiSpawnEnv(env),
9498
- configFilePath,
9499
- configContent
9500
- };
9501
- }
9502
9439
  function resolveKimiSpawn(commandArgs, deps = {}) {
9503
9440
  return {
9504
9441
  command: resolveCommandOnPath("kimi", deps) ?? "kimi",
@@ -9522,25 +9459,7 @@ var KimiDriver = class {
9522
9459
  };
9523
9460
  model = {
9524
9461
  detectedModelsVerifiedAs: "launchable",
9525
- toLaunchSpec: (modelId, ctx, opts) => {
9526
- if (!ctx) return { args: ["--model", modelId] };
9527
- const launchCtx = {
9528
- ...ctx,
9529
- config: {
9530
- ...ctx.config,
9531
- model: modelId
9532
- }
9533
- };
9534
- const launch = buildKimiLaunchOptions(launchCtx, {
9535
- home: opts?.home,
9536
- writeGeneratedConfig: false
9537
- });
9538
- return {
9539
- args: launch.args,
9540
- env: launch.env,
9541
- configFiles: launch.configFilePath ? [launch.configFilePath] : void 0
9542
- };
9543
- }
9462
+ toLaunchSpec: (modelId) => ({ args: ["--model", modelId] })
9544
9463
  };
9545
9464
  supportsStdinNotification = true;
9546
9465
  busyDeliveryMode = "direct";
@@ -9564,23 +9483,21 @@ var KimiDriver = class {
9564
9483
  ` system_prompt_path: ./${KIMI_SYSTEM_PROMPT_FILE}`,
9565
9484
  ""
9566
9485
  ].join("\n"), "utf8");
9567
- const launch = buildKimiLaunchOptions(ctx);
9568
9486
  const args = [
9569
9487
  "--wire",
9570
9488
  "--yolo",
9571
9489
  "--agent-file",
9572
9490
  agentFilePath,
9573
9491
  "--session",
9574
- this.sessionId,
9575
- ...launch.args
9492
+ this.sessionId
9576
9493
  ];
9577
9494
  const launchRuntimeFields = runtimeConfigToLaunchFields(hydrateRuntimeConfig(ctx.config));
9578
9495
  if (launchRuntimeFields.model && launchRuntimeFields.model !== "default") {
9579
9496
  args.push("--model", launchRuntimeFields.model);
9580
9497
  }
9581
9498
  const spawnEnv = (await prepareCliTransport(ctx, { NO_COLOR: "1" })).spawnEnv;
9582
- const spawnTarget = resolveKimiSpawn(args);
9583
- const proc = spawn7(spawnTarget.command, spawnTarget.args, {
9499
+ const launch = resolveKimiSpawn(args);
9500
+ const proc = spawn7(launch.command, launch.args, {
9584
9501
  cwd: ctx.workingDirectory,
9585
9502
  stdio: ["pipe", "pipe", "pipe"],
9586
9503
  env: spawnEnv,
@@ -9588,7 +9505,7 @@ var KimiDriver = class {
9588
9505
  // and has an 8191-character command-line limit. Kimi's official
9589
9506
  // installer/uv entrypoint is an executable, so launch it directly and
9590
9507
  // keep prompts on stdin / files instead of routing through cmd.exe.
9591
- shell: spawnTarget.shell
9508
+ shell: launch.shell
9592
9509
  });
9593
9510
  proc.stdin?.write(JSON.stringify({
9594
9511
  jsonrpc: "2.0",
@@ -9701,9 +9618,14 @@ var KimiDriver = class {
9701
9618
  return detectKimiModels();
9702
9619
  }
9703
9620
  };
9704
- function detectKimiModels(home = os4.homedir(), opts = {}) {
9705
- const raw = readKimiConfigSource(home, opts.env).raw;
9706
- if (raw === null) return null;
9621
+ function detectKimiModels(home = os4.homedir()) {
9622
+ const configPath = path9.join(home, ".kimi", "config.toml");
9623
+ let raw;
9624
+ try {
9625
+ raw = readFileSync3(configPath, "utf8");
9626
+ } catch {
9627
+ return null;
9628
+ }
9707
9629
  const models = [];
9708
9630
  const sectionRe = /^\s*\[models(?:\.([^\]]+)|"\.[^"]+"|\."[^"]+")\s*\]\s*$/gm;
9709
9631
  const lineRe = /^\s*\[models\.(.+?)\s*\]\s*$/gm;
@@ -10369,7 +10291,7 @@ function runOpenCodeModelsCommand(home, deps = {}) {
10369
10291
  const platform = deps.platform ?? process.platform;
10370
10292
  const spawnSyncFn = deps.spawnSyncFn ?? spawnSync2;
10371
10293
  const result = spawnSyncFn("opencode", ["models"], {
10372
- env: scrubDaemonChildEnv({ ...process.env, HOME: home, FORCE_COLOR: "0", NO_COLOR: "1" }),
10294
+ env: { ...process.env, HOME: home, FORCE_COLOR: "0", NO_COLOR: "1" },
10373
10295
  encoding: "utf8",
10374
10296
  timeout: 5e3,
10375
10297
  shell: platform === "win32"
@@ -13564,7 +13486,9 @@ Do not copy these answers verbatim.
13564
13486
 
13565
13487
  ## FAQ 15: How do I create agents or channels?
13566
13488
  ### Answer idea
13567
- - When the owner agrees to a new agent or channel, **post an action card** with \`raft action prepare\`. The card lives inline in chat; the owner clicks the action button, the matching create dialog opens prefilled with your values (editable), and the resource is created under their identity when they submit.
13489
+ - If you have \`channel:create\` scope and your server role has channel-management authority, create channels directly with \`raft channel create --name <name>\` (add \`--private\` for private channels). This creates the channel under your agent identity and joins you to it.
13490
+ - If you also have the matching channel-management scopes and authority, edit regular channels with \`raft channel update --target "#channel-name" --name "#new-name"\`, add humans or agents with \`raft channel add-member --target "#channel-name" --user @alice\` or \`--agent @scout\`, and remove them with \`raft channel remove-member --target "#channel-name" --user @alice\` or \`--agent @scout\`. Adding members is the direct follow-up for private channels you create under your agent identity.
13491
+ - When a human should review/commit the action, or when creating a new agent, **post an action card** with \`raft action prepare\`. The card lives inline in chat; the owner clicks the action button, the matching create dialog opens prefilled with your values (editable), and the resource is created under their identity when they submit.
13568
13492
  - v1 supports three action types via \`raft action prepare --target '<channel>' <<'SLOCKACTION' { ... } SLOCKACTION\`:
13569
13493
  - \`{type: "channel:create", name, visibility: "public" | "private", description?, initialHumans?: ["@alice"], initialAgents?: ["@scout"], draftHint?}\`
13570
13494
  - \`{type: "agent:create", name, description?, suggestedComputer?, requiredComputer?, draftHint?}\` \u2014 runtime / model / reasoning effort are the owner's call. Use \`requiredComputer\` only when the owner explicitly says the new agent must run on that computer; use \`suggestedComputer\` for a soft preference.
@@ -13574,12 +13498,12 @@ Do not copy these answers verbatim.
13574
13498
  - Manual fallback (only when the owner explicitly wants to do it themselves or asks how to repeat it): the + buttons in the Agents and Channels sidebar sections. Lead with the action card; mention the + button only on request.
13575
13499
 
13576
13500
  ### Next step
13577
- - Prefill the values you have, post the action card with a short \`draftHint\` explaining why these values, and tell the owner: "click the button on the card to review and commit." Then propose the first task to send once the card flips to Done.
13501
+ - For direct channel creation, name the channel, create it, add needed members if requested/appropriate, then post the first useful update there. For human-committed actions, prefill the values you have, post the action card with a short \`draftHint\` explaining why these values, and tell the owner: "click the button on the card to review and commit." Then propose the first task to send once the card flips to Done.
13578
13502
 
13579
13503
  ### Guardrail
13580
- - Do not imply you already created agents or channels unless the card state is \`executed\`.
13504
+ - Do not imply you created or edited a channel unless the corresponding \`raft channel create\` / \`raft channel update\` command succeeded. Do not imply you added or removed a channel member unless the corresponding member command succeeded. Do not imply you created an agent or a human-committed channel unless the card state is \`executed\`.
13581
13505
  - Do not prefill runtime / model / reasoning effort on \`agent:create\`. Computer placement is only allowed as the structured \`suggestedComputer\` / \`requiredComputer\` field when the owner's request includes that placement; never rely on \`draftHint\` for a computer constraint.
13582
- - If the action type the user wants is not yet supported (e.g. \`channel:add_member\`), say so plainly and offer the manual UI path; do not invent action types the schema does not accept.
13506
+ - If the action type or direct CLI command the user wants is not yet supported, say so plainly and offer the manual UI path; do not invent action types the schema does not accept.
13583
13507
  `;
13584
13508
  }
13585
13509
  function buildOnboardingSeedFiles() {
@@ -20555,7 +20479,7 @@ var DAEMON_CORE_TRACE_ATTR_CONTRACTS = {
20555
20479
  spanAttrs: ["agentId", "event_kind", "runtime"]
20556
20480
  }
20557
20481
  };
20558
- var DAEMON_CLI_USAGE = `Usage: slock-daemon --server-url <url> (--api-key <key> or ${DAEMON_API_KEY_ENV}=<key>)`;
20482
+ var DAEMON_CLI_USAGE = "Usage: slock-daemon --server-url <url> --api-key <key>";
20559
20483
  var RunnerCredentialMintError2 = class extends Error {
20560
20484
  code;
20561
20485
  retryable;
@@ -20591,9 +20515,9 @@ function runnerCredentialErrorDetail2(error) {
20591
20515
  async function waitForRunnerCredentialRetry2() {
20592
20516
  await new Promise((resolve) => setTimeout(resolve, RUNNER_CREDENTIAL_MINT_RETRY_DELAY_MS2));
20593
20517
  }
20594
- function parseDaemonCliArgs(args, env = {}) {
20518
+ function parseDaemonCliArgs(args) {
20595
20519
  let serverUrl = "";
20596
- let apiKey = env[DAEMON_API_KEY_ENV] ?? "";
20520
+ let apiKey = "";
20597
20521
  for (let i = 0; i < args.length; i++) {
20598
20522
  if (args[i] === "--server-url" && args[i + 1]) serverUrl = args[++i];
20599
20523
  if (args[i] === "--api-key" && args[i + 1]) apiKey = args[++i];
@@ -20630,7 +20554,7 @@ function resolveSlockCliPathOrEmpty(moduleUrl = import.meta.url) {
20630
20554
  }
20631
20555
  async function runBundledSlockCli(argv) {
20632
20556
  process.argv = [process.execPath, "slock", ...argv];
20633
- await import("./dist-VS57CSRJ.js");
20557
+ await import("./dist-PCKZII47.js");
20634
20558
  }
20635
20559
  function detectRuntimes(tracer = noopTracer) {
20636
20560
  const ids = [];
@@ -21567,8 +21491,6 @@ var DaemonCore = class {
21567
21491
 
21568
21492
  export {
21569
21493
  subscribeDaemonLogs,
21570
- DAEMON_API_KEY_ENV,
21571
- scrubDaemonAuthEnv,
21572
21494
  resolveWorkspaceDirectoryPath,
21573
21495
  scanWorkspaceDirectories,
21574
21496
  deleteWorkspaceDirectory,