@staff0rd/assist 0.1117.0 → 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.0",
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) {
@@ -6918,7 +6921,11 @@ var harnessCapabilityDeclarations = {
6918
6921
  "Codex assigns its own conversation id when its rollout starts",
6919
6922
  "assist binds the Codex conversation id from the rollout after launch"
6920
6923
  ),
6921
- "systemPrompt.append": supported,
6924
+ "systemPrompt.append": unsupported(
6925
+ "Design launches on Codex have not passed manual testing: sessions arrived without the design prompt or stopped before designing anything",
6926
+ "start design sessions with Claude",
6927
+ "a1589"
6928
+ ),
6922
6929
  "tasks.notifyOnExit": unsupported(
6923
6930
  "Codex runs a background command in an exec session that reports nothing back once the turn ends, so review-high-level never sees the slicing request or the verdict",
6924
6931
  "run the high-level review on Claude",
@@ -7051,13 +7058,15 @@ var claudeAdapter = {
7051
7058
  reader: claudeConversationReader
7052
7059
  },
7053
7060
  toolOperations: claudeToolOperations,
7054
- launchSkill: (skill, args, { conversationId, allowEdits }) => spawnClaude2(buildSlashCommand(skill, args), {
7061
+ launchSkill: (skill, args, { conversationId, allowEdits, model }) => spawnClaude2(buildSlashCommand(skill, args), {
7055
7062
  allowEdits: allowEdits ?? true,
7056
- sessionId: conversationId
7063
+ sessionId: conversationId,
7064
+ model
7057
7065
  }),
7058
- launchPrompt: (prompt, { conversationId, allowEdits }) => spawnClaude2(prompt, {
7066
+ launchPrompt: (prompt, { conversationId, allowEdits, model }) => spawnClaude2(prompt, {
7059
7067
  allowEdits: allowEdits ?? true,
7060
- sessionId: conversationId
7068
+ sessionId: conversationId,
7069
+ model
7061
7070
  }),
7062
7071
  resume: (conversationId, nudge, { allowEdits }) => spawnClaude2(nudge, {
7063
7072
  allowEdits: allowEdits ?? true,
@@ -7908,7 +7917,7 @@ function spawnCodex2(prompt, options2 = {}) {
7908
7917
  options2.skill && `$${options2.skill}`,
7909
7918
  prompt && neutralizeCodexSkillMentions(prompt)
7910
7919
  ].filter(Boolean).join(" ");
7911
- const override = buildHarnessCodexArgs();
7920
+ const override = options2.model && !options2.resumeSessionId ? { args: ["-m", options2.model], env: {} } : buildHarnessCodexArgs();
7912
7921
  return spawnInherit(
7913
7922
  harnesses.codex.command,
7914
7923
  [
@@ -8193,8 +8202,13 @@ var codexAdapter = {
8193
8202
  },
8194
8203
  toolOperations: codexToolOperations,
8195
8204
  permissionRules: readCodexRulePerms,
8196
- launchSkill: (skill, args, { cwd, allowEdits }) => spawnCodex2(args ?? "", { cwd, sandbox: sandbox(allowEdits), skill }),
8197
- 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 }),
8198
8212
  resume: (conversationId, nudge, { cwd, allowEdits }) => spawnCodex2(nudge, {
8199
8213
  cwd,
8200
8214
  sandbox: sandbox(allowEdits),
@@ -8236,10 +8250,15 @@ function spawnPi(opts = {}) {
8236
8250
  // src/shared/spawnPi.ts
8237
8251
  function spawnPi2(prompt, options2 = {}) {
8238
8252
  const cwd = options2.cwd ?? process.cwd();
8239
- return spawnInherit(harnesses.pi.command, [...piTerminalArgs, prompt], {
8240
- cwd,
8241
- env: { ASSIST_HARNESS: "pi" }
8242
- });
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
+ );
8243
8262
  }
8244
8263
 
8245
8264
  // src/shared/harnessAdapters/piToolOperations.ts
@@ -8306,8 +8325,8 @@ var piAdapter = {
8306
8325
  relocate: cannotResume
8307
8326
  },
8308
8327
  toolOperations: piToolOperations,
8309
- launchSkill: (skill, args, { cwd }) => spawnPi2(buildSlashCommand(skill, args), { cwd }),
8310
- 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 }),
8311
8330
  resume: cannotResume,
8312
8331
  interactive: ({ sessionId: sessionId2, resumeId, prompt, cwd, model }) => resumeId ? cannotResume() : spawnPi({ prompt, cwd, sessionId: sessionId2, model }),
8313
8332
  oneShot: noOneShot,
@@ -8786,15 +8805,54 @@ async function docsFeedback(req, res) {
8786
8805
  // src/commands/sessions/web/fileContent.ts
8787
8806
  import { readFile, stat } from "fs/promises";
8788
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
+
8789
8847
  // src/commands/sessions/web/resolveWithinCwd.ts
8790
- import { isAbsolute as isAbsolute2, relative, resolve as resolve4 } from "path";
8848
+ import { isAbsolute as isAbsolute2, relative as relative2, resolve as resolve4 } from "path";
8791
8849
  function repoRoot2(cwd) {
8792
8850
  return resolve4(cwd);
8793
8851
  }
8794
8852
  function resolveWithinCwd(cwd, path118) {
8795
8853
  const root2 = repoRoot2(cwd);
8796
8854
  const target = resolve4(root2, path118);
8797
- const rel = relative(root2, target);
8855
+ const rel = relative2(root2, target);
8798
8856
  if (rel === "" || rel.startsWith("..") || isAbsolute2(rel)) return null;
8799
8857
  return target;
8800
8858
  }
@@ -8819,10 +8877,16 @@ function getFileTarget(req, res) {
8819
8877
  }
8820
8878
 
8821
8879
  // src/commands/sessions/web/fileContent.ts
8822
- var MAX_FILE_BYTES = 2 * 1024 * 1024;
8823
8880
  async function fileContent(req, res) {
8824
8881
  const resolved = getFileTarget(req, res);
8825
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
+ }
8826
8890
  try {
8827
8891
  const info = await stat(resolved.target);
8828
8892
  if (!info.isFile()) {
@@ -10882,7 +10946,7 @@ function getHtml() {
10882
10946
  }
10883
10947
 
10884
10948
  // src/shared/resolveRunConfigs.ts
10885
- 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";
10886
10950
 
10887
10951
  // src/shared/assertNoDuplicateRunNames.ts
10888
10952
  function findDuplicateNames(configs) {
@@ -10941,7 +11005,7 @@ function setDefaultCwd(configs, defaultCwd) {
10941
11005
  return configs.map((c) => c.cwd ? c : { ...c, cwd: defaultCwd });
10942
11006
  }
10943
11007
  function relativeToRoot(ctx, absolute2) {
10944
- return relative2(ctx.rootConfigDir, absolute2);
11008
+ return relative3(ctx.rootConfigDir, absolute2);
10945
11009
  }
10946
11010
  function loadAndResolveLink(linkPath, configDir, ctx) {
10947
11011
  const configPath = findLinkedConfigPath(linkPath, configDir);
@@ -14188,10 +14252,10 @@ import { createReadStream as createReadStream2 } from "fs";
14188
14252
  import { stat as stat2 } from "fs/promises";
14189
14253
 
14190
14254
  // src/shared/isStagedAttachmentPath.ts
14191
- 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";
14192
14256
  function isStagedAttachmentPath(path118) {
14193
- const rel = relative3(stagedAttachmentsDir, resolve9(path118));
14194
- return rel !== "" && rel !== ".." && !rel.startsWith(`..${sep}`) && !isAbsolute3(rel);
14257
+ const rel = relative4(stagedAttachmentsDir, resolve9(path118));
14258
+ return rel !== "" && rel !== ".." && !rel.startsWith(`..${sep2}`) && !isAbsolute3(rel);
14195
14259
  }
14196
14260
 
14197
14261
  // src/commands/sessions/web/attachmentContentType.ts
@@ -14961,7 +15025,7 @@ async function performRestart(target, deps2 = {}) {
14961
15025
  }
14962
15026
 
14963
15027
  // src/commands/sessions/web/revertDiffFile.ts
14964
- import { relative as relative4 } from "path";
15028
+ import { relative as relative5 } from "path";
14965
15029
 
14966
15030
  // src/commands/sessions/web/revertPathChanges.ts
14967
15031
  function git(cwd, args) {
@@ -15028,7 +15092,7 @@ async function revertPathChanges(cwd, path118) {
15028
15092
  async function revertDiffFile(req, res) {
15029
15093
  const resolved = getFileTarget(req, res);
15030
15094
  if (!resolved) return;
15031
- const path118 = relative4(repoRoot2(resolved.cwd), resolved.target);
15095
+ const path118 = relative5(repoRoot2(resolved.cwd), resolved.target);
15032
15096
  try {
15033
15097
  await revertPathChanges(resolved.cwd, path118);
15034
15098
  respondJson(res, 200, { reverted: path118 });
@@ -15139,7 +15203,7 @@ async function selfUpdate(req, res, deps2 = {}) {
15139
15203
  }
15140
15204
 
15141
15205
  // src/commands/sessions/web/revertDiffPaths.ts
15142
- import { relative as relative5 } from "path";
15206
+ import { relative as relative6 } from "path";
15143
15207
  function requestedPaths(body) {
15144
15208
  const paths = body.paths;
15145
15209
  if (!Array.isArray(paths)) return null;
@@ -15169,7 +15233,7 @@ async function revertDiffPaths(req, res) {
15169
15233
  failed3.push({ path: path118, error: "Path outside cwd" });
15170
15234
  continue;
15171
15235
  }
15172
- const relativePath = relative5(root2, target);
15236
+ const relativePath = relative6(root2, target);
15173
15237
  try {
15174
15238
  await revertPathChanges(cwd, relativePath);
15175
15239
  reverted.push(relativePath);
@@ -23989,11 +24053,12 @@ function stopWatching() {
23989
24053
  async function launchPhaseClaude(prompt, spawnOptions, context, harness) {
23990
24054
  const adapter = harnessAdapter(harness);
23991
24055
  const cwd = process.cwd();
23992
- const { allowEdits, resumeSessionId, sessionId: sessionId2 } = spawnOptions;
24056
+ const { allowEdits, resumeSessionId, sessionId: sessionId2, model } = spawnOptions;
23993
24057
  const { child: child2, done: done2 } = resumeSessionId ? adapter.resume(resumeSessionId, prompt, { cwd, allowEdits }) : adapter.launchPrompt(prompt, {
23994
24058
  cwd,
23995
24059
  allowEdits,
23996
- conversationId: sessionId2
24060
+ conversationId: sessionId2,
24061
+ model
23997
24062
  });
23998
24063
  watchForMarker(child2);
23999
24064
  const exitCode = await awaitHarness(done2, context, adapter.label);
@@ -24754,7 +24819,8 @@ function spawnLaunch(adapter, slashCommand, request) {
24754
24819
  const args = [...inline, request.description?.trim()].filter(Boolean).join(" ");
24755
24820
  return adapter.launchSkill(skill, args || void 0, {
24756
24821
  conversationId,
24757
- cwd
24822
+ cwd,
24823
+ model: request.model
24758
24824
  });
24759
24825
  }
24760
24826
 
@@ -24900,20 +24966,33 @@ function registerRewindCommand(cmd) {
24900
24966
  cmd.command("rewind <id> <phase>").description("Rewind a backlog item to an earlier phase").requiredOption("--reason <reason>", "Reason for rewinding").action(rewindPhase);
24901
24967
  }
24902
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
+
24903
24977
  // src/commands/backlog/registerRunCommand.ts
24904
24978
  function registerRunCommand(cmd) {
24905
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(
24906
24980
  "--harness <harness>",
24907
24981
  "Coding harness to launch (claude|codex|pi); defaults to the configured harness.defaults.run.harness, then harness.engine"
24908
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(
24909
24986
  "--resume-session <id>",
24910
24987
  "Resume an interrupted Claude session for the current phase (used by the sessions daemon on restart)"
24911
24988
  ).action(
24912
24989
  async (id, opts) => {
24913
24990
  if (!opts.resumeSession) await pullIfConfigured();
24991
+ const harness = resolveHarness2(opts.harness, "run");
24914
24992
  await run3(id, {
24915
24993
  allowEdits: opts.write !== false,
24916
- harness: resolveHarness2(opts.harness, "run"),
24994
+ harness,
24995
+ model: resolveModel(opts.model, "run", harness),
24917
24996
  resumeSessionId: opts.resumeSession
24918
24997
  });
24919
24998
  }
@@ -26808,7 +26887,7 @@ function findTruncatedReadDenyRaw(rawCommand) {
26808
26887
  }
26809
26888
 
26810
26889
  // src/shared/isApprovedRead.ts
26811
- import { resolve as resolve19, sep as sep2 } from "path";
26890
+ import { resolve as resolve19, sep as sep3 } from "path";
26812
26891
 
26813
26892
  // src/shared/appliesFixStructure.ts
26814
26893
  var APPLY_RE = /^assist\s+github\s+issue\s+fix-structure\b.*\s--apply\b/;
@@ -27089,7 +27168,7 @@ function isCdToReadAllowedDir(command) {
27089
27168
  const base = globBaseDir(m[1]);
27090
27169
  if (!base) continue;
27091
27170
  const resolved = resolve19(normalizeMsysPath(base));
27092
- if (target === resolved || target.startsWith(resolved + sep2)) {
27171
+ if (target === resolved || target.startsWith(resolved + sep3)) {
27093
27172
  return `cd to Read-allowed directory: ${entry}`;
27094
27173
  }
27095
27174
  }
@@ -27212,7 +27291,7 @@ ${questionsJson}`
27212
27291
  }
27213
27292
 
27214
27293
  // src/commands/backlog/isDocsPath.ts
27215
- import { relative as relative6, resolve as resolve20 } from "path";
27294
+ import { relative as relative7, resolve as resolve20 } from "path";
27216
27295
  var LOCKED_DOCS_DIRS = ["docs/src/content/docs/", "docs/public/screenshots/"];
27217
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.`;
27218
27297
  var SEP = String.raw`[/\\]`;
@@ -27228,7 +27307,7 @@ function isLockedDocsRelativePath(rel) {
27228
27307
  return LOCKED_DOCS_DIRS.some((dir) => normalized.startsWith(dir));
27229
27308
  }
27230
27309
  function isDocsPath(filePath, root2 = getProjectRoot()) {
27231
- return isLockedDocsRelativePath(relative6(root2, resolve20(root2, filePath)));
27310
+ return isLockedDocsRelativePath(relative7(root2, resolve20(root2, filePath)));
27232
27311
  }
27233
27312
  function mentionsDocsPath(command, root2 = getProjectRoot()) {
27234
27313
  if (RELATIVE_DOCS.test(command)) return true;
@@ -27252,7 +27331,7 @@ function findDocsPathDeny(toolName, rawCommand, root2) {
27252
27331
 
27253
27332
  // src/commands/schema/isSchemaPath.ts
27254
27333
  import { readFileSync as readFileSync39 } from "fs";
27255
- import { relative as relative7, resolve as resolve21 } from "path";
27334
+ import { relative as relative8, resolve as resolve21 } from "path";
27256
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.";
27257
27336
  var FIXED_SCHEMA_PATH = /^src\/shared\/db\/(?:migrations\/migration\d{4}[^/]*\.ts|migrations\.ts|schema\.ts)$/;
27258
27337
  var DB_MODULE = /^src\/shared\/db\/[^/]+\.ts$/;
@@ -27273,7 +27352,7 @@ function isSchemaRelativePath(rel, root2, incomingContents3 = []) {
27273
27352
  }
27274
27353
  function isSchemaPath(filePath, incomingContents3 = [], root2 = getProjectRoot()) {
27275
27354
  return isSchemaRelativePath(
27276
- relative7(root2, resolve21(root2, filePath)),
27355
+ relative8(root2, resolve21(root2, filePath)),
27277
27356
  root2,
27278
27357
  incomingContents3
27279
27358
  );
@@ -36990,9 +37069,9 @@ import { dirname as dirname40, join as join89 } from "path";
36990
37069
  import { resolve as resolve22 } from "path";
36991
37070
 
36992
37071
  // src/commands/sessions/daemon/worktree/enclosingPaths.ts
36993
- import { isAbsolute as isAbsolute4, relative as relative8 } from "path";
37072
+ import { isAbsolute as isAbsolute4, relative as relative9 } from "path";
36994
37073
  function isWithin(dir, parent) {
36995
- const rel = relative8(parent, dir);
37074
+ const rel = relative9(parent, dir);
36996
37075
  return rel === "" || !rel.startsWith("..") && !isAbsolute4(rel);
36997
37076
  }
36998
37077
  function enclosingPaths(dirs) {
@@ -37597,15 +37676,20 @@ function registerDescriptionLaunch(program, name2, slashCommand, description, fe
37597
37676
  const command = program.command(name2).argument(
37598
37677
  "[description]",
37599
37678
  `Text to forward to the /${slashCommand} slash command`
37600
- ).description(description).option("--once", "Exit when the initial task completes").option("--resume-session <id>", resumeFlag).option("--harness <kind>", harnessFlag(feature)).action(
37601
- (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, {
37602
37685
  once: opts.once,
37603
37686
  description: text19,
37604
37687
  resumeSessionId: opts.resumeSession,
37605
- harness: resolveHarness2(opts.harness, name2),
37688
+ harness,
37689
+ model: resolveModel(opts.model, name2, harness),
37606
37690
  feature
37607
- })
37608
- );
37691
+ });
37692
+ });
37609
37693
  configHelp(command, [...harnessConfigHelp, ...harnessDefaultsConfigHelp]);
37610
37694
  if (alias) command.alias(alias);
37611
37695
  }
@@ -37910,7 +37994,7 @@ function emitExtract(out, header, texts) {
37910
37994
  }
37911
37995
 
37912
37996
  // src/commands/miro/resolveExtractPath.ts
37913
- 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";
37914
37998
  function extractRoot(cwd) {
37915
37999
  return findConfigUp(cwd)?.rootDir ?? cwd;
37916
38000
  }
@@ -37921,7 +38005,7 @@ function resolveExtractPath(value, cwd) {
37921
38005
  function storedExtractPath(value, cwd) {
37922
38006
  if (value === void 0) return void 0;
37923
38007
  const absolute2 = resolve25(cwd, value);
37924
- const within2 = relative9(extractRoot(cwd), absolute2);
38008
+ const within2 = relative10(extractRoot(cwd), absolute2);
37925
38009
  return within2.startsWith("..") ? absolute2 : within2;
37926
38010
  }
37927
38011
 
@@ -49808,10 +49892,10 @@ function referencePatterns(path118, { home, cwd }) {
49808
49892
  const underHome = within(file, normalise(home));
49809
49893
  if (underHome) forms.push(`~/${escapeRegExp2(underHome)}`);
49810
49894
  const patterns = forms.map((form) => new RegExp(`${form}${NOT_AFTER}`));
49811
- const relative11 = within(file, normalise(cwd));
49812
- if (relative11)
49895
+ const relative12 = within(file, normalise(cwd));
49896
+ if (relative12)
49813
49897
  patterns.push(
49814
- new RegExp(`${NOT_BEFORE_RELATIVE}${escapeRegExp2(relative11)}${NOT_AFTER}`)
49898
+ new RegExp(`${NOT_BEFORE_RELATIVE}${escapeRegExp2(relative12)}${NOT_AFTER}`)
49815
49899
  );
49816
49900
  return patterns;
49817
49901
  }
@@ -50370,11 +50454,11 @@ function markdownNames(dir) {
50370
50454
  import * as os5 from "os";
50371
50455
  import * as path103 from "path";
50372
50456
  function homePath(harness, dest) {
50373
- const relative11 = path103.relative(
50457
+ const relative12 = path103.relative(
50374
50458
  os5.homedir(),
50375
50459
  path103.join(harness.homeDir, dest)
50376
50460
  );
50377
- return `~/${relative11.split(path103.sep).join("/")}`;
50461
+ return `~/${relative12.split(path103.sep).join("/")}`;
50378
50462
  }
50379
50463
  function renderHarnessPaths(content, harness) {
50380
50464
  const { sync: sync2 } = harness;
@@ -56138,7 +56222,7 @@ function closeGateApplies(sessions, session) {
56138
56222
 
56139
56223
  // src/commands/sessions/daemon/worktree/liveProcessesInTree.ts
56140
56224
  import { readdirSync as readdirSync30, readlinkSync } from "fs";
56141
- import { sep as sep5 } from "path";
56225
+ import { sep as sep6 } from "path";
56142
56226
 
56143
56227
  // src/commands/sessions/daemon/worktree/readProc.ts
56144
56228
  import { readFileSync as readFileSync85 } from "fs";
@@ -56169,7 +56253,7 @@ function liveProcessesInTree(treePath, procRoot = "/proc") {
56169
56253
  const pid = Number(entry);
56170
56254
  if (!Number.isInteger(pid) || pid === process.pid) continue;
56171
56255
  const cwd = processCwd(`${procRoot}/${entry}/cwd`);
56172
- if (cwd && (cwd === treePath || cwd.startsWith(treePath + sep5)) && !isCodexAppServer(pid, procRoot))
56256
+ if (cwd && (cwd === treePath || cwd.startsWith(treePath + sep6)) && !isCodexAppServer(pid, procRoot))
56173
56257
  pids.push(pid);
56174
56258
  }
56175
56259
  return pids;
@@ -58738,7 +58822,7 @@ function deferralNotice(persisted, cap2) {
58738
58822
  // src/commands/sessions/daemon/worktree/underTempRoot.ts
58739
58823
  import { realpathSync as realpathSync4 } from "fs";
58740
58824
  import { tmpdir as tmpdir9 } from "os";
58741
- import { sep as sep6 } from "path";
58825
+ import { sep as sep7 } from "path";
58742
58826
  function tempRoots() {
58743
58827
  const raw = tmpdir9();
58744
58828
  const roots = /* @__PURE__ */ new Set([raw]);
@@ -58751,7 +58835,7 @@ function tempRoots() {
58751
58835
  }
58752
58836
  function underTempRoot(path118) {
58753
58837
  return tempRoots().some(
58754
- (root2) => path118.startsWith(root2.endsWith(sep6) ? root2 : root2 + sep6)
58838
+ (root2) => path118.startsWith(root2.endsWith(sep7) ? root2 : root2 + sep7)
58755
58839
  );
58756
58840
  }
58757
58841
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.1117.0",
3
+ "version": "0.1118.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {