@commonlyai/cli 0.1.375 → 0.1.376

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commonlyai/cli",
3
- "version": "0.1.375",
3
+ "version": "0.1.376",
4
4
  "license": "Apache-2.0",
5
5
  "description": "The Commonly CLI — connect agents, manage pods, iterate fast",
6
6
  "type": "module",
@@ -1477,7 +1477,7 @@ export const resolveAttachSandbox = ({
1477
1477
  // pure — a mode and an adapter name — so it belongs with the derivation, and
1478
1478
  // its witnesses live beside it.
1479
1479
  // Two different things can be missing, so the refusal names the one that is:
1480
- // the D247 walk read "requires public trust" on a seat whose trust WAS public.
1480
+ // the walk read "requires public trust" on a seat whose trust WAS public.
1481
1481
  if (mode === 'workspace' || mode === 'read-only') {
1482
1482
  if (!confined) {
1483
1483
  throw new Error(
@@ -1564,7 +1564,7 @@ export const performAttach = async ({
1564
1564
  });
1565
1565
  if (codexRefusal) throw new Error(codexRefusal);
1566
1566
  }
1567
- // D245: native Windows has neither sandbox, so its refusal names Windows
1567
+ // Native Windows has neither sandbox, so its refusal names Windows
1568
1568
  // and the user's own opt-in, never Seatbelt or bwrap advice. Attach still
1569
1569
  // refuses there, as before; only the words differ.
1570
1570
  const windowsRefusal = () => new Error(adapterName === 'dsh'
@@ -1828,7 +1828,7 @@ export const runMemoryImport = async ({
1828
1828
 
1829
1829
  // ── run: local-CLI wrapper loop (ADR-005) ────────────────────────────────────
1830
1830
 
1831
- // D247 walk, 11-04: a Qwen seat whose post tool was declined told the pod about
1831
+ // An 11-04 walk: a Qwen seat whose post tool was declined told the pod about
1832
1832
  // checkpoints, first_contact and re-serving. The model wrote that, not the
1833
1833
  // wrapper, so the fix is an instruction and not a filter on its text: a filter
1834
1834
  // would also eat a pod that is discussing these words. It speaks only to a
@@ -1911,7 +1911,7 @@ const FINAL_TEXT_ANSWERS_ON_COMMENT = 'Your final text is posted as a reply to t
1911
1911
  + FAILURE_ON_COMMENT;
1912
1912
 
1913
1913
  // Where a mention's answer goes is the kernel's line, in the item body: since
1914
- // D278 (2026-11-09) a top-level @mention in a shared pod is answered in that
1914
+ // Since 2026-11-09 a top-level @mention in a shared pod is answered in that
1915
1915
  // message's thread, the same as a mention inside a thread. The wrapper used to
1916
1916
  // add its own line beside a person's top-level mention saying to answer
1917
1917
  // top-level (F212, #3499/#3511); it adds no placement line now, so the item
@@ -2064,7 +2064,7 @@ const extractPrompt = (event) => {
2064
2064
  // cancel grace, and the wall-clock backstop past the adapter's own timeout.
2065
2065
  export { supervisedRunPolicy };
2066
2066
 
2067
- // Codex turns are supervised by default (D211): a turn that stops making
2067
+ // Codex turns are supervised by default: a turn that stops making
2068
2068
  // progress is named and killed instead of holding the seat. COMMONLY_SUPERVISE_RUNS=0
2069
2069
  // opts out. Every other adapter stays off unless COMMONLY_SUPERVISE_RUNS=1.
2070
2070
  export const superviseRunsByDefault = (adapterName, env = process.env) => {
@@ -2114,7 +2114,7 @@ export const performRun = ({
2114
2114
  localKey = null,
2115
2115
  podId = null,
2116
2116
  environment = null,
2117
- // D245: the user's own Windows opt-in for this run; reaches the adapter's
2117
+ // The user's own Windows opt-in for this run; reaches the adapter's
2118
2118
  // spawn context only (never the environment).
2119
2119
  hostUnconfined = false,
2120
2120
  // F187: this Windows Codex run was opted in with every pod confirmed private.
@@ -2158,7 +2158,7 @@ export const performRun = ({
2158
2158
  // The agent to @mention when the model provider refuses a request's content
2159
2159
  // (lib/content-refusal.js). Null: the refusal notice names no one.
2160
2160
  reportRuntime = false,
2161
- // D247: a listener seat (no daemon) reads the model and effort its owner
2161
+ // A listener seat (no daemon) reads the model and effort its owner
2162
2162
  // saved on the server before each turn. Off for daemon seats, whose daemon
2163
2163
  // projects the same values into `environment`.
2164
2164
  readSavedControls = false,
@@ -2442,7 +2442,7 @@ export const performRun = ({
2442
2442
  // a conversation that read the workspace, whatever claude's resume would
2443
2443
  // find from another folder.
2444
2444
  let lastPlacementReason = null;
2445
- // D247: the model and effort this turn spawns with. A listener seat reads
2445
+ // The model and effort this turn spawns with. A listener seat reads
2446
2446
  // its saved controls first; then an effort is dropped only when the device
2447
2447
  // listed its levels and this one is not among them.
2448
2448
  let savedControlsNoticeShown = false;
@@ -2477,7 +2477,7 @@ export const performRun = ({
2477
2477
  }
2478
2478
  }
2479
2479
  // Dropped only when the device listed its levels and this one is not
2480
- // among them; with nothing reported the harness decides (D247).
2480
+ // among them; with nothing reported the harness decides.
2481
2481
  seatEnvironment = reportRuntime && desiredEnvironment
2482
2482
  && effortRefusedByDevice(inventory, desiredEnvironment.effort)
2483
2483
  ? { ...desiredEnvironment, effort: undefined } : desiredEnvironment;
@@ -3239,7 +3239,7 @@ export const performRun = ({
3239
3239
  ? { mounted: serverSkills.mounted, conflicted: serverSkills.conflicted, ...(skillReadUnavailable ? { status: 'unavailable' } : {}) }
3240
3240
  : null;
3241
3241
  let spawnCompleted = false;
3242
- // D245 item 4: how long the runtime ran, for the reply receipt.
3242
+ // How long the runtime ran, for the reply receipt.
3243
3243
  let spawnDurationMs;
3244
3244
  let observedSpawn = false;
3245
3245
  // What a failed spawn threw, read only for its fixed reason code (F370 #11).
@@ -3524,7 +3524,7 @@ export const performRun = ({
3524
3524
  maxChunks: maxChatChunks,
3525
3525
  uploadName: `${agentName}-reply-${event._id}.md`,
3526
3526
  log: (line) => log(`[${event.type}] ${line}`),
3527
- // D245 item 4: the wrapper's own account of this turn.
3527
+ // The wrapper's own account of this turn.
3528
3528
  receipt: buildReplyReceipt({
3529
3529
  adapterName: adapter.name,
3530
3530
  stats: result.stats,
@@ -5919,7 +5919,7 @@ Docs:
5919
5919
  bootstrapped = true;
5920
5920
  }
5921
5921
 
5922
- // D245: on native Windows the user may choose to run without an OS
5922
+ // On native Windows the user may choose to run without an OS
5923
5923
  // sandbox, by typing the flag or by installing the daemon with it (the
5924
5924
  // marker is read only by the seats that daemon spawns). Nothing from the
5925
5925
  // server decides this, and the environment never carries it: the seat
@@ -365,7 +365,7 @@ export const resolveAdapterForRuntime = async (runtime, registry = { getAdapter
365
365
 
366
366
  /**
367
367
  * The daemon's first poll and heartbeat, with the Windows launcher watch armed
368
- * BEFORE them (D245). Arming first puts the EPIPE guard on stdout and stderr
368
+ * BEFORE them. Arming first puts the EPIPE guard on stdout and stderr
369
369
  * before any supervision log line, and a launcher that is already gone stops
370
370
  * the daemon here instead of after a tick logged into a dead pipe. Returns
371
371
  * false when the daemon should not go on to its timers.
@@ -604,7 +604,7 @@ Examples:
604
604
  }
605
605
  // A service without a credential just crash-loops at boot.
606
606
  requireDaemonRecord();
607
- // D245: this command is the only writer of the opt-in, and installing
607
+ // This command is the only writer of the opt-in, and installing
608
608
  // without the flag is how it is turned off. Written before the task
609
609
  // starts, so the first seats it spawns already read the answer.
610
610
  // N3: the marker's state before this install, so a failed install can
@@ -824,7 +824,7 @@ Examples:
824
824
  supervisor.stop();
825
825
  process.exit(0);
826
826
  };
827
- // D245: under the Windows launcher, the launcher's exit is the stop
827
+ // Under the Windows launcher, the launcher's exit is the stop
828
828
  // signal. Armed before the first tick, so the EPIPE guard covers its
829
829
  // log lines and a launcher already gone stops the daemon at once.
830
830
  const started = await firstSupervisionPass({
@@ -182,7 +182,7 @@ const PUBLIC_DENIED_TOOLS = [
182
182
  'WebFetch',
183
183
  'Bash',
184
184
  // Claude Code's shell tool on Windows. dontAsk and the Read(./**) allowlist
185
- // already refuse it; named here so the deny list holds on its own (D245).
185
+ // already refuse it; named here so the deny list holds on its own.
186
186
  'PowerShell',
187
187
  'Write',
188
188
  'Edit',
@@ -231,7 +231,7 @@ const withWorkspaceGit = (ctx) => {
231
231
  };
232
232
  };
233
233
  const PUBLIC_SAFE_ENV = /^(?:PATH|LANG|LC_[A-Z_]+|TERM|USER|LOGNAME|NO_COLOR|CI|SSL_CERT_FILE|SSL_CERT_DIR)$/;
234
- // D245: what a Windows process needs to start at all, find its own login and
234
+ // What a Windows process needs to start at all, find its own login and
235
235
  // open a socket. Windows keys are case-insensitive (Path, SystemRoot), so this
236
236
  // one is matched without case. None of these carries a secret.
237
237
  const PUBLIC_SAFE_ENV_WIN32 = /^(?:PATH|PATHEXT|SYSTEMROOT|SYSTEMDRIVE|WINDIR|COMSPEC|TEMP|TMP|USERPROFILE|USERNAME|USERDOMAIN|HOMEDRIVE|HOMEPATH|APPDATA|LOCALAPPDATA|PROGRAMDATA|PROGRAMFILES|PROGRAMFILES\(X86\)|COMMONPROGRAMFILES|NUMBER_OF_PROCESSORS|PROCESSOR_ARCHITECTURE|OS)$/i;
@@ -635,7 +635,7 @@ const buildClaudeEnv = (input, state, expansionEnv = {}, credentialFile = null,
635
635
 
636
636
  const absoluteToolDeny = (path) => `Read(/${path}/**)`;
637
637
 
638
- // D245: Claude Code matches permission paths in POSIX form on Windows
638
+ // Claude Code matches permission paths in POSIX form on Windows
639
639
  // (C:\Users\ada becomes /c/Users/ada), so an absolute deny written from a
640
640
  // Windows path would match nothing.
641
641
  const permissionPath = (path, platform) => (platform === 'win32'
@@ -652,7 +652,7 @@ const buildPublicClaudePolicyArgs = (mcpToolPatterns, {
652
652
  const home = homeOverride || homedir();
653
653
  const deny = (sub) => absoluteToolDeny(permissionPath(join(home, sub), platform));
654
654
  // `allow` is already narrowed to a workspace seat's grants (workspaceGrants).
655
- // D245: with no OS jail (native Windows, --unsandboxed) a shell would run
655
+ // With no OS jail (native Windows, --unsandboxed) a shell would run
656
656
  // with the user's whole access and could read the seat's own token from its
657
657
  // environment, so `write` grants edits only there.
658
658
  // With no jail the edit tools are also scoped to the working folder: a bare
@@ -1437,7 +1437,7 @@ const claudeInstallRefusal = (claudeBin) => new Error(
1437
1437
  );
1438
1438
 
1439
1439
  /**
1440
- * D245: native Windows has no OS jail, and the user chose to run without one
1440
+ * Native Windows has no OS jail, and the user chose to run without one
1441
1441
  * (`--unsandboxed`). Read from the spawn context only, set by `agent run`, never
1442
1442
  * from the environment. The seat keeps its trust, so everything the trust
1443
1443
  * brings except the jail still applies.
@@ -1533,7 +1533,7 @@ const prepareArgv = async (innerArgv, ctx) => {
1533
1533
  // unconfined seat with a public record, which is how a record can claim
1534
1534
  // confinement it never applies.
1535
1535
  if (isConfinedTrust(sandboxTrust) && !publicNativeSandbox && sandboxMode !== 'bwrap') {
1536
- // D245: on native Windows, name Windows and the user's own opt-in, never
1536
+ // On native Windows, name Windows and the user's own opt-in, never
1537
1537
  // macOS or bwrap advice (host-check passes an unrecognised mode through).
1538
1538
  if ((ctx._platform || process.platform) === 'win32') {
1539
1539
  throw new Error(
@@ -1876,7 +1876,7 @@ export default {
1876
1876
  let publicLoginBaseUrl = null;
1877
1877
  let loginTurn = null;
1878
1878
  let publicSkillArgs = [];
1879
- // D245: no jail to prepare for on a policy-only Windows host.
1879
+ // No jail to prepare for on a policy-only Windows host.
1880
1880
  const jailed = !policyOnlyHost(ctx);
1881
1881
  const publicNativeSandbox = jailed && publicTrust
1882
1882
  && PUBLIC_SANDBOX_MODES.has(resolvePublicSandboxMode(ctx.environment?.sandbox));
@@ -2009,7 +2009,7 @@ export default {
2009
2009
  readyFileDir = join(publicClaudeState.statePath, 'mcp-ready');
2010
2010
  await mkdir(readyFileDir, { recursive: true, mode: 0o700 });
2011
2011
  } else if (ctx.environment?.sandbox?.trust === 'public') {
2012
- // A policy-only host (D245) prepares no state folder and runs the MCP
2012
+ // A policy-only host prepares no state folder and runs the MCP
2013
2013
  // children unjailed, so a folder of this turn's own serves.
2014
2014
  ownReadyDir = await mkdtemp(join(tmpdir(), 'commonly-claude-ready-'));
2015
2015
  await chmod(ownReadyDir, 0o700);
@@ -2086,7 +2086,7 @@ export default {
2086
2086
  text: turnReply(stdout, { credentials: turnCredentials(spawnCtx), publicMcp: witnessedMcp }),
2087
2087
  newSessionId: sessionId,
2088
2088
  contextTokens,
2089
- // D245 item 4: what the run said about itself, for the reply receipt.
2089
+ // What the run said about itself, for the reply receipt.
2090
2090
  stats: claudeRunStats(stdout),
2091
2091
  };
2092
2092
  } catch (err) {
@@ -567,7 +567,7 @@ const preparePrivateCodexHome = async (ctx, childEnv) => {
567
567
  return { home, source, realSource, others, links };
568
568
  };
569
569
 
570
- // `login: false` is the proxy route (D250): codex authenticates with the
570
+ // `login: false` is the proxy route: codex authenticates with the
571
571
  // per-turn token, so the public home gets no link to the person's Codex login,
572
572
  // and a link an earlier turn left is removed.
573
573
  const preparePublicCodexHome = async (ctx, childEnv, { login = true } = {}) => {
@@ -1128,7 +1128,7 @@ const privatePermissionProfileFlags = ({
1128
1128
  // F188: the host's OpenAI-compatible model route, for a public seat. That seat
1129
1129
  // runs with `--ignore-user-config`, so config.toml's `openai_base_url` never
1130
1130
  // loads, and codex-cli 0.162.1 does not read the OPENAI_BASE_URL env either
1131
- // (Growth's D252 walk, 11-05): a host routed at LiteLLM or another
1131
+ // (Growth's walk, 11-05): a host routed at LiteLLM or another
1132
1132
  // OpenAI-compatible endpoint sent every turn to api.openai.com and got a 401.
1133
1133
  // The env is the declaration, as ANTHROPIC_BASE_URL is for the claude adapter;
1134
1134
  // buildArgs passes it on as `-c openai_base_url=...`, the top-level key the
@@ -1186,7 +1186,7 @@ export const codexAuthKind = async (operatorHome, source = {}) => {
1186
1186
  return mode === 'apikey' ? 'apikey' : 'login';
1187
1187
  };
1188
1188
 
1189
- // D250: the F188 route leaves the key in codex's own environment. With
1189
+ // The F188 route leaves the key in codex's own environment. With
1190
1190
  // CODEX_API_KEY in the seat's environment (codex's own name for an exec key),
1191
1191
  // the key stays on the host behind the per-turn loopback proxy, as a Claude
1192
1192
  // seat's ANTHROPIC_API_KEY does, and codex gets a provider entry naming the
@@ -1249,7 +1249,7 @@ const buildArgs = ({
1249
1249
  }) => {
1250
1250
  const publicSandbox = publicSandboxMode !== null;
1251
1251
  // F387: a private seat keeps the flag below only in a cloud-codex pod, or
1252
- // when its operator opted this run out of the OS sandbox (D245, native
1252
+ // when its operator opted this run out of the OS sandbox (native
1253
1253
  // Windows only: Codex can't enforce a profile's read denies there).
1254
1254
  const keepsOwnPolicy = trustedContainerPerimeter || operatorUnconfined;
1255
1255
  const privateProfile = !publicSandbox && !keepsOwnPolicy;
@@ -1713,7 +1713,7 @@ export default {
1713
1713
  }
1714
1714
  }
1715
1715
  // F387: only a cloud-codex pod sets the perimeter env
1716
- // (sandbox/codex-perimeter.js), and only the operator's own D245 opt-in
1716
+ // (sandbox/codex-perimeter.js), and only the operator's own opt-in
1717
1717
  // sets hostUnconfined. Every other private seat runs under the private
1718
1718
  // permission profile.
1719
1719
  const trustedContainerPerimeter = codexTrustedPerimeter(ctx.env || process.env);
@@ -1900,7 +1900,7 @@ export default {
1900
1900
  const contextTokens = newSessionId
1901
1901
  ? (ctx._codexContextTokens || codexContextTokens)({ codexHome: codexHomeFor(childEnv), sessionId: newSessionId })
1902
1902
  : null;
1903
- // D247: the reply receipt names the model and effort this spawn passed
1903
+ // The reply receipt names the model and effort this spawn passed
1904
1904
  // (`--model`, `model_reasoning_effort`); codex's own stream does not
1905
1905
  // restate them.
1906
1906
  const effort = ctx.environment?.effort;
@@ -435,7 +435,7 @@ export default {
435
435
  // honours CLI allow rules. Any seat needs its declared Commonly tools
436
436
  // approved before non-interactive execution begins, public included:
437
437
  // without it a public seat's commonly_post_message was declined
438
- // (D247 walk, 11-04). Public parity with Claude's --allowedTools
438
+ // (11-04). Public parity with Claude's --allowedTools
439
439
  // mcp__commonly__*; the withheld tools stay in --exclude-tools above.
440
440
  // The broker parks every write for the owner itself (F175d).
441
441
  ...(allowedTools.length ? ['--allowed-tools', allowedTools.join(',')] : []),
@@ -8,7 +8,7 @@ import { resolveOnPath } from '../resolve-on-path.js';
8
8
  // Public seats run only on a harness version smoke-tested in its sandbox, with
9
9
  // one tolerance: a stable patch release after the newest tested one, on that
10
10
  // same major.minor line. Harnesses ship patches every few days, and refusing
11
- // them refused every new BYO user on the current npm release (D245, 11-04).
11
+ // them refused every new BYO user on the current npm release (11-04).
12
12
  // A newer minor or major, an older patch, an older line, or a prerelease still
13
13
  // refuses until it is smoke-tested and added to the adapter's list.
14
14
  const STABLE = /^(\d+)\.(\d+)\.(\d+)$/;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * D245: the Windows form of `commonly daemon install` (ADR-026 D1).
2
+ * The Windows form of `commonly daemon install` (ADR-026 D1).
3
3
  *
4
4
  * macOS has launchd and Linux has systemd; Windows has Task Scheduler. A
5
5
  * per-user task needs no administrator, so the install stays a one-liner a
@@ -201,7 +201,7 @@ WantedBy=default.target
201
201
  `;
202
202
  };
203
203
 
204
- // D171: a systemd user unit is started by the user's own systemd manager, and
204
+ // A systemd user unit is started by the user's own systemd manager, and
205
205
  // without lingering that manager starts at the user's login, not at boot. On a
206
206
  // headless box nobody logs in to, the daemon would then stay down after every
207
207
  // reboot. logind records lingering as one file per user, so that file is what
@@ -68,7 +68,7 @@ export const loadDaemonRecord = ({ platform = process.platform } = {}) => {
68
68
  const path = daemonRecordPath();
69
69
  const dir = daemonDir();
70
70
  if (!existsSync(path)) return null;
71
- // D245: Windows has no POSIX mode bits. Node reports every file there as
71
+ // Windows has no POSIX mode bits. Node reports every file there as
72
72
  // 0o666 (0o444 when read-only) whatever its ACL, so this check refused every
73
73
  // registration on Windows. Access there is the ACL's job; the record sits in
74
74
  // the user's profile, which only that user (and administrators) can read.
@@ -92,7 +92,7 @@ export const createDaemonSupervisor = ({
92
92
  loadToken, // (agentName) => token record | null
93
93
  saveToken, // (agentName, record) => void
94
94
  runtimeInventory = async () => undefined,
95
- // Machine-level facts for the check-in, read locally each beat (D245: the
95
+ // Machine-level facts for the check-in, read locally each beat (the
96
96
  // Windows unsandboxed opt-in). Never derived from anything the server sent.
97
97
  machineReport = () => ({}),
98
98
  resolveAdapter, // async (runtime) => adapter name for THIS machine
@@ -49,7 +49,7 @@ export const ADAPTERS_WITH_DEFAULT_SANDBOX = new Set(['claude', 'codex', 'openco
49
49
  // adapters/pi.js), and neither is handed the default block (see above). The
50
50
  // attach gate (agent.js resolveAttachSandbox) reads this set, not the default
51
51
  // one, or an explicitly configured public Goose or pi seat is refused before its
52
- // adapter runs (D247 walk, 11-04; F113b).
52
+ // adapter runs (11-04; F113b).
53
53
  export const ADAPTERS_WITH_SANDBOX_ENFORCEMENT = new Set([...ADAPTERS_WITH_DEFAULT_SANDBOX, 'goose', 'pi']);
54
54
 
55
55
  // Adapters that may receive a room grant: each confines a public seat AND keeps
package/src/lib/doctor.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
- * `commonly doctor` — the checks (TASK-660, D213).
2
+ * `commonly doctor` — the checks (TASK-660).
3
3
  *
4
- * D213 keeps the Node daemon and hardens install by making breakage visible.
4
+ * The plan keeps the Node daemon and hardens install by making breakage visible.
5
5
  * Each check here answers one question a broken seat used to leave to a log
6
6
  * autopsy, prints one line (pass, fail or skip) and, when it fails, the command
7
7
  * that fixes it. Every outside fact (PATH, the saved login, the server, the
@@ -724,7 +724,7 @@ export const deliverChatReply = async ({
724
724
  attachThreshold = 800,
725
725
  uploadName = 'reply.md',
726
726
  log = () => {},
727
- // D245 item 4: how this reply was made (lib/reply-receipt.js). It rides
727
+ // How this reply was made (lib/reply-receipt.js). It rides
728
728
  // the first message that actually reaches the pod and no later one.
729
729
  receipt = null,
730
730
  // Keeps a reply that fits in up to maxChunks messages in that thread. The
@@ -185,7 +185,7 @@ const publicOnlyReason = (environment, rule, platform) => {
185
185
  const sandbox = environment?.sandbox;
186
186
  if (sandbox === null || typeof sandbox !== 'object' || Array.isArray(sandbox)) return PUBLIC_ONLY_REASON;
187
187
  if (sandbox.mode === 'none' || effectiveSandboxTrust(sandbox.trust) !== 'public') return PUBLIC_ONLY_REASON;
188
- // D245: a public declaration on native Windows reads the same for every adapter.
188
+ // A public declaration on native Windows reads the same for every adapter.
189
189
  if (platform === 'win32') return 'sandbox_mode_unenforceable';
190
190
  const modes = Object.hasOwn(rule, platform) ? rule[platform] : null;
191
191
  if (!modes) return PUBLIC_ONLY_REASON;
@@ -208,7 +208,7 @@ export const confinementReason = (environment, adapter, platform = process.platf
208
208
  const declared = sandbox;
209
209
  if (declared.mode === 'none') return 'sandbox_mode_none';
210
210
  if (effectiveSandboxTrust(declared.trust) !== 'public') return 'sandbox_trust_not_public';
211
- // D245: native Windows has no OS jail for any adapter. Claude there runs
211
+ // Native Windows has no OS jail for any adapter. Claude there runs
212
212
  // only by the user's --unsandboxed (policy without a jail), and a public
213
213
  // Codex seat is refused there outright (host-check.js), so neither carries a
214
214
  // grant.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * TASK-784 (D164): what the daemon's computer runs, as the server stores it.
2
+ * TASK-784: what the daemon's computer runs, as the server stores it.
3
3
  * Metadata only: Node's platform and arch names, the OS release's leading
4
4
  * number, and this CLI's version. Nothing here may name the machine or the
5
5
  * person (no hostname, path or user name); the server drops anything else.
@@ -6,7 +6,7 @@
6
6
  // already catches up before each turn, so no seat on this list needs the tool.
7
7
  export const PUBLIC_WITHHELD_TOOLS = Object.freeze(['commonly_attach_file', 'commonly_catch_up']);
8
8
 
9
- // F118 (Cofounder ruling, 11-04): public agents start from nothing and earn
9
+ // F118 (decided 11-04): public agents start from nothing and earn
10
10
  // capabilities. A public seat answers strangers, so an injected message must
11
11
  // not be able to spread the agent into other pods or rewrite its memory.
12
12
  // Withheld on public trust only: a Claude workspace seat keeps its memory
@@ -1,4 +1,4 @@
1
- // D245 item 4: the receipt the wrapper posts with a reply, so a BYO reply
1
+ // The receipt the wrapper posts with a reply, so a BYO reply
2
2
  // carries "how this reply was made" the way a hosted reply has its run trace.
3
3
  // It is the wrapper's own account and the server stores it as self-reported
4
4
  // (backend/services/byoReceipt.ts), which also bounds and checks every field.
@@ -43,7 +43,7 @@ export const buildReplyReceipt = ({ adapterName, stats = {}, durationMs } = {})
43
43
  // carries the account or project it runs in; that is not this reply's to
44
44
  // publish, so such a model id is left out.
45
45
  if (isName(stats?.model) && !/^arn:|(^|\/)projects\//i.test(stats.model)) receipt.model = stats.model;
46
- // D247: the effort level the adapter passed, as a bare level name.
46
+ // The effort level the adapter passed, as a bare level name.
47
47
  if (isName(stats?.effort) && /^[a-z0-9][a-z0-9._-]{0,19}$/i.test(stats.effort)) receipt.effort = stats.effort;
48
48
  if (isCount(stats?.turns)) receipt.turns = stats.turns;
49
49
  if (Array.isArray(stats?.tools)) {
@@ -36,7 +36,7 @@ const expandHome = (p) => {
36
36
  // mechanisms that do exist are named instead.
37
37
  const MACOS_MESSAGE = 'bwrap is Linux-only. On macOS a public seat runs under Seatbelt '
38
38
  + '(sandbox.mode workspace or read-only).';
39
- // D245: native Windows has no sandbox for agents. WSL runs the Linux one,
39
+ // Native Windows has no sandbox for agents. WSL runs the Linux one,
40
40
  // Claude Code included since F96, and host-check.js offers it; this message
41
41
  // names the native path, which is the user's own opt-in
42
42
  // (sandbox/windows-unsandboxed.js).
@@ -24,7 +24,7 @@ import { detectSeatbelt as defaultDetectSeatbelt } from './seatbelt.js';
24
24
  import { codexTrustedPerimeter } from './codex-perimeter.js';
25
25
  import { CLI } from '../cli-hint.js';
26
26
 
27
- // D245: the Windows opt-in (windows-unsandboxed.js re-exports it; defined here to avoid an import cycle).
27
+ // The Windows opt-in (windows-unsandboxed.js re-exports it; defined here to avoid an import cycle).
28
28
  export const UNSANDBOXED_FLAG = '--unsandboxed';
29
29
 
30
30
  // The Seatbelt modes come from mode.js, as grant-broker-guard's do, so a mode
@@ -177,7 +177,7 @@ export const windowsSandboxMessage = (adapterName) => {
177
177
  'so by default this agent cannot listen for @mentions from native Windows. You can:',
178
178
  ` - WSL 2 (Ubuntu): install Node and ${label} inside WSL, run \`sudo apt install bubblewrap\`,`
179
179
  + ' then run these same commands there.',
180
- // D245: the user's own choice, never a default (sandbox/windows-unsandboxed.js).
180
+ // The user's own choice, never a default (sandbox/windows-unsandboxed.js).
181
181
  ...(adapterName === 'claude'
182
182
  ? [` - Run it without an OS sandbox: add ${UNSANDBOXED_FLAG}`
183
183
  + ` (${CLI} agent run <name> ${UNSANDBOXED_FLAG}, or ${CLI} daemon install ${UNSANDBOXED_FLAG}).`
@@ -195,7 +195,7 @@ export const hostSandboxRefusal = ({
195
195
  environment,
196
196
  adapterName,
197
197
  platform = process.platform,
198
- // D245: the user's own opt-in for this run (windows-unsandboxed.js
198
+ // The user's own opt-in for this run (windows-unsandboxed.js
199
199
  // hostUnconfinedForRun). Never derived from the environment.
200
200
  hostUnconfined = false,
201
201
  // The person asked for the opt-in, whether or not the seat qualified. Only
@@ -224,7 +224,7 @@ export const hostSandboxRefusal = ({
224
224
  // (walked on byo-linux.yml, walk=private-codex). Where bubblewrap can't
225
225
  // start, every turn would fail at session start, so the seat is refused
226
226
  // before its first poll, unless the person ran it unconfined by their own
227
- // --unsandboxed (D245, as on Windows: only with every pod confirmed
227
+ // --unsandboxed (as on Windows: only with every pod confirmed
228
228
  // private). Never unconfined without being asked.
229
229
  if (platform === 'linux' && trust !== 'workspace' && !codexTrustedPerimeter(env)) {
230
230
  if (hostUnconfined === true) return null;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * D245: the user's own opt-in to run an agent without a sandbox on native
2
+ * The user's own opt-in to run an agent without a sandbox on native
3
3
  * Windows.
4
4
  *
5
5
  * Commonly confines a public seat with Seatbelt on macOS and bubblewrap on
@@ -1,4 +1,4 @@
1
- // D247: the model and effort a seat spawns with.
1
+ // The model and effort a seat spawns with.
2
2
  //
3
3
  // Two rules live here so the run loop and its tests share them:
4
4
  //
@@ -32,7 +32,7 @@ const noticesFile = (agentName) => join(sessionsDir(), `${agentName}.notices.jso
32
32
  const MAX_HANDLED_EVENTS = 500;
33
33
  const handledEventsCache = new Map();
34
34
 
35
- // Everything under ~/.commonly is private (D275). These files hold per-(agent,
35
+ // Everything under ~/.commonly is private. These files hold per-(agent,
36
36
  // pod) session IDs and event rings; keep the dir and its files owner-only, and
37
37
  // tighten an existing dir or file that a pre-0.1.309 CLI left group/world-
38
38
  // readable. A mode arg applies only when the path is created, so each write
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * "Your CLI is N versions behind" — one line at `agent run` and `daemon run`
3
- * start-up (TASK-660, D213).
3
+ * start-up (TASK-660).
4
4
  *
5
5
  * A seat pinned to an old CLI fails in ways that look like platform bugs, and
6
6
  * nothing on the seat said it was old. This prints one line when the installed