@staff0rd/assist 0.1213.1 → 0.1213.3

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.
Files changed (86) hide show
  1. package/dist/.build-files +81 -81
  2. package/dist/{addActivity-JOGJJZE7.js → addActivity-WLEREK6S.js} +2 -2
  3. package/dist/{addPhase-RCLTCRDF.js → addPhase-QZJV42LT.js} +3 -3
  4. package/dist/{advise-AG7OMJ3R.js → advise-5THTRMZU.js} +3 -3
  5. package/dist/{askCheck-T3I6Q2EP.js → askCheck-5T4VYDAE.js} +7 -7
  6. package/dist/{askDesign-KZ4WYWZU.js → askDesign-3CYL6V6S.js} +1 -1
  7. package/dist/{branch-W5BHBLBB.js → branch-E6NNTI5B.js} +3 -3
  8. package/dist/built-version +1 -1
  9. package/dist/{chunk-JPMFBLRB.js → chunk-23OGIAPG.js} +7 -7
  10. package/dist/{chunk-DT6MVIZ4.js → chunk-4RLR46O2.js} +1 -1
  11. package/dist/{chunk-ZC6RX66V.js → chunk-5YZRUE2O.js} +1 -1
  12. package/dist/{chunk-S65PQ4QX.js → chunk-AZPGWWRD.js} +1 -1
  13. package/dist/{chunk-S56CW6LZ.js → chunk-B64KPPKV.js} +1 -1
  14. package/dist/{chunk-DN3DZ6H7.js → chunk-BLDYUHH5.js} +1 -1
  15. package/dist/{chunk-TEPDPWTW.js → chunk-C2TWNP4O.js} +1 -1
  16. package/dist/{chunk-IIJ4AI4C.js → chunk-CGRXKBLB.js} +6 -6
  17. package/dist/{chunk-PIONZPIS.js → chunk-CT364X7G.js} +1 -1
  18. package/dist/{chunk-LH6L7JLA.js → chunk-DU4L4EOJ.js} +1 -1
  19. package/dist/{chunk-MV64NHCW.js → chunk-EA3XAFFA.js} +2 -2
  20. package/dist/{chunk-KJ3OKLBQ.js → chunk-EAMHKVRO.js} +1 -1
  21. package/dist/{chunk-SVLIH3AL.js → chunk-GPLGZH22.js} +1 -1
  22. package/dist/{chunk-OPGROK7P.js → chunk-HYMSYVT4.js} +1 -1
  23. package/dist/{chunk-FTNVJRGH.js → chunk-I34RLNRZ.js} +3 -3
  24. package/dist/{chunk-AREFKCN5.js → chunk-IHHE5QX2.js} +1 -1
  25. package/dist/{chunk-L4DE4ZRV.js → chunk-J43DTOUI.js} +1 -1
  26. package/dist/{chunk-RGITC6GP.js → chunk-JFAGJ4OH.js} +1 -1
  27. package/dist/{chunk-BL7W6YRK.js → chunk-JKAJD2M6.js} +5 -5
  28. package/dist/{chunk-335IJSZA.js → chunk-JRTINAVH.js} +1 -1
  29. package/dist/{chunk-CMOOZ4RZ.js → chunk-MCAP7SMF.js} +1 -1
  30. package/dist/{chunk-R3Y52P4Q.js → chunk-MVO3YZIE.js} +1 -1
  31. package/dist/{chunk-2LE4KXEV.js → chunk-N3FVHMLA.js} +1 -1
  32. package/dist/{chunk-XG3C3JSK.js → chunk-O6Q4JWN7.js} +1 -1
  33. package/dist/{chunk-DM7ZP7OH.js → chunk-OI2TSNWI.js} +1 -1
  34. package/dist/{chunk-VDOZCOQS.js → chunk-Q5L3GBM3.js} +2 -2
  35. package/dist/{chunk-UNIRIQVI.js → chunk-QJ3Q7SV7.js} +1 -1
  36. package/dist/{chunk-MMEOHVBU.js → chunk-QPPBG6M7.js} +487 -1
  37. package/dist/{chunk-CU7NNP74.js → chunk-RDNUQGGA.js} +1 -1
  38. package/dist/{chunk-DVKW6CP4.js → chunk-RU3C3FRL.js} +2 -2
  39. package/dist/{chunk-F434P5UD.js → chunk-S5G4EVHG.js} +2 -2
  40. package/dist/{chunk-AFBCUPAE.js → chunk-STQJGU62.js} +1 -1
  41. package/dist/{chunk-CUGSML2B.js → chunk-WC6J2PBT.js} +1 -1
  42. package/dist/{chunk-PPJGEDUO.js → chunk-XA4T6AIZ.js} +2 -2
  43. package/dist/{chunk-WP4VQMD6.js → chunk-XBEUDQK7.js} +2 -2
  44. package/dist/{chunk-FYFQQ565.js → chunk-YT265ZZN.js} +3 -3
  45. package/dist/{chunk-UNRY64ES.js → chunk-ZFFJBAKX.js} +1 -1
  46. package/dist/{chunk-ZHUQP5EF.js → chunk-ZYQSZ6FB.js} +1 -1
  47. package/dist/{cliHook-ZDPXVT7I.js → cliHook-4D4LISRU.js} +6 -6
  48. package/dist/{cliHookCheck-DZSIPFBE.js → cliHookCheck-N7Y7LGBT.js} +2 -2
  49. package/dist/{codexHook-HM33YTU3.js → codexHook-Y4COLYV6.js} +8 -8
  50. package/dist/commands/sessions/web/bundle.js +1 -1
  51. package/dist/{commit-AG5NQTPY.js → commit-O2KBD22J.js} +4 -4
  52. package/dist/{doctorNodes-FWKSA53U.js → doctorNodes-S3ETLP5E.js} +3 -3
  53. package/dist/{done-4AYDCPAI.js → done-SPU5EUVS.js} +4 -4
  54. package/dist/{editHook-B3YTUZFV.js → editHook-M2B5PM72.js} +6 -6
  55. package/dist/{fixConflict-QFWLEXN3.js → fixConflict-2GLJCN7U.js} +4 -4
  56. package/dist/index.js +50 -50
  57. package/dist/{launchMode-NRSERDKC.js → launchMode-BRJSCO2I.js} +14 -14
  58. package/dist/{list-IC4D5TKK.js → list-QPIQ7SBP.js} +5 -5
  59. package/dist/{migrate-EXFKHV3N.js → migrate-IYLDSCPZ.js} +3 -3
  60. package/dist/{next-J2BFGFPI.js → next-BDHKGIWA.js} +13 -13
  61. package/dist/{phaseDone-GPMNF6RZ.js → phaseDone-IXGC6PEA.js} +5 -5
  62. package/dist/{piHook-R2KLLME5.js → piHook-TP5BAMBD.js} +6 -6
  63. package/dist/{propose-SOEEJUW3.js → propose-YI6GRXLS.js} +4 -4
  64. package/dist/{refine-EC2USXGN.js → refine-C5BXW2J3.js} +15 -15
  65. package/dist/{restartNode-7JRRXIYO.js → restartNode-4ZDU3PLZ.js} +5 -5
  66. package/dist/{review-STB4WEZS.js → review-3DKFGPGK.js} +4 -4
  67. package/dist/{reviewPrComments-I72GJXNK.js → reviewPrComments-LCEVPQBL.js} +4 -4
  68. package/dist/{rewindPhase-RKATMLUZ.js → rewindPhase-2KIEXBDU.js} +8 -8
  69. package/dist/{run-SZ6GHWER.js → run-MWLHRVOF.js} +11 -11
  70. package/dist/{run-ITDRO7K5.js → run-VZWSXEAB.js} +11 -11
  71. package/dist/{runDaemon-ZB7W45CQ.js → runDaemon-5U25ZMIE.js} +14 -14
  72. package/dist/{runParallelPhase-YLJPYQOM.js → runParallelPhase-RSOTL3M3.js} +7 -7
  73. package/dist/{runRefine-E3ZLJYXJ.js → runRefine-2XXWUSY7.js} +15 -15
  74. package/dist/{scan-FBVX2CX4.js → scan-5FILQLN6.js} +2 -2
  75. package/dist/{schemaConfirm-EHLOP77W.js → schemaConfirm-YK5HAMPP.js} +2 -2
  76. package/dist/{schemaLock-WUY4PMBZ.js → schemaLock-TP2G7QZC.js} +2 -2
  77. package/dist/{schemaUnlock-USXQOFZV.js → schemaUnlock-4UR4JREF.js} +2 -2
  78. package/dist/{search-NZAWFOLS.js → search-XBMTV42H.js} +5 -5
  79. package/dist/{show-6YMUENZE.js → show-ANI44V7N.js} +3 -3
  80. package/dist/{show-M5TH7EGS.js → show-QWC64PQO.js} +3 -3
  81. package/dist/{signExtension-5WDO65EQ.js → signExtension-LR72WPEW.js} +1 -1
  82. package/dist/{updateNode-Z3GHHSZB.js → updateNode-HTFY2E6N.js} +5 -5
  83. package/dist/{updatePlan-YGS3KWES.js → updatePlan-CZII6UIC.js} +4 -4
  84. package/dist/{web-Z3Z4FZKH.js → web-A33DE4XT.js} +16 -16
  85. package/dist/{web-IKZC2WXR.js → web-Z25O55QR.js} +16 -16
  86. package/package.json +1 -1
@@ -2680,6 +2680,489 @@ function condense(value) {
2680
2680
  return value.replace(/\s+/g, " ").trim().slice(0, 120);
2681
2681
  }
2682
2682
 
2683
+ // src/shared/harnessAdapters/codexExec/condensePreview.ts
2684
+ var PREVIEW = 200;
2685
+ function condensePreview(value) {
2686
+ const line = value.replace(/\s+/g, " ").trim();
2687
+ return line.length > PREVIEW ? `${line.slice(0, PREVIEW)}\u2026` : line;
2688
+ }
2689
+
2690
+ // src/shared/harnessAdapters/codexExec/codexInnerCallView.ts
2691
+ function execCommandView(args) {
2692
+ const { cmd } = args;
2693
+ if (typeof cmd !== "string" || !cmd.trim()) return null;
2694
+ return {
2695
+ target: cmd,
2696
+ label: condensePreview(cmd),
2697
+ fields: toolInputFields(args)
2698
+ };
2699
+ }
2700
+ function writeStdinView(args) {
2701
+ const { session_id: session, chars = "" } = args;
2702
+ if (typeof session !== "number" && typeof session !== "string") return null;
2703
+ if (typeof chars !== "string") return null;
2704
+ const action = chars ? `input ${condensePreview(JSON.stringify(chars))}` : "poll";
2705
+ const fields = toolInputFields(args).map(
2706
+ (field) => field.name === "chars" ? { ...field, value: JSON.stringify(chars) } : field
2707
+ );
2708
+ return {
2709
+ target: `session ${session}`,
2710
+ label: `session ${session} \xB7 ${action}`,
2711
+ fields
2712
+ };
2713
+ }
2714
+ function codexInnerCallView(call) {
2715
+ return call.tool === "exec_command" ? execCommandView(call.args) : writeStdinView(call.args);
2716
+ }
2717
+
2718
+ // src/shared/harnessAdapters/codexExec/isOutputExpression.ts
2719
+ var ALLOWED = /^[\w$.{}:,()[\]]+$/;
2720
+ var IDENTIFIER = /(?<![\w$.])[A-Za-z_$][\w$]*/g;
2721
+ function isOutputExpression(expression, bound) {
2722
+ const code = expression.replaceAll("...", "").replace(/JSON\.stringify\(/g, "(");
2723
+ if (!ALLOWED.test(code) || /[\w$]\(/.test(code)) return false;
2724
+ for (const match of code.matchAll(IDENTIFIER)) {
2725
+ const isKey = code[match.index + match[0].length] === ":";
2726
+ if (!isKey && !bound.has(match[0])) return false;
2727
+ }
2728
+ return true;
2729
+ }
2730
+
2731
+ // src/shared/harnessAdapters/codexExec/readEscape.ts
2732
+ var SIMPLE_ESCAPES = {
2733
+ n: "\n",
2734
+ t: " ",
2735
+ r: "\r",
2736
+ b: "\b",
2737
+ f: "\f",
2738
+ v: "\v"
2739
+ };
2740
+ function readEscape(src, i) {
2741
+ const c = src[i];
2742
+ if (c === void 0) return null;
2743
+ if (c in SIMPLE_ESCAPES) return { value: SIMPLE_ESCAPES[c], end: i + 1 };
2744
+ if (c === "0" && !/\d/.test(src[i + 1] ?? ""))
2745
+ return { value: "\0", end: i + 1 };
2746
+ if (/\d/.test(c)) return null;
2747
+ if (c === "\r")
2748
+ return { value: "", end: src[i + 1] === "\n" ? i + 2 : i + 1 };
2749
+ if (c === "\n") return { value: "", end: i + 1 };
2750
+ if (c !== "x" && c !== "u") return { value: c, end: i + 1 };
2751
+ const hex = (c === "x" ? /^[\da-fA-F]{2}/ : /^(?:[\da-fA-F]{4}|\{[\da-fA-F]{1,6}\})/).exec(src.slice(i + 1));
2752
+ if (!hex) return null;
2753
+ const code = Number.parseInt(hex[0].replace(/[{}]/g, ""), 16);
2754
+ if (code > 1114111) return null;
2755
+ return { value: String.fromCodePoint(code), end: i + 1 + hex[0].length };
2756
+ }
2757
+
2758
+ // src/shared/harnessAdapters/codexExec/readJsString.ts
2759
+ function readJsString(src, start) {
2760
+ const quote = src[start];
2761
+ let value = "";
2762
+ let i = start + 1;
2763
+ while (i < src.length) {
2764
+ const c = src[i];
2765
+ if (c === quote) return { value, end: i + 1 };
2766
+ if (c === "\\") {
2767
+ const escape = readEscape(src, i + 1);
2768
+ if (!escape) return null;
2769
+ value += escape.value;
2770
+ i = escape.end;
2771
+ continue;
2772
+ }
2773
+ if (quote === "`" && c === "$" && src[i + 1] === "{") return null;
2774
+ if (quote !== "`" && (c === "\n" || c === "\r")) return null;
2775
+ value += c;
2776
+ i++;
2777
+ }
2778
+ return null;
2779
+ }
2780
+
2781
+ // src/shared/harnessAdapters/codexExec/skipSpace.ts
2782
+ function skipSpace(src, i) {
2783
+ while (i < src.length && /\s/.test(src[i])) i++;
2784
+ return i;
2785
+ }
2786
+
2787
+ // src/shared/harnessAdapters/codexExec/readList.ts
2788
+ function readList(src, start, close, readItem) {
2789
+ const items = [];
2790
+ let i = skipSpace(src, start + 1);
2791
+ while (src[i] !== close) {
2792
+ const item = readItem(i);
2793
+ if (!item) return null;
2794
+ items.push(item.value);
2795
+ i = skipSpace(src, item.end);
2796
+ if (src[i] === ",") i = skipSpace(src, i + 1);
2797
+ else if (src[i] !== close) return null;
2798
+ }
2799
+ return { value: items, end: i + 1 };
2800
+ }
2801
+
2802
+ // src/shared/harnessAdapters/codexExec/readKey.ts
2803
+ var KEY = /^(?:[A-Za-z_$][\w$]*|\d+)/;
2804
+ function readKey(src, i) {
2805
+ if (src[i] === '"' || src[i] === "'") return readJsString(src, i);
2806
+ const match = KEY.exec(src.slice(i));
2807
+ return match ? { value: match[0], end: i + match[0].length } : null;
2808
+ }
2809
+
2810
+ // src/shared/harnessAdapters/codexExec/readJsLiteral.ts
2811
+ var NUMBER = /^-?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?(?![\w$])/;
2812
+ var KEYWORD = /^(?:true|false|null)(?![\w$])/;
2813
+ var KEYWORDS = {
2814
+ true: true,
2815
+ false: false,
2816
+ null: null
2817
+ };
2818
+ function readEntry(src, i) {
2819
+ const key = readKey(src, i);
2820
+ if (!key) return null;
2821
+ const colon = skipSpace(src, key.end);
2822
+ if (src[colon] !== ":") return null;
2823
+ const value = readJsLiteral(src, colon + 1);
2824
+ return value && { value: [key.value, value.value], end: value.end };
2825
+ }
2826
+ function readJsLiteral(src, start) {
2827
+ const i = skipSpace(src, start);
2828
+ const c = src[i];
2829
+ if (c === '"' || c === "'" || c === "`") return readJsString(src, i);
2830
+ if (c === "[") return readList(src, i, "]", (at) => readJsLiteral(src, at));
2831
+ if (c === "{") {
2832
+ const entries = readList(src, i, "}", (at) => readEntry(src, at));
2833
+ return entries && { value: Object.fromEntries(entries.value), end: entries.end };
2834
+ }
2835
+ const rest = src.slice(i);
2836
+ const keyword = KEYWORD.exec(rest);
2837
+ if (keyword)
2838
+ return { value: KEYWORDS[keyword[0]], end: i + keyword[0].length };
2839
+ const number = NUMBER.exec(rest);
2840
+ return number ? { value: Number(number[0]), end: i + number[0].length } : null;
2841
+ }
2842
+
2843
+ // src/shared/harnessAdapters/codexExec/replaceLiteralCalls.ts
2844
+ var CALL_PLACEHOLDER = "__CALL__";
2845
+ var CALL = /(?<![\w$])tools\s*\.\s*([\w$]+)\s*\(/g;
2846
+ var TOOLS = /(?<![\w$])tools(?![\w$])/;
2847
+ var INNER_TOOLS = /* @__PURE__ */ new Set(["exec_command", "write_stdin"]);
2848
+ function readCall(src, match) {
2849
+ if (!INNER_TOOLS.has(match[1])) return null;
2850
+ const args = readJsLiteral(src, match.index + match[0].length);
2851
+ const value = args?.value;
2852
+ if (!args || typeof value !== "object" || !value || Array.isArray(value))
2853
+ return null;
2854
+ const close = skipSpace(src, args.end);
2855
+ if (src[close] !== ")") return null;
2856
+ const call = { tool: match[1], args: value };
2857
+ return codexInnerCallView(call) && { call, end: close + 1 };
2858
+ }
2859
+ function replaceLiteralCalls(src) {
2860
+ const calls = [];
2861
+ let code = "";
2862
+ let last = 0;
2863
+ CALL.lastIndex = 0;
2864
+ for (let match = CALL.exec(src); match; match = CALL.exec(src)) {
2865
+ const read = readCall(src, match);
2866
+ if (!read) return null;
2867
+ calls.push(read.call);
2868
+ code += `${src.slice(last, match.index)}${CALL_PLACEHOLDER}`;
2869
+ last = read.end;
2870
+ CALL.lastIndex = read.end;
2871
+ }
2872
+ code += src.slice(last);
2873
+ return TOOLS.test(code) ? null : { code, calls };
2874
+ }
2875
+
2876
+ // src/shared/harnessAdapters/codexExec/jsPatterns.ts
2877
+ var LIST = String.raw`Promise\.all(?:Settled)?\(\[${CALL_PLACEHOLDER}(?:,${CALL_PLACEHOLDER})*,?\]\)`;
2878
+ var jsPatterns = {
2879
+ ID: String.raw`[A-Za-z_$][\w$]*`,
2880
+ DECL: "(?:const|let|var) ?",
2881
+ PRINT: String.raw`(?:text|console\.log)`,
2882
+ SOURCE: `(?:${CALL_PLACEHOLDER}|${LIST})`
2883
+ };
2884
+
2885
+ // src/shared/harnessAdapters/codexExec/isGlueStatement.ts
2886
+ var { DECL, ID, PRINT } = jsPatterns;
2887
+ var PRINT_EXPRESSION = new RegExp(`^${PRINT}\\((.+)\\)$`);
2888
+ var FOR_EACH_PRINT = new RegExp(`^(${ID})\\.forEach\\(${PRINT}\\)$`);
2889
+ var LOOPS = [
2890
+ {
2891
+ pattern: new RegExp(
2892
+ `^(${ID})\\.forEach\\(\\(?(${ID})(?:,(${ID}))?\\)?=>(.+)\\)$`
2893
+ ),
2894
+ source: 1,
2895
+ params: [2, 3],
2896
+ body: 4
2897
+ },
2898
+ {
2899
+ pattern: new RegExp(`^for\\(${DECL}(${ID}) of (${ID})\\)(.+)$`),
2900
+ source: 2,
2901
+ params: [1],
2902
+ body: 3
2903
+ },
2904
+ {
2905
+ pattern: new RegExp(
2906
+ `^for\\(${DECL}(${ID})=0;\\1<(${ID})\\.length;(?:\\1\\+\\+|\\+\\+\\1)\\)(.+)$`
2907
+ ),
2908
+ source: 2,
2909
+ params: [1],
2910
+ body: 3
2911
+ }
2912
+ ];
2913
+ function isGlueBody(body, bound) {
2914
+ const inner = /^\{(.*)\}$/.exec(body)?.[1] ?? body;
2915
+ const statements = inner.split(";").filter(Boolean);
2916
+ return statements.length > 0 && statements.every((statement) => isGlueStatement(statement, bound));
2917
+ }
2918
+ function isGlueLoop(code, bound) {
2919
+ for (const { pattern, source, params, body } of LOOPS) {
2920
+ const match = pattern.exec(code);
2921
+ if (!match) continue;
2922
+ const names = params.map((i) => match[i]).filter(Boolean);
2923
+ return bound.has(match[source]) && isGlueBody(match[body], /* @__PURE__ */ new Set([...bound, ...names]));
2924
+ }
2925
+ return false;
2926
+ }
2927
+ function isGlueStatement(code, bound) {
2928
+ const print = PRINT_EXPRESSION.exec(code);
2929
+ if (print) return isOutputExpression(print[1], bound);
2930
+ const forEachPrint = FOR_EACH_PRINT.exec(code);
2931
+ if (forEachPrint) return bound.has(forEachPrint[1]);
2932
+ return isGlueLoop(code, bound);
2933
+ }
2934
+
2935
+ // src/shared/harnessAdapters/codexExec/normaliseCode.ts
2936
+ function normaliseCode(code) {
2937
+ return code.replace(/\s+/g, " ").trim().replace(/ (?=[^\w$])|(?<=[^\w$]) /g, "").replace(/;+$/, "");
2938
+ }
2939
+
2940
+ // src/shared/harnessAdapters/codexExec/classifyStatement.ts
2941
+ var { DECL: DECL2, ID: ID2, PRINT: PRINT2, SOURCE } = jsPatterns;
2942
+ var AWAITED = `await ${SOURCE}`;
2943
+ var PRINTED = new RegExp(
2944
+ `^(?:(?:await )?${SOURCE}|${PRINT2}\\((?:${AWAITED}|\\(${AWAITED}\\)(?:\\.output)?|JSON\\.stringify\\(${AWAITED}\\))\\))$`
2945
+ );
2946
+ var ASSIGNED = new RegExp(
2947
+ `^${DECL2}(${ID2}|\\{[^{}]*\\}|\\[[^\\[\\]]*\\])=${AWAITED}$`
2948
+ );
2949
+ var LOOPED = new RegExp(`^for\\(${DECL2}(${ID2}) of ${AWAITED}\\)(.+)$`);
2950
+ var PATTERN_NAME = new RegExp(`^(?:\\.\\.\\.)?(?:${ID2}:)?(${ID2})$`);
2951
+ function boundNames(target) {
2952
+ if (!/^[{[]/.test(target)) return [target];
2953
+ const names = target.slice(1, -1).split(",").filter(Boolean);
2954
+ const matches = names.map((name) => PATTERN_NAME.exec(name)?.[1]);
2955
+ return matches.every((name) => name !== void 0) ? matches : null;
2956
+ }
2957
+ function callBinds(code, bound) {
2958
+ if (PRINTED.test(code)) return [];
2959
+ const assigned = ASSIGNED.exec(code);
2960
+ if (assigned) return boundNames(assigned[1]);
2961
+ const looped = LOOPED.exec(code);
2962
+ if (looped && isGlueBody(looped[2], /* @__PURE__ */ new Set([...bound, looped[1]])))
2963
+ return [];
2964
+ return null;
2965
+ }
2966
+ function classifyStatement(source, bound) {
2967
+ const replaced = replaceLiteralCalls(source);
2968
+ if (!replaced) return { kind: "raw" };
2969
+ const code = normaliseCode(replaced.code);
2970
+ if (!replaced.calls.length)
2971
+ return isGlueStatement(code, bound) ? { kind: "glue" } : { kind: "raw" };
2972
+ const binds = callBinds(code, bound);
2973
+ return binds ? { kind: "call", calls: replaced.calls, binds } : { kind: "raw" };
2974
+ }
2975
+
2976
+ // src/shared/harnessAdapters/codexExec/closeStatement.ts
2977
+ function closeStatement(state, end) {
2978
+ if (state.open) state.spans.push({ start: state.open.start, end });
2979
+ state.open = null;
2980
+ }
2981
+
2982
+ // src/shared/harnessAdapters/codexExec/continuesAcrossNewline.ts
2983
+ var CONTINUING_WORDS = /* @__PURE__ */ new Set([
2984
+ "await",
2985
+ "const",
2986
+ "let",
2987
+ "var",
2988
+ "of",
2989
+ "in",
2990
+ "new",
2991
+ "typeof",
2992
+ "return",
2993
+ "yield",
2994
+ "else",
2995
+ "do"
2996
+ ]);
2997
+ function continuesAcrossNewline(src, lastSignificant, next) {
2998
+ if (!/^(?:[\w$]|\/\/|\/\*)/.test(src.slice(next, next + 2))) return true;
2999
+ const prev = src[lastSignificant] ?? "";
3000
+ if (/[)\]}"'`]/.test(prev)) return false;
3001
+ if (!/[\w$]/.test(prev)) return true;
3002
+ const word = /[\w$]+$/.exec(src.slice(0, lastSignificant + 1))?.[0] ?? "";
3003
+ return CONTINUING_WORDS.has(word);
3004
+ }
3005
+
3006
+ // src/shared/harnessAdapters/codexExec/applyNewline.ts
3007
+ function applyNewline(state, i) {
3008
+ const open = state.open;
3009
+ if (!open || state.depth) return;
3010
+ if (open.header && open.body === "none") return;
3011
+ const next = skipSpace(state.src, i);
3012
+ if (!continuesAcrossNewline(state.src, state.last, next))
3013
+ closeStatement(state, state.last + 1);
3014
+ }
3015
+
3016
+ // src/shared/harnessAdapters/codexExec/markBody.ts
3017
+ function markBody(state, c) {
3018
+ const open = state.open;
3019
+ if (open?.headerDone && open.body === "none")
3020
+ open.body = c === "{" && state.depth === 0 ? "block" : "simple";
3021
+ }
3022
+
3023
+ // src/shared/harnessAdapters/codexExec/applyBracket.ts
3024
+ function applyBracket(state, c, i) {
3025
+ if ("([{".includes(c)) {
3026
+ markBody(state, c);
3027
+ state.depth++;
3028
+ return true;
3029
+ }
3030
+ state.depth--;
3031
+ if (state.depth < 0) return false;
3032
+ const open = state.open;
3033
+ if (state.depth || !open) return true;
3034
+ if (open.header && !open.headerDone && c === ")") open.headerDone = true;
3035
+ else if (open.body === "block" && c === "}") closeStatement(state, i + 1);
3036
+ return true;
3037
+ }
3038
+
3039
+ // src/shared/harnessAdapters/codexExec/skipQuoted.ts
3040
+ function skipQuoted(src, i) {
3041
+ const quote = src[i];
3042
+ let depth = 0;
3043
+ for (let j = i + 1; j < src.length; j++) {
3044
+ const c = src[j];
3045
+ if (c === "\\") j++;
3046
+ else if (quote === "`" && c === "$" && src[j + 1] === "{") {
3047
+ depth++;
3048
+ j++;
3049
+ } else if (depth && c === "}") depth--;
3050
+ else if (!depth && c === quote) return j + 1;
3051
+ else if (quote !== "`" && c === "\n") return -1;
3052
+ }
3053
+ return -1;
3054
+ }
3055
+
3056
+ // src/shared/harnessAdapters/codexExec/applyToken.ts
3057
+ var MALFORMED = -1;
3058
+ function applyToken(state, c, i) {
3059
+ if (c === '"' || c === "'" || c === "`") {
3060
+ markBody(state, c);
3061
+ return skipQuoted(state.src, i);
3062
+ }
3063
+ if ("()[]{}".includes(c))
3064
+ return applyBracket(state, c, i) ? i + 1 : MALFORMED;
3065
+ if (c === ";" && !state.depth) closeStatement(state, i + 1);
3066
+ else markBody(state, c);
3067
+ return i + 1;
3068
+ }
3069
+
3070
+ // src/shared/harnessAdapters/codexExec/skipComment.ts
3071
+ function skipComment(src, i) {
3072
+ if (src[i] !== "/") return i;
3073
+ if (src[i + 1] === "/") {
3074
+ const end = src.indexOf("\n", i);
3075
+ return end === -1 ? src.length : end;
3076
+ }
3077
+ if (src[i + 1] === "*") {
3078
+ const end = src.indexOf("*/", i + 2);
3079
+ return end === -1 ? -1 : end + 2;
3080
+ }
3081
+ return i;
3082
+ }
3083
+
3084
+ // src/shared/harnessAdapters/codexExec/splitStatements.ts
3085
+ var HEADER = /^(?:for|while|if)\s*\(/;
3086
+ function step(state, i) {
3087
+ const c = state.src[i];
3088
+ if (c === "\n") applyNewline(state, i);
3089
+ if (/\s/.test(c)) return i + 1;
3090
+ const afterComment = skipComment(state.src, i);
3091
+ if (afterComment !== i) return afterComment;
3092
+ if (!state.open && c === ";") return i + 1;
3093
+ if (!state.open) {
3094
+ const header = HEADER.test(state.src.slice(i));
3095
+ state.open = { start: i, header, headerDone: false, body: "none" };
3096
+ }
3097
+ const next = applyToken(state, c, i);
3098
+ if (next !== MALFORMED) state.last = next - 1;
3099
+ return next;
3100
+ }
3101
+ function splitStatements(src) {
3102
+ const state = { src, spans: [], depth: 0, last: -1, open: null };
3103
+ for (let i = 0; i < src.length; ) {
3104
+ i = step(state, i);
3105
+ if (i === MALFORMED) return null;
3106
+ }
3107
+ if (state.depth) return null;
3108
+ closeStatement(state, state.last + 1);
3109
+ return state.spans;
3110
+ }
3111
+
3112
+ // src/shared/harnessAdapters/codexExec/parseCodexExecWrapper.ts
3113
+ function parseCodexExecWrapper(input) {
3114
+ const spans = splitStatements(input);
3115
+ if (!spans) return null;
3116
+ const bound = /* @__PURE__ */ new Set();
3117
+ const parts = [];
3118
+ const raw = { start: -1, end: -1 };
3119
+ const flushRaw = () => {
3120
+ if (raw.start !== -1)
3121
+ parts.push({ kind: "raw", source: input.slice(raw.start, raw.end) });
3122
+ raw.start = -1;
3123
+ };
3124
+ for (const span of spans) {
3125
+ const statement = classifyStatement(
3126
+ input.slice(span.start, span.end),
3127
+ bound
3128
+ );
3129
+ if (statement.kind === "raw") {
3130
+ if (raw.start === -1) raw.start = span.start;
3131
+ raw.end = span.end;
3132
+ }
3133
+ if (statement.kind !== "call") continue;
3134
+ flushRaw();
3135
+ for (const name of statement.binds) bound.add(name);
3136
+ for (const call of statement.calls) parts.push({ kind: "call", call });
3137
+ }
3138
+ flushRaw();
3139
+ return parts.some((part) => part.kind === "call") ? parts : null;
3140
+ }
3141
+
3142
+ // src/shared/harnessAdapters/codexExec/codexExecEvents.ts
3143
+ function rawEvent(source, operations2, at) {
3144
+ const target = source.trim();
3145
+ return {
3146
+ kind: "tool",
3147
+ tool: "exec",
3148
+ target,
3149
+ label: condensePreview(target),
3150
+ operations: operations2,
3151
+ at
3152
+ };
3153
+ }
3154
+ function codexExecEvents(input, operations2, at) {
3155
+ const parts = parseCodexExecWrapper(input);
3156
+ if (!parts) return [rawEvent(input, operations2, at)];
3157
+ return parts.map((part, i) => {
3158
+ const ops = i === 0 ? operations2 : [];
3159
+ if (part.kind === "raw") return rawEvent(part.source, ops, at);
3160
+ const view = codexInnerCallView(part.call);
3161
+ if (!view) return rawEvent(JSON.stringify(part.call), ops, at);
3162
+ return { kind: "tool", tool: part.call.tool, ...view, operations: ops, at };
3163
+ });
3164
+ }
3165
+
2683
3166
  // src/shared/harnessAdapters/codexAsyncQuestionOperation.ts
2684
3167
  import { z } from "zod";
2685
3168
  var inputSchema = z.object({
@@ -2830,12 +3313,15 @@ function codexToolEvents(payload, at) {
2830
3313
  const type = rolloutString(payload.type);
2831
3314
  if (TOOL_CALLS.has(type)) {
2832
3315
  const target = codexToolTarget(payload);
3316
+ const ops = operations(payload, target);
3317
+ if (type === "custom_tool_call" && payload.name === "exec")
3318
+ return codexExecEvents(rolloutString(payload.input), ops, at);
2833
3319
  return [
2834
3320
  {
2835
3321
  kind: "tool",
2836
3322
  tool: rolloutString(payload.name) || "tool",
2837
3323
  target,
2838
- operations: operations(payload, target),
3324
+ operations: ops,
2839
3325
  at
2840
3326
  }
2841
3327
  ];
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildDoctorProbes,
3
3
  diagnoseLink
4
- } from "./chunk-CMOOZ4RZ.js";
4
+ } from "./chunk-MCAP7SMF.js";
5
5
  import {
6
6
  findLinkSpec
7
7
  } from "./chunk-JWMBBFAS.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  resolveReviewPhase
3
- } from "./chunk-SVLIH3AL.js";
3
+ } from "./chunk-GPLGZH22.js";
4
4
  import {
5
5
  resolvePlan
6
- } from "./chunk-RGITC6GP.js";
6
+ } from "./chunk-JFAGJ4OH.js";
7
7
 
8
8
  // src/commands/backlog/resolveRewindPlan.ts
9
9
  function resolveRewindPlan(item) {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  launchMode
3
- } from "./chunk-BL7W6YRK.js";
3
+ } from "./chunk-JKAJD2M6.js";
4
4
  import {
5
5
  typeLabel
6
- } from "./chunk-ZHUQP5EF.js";
6
+ } from "./chunk-ZYQSZ6FB.js";
7
7
  import {
8
8
  loadBacklogSummaries
9
9
  } from "./chunk-5PQE2NIS.js";
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var package_default = {
3
3
  name: "@staff0rd/assist",
4
- version: "0.1213.1",
4
+ version: "0.1213.3",
5
5
  type: "module",
6
6
  main: "dist/index.js",
7
7
  bin: {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  OneShotUnavailableError,
3
3
  runOneShotPrompt
4
- } from "./chunk-2LE4KXEV.js";
4
+ } from "./chunk-N3FVHMLA.js";
5
5
  import {
6
6
  withSpinner
7
7
  } from "./chunk-OZNYQOQK.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  checkoutPr
3
- } from "./chunk-XG3C3JSK.js";
3
+ } from "./chunk-O6Q4JWN7.js";
4
4
  import {
5
5
  launchBlocker
6
6
  } from "./chunk-U3IQIWLI.js";
@@ -19,7 +19,7 @@ import {
19
19
  } from "./chunk-3DNFNT2L.js";
20
20
  import {
21
21
  harnessAdapter
22
- } from "./chunk-MMEOHVBU.js";
22
+ } from "./chunk-QPPBG6M7.js";
23
23
 
24
24
  // src/commands/launchPrSkill.ts
25
25
  import chalk from "chalk";
@@ -6,10 +6,10 @@ import {
6
6
  } from "./chunk-LQMXLKPW.js";
7
7
  import {
8
8
  resolveRewindPlan
9
- } from "./chunk-DVKW6CP4.js";
9
+ } from "./chunk-RU3C3FRL.js";
10
10
  import {
11
11
  resolvePlan
12
- } from "./chunk-RGITC6GP.js";
12
+ } from "./chunk-JFAGJ4OH.js";
13
13
  import {
14
14
  resetPhaseAndDependents,
15
15
  updateStatus
@@ -8,10 +8,10 @@ import {
8
8
  isDocsPath,
9
9
  isSchemaPath,
10
10
  mentionsDocsPath
11
- } from "./chunk-ZC6RX66V.js";
11
+ } from "./chunk-5YZRUE2O.js";
12
12
  import {
13
13
  isSchemaLocked
14
- } from "./chunk-UNRY64ES.js";
14
+ } from "./chunk-ZFFJBAKX.js";
15
15
  import {
16
16
  findBuiltinDenyRaw,
17
17
  findDeny,
@@ -21,7 +21,7 @@ import {
21
21
  isApprovedRead,
22
22
  resolvePermission,
23
23
  splitCompound
24
- } from "./chunk-DM7ZP7OH.js";
24
+ } from "./chunk-OI2TSNWI.js";
25
25
  import {
26
26
  inWebSession
27
27
  } from "./chunk-HKGCLAZ7.js";
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  currentExecutionIdentity,
6
6
  getSchemaSessionApprovalPath
7
- } from "./chunk-OPGROK7P.js";
7
+ } from "./chunk-HYMSYVT4.js";
8
8
  import {
9
9
  closeDb,
10
10
  getDb,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  authoredPhases
3
- } from "./chunk-L4DE4ZRV.js";
3
+ } from "./chunk-J43DTOUI.js";
4
4
 
5
5
  // src/commands/backlog/list/shared.ts
6
6
  import chalk from "chalk";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  decideToolOperations,
3
3
  logPolicyDeny
4
- } from "./chunk-FYFQQ565.js";
4
+ } from "./chunk-YT265ZZN.js";
5
5
  import "./chunk-CDU6M5IX.js";
6
- import "./chunk-ZC6RX66V.js";
7
- import "./chunk-UNRY64ES.js";
6
+ import "./chunk-5YZRUE2O.js";
7
+ import "./chunk-ZFFJBAKX.js";
8
8
  import "./chunk-ZN4PSZSA.js";
9
9
  import {
10
10
  currentExecutionIdentity
11
- } from "./chunk-OPGROK7P.js";
11
+ } from "./chunk-HYMSYVT4.js";
12
12
  import "./chunk-ZMH7UZNP.js";
13
- import "./chunk-DM7ZP7OH.js";
13
+ import "./chunk-OI2TSNWI.js";
14
14
  import "./chunk-VDXS55BC.js";
15
15
  import "./chunk-HKGCLAZ7.js";
16
16
  import "./chunk-FPWL4VRC.js";
@@ -28,7 +28,7 @@ import "./chunk-N3S5RZYX.js";
28
28
  import "./chunk-JMHNLOLN.js";
29
29
  import {
30
30
  claudeAdapter
31
- } from "./chunk-MMEOHVBU.js";
31
+ } from "./chunk-QPPBG6M7.js";
32
32
  import "./chunk-MRUIXQXS.js";
33
33
  import "./chunk-YLQAQHRT.js";
34
34
  import "./chunk-5AAHWTRQ.js";
@@ -5,9 +5,9 @@ import {
5
5
  findTruncatedReadDenyRaw,
6
6
  isApprovedRead,
7
7
  splitCompound
8
- } from "./chunk-DM7ZP7OH.js";
8
+ } from "./chunk-OI2TSNWI.js";
9
9
  import "./chunk-VDXS55BC.js";
10
- import "./chunk-MMEOHVBU.js";
10
+ import "./chunk-QPPBG6M7.js";
11
11
  import "./chunk-MRUIXQXS.js";
12
12
  import "./chunk-YLQAQHRT.js";
13
13
  import "./chunk-5AAHWTRQ.js";