claude-use 14.9.0 → 14.10.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/dist/cli.cjs CHANGED
@@ -29962,7 +29962,7 @@ var init_state = __esm({
29962
29962
  init_zod();
29963
29963
  init_schema();
29964
29964
  init_baseUrlDial();
29965
- FRONT_DOOR_PROTOCOL = 11;
29965
+ FRONT_DOOR_PROTOCOL = 12;
29966
29966
  FRONT_DOOR_HANDOVER_PROTOCOL = 6;
29967
29967
  FrontDoorSessionSchema = external_exports.strictObject({ pid: external_exports.number().int().positive(), startedAt: external_exports.number(), token: external_exports.string().min(1), supervisorPid: external_exports.number().int().positive().optional(), sessionId: external_exports.string().min(1).optional(), identity: external_exports.string().min(1).optional(), models: ModelsConfigSchema.optional(), configDir: external_exports.string().min(1).optional(), claudeVersion: external_exports.string().min(1).optional() });
29968
29968
  MAX_CONTEXT_TEXT_LENGTH = 256;
@@ -44482,7 +44482,7 @@ var init_machineLoad = __esm({
44482
44482
  function workerFactSchema(value3) {
44483
44483
  return external_exports.strictObject({ value: value3, observedAt: external_exports.number() });
44484
44484
  }
44485
- var RcPermissionModeSchema, RcSessionSummarySchema, RcQuestionOptionSchema, RcPendingQuestionSchema, RcPendingRequestSummarySchema, RcSessionStatusSchema, RcStreamEnvelopeSchema, RcStreamEventSchema, RcRateLimitWindowSchema, RcRateLimitInfoSchema, RcLiveRateLimitSchema, RcSessionQuerySchema, RcSendInputSchema, RcQuestionSelectionSchema, RcQuestionChoicesSchema, RcAnswerInputSchema, RcInterruptInputSchema, RcSetModelInputSchema, RcSetPermissionModeInputSchema, RcEndSessionInputSchema, RcGetUsageInputSchema, RcGetContextUsageInputSchema, RcReadFileInputSchema, RcFileSuggestionsInputSchema, RcKeepAliveInputSchema, RcMcpStatusInputSchema, RcMcpReconnectInputSchema, RcMcpAuthenticateInputSchema, RcMcpOAuthCallbackUrlInputSchema, RcTeleportInputSchema, RcListOutputSchema, RcSessionRouteSchema, RcStatusOutputSchema, RcPendingOutputSchema, RcWriteOutputSchema, RcControlWriteOutputSchema, RcAnswerOutputSchema;
44485
+ var RcPermissionModeSchema, RcSessionSummarySchema, RcQuestionOptionSchema, RcPendingQuestionSchema, RcPendingRequestSummarySchema, RcSessionStatusSchema, RcStreamEnvelopeSchema, RcStreamEventSchema, RcRateLimitWindowSchema, RcRateLimitInfoSchema, RcLiveRateLimitSchema, RcSessionQuerySchema, RcSendInputSchema, RcQuestionSelectionSchema, RcQuestionChoicesSchema, RcAnswerInputSchema, RcInterruptInputSchema, RcSetModelInputSchema, RcSetPermissionModeInputSchema, RcEndSessionInputSchema, RcGetUsageInputSchema, RcGetContextUsageInputSchema, RcReadFileInputSchema, RcFileSuggestionsInputSchema, RcKeepAliveInputSchema, RcMcpStatusInputSchema, RcMcpReconnectInputSchema, RcMcpAuthenticateInputSchema, RcMcpOAuthCallbackUrlInputSchema, RcTeleportInputSchema, RcListOutputSchema, RcSessionCommandRouteSchema, RcVersionGateWarningsSchema, RcSessionRouteSchema, RcStatusOutputSchema, RcPendingOutputSchema, RcWriteOutputSchema, RcControlWriteOutputSchema, RcAnswerOutputSchema;
44486
44486
  var init_rcSchemas = __esm({
44487
44487
  "src/frontdoor/rcSchemas.ts"() {
44488
44488
  "use strict";
@@ -44652,7 +44652,9 @@ var init_rcSchemas = __esm({
44652
44652
  marker: external_exports.string().min(1)
44653
44653
  });
44654
44654
  RcListOutputSchema = external_exports.strictObject({ sessions: external_exports.readonly(external_exports.array(RcSessionSummarySchema)) });
44655
- RcSessionRouteSchema = external_exports.union([external_exports.strictObject({ route: external_exports.enum(["supervised", "launched", "self-hosted"]) }), external_exports.strictObject({ route: external_exports.null(), refused: external_exports.string() })]);
44655
+ RcSessionCommandRouteSchema = external_exports.enum(["supervised", "launched", "self-hosted"]);
44656
+ RcVersionGateWarningsSchema = external_exports.readonly(external_exports.array(external_exports.string()).min(1)).optional();
44657
+ RcSessionRouteSchema = external_exports.union([external_exports.strictObject({ route: RcSessionCommandRouteSchema, warnings: RcVersionGateWarningsSchema }), external_exports.strictObject({ route: external_exports.null(), refused: external_exports.string() })]);
44656
44658
  RcStatusOutputSchema = external_exports.strictObject({ statuses: external_exports.readonly(external_exports.array(external_exports.strictObject({ ...RcSessionStatusSchema.shape, route: RcSessionRouteSchema }))) });
44657
44659
  RcPendingOutputSchema = external_exports.strictObject({
44658
44660
  pending: external_exports.readonly(external_exports.array(RcPendingRequestSummarySchema)),
@@ -48773,6 +48775,48 @@ var init_targets = __esm({
48773
48775
  }
48774
48776
  });
48775
48777
 
48778
+ // src/supervise/verifiedVersions.ts
48779
+ function parseReleaseVersion(version2) {
48780
+ const match = RELEASE_VERSION.exec(version2);
48781
+ return match === null ? void 0 : { major: Number(match[1]), minor: Number(match[2]), patch: Number(match[3]) };
48782
+ }
48783
+ function minorOf(version2) {
48784
+ return `${String(version2.major)}.${String(version2.minor)}`;
48785
+ }
48786
+ function verifiedMinors() {
48787
+ return [...new Set(RC_SESSION_COMMAND_VERIFIED_VERSIONS.map((listed) => {
48788
+ const parsed = parseReleaseVersion(listed);
48789
+ if (parsed === void 0) {
48790
+ throw new Error(`RC_SESSION_COMMAND_VERIFIED_VERSIONS lists ${listed}, which is not a plain release version`);
48791
+ }
48792
+ return minorOf(parsed);
48793
+ }))];
48794
+ }
48795
+ function claudeCodeVersionGate(version2) {
48796
+ if (version2 === void 0) {
48797
+ return { kind: "refused" };
48798
+ }
48799
+ if (RC_SESSION_COMMAND_VERIFIED_VERSIONS.includes(version2)) {
48800
+ return { kind: "verified" };
48801
+ }
48802
+ const parsed = parseReleaseVersion(version2);
48803
+ if (parsed === void 0 || !verifiedMinors().includes(minorOf(parsed))) {
48804
+ return { kind: "refused" };
48805
+ }
48806
+ return { kind: "unverified-patch", warning: `Claude Code ${version2} has not been verified for goal, compaction and turn control (verified: ${RC_SESSION_COMMAND_VERIFIED_VERSIONS.join(", ")}); it is a patch release of verified minor ${minorOf(parsed)}, so the control plugin and the verbs run on it unchecked` };
48807
+ }
48808
+ function claudeCodeVersionsGated() {
48809
+ return `Claude Code ${RC_SESSION_COMMAND_VERIFIED_VERSIONS.join(", ")}, or another patch release of ${verifiedMinors().join(" or ")} with a warning that it is unverified`;
48810
+ }
48811
+ var RC_SESSION_COMMAND_VERIFIED_VERSIONS, RELEASE_VERSION;
48812
+ var init_verifiedVersions = __esm({
48813
+ "src/supervise/verifiedVersions.ts"() {
48814
+ "use strict";
48815
+ RC_SESSION_COMMAND_VERIFIED_VERSIONS = ["2.1.319", "2.1.325"];
48816
+ RELEASE_VERSION = /^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$/u;
48817
+ }
48818
+ });
48819
+
48776
48820
  // node_modules/.pnpm/undici@7.30.1/node_modules/undici/lib/core/symbols.js
48777
48821
  var require_symbols = __commonJS({
48778
48822
  "node_modules/.pnpm/undici@7.30.1/node_modules/undici/lib/core/symbols.js"(exports2, module2) {
@@ -75621,7 +75665,7 @@ var init_package = __esm({
75621
75665
  "package.json"() {
75622
75666
  package_default = {
75623
75667
  name: "claude-use",
75624
- version: "14.9.0",
75668
+ version: "14.10.0",
75625
75669
  description: "A profile manager and launcher for Claude Code that lets one person run multiple logins from one machine while controlling what gets shared between them.",
75626
75670
  license: "MIT",
75627
75671
  author: "Joseph Mearman <joseph@mearman.co.uk>",
@@ -77188,15 +77232,6 @@ var init_sessionControlPlugin = __esm({
77188
77232
  }
77189
77233
  });
77190
77234
 
77191
- // src/supervise/verifiedVersions.ts
77192
- var RC_SESSION_COMMAND_VERIFIED_VERSIONS;
77193
- var init_verifiedVersions = __esm({
77194
- "src/supervise/verifiedVersions.ts"() {
77195
- "use strict";
77196
- RC_SESSION_COMMAND_VERIFIED_VERSIONS = ["2.1.319", "2.1.325"];
77197
- }
77198
- });
77199
-
77200
77235
  // src/supervise/launchControl.ts
77201
77236
  function readRecord2(fs37, directory, name) {
77202
77237
  if (!name.endsWith(RECORD_SUFFIX3)) {
@@ -77228,17 +77263,26 @@ function registerLaunchControl(fs37, directory, control, isRunning) {
77228
77263
  fs37.removeRecursive(file2);
77229
77264
  };
77230
77265
  }
77231
- function launchLoadsControlPlugin(candidate) {
77266
+ function launchControlPluginGate(candidate) {
77232
77267
  const end = candidate.args.indexOf("--");
77233
77268
  const options = end === -1 ? candidate.args : candidate.args.slice(0, end);
77234
- return !candidate.supervised && candidate.startsSession && !options.includes("--bare") && candidate.version !== void 0 && RC_SESSION_COMMAND_VERIFIED_VERSIONS.includes(candidate.version);
77269
+ if (candidate.supervised || !candidate.startsSession || options.includes("--bare")) {
77270
+ return void 0;
77271
+ }
77272
+ const gate = claudeCodeVersionGate(candidate.version);
77273
+ return gate.kind === "refused" ? void 0 : gate;
77235
77274
  }
77236
77275
  function stageControlPluginFor(candidate, stage, warn) {
77237
- if (stage === void 0 || !launchLoadsControlPlugin(candidate)) {
77276
+ const gate = launchControlPluginGate(candidate);
77277
+ if (stage === void 0 || gate === void 0) {
77238
77278
  return void 0;
77239
77279
  }
77240
77280
  try {
77241
- return stage();
77281
+ const staged = stage();
77282
+ if (gate.kind === "unverified-patch") {
77283
+ warn(`agent-shim: ${gate.warning}`);
77284
+ }
77285
+ return staged;
77242
77286
  } catch (error63) {
77243
77287
  warn(`agent-shim: the in-process control plugin could not be staged, so this session starts without it and the front door cannot reach it for goal, compaction and turn control: ${error63 instanceof Error ? error63.message : String(error63)}`);
77244
77288
  return void 0;
@@ -128874,6 +128918,7 @@ function jobWindowReadFindings(jobs, pools, windowsOf2) {
128874
128918
 
128875
128919
  // src/doctorReport.ts
128876
128920
  init_extends();
128921
+ init_verifiedVersions();
128877
128922
  var DOCTOR_SEVERITIES = ["pass", "warn", "fail"];
128878
128923
  var DOCTOR_SECTIONS = [
128879
128924
  "ambient-credential",
@@ -129090,6 +129135,10 @@ function runDoctor(params) {
129090
129135
  const { binary } = params.binaryDiscovery;
129091
129136
  const versionNote = binary.version === void 0 ? "" : `, version ${binary.version}`;
129092
129137
  push("binary-discovery", "pass", `Found ${binary.path} (${binary.source}${versionNote}).`);
129138
+ const gate = claudeCodeVersionGate(binary.version);
129139
+ if (gate.kind === "unverified-patch") {
129140
+ push("binary-discovery", "warn", `${gate.warning}.`);
129141
+ }
129093
129142
  } else {
129094
129143
  push("binary-discovery", "fail", params.binaryDiscovery.message);
129095
129144
  }
@@ -144712,6 +144761,7 @@ init_rcSchemas();
144712
144761
 
144713
144762
  // src/frontdoor/rcSlashCommandSchemas.ts
144714
144763
  init_zod();
144764
+ init_rcSchemas();
144715
144765
 
144716
144766
  // src/frontdoor/rcSessionCommands.ts
144717
144767
  var import_promises21 = require("node:timers/promises");
@@ -144998,15 +145048,18 @@ var MAX_JSON_BYTES_PER_CODE_UNIT = 6;
144998
145048
  var RC_COMPACT_INSTRUCTIONS_MAX_CHARS = Math.floor(CONTROL_BODY_CAP_BYTES / MAX_JSON_BYTES_PER_CODE_UNIT);
144999
145049
  var RC_TURN_TEXT_MAX_CHARS = Math.floor(CONTROL_BODY_CAP_BYTES / MAX_JSON_BYTES_PER_CODE_UNIT);
145000
145050
  var RC_SESSION_COMMAND_MAX_WAIT_MS = 2147483647;
145001
- function unverifiedVersionMessage(sessionId, version2, source) {
145002
- const verified = RC_SESSION_COMMAND_VERIFIED_VERSIONS.join(", ");
145003
- return version2 === void 0 ? `session ${sessionId} has not reported its Claude Code version (${source}), and goal, compaction and turn control is verified only on Claude Code ${verified}` : `session ${sessionId} runs Claude Code ${version2}, and goal, compaction and turn control is verified only on Claude Code ${verified}: the door will not act on a version whose behaviour it has not verified`;
145051
+ function refusedVersionMessage(sessionId, version2, source) {
145052
+ const gated = claudeCodeVersionsGated();
145053
+ return version2 === void 0 ? `session ${sessionId} has not reported its Claude Code version (${source}), and goal, compaction and turn control runs only on ${gated}` : `session ${sessionId} runs Claude Code ${version2}, and goal, compaction and turn control runs only on ${gated}: the door will not act on a version of a minor it has not verified. Start the session on one of those versions`;
145054
+ }
145055
+ function warningsOf(gate) {
145056
+ return gate.kind === "unverified-patch" ? [gate.warning] : [];
145004
145057
  }
145005
145058
  function noPluginReason(sessionId) {
145006
- return `no agent-shim launch's in-process control plugin records session ${sessionId}: it was started outside the launcher (with claude's own command, or agent-shim run --native), with --bare, on a Claude Code version the plugin is not verified on, or its plugin has not yet recorded its transcript, which it does from the session's first hook event`;
145059
+ return `no agent-shim launch's in-process control plugin records session ${sessionId}: it was started outside the launcher (with claude's own command, or agent-shim run --native), with --bare, on a Claude Code version the gate refuses, or its plugin has not yet recorded its transcript, which it does from the session's first hook event`;
145007
145060
  }
145008
145061
  function unsupportedMessage(sessionId) {
145009
- return `${noPluginReason(sessionId)}, so the door has no in-process channel into it, and it is not on the door's own self-hosted surface. Over the real Remote Control service, Claude Code ${RC_SESSION_COMMAND_VERIFIED_VERSIONS.join(", ")} takes a message as a person's (running it when it is a slash command) only when a person's app wrote it and treats any other writer as a peer, whose message the model reads as another session's, and the door does not claim to be a person's app on a service it does not run. Start the session through agent-shim run on Claude Code ${RC_SESSION_COMMAND_VERIFIED_VERSIONS.join(", ")} without --bare, or run it against the door's self-hosted surface.`;
145062
+ return `${noPluginReason(sessionId)}, so the door has no in-process channel into it, and it is not on the door's own self-hosted surface. Over the real Remote Control service, Claude Code takes a message as a person's (running it when it is a slash command) only when a person's app wrote it and treats any other writer as a peer, whose message the model reads as another session's, and the door does not claim to be a person's app on a service it does not run. Start the session through agent-shim run on ${claudeCodeVersionsGated()} without --bare, or run it against the door's self-hosted surface.`;
145010
145063
  }
145011
145064
  function createRcSessionCommands(deps) {
145012
145065
  const queues = /* @__PURE__ */ new Map();
@@ -145031,10 +145084,11 @@ function createRcSessionCommands(deps) {
145031
145084
  if ("refused" in target) {
145032
145085
  return { kind: "refused", message: target.refused, refusal: "session-state" };
145033
145086
  }
145034
- if (target.version === void 0 || !RC_SESSION_COMMAND_VERIFIED_VERSIONS.includes(target.version)) {
145035
- return { kind: "refused", message: unverifiedVersionMessage(sessionId, target.version, route === "supervised" ? "its supervisor's control plugin has not loaded" : "its launch's control plugin has not loaded"), refusal: "session-state" };
145087
+ const gate = claudeCodeVersionGate(target.version);
145088
+ if (gate.kind === "refused") {
145089
+ return { kind: "refused", message: refusedVersionMessage(sessionId, target.version, route === "supervised" ? "its supervisor's control plugin has not loaded" : "its launch's control plugin has not loaded"), refusal: "session-state" };
145036
145090
  }
145037
- return { kind: route, target };
145091
+ return { kind: route, target, warnings: warningsOf(gate) };
145038
145092
  };
145039
145093
  const resolveRoute = async (sessionId) => {
145040
145094
  const supervised = await pluginRoute(sessionId, "supervised", deps.supervisedOf);
@@ -145056,10 +145110,11 @@ function createRcSessionCommands(deps) {
145056
145110
  return { kind: "refused", message: `${noPluginReason(sessionId)}, and the door's self-hosted surface cannot take a command: ${unavailable}`, refusal: "session-state" };
145057
145111
  }
145058
145112
  const version2 = deps.selfHost.versionOf(sessionId);
145059
- if (version2 === void 0 || !RC_SESSION_COMMAND_VERIFIED_VERSIONS.includes(version2)) {
145060
- return { kind: "refused", message: unverifiedVersionMessage(sessionId, version2, "its launch recorded none and no system/init from its worker has been observed on its stream; send it a prompt so it reports one"), refusal: "session-state" };
145113
+ const gate = claudeCodeVersionGate(version2);
145114
+ if (gate.kind === "refused") {
145115
+ return { kind: "refused", message: refusedVersionMessage(sessionId, version2, "its launch recorded none and no system/init from its worker has been observed on its stream; send it a prompt so it reports one"), refusal: "session-state" };
145061
145116
  }
145062
- return { kind: "self-hosted", selfHost: deps.selfHost };
145117
+ return { kind: "self-hosted", selfHost: deps.selfHost, warnings: warningsOf(gate) };
145063
145118
  };
145064
145119
  const onRoute = async (sessionId, options, actions) => await serialised(sessionId, async () => {
145065
145120
  const { signal } = options;
@@ -145070,12 +145125,13 @@ function createRcSessionCommands(deps) {
145070
145125
  if (resolved.kind === "refused") {
145071
145126
  return { ok: false, message: resolved.message, refusal: resolved.refusal };
145072
145127
  }
145128
+ const warned2 = (result2) => result2.ok && resolved.warnings.length > 0 ? { ok: true, report: { ...result2.report, warnings: resolved.warnings } } : result2;
145073
145129
  if (resolved.kind !== "self-hosted") {
145074
145130
  const waitMs2 = options.waitMs ?? COMPACT_TIMEOUT_MS;
145075
145131
  const timeout2 = AbortSignal.timeout(waitMs2);
145076
145132
  const bounded3 = signal === void 0 ? timeout2 : AbortSignal.any([signal, timeout2]);
145077
145133
  try {
145078
- return await actions.plugin(resolved.target, resolved.kind, bounded3, waitMs2);
145134
+ return warned2(await actions.plugin(resolved.target, resolved.kind, bounded3, waitMs2));
145079
145135
  } catch (error63) {
145080
145136
  if (timeout2.aborted) {
145081
145137
  return { ok: false, message: `session ${sessionId}'s control plugin did not answer within ${String(waitMs2)} ms. A request the plugin had not started is withdrawn; one it had started runs once the session is idle (a turn waiting on a permission prompt holds it), so read the session's goal or transcript before asking again` };
@@ -145089,7 +145145,7 @@ function createRcSessionCommands(deps) {
145089
145145
  if (!result.ok && timeout.aborted) {
145090
145146
  return { ok: false, message: `session ${sessionId}'s worker did not answer within ${String(waitMs)} ms in all; it may still be queued behind a running turn, so read the session's stream before asking again` };
145091
145147
  }
145092
- return result;
145148
+ return warned2(result);
145093
145149
  });
145094
145150
  const transcriptGoal = async (sessionId, target) => {
145095
145151
  const goal = target.transcriptPath === void 0 ? void 0 : await deps.goalOf(target.transcriptPath);
@@ -145116,7 +145172,10 @@ function createRcSessionCommands(deps) {
145116
145172
  /** Which route the verbs would take for the session now, or the refusal naming why none would; reads only, outside the session's queue, so a verb waiting on the session never delays it. */
145117
145173
  routeOf: async (sessionId) => {
145118
145174
  const resolved = await resolveRoute(sessionId);
145119
- return resolved.kind === "refused" ? { route: null, refused: resolved.message } : { route: resolved.kind };
145175
+ if (resolved.kind === "refused") {
145176
+ return { route: null, refused: resolved.message };
145177
+ }
145178
+ return resolved.warnings.length === 0 ? { route: resolved.kind } : { route: resolved.kind, warnings: resolved.warnings };
145120
145179
  },
145121
145180
  /**
145122
145181
  * Puts `text` into the session as a person's typed turn, and resolves once the session recorded it as a user entry from the person, never as a peer's message: on the supervised route a transcript row the control plugin submitted as the person's words (`origin: { kind: "plugin", asUser: true }`), on the self-hosted route the worker's mirrored entry with a person's origin (`{ kind: "human" }`). The text reaches the session's model as its user's words (`docs/rc-slash-commands.md`, the trust boundary). Refused unsent: text that is empty, starts with `/` (a slash command, which the goal and compaction verbs run), or is longer than one request carries. Resolves when the turn entered the session, not when the model has answered it.
@@ -145282,7 +145341,8 @@ var RcTurnInputSchema = external_exports.strictObject({
145282
145341
  });
145283
145342
  var commandAnswerShape = {
145284
145343
  session: external_exports.string(),
145285
- route: external_exports.enum(["supervised", "launched", "self-hosted"])
145344
+ route: RcSessionCommandRouteSchema,
145345
+ warnings: RcVersionGateWarningsSchema
145286
145346
  };
145287
145347
  var RcGoalGetOutputSchema = external_exports.strictObject({
145288
145348
  ...commandAnswerShape,
@@ -151655,6 +151715,9 @@ function formatRcSessionStatus(statuses) {
151655
151715
  ].join(", ");
151656
151716
  lines.push(` worker: ${worker}`);
151657
151717
  lines.push(status.route.route === null ? ` goal, compaction and turn verbs: refused: ${status.route.refused}` : ` goal, compaction and turn verbs: ${status.route.route} route`);
151718
+ if (status.route.route !== null) {
151719
+ lines.push(...(status.route.warnings ?? []).map((warning) => ` warning: ${warning}`));
151720
+ }
151658
151721
  if (status.pending.length === 0) {
151659
151722
  lines.push(" pending: none");
151660
151723
  } else {
@@ -151987,15 +152050,21 @@ function registerRcCommand(frontdoor, paths) {
151987
152050
  return { waitMs: Number(waitMs) };
151988
152051
  };
151989
152052
  const waitOption = `How long to wait for the session's answer, in milliseconds (default ${String(COMPACT_TIMEOUT_MS)}, at most ${String(RC_SESSION_COMMAND_MAX_WAIT_MS)}).`;
151990
- const versions = RC_SESSION_COMMAND_VERIFIED_VERSIONS.join(", ");
152053
+ const versions = claudeCodeVersionsGated();
152054
+ const warnOf = (answer) => {
152055
+ for (const warning of answer.warnings ?? []) {
152056
+ console.warn(`warning: ${warning}`);
152057
+ }
152058
+ };
151991
152059
  const routes = "A session agent-shim launched, under a supervisor (route supervised) or not (route launched), is reached through its in-process control plugin, and one on the door's own self-hosted surface through that surface; any other session is refused with the reason.";
151992
152060
  const goal = withExamples(
151993
- rc2.command("goal").description(`Read, set or clear one Remote Control session's /goal. ${routes} Verified on Claude Code ${versions}; a session on any other version is refused.`),
152061
+ rc2.command("goal").description(`Read, set or clear one Remote Control session's /goal. ${routes} Runs on ${versions}; a session on any other version is refused.`),
151994
152062
  ["agent-shim frontdoor rc goal get --session cse_00000000-0000-4000-8000-000000000000"]
151995
152063
  );
151996
152064
  withExamples(
151997
152065
  goal.command("get").description("Print the active goal's condition, how many turns the goal check has evaluated it on and its last reason, or that there is none.").requiredOption("--session <id>", "The cse_ session id, as `frontdoor rc list` shows it.").option("--wait-ms <ms>", waitOption).option("--json", "Print the answer as JSON.").action(async (options) => {
151998
152066
  const answer = await frontDoorRcApiFromState(realFarmFs, paths).rc.goalGet({ session: options.session, ...waitMsOf(options.waitMs) });
152067
+ warnOf(answer);
151999
152068
  if (options.json === true) {
152000
152069
  printJson(answer);
152001
152070
  return;
@@ -152008,6 +152077,7 @@ last check: ${answer.goal.lastCheck}`}`);
152008
152077
  withExamples(
152009
152078
  goal.command("set").description("Set the goal, so the session's goal check keeps it working until the condition holds; the condition reaches the session's model as a directive. Prints the condition set and the one it replaced.").requiredOption("--session <id>", "The cse_ session id, as `frontdoor rc list` shows it.").requiredOption("--condition <text>", `The goal's condition; not one of the words /goal reads as a clear (${RC_GOAL_CLEAR_WORDS.join(", ")}).`).option("--wait-ms <ms>", waitOption).option("--json", "Print the answer as JSON.").action(async (options) => {
152010
152079
  const answer = await frontDoorRcApiFromState(realFarmFs, paths).rc.goalSet({ session: options.session, condition: options.condition, ...waitMsOf(options.waitMs) });
152080
+ warnOf(answer);
152011
152081
  if (options.json === true) {
152012
152082
  printJson(answer);
152013
152083
  return;
@@ -152019,6 +152089,7 @@ last check: ${answer.goal.lastCheck}`}`);
152019
152089
  withExamples(
152020
152090
  goal.command("clear").description("Clear the goal and print the condition it cleared, or that there was none.").requiredOption("--session <id>", "The cse_ session id, as `frontdoor rc list` shows it.").option("--wait-ms <ms>", waitOption).option("--json", "Print the answer as JSON.").action(async (options) => {
152021
152091
  const answer = await frontDoorRcApiFromState(realFarmFs, paths).rc.goalClear({ session: options.session, ...waitMsOf(options.waitMs) });
152092
+ warnOf(answer);
152022
152093
  if (options.json === true) {
152023
152094
  printJson(answer);
152024
152095
  return;
@@ -152028,9 +152099,10 @@ last check: ${answer.goal.lastCheck}`}`);
152028
152099
  ["agent-shim frontdoor rc goal clear --session cse_00000000-0000-4000-8000-000000000000"]
152029
152100
  );
152030
152101
  withExamples(
152031
- rc2.command("compact").description(`Compact one Remote Control session's conversation and wait for the outcome: the token counts before and after, or the session's reason for not compacting. ${routes} Verified on Claude Code ${versions}; a session on any other version is refused.`).requiredOption("--session <id>", "The cse_ session id, as `frontdoor rc list` shows it.").option("--instructions <text>", "Custom summarisation instructions, a directive to the session's model.").option("--wait-ms <ms>", waitOption).option("--json", "Print the answer as JSON.").action(async (options) => {
152102
+ rc2.command("compact").description(`Compact one Remote Control session's conversation and wait for the outcome: the token counts before and after, or the session's reason for not compacting. ${routes} Runs on ${versions}; a session on any other version is refused.`).requiredOption("--session <id>", "The cse_ session id, as `frontdoor rc list` shows it.").option("--instructions <text>", "Custom summarisation instructions, a directive to the session's model.").option("--wait-ms <ms>", waitOption).option("--json", "Print the answer as JSON.").action(async (options) => {
152032
152103
  const api = frontDoorRcApiFromState(realFarmFs, paths);
152033
152104
  const answer = options.instructions === void 0 ? await api.rc.compact({ session: options.session, ...waitMsOf(options.waitMs) }) : await api.rc.compactWithInstructions({ session: options.session, instructions: options.instructions, ...waitMsOf(options.waitMs) });
152105
+ warnOf(answer);
152034
152106
  if (options.json === true) {
152035
152107
  printJson(answer);
152036
152108
  return;
@@ -152041,8 +152113,9 @@ last check: ${answer.goal.lastCheck}`}`);
152041
152113
  ['agent-shim frontdoor rc compact --session cse_00000000-0000-4000-8000-000000000000 --instructions "keep the open decisions"']
152042
152114
  );
152043
152115
  withExamples(
152044
- rc2.command("turn").description(`Put a person's typed turn into one Remote Control session, which its model reads as its user's words, and wait until the session records it as a user entry from the person (never as another session's message); prints the entry's uuid and the route. ${routes} Unlike \`send\`, it never delivers the text as a peer's message: a session no route reaches is refused with the reason. Verified on Claude Code ${versions}; a session on any other version is refused.`).requiredOption("--session <id>", "The cse_ session id, as `frontdoor rc list` shows it.").requiredOption("--text <text>", "The text as the person typed it; not starting with / (the goal and compaction verbs run those commands).").option("--wait-ms <ms>", waitOption).option("--json", "Print the answer as JSON.").action(async (options) => {
152116
+ rc2.command("turn").description(`Put a person's typed turn into one Remote Control session, which its model reads as its user's words, and wait until the session records it as a user entry from the person (never as another session's message); prints the entry's uuid and the route. ${routes} Unlike \`send\`, it never delivers the text as a peer's message: a session no route reaches is refused with the reason. Runs on ${versions}; a session on any other version is refused.`).requiredOption("--session <id>", "The cse_ session id, as `frontdoor rc list` shows it.").requiredOption("--text <text>", "The text as the person typed it; not starting with / (the goal and compaction verbs run those commands).").option("--wait-ms <ms>", waitOption).option("--json", "Print the answer as JSON.").action(async (options) => {
152045
152117
  const answer = await frontDoorRcApiFromState(realFarmFs, paths).rc.turn({ session: options.session, text: options.text, ...waitMsOf(options.waitMs) });
152118
+ warnOf(answer);
152046
152119
  if (options.json === true) {
152047
152120
  printJson(answer);
152048
152121
  return;
package/dist/index.cjs CHANGED
@@ -5574,7 +5574,7 @@ var init_state = __esm({
5574
5574
  import_zod9 = require("zod");
5575
5575
  init_schema();
5576
5576
  init_baseUrlDial();
5577
- FRONT_DOOR_PROTOCOL = 11;
5577
+ FRONT_DOOR_PROTOCOL = 12;
5578
5578
  FRONT_DOOR_HANDOVER_PROTOCOL = 6;
5579
5579
  FrontDoorSessionSchema = import_zod9.z.strictObject({ pid: import_zod9.z.number().int().positive(), startedAt: import_zod9.z.number(), token: import_zod9.z.string().min(1), supervisorPid: import_zod9.z.number().int().positive().optional(), sessionId: import_zod9.z.string().min(1).optional(), identity: import_zod9.z.string().min(1).optional(), models: ModelsConfigSchema.optional(), configDir: import_zod9.z.string().min(1).optional(), claudeVersion: import_zod9.z.string().min(1).optional() });
5580
5580
  MAX_CONTEXT_TEXT_LENGTH = 256;
@@ -7822,7 +7822,7 @@ var init_machineLoad = __esm({
7822
7822
  function workerFactSchema(value) {
7823
7823
  return import_zod12.z.strictObject({ value, observedAt: import_zod12.z.number() });
7824
7824
  }
7825
- var import_zod12, RcPermissionModeSchema, RcSessionSummarySchema, RcQuestionOptionSchema, RcPendingQuestionSchema, RcPendingRequestSummarySchema, RcSessionStatusSchema, RcStreamEnvelopeSchema, RcStreamEventSchema, RcRateLimitWindowSchema, RcRateLimitInfoSchema, RcLiveRateLimitSchema, RcSessionQuerySchema, RcSendInputSchema, RcQuestionSelectionSchema, RcQuestionChoicesSchema, RcAnswerInputSchema, RcInterruptInputSchema, RcSetModelInputSchema, RcSetPermissionModeInputSchema, RcEndSessionInputSchema, RcGetUsageInputSchema, RcGetContextUsageInputSchema, RcReadFileInputSchema, RcFileSuggestionsInputSchema, RcKeepAliveInputSchema, RcMcpStatusInputSchema, RcMcpReconnectInputSchema, RcMcpAuthenticateInputSchema, RcMcpOAuthCallbackUrlInputSchema, RcTeleportInputSchema, RcListOutputSchema, RcSessionRouteSchema, RcStatusOutputSchema, RcPendingOutputSchema, RcWriteOutputSchema, RcControlWriteOutputSchema, RcAnswerOutputSchema;
7825
+ var import_zod12, RcPermissionModeSchema, RcSessionSummarySchema, RcQuestionOptionSchema, RcPendingQuestionSchema, RcPendingRequestSummarySchema, RcSessionStatusSchema, RcStreamEnvelopeSchema, RcStreamEventSchema, RcRateLimitWindowSchema, RcRateLimitInfoSchema, RcLiveRateLimitSchema, RcSessionQuerySchema, RcSendInputSchema, RcQuestionSelectionSchema, RcQuestionChoicesSchema, RcAnswerInputSchema, RcInterruptInputSchema, RcSetModelInputSchema, RcSetPermissionModeInputSchema, RcEndSessionInputSchema, RcGetUsageInputSchema, RcGetContextUsageInputSchema, RcReadFileInputSchema, RcFileSuggestionsInputSchema, RcKeepAliveInputSchema, RcMcpStatusInputSchema, RcMcpReconnectInputSchema, RcMcpAuthenticateInputSchema, RcMcpOAuthCallbackUrlInputSchema, RcTeleportInputSchema, RcListOutputSchema, RcSessionCommandRouteSchema, RcVersionGateWarningsSchema, RcSessionRouteSchema, RcStatusOutputSchema, RcPendingOutputSchema, RcWriteOutputSchema, RcControlWriteOutputSchema, RcAnswerOutputSchema;
7826
7826
  var init_rcSchemas = __esm({
7827
7827
  "src/frontdoor/rcSchemas.ts"() {
7828
7828
  "use strict";
@@ -7992,7 +7992,9 @@ var init_rcSchemas = __esm({
7992
7992
  marker: import_zod12.z.string().min(1)
7993
7993
  });
7994
7994
  RcListOutputSchema = import_zod12.z.strictObject({ sessions: import_zod12.z.readonly(import_zod12.z.array(RcSessionSummarySchema)) });
7995
- RcSessionRouteSchema = import_zod12.z.union([import_zod12.z.strictObject({ route: import_zod12.z.enum(["supervised", "launched", "self-hosted"]) }), import_zod12.z.strictObject({ route: import_zod12.z.null(), refused: import_zod12.z.string() })]);
7995
+ RcSessionCommandRouteSchema = import_zod12.z.enum(["supervised", "launched", "self-hosted"]);
7996
+ RcVersionGateWarningsSchema = import_zod12.z.readonly(import_zod12.z.array(import_zod12.z.string()).min(1)).optional();
7997
+ RcSessionRouteSchema = import_zod12.z.union([import_zod12.z.strictObject({ route: RcSessionCommandRouteSchema, warnings: RcVersionGateWarningsSchema }), import_zod12.z.strictObject({ route: import_zod12.z.null(), refused: import_zod12.z.string() })]);
7996
7998
  RcStatusOutputSchema = import_zod12.z.strictObject({ statuses: import_zod12.z.readonly(import_zod12.z.array(import_zod12.z.strictObject({ ...RcSessionStatusSchema.shape, route: RcSessionRouteSchema }))) });
7997
7999
  RcPendingOutputSchema = import_zod12.z.strictObject({
7998
8000
  pending: import_zod12.z.readonly(import_zod12.z.array(RcPendingRequestSummarySchema)),
@@ -14304,7 +14306,7 @@ var init_package = __esm({
14304
14306
  "package.json"() {
14305
14307
  package_default = {
14306
14308
  name: "claude-use",
14307
- version: "14.9.0",
14309
+ version: "14.10.0",
14308
14310
  description: "A profile manager and launcher for Claude Code that lets one person run multiple logins from one machine while controlling what gets shared between them.",
14309
14311
  license: "MIT",
14310
14312
  author: "Joseph Mearman <joseph@mearman.co.uk>",
@@ -14425,11 +14427,44 @@ var init_sessionControl = __esm({
14425
14427
  });
14426
14428
 
14427
14429
  // src/supervise/verifiedVersions.ts
14428
- var RC_SESSION_COMMAND_VERIFIED_VERSIONS;
14430
+ function parseReleaseVersion(version) {
14431
+ const match = RELEASE_VERSION.exec(version);
14432
+ return match === null ? void 0 : { major: Number(match[1]), minor: Number(match[2]), patch: Number(match[3]) };
14433
+ }
14434
+ function minorOf(version) {
14435
+ return `${String(version.major)}.${String(version.minor)}`;
14436
+ }
14437
+ function verifiedMinors() {
14438
+ return [...new Set(RC_SESSION_COMMAND_VERIFIED_VERSIONS.map((listed) => {
14439
+ const parsed = parseReleaseVersion(listed);
14440
+ if (parsed === void 0) {
14441
+ throw new Error(`RC_SESSION_COMMAND_VERIFIED_VERSIONS lists ${listed}, which is not a plain release version`);
14442
+ }
14443
+ return minorOf(parsed);
14444
+ }))];
14445
+ }
14446
+ function claudeCodeVersionGate(version) {
14447
+ if (version === void 0) {
14448
+ return { kind: "refused" };
14449
+ }
14450
+ if (RC_SESSION_COMMAND_VERIFIED_VERSIONS.includes(version)) {
14451
+ return { kind: "verified" };
14452
+ }
14453
+ const parsed = parseReleaseVersion(version);
14454
+ if (parsed === void 0 || !verifiedMinors().includes(minorOf(parsed))) {
14455
+ return { kind: "refused" };
14456
+ }
14457
+ return { kind: "unverified-patch", warning: `Claude Code ${version} has not been verified for goal, compaction and turn control (verified: ${RC_SESSION_COMMAND_VERIFIED_VERSIONS.join(", ")}); it is a patch release of verified minor ${minorOf(parsed)}, so the control plugin and the verbs run on it unchecked` };
14458
+ }
14459
+ function claudeCodeVersionsGated() {
14460
+ return `Claude Code ${RC_SESSION_COMMAND_VERIFIED_VERSIONS.join(", ")}, or another patch release of ${verifiedMinors().join(" or ")} with a warning that it is unverified`;
14461
+ }
14462
+ var RC_SESSION_COMMAND_VERIFIED_VERSIONS, RELEASE_VERSION;
14429
14463
  var init_verifiedVersions = __esm({
14430
14464
  "src/supervise/verifiedVersions.ts"() {
14431
14465
  "use strict";
14432
14466
  RC_SESSION_COMMAND_VERIFIED_VERSIONS = ["2.1.319", "2.1.325"];
14467
+ RELEASE_VERSION = /^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$/u;
14433
14468
  }
14434
14469
  });
14435
14470
 
@@ -18175,17 +18210,26 @@ function registerLaunchControl(fs17, directory, control, isRunning) {
18175
18210
  fs17.removeRecursive(file);
18176
18211
  };
18177
18212
  }
18178
- function launchLoadsControlPlugin(candidate) {
18213
+ function launchControlPluginGate(candidate) {
18179
18214
  const end = candidate.args.indexOf("--");
18180
18215
  const options = end === -1 ? candidate.args : candidate.args.slice(0, end);
18181
- return !candidate.supervised && candidate.startsSession && !options.includes("--bare") && candidate.version !== void 0 && RC_SESSION_COMMAND_VERIFIED_VERSIONS.includes(candidate.version);
18216
+ if (candidate.supervised || !candidate.startsSession || options.includes("--bare")) {
18217
+ return void 0;
18218
+ }
18219
+ const gate = claudeCodeVersionGate(candidate.version);
18220
+ return gate.kind === "refused" ? void 0 : gate;
18182
18221
  }
18183
18222
  function stageControlPluginFor(candidate, stage, warn) {
18184
- if (stage === void 0 || !launchLoadsControlPlugin(candidate)) {
18223
+ const gate = launchControlPluginGate(candidate);
18224
+ if (stage === void 0 || gate === void 0) {
18185
18225
  return void 0;
18186
18226
  }
18187
18227
  try {
18188
- return stage();
18228
+ const staged = stage();
18229
+ if (gate.kind === "unverified-patch") {
18230
+ warn(`agent-shim: ${gate.warning}`);
18231
+ }
18232
+ return staged;
18189
18233
  } catch (error) {
18190
18234
  warn(`agent-shim: the in-process control plugin could not be staged, so this session starts without it and the front door cannot reach it for goal, compaction and turn control: ${error instanceof Error ? error.message : String(error)}`);
18191
18235
  return void 0;
@@ -19921,6 +19965,7 @@ __export(index_exports, {
19921
19965
  changePool: () => changePool,
19922
19966
  checkReportHasWarnings: () => checkReportHasWarnings,
19923
19967
  checkReportToJson: () => checkReportToJson,
19968
+ claudeCodeVersionGate: () => claudeCodeVersionGate,
19924
19969
  collectCheckReport: () => collectCheckReport,
19925
19970
  collectDoctorReport: () => collectDoctorReport,
19926
19971
  collectFrontDoorStatus: () => collectFrontDoorStatus,
@@ -20355,6 +20400,7 @@ init_rcSchemas();
20355
20400
 
20356
20401
  // src/frontdoor/rcSlashCommandSchemas.ts
20357
20402
  var import_zod25 = require("zod");
20403
+ init_rcSchemas();
20358
20404
 
20359
20405
  // src/frontdoor/rcSessionCommands.ts
20360
20406
  var import_promises = require("node:timers/promises");
@@ -20595,15 +20641,18 @@ var MAX_JSON_BYTES_PER_CODE_UNIT = 6;
20595
20641
  var RC_COMPACT_INSTRUCTIONS_MAX_CHARS = Math.floor(CONTROL_BODY_CAP_BYTES / MAX_JSON_BYTES_PER_CODE_UNIT);
20596
20642
  var RC_TURN_TEXT_MAX_CHARS = Math.floor(CONTROL_BODY_CAP_BYTES / MAX_JSON_BYTES_PER_CODE_UNIT);
20597
20643
  var RC_SESSION_COMMAND_MAX_WAIT_MS = 2147483647;
20598
- function unverifiedVersionMessage(sessionId, version, source) {
20599
- const verified = RC_SESSION_COMMAND_VERIFIED_VERSIONS.join(", ");
20600
- return version === void 0 ? `session ${sessionId} has not reported its Claude Code version (${source}), and goal, compaction and turn control is verified only on Claude Code ${verified}` : `session ${sessionId} runs Claude Code ${version}, and goal, compaction and turn control is verified only on Claude Code ${verified}: the door will not act on a version whose behaviour it has not verified`;
20644
+ function refusedVersionMessage(sessionId, version, source) {
20645
+ const gated = claudeCodeVersionsGated();
20646
+ return version === void 0 ? `session ${sessionId} has not reported its Claude Code version (${source}), and goal, compaction and turn control runs only on ${gated}` : `session ${sessionId} runs Claude Code ${version}, and goal, compaction and turn control runs only on ${gated}: the door will not act on a version of a minor it has not verified. Start the session on one of those versions`;
20647
+ }
20648
+ function warningsOf(gate) {
20649
+ return gate.kind === "unverified-patch" ? [gate.warning] : [];
20601
20650
  }
20602
20651
  function noPluginReason(sessionId) {
20603
- return `no agent-shim launch's in-process control plugin records session ${sessionId}: it was started outside the launcher (with claude's own command, or agent-shim run --native), with --bare, on a Claude Code version the plugin is not verified on, or its plugin has not yet recorded its transcript, which it does from the session's first hook event`;
20652
+ return `no agent-shim launch's in-process control plugin records session ${sessionId}: it was started outside the launcher (with claude's own command, or agent-shim run --native), with --bare, on a Claude Code version the gate refuses, or its plugin has not yet recorded its transcript, which it does from the session's first hook event`;
20604
20653
  }
20605
20654
  function unsupportedMessage(sessionId) {
20606
- return `${noPluginReason(sessionId)}, so the door has no in-process channel into it, and it is not on the door's own self-hosted surface. Over the real Remote Control service, Claude Code ${RC_SESSION_COMMAND_VERIFIED_VERSIONS.join(", ")} takes a message as a person's (running it when it is a slash command) only when a person's app wrote it and treats any other writer as a peer, whose message the model reads as another session's, and the door does not claim to be a person's app on a service it does not run. Start the session through agent-shim run on Claude Code ${RC_SESSION_COMMAND_VERIFIED_VERSIONS.join(", ")} without --bare, or run it against the door's self-hosted surface.`;
20655
+ return `${noPluginReason(sessionId)}, so the door has no in-process channel into it, and it is not on the door's own self-hosted surface. Over the real Remote Control service, Claude Code takes a message as a person's (running it when it is a slash command) only when a person's app wrote it and treats any other writer as a peer, whose message the model reads as another session's, and the door does not claim to be a person's app on a service it does not run. Start the session through agent-shim run on ${claudeCodeVersionsGated()} without --bare, or run it against the door's self-hosted surface.`;
20607
20656
  }
20608
20657
  function createRcSessionCommands(deps) {
20609
20658
  const queues = /* @__PURE__ */ new Map();
@@ -20628,10 +20677,11 @@ function createRcSessionCommands(deps) {
20628
20677
  if ("refused" in target) {
20629
20678
  return { kind: "refused", message: target.refused, refusal: "session-state" };
20630
20679
  }
20631
- if (target.version === void 0 || !RC_SESSION_COMMAND_VERIFIED_VERSIONS.includes(target.version)) {
20632
- return { kind: "refused", message: unverifiedVersionMessage(sessionId, target.version, route === "supervised" ? "its supervisor's control plugin has not loaded" : "its launch's control plugin has not loaded"), refusal: "session-state" };
20680
+ const gate = claudeCodeVersionGate(target.version);
20681
+ if (gate.kind === "refused") {
20682
+ return { kind: "refused", message: refusedVersionMessage(sessionId, target.version, route === "supervised" ? "its supervisor's control plugin has not loaded" : "its launch's control plugin has not loaded"), refusal: "session-state" };
20633
20683
  }
20634
- return { kind: route, target };
20684
+ return { kind: route, target, warnings: warningsOf(gate) };
20635
20685
  };
20636
20686
  const resolveRoute = async (sessionId) => {
20637
20687
  const supervised = await pluginRoute(sessionId, "supervised", deps.supervisedOf);
@@ -20653,10 +20703,11 @@ function createRcSessionCommands(deps) {
20653
20703
  return { kind: "refused", message: `${noPluginReason(sessionId)}, and the door's self-hosted surface cannot take a command: ${unavailable}`, refusal: "session-state" };
20654
20704
  }
20655
20705
  const version = deps.selfHost.versionOf(sessionId);
20656
- if (version === void 0 || !RC_SESSION_COMMAND_VERIFIED_VERSIONS.includes(version)) {
20657
- return { kind: "refused", message: unverifiedVersionMessage(sessionId, version, "its launch recorded none and no system/init from its worker has been observed on its stream; send it a prompt so it reports one"), refusal: "session-state" };
20706
+ const gate = claudeCodeVersionGate(version);
20707
+ if (gate.kind === "refused") {
20708
+ return { kind: "refused", message: refusedVersionMessage(sessionId, version, "its launch recorded none and no system/init from its worker has been observed on its stream; send it a prompt so it reports one"), refusal: "session-state" };
20658
20709
  }
20659
- return { kind: "self-hosted", selfHost: deps.selfHost };
20710
+ return { kind: "self-hosted", selfHost: deps.selfHost, warnings: warningsOf(gate) };
20660
20711
  };
20661
20712
  const onRoute = async (sessionId, options, actions) => await serialised(sessionId, async () => {
20662
20713
  const { signal } = options;
@@ -20667,12 +20718,13 @@ function createRcSessionCommands(deps) {
20667
20718
  if (resolved.kind === "refused") {
20668
20719
  return { ok: false, message: resolved.message, refusal: resolved.refusal };
20669
20720
  }
20721
+ const warned2 = (result2) => result2.ok && resolved.warnings.length > 0 ? { ok: true, report: { ...result2.report, warnings: resolved.warnings } } : result2;
20670
20722
  if (resolved.kind !== "self-hosted") {
20671
20723
  const waitMs2 = options.waitMs ?? COMPACT_TIMEOUT_MS;
20672
20724
  const timeout2 = AbortSignal.timeout(waitMs2);
20673
20725
  const bounded3 = signal === void 0 ? timeout2 : AbortSignal.any([signal, timeout2]);
20674
20726
  try {
20675
- return await actions.plugin(resolved.target, resolved.kind, bounded3, waitMs2);
20727
+ return warned2(await actions.plugin(resolved.target, resolved.kind, bounded3, waitMs2));
20676
20728
  } catch (error) {
20677
20729
  if (timeout2.aborted) {
20678
20730
  return { ok: false, message: `session ${sessionId}'s control plugin did not answer within ${String(waitMs2)} ms. A request the plugin had not started is withdrawn; one it had started runs once the session is idle (a turn waiting on a permission prompt holds it), so read the session's goal or transcript before asking again` };
@@ -20686,7 +20738,7 @@ function createRcSessionCommands(deps) {
20686
20738
  if (!result.ok && timeout.aborted) {
20687
20739
  return { ok: false, message: `session ${sessionId}'s worker did not answer within ${String(waitMs)} ms in all; it may still be queued behind a running turn, so read the session's stream before asking again` };
20688
20740
  }
20689
- return result;
20741
+ return warned2(result);
20690
20742
  });
20691
20743
  const transcriptGoal = async (sessionId, target) => {
20692
20744
  const goal = target.transcriptPath === void 0 ? void 0 : await deps.goalOf(target.transcriptPath);
@@ -20713,7 +20765,10 @@ function createRcSessionCommands(deps) {
20713
20765
  /** Which route the verbs would take for the session now, or the refusal naming why none would; reads only, outside the session's queue, so a verb waiting on the session never delays it. */
20714
20766
  routeOf: async (sessionId) => {
20715
20767
  const resolved = await resolveRoute(sessionId);
20716
- return resolved.kind === "refused" ? { route: null, refused: resolved.message } : { route: resolved.kind };
20768
+ if (resolved.kind === "refused") {
20769
+ return { route: null, refused: resolved.message };
20770
+ }
20771
+ return resolved.warnings.length === 0 ? { route: resolved.kind } : { route: resolved.kind, warnings: resolved.warnings };
20717
20772
  },
20718
20773
  /**
20719
20774
  * Puts `text` into the session as a person's typed turn, and resolves once the session recorded it as a user entry from the person, never as a peer's message: on the supervised route a transcript row the control plugin submitted as the person's words (`origin: { kind: "plugin", asUser: true }`), on the self-hosted route the worker's mirrored entry with a person's origin (`{ kind: "human" }`). The text reaches the session's model as its user's words (`docs/rc-slash-commands.md`, the trust boundary). Refused unsent: text that is empty, starts with `/` (a slash command, which the goal and compaction verbs run), or is longer than one request carries. Resolves when the turn entered the session, not when the model has answered it.
@@ -20879,7 +20934,8 @@ var RcTurnInputSchema = import_zod25.z.strictObject({
20879
20934
  });
20880
20935
  var commandAnswerShape = {
20881
20936
  session: import_zod25.z.string(),
20882
- route: import_zod25.z.enum(["supervised", "launched", "self-hosted"])
20937
+ route: RcSessionCommandRouteSchema,
20938
+ warnings: RcVersionGateWarningsSchema
20883
20939
  };
20884
20940
  var RcGoalGetOutputSchema = import_zod25.z.strictObject({
20885
20941
  ...commandAnswerShape,
@@ -23014,6 +23070,7 @@ function jobWindowReadFindings(jobs, pools, windowsOf) {
23014
23070
 
23015
23071
  // src/doctorReport.ts
23016
23072
  init_extends();
23073
+ init_verifiedVersions();
23017
23074
  var DOCTOR_SEVERITIES = ["pass", "warn", "fail"];
23018
23075
  var DOCTOR_SECTIONS = [
23019
23076
  "ambient-credential",
@@ -23230,6 +23287,10 @@ function runDoctor(params) {
23230
23287
  const { binary } = params.binaryDiscovery;
23231
23288
  const versionNote = binary.version === void 0 ? "" : `, version ${binary.version}`;
23232
23289
  push("binary-discovery", "pass", `Found ${binary.path} (${binary.source}${versionNote}).`);
23290
+ const gate = claudeCodeVersionGate(binary.version);
23291
+ if (gate.kind === "unverified-patch") {
23292
+ push("binary-discovery", "warn", `${gate.warning}.`);
23293
+ }
23233
23294
  } else {
23234
23295
  push("binary-discovery", "fail", params.binaryDiscovery.message);
23235
23296
  }
@@ -27889,6 +27950,7 @@ init_ownCli();
27889
27950
  changePool,
27890
27951
  checkReportHasWarnings,
27891
27952
  checkReportToJson,
27953
+ claudeCodeVersionGate,
27892
27954
  collectCheckReport,
27893
27955
  collectDoctorReport,
27894
27956
  collectFrontDoorStatus,