@outerlayer/cli 0.18.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/README.md +21 -2
- package/dist/{agent-setup-RBTEACYU.js → agent-setup-TPR4BBFV.js} +15 -16
- package/dist/{artifact-link-cmd-AVM2EKTV.js → artifact-link-cmd-W7XF5BFB.js} +2 -2
- package/dist/build-info.json +1 -1
- package/dist/{builder-DUI2ZH2H.js → builder-C4QNTYMS.js} +3 -3
- package/dist/{check-5C4YDZYV.js → check-UWQAL2MN.js} +44 -43
- package/dist/{chunk-S26M3YBJ.js → chunk-3UZTIRLF.js} +1 -1
- package/dist/{chunk-W5VPCONO.js → chunk-452TM7J4.js} +33 -227
- package/dist/{chunk-UYOYTKE2.js → chunk-5GHGAF6P.js} +3 -3
- package/dist/{chunk-QQM2UJ6T.js → chunk-5MYFOW5V.js} +182 -28
- package/dist/{chunk-Y5GE76XC.js → chunk-5TN7GLYX.js} +33 -81
- package/dist/{chunk-GOBOJMOJ.js → chunk-6D7GT22T.js} +4 -4
- package/dist/{chunk-3OFZM4X6.js → chunk-6U3MV7TZ.js} +151 -20
- package/dist/{chunk-F4XSVQJ4.js → chunk-6X4SQ5MY.js} +2 -2
- package/dist/{chunk-Y5MXET4M.js → chunk-7KSSBQTS.js} +11 -10
- package/dist/{chunk-JF42URPU.js → chunk-7SJPQWBM.js} +33 -9
- package/dist/{chunk-N3CUDFCW.js → chunk-7VUK5RFS.js} +15 -2
- package/dist/{chunk-SWCTGCSC.js → chunk-7YP7T6GV.js} +1 -1
- package/dist/{chunk-KDVIU23F.js → chunk-BWSUPRDK.js} +1 -1
- package/dist/{chunk-S76AYB4M.js → chunk-CG36IONK.js} +5 -5
- package/dist/chunk-CJJDJ7AT.js +56 -0
- package/dist/{chunk-FUB7LRUE.js → chunk-DADWEUH3.js} +5 -5
- package/dist/{chunk-RAZTWYZN.js → chunk-DJ3ZUSC3.js} +7 -8
- package/dist/{chunk-MQJSXHV7.js → chunk-G3IJ3N6F.js} +5 -3
- package/dist/{chunk-KK4VBOH6.js → chunk-HPJNLETG.js} +10 -11
- package/dist/{chunk-IP7BIBXJ.js → chunk-IF2OSI5T.js} +35 -1
- package/dist/{chunk-T4Y6SCG3.js → chunk-IXYZUUYQ.js} +2 -2
- package/dist/chunk-KYS3TQAG.js +296 -0
- package/dist/chunk-LLM3I5YU.js +89 -0
- package/dist/{chunk-B3UKB46N.js → chunk-LRG3ZMZD.js} +4 -5
- package/dist/{chunk-ULSIJGLS.js → chunk-NFIR3GEE.js} +56 -14
- package/dist/{chunk-MNTSH4CL.js → chunk-NNLA7LLQ.js} +1 -1
- package/dist/{chunk-WGAUY5LE.js → chunk-QEFKA2QD.js} +1 -1
- package/dist/{chunk-BMYGAGBJ.js → chunk-QNLX477Q.js} +155 -23
- package/dist/chunk-TUSYOL2O.js +113 -0
- package/dist/{chunk-ESC6UR76.js → chunk-TWF3RICI.js} +6 -6
- package/dist/{chunk-NL4XPC7W.js → chunk-UVG35MWF.js} +1 -1
- package/dist/{chunk-L2USZT6T.js → chunk-VMJPFQNE.js} +1 -1
- package/dist/chunk-VRRGENS4.js +144 -0
- package/dist/{chunk-X5N6KC6V.js → chunk-WFSUUUAN.js} +2 -3
- package/dist/{chunk-6CHIYEZZ.js → chunk-XSZD4AZ6.js} +9 -83
- package/dist/{chunk-LXAY4A2G.js → chunk-YQR6E6OV.js} +34 -49
- package/dist/{chunk-47TTLEDX.js → chunk-ZHAUSEEN.js} +35 -13
- package/dist/{claude-launcher-YVXI76NX.js → claude-launcher-FPPHZPMR.js} +20 -7
- package/dist/{cli-C77H54BV.js → cli-HROW5T7X.js} +203 -228
- package/dist/{command-H5CILO4S.js → command-OEAV7BVX.js} +29 -30
- package/dist/{config-FXDG4NPJ.js → config-CLSGABD5.js} +2 -2
- package/dist/{connect-cmd-ZW5FV3ZW.js → connect-cmd-UNYKGDAL.js} +7 -7
- package/dist/context-cleanup-HSVYDGMI.js +9 -0
- package/dist/control-plane-launch-NYVDJESK.js +216 -0
- package/dist/{dist-QTX4RSCL.js → dist-WO7NOJNG.js} +2 -2
- package/dist/{docker-RC3PRX3Q.js → docker-BFU3AQGY.js} +4 -4
- package/dist/{doctor-2NQQML6P.js → doctor-23BBJWBX.js} +32 -33
- package/dist/{emit-artifact-cmd-7MP63KXU.js → emit-artifact-cmd-O6SCM7TV.js} +17 -17
- package/dist/{emit-cmd-PPN4QQF2.js → emit-cmd-7SP3I6UZ.js} +6 -6
- package/dist/{emit-criteria-cmd-3RXPDLNK.js → emit-criteria-cmd-LQNERZRV.js} +11 -12
- package/dist/{emit-finding-cmd-OL7JB6H3.js → emit-finding-cmd-AJPKHIOV.js} +12 -13
- package/dist/{emit-result-cmd-UZVMOCF4.js → emit-result-cmd-RUICOKWQ.js} +17 -17
- package/dist/emit-step-cmd-347XNGPQ.js +26 -0
- package/dist/{governing-source-BUU4IABS.js → governing-source-V5EEGPTA.js} +21 -22
- package/dist/{hook-fast-W5MKHMJT.js → hook-fast-YAZG5MDX.js} +3 -3
- package/dist/{import-capture-cmd-ZO6KGHI2.js → import-capture-cmd-KKFFOGWP.js} +4 -4
- package/dist/{import-ruler-cmd-KJMWL5V6.js → import-ruler-cmd-5P6JOXQN.js} +2 -2
- package/dist/index.js +4 -4
- package/dist/{init-WNXXYMO7.js → init-LWHDMZQG.js} +30 -31
- package/dist/{init-VWXIZEAN.js → init-MOINY2DD.js} +30 -31
- package/dist/{init-cmd-WS6TIRYT.js → init-cmd-HSMRID6A.js} +67 -26
- package/dist/{init-update-E3J6TVIN.js → init-update-LWX5MPPR.js} +21 -22
- package/dist/{install-CBWIEF3R.js → install-4SEFIIW2.js} +3 -3
- package/dist/{login-browser-O63QZN7D.js → login-browser-DX35MARZ.js} +2 -2
- package/dist/{loop-UGI2BJOT.js → loop-SYYPVFYW.js} +44 -43
- package/dist/{machine-JOW4RNZ7.js → machine-6X63G2KH.js} +26 -27
- package/dist/{mcp-serve-cmd-DOTY5FKY.js → mcp-serve-cmd-N3UTY6EE.js} +5 -5
- package/dist/{runner-env-4NB2GA7O.js → runner-env-FRZFFHDF.js} +4 -4
- package/dist/{runner-key-TC3NFWFV.js → runner-key-276SJU5R.js} +30 -31
- package/dist/{session-sender-NNVPSPY7.js → session-sender-GGIY5OAX.js} +19 -15
- package/dist/shell-function-NRD4KVUK.js +6 -0
- package/dist/{spec-cmd-OWVTBB4J.js → spec-cmd-SIZBRN7D.js} +12 -13
- package/dist/{starter-pack-OPWUDOWX.js → starter-pack-6LQVLBIA.js} +5 -5
- package/dist/{status-TKCLLKFG.js → status-NAK6DYSF.js} +33 -32
- package/dist/{sync-cmd-Q6VYNPWG.js → sync-cmd-G7GF4UTW.js} +18 -14
- package/dist/{watch-ARAGADTF.js → watch-EVM5GSMP.js} +18 -14
- package/dist/{work-claim-cmd-34FERLYX.js → work-claim-cmd-3J3QW56U.js} +16 -17
- package/dist/{work-cmd-7S5B2H2P.js → work-cmd-5EPPD33Y.js} +12 -13
- package/dist/{work-comment-cmd-SZJSPM5S.js → work-comment-cmd-2ACOZQAE.js} +12 -13
- package/dist/work-logs-cmd-QDD2NMJL.js +60 -0
- package/dist/{work-open-pr-cmd-RPXKCBWS.js → work-open-pr-cmd-XNCEI4ZM.js} +13 -14
- package/dist/{work-pr-cmd-5LGANL32.js → work-pr-cmd-H4OQR26N.js} +12 -13
- package/package.json +2 -2
- package/skill-pack/maintained/outerlayer-cli/SKILL.md +9 -2
- package/skill-pack/maintained/outerlayer-cli/references/find-out-why-a-build-ended.md +76 -0
- package/skill-pack/shipped.json +1 -0
- package/skill-pack/template/build/references/release.md +3 -1
- package/dist/chunk-WBT5X3NH.js +0 -40
- package/dist/chunk-XCCLFVXM.js +0 -401
- package/dist/context-adopt-O5OFXMKI.js +0 -109
- package/dist/context-materialize-Y5IJ4MQT.js +0 -23
- package/dist/{chunk-NACDBXUG.js → chunk-BM63HB2M.js} +1 -1
- package/dist/{chunk-ZRL6HKBY.js → chunk-FVMYKL6L.js} +1 -1
- package/dist/{chunk-52NC2FIU.js → chunk-NTRCK4NH.js} +1 -1
- package/dist/{chunk-XGP3VYOG.js → chunk-P53VEAOF.js} +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { EVENT_TYPES, isHumanUserTurn, INPUT_BAND_BOUNDARIES, parseAgentSession, SCHEMA_VERSION, SPEED_MAX_LENGTH, inputBandOf, BUCKET_MODEL_MAX_LENGTH } from './chunk-
|
|
3
|
+
import { EVENT_TYPES, isHumanUserTurn, INPUT_BAND_BOUNDARIES, parseAgentSession, SCHEMA_VERSION, SPEED_MAX_LENGTH, inputBandOf, BUCKET_MODEL_MAX_LENGTH } from './chunk-7VUK5RFS.js';
|
|
4
4
|
import { createHash } from 'crypto';
|
|
5
5
|
import { readFileSync, readdirSync, statSync, mkdirSync, copyFileSync, renameSync, unlinkSync, writeFileSync, stat as stat$1, unwatchFile, watchFile, watch as watch$1 } from 'fs';
|
|
6
6
|
import { type, homedir } from 'os';
|
|
@@ -21971,14 +21971,14 @@ var ModelRegistryImpl = class {
|
|
|
21971
21971
|
};
|
|
21972
21972
|
var models_default = {
|
|
21973
21973
|
version: "1.0.0",
|
|
21974
|
-
generatedAt: "2026-10-
|
|
21974
|
+
generatedAt: "2026-10-13T06:08:25.173Z",
|
|
21975
21975
|
sources: {
|
|
21976
21976
|
litellm: {
|
|
21977
|
-
fetchedAt: "2026-10-
|
|
21978
|
-
modelCount:
|
|
21977
|
+
fetchedAt: "2026-10-13T06:08:25.173Z",
|
|
21978
|
+
modelCount: 1935
|
|
21979
21979
|
},
|
|
21980
21980
|
openrouter: {
|
|
21981
|
-
fetchedAt: "2026-10-
|
|
21981
|
+
fetchedAt: "2026-10-13T06:08:25.173Z",
|
|
21982
21982
|
modelCount: 203
|
|
21983
21983
|
}
|
|
21984
21984
|
},
|
|
@@ -24015,7 +24015,7 @@ var models_default = {
|
|
|
24015
24015
|
deprecationDate: "2027-08-24"
|
|
24016
24016
|
},
|
|
24017
24017
|
"gpt-audio-mini-2025-10-06": {
|
|
24018
|
-
provider: "
|
|
24018
|
+
provider: "openai",
|
|
24019
24019
|
displayName: "Gpt Audio Mini",
|
|
24020
24020
|
mode: "chat",
|
|
24021
24021
|
source: "litellm",
|
|
@@ -24033,9 +24033,11 @@ var models_default = {
|
|
|
24033
24033
|
parallelFunctionCalling: true,
|
|
24034
24034
|
structuredOutput: false,
|
|
24035
24035
|
promptCaching: false,
|
|
24036
|
-
reasoning: false
|
|
24036
|
+
reasoning: false,
|
|
24037
|
+
audioInput: true,
|
|
24038
|
+
audioOutput: true
|
|
24037
24039
|
},
|
|
24038
|
-
deprecationDate: "
|
|
24040
|
+
deprecationDate: "2026-07-23"
|
|
24039
24041
|
},
|
|
24040
24042
|
"gpt-4o-audio-preview-2024-12-17": {
|
|
24041
24043
|
provider: "openai",
|
|
@@ -32347,7 +32349,8 @@ var models_default = {
|
|
|
32347
32349
|
parallelFunctionCalling: true,
|
|
32348
32350
|
structuredOutput: true,
|
|
32349
32351
|
promptCaching: true,
|
|
32350
|
-
pdfInput: true
|
|
32352
|
+
pdfInput: true,
|
|
32353
|
+
webSearch: true
|
|
32351
32354
|
},
|
|
32352
32355
|
deprecationDate: "2026-07-23"
|
|
32353
32356
|
},
|
|
@@ -32439,7 +32442,8 @@ var models_default = {
|
|
|
32439
32442
|
parallelFunctionCalling: true,
|
|
32440
32443
|
structuredOutput: true,
|
|
32441
32444
|
promptCaching: true,
|
|
32442
|
-
pdfInput: true
|
|
32445
|
+
pdfInput: true,
|
|
32446
|
+
webSearch: true
|
|
32443
32447
|
},
|
|
32444
32448
|
deprecationDate: "2026-07-23"
|
|
32445
32449
|
},
|
|
@@ -34453,13 +34457,12 @@ var models_default = {
|
|
|
34453
34457
|
},
|
|
34454
34458
|
capabilities: {
|
|
34455
34459
|
vision: true,
|
|
34456
|
-
functionCalling:
|
|
34457
|
-
parallelFunctionCalling:
|
|
34458
|
-
structuredOutput:
|
|
34460
|
+
functionCalling: false,
|
|
34461
|
+
parallelFunctionCalling: false,
|
|
34462
|
+
structuredOutput: false,
|
|
34459
34463
|
promptCaching: true,
|
|
34460
34464
|
reasoning: true,
|
|
34461
|
-
pdfInput: true
|
|
34462
|
-
webSearch: true
|
|
34465
|
+
pdfInput: true
|
|
34463
34466
|
},
|
|
34464
34467
|
deprecationDate: "2026-07-23"
|
|
34465
34468
|
},
|
|
@@ -34504,13 +34507,12 @@ var models_default = {
|
|
|
34504
34507
|
},
|
|
34505
34508
|
capabilities: {
|
|
34506
34509
|
vision: true,
|
|
34507
|
-
functionCalling:
|
|
34508
|
-
parallelFunctionCalling:
|
|
34509
|
-
structuredOutput:
|
|
34510
|
+
functionCalling: false,
|
|
34511
|
+
parallelFunctionCalling: false,
|
|
34512
|
+
structuredOutput: false,
|
|
34510
34513
|
promptCaching: true,
|
|
34511
34514
|
reasoning: true,
|
|
34512
|
-
pdfInput: true
|
|
34513
|
-
webSearch: true
|
|
34515
|
+
pdfInput: true
|
|
34514
34516
|
},
|
|
34515
34517
|
deprecationDate: "2026-07-23"
|
|
34516
34518
|
},
|
|
@@ -64049,8 +64051,7 @@ var models_default = {
|
|
|
64049
64051
|
source: "litellm",
|
|
64050
64052
|
pricing: {
|
|
64051
64053
|
inputCostPerToken: 42e-9,
|
|
64052
|
-
outputCostPerToken: 0
|
|
64053
|
-
cacheReadCostPerToken: 42e-9
|
|
64054
|
+
outputCostPerToken: 0
|
|
64054
64055
|
},
|
|
64055
64056
|
context: {
|
|
64056
64057
|
maxInputTokens: 32768
|
|
@@ -65954,7 +65955,7 @@ var models_default = {
|
|
|
65954
65955
|
mode: "chat",
|
|
65955
65956
|
source: "litellm",
|
|
65956
65957
|
pricing: {
|
|
65957
|
-
inputCostPerToken:
|
|
65958
|
+
inputCostPerToken: 2e-8,
|
|
65958
65959
|
outputCostPerToken: 0
|
|
65959
65960
|
},
|
|
65960
65961
|
context: {
|
|
@@ -66937,6 +66938,137 @@ var models_default = {
|
|
|
66937
66938
|
functionCalling: true,
|
|
66938
66939
|
structuredOutput: true
|
|
66939
66940
|
}
|
|
66941
|
+
},
|
|
66942
|
+
"computer-use-preview-2025-03-11": {
|
|
66943
|
+
provider: "openai",
|
|
66944
|
+
displayName: "Computer Use Preview",
|
|
66945
|
+
mode: "chat",
|
|
66946
|
+
source: "litellm",
|
|
66947
|
+
pricing: {
|
|
66948
|
+
inputCostPerToken: 3e-6,
|
|
66949
|
+
outputCostPerToken: 12e-6
|
|
66950
|
+
},
|
|
66951
|
+
context: {
|
|
66952
|
+
maxInputTokens: 8192,
|
|
66953
|
+
maxOutputTokens: 1024
|
|
66954
|
+
},
|
|
66955
|
+
capabilities: {
|
|
66956
|
+
vision: true,
|
|
66957
|
+
functionCalling: true,
|
|
66958
|
+
parallelFunctionCalling: true,
|
|
66959
|
+
structuredOutput: false,
|
|
66960
|
+
promptCaching: false,
|
|
66961
|
+
reasoning: true,
|
|
66962
|
+
pdfInput: true
|
|
66963
|
+
},
|
|
66964
|
+
deprecationDate: "2026-07-23"
|
|
66965
|
+
},
|
|
66966
|
+
"pplx-decider-v1.1-27b": {
|
|
66967
|
+
provider: "perplexity",
|
|
66968
|
+
displayName: "Pplx Decider V1.1 27b",
|
|
66969
|
+
mode: "chat",
|
|
66970
|
+
source: "litellm",
|
|
66971
|
+
pricing: {
|
|
66972
|
+
inputCostPerToken: 2e-8,
|
|
66973
|
+
outputCostPerToken: 0
|
|
66974
|
+
},
|
|
66975
|
+
context: {
|
|
66976
|
+
maxInputTokens: 262144
|
|
66977
|
+
}
|
|
66978
|
+
},
|
|
66979
|
+
"semantic-ranker-default": {
|
|
66980
|
+
provider: "google",
|
|
66981
|
+
displayName: "Semantic Ranker Default",
|
|
66982
|
+
mode: "rerank",
|
|
66983
|
+
source: "litellm",
|
|
66984
|
+
pricing: {
|
|
66985
|
+
inputCostPerToken: 0,
|
|
66986
|
+
outputCostPerToken: 0
|
|
66987
|
+
}
|
|
66988
|
+
},
|
|
66989
|
+
"semantic-ranker-default-002": {
|
|
66990
|
+
provider: "google",
|
|
66991
|
+
displayName: "Semantic Ranker Default 002",
|
|
66992
|
+
mode: "rerank",
|
|
66993
|
+
source: "litellm",
|
|
66994
|
+
pricing: {
|
|
66995
|
+
inputCostPerToken: 0,
|
|
66996
|
+
outputCostPerToken: 0
|
|
66997
|
+
}
|
|
66998
|
+
},
|
|
66999
|
+
"semantic-ranker-default-003": {
|
|
67000
|
+
provider: "google",
|
|
67001
|
+
displayName: "Semantic Ranker Default 003",
|
|
67002
|
+
mode: "rerank",
|
|
67003
|
+
source: "litellm",
|
|
67004
|
+
pricing: {
|
|
67005
|
+
inputCostPerToken: 0,
|
|
67006
|
+
outputCostPerToken: 0
|
|
67007
|
+
}
|
|
67008
|
+
},
|
|
67009
|
+
"semantic-ranker-default-004": {
|
|
67010
|
+
provider: "google",
|
|
67011
|
+
displayName: "Semantic Ranker Default 004",
|
|
67012
|
+
mode: "rerank",
|
|
67013
|
+
source: "litellm",
|
|
67014
|
+
pricing: {
|
|
67015
|
+
inputCostPerToken: 0,
|
|
67016
|
+
outputCostPerToken: 0
|
|
67017
|
+
}
|
|
67018
|
+
},
|
|
67019
|
+
"semantic-ranker-default@latest": {
|
|
67020
|
+
provider: "google",
|
|
67021
|
+
displayName: "Semantic Ranker Default@latest",
|
|
67022
|
+
mode: "rerank",
|
|
67023
|
+
source: "litellm",
|
|
67024
|
+
pricing: {
|
|
67025
|
+
inputCostPerToken: 0,
|
|
67026
|
+
outputCostPerToken: 0
|
|
67027
|
+
}
|
|
67028
|
+
},
|
|
67029
|
+
"semantic-ranker-fast": {
|
|
67030
|
+
provider: "google",
|
|
67031
|
+
displayName: "Semantic Ranker Fast",
|
|
67032
|
+
mode: "rerank",
|
|
67033
|
+
source: "litellm",
|
|
67034
|
+
pricing: {
|
|
67035
|
+
inputCostPerToken: 0,
|
|
67036
|
+
outputCostPerToken: 0
|
|
67037
|
+
}
|
|
67038
|
+
},
|
|
67039
|
+
"semantic-ranker-fast-004": {
|
|
67040
|
+
provider: "google",
|
|
67041
|
+
displayName: "Semantic Ranker Fast 004",
|
|
67042
|
+
mode: "rerank",
|
|
67043
|
+
source: "litellm",
|
|
67044
|
+
pricing: {
|
|
67045
|
+
inputCostPerToken: 0,
|
|
67046
|
+
outputCostPerToken: 0
|
|
67047
|
+
}
|
|
67048
|
+
},
|
|
67049
|
+
"semantic-ranker-fast@latest": {
|
|
67050
|
+
provider: "google",
|
|
67051
|
+
displayName: "Semantic Ranker Fast@latest",
|
|
67052
|
+
mode: "rerank",
|
|
67053
|
+
source: "litellm",
|
|
67054
|
+
pricing: {
|
|
67055
|
+
inputCostPerToken: 0,
|
|
67056
|
+
outputCostPerToken: 0
|
|
67057
|
+
}
|
|
67058
|
+
},
|
|
67059
|
+
"accounts/fireworks/routers/rune": {
|
|
67060
|
+
provider: "fireworks_ai",
|
|
67061
|
+
displayName: "Accounts/fireworks/routers/rune",
|
|
67062
|
+
mode: "chat",
|
|
67063
|
+
source: "litellm",
|
|
67064
|
+
pricing: {
|
|
67065
|
+
inputCostPerToken: 42e-9,
|
|
67066
|
+
outputCostPerToken: 0,
|
|
67067
|
+
cacheReadCostPerToken: 84e-10
|
|
67068
|
+
},
|
|
67069
|
+
context: {
|
|
67070
|
+
maxInputTokens: 262144
|
|
67071
|
+
}
|
|
66940
67072
|
}
|
|
66941
67073
|
}
|
|
66942
67074
|
};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
4
|
+
import { execFileSync } from 'child_process';
|
|
5
|
+
import { readdirSync, readFileSync, existsSync, unlinkSync } from 'fs';
|
|
6
|
+
import { join, isAbsolute, resolve } from 'path';
|
|
7
|
+
|
|
8
|
+
createRequire(import.meta.url);
|
|
9
|
+
var JOURNAL_HOOK_MARKER = "# outerlayer post-rewrite journal";
|
|
10
|
+
var PRE_COMMIT_GUARD_MARKER = "# outerlayer materialized-context commit guard";
|
|
11
|
+
function git(cwd, args) {
|
|
12
|
+
try {
|
|
13
|
+
return execFileSync("git", ["-C", cwd, ...args], {
|
|
14
|
+
encoding: "utf8",
|
|
15
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
16
|
+
timeout: 2e3
|
|
17
|
+
}).trim();
|
|
18
|
+
} catch {
|
|
19
|
+
return void 0;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function hooksDir(cwd) {
|
|
23
|
+
const dir = git(cwd, ["rev-parse", "--git-path", "hooks"]);
|
|
24
|
+
if (dir === void 0) return void 0;
|
|
25
|
+
return isAbsolute(dir) ? dir : resolve(cwd, dir);
|
|
26
|
+
}
|
|
27
|
+
function commonHooksDir(cwd) {
|
|
28
|
+
const abs = git(cwd, ["rev-parse", "--path-format=absolute", "--git-common-dir"]);
|
|
29
|
+
if (abs !== void 0) return join(abs, "hooks");
|
|
30
|
+
const rel = git(cwd, ["rev-parse", "--git-common-dir"]);
|
|
31
|
+
if (rel === void 0) return void 0;
|
|
32
|
+
return join(isAbsolute(rel) ? rel : join(cwd, rel), "hooks");
|
|
33
|
+
}
|
|
34
|
+
function removeOurHookFile(path, marker) {
|
|
35
|
+
if (!existsSync(path)) return false;
|
|
36
|
+
let content;
|
|
37
|
+
try {
|
|
38
|
+
content = readFileSync(path, "utf8");
|
|
39
|
+
} catch {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
if (!isOwnRecognitionLine(content, marker)) return false;
|
|
43
|
+
unlinkSync(path);
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
function isOwnRecognitionLine(content, marker) {
|
|
47
|
+
const secondLine = content.split("\n", 2)[1];
|
|
48
|
+
return secondLine !== void 0 && secondLine.startsWith(marker);
|
|
49
|
+
}
|
|
50
|
+
function removeJournalHooks(cwd) {
|
|
51
|
+
const dir = hooksDir(cwd);
|
|
52
|
+
if (dir === void 0) return { removed: false };
|
|
53
|
+
let removed = false;
|
|
54
|
+
for (const name of ["post-rewrite", "post-commit", "prepare-commit-msg"]) {
|
|
55
|
+
if (removeOurHookFile(join(dir, name), JOURNAL_HOOK_MARKER)) removed = true;
|
|
56
|
+
}
|
|
57
|
+
return { removed, path: dir };
|
|
58
|
+
}
|
|
59
|
+
function removePreCommitGuardHook(cwd) {
|
|
60
|
+
const dir = commonHooksDir(cwd);
|
|
61
|
+
if (dir === void 0) return { removed: false };
|
|
62
|
+
const path = join(dir, "pre-commit");
|
|
63
|
+
return { removed: removeOurHookFile(path, PRE_COMMIT_GUARD_MARKER), path };
|
|
64
|
+
}
|
|
65
|
+
function expandHooksPathTilde(hooksPath) {
|
|
66
|
+
if (hooksPath === "~") return homeFromEnv();
|
|
67
|
+
if (hooksPath.startsWith("~/")) return join(homeFromEnv(), hooksPath.slice(2));
|
|
68
|
+
return hooksPath;
|
|
69
|
+
}
|
|
70
|
+
function deadHooksState(cwd) {
|
|
71
|
+
const inRepo = git(cwd, ["rev-parse", "--is-inside-work-tree"]);
|
|
72
|
+
if (inRepo !== "true") return { dead: false };
|
|
73
|
+
const hooksPath = git(cwd, ["config", "core.hooksPath"]) ?? "";
|
|
74
|
+
if (hooksPath === "") return { dead: false };
|
|
75
|
+
const top = git(cwd, ["rev-parse", "--show-toplevel"]);
|
|
76
|
+
if (top === void 0) return { dead: false };
|
|
77
|
+
const expanded = expandHooksPathTilde(hooksPath);
|
|
78
|
+
const hooksDir2 = isAbsolute(expanded) ? expanded : join(top, expanded);
|
|
79
|
+
let entries;
|
|
80
|
+
try {
|
|
81
|
+
entries = readdirSync(hooksDir2);
|
|
82
|
+
} catch (err) {
|
|
83
|
+
const code = err.code;
|
|
84
|
+
if (code === "ENOENT" || code === "ENOTDIR") return { dead: true, hooksDir: hooksDir2, repoRoot: top };
|
|
85
|
+
return { dead: false, hooksDir: hooksDir2, repoRoot: top, unreadableError: err };
|
|
86
|
+
}
|
|
87
|
+
const dead = entries.filter((e) => e !== ".gitignore").length === 0;
|
|
88
|
+
return { dead, hooksDir: hooksDir2, repoRoot: top };
|
|
89
|
+
}
|
|
90
|
+
var ALLOWED_PACKAGE_MANAGERS = ["yarn", "npm", "pnpm", "bun"];
|
|
91
|
+
function preparePackageManagerCommand(repoRoot) {
|
|
92
|
+
let declared = "";
|
|
93
|
+
try {
|
|
94
|
+
const pkg = JSON.parse(readFileSync(join(repoRoot, "package.json"), "utf8"));
|
|
95
|
+
if (typeof pkg.packageManager === "string") declared = pkg.packageManager.split("@")[0] ?? "";
|
|
96
|
+
} catch {
|
|
97
|
+
declared = "";
|
|
98
|
+
}
|
|
99
|
+
if (!ALLOWED_PACKAGE_MANAGERS.includes(declared)) declared = "";
|
|
100
|
+
if (declared === "yarn") return "yarn prepare";
|
|
101
|
+
return `${declared || "npm"} run prepare`;
|
|
102
|
+
}
|
|
103
|
+
function huskyPrepareScript(repoRoot) {
|
|
104
|
+
try {
|
|
105
|
+
const pkg = JSON.parse(readFileSync(join(repoRoot, "package.json"), "utf8"));
|
|
106
|
+
const script = pkg.scripts?.prepare;
|
|
107
|
+
if (typeof script === "string" && /husky/i.test(script)) return script;
|
|
108
|
+
} catch {
|
|
109
|
+
}
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export { deadHooksState, huskyPrepareScript, preparePackageManagerCommand, removeJournalHooks, removePreCommitGuardHook };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { mcpTargetPath, INIT_STDIO_ENTRY, INIT_DOCS_ENTRY, DOCS_MCP_SERVER_NAME } from './chunk-YVZJ6GKF.js';
|
|
4
|
-
import { POLICY_CONTENT, VALIDATOR_FILES, VALIDATORS_DIR, POLICY_PATH } from './chunk-
|
|
5
|
-
import { pinExists, readContextManifest } from './chunk-LXAY4A2G.js';
|
|
6
|
-
import { resolvePackRoot, loadTemplateFiles, skillDir } from './chunk-MNTSH4CL.js';
|
|
4
|
+
import { POLICY_CONTENT, VALIDATOR_FILES, VALIDATORS_DIR, POLICY_PATH } from './chunk-6X4SQ5MY.js';
|
|
7
5
|
import { findGitDirs } from './chunk-BJ3KTMDH.js';
|
|
6
|
+
import { resolvePackRoot, loadTemplateFiles, skillDir } from './chunk-NNLA7LLQ.js';
|
|
8
7
|
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
8
|
+
import { cloneIsGoverned } from './chunk-YQR6E6OV.js';
|
|
9
9
|
import { createHash } from 'crypto';
|
|
10
10
|
import { existsSync, readFileSync } from 'fs';
|
|
11
11
|
import { join } from 'path';
|
|
@@ -106,8 +106,8 @@ function inspectStarterFiles(root, opts = {}) {
|
|
|
106
106
|
function itemLabel(item) {
|
|
107
107
|
return item.kind === "file" ? item.path : `${item.path} "${item.server}" server`;
|
|
108
108
|
}
|
|
109
|
-
function contextIsGoverned(
|
|
110
|
-
return
|
|
109
|
+
function contextIsGoverned(gitCommonDir) {
|
|
110
|
+
return cloneIsGoverned(gitCommonDir);
|
|
111
111
|
}
|
|
112
112
|
var NAME = "Starter files";
|
|
113
113
|
var UPDATE = `${cliInvocation()} init --update`;
|
|
@@ -131,7 +131,7 @@ function shownPaths(items, all) {
|
|
|
131
131
|
function checkStarterFiles(cwd, opts = {}) {
|
|
132
132
|
const none = { checks: [], mcpOutdated: false };
|
|
133
133
|
const dirs = findGitDirs(cwd ?? process.cwd());
|
|
134
|
-
if (dirs === void 0 || contextIsGoverned(dirs.
|
|
134
|
+
if (dirs === void 0 || contextIsGoverned(dirs.gitCommonDir)) return none;
|
|
135
135
|
const report = inspectStarterFiles(dirs.repoRoot, opts);
|
|
136
136
|
if (report.items.every((i) => i.kind === "mcp" || i.state === "missing")) return none;
|
|
137
137
|
const by = (state) => report.items.filter((i) => i.state === state);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { MIN_ENGINE_MAJOR } from './chunk-
|
|
3
|
+
import { MIN_ENGINE_MAJOR } from './chunk-7KSSBQTS.js';
|
|
4
4
|
import { firecrackerArch, MICROVM_ARCHES, guestAssetsPinned } from './chunk-CX22S5BA.js';
|
|
5
5
|
import { spawnSync } from 'child_process';
|
|
6
6
|
import { existsSync, accessSync, constants, statSync, readFileSync } from 'fs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { trackImageBuild, isOutOfMemory, ensureBuilder } from './chunk-
|
|
3
|
+
import { trackImageBuild, isOutOfMemory, ensureBuilder } from './chunk-3UZTIRLF.js';
|
|
4
4
|
import { RecipeError } from './chunk-QOZKPLVJ.js';
|
|
5
5
|
import { spawn } from 'child_process';
|
|
6
6
|
import { existsSync, mkdirSync, createWriteStream, rmSync, readFileSync } from 'fs';
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
import { readContextManifest, removeContextManifest } from './chunk-YQR6E6OV.js';
|
|
4
|
+
import { removePreCommitGuardHook } from './chunk-TUSYOL2O.js';
|
|
5
|
+
import { execFileSync } from 'child_process';
|
|
6
|
+
import { existsSync, unlinkSync, lstatSync, readdirSync, rmdirSync, readFileSync, mkdirSync, writeFileSync } from 'fs';
|
|
7
|
+
import { join, dirname, isAbsolute } from 'path';
|
|
8
|
+
|
|
9
|
+
createRequire(import.meta.url);
|
|
10
|
+
var CONTEXT_EXCLUDE_MARKER = "outerlayer context materialization";
|
|
11
|
+
var BEGIN_PREFIX = `# BEGIN ${CONTEXT_EXCLUDE_MARKER}`;
|
|
12
|
+
var END = `# END ${CONTEXT_EXCLUDE_MARKER}`;
|
|
13
|
+
function excludeFilePath(gitCommonDir) {
|
|
14
|
+
return join(gitCommonDir, "info", "exclude");
|
|
15
|
+
}
|
|
16
|
+
function readLines(path) {
|
|
17
|
+
if (!existsSync(path)) return [];
|
|
18
|
+
const content = readFileSync(path, "utf8");
|
|
19
|
+
if (content === "") return [];
|
|
20
|
+
const lines = content.split("\n");
|
|
21
|
+
if (lines[lines.length - 1] === "") lines.pop();
|
|
22
|
+
return lines;
|
|
23
|
+
}
|
|
24
|
+
function writeLines(path, lines) {
|
|
25
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
26
|
+
writeFileSync(path, lines.length ? lines.join("\n") + "\n" : "");
|
|
27
|
+
}
|
|
28
|
+
function findWellFormedBlock(lines) {
|
|
29
|
+
let i = 0;
|
|
30
|
+
while (i < lines.length) {
|
|
31
|
+
if (!lines[i].startsWith(BEGIN_PREFIX)) {
|
|
32
|
+
i++;
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
const beginIdx = i;
|
|
36
|
+
let endIdx = -1;
|
|
37
|
+
let j = beginIdx + 1;
|
|
38
|
+
for (; j < lines.length; j++) {
|
|
39
|
+
if (lines[j] === END) {
|
|
40
|
+
endIdx = j;
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
if (lines[j].startsWith(BEGIN_PREFIX)) break;
|
|
44
|
+
}
|
|
45
|
+
if (endIdx !== -1) return { beginIdx, endIdx };
|
|
46
|
+
i = j;
|
|
47
|
+
}
|
|
48
|
+
return void 0;
|
|
49
|
+
}
|
|
50
|
+
function removeContextExcludes(gitCommonDir) {
|
|
51
|
+
const path = excludeFilePath(gitCommonDir);
|
|
52
|
+
const lines = readLines(path);
|
|
53
|
+
const block = findWellFormedBlock(lines);
|
|
54
|
+
if (block === void 0) return { changed: false };
|
|
55
|
+
writeLines(path, [...lines.slice(0, block.beginIdx), ...lines.slice(block.endIdx + 1)]);
|
|
56
|
+
return { changed: true };
|
|
57
|
+
}
|
|
58
|
+
function contextExcludesPresent(gitCommonDir) {
|
|
59
|
+
return findWellFormedBlock(readLines(excludeFilePath(gitCommonDir))) !== void 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// src/context-cleanup.ts
|
|
63
|
+
function hasEarlierCopies(gitCommonDir) {
|
|
64
|
+
return readContextManifest(gitCommonDir) !== void 0 || contextExcludesPresent(gitCommonDir);
|
|
65
|
+
}
|
|
66
|
+
function isCopiedPath(rel) {
|
|
67
|
+
if (isAbsolute(rel) || rel.split("/").includes("..")) return false;
|
|
68
|
+
return rel === "AGENTS.md" || rel.startsWith(".claude/") || rel.startsWith(".outerlayer/");
|
|
69
|
+
}
|
|
70
|
+
function hasSymlinkComponent(root, rel) {
|
|
71
|
+
let current = root;
|
|
72
|
+
for (const segment of rel.split("/")) {
|
|
73
|
+
current = join(current, segment);
|
|
74
|
+
try {
|
|
75
|
+
if (lstatSync(current).isSymbolicLink()) return true;
|
|
76
|
+
} catch {
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
function trackedPaths(repoRoot) {
|
|
83
|
+
try {
|
|
84
|
+
const out = execFileSync("git", ["ls-files", "-z", "--", "AGENTS.md", ".claude", ".outerlayer"], {
|
|
85
|
+
cwd: repoRoot,
|
|
86
|
+
encoding: "utf8",
|
|
87
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
88
|
+
timeout: 5e3
|
|
89
|
+
});
|
|
90
|
+
return new Set(out.split("\0").filter((path) => path !== ""));
|
|
91
|
+
} catch {
|
|
92
|
+
return void 0;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
function pruneEmptyDirs(start, root) {
|
|
96
|
+
let current = start;
|
|
97
|
+
while (current !== root && current.startsWith(root)) {
|
|
98
|
+
try {
|
|
99
|
+
if (readdirSync(current).length > 0) return;
|
|
100
|
+
rmdirSync(current);
|
|
101
|
+
} catch {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
current = dirname(current);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
function cleanupEarlierCopies(input) {
|
|
108
|
+
const { repoRoot, gitCommonDir } = input;
|
|
109
|
+
const result = { removedFiles: [], excludeRemoved: false, guardRemoved: false };
|
|
110
|
+
if (!hasEarlierCopies(gitCommonDir)) return result;
|
|
111
|
+
let complete = true;
|
|
112
|
+
try {
|
|
113
|
+
const manifest = readContextManifest(gitCommonDir);
|
|
114
|
+
if (manifest !== void 0) {
|
|
115
|
+
const tracked = trackedPaths(repoRoot);
|
|
116
|
+
if (tracked === void 0) return result;
|
|
117
|
+
const isTracked = (rel) => [...tracked].some((path) => path === rel || rel.startsWith(`${path}/`));
|
|
118
|
+
for (const rel of manifest.files) {
|
|
119
|
+
if (!isCopiedPath(rel) || isTracked(rel) || hasSymlinkComponent(repoRoot, rel)) continue;
|
|
120
|
+
const abs = join(repoRoot, rel);
|
|
121
|
+
if (!existsSync(abs)) continue;
|
|
122
|
+
try {
|
|
123
|
+
unlinkSync(abs);
|
|
124
|
+
result.removedFiles.push(rel);
|
|
125
|
+
pruneEmptyDirs(dirname(abs), repoRoot);
|
|
126
|
+
} catch {
|
|
127
|
+
complete = false;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
} catch {
|
|
132
|
+
return result;
|
|
133
|
+
}
|
|
134
|
+
if (!complete) return result;
|
|
135
|
+
try {
|
|
136
|
+
result.guardRemoved = removePreCommitGuardHook(repoRoot).removed;
|
|
137
|
+
result.excludeRemoved = removeContextExcludes(gitCommonDir).changed;
|
|
138
|
+
removeContextManifest(gitCommonDir);
|
|
139
|
+
} catch {
|
|
140
|
+
}
|
|
141
|
+
return result;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export { cleanupEarlierCopies };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { RESERVED_EMIT_NAMES, ARTIFACT_KINDS, ArtifactCriterionIdSchema } from './chunk-
|
|
3
|
+
import { RESERVED_EMIT_NAMES, ARTIFACT_KINDS, ArtifactCriterionIdSchema } from './chunk-7VUK5RFS.js';
|
|
4
4
|
import { __commonJS, __require, __toESM } from './chunk-Z5GEFMRW.js';
|
|
5
5
|
|
|
6
6
|
createRequire(import.meta.url);
|
|
@@ -7954,7 +7954,6 @@ function normalizeRepoName(repo) {
|
|
|
7954
7954
|
return repo.trim().toLowerCase();
|
|
7955
7955
|
}
|
|
7956
7956
|
var CONTEXT_PIN_FILENAME = ".outerlayer-pin.json";
|
|
7957
|
-
var CONTEXT_PIN_SCHEMA_VERSION = 1;
|
|
7958
7957
|
var MAX_BRIEF_LENGTH = 300;
|
|
7959
7958
|
var MAX_COMMAND_LENGTH = 2e3;
|
|
7960
7959
|
var EXTENDS_PROBLEM = '"extends" is not a policy key \u2014 every check is a file in .outerlayer/validators/. Run outerlayer init --template default to write .outerlayer/validators/code-review.yaml, then delete the extends line';
|
|
@@ -8703,4 +8702,4 @@ function sessionsToTimeline(sessions) {
|
|
|
8703
8702
|
return out;
|
|
8704
8703
|
}
|
|
8705
8704
|
|
|
8706
|
-
export { ALL_TARGET_IDS, CONTEXT_PIN_FILENAME,
|
|
8705
|
+
export { ALL_TARGET_IDS, CONTEXT_PIN_FILENAME, classifyTree, emitTree, extractFacts, generatedHeaderSource, normalizePath, normalizeRepoName, orderSessions, parseOuterlayerConfig, parsePolicy, sessionsToTimeline, splitRawFile };
|