@outerlayer/cli 0.41.0-next.20261118022949 → 0.41.0-next.20261118042344
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/README.md +13 -65
- package/dist/{agent-credential-WCHRKI5G.js → agent-credential-HRNW646E.js} +5 -5
- package/dist/agent-setup-OY7X2RZ7.js +43 -0
- package/dist/{agent-subcommand-5N44GBJ7.js → agent-subcommand-IUZYR6XR.js} +4 -4
- package/dist/{artifact-link-cmd-YMMRVRQD.js → artifact-link-cmd-B6QPCFUL.js} +2 -2
- package/dist/{bridge-5VAASNNJ.js → bridge-4ZSJLYCX.js} +8 -8
- package/dist/{build-PF4W2ASA.js → build-XFVNQS7E.js} +14 -14
- package/dist/{build-disk-MSTWSDIT.js → build-disk-NGJQY2TK.js} +12 -12
- package/dist/build-info.json +1 -1
- package/dist/{builder-5PJVNQYN.js → builder-EQQV62EK.js} +11 -11
- package/dist/caller-4PJF4AG2.js +25 -0
- package/dist/{check-WKR6LDT7.js → check-PMCHCY4J.js} +56 -57
- package/dist/{chunk-BRLSGY57.js → chunk-372B3J4P.js} +1 -1
- package/dist/{chunk-RYVOUBUT.js → chunk-3YVYZTMD.js} +1 -1
- package/dist/{chunk-4Y4MZCAV.js → chunk-4CCWVDUX.js} +6 -6
- package/dist/{chunk-PELOJO27.js → chunk-4WR5WFJC.js} +11 -11
- package/dist/{chunk-OGY3XBHB.js → chunk-5SWJKCME.js} +4 -4
- package/dist/{chunk-RCJ3D5DA.js → chunk-6LKTKDMY.js} +2 -2
- package/dist/{chunk-5R54L7MB.js → chunk-6ML3LB5R.js} +3 -3
- package/dist/{chunk-HIJWCAGE.js → chunk-6PPR2Z2P.js} +5 -5
- package/dist/{chunk-CA3M6T4Z.js → chunk-7CUCNCYW.js} +7 -7
- package/dist/{chunk-SANXMMBW.js → chunk-7FVQCFTT.js} +3 -3
- package/dist/{chunk-FG25LDVH.js → chunk-7H3JTB2I.js} +6 -6
- package/dist/{chunk-ZFTAOXJE.js → chunk-7SLZKQBB.js} +38 -40
- package/dist/{chunk-ROLKRIOA.js → chunk-A37KFXXN.js} +18 -18
- package/dist/{chunk-ICU76D7N.js → chunk-BLFGNTAU.js} +5 -5
- package/dist/{chunk-3ZBBHCAW.js → chunk-BXQU44EL.js} +3 -3
- package/dist/{chunk-JR3R4R3R.js → chunk-DN2EA4XS.js} +1 -1
- package/dist/{chunk-MSDGVITJ.js → chunk-EEPVNSQ7.js} +1 -1
- package/dist/{chunk-SLM6EVQN.js → chunk-EJ6P43IT.js} +6 -6
- package/dist/{chunk-2RUTYYYA.js → chunk-EKBY375P.js} +1 -1
- package/dist/{chunk-ATXTGXGK.js → chunk-EMDZUXJX.js} +1 -1
- package/dist/{chunk-SRTJZV7P.js → chunk-HG3GUG5G.js} +1 -1
- package/dist/{chunk-MZJFHQJI.js → chunk-HJUJDDHO.js} +1 -1
- package/dist/{chunk-XMJNIIPM.js → chunk-HQYVI5T3.js} +45 -454
- package/dist/{chunk-5NKVS3UO.js → chunk-IDSEYLPI.js} +1 -1
- package/dist/{chunk-LOWZZ4QA.js → chunk-IL7GVNVQ.js} +1 -1
- package/dist/{chunk-4RPDWURG.js → chunk-ILHFH56O.js} +1 -1
- package/dist/{chunk-J2ADYASG.js → chunk-IQTWJYFV.js} +1 -1
- package/dist/{chunk-VWVXEJDK.js → chunk-IZ2NXWJV.js} +4 -4
- package/dist/{chunk-PZNXFA4N.js → chunk-J7NDBF6V.js} +1 -1
- package/dist/{chunk-JVCS7IOW.js → chunk-JE2W6Z2Y.js} +10 -10
- package/dist/{chunk-TKFMESAI.js → chunk-KC6AM5KC.js} +3 -3
- package/dist/{chunk-5DEHVQCK.js → chunk-KVZFYAYE.js} +14 -11
- package/dist/{chunk-Q3QJG2P6.js → chunk-LI4NF5TS.js} +2 -2
- package/dist/{chunk-B6OEHKKL.js → chunk-LMQSM3KR.js} +12505 -13481
- package/dist/{chunk-7CNODON3.js → chunk-MAFWNIYA.js} +1 -1
- package/dist/{chunk-6ZZHVNXE.js → chunk-MQGI4D3A.js} +6 -6
- package/dist/{chunk-M62TIWXX.js → chunk-NJBTQEEY.js} +3 -3
- package/dist/{chunk-FMOGX7RR.js → chunk-NJKM5XGH.js} +5 -5
- package/dist/{chunk-6JP7F7VC.js → chunk-NXLNXHDE.js} +6 -6
- package/dist/{chunk-QKVOUI56.js → chunk-OCDZ7MBX.js} +1 -1
- package/dist/{chunk-WT4EKUQL.js → chunk-OJSC57KK.js} +7 -7
- package/dist/{chunk-53GNEMTP.js → chunk-OR6OCGFY.js} +1 -1
- package/dist/{chunk-MNN45CQ2.js → chunk-OV3KU37X.js} +2 -2
- package/dist/{chunk-37WA2LQC.js → chunk-PDFCYYCC.js} +2 -8
- package/dist/{chunk-NI46LQRD.js → chunk-Q2TA7RYQ.js} +5 -27
- package/dist/{chunk-VKAQSJZN.js → chunk-QGJVNUCY.js} +1 -1
- package/dist/{chunk-K7KKKOHO.js → chunk-QKD23T7O.js} +9 -9
- package/dist/{chunk-Y26BNEMO.js → chunk-QW43URTD.js} +3 -3
- package/dist/{chunk-WNFITHNX.js → chunk-QW6TKDBL.js} +1 -1
- package/dist/{chunk-OVUMZ65V.js → chunk-QX4GZGMW.js} +3 -3
- package/dist/{chunk-BTJEBFAO.js → chunk-R3FVL26B.js} +7 -7
- package/dist/{chunk-ANWWAGQ2.js → chunk-R5JQH7V6.js} +2 -2
- package/dist/{chunk-55XGYVWE.js → chunk-RFSYZEJE.js} +5 -5
- package/dist/{chunk-JR6KYUIA.js → chunk-RJPLN6SO.js} +3 -3
- package/dist/{chunk-XBFVL7PB.js → chunk-S5QUXXJT.js} +4 -4
- package/dist/{chunk-OZZCRYJI.js → chunk-SHNKZGS7.js} +7 -7
- package/dist/{chunk-7RGKY7N5.js → chunk-SWSEQ6X3.js} +8 -8
- package/dist/{chunk-M5SLRRBU.js → chunk-SXPRKSRY.js} +2 -2
- package/dist/{chunk-CII3Z3YJ.js → chunk-T6PP5OYW.js} +4 -4
- package/dist/{chunk-2E5YBULG.js → chunk-T7PY3A5I.js} +1 -1
- package/dist/{chunk-KTZOD7A3.js → chunk-UG4AUZCR.js} +1 -1
- package/dist/{chunk-CDCO3HGT.js → chunk-UXLWZV2S.js} +4 -4
- package/dist/{chunk-GS5QF27G.js → chunk-UYOR2ZFY.js} +1 -1
- package/dist/{chunk-APVMCKLK.js → chunk-WGR5CYGQ.js} +1 -1
- package/dist/{chunk-BJJ5ULJS.js → chunk-WIIRJEMD.js} +7 -7
- package/dist/{chunk-P7WAAN35.js → chunk-X24VL3Q6.js} +1 -1
- package/dist/{chunk-XDAMSCJG.js → chunk-XEETBQKD.js} +1 -1
- package/dist/{chunk-26RXLXEX.js → chunk-Y2HG7SGT.js} +1 -1
- package/dist/{chunk-64QIUYMW.js → chunk-Y2X4YY3E.js} +33 -35
- package/dist/{chunk-SDCECDBS.js → chunk-ZBQDEROG.js} +4 -4
- package/dist/{chunk-67IEAQPG.js → chunk-ZEQT23XF.js} +1 -1
- package/dist/{chunk-4SMKP5QI.js → chunk-ZH6AN3UH.js} +1 -1
- package/dist/{chunk-475AL6JE.js → chunk-ZJNTS7HZ.js} +2 -2
- package/dist/{chunk-KJKMGZCS.js → chunk-ZWPENDEN.js} +8 -8
- package/dist/{chunk-5OI5KRAS.js → chunk-ZXYHJ4V2.js} +8 -8
- package/dist/{claude-launcher-FG7INEGW.js → claude-launcher-TD7BOXS3.js} +7 -7
- package/dist/{cli-SZQAC7W3.js → cli-GH5MZGRY.js} +177 -224
- package/dist/{command-CKF6YMRE.js → command-CGY337MC.js} +52 -53
- package/dist/{config-VVEK5PI7.js → config-ZGTWKAGF.js} +13 -13
- package/dist/{connect-cmd-27EZXSQD.js → connect-cmd-GKGB2E7L.js} +14 -14
- package/dist/{container-start-VQZXSLAM.js → container-start-JA6S5OZA.js} +49 -50
- package/dist/{context-cleanup-BUZVQNKC.js → context-cleanup-AQQC4EZ6.js} +4 -4
- package/dist/{context-show-cmd-XGWEED7L.js → context-show-cmd-55RKC5M6.js} +15 -15
- package/dist/{control-plane-launch-BEN5IP6V.js → control-plane-launch-UH6LIDIM.js} +15 -15
- package/dist/{demo-record-cmd-SLC5BB4F.js → demo-record-cmd-Q7RXHNSW.js} +9 -9
- package/dist/{demo-voice-cmd-DEBELV5H.js → demo-voice-cmd-LC75USDT.js} +21 -21
- package/dist/{dist-FKOMD5MC.js → dist-ITIDOS3E.js} +2 -2
- package/dist/{docker-V7LPG7UC.js → docker-DCZ3QU7E.js} +11 -11
- package/dist/{doctor-XPWALTBC.js → doctor-UOPEG5JW.js} +51 -52
- package/dist/{emit-artifact-cmd-LR5CDALJ.js → emit-artifact-cmd-DQXFW5QL.js} +20 -20
- package/dist/{emit-cmd-UDTT7ENT.js → emit-cmd-IPPDMPP6.js} +7 -7
- package/dist/{emit-criteria-cmd-QXOWR62U.js → emit-criteria-cmd-2YF7DG7K.js} +17 -17
- package/dist/{emit-demo-cmd-IBGCUSYL.js → emit-demo-cmd-Z2Z7G3BM.js} +21 -21
- package/dist/{emit-finding-cmd-QHJBPJPW.js → emit-finding-cmd-ZVDJ4IWI.js} +17 -17
- package/dist/{emit-step-cmd-2GPRJQNX.js → emit-step-cmd-WVMHTORK.js} +17 -17
- package/dist/{exec-client-VGSMXNKS.js → exec-client-6B65UMC4.js} +9 -9
- package/dist/{find-unit-7VMZPXFC.js → find-unit-CPKLR4S3.js} +14 -14
- package/dist/{findings-cmd-YUWS5J7S.js → findings-cmd-7QLBWQGC.js} +17 -17
- package/dist/{fleet-readiness-IOHYJY4W.js → fleet-readiness-5KULJEOF.js} +15 -15
- package/dist/{governing-source-KJNPV7BE.js → governing-source-CPCH4DJC.js} +22 -22
- package/dist/{guest-init-R7X5CUNQ.js → guest-init-DYUGDDAL.js} +10 -10
- package/dist/{hook-fast-4U5KN5DQ.js → hook-fast-5CJ6RJFG.js} +1 -1
- package/dist/{hook-install-NOWMUPSI.js → hook-install-33FYUDIE.js} +4 -4
- package/dist/host-checks-LQL5AAWT.js +83 -0
- package/dist/host-key-JCGCSUKW.js +20 -0
- package/dist/{image-tag-DQZQLNUN.js → image-tag-XNNZOXVO.js} +9 -9
- package/dist/index.js +4 -4
- package/dist/{init-GAUAGCXL.js → init-DYJMROGI.js} +47 -48
- package/dist/init-RDMYISJU.js +83 -0
- package/dist/{init-agent-BIIDEFD3.js → init-agent-ZCBIXS6M.js} +47 -48
- package/dist/init-cmd-TYN64DJI.js +55 -0
- package/dist/{init-update-AZOTPBI7.js → init-update-MJ7MYP6V.js} +25 -25
- package/dist/install-cmd-QYJDQH6P.js +28 -0
- package/dist/launch-agent-YB3ZHJZO.js +28 -0
- package/dist/{layout-U2ZTNGVB.js → layout-JQCHHAB7.js} +4 -4
- package/dist/{login-browser-QAPMBSQA.js → login-browser-J5BFWBCZ.js} +2 -2
- package/dist/{logs-GWNZVEWX.js → logs-7HCS6KSZ.js} +8 -9
- package/dist/loop-3JAEQFO7.js +93 -0
- package/dist/machine-HLEJXQNG.js +83 -0
- package/dist/{machine-skills-2QFBY2II.js → machine-skills-XOZYRCQU.js} +4 -4
- package/dist/{mcp-install-cmd-KRZJVOND.js → mcp-install-cmd-2OYL5QG2.js} +4 -4
- package/dist/{mcp-serve-cmd-7ST4TEEZ.js → mcp-serve-cmd-WX36M5AW.js} +10 -10
- package/dist/{paths-2QQQW7UU.js → paths-BFCAC3BS.js} +8 -8
- package/dist/pending-DDB24JP7.js +20 -0
- package/dist/{pidfile-US23B2SQ.js → pidfile-WLYGNER6.js} +9 -9
- package/dist/{record-LCEWXDKS.js → record-KQIGBRJO.js} +9 -9
- package/dist/{relay-MHWMGCTK.js → relay-LPJV7OVV.js} +6 -6
- package/dist/{relay-protocol-FHGPRNPT.js → relay-protocol-3BVU2NN5.js} +6 -6
- package/dist/{run-cmd-BH7M2GHA.js → run-cmd-DH45VQHD.js} +17 -17
- package/dist/{runner-agents-2JTYE3RL.js → runner-agents-VTEO2GEK.js} +4 -4
- package/dist/runner-env-YS7NTZVF.js +26 -0
- package/dist/{runner-identity-F727CIPY.js → runner-identity-CXYSHPMV.js} +11 -11
- package/dist/{runner-key-CSXOSLTR.js → runner-key-VVGDYJ3V.js} +47 -48
- package/dist/{session-sender-GRHNLJ54.js → session-sender-XATQAHUP.js} +20 -20
- package/dist/{setup-cmd-LOXZNIRO.js → setup-cmd-BDNW3QX2.js} +15 -15
- package/dist/{setup-wiring-2GBFFOAM.js → setup-wiring-7WP7T6DZ.js} +54 -55
- package/dist/{spec-cmd-UH6RGIST.js → spec-cmd-JQD4MVSD.js} +18 -18
- package/dist/{starter-pack-G5TQVPMW.js → starter-pack-VJ6M5POI.js} +5 -5
- package/dist/state-ISFCEXUY.js +20 -0
- package/dist/{status-V4WZJJCB.js → status-OLYG2DQO.js} +47 -48
- package/dist/{sync-cmd-QK6IQF3F.js → sync-cmd-4WBPOCSV.js} +19 -19
- package/dist/update-steps-OSHKSM76.js +84 -0
- package/dist/{watch-OQKMLLTU.js → watch-FVZGHC4H.js} +19 -19
- package/dist/{work-claim-cmd-KHEY7QBX.js → work-claim-cmd-5QLR2AXJ.js} +23 -23
- package/dist/{work-cmd-KXMF42BU.js → work-cmd-4WIUDL3X.js} +17 -17
- package/dist/{work-comment-cmd-4QEJW4UR.js → work-comment-cmd-H7D2QMAH.js} +19 -19
- package/dist/{work-demo-cmd-UNJ77ILF.js → work-demo-cmd-GDECXMTW.js} +17 -17
- package/dist/{work-logs-cmd-HI4P3EGH.js → work-logs-cmd-BEJ57ZYU.js} +17 -17
- package/dist/{work-mock-cmd-RN6A5FDA.js → work-mock-cmd-BMYUKPLS.js} +17 -17
- package/dist/{work-needs-attention-cmd-TUINWEIT.js → work-needs-attention-cmd-AUQIQDUY.js} +17 -17
- package/dist/{work-no-change-cmd-2ASMVDHL.js → work-no-change-cmd-MKXFCWZB.js} +17 -17
- package/dist/{work-open-pr-cmd-C5VYFOHW.js → work-open-pr-cmd-TMATND63.js} +18 -18
- package/dist/{work-pr-cmd-ICYDMFTL.js → work-pr-cmd-PYM5ALZY.js} +17 -17
- package/dist/{work-proofs-cmd-6IR65227.js → work-proofs-cmd-Q4LFVRGN.js} +19 -19
- package/dist/{work-proofs-record-4MYPLAT3.js → work-proofs-record-TOM5TMTS.js} +25 -25
- package/dist/{work-stop-cmd-K2SHFPWB.js → work-stop-cmd-CCUZFQEZ.js} +17 -17
- package/package.json +1 -1
- package/dist/agent-setup-ISSLHGJC.js +0 -43
- package/dist/caller-XLTD6RGV.js +0 -25
- package/dist/chunk-I3LTIAOR.js +0 -11
- package/dist/emit-result-cmd-XOISZCY3.js +0 -242
- package/dist/host-checks-HJT534RN.js +0 -84
- package/dist/host-key-6MP2WQDQ.js +0 -20
- package/dist/init-3JHSTPBP.js +0 -84
- package/dist/init-cmd-VSR3VLGI.js +0 -55
- package/dist/install-cmd-S5VFI7NR.js +0 -28
- package/dist/launch-agent-AXF2ED2A.js +0 -28
- package/dist/loop-ALI4LKRI.js +0 -94
- package/dist/machine-DZW4XHV5.js +0 -84
- package/dist/pending-MIZOCMQO.js +0 -20
- package/dist/runner-env-PU6WIRCC.js +0 -26
- package/dist/state-L67V6AML.js +0 -20
- package/dist/update-steps-LDTGTKEI.js +0 -85
- package/dist/{real-deps-HNNHF3UN.js → real-deps-B7NMEDXM.js} +1 -1
|
@@ -5,8 +5,8 @@ import { CLAUDE_CODE, CODEX, OPENCODE, NATIVE_AGENTS, LEGACY_AGENT, homeRelative
|
|
|
5
5
|
import { MAINTAINED_SKILLS } from './chunk-VSBG7MMU.js';
|
|
6
6
|
import { resolvePackageVersion } from './chunk-RA3O54FC.js';
|
|
7
7
|
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
8
|
-
import { WARNING_CODES, forkFor, RAW_MIRROR_SEGMENTS, compareVersions, WarningCollector, isNewerThanSupported, bucketsFromTurns, costOfUsage, ZSTD_UNSUPPORTED_MESSAGE } from './chunk-
|
|
9
|
-
import { CODE_REVIEW_NAME, CRITERIA_JUDGE_NAME, RESERVED_EMIT_NAMES, EVENT_TYPES, isHumanUserTurn, INPUT_BAND_BOUNDARIES, parseAgentSession, SCHEMA_VERSION,
|
|
8
|
+
import { WARNING_CODES, forkFor, RAW_MIRROR_SEGMENTS, compareVersions, WarningCollector, isNewerThanSupported, bucketsFromTurns, costOfUsage, ZSTD_UNSUPPORTED_MESSAGE } from './chunk-UG4AUZCR.js';
|
|
9
|
+
import { CODE_REVIEW_NAME, CRITERIA_JUDGE_NAME, RESERVED_EMIT_NAMES, EVENT_TYPES, isHumanUserTurn, INPUT_BAND_BOUNDARIES, parseAgentSession, SCHEMA_VERSION, SPEED_MAX_LENGTH } from './chunk-PDFCYYCC.js';
|
|
10
10
|
import { __commonJS, __require, __toESM } from './chunk-Z5GEFMRW.js';
|
|
11
11
|
import { existsSync, readFileSync, mkdirSync, writeFileSync, readdirSync, rmSync, renameSync, realpathSync, readlinkSync, symlinkSync, copyFileSync, statSync, accessSync, constants, lstatSync } from 'fs';
|
|
12
12
|
import { join as join$1, dirname, sep, basename, relative, delimiter } from 'path';
|
|
@@ -7724,7 +7724,6 @@ function normalizeRepoName(repo) {
|
|
|
7724
7724
|
var CONTEXT_PIN_FILENAME = ".outerlayer-pin.json";
|
|
7725
7725
|
var JUDGE_SUBJECTS = ["criteria", "none"];
|
|
7726
7726
|
var MAX_BRIEF_LENGTH = 300;
|
|
7727
|
-
var MAX_COMMAND_LENGTH = 2e3;
|
|
7728
7727
|
var EXTENDS_PROBLEM = '"extends" is not a policy key \u2014 every check is a file in .outerlayer/validators/. Delete the extends line';
|
|
7729
7728
|
var FREED_BUILTINS = /* @__PURE__ */ new Set(["ci-passed", "code-review-ran"]);
|
|
7730
7729
|
var RETIRED_BUILTINS = /* @__PURE__ */ new Set([
|
|
@@ -7745,12 +7744,6 @@ var MAX_GLOB_LENGTH = 200;
|
|
|
7745
7744
|
var MAX_WHEN_PATHS = 20;
|
|
7746
7745
|
var MAX_WHEN_REPOSITORIES = 20;
|
|
7747
7746
|
var REPOSITORY_NAME = /^[\w.-]+\/[\w.-]+$/;
|
|
7748
|
-
var NEEDS_ALIASES = {
|
|
7749
|
-
"tool-calls.commands": "commands",
|
|
7750
|
-
"tool-calls.edits": "edits",
|
|
7751
|
-
commands: "commands",
|
|
7752
|
-
edits: "edits"
|
|
7753
|
-
};
|
|
7754
7747
|
function isRecord(value) {
|
|
7755
7748
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
7756
7749
|
}
|
|
@@ -7874,128 +7867,7 @@ function parsePolicyFile(file) {
|
|
|
7874
7867
|
}
|
|
7875
7868
|
return { overrides, mergeGate, review, testProof, criteriaMissing, criteriaJudge, criteriaJudgeBrief, problems };
|
|
7876
7869
|
}
|
|
7877
|
-
|
|
7878
|
-
var _a;
|
|
7879
|
-
if (!isRecord(value)) {
|
|
7880
|
-
problems.push({ file, problem: `"session.ran" must be a mapping with a "command"` });
|
|
7881
|
-
return null;
|
|
7882
|
-
}
|
|
7883
|
-
for (const key of Object.keys(value)) {
|
|
7884
|
-
if (key !== "command" && key !== "status") {
|
|
7885
|
-
problems.push({ file, problem: `"session.ran" has unknown key "${inlineText(key)}"` });
|
|
7886
|
-
return null;
|
|
7887
|
-
}
|
|
7888
|
-
}
|
|
7889
|
-
const command = value["command"];
|
|
7890
|
-
if (typeof command !== "string" || command.trim() === "") {
|
|
7891
|
-
problems.push({ file, problem: `"session.ran" needs a non-empty "command"` });
|
|
7892
|
-
return null;
|
|
7893
|
-
}
|
|
7894
|
-
const status = (_a = value["status"]) != null ? _a : "ok";
|
|
7895
|
-
if (status !== "ok" && status !== "error") {
|
|
7896
|
-
problems.push({ file, problem: `"session.ran" status must be ok or error` });
|
|
7897
|
-
return null;
|
|
7898
|
-
}
|
|
7899
|
-
return { type: "session-ran", command: command.trim(), status };
|
|
7900
|
-
}
|
|
7901
|
-
function parseArtifactRequirement(value, file, problems) {
|
|
7902
|
-
const fail = (problem) => {
|
|
7903
|
-
problems.push({ file, problem });
|
|
7904
|
-
return null;
|
|
7905
|
-
};
|
|
7906
|
-
if (!isRecord(value) || Object.keys(value).some((key) => key !== "kind" && key !== "for")) {
|
|
7907
|
-
return fail(`"artifact" must be a mapping of "kind" and "for"`);
|
|
7908
|
-
}
|
|
7909
|
-
const kind = ARTIFACT_KINDS.find((known) => known === value["kind"]);
|
|
7910
|
-
if (kind === void 0) {
|
|
7911
|
-
return fail(`"artifact" kind must be one of ${ARTIFACT_KINDS.join(", ")}`);
|
|
7912
|
-
}
|
|
7913
|
-
const boundTo = ArtifactCriterionIdSchema.safeParse(value["for"]);
|
|
7914
|
-
if (!boundTo.success) {
|
|
7915
|
-
return fail(`"artifact" for must name the id the artifact is emitted --for`);
|
|
7916
|
-
}
|
|
7917
|
-
return { type: "artifact", kind, for: boundTo.data };
|
|
7918
|
-
}
|
|
7919
|
-
function parseRequirementAlt(value, file, problems) {
|
|
7920
|
-
if (!isRecord(value)) {
|
|
7921
|
-
problems.push({ file, problem: `each requirement must be a single-key mapping` });
|
|
7922
|
-
return null;
|
|
7923
|
-
}
|
|
7924
|
-
const keys = Object.keys(value);
|
|
7925
|
-
if (keys.length !== 1) {
|
|
7926
|
-
problems.push({
|
|
7927
|
-
file,
|
|
7928
|
-
problem: `a requirement names exactly one of session.ran, validator, emitted, artifact`
|
|
7929
|
-
});
|
|
7930
|
-
return null;
|
|
7931
|
-
}
|
|
7932
|
-
const key = keys[0];
|
|
7933
|
-
if (key === "session.ran") return parseSessionRan(value[key], file, problems);
|
|
7934
|
-
if (key === "validator") {
|
|
7935
|
-
const id = value[key];
|
|
7936
|
-
if (typeof id !== "string" || !SLUG_PATTERN2.test(id)) {
|
|
7937
|
-
problems.push({ file, problem: `"validator" must name a validator id` });
|
|
7938
|
-
return null;
|
|
7939
|
-
}
|
|
7940
|
-
return { type: "validator", id };
|
|
7941
|
-
}
|
|
7942
|
-
if (key === "emitted") {
|
|
7943
|
-
const name = value[key];
|
|
7944
|
-
if (typeof name !== "string" || !SLUG_PATTERN2.test(name)) {
|
|
7945
|
-
problems.push({ file, problem: `"emitted" must name an emit (id characters only)` });
|
|
7946
|
-
return null;
|
|
7947
|
-
}
|
|
7948
|
-
return { type: "emitted", name };
|
|
7949
|
-
}
|
|
7950
|
-
if (key === "artifact") return parseArtifactRequirement(value[key], file, problems);
|
|
7951
|
-
problems.push({ file, problem: `unknown requirement "${key}"` });
|
|
7952
|
-
return null;
|
|
7953
|
-
}
|
|
7954
|
-
function parseRequire(value, file, problems) {
|
|
7955
|
-
if (isRecord(value) && "any" in value) {
|
|
7956
|
-
if (Object.keys(value).length !== 1 || !Array.isArray(value["any"]) || value["any"].length === 0) {
|
|
7957
|
-
problems.push({ file, problem: `"require.any" must be a non-empty list of requirements` });
|
|
7958
|
-
return null;
|
|
7959
|
-
}
|
|
7960
|
-
const alts = [];
|
|
7961
|
-
for (const entry of value["any"]) {
|
|
7962
|
-
const alt = parseRequirementAlt(entry, file, problems);
|
|
7963
|
-
if (alt === null) return null;
|
|
7964
|
-
alts.push(alt);
|
|
7965
|
-
}
|
|
7966
|
-
return alts;
|
|
7967
|
-
}
|
|
7968
|
-
const single = parseRequirementAlt(value, file, problems);
|
|
7969
|
-
return single === null ? null : [single];
|
|
7970
|
-
}
|
|
7971
|
-
function parseNeeds(value, file, problems) {
|
|
7972
|
-
if (value === void 0) return [];
|
|
7973
|
-
if (!Array.isArray(value)) {
|
|
7974
|
-
problems.push({ file, problem: `"needs" must be a list of fact families` });
|
|
7975
|
-
return null;
|
|
7976
|
-
}
|
|
7977
|
-
const families = [];
|
|
7978
|
-
for (const entry of value) {
|
|
7979
|
-
const family = typeof entry === "string" ? NEEDS_ALIASES[entry] : void 0;
|
|
7980
|
-
if (family === void 0) {
|
|
7981
|
-
problems.push({ file, problem: `unknown fact family "${inlineText(String(entry))}" in "needs"` });
|
|
7982
|
-
return null;
|
|
7983
|
-
}
|
|
7984
|
-
families.push(family);
|
|
7985
|
-
}
|
|
7986
|
-
return families;
|
|
7987
|
-
}
|
|
7988
|
-
var CUSTOM_KEYS = /* @__PURE__ */ new Set([
|
|
7989
|
-
"id",
|
|
7990
|
-
"kind",
|
|
7991
|
-
"name",
|
|
7992
|
-
"row",
|
|
7993
|
-
"level",
|
|
7994
|
-
"when",
|
|
7995
|
-
"require",
|
|
7996
|
-
"run",
|
|
7997
|
-
"needs"
|
|
7998
|
-
]);
|
|
7870
|
+
var CUSTOM_KEYS = /* @__PURE__ */ new Set(["id", "kind", "name", "row", "level", "when", "run"]);
|
|
7999
7871
|
function parseCustomFile(file, problems) {
|
|
8000
7872
|
var _a;
|
|
8001
7873
|
const fail = (problem) => {
|
|
@@ -8019,10 +7891,9 @@ function parseCustomFile(file, problems) {
|
|
|
8019
7891
|
return fail(`"id" must be lowercase id characters (got ${inlineText(JSON.stringify(root["id"]))})`);
|
|
8020
7892
|
}
|
|
8021
7893
|
const kind = root["kind"];
|
|
8022
|
-
if (kind !== "validation"
|
|
8023
|
-
return fail(`"${id}" has kind "${inlineText(String(kind))}" \u2014 use validation
|
|
7894
|
+
if (kind !== "validation") {
|
|
7895
|
+
return fail(`"${id}" has kind "${inlineText(String(kind))}" \u2014 use validation`);
|
|
8024
7896
|
}
|
|
8025
|
-
if (kind === "signal") return { signalId: id };
|
|
8026
7897
|
const rawRow = root["row"];
|
|
8027
7898
|
if (typeof rawRow !== "string" || rawRow.trim() === "") {
|
|
8028
7899
|
return fail(`"${id}" needs a "row" \u2014 the sentence its result renders as`);
|
|
@@ -8103,80 +7974,39 @@ function parseCustomFile(file, problems) {
|
|
|
8103
7974
|
whenIssueLabels = issueLabels.map((label) => label.trim());
|
|
8104
7975
|
}
|
|
8105
7976
|
}
|
|
8106
|
-
const
|
|
8107
|
-
|
|
8108
|
-
|
|
8109
|
-
return fail(`"${id}" must declare exactly one of "require" or "run"`);
|
|
7977
|
+
const run = root["run"];
|
|
7978
|
+
if (!isRecord(run) || Object.keys(run).some((key) => key !== "where" && key !== "emit" && key !== "judge")) {
|
|
7979
|
+
return fail(`"${id}" needs a "run" mapping of "where", "emit" and "judge"`);
|
|
8110
7980
|
}
|
|
8111
|
-
|
|
8112
|
-
|
|
8113
|
-
|
|
8114
|
-
|
|
8115
|
-
|
|
8116
|
-
|
|
8117
|
-
|
|
8118
|
-
|
|
8119
|
-
|
|
8120
|
-
|
|
8121
|
-
|
|
8122
|
-
|
|
8123
|
-
|
|
8124
|
-
|
|
8125
|
-
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
}
|
|
8129
|
-
|
|
8130
|
-
|
|
8131
|
-
|
|
8132
|
-
|
|
8133
|
-
|
|
8134
|
-
|
|
8135
|
-
|
|
8136
|
-
|
|
8137
|
-
|
|
8138
|
-
|
|
8139
|
-
}
|
|
8140
|
-
if (where === "host" && run["judge"] !== void 0) {
|
|
8141
|
-
if (run["command"] !== void 0) {
|
|
8142
|
-
return fail(`"${id}" run declares both "judge" and "command" \u2014 a host check has one or the other`);
|
|
8143
|
-
}
|
|
8144
|
-
const rawJudge = run["judge"];
|
|
8145
|
-
if (!isRecord(rawJudge) || Object.keys(rawJudge).some((key) => key !== "brief" && key !== "subjects")) {
|
|
8146
|
-
return fail(`"${id}" run.judge must be a mapping with a "brief" and, optionally, "subjects"`);
|
|
8147
|
-
}
|
|
8148
|
-
const rawSubjects = (_a = rawJudge["subjects"]) != null ? _a : "criteria";
|
|
8149
|
-
if (typeof rawSubjects !== "string" || !JUDGE_SUBJECTS.includes(rawSubjects)) {
|
|
8150
|
-
return fail(`"${id}" run.judge.subjects must be one of ${JUDGE_SUBJECTS.map((value) => `"${value}"`).join(", ")}`);
|
|
8151
|
-
}
|
|
8152
|
-
const brief = rawJudge["brief"];
|
|
8153
|
-
if (typeof brief !== "string" || brief.trim() === "" || brief.length > MAX_BRIEF_LENGTH || brief.startsWith("/") || brief.split("/").includes("..")) {
|
|
8154
|
-
return fail(
|
|
8155
|
-
`"${id}" run.judge.brief must be a relative path inside the repository, of at most ${MAX_BRIEF_LENGTH} characters, with no ".." segment`
|
|
8156
|
-
);
|
|
8157
|
-
}
|
|
8158
|
-
judge3 = { brief: brief.trim(), subjects: rawSubjects };
|
|
8159
|
-
runWhere = "host";
|
|
8160
|
-
} else if (where === "host") {
|
|
8161
|
-
const rawCommand = run["command"];
|
|
8162
|
-
if (rawCommand === void 0) {
|
|
8163
|
-
return fail(`"${id}" run.where: host needs a "command" or a "judge" \u2014 what the host runs`);
|
|
8164
|
-
}
|
|
8165
|
-
if (typeof rawCommand !== "string" || rawCommand.trim() === "" || rawCommand.length > MAX_COMMAND_LENGTH) {
|
|
8166
|
-
return fail(`"${id}" run.command must be a non-empty string of at most ${MAX_COMMAND_LENGTH} characters`);
|
|
8167
|
-
}
|
|
8168
|
-
command = rawCommand.trim();
|
|
8169
|
-
runWhere = "host";
|
|
8170
|
-
}
|
|
8171
|
-
declaresEmit = emit;
|
|
8172
|
-
requireAny = [where === "host" ? { type: "emitted", name: emit, recorder: "host" } : { type: "emitted", name: emit }];
|
|
8173
|
-
} else {
|
|
8174
|
-
const parsed = parseRequire(root["require"], file.path, problems);
|
|
8175
|
-
if (parsed === null) return null;
|
|
8176
|
-
requireAny = parsed;
|
|
7981
|
+
if (run["where"] !== "host") {
|
|
7982
|
+
return fail(`"${id}" run.where must be host \u2014 a runner runs the judge after a build`);
|
|
7983
|
+
}
|
|
7984
|
+
const emit = run["emit"];
|
|
7985
|
+
if (typeof emit !== "string" || !SLUG_PATTERN2.test(emit)) {
|
|
7986
|
+
return fail(`"${id}" run.emit must name the emit (id characters only)`);
|
|
7987
|
+
}
|
|
7988
|
+
if (RESERVED_EMIT_NAMES.includes(emit)) {
|
|
7989
|
+
return fail(
|
|
7990
|
+
`"${id}" run.emit "${emit}" is reserved \u2014 \`outerlayer emit ${emit}\` is a subcommand, so a check cannot be recorded under that name`
|
|
7991
|
+
);
|
|
7992
|
+
}
|
|
7993
|
+
const rawJudge = run["judge"];
|
|
7994
|
+
if (rawJudge === void 0) {
|
|
7995
|
+
return fail(`"${id}" run needs a "judge" \u2014 the brief a runner has an agent follow`);
|
|
7996
|
+
}
|
|
7997
|
+
if (!isRecord(rawJudge) || Object.keys(rawJudge).some((key) => key !== "brief" && key !== "subjects")) {
|
|
7998
|
+
return fail(`"${id}" run.judge must be a mapping with a "brief" and, optionally, "subjects"`);
|
|
7999
|
+
}
|
|
8000
|
+
const rawSubjects = (_a = rawJudge["subjects"]) != null ? _a : "criteria";
|
|
8001
|
+
if (typeof rawSubjects !== "string" || !JUDGE_SUBJECTS.includes(rawSubjects)) {
|
|
8002
|
+
return fail(`"${id}" run.judge.subjects must be one of ${JUDGE_SUBJECTS.map((value) => `"${value}"`).join(", ")}`);
|
|
8003
|
+
}
|
|
8004
|
+
const brief = rawJudge["brief"];
|
|
8005
|
+
if (typeof brief !== "string" || brief.trim() === "" || brief.length > MAX_BRIEF_LENGTH || brief.startsWith("/") || brief.split("/").includes("..")) {
|
|
8006
|
+
return fail(
|
|
8007
|
+
`"${id}" run.judge.brief must be a relative path inside the repository, of at most ${MAX_BRIEF_LENGTH} characters, with no ".." segment`
|
|
8008
|
+
);
|
|
8177
8009
|
}
|
|
8178
|
-
const declaredNeeds = parseNeeds(root["needs"], file.path, problems);
|
|
8179
|
-
if (declaredNeeds === null) return null;
|
|
8180
8010
|
return {
|
|
8181
8011
|
def: {
|
|
8182
8012
|
id,
|
|
@@ -8187,81 +8017,12 @@ function parseCustomFile(file, problems) {
|
|
|
8187
8017
|
whenIssueType,
|
|
8188
8018
|
whenIssueLabels,
|
|
8189
8019
|
...whenRepositories === void 0 ? {} : { whenRepositories, whenRepositoriesFile: file.path },
|
|
8190
|
-
|
|
8191
|
-
|
|
8192
|
-
// reads. A session.ran alternative is guarded per-alternative at
|
|
8193
|
-
// evaluation regardless, so an uncaptured command channel can never
|
|
8194
|
-
// silently pass; deriving it here would additionally blind an `any:`
|
|
8195
|
-
// whose OTHER alternative (an emitted result) could still answer.
|
|
8196
|
-
needs: [...new Set(declaredNeeds)].sort(),
|
|
8197
|
-
declaresEmit,
|
|
8198
|
-
...runWhere === void 0 ? {} : { runWhere },
|
|
8199
|
-
...command === void 0 ? {} : { command },
|
|
8200
|
-
...judge3 === void 0 ? {} : { judge: judge3 }
|
|
8020
|
+
declaresEmit: emit,
|
|
8021
|
+
judge: { brief: brief.trim(), subjects: rawSubjects }
|
|
8201
8022
|
},
|
|
8202
|
-
file: file.path
|
|
8203
|
-
validatorRefs: requireAny.flatMap((alt) => alt.type === "validator" ? [alt.id] : []),
|
|
8204
|
-
emittedRefs: requireAny.flatMap((alt) => alt.type === "emitted" ? [alt.name] : [])
|
|
8023
|
+
file: file.path
|
|
8205
8024
|
};
|
|
8206
8025
|
}
|
|
8207
|
-
function resolveReferences(parsed, signalIds, problems) {
|
|
8208
|
-
let surviving = parsed;
|
|
8209
|
-
for (; ; ) {
|
|
8210
|
-
const ids = new Set(surviving.map((p) => p.def.id));
|
|
8211
|
-
const emits = new Set(
|
|
8212
|
-
surviving.flatMap((p) => p.def.declaresEmit === null ? [] : [p.def.declaresEmit])
|
|
8213
|
-
);
|
|
8214
|
-
const next = surviving.filter((candidate) => {
|
|
8215
|
-
for (const ref of candidate.validatorRefs) {
|
|
8216
|
-
if (ref === CODE_REVIEW_NAME) continue;
|
|
8217
|
-
if (ref === candidate.def.id || !ids.has(ref) || signalIds.has(ref)) {
|
|
8218
|
-
problems.push({
|
|
8219
|
-
file: candidate.file,
|
|
8220
|
-
problem: `"${candidate.def.id}" requires validator "${ref}" \u2014 ${signalIds.has(ref) ? "a signal can never satisfy a validation" : RETIRED_BUILTINS.has(ref) ? "that built-in check was retired" : "no such validator exists"}`
|
|
8221
|
-
});
|
|
8222
|
-
return false;
|
|
8223
|
-
}
|
|
8224
|
-
}
|
|
8225
|
-
for (const name of candidate.emittedRefs) {
|
|
8226
|
-
if (name !== CODE_REVIEW_NAME && !emits.has(name)) {
|
|
8227
|
-
problems.push({
|
|
8228
|
-
file: candidate.file,
|
|
8229
|
-
problem: `"${candidate.def.id}" requires emitted "${name}" but no validator declares emit: ${name}`
|
|
8230
|
-
});
|
|
8231
|
-
return false;
|
|
8232
|
-
}
|
|
8233
|
-
}
|
|
8234
|
-
return true;
|
|
8235
|
-
});
|
|
8236
|
-
if (next.length === surviving.length) return dropCycles(next, problems);
|
|
8237
|
-
surviving = next;
|
|
8238
|
-
}
|
|
8239
|
-
}
|
|
8240
|
-
function dropCycles(parsed, problems) {
|
|
8241
|
-
const byId = new Map(parsed.map((p) => [p.def.id, p]));
|
|
8242
|
-
const state = /* @__PURE__ */ new Map();
|
|
8243
|
-
const cyclic = /* @__PURE__ */ new Set();
|
|
8244
|
-
const visit = (id, stack) => {
|
|
8245
|
-
const entry = byId.get(id);
|
|
8246
|
-
if (!entry || state.get(id) === "done") return;
|
|
8247
|
-
if (state.get(id) === "visiting") {
|
|
8248
|
-
for (const member of stack.slice(stack.indexOf(id))) cyclic.add(member);
|
|
8249
|
-
return;
|
|
8250
|
-
}
|
|
8251
|
-
state.set(id, "visiting");
|
|
8252
|
-
for (const ref of entry.validatorRefs) visit(ref, [...stack, id]);
|
|
8253
|
-
state.set(id, "done");
|
|
8254
|
-
};
|
|
8255
|
-
for (const p of parsed) visit(p.def.id, []);
|
|
8256
|
-
return parsed.filter((p) => {
|
|
8257
|
-
if (!cyclic.has(p.def.id)) return true;
|
|
8258
|
-
problems.push({
|
|
8259
|
-
file: p.file,
|
|
8260
|
-
problem: `"${p.def.id}" is part of a validator-reference cycle and cannot be evaluated`
|
|
8261
|
-
});
|
|
8262
|
-
return false;
|
|
8263
|
-
});
|
|
8264
|
-
}
|
|
8265
8026
|
function parsePolicy(policyFile, validatorFiles) {
|
|
8266
8027
|
var _a, _b, _c, _d, _e, _f;
|
|
8267
8028
|
const problems = [];
|
|
@@ -8282,12 +8043,11 @@ function parsePolicy(policyFile, validatorFiles) {
|
|
|
8282
8043
|
const criteriaMissing = (_d = policy.criteriaMissing) != null ? _d : policyFile !== null ? "warn" : "off";
|
|
8283
8044
|
const criteriaJudge = (_e = policy.criteriaJudge) != null ? _e : "warn";
|
|
8284
8045
|
const parsed = [];
|
|
8285
|
-
const signalIds = /* @__PURE__ */ new Set();
|
|
8286
8046
|
const seenIds = /* @__PURE__ */ new Set();
|
|
8287
8047
|
for (const file of [...validatorFiles].sort((a, b) => a.path < b.path ? -1 : 1)) {
|
|
8288
8048
|
const result = parseCustomFile(file, problems);
|
|
8289
8049
|
if (result === null) continue;
|
|
8290
|
-
const id =
|
|
8050
|
+
const id = result.def.id;
|
|
8291
8051
|
const collidesWithBuiltin = RETIRED_BUILTINS.has(id);
|
|
8292
8052
|
if (seenIds.has(id) || collidesWithBuiltin) {
|
|
8293
8053
|
problems.push({
|
|
@@ -8297,12 +8057,10 @@ function parsePolicy(policyFile, validatorFiles) {
|
|
|
8297
8057
|
continue;
|
|
8298
8058
|
}
|
|
8299
8059
|
seenIds.add(id);
|
|
8300
|
-
|
|
8301
|
-
else parsed.push(result);
|
|
8060
|
+
parsed.push(result);
|
|
8302
8061
|
}
|
|
8303
8062
|
const emitOwners = /* @__PURE__ */ new Map();
|
|
8304
8063
|
const deduped = parsed.filter((p) => {
|
|
8305
|
-
if (p.def.declaresEmit === null) return true;
|
|
8306
8064
|
const owner = emitOwners.get(p.def.declaresEmit);
|
|
8307
8065
|
if (owner === void 0) {
|
|
8308
8066
|
emitOwners.set(p.def.declaresEmit, p.def.id);
|
|
@@ -8314,193 +8072,26 @@ function parsePolicy(policyFile, validatorFiles) {
|
|
|
8314
8072
|
});
|
|
8315
8073
|
return false;
|
|
8316
8074
|
});
|
|
8317
|
-
const
|
|
8318
|
-
const sorted = resolved.map((p) => p.def).sort((a, b) => a.id < b.id ? -1 : 1);
|
|
8075
|
+
const sorted = deduped.map((p) => p.def).sort((a, b) => a.id < b.id ? -1 : 1);
|
|
8319
8076
|
const levels = {};
|
|
8320
8077
|
for (const custom of sorted) levels[custom.id] = custom.level;
|
|
8321
8078
|
for (const [id, level] of Object.entries(policy.overrides)) {
|
|
8322
8079
|
if (RETIRED_BUILTINS.has(id) || id === CODE_REVIEW_NAME || id === CRITERIA_JUDGE_NAME) continue;
|
|
8323
8080
|
if (FREED_BUILTINS.has(id) && !(id in levels)) continue;
|
|
8324
|
-
if (!(id in levels)
|
|
8081
|
+
if (!(id in levels)) {
|
|
8325
8082
|
problems.push({
|
|
8326
8083
|
file: (_f = policyFile == null ? void 0 : policyFile.path) != null ? _f : ".outerlayer/policy.yaml",
|
|
8327
8084
|
problem: `policy levels unknown validator "${id}"`
|
|
8328
8085
|
});
|
|
8329
8086
|
continue;
|
|
8330
8087
|
}
|
|
8331
|
-
|
|
8088
|
+
levels[id] = level;
|
|
8332
8089
|
}
|
|
8333
8090
|
const customs = sorted.map(
|
|
8334
8091
|
(def) => levels[def.id] === def.level ? def : { ...def, level: levels[def.id] }
|
|
8335
8092
|
);
|
|
8336
8093
|
return { levels, customs, mergeGate, review, testProof, criteriaMissing, criteriaJudge, criteriaJudgeBrief: policy.criteriaJudgeBrief, problems };
|
|
8337
8094
|
}
|
|
8338
|
-
function extractCommandText(raw) {
|
|
8339
|
-
const text = raw.trim();
|
|
8340
|
-
if (!text) return null;
|
|
8341
|
-
if (text.startsWith("{") || text.startsWith("[")) {
|
|
8342
|
-
try {
|
|
8343
|
-
const parsed = JSON.parse(text);
|
|
8344
|
-
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
|
|
8345
|
-
const command = parsed["command"];
|
|
8346
|
-
return typeof command === "string" && command.trim() ? command.trim() : null;
|
|
8347
|
-
}
|
|
8348
|
-
return null;
|
|
8349
|
-
} catch {
|
|
8350
|
-
return null;
|
|
8351
|
-
}
|
|
8352
|
-
}
|
|
8353
|
-
return text;
|
|
8354
|
-
}
|
|
8355
|
-
function normalizeCommand(command) {
|
|
8356
|
-
let out = command.trim().replace(/\s+/g, " ");
|
|
8357
|
-
for (; ; ) {
|
|
8358
|
-
const next = out.replace(/^cd\s+[^&;|]+(?:&&|;)\s*/, "");
|
|
8359
|
-
if (next === out) break;
|
|
8360
|
-
out = next.trim();
|
|
8361
|
-
}
|
|
8362
|
-
out = out.replace(/^(?:[A-Z_][A-Z0-9_]*=\S+\s+)+/, "");
|
|
8363
|
-
out = out.replace(/^(?:npx|bunx)\s+(?:--yes\s+|-y\s+)?/, "");
|
|
8364
|
-
out = out.replace(/^(?:yarn|pnpm)\s+(?:run\s+)?/, "");
|
|
8365
|
-
return out.trim();
|
|
8366
|
-
}
|
|
8367
|
-
var KIND_RULES = [
|
|
8368
|
-
{ kind: "migration", pattern: /\bsupabase\s+(?:migration|db)\b/ },
|
|
8369
|
-
{ kind: "vcs", pattern: /^git\s|\bgh\s+(?:pr|api|issue)\b/ },
|
|
8370
|
-
{ kind: "test", pattern: /^(?:vitest|jest|playwright)\b/ },
|
|
8371
|
-
{ kind: "test", pattern: /^(?:ci:unit|test(?::\w+)?)\b/ },
|
|
8372
|
-
{ kind: "test", pattern: /^turbo\s+run\s+test\b/ },
|
|
8373
|
-
{ kind: "lint", pattern: /^(?:eslint|ci:lint|lint(?::\w+)?|knip|prettier)\b/ },
|
|
8374
|
-
{ kind: "build", pattern: /^(?:tsc|turbo\s+run\s+build|build(?::\w+)?|next\s+build)\b/ }
|
|
8375
|
-
];
|
|
8376
|
-
function classifyCommand(rawCommand) {
|
|
8377
|
-
const normalized = normalizeCommand(rawCommand);
|
|
8378
|
-
let kind = "other";
|
|
8379
|
-
for (const rule of KIND_RULES) {
|
|
8380
|
-
if (rule.pattern.test(normalized)) {
|
|
8381
|
-
kind = rule.kind;
|
|
8382
|
-
break;
|
|
8383
|
-
}
|
|
8384
|
-
}
|
|
8385
|
-
return { normalized, kind };
|
|
8386
|
-
}
|
|
8387
|
-
function splitCommandSegments(rawCommand) {
|
|
8388
|
-
const noHeredocs = rawCommand.replace(/<<-?\s*'?([A-Za-z_][A-Za-z0-9_]*)'?[\s\S]*?\n\1\b/g, "");
|
|
8389
|
-
return noHeredocs.split(/&&|;|\n/).map((segment) => segment.trim()).filter((segment) => segment.length > 0);
|
|
8390
|
-
}
|
|
8391
|
-
function extractFacts(spans) {
|
|
8392
|
-
const runs = [];
|
|
8393
|
-
const edits = [];
|
|
8394
|
-
const coverage = /* @__PURE__ */ new Set();
|
|
8395
|
-
if (spans.length > 0) coverage.add("edits");
|
|
8396
|
-
spans.forEach((span, seq) => {
|
|
8397
|
-
if (span.isEdit && span.file) {
|
|
8398
|
-
edits.push({
|
|
8399
|
-
seq,
|
|
8400
|
-
sessionIndex: span.sessionIndex,
|
|
8401
|
-
turnIndex: span.turnIndex,
|
|
8402
|
-
status: span.status,
|
|
8403
|
-
file: span.file
|
|
8404
|
-
});
|
|
8405
|
-
return;
|
|
8406
|
-
}
|
|
8407
|
-
const commandText = span.command === void 0 ? null : extractCommandText(span.command);
|
|
8408
|
-
if (commandText === null) return;
|
|
8409
|
-
coverage.add("commands");
|
|
8410
|
-
const segments2 = splitCommandSegments(commandText);
|
|
8411
|
-
const classifiedSegments = segments2.map((segment) => classifyCommand(segment)).filter((c) => c.kind !== "other");
|
|
8412
|
-
const strippedText = segments2.join(" && ");
|
|
8413
|
-
const toEmit = classifiedSegments.length > 0 ? classifiedSegments : strippedText ? [classifyCommand(strippedText)] : [];
|
|
8414
|
-
for (const classified of toEmit) {
|
|
8415
|
-
runs.push({
|
|
8416
|
-
seq,
|
|
8417
|
-
sessionIndex: span.sessionIndex,
|
|
8418
|
-
turnIndex: span.turnIndex,
|
|
8419
|
-
status: span.status,
|
|
8420
|
-
kind: classified.kind,
|
|
8421
|
-
normalized: classified.normalized
|
|
8422
|
-
});
|
|
8423
|
-
}
|
|
8424
|
-
});
|
|
8425
|
-
return { runs, edits, coverage };
|
|
8426
|
-
}
|
|
8427
|
-
var INPUT_CAP = 4096;
|
|
8428
|
-
function asText(value) {
|
|
8429
|
-
return typeof value === "string" ? value : JSON.stringify(value);
|
|
8430
|
-
}
|
|
8431
|
-
function cutCodePoints(text, max) {
|
|
8432
|
-
if (text.length <= max) return text;
|
|
8433
|
-
let end = 0;
|
|
8434
|
-
let count = 0;
|
|
8435
|
-
while (end < text.length && count < max) {
|
|
8436
|
-
const code = text.charCodeAt(end);
|
|
8437
|
-
end += code >= 55296 && code <= 56319 && end + 1 < text.length ? 2 : 1;
|
|
8438
|
-
count += 1;
|
|
8439
|
-
}
|
|
8440
|
-
return text.slice(0, end);
|
|
8441
|
-
}
|
|
8442
|
-
function storedCommand(call) {
|
|
8443
|
-
var _a;
|
|
8444
|
-
if (!call.input) return void 0;
|
|
8445
|
-
const input = cutCodePoints(JSON.stringify([{ role: "user", content: asText(call.input) }]), INPUT_CAP);
|
|
8446
|
-
try {
|
|
8447
|
-
const parsed = JSON.parse(input);
|
|
8448
|
-
if (Array.isArray(parsed) && typeof ((_a = parsed[0]) == null ? void 0 : _a.content) === "string") return parsed[0].content;
|
|
8449
|
-
return void 0;
|
|
8450
|
-
} catch {
|
|
8451
|
-
return input;
|
|
8452
|
-
}
|
|
8453
|
-
}
|
|
8454
|
-
var millis = (iso) => {
|
|
8455
|
-
if (!iso) return 0;
|
|
8456
|
-
const time = Date.parse(iso);
|
|
8457
|
-
return Number.isFinite(time) ? time : 0;
|
|
8458
|
-
};
|
|
8459
|
-
function spansOfSession(session, sessionIndex) {
|
|
8460
|
-
const timed = [];
|
|
8461
|
-
let cursor = millis(session.startedAt);
|
|
8462
|
-
for (const turn of session.turns) {
|
|
8463
|
-
const turnStart = millis(turn.ts) || cursor + 1;
|
|
8464
|
-
cursor = Math.max(cursor + 1, turnStart);
|
|
8465
|
-
turn.toolCalls.forEach((call, seq) => {
|
|
8466
|
-
const command = storedCommand(call);
|
|
8467
|
-
timed.push({
|
|
8468
|
-
time: cursor + seq + 1,
|
|
8469
|
-
name: `agent.tool.${call.name}`,
|
|
8470
|
-
span: {
|
|
8471
|
-
sessionIndex,
|
|
8472
|
-
turnIndex: turn.index,
|
|
8473
|
-
toolName: call.name,
|
|
8474
|
-
status: call.status,
|
|
8475
|
-
isEdit: call.isEdit === true,
|
|
8476
|
-
...call.file ? { file: call.file } : {},
|
|
8477
|
-
...command !== void 0 ? { command } : {}
|
|
8478
|
-
}
|
|
8479
|
-
});
|
|
8480
|
-
});
|
|
8481
|
-
}
|
|
8482
|
-
return timed;
|
|
8483
|
-
}
|
|
8484
|
-
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;
|
|
8485
|
-
function orderSessions(sessions) {
|
|
8486
|
-
const tops = sessions.filter((session) => session.subagent === void 0).sort(byStart);
|
|
8487
|
-
const topIds = new Set(tops.map((session) => session.id));
|
|
8488
|
-
const orphans = sessions.filter((session) => {
|
|
8489
|
-
var _a;
|
|
8490
|
-
return session.subagent !== void 0 && !topIds.has((_a = session.subagent.parentSessionId) != null ? _a : "");
|
|
8491
|
-
}).sort(byStart);
|
|
8492
|
-
return [...tops, ...orphans];
|
|
8493
|
-
}
|
|
8494
|
-
function sessionsToTimeline(sessions) {
|
|
8495
|
-
const out = [];
|
|
8496
|
-
orderSessions(sessions).forEach((session, sessionIndex) => {
|
|
8497
|
-
const children = sessions.filter((child) => child.subagent !== void 0 && child.subagent.parentSessionId === session.id).sort(byStart);
|
|
8498
|
-
const timed = [session, ...children].flatMap((member) => spansOfSession(member, sessionIndex));
|
|
8499
|
-
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);
|
|
8500
|
-
for (const { entry } of ordered) out.push(entry.span);
|
|
8501
|
-
});
|
|
8502
|
-
return out;
|
|
8503
|
-
}
|
|
8504
8095
|
var FILES_PLACEHOLDER = "{files}";
|
|
8505
8096
|
function isRecord2(value) {
|
|
8506
8097
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -13088,4 +12679,4 @@ function knownTargetsLine(agents = defaultAgents()) {
|
|
|
13088
12679
|
return `Known targets: ${targetIds(agents).join(", ")}.`;
|
|
13089
12680
|
}
|
|
13090
12681
|
|
|
13091
|
-
export { ADAPTER_FACTORIES, AGENTS_SKILLS_BASE, CONTEXT_PIN_FILENAME, FORMER_MAINTAINED_NAMES, HookTextError, MACHINE_SKILL_PATH, McpFileError, OUTERLAYER_SKILLS_BASE, TEMPLATE_SKILLS, agentById, agentRootFolders, captureAdapters, captureAgents, classifyTree, contextAgents, createNodeAgentIO, defaultAgents, emitBuilders, emitTree,
|
|
12682
|
+
export { ADAPTER_FACTORIES, AGENTS_SKILLS_BASE, CONTEXT_PIN_FILENAME, FORMER_MAINTAINED_NAMES, HookTextError, MACHINE_SKILL_PATH, McpFileError, OUTERLAYER_SKILLS_BASE, TEMPLATE_SKILLS, agentById, agentRootFolders, captureAdapters, captureAgents, classifyTree, contextAgents, createNodeAgentIO, defaultAgents, emitBuilders, emitTree, generatedHeaderSource, isMaintainedCopy, knownTargetsLine, laptopAgents, legacyAgent, legacySubcommand, loadMachineSkillFiles, loadMaintainedFiles, loadTemplateFiles, maintainedFilesForExistingSkills, namesCore, normalizePath, normalizeRepoName, parseOuterlayerConfig, parsePolicy, parseProofsConfig, resolvePackRoot, restoreSkillPaths, rewriteSkillPaths, sessionFolderIn, skillBases, skillDir, splitRawFile, targetIds, userSkillFolderIn, writeMaintainedFiles };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { RELAY_PORT, BUILD_HOME } from './chunk-
|
|
3
|
+
import { RELAY_PORT, BUILD_HOME } from './chunk-Q2TA7RYQ.js';
|
|
4
4
|
import { createServer, connect } from 'net';
|
|
5
5
|
|
|
6
6
|
createRequire(import.meta.url);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { defaultAgents, laptopAgents, contextAgents, userSkillFolderIn, loadMachineSkillFiles, resolvePackRoot } from './chunk-
|
|
3
|
+
import { defaultAgents, laptopAgents, contextAgents, userSkillFolderIn, loadMachineSkillFiles, resolvePackRoot } from './chunk-HQYVI5T3.js';
|
|
4
4
|
import { MAINTAINED_SKILLS, maintainedLineVersion } from './chunk-VSBG7MMU.js';
|
|
5
5
|
import { resolvePackageVersion } from './chunk-RA3O54FC.js';
|
|
6
6
|
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { cliInvocation } from './chunk-FZKNTIOJ.js';
|
|
4
|
-
import { skillDir, emitTree, targetIds, classifyTree, emitBuilders, defaultAgents, FORMER_MAINTAINED_NAMES, isMaintainedCopy } from './chunk-
|
|
4
|
+
import { skillDir, emitTree, targetIds, classifyTree, emitBuilders, defaultAgents, FORMER_MAINTAINED_NAMES, isMaintainedCopy } from './chunk-HQYVI5T3.js';
|
|
5
5
|
import { readFileSync, existsSync, unlinkSync, rmdirSync, readdirSync } from 'fs';
|
|
6
6
|
import { join, dirname, relative, sep } from 'path';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { readSettingsText, SettingsParseError, cliForInstall } from './chunk-ZHQC43NH.js';
|
|
4
|
-
import { legacyAgent, defaultAgents, HookTextError } from './chunk-
|
|
4
|
+
import { legacyAgent, defaultAgents, HookTextError } from './chunk-HQYVI5T3.js';
|
|
5
5
|
|
|
6
6
|
createRequire(import.meta.url);
|
|
7
7
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { detectActiveSession } from './chunk-
|
|
4
|
-
import { autoConnect } from './chunk-
|
|
3
|
+
import { detectActiveSession } from './chunk-Y2HG7SGT.js';
|
|
4
|
+
import { autoConnect } from './chunk-RJPLN6SO.js';
|
|
5
5
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
6
|
-
import { defaultFetch, unauthorizedMessage, resolveGatewayCredentials } from './chunk-
|
|
6
|
+
import { defaultFetch, unauthorizedMessage, resolveGatewayCredentials } from './chunk-DN2EA4XS.js';
|
|
7
7
|
import { parseWorkItemEnv } from './chunk-LGJ56FCM.js';
|
|
8
8
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
9
9
|
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
10
|
-
import { resolveRepoIdentity } from './chunk-
|
|
10
|
+
import { resolveRepoIdentity } from './chunk-UG4AUZCR.js';
|
|
11
11
|
|
|
12
12
|
createRequire(import.meta.url);
|
|
13
13
|
|