@staff0rd/assist 0.1117.1 → 0.1118.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/index.js CHANGED
@@ -6,7 +6,7 @@ import { Command } from "commander";
6
6
  // package.json
7
7
  var package_default = {
8
8
  name: "@staff0rd/assist",
9
- version: "0.1117.1",
9
+ version: "0.1118.0",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -5566,6 +5566,9 @@ function spawnClaude2(prompt, options2 = {}) {
5566
5566
  if (permissionMode) {
5567
5567
  args.push("--permission-mode", permissionMode);
5568
5568
  }
5569
+ if (options2.model && !options2.resumeSessionId) {
5570
+ args.push("--model", options2.model);
5571
+ }
5569
5572
  return spawnInherit("claude", args);
5570
5573
  }
5571
5574
  function buildArgs2(prompt, options2) {
@@ -7055,13 +7058,15 @@ var claudeAdapter = {
7055
7058
  reader: claudeConversationReader
7056
7059
  },
7057
7060
  toolOperations: claudeToolOperations,
7058
- launchSkill: (skill, args, { conversationId, allowEdits }) => spawnClaude2(buildSlashCommand(skill, args), {
7061
+ launchSkill: (skill, args, { conversationId, allowEdits, model }) => spawnClaude2(buildSlashCommand(skill, args), {
7059
7062
  allowEdits: allowEdits ?? true,
7060
- sessionId: conversationId
7063
+ sessionId: conversationId,
7064
+ model
7061
7065
  }),
7062
- launchPrompt: (prompt, { conversationId, allowEdits }) => spawnClaude2(prompt, {
7066
+ launchPrompt: (prompt, { conversationId, allowEdits, model }) => spawnClaude2(prompt, {
7063
7067
  allowEdits: allowEdits ?? true,
7064
- sessionId: conversationId
7068
+ sessionId: conversationId,
7069
+ model
7065
7070
  }),
7066
7071
  resume: (conversationId, nudge, { allowEdits }) => spawnClaude2(nudge, {
7067
7072
  allowEdits: allowEdits ?? true,
@@ -7912,7 +7917,7 @@ function spawnCodex2(prompt, options2 = {}) {
7912
7917
  options2.skill && `$${options2.skill}`,
7913
7918
  prompt && neutralizeCodexSkillMentions(prompt)
7914
7919
  ].filter(Boolean).join(" ");
7915
- const override = buildHarnessCodexArgs();
7920
+ const override = options2.model && !options2.resumeSessionId ? { args: ["-m", options2.model], env: {} } : buildHarnessCodexArgs();
7916
7921
  return spawnInherit(
7917
7922
  harnesses.codex.command,
7918
7923
  [
@@ -8197,8 +8202,13 @@ var codexAdapter = {
8197
8202
  },
8198
8203
  toolOperations: codexToolOperations,
8199
8204
  permissionRules: readCodexRulePerms,
8200
- launchSkill: (skill, args, { cwd, allowEdits }) => spawnCodex2(args ?? "", { cwd, sandbox: sandbox(allowEdits), skill }),
8201
- launchPrompt: (prompt, { cwd, allowEdits }) => spawnCodex2(prompt, { cwd, sandbox: sandbox(allowEdits) }),
8205
+ launchSkill: (skill, args, { cwd, allowEdits, model }) => spawnCodex2(args ?? "", {
8206
+ cwd,
8207
+ sandbox: sandbox(allowEdits),
8208
+ skill,
8209
+ model
8210
+ }),
8211
+ launchPrompt: (prompt, { cwd, allowEdits, model }) => spawnCodex2(prompt, { cwd, sandbox: sandbox(allowEdits), model }),
8202
8212
  resume: (conversationId, nudge, { cwd, allowEdits }) => spawnCodex2(nudge, {
8203
8213
  cwd,
8204
8214
  sandbox: sandbox(allowEdits),
@@ -8240,10 +8250,15 @@ function spawnPi(opts = {}) {
8240
8250
  // src/shared/spawnPi.ts
8241
8251
  function spawnPi2(prompt, options2 = {}) {
8242
8252
  const cwd = options2.cwd ?? process.cwd();
8243
- return spawnInherit(harnesses.pi.command, [...piTerminalArgs, prompt], {
8244
- cwd,
8245
- env: { ASSIST_HARNESS: "pi" }
8246
- });
8253
+ const model = options2.model ? ["--model", options2.model] : [];
8254
+ return spawnInherit(
8255
+ harnesses.pi.command,
8256
+ [...piTerminalArgs, ...model, prompt],
8257
+ {
8258
+ cwd,
8259
+ env: { ASSIST_HARNESS: "pi" }
8260
+ }
8261
+ );
8247
8262
  }
8248
8263
 
8249
8264
  // src/shared/harnessAdapters/piToolOperations.ts
@@ -8310,8 +8325,8 @@ var piAdapter = {
8310
8325
  relocate: cannotResume
8311
8326
  },
8312
8327
  toolOperations: piToolOperations,
8313
- launchSkill: (skill, args, { cwd }) => spawnPi2(buildSlashCommand(skill, args), { cwd }),
8314
- launchPrompt: (prompt, { cwd }) => spawnPi2(prompt, { cwd }),
8328
+ launchSkill: (skill, args, { cwd, model }) => spawnPi2(buildSlashCommand(skill, args), { cwd, model }),
8329
+ launchPrompt: (prompt, { cwd, model }) => spawnPi2(prompt, { cwd, model }),
8315
8330
  resume: cannotResume,
8316
8331
  interactive: ({ sessionId: sessionId2, resumeId, prompt, cwd, model }) => resumeId ? cannotResume() : spawnPi({ prompt, cwd, sessionId: sessionId2, model }),
8317
8332
  oneShot: noOneShot,
@@ -8790,15 +8805,54 @@ async function docsFeedback(req, res) {
8790
8805
  // src/commands/sessions/web/fileContent.ts
8791
8806
  import { readFile, stat } from "fs/promises";
8792
8807
 
8808
+ // src/commands/sessions/web/fileContent/respondCommitFile.ts
8809
+ import { relative, sep } from "path";
8810
+ var MAX_FILE_BYTES = 2 * 1024 * 1024;
8811
+ async function commitBlob(cwd, sha, path118) {
8812
+ const line = await execGit(cwd, ["ls-tree", "-l", sha, "--", path118]);
8813
+ const match = /^\d+ blob ([0-9a-f]+)\s+(\d+)\t/.exec(line);
8814
+ if (!match) return void 0;
8815
+ return { hash: match[1], size: Number(match[2]) };
8816
+ }
8817
+ async function respondCommitFile(req, res, { cwd, target }, commit2) {
8818
+ try {
8819
+ const scope = await resolveDiffScope(
8820
+ cwd,
8821
+ getConversationParam(req),
8822
+ commit2
8823
+ );
8824
+ if (scope?.kind !== "commit") {
8825
+ respondJson(res, 400, { error: "Invalid commit" });
8826
+ return;
8827
+ }
8828
+ const path118 = relative(cwd, target).split(sep).join("/");
8829
+ const blob = await commitBlob(cwd, scope.sha, path118);
8830
+ if (!blob) {
8831
+ respondJson(res, 404, { error: "File not found" });
8832
+ return;
8833
+ }
8834
+ if (blob.size > MAX_FILE_BYTES) {
8835
+ respondJson(res, 413, { error: "File too large" });
8836
+ return;
8837
+ }
8838
+ const content = await execGit(cwd, ["cat-file", "blob", blob.hash], {
8839
+ maxBuffer: MAX_FILE_BYTES + 1
8840
+ });
8841
+ respondJson(res, 200, { content, mtimeMs: 0 });
8842
+ } catch {
8843
+ respondJson(res, 404, { error: "File not found" });
8844
+ }
8845
+ }
8846
+
8793
8847
  // src/commands/sessions/web/resolveWithinCwd.ts
8794
- import { isAbsolute as isAbsolute2, relative, resolve as resolve4 } from "path";
8848
+ import { isAbsolute as isAbsolute2, relative as relative2, resolve as resolve4 } from "path";
8795
8849
  function repoRoot2(cwd) {
8796
8850
  return resolve4(cwd);
8797
8851
  }
8798
8852
  function resolveWithinCwd(cwd, path118) {
8799
8853
  const root2 = repoRoot2(cwd);
8800
8854
  const target = resolve4(root2, path118);
8801
- const rel = relative(root2, target);
8855
+ const rel = relative2(root2, target);
8802
8856
  if (rel === "" || rel.startsWith("..") || isAbsolute2(rel)) return null;
8803
8857
  return target;
8804
8858
  }
@@ -8823,10 +8877,16 @@ function getFileTarget(req, res) {
8823
8877
  }
8824
8878
 
8825
8879
  // src/commands/sessions/web/fileContent.ts
8826
- var MAX_FILE_BYTES = 2 * 1024 * 1024;
8827
8880
  async function fileContent(req, res) {
8828
8881
  const resolved = getFileTarget(req, res);
8829
8882
  if (!resolved) return;
8883
+ const commit2 = new URL(req.url ?? "/", "http://localhost").searchParams.get(
8884
+ "commit"
8885
+ );
8886
+ if (commit2) {
8887
+ await respondCommitFile(req, res, resolved, commit2);
8888
+ return;
8889
+ }
8830
8890
  try {
8831
8891
  const info = await stat(resolved.target);
8832
8892
  if (!info.isFile()) {
@@ -10886,7 +10946,7 @@ function getHtml() {
10886
10946
  }
10887
10947
 
10888
10948
  // src/shared/resolveRunConfigs.ts
10889
- import { dirname as dirname10, relative as relative2, resolve as resolve7 } from "path";
10949
+ import { dirname as dirname10, relative as relative3, resolve as resolve7 } from "path";
10890
10950
 
10891
10951
  // src/shared/assertNoDuplicateRunNames.ts
10892
10952
  function findDuplicateNames(configs) {
@@ -10945,7 +11005,7 @@ function setDefaultCwd(configs, defaultCwd) {
10945
11005
  return configs.map((c) => c.cwd ? c : { ...c, cwd: defaultCwd });
10946
11006
  }
10947
11007
  function relativeToRoot(ctx, absolute2) {
10948
- return relative2(ctx.rootConfigDir, absolute2);
11008
+ return relative3(ctx.rootConfigDir, absolute2);
10949
11009
  }
10950
11010
  function loadAndResolveLink(linkPath, configDir, ctx) {
10951
11011
  const configPath = findLinkedConfigPath(linkPath, configDir);
@@ -14192,10 +14252,10 @@ import { createReadStream as createReadStream2 } from "fs";
14192
14252
  import { stat as stat2 } from "fs/promises";
14193
14253
 
14194
14254
  // src/shared/isStagedAttachmentPath.ts
14195
- import { isAbsolute as isAbsolute3, relative as relative3, resolve as resolve9, sep } from "path";
14255
+ import { isAbsolute as isAbsolute3, relative as relative4, resolve as resolve9, sep as sep2 } from "path";
14196
14256
  function isStagedAttachmentPath(path118) {
14197
- const rel = relative3(stagedAttachmentsDir, resolve9(path118));
14198
- return rel !== "" && rel !== ".." && !rel.startsWith(`..${sep}`) && !isAbsolute3(rel);
14257
+ const rel = relative4(stagedAttachmentsDir, resolve9(path118));
14258
+ return rel !== "" && rel !== ".." && !rel.startsWith(`..${sep2}`) && !isAbsolute3(rel);
14199
14259
  }
14200
14260
 
14201
14261
  // src/commands/sessions/web/attachmentContentType.ts
@@ -14965,7 +15025,7 @@ async function performRestart(target, deps2 = {}) {
14965
15025
  }
14966
15026
 
14967
15027
  // src/commands/sessions/web/revertDiffFile.ts
14968
- import { relative as relative4 } from "path";
15028
+ import { relative as relative5 } from "path";
14969
15029
 
14970
15030
  // src/commands/sessions/web/revertPathChanges.ts
14971
15031
  function git(cwd, args) {
@@ -15032,7 +15092,7 @@ async function revertPathChanges(cwd, path118) {
15032
15092
  async function revertDiffFile(req, res) {
15033
15093
  const resolved = getFileTarget(req, res);
15034
15094
  if (!resolved) return;
15035
- const path118 = relative4(repoRoot2(resolved.cwd), resolved.target);
15095
+ const path118 = relative5(repoRoot2(resolved.cwd), resolved.target);
15036
15096
  try {
15037
15097
  await revertPathChanges(resolved.cwd, path118);
15038
15098
  respondJson(res, 200, { reverted: path118 });
@@ -15143,7 +15203,7 @@ async function selfUpdate(req, res, deps2 = {}) {
15143
15203
  }
15144
15204
 
15145
15205
  // src/commands/sessions/web/revertDiffPaths.ts
15146
- import { relative as relative5 } from "path";
15206
+ import { relative as relative6 } from "path";
15147
15207
  function requestedPaths(body) {
15148
15208
  const paths = body.paths;
15149
15209
  if (!Array.isArray(paths)) return null;
@@ -15173,7 +15233,7 @@ async function revertDiffPaths(req, res) {
15173
15233
  failed3.push({ path: path118, error: "Path outside cwd" });
15174
15234
  continue;
15175
15235
  }
15176
- const relativePath = relative5(root2, target);
15236
+ const relativePath = relative6(root2, target);
15177
15237
  try {
15178
15238
  await revertPathChanges(cwd, relativePath);
15179
15239
  reverted.push(relativePath);
@@ -23993,11 +24053,12 @@ function stopWatching() {
23993
24053
  async function launchPhaseClaude(prompt, spawnOptions, context, harness) {
23994
24054
  const adapter = harnessAdapter(harness);
23995
24055
  const cwd = process.cwd();
23996
- const { allowEdits, resumeSessionId, sessionId: sessionId2 } = spawnOptions;
24056
+ const { allowEdits, resumeSessionId, sessionId: sessionId2, model } = spawnOptions;
23997
24057
  const { child: child2, done: done2 } = resumeSessionId ? adapter.resume(resumeSessionId, prompt, { cwd, allowEdits }) : adapter.launchPrompt(prompt, {
23998
24058
  cwd,
23999
24059
  allowEdits,
24000
- conversationId: sessionId2
24060
+ conversationId: sessionId2,
24061
+ model
24001
24062
  });
24002
24063
  watchForMarker(child2);
24003
24064
  const exitCode = await awaitHarness(done2, context, adapter.label);
@@ -24758,7 +24819,8 @@ function spawnLaunch(adapter, slashCommand, request) {
24758
24819
  const args = [...inline, request.description?.trim()].filter(Boolean).join(" ");
24759
24820
  return adapter.launchSkill(skill, args || void 0, {
24760
24821
  conversationId,
24761
- cwd
24822
+ cwd,
24823
+ model: request.model
24762
24824
  });
24763
24825
  }
24764
24826
 
@@ -24904,20 +24966,33 @@ function registerRewindCommand(cmd) {
24904
24966
  cmd.command("rewind <id> <phase>").description("Rewind a backlog item to an earlier phase").requiredOption("--reason <reason>", "Reason for rewinding").action(rewindPhase);
24905
24967
  }
24906
24968
 
24969
+ // src/commands/backlog/resolveModel.ts
24970
+ function resolveModel(value, type, harness) {
24971
+ if (value === false) return void 0;
24972
+ if (value) return value;
24973
+ if (resolveHarness2(void 0, type) !== harness) return void 0;
24974
+ return loadConfig().harness.defaults?.[type]?.model;
24975
+ }
24976
+
24907
24977
  // src/commands/backlog/registerRunCommand.ts
24908
24978
  function registerRunCommand(cmd) {
24909
24979
  const command = cmd.command("run <id>").description("Run a backlog item's plan phase-by-phase").option("-w, --write", "Run the harness with write access (default)").option("--no-write", "Run the harness without write access").option(
24910
24980
  "--harness <harness>",
24911
24981
  "Coding harness to launch (claude|codex|pi); defaults to the configured harness.defaults.run.harness, then harness.engine"
24912
24982
  ).option(
24983
+ "--model <model>",
24984
+ "Model to launch the harness with; defaults to harness.defaults.run.model while the run type's harness is used"
24985
+ ).option("--no-model", "Launch with the harness's own default model").option(
24913
24986
  "--resume-session <id>",
24914
24987
  "Resume an interrupted Claude session for the current phase (used by the sessions daemon on restart)"
24915
24988
  ).action(
24916
24989
  async (id, opts) => {
24917
24990
  if (!opts.resumeSession) await pullIfConfigured();
24991
+ const harness = resolveHarness2(opts.harness, "run");
24918
24992
  await run3(id, {
24919
24993
  allowEdits: opts.write !== false,
24920
- harness: resolveHarness2(opts.harness, "run"),
24994
+ harness,
24995
+ model: resolveModel(opts.model, "run", harness),
24921
24996
  resumeSessionId: opts.resumeSession
24922
24997
  });
24923
24998
  }
@@ -26812,7 +26887,7 @@ function findTruncatedReadDenyRaw(rawCommand) {
26812
26887
  }
26813
26888
 
26814
26889
  // src/shared/isApprovedRead.ts
26815
- import { resolve as resolve19, sep as sep2 } from "path";
26890
+ import { resolve as resolve19, sep as sep3 } from "path";
26816
26891
 
26817
26892
  // src/shared/appliesFixStructure.ts
26818
26893
  var APPLY_RE = /^assist\s+github\s+issue\s+fix-structure\b.*\s--apply\b/;
@@ -27093,7 +27168,7 @@ function isCdToReadAllowedDir(command) {
27093
27168
  const base = globBaseDir(m[1]);
27094
27169
  if (!base) continue;
27095
27170
  const resolved = resolve19(normalizeMsysPath(base));
27096
- if (target === resolved || target.startsWith(resolved + sep2)) {
27171
+ if (target === resolved || target.startsWith(resolved + sep3)) {
27097
27172
  return `cd to Read-allowed directory: ${entry}`;
27098
27173
  }
27099
27174
  }
@@ -27216,7 +27291,7 @@ ${questionsJson}`
27216
27291
  }
27217
27292
 
27218
27293
  // src/commands/backlog/isDocsPath.ts
27219
- import { relative as relative6, resolve as resolve20 } from "path";
27294
+ import { relative as relative7, resolve as resolve20 } from "path";
27220
27295
  var LOCKED_DOCS_DIRS = ["docs/src/content/docs/", "docs/public/screenshots/"];
27221
27296
  var DOCS_LOCK_REASON = `Docs pages and screenshots (${LOCKED_DOCS_DIRS.join(", ")}) are locked during development: they are updated by the Refresh docs backlog item after stories ship, not during development. Leave them untouched and carry on with the phase. If this phase genuinely needs to change docs (e.g. the item is about the docs site itself), first confirm that with the user, then run \`assist docs unlock\` and wait for the user to confirm the PIN with \`assist docs confirm <pin>\` before retrying. The unlock applies to the current phase only.`;
27222
27297
  var SEP = String.raw`[/\\]`;
@@ -27232,7 +27307,7 @@ function isLockedDocsRelativePath(rel) {
27232
27307
  return LOCKED_DOCS_DIRS.some((dir) => normalized.startsWith(dir));
27233
27308
  }
27234
27309
  function isDocsPath(filePath, root2 = getProjectRoot()) {
27235
- return isLockedDocsRelativePath(relative6(root2, resolve20(root2, filePath)));
27310
+ return isLockedDocsRelativePath(relative7(root2, resolve20(root2, filePath)));
27236
27311
  }
27237
27312
  function mentionsDocsPath(command, root2 = getProjectRoot()) {
27238
27313
  if (RELATIVE_DOCS.test(command)) return true;
@@ -27256,7 +27331,7 @@ function findDocsPathDeny(toolName, rawCommand, root2) {
27256
27331
 
27257
27332
  // src/commands/schema/isSchemaPath.ts
27258
27333
  import { readFileSync as readFileSync39 } from "fs";
27259
- import { relative as relative7, resolve as resolve21 } from "path";
27334
+ import { relative as relative8, resolve as resolve21 } from "path";
27260
27335
  var SCHEMA_LOCK_REASON = "Database schema files (src/shared/db/migrations/migrationNNNN*.ts, src/shared/db/migrations.ts, src/shared/db/schema.ts and any src/shared/db/*.ts that defines a pgTable) are locked: a schema change needs the user's sign-off (see src/shared/db/CLAUDE.md). Confirm the schema change with the user first, then run `assist schema unlock` to request a PIN and wait for the user to confirm it with `assist schema confirm <pin>` before retrying. In a backlog item session the unlock lasts for the current phase on this harness; otherwise it lasts for this conversation only.";
27261
27336
  var FIXED_SCHEMA_PATH = /^src\/shared\/db\/(?:migrations\/migration\d{4}[^/]*\.ts|migrations\.ts|schema\.ts)$/;
27262
27337
  var DB_MODULE = /^src\/shared\/db\/[^/]+\.ts$/;
@@ -27277,7 +27352,7 @@ function isSchemaRelativePath(rel, root2, incomingContents3 = []) {
27277
27352
  }
27278
27353
  function isSchemaPath(filePath, incomingContents3 = [], root2 = getProjectRoot()) {
27279
27354
  return isSchemaRelativePath(
27280
- relative7(root2, resolve21(root2, filePath)),
27355
+ relative8(root2, resolve21(root2, filePath)),
27281
27356
  root2,
27282
27357
  incomingContents3
27283
27358
  );
@@ -36994,9 +37069,9 @@ import { dirname as dirname40, join as join89 } from "path";
36994
37069
  import { resolve as resolve22 } from "path";
36995
37070
 
36996
37071
  // src/commands/sessions/daemon/worktree/enclosingPaths.ts
36997
- import { isAbsolute as isAbsolute4, relative as relative8 } from "path";
37072
+ import { isAbsolute as isAbsolute4, relative as relative9 } from "path";
36998
37073
  function isWithin(dir, parent) {
36999
- const rel = relative8(parent, dir);
37074
+ const rel = relative9(parent, dir);
37000
37075
  return rel === "" || !rel.startsWith("..") && !isAbsolute4(rel);
37001
37076
  }
37002
37077
  function enclosingPaths(dirs) {
@@ -37601,15 +37676,20 @@ function registerDescriptionLaunch(program, name2, slashCommand, description, fe
37601
37676
  const command = program.command(name2).argument(
37602
37677
  "[description]",
37603
37678
  `Text to forward to the /${slashCommand} slash command`
37604
- ).description(description).option("--once", "Exit when the initial task completes").option("--resume-session <id>", resumeFlag).option("--harness <kind>", harnessFlag(feature)).action(
37605
- (text19, opts) => launchMode(slashCommand, {
37679
+ ).description(description).option("--once", "Exit when the initial task completes").option("--resume-session <id>", resumeFlag).option("--harness <kind>", harnessFlag(feature)).option(
37680
+ "--model <model>",
37681
+ `Model to launch the harness with; defaults to harness.defaults.${name2}.model while the ${name2} type's harness is used`
37682
+ ).option("--no-model", "Launch with the harness's own default model").action((text19, opts) => {
37683
+ const harness = resolveHarness2(opts.harness, name2);
37684
+ return launchMode(slashCommand, {
37606
37685
  once: opts.once,
37607
37686
  description: text19,
37608
37687
  resumeSessionId: opts.resumeSession,
37609
- harness: resolveHarness2(opts.harness, name2),
37688
+ harness,
37689
+ model: resolveModel(opts.model, name2, harness),
37610
37690
  feature
37611
- })
37612
- );
37691
+ });
37692
+ });
37613
37693
  configHelp(command, [...harnessConfigHelp, ...harnessDefaultsConfigHelp]);
37614
37694
  if (alias) command.alias(alias);
37615
37695
  }
@@ -37914,7 +37994,7 @@ function emitExtract(out, header, texts) {
37914
37994
  }
37915
37995
 
37916
37996
  // src/commands/miro/resolveExtractPath.ts
37917
- import { isAbsolute as isAbsolute5, relative as relative9, resolve as resolve25 } from "path";
37997
+ import { isAbsolute as isAbsolute5, relative as relative10, resolve as resolve25 } from "path";
37918
37998
  function extractRoot(cwd) {
37919
37999
  return findConfigUp(cwd)?.rootDir ?? cwd;
37920
38000
  }
@@ -37925,7 +38005,7 @@ function resolveExtractPath(value, cwd) {
37925
38005
  function storedExtractPath(value, cwd) {
37926
38006
  if (value === void 0) return void 0;
37927
38007
  const absolute2 = resolve25(cwd, value);
37928
- const within2 = relative9(extractRoot(cwd), absolute2);
38008
+ const within2 = relative10(extractRoot(cwd), absolute2);
37929
38009
  return within2.startsWith("..") ? absolute2 : within2;
37930
38010
  }
37931
38011
 
@@ -49812,10 +49892,10 @@ function referencePatterns(path118, { home, cwd }) {
49812
49892
  const underHome = within(file, normalise(home));
49813
49893
  if (underHome) forms.push(`~/${escapeRegExp2(underHome)}`);
49814
49894
  const patterns = forms.map((form) => new RegExp(`${form}${NOT_AFTER}`));
49815
- const relative11 = within(file, normalise(cwd));
49816
- if (relative11)
49895
+ const relative12 = within(file, normalise(cwd));
49896
+ if (relative12)
49817
49897
  patterns.push(
49818
- new RegExp(`${NOT_BEFORE_RELATIVE}${escapeRegExp2(relative11)}${NOT_AFTER}`)
49898
+ new RegExp(`${NOT_BEFORE_RELATIVE}${escapeRegExp2(relative12)}${NOT_AFTER}`)
49819
49899
  );
49820
49900
  return patterns;
49821
49901
  }
@@ -50374,11 +50454,11 @@ function markdownNames(dir) {
50374
50454
  import * as os5 from "os";
50375
50455
  import * as path103 from "path";
50376
50456
  function homePath(harness, dest) {
50377
- const relative11 = path103.relative(
50457
+ const relative12 = path103.relative(
50378
50458
  os5.homedir(),
50379
50459
  path103.join(harness.homeDir, dest)
50380
50460
  );
50381
- return `~/${relative11.split(path103.sep).join("/")}`;
50461
+ return `~/${relative12.split(path103.sep).join("/")}`;
50382
50462
  }
50383
50463
  function renderHarnessPaths(content, harness) {
50384
50464
  const { sync: sync2 } = harness;
@@ -56142,7 +56222,7 @@ function closeGateApplies(sessions, session) {
56142
56222
 
56143
56223
  // src/commands/sessions/daemon/worktree/liveProcessesInTree.ts
56144
56224
  import { readdirSync as readdirSync30, readlinkSync } from "fs";
56145
- import { sep as sep5 } from "path";
56225
+ import { sep as sep6 } from "path";
56146
56226
 
56147
56227
  // src/commands/sessions/daemon/worktree/readProc.ts
56148
56228
  import { readFileSync as readFileSync85 } from "fs";
@@ -56173,7 +56253,7 @@ function liveProcessesInTree(treePath, procRoot = "/proc") {
56173
56253
  const pid = Number(entry);
56174
56254
  if (!Number.isInteger(pid) || pid === process.pid) continue;
56175
56255
  const cwd = processCwd(`${procRoot}/${entry}/cwd`);
56176
- if (cwd && (cwd === treePath || cwd.startsWith(treePath + sep5)) && !isCodexAppServer(pid, procRoot))
56256
+ if (cwd && (cwd === treePath || cwd.startsWith(treePath + sep6)) && !isCodexAppServer(pid, procRoot))
56177
56257
  pids.push(pid);
56178
56258
  }
56179
56259
  return pids;
@@ -58742,7 +58822,7 @@ function deferralNotice(persisted, cap2) {
58742
58822
  // src/commands/sessions/daemon/worktree/underTempRoot.ts
58743
58823
  import { realpathSync as realpathSync4 } from "fs";
58744
58824
  import { tmpdir as tmpdir9 } from "os";
58745
- import { sep as sep6 } from "path";
58825
+ import { sep as sep7 } from "path";
58746
58826
  function tempRoots() {
58747
58827
  const raw = tmpdir9();
58748
58828
  const roots = /* @__PURE__ */ new Set([raw]);
@@ -58755,7 +58835,7 @@ function tempRoots() {
58755
58835
  }
58756
58836
  function underTempRoot(path118) {
58757
58837
  return tempRoots().some(
58758
- (root2) => path118.startsWith(root2.endsWith(sep6) ? root2 : root2 + sep6)
58838
+ (root2) => path118.startsWith(root2.endsWith(sep7) ? root2 : root2 + sep7)
58759
58839
  );
58760
58840
  }
58761
58841
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.1117.1",
3
+ "version": "0.1118.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {