@outerlayer/cli 0.8.0 → 0.8.2

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 (91) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +27 -9
  3. package/dist/{agent-setup-C7PLRXZO.js → agent-setup-C5X4356W.js} +10 -10
  4. package/dist/{build-MS34XEGN.js → build-3FSJR5OO.js} +1 -1
  5. package/dist/build-info.json +1 -1
  6. package/dist/{builder-G52A6GW2.js → builder-QZA2Z3M3.js} +3 -3
  7. package/dist/{check-FOF3PUKI.js → check-HQHFAOXW.js} +30 -29
  8. package/dist/{chunk-R7STSBLC.js → chunk-2E2MG3KW.js} +1 -1
  9. package/dist/{chunk-OD2VTIHN.js → chunk-2FWL7CE2.js} +3 -2
  10. package/dist/{chunk-K35RW5HP.js → chunk-33GOCSRO.js} +4 -4
  11. package/dist/{chunk-4A5E2G4E.js → chunk-3J476JZC.js} +11 -11
  12. package/dist/{chunk-MQ3IPHIZ.js → chunk-47RS42OZ.js} +6 -3
  13. package/dist/{chunk-3S4P55NE.js → chunk-4ZZR5SKG.js} +3 -3
  14. package/dist/{chunk-PWBILI5P.js → chunk-7KI224YS.js} +1 -1
  15. package/dist/{chunk-5TNS3PL7.js → chunk-CLURXEWV.js} +4 -3
  16. package/dist/{chunk-7ZR5UPMB.js → chunk-CMFCCIQN.js} +167 -1
  17. package/dist/{chunk-AX23QKHS.js → chunk-CRLAB4PM.js} +1 -1
  18. package/dist/{chunk-CM5QTKM4.js → chunk-EQG7L6LM.js} +311 -29
  19. package/dist/{chunk-OEK4JEB3.js → chunk-ERI5GBNI.js} +18 -3
  20. package/dist/{chunk-ILEA3YHM.js → chunk-EWBM2USM.js} +2 -2
  21. package/dist/{chunk-EV3M3EH7.js → chunk-G54QHBTI.js} +2 -2
  22. package/dist/{chunk-M3SQ4YGD.js → chunk-GXSMDL4M.js} +1 -1
  23. package/dist/{chunk-GAYWY4GI.js → chunk-HN2JBGSI.js} +2 -1
  24. package/dist/{chunk-ZOAEPWGL.js → chunk-HWMYGAKF.js} +1 -1
  25. package/dist/chunk-I2UOAV7X.js +133 -0
  26. package/dist/{chunk-ABIWDUMS.js → chunk-IS4DIGBQ.js} +13 -1
  27. package/dist/{chunk-WVGSB3Z2.js → chunk-J5DPVNL3.js} +2 -2
  28. package/dist/{chunk-VXLJORHL.js → chunk-JXH6LEEH.js} +1 -1
  29. package/dist/{chunk-JPR2WHHF.js → chunk-KI7VPNKC.js} +1 -1
  30. package/dist/{chunk-TUUMW4TC.js → chunk-LSPJHYHM.js} +1 -1
  31. package/dist/{chunk-7VNURP6M.js → chunk-M2F2RAMK.js} +82 -26
  32. package/dist/{chunk-NALVDFIS.js → chunk-MJLUWGUD.js} +2 -2
  33. package/dist/{chunk-5FWNEQNZ.js → chunk-NACLOOXP.js} +5 -5
  34. package/dist/{chunk-U3GOI2B4.js → chunk-NPBLDMSD.js} +1 -1
  35. package/dist/{chunk-BOLTI6LR.js → chunk-PLMTLGYH.js} +1 -1
  36. package/dist/{chunk-IRCBTGWF.js → chunk-QJPO42VI.js} +6 -6
  37. package/dist/{chunk-5QLNZGAQ.js → chunk-R5SPFO6F.js} +6 -6
  38. package/dist/{chunk-M5POMKKW.js → chunk-V7NIVOFD.js} +5 -5
  39. package/dist/{chunk-IJBVPLZZ.js → chunk-VUGDEUMM.js} +71 -143
  40. package/dist/{chunk-4ACZCY4I.js → chunk-WMPO3SKK.js} +3 -3
  41. package/dist/{chunk-TTNFGMHO.js → chunk-Y7UQHKFY.js} +19 -1
  42. package/dist/{chunk-BCLJSQCV.js → chunk-YO4PSLVB.js} +1 -1
  43. package/dist/{chunk-AIL2R4SI.js → chunk-YU4Z2O3W.js} +5 -5
  44. package/dist/{chunk-ZZXLM64C.js → chunk-ZJ3WRVRG.js} +1 -1
  45. package/dist/{cli-AOJPAVFX.js → cli-OWM54BIU.js} +120 -93
  46. package/dist/{command-SY3SVLAI.js → command-LIHTWJHQ.js} +31 -25
  47. package/dist/{config-Z3USDBLU.js → config-OOBPCY7Q.js} +2 -2
  48. package/dist/{connect-cmd-PNZ6IJLJ.js → connect-cmd-NV7WVBY7.js} +3 -3
  49. package/dist/{context-adopt-CE4KDXS3.js → context-adopt-PPCNSN5D.js} +7 -7
  50. package/dist/{context-materialize-QL33HDJN.js → context-materialize-YR3JQCUF.js} +7 -7
  51. package/dist/{dist-3ZTZF2TP.js → dist-2LNAXGPZ.js} +1 -1
  52. package/dist/{docker-676FD3CQ.js → docker-RSALMGPL.js} +4 -4
  53. package/dist/{doctor-WR6TRPSU.js → doctor-PKT42NOJ.js} +59 -25
  54. package/dist/{emit-artifact-cmd-AVM4YXMQ.js → emit-artifact-cmd-BZYXRBCV.js} +8 -8
  55. package/dist/{emit-cmd-2QRMYPYO.js → emit-cmd-IRYNFHPM.js} +3 -3
  56. package/dist/{emit-criteria-cmd-LDBE4YDS.js → emit-criteria-cmd-PSZYZ32B.js} +6 -6
  57. package/dist/{emit-finding-cmd-6R5WBPCH.js → emit-finding-cmd-VTSYDJYZ.js} +6 -6
  58. package/dist/{emit-result-cmd-2DMN6O6U.js → emit-result-cmd-5P7ZFWMZ.js} +8 -8
  59. package/dist/{exec-client-NPYNUAF3.js → exec-client-2UX6NHAO.js} +3 -3
  60. package/dist/{guest-init-JWNNAH2H.js → guest-init-VHQNFCFS.js} +3 -3
  61. package/dist/{hook-fast-XBOZ3N6L.js → hook-fast-OCHVQZTU.js} +1 -1
  62. package/dist/{host-key-KDYZ5ECC.js → host-key-YMLXY6QB.js} +1 -1
  63. package/dist/{import-capture-cmd-T4556ELW.js → import-capture-cmd-2QFLZQFY.js} +3 -3
  64. package/dist/{import-ruler-cmd-SG3UVGI7.js → import-ruler-cmd-BD22GUJS.js} +1 -1
  65. package/dist/index.js +3 -3
  66. package/dist/{init-R2FJ5KNS.js → init-CY4IMZE4.js} +22 -22
  67. package/dist/{init-KDK5QLQZ.js → init-TQUN5RF7.js} +20 -20
  68. package/dist/{init-cmd-BYZYAJ5P.js → init-cmd-F4TZXQJH.js} +11 -11
  69. package/dist/{install-FHTVJZS6.js → install-C33LT5KQ.js} +3 -3
  70. package/dist/{install-cmd-DCF7TVXD.js → install-cmd-5HYMXLEW.js} +2 -1
  71. package/dist/{loop-AG3PLXPO.js → loop-NZP5FAC3.js} +30 -29
  72. package/dist/{machine-LV6WBRRK.js → machine-RUSNVLKO.js} +19 -19
  73. package/dist/{mcp-install-cmd-RLK4SO3N.js → mcp-install-cmd-4AQMSIGY.js} +1 -1
  74. package/dist/{mcp-serve-cmd-N6UD2KBX.js → mcp-serve-cmd-3KVYEUXG.js} +3 -3
  75. package/dist/{real-deps-SU24ZA2K.js → real-deps-TK6JMQSW.js} +3 -2
  76. package/dist/{session-sender-Q5HAMOL2.js → session-sender-EECVKXTC.js} +7 -7
  77. package/dist/{starter-pack-MUXMAU4S.js → starter-pack-VNWPYP5U.js} +3 -3
  78. package/dist/{status-HH4OSOHR.js → status-KCONQLOD.js} +31 -25
  79. package/dist/{sync-cmd-CAEPJR7B.js → sync-cmd-R54ZBHXX.js} +6 -6
  80. package/dist/{watch-LAAZFBHH.js → watch-YTFNBO3S.js} +6 -6
  81. package/dist/{work-claim-cmd-ARIYZARE.js → work-claim-cmd-HRPJ4VUF.js} +10 -10
  82. package/dist/{work-cmd-B3FOXZAL.js → work-cmd-W4GQUUBC.js} +7 -7
  83. package/dist/{work-comment-cmd-O5WGRI6K.js → work-comment-cmd-DDZ4SZ35.js} +7 -7
  84. package/dist/{work-open-pr-cmd-M6CQW7KW.js → work-open-pr-cmd-GXULDTSC.js} +8 -8
  85. package/dist/{work-pr-cmd-C4YEGKD6.js → work-pr-cmd-T6SU4TYN.js} +7 -7
  86. package/package.json +2 -2
  87. package/skill-pack/maintained/amend/SKILL.md +22 -6
  88. package/skill-pack/maintained/outerlayer/SKILL.md +12 -2
  89. package/skill-pack/maintained/outerlayer/references/open-pull-request.md +29 -0
  90. package/skill-pack/template/build/SKILL.md +3 -2
  91. package/skill-pack/template/build/references/release.md +11 -2
@@ -8524,5 +8524,171 @@ function parsePolicy(policyFile, validatorFiles) {
8524
8524
  );
8525
8525
  return { levels, customs, mergeGate, review, testProof, criteriaMissing, problems };
8526
8526
  }
8527
+ function extractCommandText(raw) {
8528
+ const text = raw.trim();
8529
+ if (!text) return null;
8530
+ if (text.startsWith("{") || text.startsWith("[")) {
8531
+ try {
8532
+ const parsed = JSON.parse(text);
8533
+ if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
8534
+ const command = parsed["command"];
8535
+ return typeof command === "string" && command.trim() ? command.trim() : null;
8536
+ }
8537
+ return null;
8538
+ } catch {
8539
+ return null;
8540
+ }
8541
+ }
8542
+ return text;
8543
+ }
8544
+ function normalizeCommand(command) {
8545
+ let out = command.trim().replace(/\s+/g, " ");
8546
+ for (; ; ) {
8547
+ const next = out.replace(/^cd\s+[^&;|]+(?:&&|;)\s*/, "");
8548
+ if (next === out) break;
8549
+ out = next.trim();
8550
+ }
8551
+ out = out.replace(/^(?:[A-Z_][A-Z0-9_]*=\S+\s+)+/, "");
8552
+ out = out.replace(/^(?:npx|bunx)\s+(?:--yes\s+|-y\s+)?/, "");
8553
+ out = out.replace(/^(?:yarn|pnpm)\s+(?:run\s+)?/, "");
8554
+ return out.trim();
8555
+ }
8556
+ var KIND_RULES = [
8557
+ { kind: "migration", pattern: /\bsupabase\s+(?:migration|db)\b/ },
8558
+ { kind: "vcs", pattern: /^git\s|\bgh\s+(?:pr|api|issue)\b/ },
8559
+ { kind: "test", pattern: /^(?:vitest|jest|playwright)\b/ },
8560
+ { kind: "test", pattern: /^(?:ci:unit|test(?::\w+)?)\b/ },
8561
+ { kind: "test", pattern: /^turbo\s+run\s+test\b/ },
8562
+ { kind: "lint", pattern: /^(?:eslint|ci:lint|lint(?::\w+)?|knip|prettier)\b/ },
8563
+ { kind: "build", pattern: /^(?:tsc|turbo\s+run\s+build|build(?::\w+)?|next\s+build)\b/ }
8564
+ ];
8565
+ function classifyCommand(rawCommand) {
8566
+ const normalized = normalizeCommand(rawCommand);
8567
+ let kind = "other";
8568
+ for (const rule of KIND_RULES) {
8569
+ if (rule.pattern.test(normalized)) {
8570
+ kind = rule.kind;
8571
+ break;
8572
+ }
8573
+ }
8574
+ return { normalized, kind };
8575
+ }
8576
+ function splitCommandSegments(rawCommand) {
8577
+ const noHeredocs = rawCommand.replace(/<<-?\s*'?([A-Za-z_][A-Za-z0-9_]*)'?[\s\S]*?\n\1\b/g, "");
8578
+ return noHeredocs.split(/&&|;|\n/).map((segment) => segment.trim()).filter((segment) => segment.length > 0);
8579
+ }
8580
+ function extractFacts(spans) {
8581
+ const runs = [];
8582
+ const edits = [];
8583
+ const coverage = /* @__PURE__ */ new Set();
8584
+ if (spans.length > 0) coverage.add("edits");
8585
+ spans.forEach((span, seq) => {
8586
+ if (span.isEdit && span.file) {
8587
+ edits.push({
8588
+ seq,
8589
+ sessionIndex: span.sessionIndex,
8590
+ turnIndex: span.turnIndex,
8591
+ status: span.status,
8592
+ file: span.file
8593
+ });
8594
+ return;
8595
+ }
8596
+ const commandText = span.command === void 0 ? null : extractCommandText(span.command);
8597
+ if (commandText === null) return;
8598
+ coverage.add("commands");
8599
+ const segments2 = splitCommandSegments(commandText);
8600
+ const classifiedSegments = segments2.map((segment) => classifyCommand(segment)).filter((c) => c.kind !== "other");
8601
+ const strippedText = segments2.join(" && ");
8602
+ const toEmit = classifiedSegments.length > 0 ? classifiedSegments : strippedText ? [classifyCommand(strippedText)] : [];
8603
+ for (const classified of toEmit) {
8604
+ runs.push({
8605
+ seq,
8606
+ sessionIndex: span.sessionIndex,
8607
+ turnIndex: span.turnIndex,
8608
+ status: span.status,
8609
+ kind: classified.kind,
8610
+ normalized: classified.normalized
8611
+ });
8612
+ }
8613
+ });
8614
+ return { runs, edits, coverage };
8615
+ }
8616
+ var INPUT_CAP = 4096;
8617
+ function asText(value) {
8618
+ return typeof value === "string" ? value : JSON.stringify(value);
8619
+ }
8620
+ function cutCodePoints(text, max) {
8621
+ if (text.length <= max) return text;
8622
+ let end = 0;
8623
+ let count = 0;
8624
+ while (end < text.length && count < max) {
8625
+ const code = text.charCodeAt(end);
8626
+ end += code >= 55296 && code <= 56319 && end + 1 < text.length ? 2 : 1;
8627
+ count += 1;
8628
+ }
8629
+ return text.slice(0, end);
8630
+ }
8631
+ function storedCommand(call) {
8632
+ var _a;
8633
+ if (!call.input) return void 0;
8634
+ const input = cutCodePoints(JSON.stringify([{ role: "user", content: asText(call.input) }]), INPUT_CAP);
8635
+ try {
8636
+ const parsed = JSON.parse(input);
8637
+ if (Array.isArray(parsed) && typeof ((_a = parsed[0]) == null ? void 0 : _a.content) === "string") return parsed[0].content;
8638
+ return void 0;
8639
+ } catch {
8640
+ return input;
8641
+ }
8642
+ }
8643
+ var millis = (iso) => {
8644
+ if (!iso) return 0;
8645
+ const time = Date.parse(iso);
8646
+ return Number.isFinite(time) ? time : 0;
8647
+ };
8648
+ function spansOfSession(session, sessionIndex) {
8649
+ const timed = [];
8650
+ let cursor = millis(session.startedAt);
8651
+ for (const turn of session.turns) {
8652
+ const turnStart = millis(turn.ts) || cursor + 1;
8653
+ cursor = Math.max(cursor + 1, turnStart);
8654
+ turn.toolCalls.forEach((call, seq) => {
8655
+ const command = storedCommand(call);
8656
+ timed.push({
8657
+ time: cursor + seq + 1,
8658
+ name: `agent.tool.${call.name}`,
8659
+ span: {
8660
+ sessionIndex,
8661
+ turnIndex: turn.index,
8662
+ toolName: call.name,
8663
+ status: call.status,
8664
+ isEdit: call.isEdit === true,
8665
+ ...call.file ? { file: call.file } : {},
8666
+ ...command !== void 0 ? { command } : {}
8667
+ }
8668
+ });
8669
+ });
8670
+ }
8671
+ return timed;
8672
+ }
8673
+ var byStart = (a, b) => a.startedAt < b.startedAt ? -1 : a.startedAt > b.startedAt ? 1 : a.id < b.id ? -1 : a.id > b.id ? 1 : 0;
8674
+ function orderSessions(sessions) {
8675
+ const tops = sessions.filter((session) => session.subagent === void 0).sort(byStart);
8676
+ const topIds = new Set(tops.map((session) => session.id));
8677
+ const orphans = sessions.filter((session) => {
8678
+ var _a;
8679
+ return session.subagent !== void 0 && !topIds.has((_a = session.subagent.parentSessionId) != null ? _a : "");
8680
+ }).sort(byStart);
8681
+ return [...tops, ...orphans];
8682
+ }
8683
+ function sessionsToTimeline(sessions) {
8684
+ const out = [];
8685
+ orderSessions(sessions).forEach((session, sessionIndex) => {
8686
+ const children = sessions.filter((child) => child.subagent !== void 0 && child.subagent.parentSessionId === session.id).sort(byStart);
8687
+ const timed = [session, ...children].flatMap((member) => spansOfSession(member, sessionIndex));
8688
+ const ordered = timed.map((entry, index) => ({ entry, index })).sort((a, b) => a.entry.time - b.entry.time || (a.entry.name < b.entry.name ? -1 : a.entry.name > b.entry.name ? 1 : 0) || a.index - b.index);
8689
+ for (const { entry } of ordered) out.push(entry.span);
8690
+ });
8691
+ return out;
8692
+ }
8527
8693
 
8528
- export { CONTEXT_PIN_FILENAME, CONTEXT_PIN_SCHEMA_VERSION, CONTEXT_SOURCE_CONFIG_PATH, classifyTree, emitTree, generatedHeaderSource, normalizePath, normalizeRepoName, parseGoverns, parseOuterlayerConfig, parsePolicy, splitRawFile };
8694
+ export { CONTEXT_PIN_FILENAME, CONTEXT_PIN_SCHEMA_VERSION, CONTEXT_SOURCE_CONFIG_PATH, classifyTree, emitTree, extractFacts, generatedHeaderSource, normalizePath, normalizeRepoName, orderSessions, parseGoverns, parseOuterlayerConfig, parsePolicy, sessionsToTimeline, splitRawFile };
@@ -2,7 +2,7 @@
2
2
  import { createRequire } from 'node:module';
3
3
  import { runnerUnit, UNIT_MARKER } from './chunk-FBTE2A2X.js';
4
4
  import { checkFit } from './chunk-JKIWMRFH.js';
5
- import { builtinKind } from './chunk-PWBILI5P.js';
5
+ import { builtinKind } from './chunk-7KI224YS.js';
6
6
  import { runnerDir } from './chunk-ZM2IMMYN.js';
7
7
  import { dirname } from 'path';
8
8
  import { spawnSync } from 'child_process';