@fro.bot/systematic 3.20.0 → 3.21.1

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
@@ -659,24 +659,11 @@ function collectSkillsAsCommands(dir, disabledSkills) {
659
659
  }
660
660
  function loadDiscoveredSkillAsCommand(skill) {
661
661
  const description = skill.description || `${skill.name} skill`;
662
- if (skill.frontmatter.disableModelInvocation === true) {
663
- return {
664
- template: wrapSkillTemplate(skill.skillPath, skill.body),
665
- description
666
- };
667
- }
668
662
  return {
669
- template: buildDiscoveredSkillShimTemplate(skill.name),
663
+ template: wrapSkillTemplate(skill.skillPath, skill.body),
670
664
  description
671
665
  };
672
666
  }
673
- function buildDiscoveredSkillShimTemplate(skillName) {
674
- return `Load the "${skillName}" skill using the skill tool, then follow its instructions to address this request:
675
-
676
- <user-request>
677
- $ARGUMENTS
678
- </user-request>`;
679
- }
680
667
  function collectDiscoveredSkillsAsCommands(startDir, homeDir, configDir, opencodeConfigDirOverride, disabledCommands) {
681
668
  const commands = {};
682
669
  let discovered;
@@ -10409,12 +10396,13 @@ function parseHostAfter(input) {
10409
10396
  return;
10410
10397
  return { ...before, args: input.args };
10411
10398
  }
10412
- function parseHostOutput(output) {
10399
+ function parseHostOutput(output, options) {
10413
10400
  if (!isRecord7(output))
10414
10401
  return;
10415
10402
  const title = output.title === undefined ? "" : output.title;
10416
10403
  const result = output.output === undefined ? "" : output.output;
10417
- if (typeof title !== "string" || title.length > MAX_STATUS_LENGTH || typeof result !== "string" || result.length > MAX_HOST_OUTPUT_LENGTH || !("metadata" in output)) {
10404
+ const maxOutputLength = options?.maxOutputLength ?? MAX_HOST_OUTPUT_LENGTH;
10405
+ if (typeof title !== "string" || title.length > MAX_STATUS_LENGTH || typeof result !== "string" || result.length > maxOutputLength || !("metadata" in output)) {
10418
10406
  return;
10419
10407
  }
10420
10408
  if (isRecord7(output.metadata)) {
@@ -10847,6 +10835,9 @@ function remoteReadbackInput(operation, local, workspaceIdentity, snapshot, incl
10847
10835
  function isSuccessfulAfter(output) {
10848
10836
  return parseHostOutput(output) !== undefined;
10849
10837
  }
10838
+ function isSuccessfulSkillAfter(output) {
10839
+ return parseHostOutput(output, { maxOutputLength: Number.POSITIVE_INFINITY }) !== undefined;
10840
+ }
10850
10841
  function statusForTool(status, unavailableCause) {
10851
10842
  return JSON.stringify({
10852
10843
  state: status.state,
@@ -11295,23 +11286,27 @@ function createSessionRuntime(options, operationObservers, recoveredOperationCon
11295
11286
  mode: options.config.mode === "disabled" ? "disabled" : "protected"
11296
11287
  });
11297
11288
  }
11298
- function publishUnavailable() {
11299
- ledger = createReceiptLedger({
11289
+ function mintLedger() {
11290
+ return createReceiptLedger({
11300
11291
  capabilityFlags: ["workflow-guard"],
11301
11292
  registrationIdentity: options.registrationIdentity,
11302
11293
  sessionSalt: options.sessionSalt ? new Uint8Array(options.sessionSalt) : randomBytes4(32)
11303
11294
  });
11295
+ }
11296
+ let emptyHistoryLedger;
11297
+ function emptyHistoryLedgerForRetry() {
11298
+ emptyHistoryLedger ??= mintLedger();
11299
+ return emptyHistoryLedger;
11300
+ }
11301
+ function publishUnavailable(reusableLedger) {
11302
+ ledger = reusableLedger ?? mintLedger();
11304
11303
  guard = createGuard(ledger);
11305
11304
  if (options.config.mode !== "disabled")
11306
11305
  guard.setMode({ mode: "unavailable" });
11307
11306
  initialized = true;
11308
11307
  }
11309
- function publishFresh() {
11310
- ledger = createReceiptLedger({
11311
- capabilityFlags: ["workflow-guard"],
11312
- registrationIdentity: options.registrationIdentity,
11313
- sessionSalt: options.sessionSalt ? new Uint8Array(options.sessionSalt) : randomBytes4(32)
11314
- });
11308
+ function publishFresh(reusableLedger) {
11309
+ ledger = reusableLedger ?? mintLedger();
11315
11310
  guard = createGuard(ledger);
11316
11311
  initialized = true;
11317
11312
  }
@@ -11426,11 +11421,12 @@ function createSessionRuntime(options, operationObservers, recoveredOperationCon
11426
11421
  return { kind: "foreign-empty" };
11427
11422
  }
11428
11423
  function publishEmptyMarkers(parts2, allowFresh) {
11424
+ const reusableLedger = emptyHistoryLedgerForRetry();
11429
11425
  if (allowFresh && !parts2.some((part) => containsGuardHistory(part))) {
11430
- publishFresh();
11426
+ publishFresh(reusableLedger);
11431
11427
  } else {
11432
11428
  retryableEmptyHistory = true;
11433
- publishUnavailable();
11429
+ publishUnavailable(reusableLedger);
11434
11430
  }
11435
11431
  }
11436
11432
  async function initializeSession(sessionID, allowFresh) {
@@ -12271,7 +12267,7 @@ function createSessionRuntime(options, operationObservers, recoveredOperationCon
12271
12267
  markUnavailable();
12272
12268
  return;
12273
12269
  }
12274
- if (!isSuccessfulAfter(output))
12270
+ if (!isSuccessfulSkillAfter(output))
12275
12271
  return;
12276
12272
  completedSkillCalls.set(callDigest, pending.skill);
12277
12273
  await activateCompletedSkill(pending.skill);
@@ -12896,6 +12892,8 @@ ${marker}` : marker;
12896
12892
  return;
12897
12893
  await recoverFromHost(input.sessionID, false);
12898
12894
  abandonPending();
12895
+ if (options.config.mode === "disabled")
12896
+ return;
12899
12897
  if (!isRecord7(output) || !Array.isArray(output.system))
12900
12898
  return;
12901
12899
  const existingSystem = output.system.filter((entry) => typeof entry === "string");
@@ -13218,8 +13216,40 @@ function buildSkillToolParameterHint(options) {
13218
13216
  const hint = examples.length > 0 ? ` (e.g., ${examples}, ...)` : "";
13219
13217
  return `The name of the skill from available_skills${hint}`;
13220
13218
  }
13221
- function buildSkillContentOutput(matchedSkill) {
13222
- const body2 = extractSkillBody(matchedSkill.wrappedTemplate);
13219
+ function parsePositionalArgs(raw) {
13220
+ const matches = raw.match(/(?:\[Image\s+\d+\]|"[^"]*"|'[^']*'|[^\s"']+)/gi);
13221
+ if (!matches)
13222
+ return [];
13223
+ return matches.map((token) => token.replace(/^["']|["']$/g, ""));
13224
+ }
13225
+ function substituteSkillArguments(body2, raw) {
13226
+ const placeholderNumbers = [...body2.matchAll(/\$(\d+)/g)].map((m) => Number(m[1]));
13227
+ const hasPositional = placeholderNumbers.length > 0;
13228
+ const hasArguments = body2.includes("$ARGUMENTS");
13229
+ let result = body2;
13230
+ if (hasPositional) {
13231
+ const last = Math.max(...placeholderNumbers);
13232
+ const args2 = parsePositionalArgs(raw);
13233
+ result = result.replace(/\$(\d+)/g, (_match, numStr) => {
13234
+ const n = Number(numStr);
13235
+ if (n - 1 >= args2.length)
13236
+ return "";
13237
+ if (n === last)
13238
+ return args2.slice(n - 1).join(" ");
13239
+ return args2[n - 1] ?? "";
13240
+ });
13241
+ }
13242
+ result = result.replaceAll("$ARGUMENTS", raw);
13243
+ if (!hasPositional && !hasArguments && raw.trim().length > 0) {
13244
+ result = `${result}
13245
+
13246
+ ${raw}`;
13247
+ }
13248
+ return result;
13249
+ }
13250
+ function buildSkillContentOutput(matchedSkill, argument) {
13251
+ const trimmedBody = extractSkillBody(matchedSkill.wrappedTemplate).trim();
13252
+ const body2 = argument === undefined ? trimmedBody : substituteSkillArguments(trimmedBody, argument);
13223
13253
  const dir = path7.dirname(matchedSkill.skillFile);
13224
13254
  const base = pathToFileURL(dir).href;
13225
13255
  const files = discoverSkillFiles(dir);
@@ -13227,7 +13257,7 @@ function buildSkillContentOutput(matchedSkill) {
13227
13257
  `<skill_content name="${matchedSkill.prefixedName}">`,
13228
13258
  `# Skill: ${matchedSkill.prefixedName}`,
13229
13259
  "",
13230
- body2.trim(),
13260
+ body2,
13231
13261
  "",
13232
13262
  `Base directory for this skill: ${base}`,
13233
13263
  "Relative paths in this skill (e.g., scripts/, reference/) are relative to this base directory.",
@@ -13275,8 +13305,72 @@ function discoverSkillFiles(dir, limit = 10) {
13275
13305
  }
13276
13306
 
13277
13307
  // src/lib/skill-tool.ts
13308
+ var DEFAULT_MAX_ENTRIES = 32;
13309
+ var DEFAULT_TTL_MS = 300000;
13310
+ var STORE_KEY_DELIMITER = "\x00";
13311
+ function createSkillOutputStore(options) {
13312
+ const maxEntries = options?.maxEntries ?? DEFAULT_MAX_ENTRIES;
13313
+ const ttlMs = options?.ttlMs ?? DEFAULT_TTL_MS;
13314
+ const now = options?.now ?? Date.now;
13315
+ const entries = new Map;
13316
+ const toKey = (sessionID, callID) => `${sessionID}${STORE_KEY_DELIMITER}${callID}`;
13317
+ return {
13318
+ put(sessionID, callID, output) {
13319
+ const key = toKey(sessionID, callID);
13320
+ entries.delete(key);
13321
+ entries.set(key, { output, expiresAt: now() + ttlMs });
13322
+ while (entries.size > maxEntries) {
13323
+ const oldestKey = entries.keys().next().value;
13324
+ if (oldestKey === undefined)
13325
+ break;
13326
+ entries.delete(oldestKey);
13327
+ }
13328
+ },
13329
+ take(sessionID, callID) {
13330
+ const key = toKey(sessionID, callID);
13331
+ const entry = entries.get(key);
13332
+ entries.delete(key);
13333
+ if (!entry)
13334
+ return;
13335
+ if (now() > entry.expiresAt)
13336
+ return;
13337
+ return entry.output;
13338
+ }
13339
+ };
13340
+ }
13341
+ var TRUNCATION_MARKER_RE = /\n\n\.\.\.\d+ (?:lines|bytes) truncated\.\.\.\n\n/g;
13342
+ function restoreSkillOutput(store, input, output, options) {
13343
+ if (!isRecord(input) || input.tool !== "systematic_skill")
13344
+ return;
13345
+ const { sessionID, callID } = input;
13346
+ if (typeof sessionID !== "string" || sessionID === "")
13347
+ return;
13348
+ if (typeof callID !== "string" || callID === "")
13349
+ return;
13350
+ const full = store.take(sessionID, callID);
13351
+ if (!full)
13352
+ return;
13353
+ if (options.userOutputLimitSet)
13354
+ return;
13355
+ if (!isRecord(output))
13356
+ return;
13357
+ if (!isRecord(output.metadata) || output.metadata.truncated !== true)
13358
+ return;
13359
+ if (typeof output.output !== "string")
13360
+ return;
13361
+ const matches = [...output.output.matchAll(TRUNCATION_MARKER_RE)];
13362
+ const lastMatch = matches.at(-1);
13363
+ if (!lastMatch || lastMatch.index === undefined)
13364
+ return;
13365
+ const preview = output.output.slice(0, lastMatch.index);
13366
+ if (!full.startsWith(preview))
13367
+ return;
13368
+ output.output = full;
13369
+ output.metadata.truncated = false;
13370
+ delete output.metadata.outputPath;
13371
+ }
13278
13372
  function createSkillTool(options) {
13279
- const { bundledSkillsDir, disabledSkills } = options;
13373
+ const { bundledSkillsDir, disabledSkills, outputStore } = options;
13280
13374
  const buildDescription = () => buildSkillToolDescription({ bundledSkillsDir, disabledSkills });
13281
13375
  const buildParameterHint = () => buildSkillToolParameterHint({ bundledSkillsDir, disabledSkills });
13282
13376
  let cachedDescription = null;
@@ -13294,12 +13388,13 @@ function createSkillTool(options) {
13294
13388
  cachedParameterHint = buildParameterHint();
13295
13389
  }
13296
13390
  return cachedParameterHint;
13297
- })())
13391
+ })()),
13392
+ arguments: string().optional().describe("Raw argument text the user explicitly supplied for this skill, substituted for $ARGUMENTS and $1..$N. Omit to leave those placeholders as written; an explicit empty string substitutes them with nothing. Only pass text the user explicitly supplied; never infer it.")
13298
13393
  },
13299
13394
  async execute(args2, context) {
13300
13395
  const requestedName = args2.name;
13301
13396
  const matchedSkill = resolveSkill({ bundledSkillsDir, disabledSkills }, requestedName);
13302
- const { output, dir } = buildSkillContentOutput(matchedSkill);
13397
+ const { output, dir } = buildSkillContentOutput(matchedSkill, args2.arguments);
13303
13398
  await context.ask({
13304
13399
  permission: "skill",
13305
13400
  patterns: [matchedSkill.prefixedName],
@@ -13313,6 +13408,12 @@ function createSkillTool(options) {
13313
13408
  dir
13314
13409
  }
13315
13410
  });
13411
+ if (outputStore) {
13412
+ const contextRecord = context;
13413
+ if (isRecord(contextRecord) && typeof contextRecord.sessionID === "string" && contextRecord.sessionID !== "" && typeof contextRecord.callID === "string" && contextRecord.callID !== "") {
13414
+ outputStore.put(contextRecord.sessionID, contextRecord.callID, output);
13415
+ }
13416
+ }
13316
13417
  return output;
13317
13418
  }
13318
13419
  };
@@ -13344,6 +13445,8 @@ var initializePlugin = async ({
13344
13445
  worktree
13345
13446
  }) => {
13346
13447
  let hasLoggedInit = false;
13448
+ let userOutputLimitSet = false;
13449
+ const skillOutputStore = createSkillOutputStore();
13347
13450
  const config = loadConfig(directory);
13348
13451
  const bootstrapContent = getBootstrapContent(config, {
13349
13452
  bundledSkillsDir,
@@ -13411,11 +13514,16 @@ var initializePlugin = async ({
13411
13514
  })()
13412
13515
  });
13413
13516
  const hooks = {
13414
- config: configHandler,
13517
+ config: async (incomingConfig) => {
13518
+ const configUnknown = incomingConfig;
13519
+ userOutputLimitSet = isRecord(configUnknown) && isRecord(configUnknown.tool_output) && (configUnknown.tool_output.max_lines !== undefined || configUnknown.tool_output.max_bytes !== undefined);
13520
+ return configHandler(incomingConfig);
13521
+ },
13415
13522
  tool: {
13416
13523
  systematic_skill: createSkillTool({
13417
13524
  bundledSkillsDir,
13418
- disabledSkills: config.disabled_skills
13525
+ disabledSkills: config.disabled_skills,
13526
+ outputStore: skillOutputStore
13419
13527
  }),
13420
13528
  ...workflowGuard.tools
13421
13529
  },
@@ -13431,6 +13539,11 @@ var initializePlugin = async ({
13431
13539
  try {
13432
13540
  await workflowGuard.hooks["tool.execute.after"](input, output);
13433
13541
  } catch {}
13542
+ try {
13543
+ restoreSkillOutput(skillOutputStore, input, output, {
13544
+ userOutputLimitSet
13545
+ });
13546
+ } catch {}
13434
13547
  },
13435
13548
  event: async (input) => {
13436
13549
  try {
@@ -211,8 +211,8 @@ export declare const PiSubagentsSchema: z.ZodDefault<z.ZodObject<{
211
211
  * Fields in PiSubagentsAgentOverlaySchema/PiSubagentsCategoryOverlaySchema that
212
212
  * require a project-or-higher trust source. Project config cannot grant
213
213
  * `thinking`, `tools`, or `skills` to an exported persona; `max_turns` is
214
- * trust-any. Mirrors the hand-coded `PI_SUBAGENTS_PROTECTED_FIELDS` set in
215
- * `src/lib/config.ts`.
214
+ * trust-any. This is the single definition. `src/lib/config.ts` imports it
215
+ * rather than keeping a copy.
216
216
  */
217
217
  export declare const PI_SUBAGENTS_PROTECTED_FIELDS: readonly string[];
218
218
  export declare const BootstrapSchema: z.ZodObject<{
@@ -686,6 +686,7 @@ export declare function validateConfig(input: unknown): ValidationResult;
686
686
  * assert that this list agrees with every field tagged `.meta({ trust:
687
687
  * 'project-or-higher' })` in AgentOverlaySchema — preventing silent drift.
688
688
  *
689
- * Matches the hand-coded `SECURITY_OVERLAY_FIELDS` set in `src/lib/config.ts`.
689
+ * This is the single definition. `src/lib/config.ts` imports it rather than
690
+ * keeping a copy.
690
691
  */
691
692
  export declare const SECURITY_OVERLAY_FIELDS: readonly ['model', 'variant', 'skills', 'permission', 'opencode', 'pi'];
@@ -20,10 +20,23 @@ export declare function buildSkillToolDescription(options: SkillResolverOptions)
20
20
  * Deterministic, catalog-derived parameter hint shared by every harness.
21
21
  */
22
22
  export declare function buildSkillToolParameterHint(options: SkillResolverOptions): string;
23
+ /**
24
+ * Text-only substitution matching OpenCode's `SessionPrompt.command`:
25
+ * positional `$N` first (the highest `$N` takes the remaining arguments,
26
+ * missing positions are empty), then `$ARGUMENTS` as the raw string. With no
27
+ * placeholders, non-blank arguments are appended after a blank line.
28
+ */
29
+ export declare function substituteSkillArguments(body: string, raw: string): string;
23
30
  /**
24
31
  * Builds the exact `<skill_content>`-wrapped output shared by every harness.
32
+ *
33
+ * When `argument` is `undefined`, the output is byte-identical to calling
34
+ * this without argument support at all (Pi's caller in src/pi.ts relies on
35
+ * this). When `argument` is a string (including an empty string), it is
36
+ * substituted into the trimmed body via {@link substituteSkillArguments}
37
+ * before wrapping — the wrapper lines themselves are never substituted.
25
38
  */
26
- export declare function buildSkillContentOutput(matchedSkill: LoadedSkill): {
39
+ export declare function buildSkillContentOutput(matchedSkill: LoadedSkill, argument?: string): {
27
40
  output: string;
28
41
  dir: string;
29
42
  };
@@ -1,7 +1,23 @@
1
1
  import type { ToolDefinition } from '@opencode-ai/plugin';
2
2
  export { discoverSkillFiles } from './skill-resolver.js';
3
+ export interface SkillOutputStore {
4
+ put(sessionID: string, callID: string, output: string): void;
5
+ take(sessionID: string, callID: string): string | undefined;
6
+ }
7
+ interface SkillOutputStoreOptions {
8
+ maxEntries?: number;
9
+ ttlMs?: number;
10
+ now?: () => number;
11
+ }
12
+ /** In-memory cache of full (pre-truncation) skill tool output, keyed by session+call, for `restoreSkillOutput`. */
13
+ export declare function createSkillOutputStore(options?: SkillOutputStoreOptions): SkillOutputStore;
14
+ /** Restores the full skill output into a truncated host `tool.execute.after` result, mutating `output` in place. */
15
+ export declare function restoreSkillOutput(store: SkillOutputStore, input: unknown, output: unknown, options: {
16
+ userOutputLimitSet: boolean;
17
+ }): void;
3
18
  export interface SkillToolOptions {
4
19
  bundledSkillsDir: string;
5
20
  disabledSkills: string[];
21
+ outputStore?: SkillOutputStore;
6
22
  }
7
23
  export declare function createSkillTool(options: SkillToolOptions): ToolDefinition;
package/dist/pi.js CHANGED
@@ -11624,8 +11624,40 @@ function buildSkillToolParameterHint(options) {
11624
11624
  const hint = examples.length > 0 ? ` (e.g., ${examples}, ...)` : "";
11625
11625
  return `The name of the skill from available_skills${hint}`;
11626
11626
  }
11627
- function buildSkillContentOutput(matchedSkill) {
11628
- const body = extractSkillBody(matchedSkill.wrappedTemplate);
11627
+ function parsePositionalArgs(raw) {
11628
+ const matches = raw.match(/(?:\[Image\s+\d+\]|"[^"]*"|'[^']*'|[^\s"']+)/gi);
11629
+ if (!matches)
11630
+ return [];
11631
+ return matches.map((token) => token.replace(/^["']|["']$/g, ""));
11632
+ }
11633
+ function substituteSkillArguments(body, raw) {
11634
+ const placeholderNumbers = [...body.matchAll(/\$(\d+)/g)].map((m) => Number(m[1]));
11635
+ const hasPositional = placeholderNumbers.length > 0;
11636
+ const hasArguments = body.includes("$ARGUMENTS");
11637
+ let result = body;
11638
+ if (hasPositional) {
11639
+ const last = Math.max(...placeholderNumbers);
11640
+ const args = parsePositionalArgs(raw);
11641
+ result = result.replace(/\$(\d+)/g, (_match, numStr) => {
11642
+ const n = Number(numStr);
11643
+ if (n - 1 >= args.length)
11644
+ return "";
11645
+ if (n === last)
11646
+ return args.slice(n - 1).join(" ");
11647
+ return args[n - 1] ?? "";
11648
+ });
11649
+ }
11650
+ result = result.replaceAll("$ARGUMENTS", raw);
11651
+ if (!hasPositional && !hasArguments && raw.trim().length > 0) {
11652
+ result = `${result}
11653
+
11654
+ ${raw}`;
11655
+ }
11656
+ return result;
11657
+ }
11658
+ function buildSkillContentOutput(matchedSkill, argument) {
11659
+ const trimmedBody = extractSkillBody(matchedSkill.wrappedTemplate).trim();
11660
+ const body = argument === undefined ? trimmedBody : substituteSkillArguments(trimmedBody, argument);
11629
11661
  const dir = path6.dirname(matchedSkill.skillFile);
11630
11662
  const base = pathToFileURL(dir).href;
11631
11663
  const files = discoverSkillFiles(dir);
@@ -11633,7 +11665,7 @@ function buildSkillContentOutput(matchedSkill) {
11633
11665
  `<skill_content name="${matchedSkill.prefixedName}">`,
11634
11666
  `# Skill: ${matchedSkill.prefixedName}`,
11635
11667
  "",
11636
- body.trim(),
11668
+ body,
11637
11669
  "",
11638
11670
  `Base directory for this skill: ${base}`,
11639
11671
  "Relative paths in this skill (e.g., scripts/, reference/) are relative to this base directory.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fro.bot/systematic",
3
- "version": "3.20.0",
3
+ "version": "3.21.1",
4
4
  "description": "Compound-engineering loops for OpenCode, Pi, and Claude Code",
5
5
  "type": "module",
6
6
  "homepage": "https://fro.bot/systematic",
@@ -97,15 +97,15 @@
97
97
  }
98
98
  },
99
99
  "devDependencies": {
100
- "@biomejs/biome": "2.5.14",
100
+ "@biomejs/biome": "2.5.15",
101
101
  "@earendil-works/pi-coding-agent": "0.83.0",
102
- "@opencode-ai/plugin": "1.18.31",
103
- "@opencode-ai/sdk": "1.18.31",
102
+ "@opencode-ai/plugin": "1.18.34",
103
+ "@opencode-ai/sdk": "1.18.34",
104
104
  "@semantic-release/exec": "7.1.0",
105
105
  "@tintinweb/pi-subagents": "0.14.3",
106
106
  "@types/bun": "latest",
107
107
  "@types/js-yaml": "4.0.9",
108
- "@types/node": "26.6.1",
108
+ "@types/node": "26.6.3",
109
109
  "agent-browser": "0.34.0",
110
110
  "ajv": "8.20.0",
111
111
  "ajv-formats": "3.0.1",
@@ -114,7 +114,7 @@
114
114
  "rimraf": "6.1.3",
115
115
  "semantic-release": "25.0.9",
116
116
  "semantic-release-export-data": "1.2.0",
117
- "typebox": "1.3.32",
117
+ "typebox": "1.3.34",
118
118
  "typescript": "7.0.2"
119
119
  },
120
120
  "dependencies": {
@@ -208,7 +208,7 @@ Use the repository portion of the returned PR URL as `<base-repo>` (for example,
208
208
  Then compute a local diff against the PR's base branch so re-reviews also include local fix commits and uncommitted edits. Substitute the PR base branch from metadata (shown here as `<base>`) and the PR base repository identity derived from the PR URL (shown here as `<base-repo>`). Resolve the base ref from the PR's actual base repository, not by assuming `origin` points at that repo:
209
209
 
210
210
  ```
211
- PR_BASE_REMOTE=$(git remote -v | awk 'index($2, "github.com:<base-repo>") || index($2, "github.com/<base-repo>") {print $1; exit}')
211
+ PR_BASE_REMOTE=$(git remote -v | awk 'index($(2), "github.com:<base-repo>") || index($(2), "github.com/<base-repo>") {print $(1); exit}')
212
212
  if [ -n "$PR_BASE_REMOTE" ]; then PR_BASE_REMOTE_REF="$PR_BASE_REMOTE/<base>"; else PR_BASE_REMOTE_REF=""; fi
213
213
  PR_BASE_REF=$(git rev-parse --verify "$PR_BASE_REMOTE_REF" 2>/dev/null || git rev-parse --verify <base> 2>/dev/null || true)
214
214
  if [ -z "$PR_BASE_REF" ]; then