harnesstap 1.4.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/apply-ZGEAY6YZ.js +50 -0
- package/dist/{approve-FBGYQGWN.js → approve-VPVMU2MM.js} +10 -13
- package/dist/{approve-FBGYQGWN.js.map → approve-VPVMU2MM.js.map} +1 -1
- package/dist/{audit-VI4QZ6X2.js → audit-AO7AGET3.js} +11 -15
- package/dist/{audit-VI4QZ6X2.js.map → audit-AO7AGET3.js.map} +1 -1
- package/dist/{auth-4CQCDS2W.js → auth-7YRIJNXU.js} +10 -12
- package/dist/{auth-4CQCDS2W.js.map → auth-7YRIJNXU.js.map} +1 -1
- package/dist/bin.js +13 -34
- package/dist/bin.js.map +1 -1
- package/dist/{chunk-OML4HXKT.js → chunk-262KZULH.js} +16 -22
- package/dist/chunk-262KZULH.js.map +1 -0
- package/dist/{chunk-ZUASVASP.js → chunk-26QGX47N.js} +26097 -16881
- package/dist/chunk-26QGX47N.js.map +1 -0
- package/dist/{chunk-3P6BWL5F.js → chunk-27IPOVKQ.js} +2 -2
- package/dist/{chunk-M4KLHJ6U.js → chunk-2BESDRYP.js} +8 -10
- package/dist/{chunk-M4KLHJ6U.js.map → chunk-2BESDRYP.js.map} +1 -1
- package/dist/{chunk-PCMON7Y2.js → chunk-2BWIEB2G.js} +8 -10
- package/dist/{chunk-PCMON7Y2.js.map → chunk-2BWIEB2G.js.map} +1 -1
- package/dist/{chunk-XTVGCVU4.js → chunk-2NMLWSUH.js} +41 -42
- package/dist/chunk-2NMLWSUH.js.map +1 -0
- package/dist/{chunk-TQ2NA4Z4.js → chunk-4E3G4H5B.js} +8 -2
- package/dist/chunk-4E3G4H5B.js.map +1 -0
- package/dist/chunk-4QCGTUTM.js +61 -0
- package/dist/chunk-4QCGTUTM.js.map +1 -0
- package/dist/{chunk-TPEJFLV7.js → chunk-6RKJZW2N.js} +4 -6
- package/dist/{chunk-TPEJFLV7.js.map → chunk-6RKJZW2N.js.map} +1 -1
- package/dist/{chunk-JQOKQKQT.js → chunk-7IBFH736.js} +2 -2
- package/dist/{chunk-P2C7JPLD.js → chunk-CKJIS2FM.js} +6 -6
- package/dist/{chunk-R7ZOYVN3.js → chunk-CUOEQQFI.js} +187 -59
- package/dist/chunk-CUOEQQFI.js.map +1 -0
- package/dist/{chunk-REHRUNBB.js → chunk-CWXCZBJR.js} +70 -5
- package/dist/chunk-CWXCZBJR.js.map +1 -0
- package/dist/{chunk-4ZQ2SCGY.js → chunk-FLYQEB6D.js} +509 -207
- package/dist/chunk-FLYQEB6D.js.map +1 -0
- package/dist/{chunk-U6DXASQP.js → chunk-HC7IZY75.js} +2 -2
- package/dist/{chunk-UVVZHWD2.js → chunk-I4DKV63E.js} +2 -2
- package/dist/{chunk-PNGF5EV2.js → chunk-JEC5PWNH.js} +2 -2
- package/dist/{chunk-MR7IOHSX.js → chunk-KFIRABC7.js} +16 -22
- package/dist/{chunk-MR7IOHSX.js.map → chunk-KFIRABC7.js.map} +1 -1
- package/dist/{chunk-6LTLYV5D.js → chunk-LGWFLVZQ.js} +1064 -265
- package/dist/chunk-LGWFLVZQ.js.map +1 -0
- package/dist/{chunk-RDG5DT7S.js → chunk-LX6PMOOC.js} +54 -40
- package/dist/chunk-LX6PMOOC.js.map +1 -0
- package/dist/{chunk-WGP4GUYZ.js → chunk-MILGCNBK.js} +9 -11
- package/dist/{chunk-WGP4GUYZ.js.map → chunk-MILGCNBK.js.map} +1 -1
- package/dist/chunk-MKLJBW5N.js +14 -0
- package/dist/{chunk-N3ZCH64F.js → chunk-MSKTWYHG.js} +86 -32
- package/dist/chunk-MSKTWYHG.js.map +1 -0
- package/dist/{chunk-WG5A6EAU.js → chunk-MTCCUYBZ.js} +821 -28
- package/dist/chunk-MTCCUYBZ.js.map +1 -0
- package/dist/{chunk-BPWFQKI5.js → chunk-NIFKCS7J.js} +2 -2
- package/dist/{chunk-43BDGVN3.js → chunk-NWOYPK2O.js} +56 -9
- package/dist/chunk-NWOYPK2O.js.map +1 -0
- package/dist/{chunk-3FS775NP.js → chunk-NXILQDJG.js} +85 -4
- package/dist/chunk-NXILQDJG.js.map +1 -0
- package/dist/chunk-QF73VLAW.js +31673 -0
- package/dist/chunk-QF73VLAW.js.map +1 -0
- package/dist/{chunk-RFQ3N7FB.js → chunk-QHCGA6LC.js} +11 -19
- package/dist/chunk-QHCGA6LC.js.map +1 -0
- package/dist/{chunk-L6YZE5MY.js → chunk-QPJZKWML.js} +5 -7
- package/dist/{chunk-L6YZE5MY.js.map → chunk-QPJZKWML.js.map} +1 -1
- package/dist/{chunk-ULCD6DJE.js → chunk-RM7VP6ID.js} +24 -61
- package/dist/chunk-RM7VP6ID.js.map +1 -0
- package/dist/{chunk-7HP6AAI3.js → chunk-SMLO5YPI.js} +2 -2
- package/dist/{chunk-73OJQTBW.js → chunk-T2JBSRGG.js} +2 -2
- package/dist/{chunk-IE7B6Q5K.js → chunk-U5Y6WKKT.js} +17 -18
- package/dist/chunk-U5Y6WKKT.js.map +1 -0
- package/dist/chunk-UEA4NCY2.js +106 -0
- package/dist/chunk-UEA4NCY2.js.map +1 -0
- package/dist/chunk-VAPCU2FX.js +70 -0
- package/dist/chunk-VAPCU2FX.js.map +1 -0
- package/dist/{chunk-RVEXPMM3.js → chunk-WEJVFNRO.js} +3 -5
- package/dist/{chunk-RVEXPMM3.js.map → chunk-WEJVFNRO.js.map} +1 -1
- package/dist/{chunk-IMROMZ2K.js → chunk-WWFVMCTR.js} +19 -14
- package/dist/chunk-WWFVMCTR.js.map +1 -0
- package/dist/chunk-XPONNOBR.js +102 -0
- package/dist/chunk-XPONNOBR.js.map +1 -0
- package/dist/{chunk-N3VGY3T3.js → chunk-Y3HJ2F2W.js} +7 -5
- package/dist/{chunk-N3VGY3T3.js.map → chunk-Y3HJ2F2W.js.map} +1 -1
- package/dist/{chunk-2A36HWDE.js → chunk-Y4I7ZCAE.js} +129 -136
- package/dist/chunk-Y4I7ZCAE.js.map +1 -0
- package/dist/{chunk-GRASK6M6.js → chunk-ZREU2UHM.js} +5 -5
- package/dist/{chunk-QA5U36JN.js → chunk-ZT7ANP3H.js} +774 -364
- package/dist/chunk-ZT7ANP3H.js.map +1 -0
- package/dist/{chunk-EOPFER6N.js → chunk-ZUXFPAVX.js} +19 -5
- package/dist/chunk-ZUXFPAVX.js.map +1 -0
- package/dist/{chunk-D432JAXV.js → chunk-ZWB6YXVQ.js} +153 -25
- package/dist/chunk-ZWB6YXVQ.js.map +1 -0
- package/dist/{chunk-23XSG7LI.js → chunk-ZZQDJGWX.js} +4 -4
- package/dist/{compile-GXADKGH5.js → compile-IMJHVXQO.js} +33 -37
- package/dist/{compile-GXADKGH5.js.map → compile-IMJHVXQO.js.map} +1 -1
- package/dist/{config-JMHNA2U5.js → config-FVVN3NWL.js} +16 -21
- package/dist/{config-JMHNA2U5.js.map → config-FVVN3NWL.js.map} +1 -1
- package/dist/cursor-local-install-JS5KSOES.js +94 -0
- package/dist/{cursor-local-install-46RWRBDT.js.map → cursor-local-install-JS5KSOES.js.map} +1 -1
- package/dist/{cursor-local-install-46RWRBDT.js → cursor-local-install-QU5R2FV5.js} +8 -12
- package/dist/cursor-local-install-QU5R2FV5.js.map +1 -0
- package/dist/{doctor-N7ZULPOL.js → doctor-A7VUJSCP.js} +14 -17
- package/dist/doctor-A7VUJSCP.js.map +1 -0
- package/dist/{environment-OBB3WU5B.js → environment-6INIUBNC.js} +42 -50
- package/dist/environment-6INIUBNC.js.map +1 -0
- package/dist/{github-PBYBGOLH.js → github-TFJT3P53.js} +9 -10
- package/dist/{github-PBYBGOLH.js.map → github-TFJT3P53.js.map} +1 -1
- package/dist/{harness-7KYATIV6.js → harness-WQNC5HPZ.js} +46 -84
- package/dist/harness-WQNC5HPZ.js.map +1 -0
- package/dist/{help-EE3AJQD4.js → help-NMS3EXJB.js} +15 -20
- package/dist/{help-EE3AJQD4.js.map → help-NMS3EXJB.js.map} +1 -1
- package/dist/{help-VXWKLQ6A.js → help-VW4RIICD.js} +57 -575
- package/dist/help-VW4RIICD.js.map +1 -0
- package/dist/host-plugin-view-kept-HYCHDB4D.js +139 -0
- package/dist/host-plugin-view-kept-HYCHDB4D.js.map +1 -0
- package/dist/index.js +12 -16
- package/dist/{init-LBTMPDVJ.js → init-RXYL5ZUE.js} +33 -41
- package/dist/{init-LBTMPDVJ.js.map → init-RXYL5ZUE.js.map} +1 -1
- package/dist/live-read-cache-BHU6L7MA.js +13 -0
- package/dist/live-read-cache-NQU7M2C7.js +12 -0
- package/dist/{lock-WLJRXRVK.js → lock-3H3Z65DS.js} +9 -12
- package/dist/{lock-WLJRXRVK.js.map → lock-3H3Z65DS.js.map} +1 -1
- package/dist/{marketplace-GXSV6QIY.js → marketplace-KW35PJCY.js} +26 -79
- package/dist/marketplace-KW35PJCY.js.map +1 -0
- package/dist/{mcp-XPDWWU75.js → mcp-2HUGVDJ5.js} +33 -37
- package/dist/{mcp-XPDWWU75.js.map → mcp-2HUGVDJ5.js.map} +1 -1
- package/dist/{migrate-SBUIWN3U.js → migrate-6VAPYNXI.js} +93 -34
- package/dist/migrate-6VAPYNXI.js.map +1 -0
- package/dist/notifications-Y7KQCN6K.js +154 -0
- package/dist/notifications-Y7KQCN6K.js.map +1 -0
- package/dist/open-FADABB2S.js +20 -0
- package/dist/{pack-A73LDVOX.js → pack-NTECD3BZ.js} +10 -14
- package/dist/{pack-A73LDVOX.js.map → pack-NTECD3BZ.js.map} +1 -1
- package/dist/plugin-T2YFCYIO.js +47 -0
- package/dist/plugin-from-project-FGX5AHW6.js +15 -0
- package/dist/{policy-6VY3CMSU.js → policy-3FOWB4GR.js} +9 -12
- package/dist/{policy-6VY3CMSU.js.map → policy-3FOWB4GR.js.map} +1 -1
- package/dist/{profile-YCKPMRRU.js → profile-HM3ROXXB.js} +108 -78
- package/dist/profile-HM3ROXXB.js.map +1 -0
- package/dist/{project-KHPPBKPN.js → project-3DTXKMI6.js} +512 -119
- package/dist/project-3DTXKMI6.js.map +1 -0
- package/dist/{resource-IJU3FAN5.js → resource-TZDZAVZ6.js} +55 -45
- package/dist/resource-TZDZAVZ6.js.map +1 -0
- package/dist/status-refresh-worker.js +1155 -0
- package/dist/status-refresh-worker.js.map +1 -0
- package/dist/{version-Z66FWWMQ.js → version-AMZJHJIB.js} +3 -3
- package/dist/version-AMZJHJIB.js.map +1 -0
- package/package.json +16 -11
- package/dist/apply-SUNDXRJ3.js +0 -54
- package/dist/chunk-2A36HWDE.js.map +0 -1
- package/dist/chunk-2H7UOFLK.js +0 -11
- package/dist/chunk-3FS775NP.js.map +0 -1
- package/dist/chunk-43BDGVN3.js.map +0 -1
- package/dist/chunk-4ZQ2SCGY.js.map +0 -1
- package/dist/chunk-6LTLYV5D.js.map +0 -1
- package/dist/chunk-D432JAXV.js.map +0 -1
- package/dist/chunk-DF4Z7LAD.js +0 -3463
- package/dist/chunk-DF4Z7LAD.js.map +0 -1
- package/dist/chunk-EOPFER6N.js.map +0 -1
- package/dist/chunk-G6WKY2W4.js +0 -389
- package/dist/chunk-G6WKY2W4.js.map +0 -1
- package/dist/chunk-IE7B6Q5K.js.map +0 -1
- package/dist/chunk-IMROMZ2K.js.map +0 -1
- package/dist/chunk-M2U3J7UX.js +0 -46
- package/dist/chunk-M2U3J7UX.js.map +0 -1
- package/dist/chunk-N3ZCH64F.js.map +0 -1
- package/dist/chunk-NAGAJ5UM.js +0 -145
- package/dist/chunk-NAGAJ5UM.js.map +0 -1
- package/dist/chunk-OML4HXKT.js.map +0 -1
- package/dist/chunk-QA5U36JN.js.map +0 -1
- package/dist/chunk-R7ZOYVN3.js.map +0 -1
- package/dist/chunk-RDG5DT7S.js.map +0 -1
- package/dist/chunk-REHRUNBB.js.map +0 -1
- package/dist/chunk-RFQ3N7FB.js.map +0 -1
- package/dist/chunk-TQ2NA4Z4.js.map +0 -1
- package/dist/chunk-ULCD6DJE.js.map +0 -1
- package/dist/chunk-WG5A6EAU.js.map +0 -1
- package/dist/chunk-XGTTOO4R.js +0 -84
- package/dist/chunk-XGTTOO4R.js.map +0 -1
- package/dist/chunk-XTVGCVU4.js.map +0 -1
- package/dist/chunk-XUJKZQZA.js +0 -235
- package/dist/chunk-XUJKZQZA.js.map +0 -1
- package/dist/chunk-ZUASVASP.js.map +0 -1
- package/dist/doctor-N7ZULPOL.js.map +0 -1
- package/dist/environment-OBB3WU5B.js.map +0 -1
- package/dist/harness-7KYATIV6.js.map +0 -1
- package/dist/help-VXWKLQ6A.js.map +0 -1
- package/dist/live-read-cache-TUSP7U3D.js +0 -10
- package/dist/marketplace-GXSV6QIY.js.map +0 -1
- package/dist/migrate-SBUIWN3U.js.map +0 -1
- package/dist/open-HDGLYYVU.js +0 -24
- package/dist/plugin-CEO6ZJM5.js +0 -51
- package/dist/plugin-from-project-UK7VJVUP.js +0 -18
- package/dist/profile-YCKPMRRU.js.map +0 -1
- package/dist/project-KHPPBKPN.js.map +0 -1
- package/dist/resource-IJU3FAN5.js.map +0 -1
- /package/dist/{apply-SUNDXRJ3.js.map → apply-ZGEAY6YZ.js.map} +0 -0
- /package/dist/{chunk-3P6BWL5F.js.map → chunk-27IPOVKQ.js.map} +0 -0
- /package/dist/{chunk-JQOKQKQT.js.map → chunk-7IBFH736.js.map} +0 -0
- /package/dist/{chunk-P2C7JPLD.js.map → chunk-CKJIS2FM.js.map} +0 -0
- /package/dist/{chunk-U6DXASQP.js.map → chunk-HC7IZY75.js.map} +0 -0
- /package/dist/{chunk-UVVZHWD2.js.map → chunk-I4DKV63E.js.map} +0 -0
- /package/dist/{chunk-PNGF5EV2.js.map → chunk-JEC5PWNH.js.map} +0 -0
- /package/dist/{chunk-2H7UOFLK.js.map → chunk-MKLJBW5N.js.map} +0 -0
- /package/dist/{chunk-BPWFQKI5.js.map → chunk-NIFKCS7J.js.map} +0 -0
- /package/dist/{chunk-7HP6AAI3.js.map → chunk-SMLO5YPI.js.map} +0 -0
- /package/dist/{chunk-73OJQTBW.js.map → chunk-T2JBSRGG.js.map} +0 -0
- /package/dist/{chunk-GRASK6M6.js.map → chunk-ZREU2UHM.js.map} +0 -0
- /package/dist/{chunk-23XSG7LI.js.map → chunk-ZZQDJGWX.js.map} +0 -0
- /package/dist/{live-read-cache-TUSP7U3D.js.map → live-read-cache-BHU6L7MA.js.map} +0 -0
- /package/dist/{open-HDGLYYVU.js.map → live-read-cache-NQU7M2C7.js.map} +0 -0
- /package/dist/{plugin-CEO6ZJM5.js.map → open-FADABB2S.js.map} +0 -0
- /package/dist/{plugin-from-project-UK7VJVUP.js.map → plugin-T2YFCYIO.js.map} +0 -0
- /package/dist/{version-Z66FWWMQ.js.map → plugin-from-project-FGX5AHW6.js.map} +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
getAllPlatforms,
|
|
2
3
|
isClaudeSettingsPath,
|
|
3
4
|
isClaudeUserJsonPath,
|
|
4
5
|
isMcpConfigManagedPath,
|
|
@@ -9,10 +10,7 @@ import {
|
|
|
9
10
|
resourceHarnessScope,
|
|
10
11
|
resourceKeyFromManagedPath,
|
|
11
12
|
skillConsumeDirs
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import {
|
|
14
|
-
getAllPlatforms
|
|
15
|
-
} from "./chunk-DF4Z7LAD.js";
|
|
13
|
+
} from "./chunk-26QGX47N.js";
|
|
16
14
|
|
|
17
15
|
// src/services/cross-harness-gap.ts
|
|
18
16
|
var consumeDirsByPlatform = /* @__PURE__ */ new Map();
|
|
@@ -71,6 +69,21 @@ function isTransparentCrossHarnessGap(input) {
|
|
|
71
69
|
});
|
|
72
70
|
});
|
|
73
71
|
}
|
|
72
|
+
function liveSkillCopiesForMissingPath(path, harnesses, exists) {
|
|
73
|
+
const parsed = parseSkillEmitPath(path);
|
|
74
|
+
if (!parsed) {
|
|
75
|
+
return [];
|
|
76
|
+
}
|
|
77
|
+
const active = new Set(harnesses);
|
|
78
|
+
const dirs = /* @__PURE__ */ new Set();
|
|
79
|
+
for (const id of platformsConsumingSkillDir(parsed.skillsDir)) {
|
|
80
|
+
if (!active.has(id)) continue;
|
|
81
|
+
for (const dir of consumeDirsForPlatform(id)) {
|
|
82
|
+
if (dir !== parsed.skillsDir) dirs.add(dir);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return [...dirs].map((dir) => `${dir}${parsed.name}/${parsed.rest}`).filter((candidate) => exists(candidate));
|
|
86
|
+
}
|
|
74
87
|
|
|
75
88
|
// src/utils/unified-diff.ts
|
|
76
89
|
function splitLines(text) {
|
|
@@ -551,9 +564,10 @@ function withAffectedResources(change, expected, current) {
|
|
|
551
564
|
export {
|
|
552
565
|
resourceScopesForPlugins,
|
|
553
566
|
isTransparentCrossHarnessGap,
|
|
567
|
+
liveSkillCopiesForMissingPath,
|
|
554
568
|
buildUnifiedDiffLines,
|
|
555
569
|
scopeHostConfigToResource,
|
|
556
570
|
scopeMcpConfigToServer,
|
|
557
571
|
withAffectedResources
|
|
558
572
|
};
|
|
559
|
-
//# sourceMappingURL=chunk-
|
|
573
|
+
//# sourceMappingURL=chunk-ZUXFPAVX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/services/cross-harness-gap.ts","../src/utils/unified-diff.ts","../src/services/host-config-resource-detail.ts","../src/services/mcp-resource-detail.ts","../src/services/scoped-file-content-delta.ts"],"sourcesContent":["import { getAllPlatforms } from \"../platforms/registry.js\";\nimport {\n resourceHarnessScope,\n type HarnessScope,\n} from \"./harness-scope.js\";\nimport { mergePluginsForApply } from \"./plugin-apply-merge.js\";\nimport { parseSkillEmitPath, skillConsumeDirs } from \"./shared-emit-paths.js\";\n\nconst consumeDirsByPlatform = new Map<string, ReadonlySet<string>>();\n\nfunction consumeDirsForPlatform(platformId: string): ReadonlySet<string> {\n const cached = consumeDirsByPlatform.get(platformId);\n if (cached) {\n return cached;\n }\n const dirs = new Set<string>([\n ...skillConsumeDirs(platformId, \"global\"),\n ...skillConsumeDirs(platformId, \"project\"),\n ]);\n consumeDirsByPlatform.set(platformId, dirs);\n return dirs;\n}\n\nfunction platformsConsumingSkillDir(skillsDir: string): string[] {\n const ids: string[] = [];\n for (const platform of getAllPlatforms()) {\n if (consumeDirsForPlatform(platform.id).has(skillsDir)) {\n ids.push(platform.id);\n }\n }\n return ids;\n}\n\nexport function resourceScopesForPlugins(\n pluginIds: readonly string[] | undefined,\n): Map<string, HarnessScope> {\n const map = new Map<string, HarnessScope>();\n if (!pluginIds || pluginIds.length === 0) {\n return map;\n }\n for (const resource of mergePluginsForApply([...pluginIds]).resources) {\n map.set(`${resource.type}:${resource.name}`, resourceHarnessScope(resource));\n }\n return map;\n}\n\n/**\n * A missing harness copy is transparent when another on-disk copy already\n * covers it. A subset scope is not covered by a sibling the new harness\n * cannot read (Codex does not read ~/.claude/skills).\n */\nexport function isTransparentCrossHarnessGap(input: {\n path: string;\n onDiskSiblingPaths: readonly string[];\n scope?: HarnessScope;\n}): boolean {\n if (input.onDiskSiblingPaths.length === 0) {\n return false;\n }\n if (!input.scope || input.scope.kind === \"all\") {\n return true;\n }\n const missingDir = parseSkillEmitPath(input.path)?.skillsDir;\n if (!missingDir) {\n return true;\n }\n const scoped = new Set(input.scope.harnesses);\n const consumers = platformsConsumingSkillDir(missingDir).filter((id) => scoped.has(id));\n if (consumers.length === 0) {\n return true;\n }\n return consumers.every((id) => {\n const dirs = consumeDirsForPlatform(id);\n return input.onDiskSiblingPaths.some((path) => {\n const dir = parseSkillEmitPath(path)?.skillsDir;\n return dir !== undefined && dirs.has(dir);\n });\n });\n}\n\n/**\n * On-disk copies of a missing skill file in another folder that a harness\n * reading the missing folder also reads. Apply places the skill on such a\n * live copy (for example ~/.agents/skills, which Cursor reads) instead of\n * writing the harness default, so status must not call the default missing.\n */\nexport function liveSkillCopiesForMissingPath(\n path: string,\n harnesses: readonly string[],\n exists: (relativePath: string) => boolean,\n): string[] {\n const parsed = parseSkillEmitPath(path);\n if (!parsed) {\n return [];\n }\n const active = new Set(harnesses);\n const dirs = new Set<string>();\n for (const id of platformsConsumingSkillDir(parsed.skillsDir)) {\n if (!active.has(id)) continue;\n for (const dir of consumeDirsForPlatform(id)) {\n if (dir !== parsed.skillsDir) dirs.add(dir);\n }\n }\n return [...dirs]\n .map((dir) => `${dir}${parsed.name}/${parsed.rest}`)\n .filter((candidate) => exists(candidate));\n}\n","/**\n * Line-oriented unified diff (git-style +/-) from live content to after-apply content.\n */\n\nexport type UnifiedDiffLineKind = \"meta\" | \"hunk\" | \"context\" | \"add\" | \"remove\";\n\nexport interface UnifiedDiffLine {\n kind: UnifiedDiffLineKind;\n text: string;\n}\n\ntype Op = { kind: \"equal\" | \"insert\" | \"delete\"; line: string };\n\nfunction splitLines(text: string): string[] {\n if (text.length === 0) {\n return [];\n }\n const parts = text.split(\"\\n\");\n if (text.endsWith(\"\\n\")) {\n return parts.slice(0, -1);\n }\n return parts;\n}\n\n/** Classic LCS → per-line equal/insert/delete ops. */\nfunction computeOps(oldLines: string[], newLines: string[]): Op[] {\n const m = oldLines.length;\n const n = newLines.length;\n const dp: number[][] = Array.from({ length: m + 1 }, () =>\n Array.from({ length: n + 1 }, () => 0),\n );\n\n for (let i = m - 1; i >= 0; i--) {\n for (let j = n - 1; j >= 0; j--) {\n if (oldLines[i] === newLines[j]) {\n dp[i]![j] = (dp[i + 1]![j + 1] ?? 0) + 1;\n } else {\n dp[i]![j] = Math.max(dp[i + 1]![j] ?? 0, dp[i]![j + 1] ?? 0);\n }\n }\n }\n\n const ops: Op[] = [];\n let i = 0;\n let j = 0;\n while (i < m && j < n) {\n if (oldLines[i] === newLines[j]) {\n ops.push({ kind: \"equal\", line: oldLines[i]! });\n i++;\n j++;\n } else if ((dp[i + 1]![j] ?? 0) >= (dp[i]![j + 1] ?? 0)) {\n ops.push({ kind: \"delete\", line: oldLines[i]! });\n i++;\n } else {\n ops.push({ kind: \"insert\", line: newLines[j]! });\n j++;\n }\n }\n while (i < m) {\n ops.push({ kind: \"delete\", line: oldLines[i]! });\n i++;\n }\n while (j < n) {\n ops.push({ kind: \"insert\", line: newLines[j]! });\n j++;\n }\n return ops;\n}\n\nfunction advanceLine(op: Op, oldLine: number, newLine: number): {\n oldLine: number;\n newLine: number;\n} {\n switch (op.kind) {\n case \"equal\":\n return { oldLine: oldLine + 1, newLine: newLine + 1 };\n case \"delete\":\n return { oldLine: oldLine + 1, newLine };\n case \"insert\":\n return { oldLine, newLine: newLine + 1 };\n default: {\n const _never: never = op.kind;\n return _never;\n }\n }\n}\n\n/**\n * Build unified-diff lines: live (from) → after-apply (to).\n */\nexport function buildUnifiedDiffLines(\n path: string,\n from: string,\n to: string,\n contextLines = 3,\n): UnifiedDiffLine[] {\n const ops = computeOps(splitLines(from), splitLines(to));\n if (ops.every((op) => op.kind === \"equal\")) {\n return [{ kind: \"meta\", text: \"(no content differences)\" }];\n }\n\n const result: UnifiedDiffLine[] = [\n { kind: \"meta\", text: `--- live/${path}` },\n { kind: \"meta\", text: `+++ after-apply/${path}` },\n ];\n\n // Include change ops plus ±contextLines of surrounding equal lines.\n const include = new Array<boolean>(ops.length).fill(false);\n for (let index = 0; index < ops.length; index++) {\n if (ops[index]!.kind === \"equal\") {\n continue;\n }\n include[index] = true;\n let before = 0;\n for (let k = index - 1; k >= 0 && before < contextLines; k--) {\n include[k] = true;\n if (ops[k]!.kind === \"equal\") {\n before++;\n }\n }\n let after = 0;\n for (let k = index + 1; k < ops.length && after < contextLines; k++) {\n include[k] = true;\n if (ops[k]!.kind === \"equal\") {\n after++;\n }\n }\n }\n\n let opIndex = 0;\n let oldLine = 1;\n let newLine = 1;\n\n while (opIndex < ops.length) {\n if (!include[opIndex]) {\n const advanced = advanceLine(ops[opIndex]!, oldLine, newLine);\n oldLine = advanced.oldLine;\n newLine = advanced.newLine;\n opIndex++;\n continue;\n }\n\n const hunkStart = opIndex;\n const hunkOldStart = oldLine;\n const hunkNewStart = newLine;\n while (opIndex < ops.length && include[opIndex]) {\n opIndex++;\n }\n const hunkEnd = opIndex;\n\n let oldCount = 0;\n let newCount = 0;\n const body: UnifiedDiffLine[] = [];\n for (let k = hunkStart; k < hunkEnd; k++) {\n const op = ops[k]!;\n switch (op.kind) {\n case \"equal\":\n body.push({ kind: \"context\", text: ` ${op.line}` });\n oldCount++;\n newCount++;\n break;\n case \"delete\":\n body.push({ kind: \"remove\", text: `-${op.line}` });\n oldCount++;\n break;\n case \"insert\":\n body.push({ kind: \"add\", text: `+${op.line}` });\n newCount++;\n break;\n default: {\n const _never: never = op.kind;\n return _never;\n }\n }\n const advanced = advanceLine(op, oldLine, newLine);\n oldLine = advanced.oldLine;\n newLine = advanced.newLine;\n }\n\n result.push({\n kind: \"hunk\",\n text: `@@ -${hunkOldStart},${oldCount} +${hunkNewStart},${newCount} @@`,\n });\n result.push(...body);\n }\n\n return result;\n}\n\n/** True when FileDiff would show a non-empty live → after-apply body. */\nexport function fileDiffHasContentChange(\n path: string,\n current: string,\n expected: string,\n): boolean {\n const { added, removed } = countUnifiedDiffChanges(\n buildUnifiedDiffLines(path, current, expected),\n );\n return added > 0 || removed > 0;\n}\n\nexport function countUnifiedDiffChanges(lines: UnifiedDiffLine[]): {\n added: number;\n removed: number;\n} {\n let added = 0;\n let removed = 0;\n for (const line of lines) {\n switch (line.kind) {\n case \"add\":\n added++;\n break;\n case \"remove\":\n removed++;\n break;\n case \"meta\":\n case \"hunk\":\n case \"context\":\n break;\n default: {\n const _never: never = line.kind;\n return _never;\n }\n }\n }\n return { added, removed };\n}\n","import type { HookMetadata, PermissionMetadata } from \"../types.js\";\nimport { parseHooksJsonContent } from \"./hook-serialization.js\";\n\nconst PERMISSION_ACTIONS = [\"allow\", \"deny\", \"ask\"] as const satisfies ReadonlyArray<\n PermissionMetadata[\"action\"]\n>;\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction formatJsonFragment(value: unknown): string {\n return `${JSON.stringify(value, null, 2)}\\n`;\n}\n\nfunction parseJsonObject(content: string): Record<string, unknown> | null {\n try {\n const parsed: unknown = JSON.parse(content);\n return isRecord(parsed) ? parsed : null;\n } catch {\n return null;\n }\n}\n\nconst PERMISSION_RESOURCE_TYPES = [\"permission\", \"hook\", \"env_var\"] as const;\n\n/** Permission, hook, and env var identities present in a shared settings file. */\nexport function hostConfigResourcesFromContent(\n content: string,\n): Array<{ type: (typeof PERMISSION_RESOURCE_TYPES)[number]; name: string }> {\n const resources: Array<{\n type: (typeof PERMISSION_RESOURCE_TYPES)[number];\n name: string;\n }> = [];\n const seen = new Set<string>();\n const add = (\n type: (typeof PERMISSION_RESOURCE_TYPES)[number],\n name: string,\n ) => {\n const trimmed = name.trim();\n if (!trimmed) {\n return;\n }\n const key = `${type}:${trimmed}`;\n if (seen.has(key)) {\n return;\n }\n seen.add(key);\n resources.push({ type, name: trimmed });\n };\n\n const document = parseJsonObject(content);\n if (document && isRecord(document.permissions)) {\n for (const action of PERMISSION_ACTIONS) {\n const list = document.permissions[action];\n if (!Array.isArray(list)) {\n continue;\n }\n for (const pattern of list) {\n if (typeof pattern === \"string\" && pattern.trim()) {\n add(\"permission\", `${action}-${pattern}`);\n }\n }\n }\n }\n for (const hook of hookResourcesFromContent(content)) {\n add(\"hook\", hook.name);\n }\n if (document && isRecord(document.env)) {\n for (const name of Object.keys(document.env)) {\n add(\"env_var\", name);\n }\n }\n return resources;\n}\n\nexport function parsePermissionResourceName(\n name: string,\n): Pick<PermissionMetadata, \"action\" | \"pattern\"> | null {\n const trimmed = name.trim();\n for (const action of PERMISSION_ACTIONS) {\n const prefix = `${action}-`;\n if (trimmed.startsWith(prefix) && trimmed.length > prefix.length) {\n return { action, pattern: trimmed.slice(prefix.length) };\n }\n }\n return null;\n}\n\nfunction permissionPatternPresent(\n permissions: unknown,\n action: PermissionMetadata[\"action\"],\n pattern: string,\n): boolean {\n if (!isRecord(permissions)) {\n return false;\n }\n const list = permissions[action];\n return Array.isArray(list) && list.some((item) => item === pattern);\n}\n\nfunction hookResourcesFromContent(content: string) {\n const direct = parseHooksJsonContent(content, \"\");\n if (direct.length > 0) {\n return direct;\n }\n const document = parseJsonObject(content);\n if (!document) {\n return [];\n }\n return parseHooksJsonContent(JSON.stringify({ hooks: document }), \"\");\n}\n\nfunction scopeToPermission(content: string, name: string): string {\n const parsed = parsePermissionResourceName(name);\n if (!parsed) {\n return content;\n }\n const document = parseJsonObject(content);\n if (!document) {\n return content;\n }\n if (permissionPatternPresent(document.permissions, parsed.action, parsed.pattern)) {\n return formatJsonFragment({\n permissions: { [parsed.action]: [parsed.pattern] },\n });\n }\n return formatJsonFragment({ permissions: {} });\n}\n\nfunction scopeToHook(content: string, name: string): string {\n if (!parseJsonObject(content)) {\n return content;\n }\n const needle = name.trim().toLowerCase();\n const match = hookResourcesFromContent(content).find(\n (resource) => resource.name.toLowerCase() === needle,\n );\n if (!match) {\n return formatJsonFragment({ hooks: {} });\n }\n const metadata = match.metadata as HookMetadata;\n const entry = metadata.hook_entry ?? { command: match.content };\n return formatJsonFragment({\n hooks: { [metadata.event]: [entry] },\n });\n}\n\nfunction scopeToEnvVar(content: string, name: string): string {\n const document = parseJsonObject(content);\n if (!document) {\n return content;\n }\n if (!isRecord(document.env) || !Object.hasOwn(document.env, name)) {\n return formatJsonFragment({ env: {} });\n }\n return formatJsonFragment({ env: { [name]: document.env[name] } });\n}\n\n/**\n * Restrict a shared host settings payload to one permission, hook, or env var\n * so live→after-apply diffs do not include sibling keys in the same file.\n */\nexport function scopeHostConfigToResource(\n content: string | null,\n resource: { type: string; name: string },\n): string | null {\n if (content === null) {\n return null;\n }\n const name = resource.name.trim();\n if (!name) {\n return content;\n }\n switch (resource.type) {\n case \"permission\":\n return scopeToPermission(content, name);\n case \"hook\":\n return scopeToHook(content, name);\n case \"env_var\":\n return scopeToEnvVar(content, name);\n default:\n return content;\n }\n}\n","import type { Resource, ResourceMetadata } from \"../types.js\";\nimport {\n emitCursorMcpServerEntry,\n parseMcpServerEntry,\n} from \"./mcp-config-bridge.js\";\nimport { readResourceContentFromPathHint } from \"./resource-editor-path.js\";\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\ntype McpServersWrapperKey = \"mcpServers\" | \"mcp_servers\" | \"mcp\";\n\nconst MCP_SERVERS_WRAPPER_KEYS = [\n \"mcpServers\",\n \"mcp_servers\",\n \"mcp\",\n] as const satisfies readonly McpServersWrapperKey[];\n\nfunction mcpServersWrapperKey(\n document: Record<string, unknown>,\n): McpServersWrapperKey | null {\n for (const key of MCP_SERVERS_WRAPPER_KEYS) {\n if (isRecord(document[key])) {\n return key;\n }\n }\n return null;\n}\n\n/** Server keys in an aggregate MCP JSON config (`mcpServers` / `mcp_servers` / `mcp`). */\nexport function mcpServerNamesFromConfig(content: string): string[] {\n try {\n const document = JSON.parse(content) as unknown;\n const servers = mcpServersRecord(document);\n return servers ? Object.keys(servers) : [];\n } catch {\n return [];\n }\n}\n\nfunction mcpServersRecord(document: unknown): Record<string, unknown> | null {\n if (!isRecord(document)) {\n return null;\n }\n const key = mcpServersWrapperKey(document);\n if (!key) {\n return null;\n }\n const serversRaw = document[key];\n return isRecord(serversRaw) ? serversRaw : null;\n}\n\nfunction formatMcpServersFragment(\n wrapper: McpServersWrapperKey,\n servers: Record<string, unknown>,\n): string {\n return `${JSON.stringify({ [wrapper]: servers }, null, 2)}\\n`;\n}\n\n/**\n * Restrict an MCP config payload to one server key so live→after-apply diffs\n * do not include sibling servers in the same file.\n */\nexport function scopeMcpConfigToServer(\n content: string | null,\n serverName: string,\n): string | null {\n if (content === null) {\n return null;\n }\n const name = serverName.trim();\n if (!name) {\n return content;\n }\n try {\n const document = JSON.parse(content) as unknown;\n if (!isRecord(document)) {\n return content;\n }\n const wrapper = mcpServersWrapperKey(document);\n if (!wrapper) {\n return content;\n }\n const servers = document[wrapper];\n if (!isRecord(servers)) {\n return content;\n }\n const scoped = Object.hasOwn(servers, name)\n ? { [name]: servers[name] }\n : {};\n return formatMcpServersFragment(wrapper, scoped);\n } catch {\n return content;\n }\n}\n\n/** Pretty-print one server entry as an `mcpServers` document fragment. */\nexport function formatMcpServerConfig(name: string, entry: unknown): string {\n return `${JSON.stringify({ mcpServers: { [name]: entry } }, null, 2)}\\n`;\n}\n\nexport function extractMcpServerConfigFromFile(\n fileContent: string,\n name: string,\n): string | null {\n try {\n const document = JSON.parse(fileContent) as unknown;\n const servers = mcpServersRecord(document);\n if (!servers || !Object.hasOwn(servers, name)) {\n return null;\n }\n return formatMcpServerConfig(name, servers[name]);\n } catch {\n return null;\n }\n}\n\nfunction formatMcpServerFromMetadata(\n name: string,\n metadata: ResourceMetadata,\n): string | null {\n const parsed = parseMcpServerEntry(metadata);\n if (!parsed) {\n return null;\n }\n const entry = emitCursorMcpServerEntry(parsed);\n if (Object.keys(entry).length === 0) {\n return null;\n }\n return formatMcpServerConfig(name, entry);\n}\n\nexport function overlayMcpServerDetail(\n resource: Pick<\n Resource,\n \"type\" | \"name\" | \"source\" | \"origin_ref\" | \"content\" | \"metadata\" | \"updated_at\"\n >,\n pathHint?: string | null,\n): { content: string; updatedAt: string } {\n if (resource.type !== \"mcp_server\") {\n return { content: resource.content, updatedAt: resource.updated_at };\n }\n\n const candidates = [pathHint, resource.source, resource.origin_ref];\n for (const candidate of candidates) {\n const trimmed = candidate?.trim();\n if (!trimmed || trimmed === \"manual\") {\n continue;\n }\n try {\n const onDisk = readResourceContentFromPathHint(trimmed);\n const extracted = extractMcpServerConfigFromFile(onDisk.content, resource.name);\n if (extracted) {\n return { content: extracted, updatedAt: onDisk.updatedAt };\n }\n } catch {\n // try the next path candidate\n }\n }\n\n const fromMetadata = formatMcpServerFromMetadata(\n resource.name,\n resource.metadata,\n );\n if (fromMetadata) {\n return { content: fromMetadata, updatedAt: resource.updated_at };\n }\n\n return { content: resource.content, updatedAt: resource.updated_at };\n}\n","import { fileDiffHasContentChange } from \"../utils/unified-diff.js\";\nimport {\n hostConfigResourcesFromContent,\n scopeHostConfigToResource,\n} from \"./host-config-resource-detail.js\";\nimport {\n mcpServerNamesFromConfig,\n scopeMcpConfigToServer,\n} from \"./mcp-resource-detail.js\";\nimport {\n isClaudeSettingsPath,\n isClaudeUserJsonPath,\n isMuseSettingsPath,\n} from \"./merged-host-config.js\";\nimport {\n isMcpConfigManagedPath,\n resourceKeyFromManagedPath,\n} from \"./profile-commit-resource.js\";\nimport type { DriftFileChange } from \"./project-drift.js\";\n\nexport interface ManagedFileResourceIdentity {\n type: string;\n name: string;\n}\n\nfunction resourceKey(resource: ManagedFileResourceIdentity): string {\n return `${resource.type}:${resource.name}`;\n}\n\nfunction collectIdentities(\n path: string,\n contents: Array<string | null>,\n): ManagedFileResourceIdentity[] {\n const order: ManagedFileResourceIdentity[] = [];\n const seen = new Set<string>();\n const add = (resource: ManagedFileResourceIdentity) => {\n const key = resourceKey(resource);\n if (seen.has(key)) {\n return;\n }\n seen.add(key);\n order.push(resource);\n };\n\n const mapped = resourceKeyFromManagedPath(path);\n if (mapped) {\n add(mapped);\n }\n\n const inspectMcp =\n isMcpConfigManagedPath(path) || isClaudeUserJsonPath(path);\n const inspectHost = isClaudeSettingsPath(path) || isMuseSettingsPath(path);\n\n for (const content of contents) {\n if (!content) {\n continue;\n }\n if (inspectMcp) {\n for (const name of mcpServerNamesFromConfig(content)) {\n add({ type: \"mcp_server\", name });\n }\n }\n if (inspectHost) {\n for (const resource of hostConfigResourcesFromContent(content)) {\n add(resource);\n }\n }\n }\n return order;\n}\n\nfunction scopedBodies(\n expected: string,\n current: string | null,\n resource: ManagedFileResourceIdentity,\n): { expected: string; current: string | null } {\n if (resource.type === \"mcp_server\") {\n return {\n expected: scopeMcpConfigToServer(expected, resource.name) ?? expected,\n current: scopeMcpConfigToServer(current, resource.name),\n };\n }\n if (\n resource.type === \"permission\"\n || resource.type === \"hook\"\n || resource.type === \"env_var\"\n ) {\n return {\n expected: scopeHostConfigToResource(expected, resource) ?? expected,\n current: scopeHostConfigToResource(current, resource),\n };\n }\n return { expected, current };\n}\n\nfunction scopedContentsDiffer(\n path: string,\n expected: string,\n current: string | null,\n resource: ManagedFileResourceIdentity,\n): boolean {\n const scoped = scopedBodies(expected, current, resource);\n if (scoped.current === null) {\n return true;\n }\n return fileDiffHasContentChange(path, scoped.current, scoped.expected);\n}\n\n/** Resource identities in a shared config whose scoped live vs expected content differs. */\nexport function affectedResourcesForManagedFileDiff(input: {\n path: string;\n expected: string;\n current: string | null;\n}): ManagedFileResourceIdentity[] {\n const identities = collectIdentities(input.path, [input.expected, input.current]);\n const affected = identities.filter((resource) =>\n scopedContentsDiffer(input.path, input.expected, input.current, resource),\n );\n return affected.sort((left, right) => {\n const typeOrder = left.type.localeCompare(right.type);\n return typeOrder !== 0 ? typeOrder : left.name.localeCompare(right.name);\n });\n}\n\nexport function withAffectedResources(\n change: DriftFileChange,\n expected: string,\n current: string | null,\n): DriftFileChange {\n const affected_resources = affectedResourcesForManagedFileDiff({\n path: change.path,\n expected,\n current,\n });\n return { ...change, affected_resources };\n}\n"],"mappings":";;;;;;;;;;;;;;;AAQA,IAAM,wBAAwB,oBAAI,IAAiC;AAEnE,SAAS,uBAAuB,YAAyC;AACvE,QAAM,SAAS,sBAAsB,IAAI,UAAU;AACnD,MAAI,QAAQ;AACV,WAAO;AAAA,EACT;AACA,QAAM,OAAO,oBAAI,IAAY;AAAA,IAC3B,GAAG,iBAAiB,YAAY,QAAQ;AAAA,IACxC,GAAG,iBAAiB,YAAY,SAAS;AAAA,EAC3C,CAAC;AACD,wBAAsB,IAAI,YAAY,IAAI;AAC1C,SAAO;AACT;AAEA,SAAS,2BAA2B,WAA6B;AAC/D,QAAM,MAAgB,CAAC;AACvB,aAAW,YAAY,gBAAgB,GAAG;AACxC,QAAI,uBAAuB,SAAS,EAAE,EAAE,IAAI,SAAS,GAAG;AACtD,UAAI,KAAK,SAAS,EAAE;AAAA,IACtB;AAAA,EACF;AACA,SAAO;AACT;AAEO,SAAS,yBACd,WAC2B;AAC3B,QAAM,MAAM,oBAAI,IAA0B;AAC1C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,SAAS,SAAS,IAAI;AAAA,IACxD;AAAA,EACF;AACA,MACE,SAAS,SAAS,gBACf,SAAS,SAAS,UAClB,SAAS,SAAS,WACrB;AACA,WAAO;AAAA,MACL,UAAU,0BAA0B,UAAU,QAAQ,KAAK;AAAA,MAC3D,SAAS,0BAA0B,SAAS,QAAQ;AAAA,IACtD;AAAA,EACF;AACA,SAAO,EAAE,UAAU,QAAQ;AAC7B;AAEA,SAAS,qBACP,MACA,UACA,SACA,UACS;AACT,QAAM,SAAS,aAAa,UAAU,SAAS,QAAQ;AACvD,MAAI,OAAO,YAAY,MAAM;AAC3B,WAAO;AAAA,EACT;AACA,SAAO,yBAAyB,MAAM,OAAO,SAAS,OAAO,QAAQ;AACvE;AAGO,SAAS,oCAAoC,OAIlB;AAChC,QAAM,aAAa,kBAAkB,MAAM,MAAM,CAAC,MAAM,UAAU,MAAM,OAAO,CAAC;AAChF,QAAM,WAAW,WAAW;AAAA,IAAO,CAAC,aAClC,qBAAqB,MAAM,MAAM,MAAM,UAAU,MAAM,SAAS,QAAQ;AAAA,EAC1E;AACA,SAAO,SAAS,KAAK,CAAC,MAAM,UAAU;AACpC,UAAM,YAAY,KAAK,KAAK,cAAc,MAAM,IAAI;AACpD,WAAO,cAAc,IAAI,YAAY,KAAK,KAAK,cAAc,MAAM,IAAI;AAAA,EACzE,CAAC;AACH;AAEO,SAAS,sBACd,QACA,UACA,SACiB;AACjB,QAAM,qBAAqB,oCAAoC;AAAA,IAC7D,MAAM,OAAO;AAAA,IACb;AAAA,IACA;AAAA,EACF,CAAC;AACD,SAAO,EAAE,GAAG,QAAQ,mBAAmB;AACzC;","names":["i","j","isRecord"]}
|
|
@@ -5,50 +5,54 @@ import {
|
|
|
5
5
|
inferContainedFileType,
|
|
6
6
|
isPackageEntryFileName,
|
|
7
7
|
packageDirectoryDisplayPath,
|
|
8
|
-
resourceHumanName
|
|
9
|
-
|
|
10
|
-
} from "./chunk-ULCD6DJE.js";
|
|
11
|
-
import {
|
|
12
|
-
shouldUseWizard
|
|
13
|
-
} from "./chunk-NAGAJ5UM.js";
|
|
8
|
+
resourceHumanName
|
|
9
|
+
} from "./chunk-RM7VP6ID.js";
|
|
14
10
|
import {
|
|
15
11
|
parseOutputFormat
|
|
16
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-4E3G4H5B.js";
|
|
17
13
|
import {
|
|
14
|
+
PluginNotInMarketplaceError,
|
|
18
15
|
RESOURCE_TYPES,
|
|
19
16
|
getInstalledCursorPluginInstallPath,
|
|
20
17
|
hostPluginPullUnavailableReason,
|
|
18
|
+
installMarketplacePinIntoCache,
|
|
21
19
|
isLiveLibraryRef,
|
|
22
20
|
listContainedFilesPage,
|
|
23
21
|
listHostPluginVersions,
|
|
22
|
+
listPlugins,
|
|
23
|
+
listResources,
|
|
24
24
|
listResourcesMatchingOriginRef,
|
|
25
|
+
marketplaceIsConfigured,
|
|
26
|
+
marketplaceListsPlugin,
|
|
25
27
|
parseDependencyRef,
|
|
26
28
|
readResourceContentFromPathHint,
|
|
29
|
+
registerDeclaredMarketplaces,
|
|
27
30
|
resolveExistingResourceFilesystemPath,
|
|
28
31
|
resolveInstallRoot,
|
|
29
|
-
resolveMarketplaceRoot
|
|
30
|
-
|
|
32
|
+
resolveMarketplaceRoot,
|
|
33
|
+
shortenHomePath,
|
|
34
|
+
syncLinkedResources,
|
|
35
|
+
syncPluginResource
|
|
36
|
+
} from "./chunk-26QGX47N.js";
|
|
31
37
|
import {
|
|
32
38
|
builtinMarketplaceEntry,
|
|
39
|
+
findKnownMarketplace,
|
|
33
40
|
listMarketplaces,
|
|
34
41
|
normalizeMarketplaceUrl,
|
|
35
|
-
|
|
36
|
-
|
|
42
|
+
readJsonFile,
|
|
43
|
+
readMarketplaceManifest,
|
|
44
|
+
refreshMarketplaceCatalog,
|
|
45
|
+
resolveHomeRoot,
|
|
46
|
+
shouldUseWizard,
|
|
47
|
+
wellKnownMarketplaceEntry
|
|
48
|
+
} from "./chunk-LGWFLVZQ.js";
|
|
37
49
|
import {
|
|
38
50
|
formatRelativeTimeWithAbsolute,
|
|
51
|
+
getHarnesstapDir,
|
|
39
52
|
renderPanel,
|
|
40
53
|
renderSubheader,
|
|
41
54
|
ui
|
|
42
|
-
} from "./chunk-
|
|
43
|
-
import {
|
|
44
|
-
resolveHomeRoot
|
|
45
|
-
} from "./chunk-DF4Z7LAD.js";
|
|
46
|
-
import {
|
|
47
|
-
readJsonFile
|
|
48
|
-
} from "./chunk-G6WKY2W4.js";
|
|
49
|
-
import {
|
|
50
|
-
getHarnesstapDir
|
|
51
|
-
} from "./chunk-WG5A6EAU.js";
|
|
55
|
+
} from "./chunk-MTCCUYBZ.js";
|
|
52
56
|
|
|
53
57
|
// src/cli/handlers/resource-list.ts
|
|
54
58
|
function makeResourceTypeColumn(width = 14) {
|
|
@@ -97,6 +101,128 @@ function resourceListRenderOptions(opts) {
|
|
|
97
101
|
};
|
|
98
102
|
}
|
|
99
103
|
|
|
104
|
+
// src/services/resource-sync-install.ts
|
|
105
|
+
function marketplaceDependencySelectorRef(selector) {
|
|
106
|
+
const trimmed = selector?.trim();
|
|
107
|
+
if (!trimmed) return void 0;
|
|
108
|
+
const ref = trimmed.replace(/^(plugin|plugin_pin):/, "");
|
|
109
|
+
return parseDependencyRef(ref).source_kind === "marketplace" ? ref : void 0;
|
|
110
|
+
}
|
|
111
|
+
function marketplaceIsResolvable(marketplace, homeRoot) {
|
|
112
|
+
return Boolean(
|
|
113
|
+
findKnownMarketplace(getHarnesstapDir(), marketplace) ?? wellKnownMarketplaceEntry(marketplace) ?? (marketplaceIsConfigured(homeRoot, marketplace) ? marketplace : void 0)
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
function marketplaceIsKnown(marketplace, homeRoot) {
|
|
117
|
+
if (marketplaceIsResolvable(marketplace, homeRoot)) return true;
|
|
118
|
+
return listPlugins().some((plugin) => Boolean(plugin.claude?.marketplaces?.[marketplace]));
|
|
119
|
+
}
|
|
120
|
+
function unknownMarketplaceReason(marketplace) {
|
|
121
|
+
return `marketplace ${marketplace} is not configured. Add it with ht marketplace add <git-url> --name ${marketplace}, then run this command again`;
|
|
122
|
+
}
|
|
123
|
+
function undeclaredDependencyReason(ref) {
|
|
124
|
+
return `no plugin depends on ${ref}, so there is nothing to install. Add it with ht plugin add ${ref} --to <plugin>, then run this command again`;
|
|
125
|
+
}
|
|
126
|
+
function registerMarketplaceDeclaredByLibrary(marketplace) {
|
|
127
|
+
const harnesstapDir = getHarnesstapDir();
|
|
128
|
+
if (findKnownMarketplace(harnesstapDir, marketplace)) return;
|
|
129
|
+
for (const plugin of listPlugins()) {
|
|
130
|
+
const entry = plugin.claude?.marketplaces?.[marketplace];
|
|
131
|
+
if (!entry) continue;
|
|
132
|
+
if (registerDeclaredMarketplaces({ marketplaces: { [marketplace]: entry } }, harnesstapDir).added.length > 0) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
async function syncResourcesInstallingDependencies(options = {}) {
|
|
138
|
+
const ref = marketplaceDependencySelectorRef(options.selector);
|
|
139
|
+
const pins = ref ? listResources({ type: "plugin", includeComposition: true }).filter(
|
|
140
|
+
(resource) => resource.origin_ref === ref
|
|
141
|
+
) : [];
|
|
142
|
+
if (!ref) {
|
|
143
|
+
return syncLinkedResources(options);
|
|
144
|
+
}
|
|
145
|
+
if (pins.length === 0) {
|
|
146
|
+
const result = await syncLinkedResources(options);
|
|
147
|
+
const marketplace = parseDependencyRef(ref).namespace;
|
|
148
|
+
const homeRoot2 = options.homeRoot ?? resolveHomeRoot();
|
|
149
|
+
registerMarketplaceDeclaredByLibrary(marketplace);
|
|
150
|
+
if (!marketplaceIsResolvable(marketplace, homeRoot2)) {
|
|
151
|
+
result.failed = [
|
|
152
|
+
...result.failed ?? [],
|
|
153
|
+
{ ref, reason: unknownMarketplaceReason(marketplace) }
|
|
154
|
+
];
|
|
155
|
+
} else {
|
|
156
|
+
const pluginName = parseDependencyRef(ref).name;
|
|
157
|
+
const harnesstapDir = getHarnesstapDir();
|
|
158
|
+
const lookup = () => marketplaceListsPlugin({ homeRoot: homeRoot2, harnesstapDir, marketplace, pluginName });
|
|
159
|
+
let listed = lookup();
|
|
160
|
+
if (listed === void 0 && !options.dryRun && findKnownMarketplace(harnesstapDir, marketplace)) {
|
|
161
|
+
const refreshed = await refreshMarketplaceCatalog(harnesstapDir, {
|
|
162
|
+
name: marketplace,
|
|
163
|
+
force: false,
|
|
164
|
+
unattended: false
|
|
165
|
+
});
|
|
166
|
+
if (refreshed.ok) listed = lookup();
|
|
167
|
+
}
|
|
168
|
+
if (listed === false) {
|
|
169
|
+
result.failed = [
|
|
170
|
+
...result.failed ?? [],
|
|
171
|
+
{ ref, reason: new PluginNotInMarketplaceError(pluginName, marketplace).message }
|
|
172
|
+
];
|
|
173
|
+
} else if (result.checked === 0) {
|
|
174
|
+
result.failed = [...result.failed ?? [], { ref, reason: undeclaredDependencyReason(ref) }];
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return result;
|
|
178
|
+
}
|
|
179
|
+
const homeRoot = options.homeRoot ?? resolveHomeRoot();
|
|
180
|
+
const aggregated = {
|
|
181
|
+
checked: 0,
|
|
182
|
+
updated: [],
|
|
183
|
+
stale: [],
|
|
184
|
+
unchanged: [],
|
|
185
|
+
skipped: [],
|
|
186
|
+
failed: []
|
|
187
|
+
};
|
|
188
|
+
for (const pin of pins) {
|
|
189
|
+
if (!options.dryRun && !resolveInstallRoot(ref, homeRoot, options.claudePluginsRoot)) {
|
|
190
|
+
const metadata = pin.metadata;
|
|
191
|
+
const marketplace = parseDependencyRef(ref).namespace;
|
|
192
|
+
registerMarketplaceDeclaredByLibrary(marketplace);
|
|
193
|
+
if (!marketplaceIsResolvable(marketplace, homeRoot)) {
|
|
194
|
+
aggregated.checked += 1;
|
|
195
|
+
aggregated.stale.push({
|
|
196
|
+
resource: pin,
|
|
197
|
+
reason: unknownMarketplaceReason(marketplace)
|
|
198
|
+
});
|
|
199
|
+
aggregated.failed?.push({ ref, reason: unknownMarketplaceReason(marketplace) });
|
|
200
|
+
continue;
|
|
201
|
+
}
|
|
202
|
+
try {
|
|
203
|
+
await installMarketplacePinIntoCache({
|
|
204
|
+
originRef: ref,
|
|
205
|
+
versionConstraint: metadata.version_constraint,
|
|
206
|
+
homeRoot
|
|
207
|
+
});
|
|
208
|
+
} catch (error) {
|
|
209
|
+
aggregated.checked += 1;
|
|
210
|
+
const reason = error instanceof PluginNotInMarketplaceError ? error.message : `could not install ${ref}: ${error instanceof Error ? error.message : String(error)}`;
|
|
211
|
+
aggregated.stale.push({ resource: pin, reason });
|
|
212
|
+
aggregated.failed?.push({ ref, reason });
|
|
213
|
+
continue;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
const result = await syncPluginResource(pin, { ...options, homeRoot });
|
|
217
|
+
aggregated.checked += result.checked;
|
|
218
|
+
aggregated.updated.push(...result.updated);
|
|
219
|
+
aggregated.stale.push(...result.stale);
|
|
220
|
+
aggregated.unchanged.push(...result.unchanged);
|
|
221
|
+
aggregated.skipped.push(...result.skipped);
|
|
222
|
+
}
|
|
223
|
+
return aggregated;
|
|
224
|
+
}
|
|
225
|
+
|
|
100
226
|
// src/services/resource-show.ts
|
|
101
227
|
import { readFileSync } from "fs";
|
|
102
228
|
|
|
@@ -433,8 +559,8 @@ function resourceShowPanelRows(resource, extras, opts) {
|
|
|
433
559
|
const panelRows = [
|
|
434
560
|
["Type", resource.type],
|
|
435
561
|
["Name", resourceHumanName(resource)],
|
|
436
|
-
["Description", resource.description || "
|
|
437
|
-
["Path", path || "
|
|
562
|
+
["Description", resource.description || "none"],
|
|
563
|
+
["Path", path || "none"],
|
|
438
564
|
["Origin", formatOriginDisplayLabel(
|
|
439
565
|
resource.origin_kind,
|
|
440
566
|
originRef,
|
|
@@ -448,7 +574,7 @@ function resourceShowPanelRows(resource, extras, opts) {
|
|
|
448
574
|
if (opts?.showAllFields) {
|
|
449
575
|
panelRows.push(
|
|
450
576
|
["Source", resource.source],
|
|
451
|
-
["Content hash", resource.content_hash || "
|
|
577
|
+
["Content hash", resource.content_hash || "none"],
|
|
452
578
|
["ID", resource.id],
|
|
453
579
|
["Created", resource.created_at],
|
|
454
580
|
["Metadata", JSON.stringify(resource.metadata)]
|
|
@@ -559,7 +685,9 @@ export {
|
|
|
559
685
|
resolveResourceListType,
|
|
560
686
|
shouldUseInteractiveResourceList,
|
|
561
687
|
resourceListRenderOptions,
|
|
688
|
+
marketplaceIsKnown,
|
|
689
|
+
syncResourcesInstallingDependencies,
|
|
562
690
|
renderResourceShow,
|
|
563
691
|
printResourceShow
|
|
564
692
|
};
|
|
565
|
-
//# sourceMappingURL=chunk-
|
|
693
|
+
//# sourceMappingURL=chunk-ZWB6YXVQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/cli/handlers/resource-list.ts","../src/services/resource-sync-install.ts","../src/services/resource-show.ts","../src/services/plugin-resource-show.ts","../src/services/host-marketplaces.ts"],"sourcesContent":["import type { ResourceType } from \"../../types.js\";\nimport { RESOURCE_TYPES } from \"../../types.js\";\nimport { ui } from \"../../ui/index.js\";\nimport type { Column } from \"../../ui/table.js\";\nimport { parseOutputFormat } from \"../../utils/output-format.js\";\nimport { shouldUseWizard } from \"../../services/wizards/shared.js\";\n\nexport function makeResourceTypeColumn(width = 14): Column {\n return {\n key: \"type\",\n header: \"TYPE\",\n width,\n style: (value) => ui.theme.resourceType(value),\n };\n}\n\nexport function isPluginAttachmentOnlyType(type: string | undefined): boolean {\n if (!type) {\n return false;\n }\n return type === \"plugin\";\n}\n\nexport function resolveResourceListType(\n positionalType?: string,\n flagType?: string,\n): ResourceType | undefined | \"invalid\" | \"conflict\" {\n if (positionalType && flagType && positionalType !== flagType) {\n return \"conflict\";\n }\n const type = positionalType ?? flagType;\n if (!type) {\n return undefined;\n }\n const normalized = type === \"plugin_pin\" ? \"plugin\" : type;\n if (!RESOURCE_TYPES.includes(normalized as ResourceType)) {\n return \"invalid\";\n }\n return normalized as ResourceType;\n}\n\nexport function shouldUseInteractiveResourceList(input: {\n noInteractive?: boolean;\n format?: string;\n search?: string;\n}): boolean {\n if (input.search) {\n return false;\n }\n\n return shouldUseWizard({\n interactive: true,\n noInteractive: input.noInteractive,\n format: parseOutputFormat(input.format),\n missingRequiredArgs: true,\n });\n}\n\nexport function resourceListRenderOptions(opts: {\n showId?: boolean;\n all?: boolean;\n}): { showId: boolean; showAll: boolean } {\n return {\n showId: Boolean(opts.showId),\n showAll: Boolean(opts.all),\n };\n}\n","import { getHarnesstapDir } from \"../db/connection.js\";\nimport { listResources } from \"../models/resource.js\";\nimport { marketplaceIsConfigured } from \"../plugins/claude-plugin-ref.js\";\nimport type { PluginDependencyMetadata } from \"../types.js\";\nimport { resolveHomeRoot } from \"../utils/home-root.js\";\nimport { listPlugins } from \"../models/plugin-model.js\";\nimport { wellKnownMarketplaceEntry } from \"./builtin-marketplaces.js\";\nimport { registerDeclaredMarketplaces } from \"./claude-marketplace-bootstrap.js\";\nimport { marketplaceListsPlugin, PluginNotInMarketplaceError } from \"./host-plugin-source.js\";\nimport { installMarketplacePinIntoCache } from \"./marketplace-pin-cache.js\";\nimport { refreshMarketplaceCatalog } from \"./marketplace-catalog.js\";\nimport { findKnownMarketplace } from \"./marketplace-registry.js\";\nimport { parseDependencyRef } from \"./plugin-dependency.js\";\nimport {\n resolveInstallRoot,\n syncLinkedResources,\n syncPluginResource,\n type SyncLinkedResourcesOptions,\n type SyncLinkedResourcesResult,\n} from \"./resource-sync.js\";\n\n/** `plugin:<name>@<marketplace>` (or `plugin_pin:`) to the dependency ref, else undefined. */\nexport function marketplaceDependencySelectorRef(selector: string | undefined): string | undefined {\n const trimmed = selector?.trim();\n if (!trimmed) return undefined;\n const ref = trimmed.replace(/^(plugin|plugin_pin):/, \"\");\n return parseDependencyRef(ref).source_kind === \"marketplace\" ? ref : undefined;\n}\n\nexport function marketplaceIsResolvable(marketplace: string, homeRoot: string): boolean {\n return Boolean(\n findKnownMarketplace(getHarnesstapDir(), marketplace)\n ?? wellKnownMarketplaceEntry(marketplace)\n ?? (marketplaceIsConfigured(homeRoot, marketplace) ? marketplace : undefined),\n );\n}\n\n/** True when `marketplace` is resolvable or a library plugin's claude.toml declares its source. */\nexport function marketplaceIsKnown(marketplace: string, homeRoot: string): boolean {\n if (marketplaceIsResolvable(marketplace, homeRoot)) return true;\n return listPlugins().some((plugin) => Boolean(plugin.claude?.marketplaces?.[marketplace]));\n}\n\nfunction unknownMarketplaceReason(marketplace: string): string {\n return `marketplace ${marketplace} is not configured. Add it with ht marketplace add <git-url> --name ${marketplace}, then run this command again`;\n}\n\nfunction undeclaredDependencyReason(ref: string): string {\n return `no plugin depends on ${ref}, so there is nothing to install. Add it with ht plugin add ${ref} --to <plugin>, then run this command again`;\n}\n\n/** Register `marketplace` when a library plugin's claude.toml declares its source. */\nfunction registerMarketplaceDeclaredByLibrary(marketplace: string): void {\n const harnesstapDir = getHarnesstapDir();\n if (findKnownMarketplace(harnesstapDir, marketplace)) return;\n for (const plugin of listPlugins()) {\n const entry = plugin.claude?.marketplaces?.[marketplace];\n if (!entry) continue;\n if (registerDeclaredMarketplaces({ marketplaces: { [marketplace]: entry } }, harnesstapDir).added.length > 0) {\n return;\n }\n }\n}\n\n/**\n * `ht resource sync plugin:<name>@<marketplace>` is the fix apply prints for\n * a marketplace dependency with no local version. Sync alone only rereads an\n * existing install, so for a dependency that was never installed it checked\n * nothing. Install each such dependency at its constraint first (resolving a\n * well-known marketplace by name), then sync it, and report why when the\n * install fails.\n */\nexport async function syncResourcesInstallingDependencies(\n options: SyncLinkedResourcesOptions = {},\n): Promise<SyncLinkedResourcesResult> {\n const ref = marketplaceDependencySelectorRef(options.selector);\n const pins = ref\n ? listResources({ type: \"plugin\", includeComposition: true }).filter(\n (resource) => resource.origin_ref === ref,\n )\n : [];\n if (!ref) {\n return syncLinkedResources(options);\n }\n if (pins.length === 0) {\n // No library plugin depends on it, so there is nothing to install; an\n // unknown marketplace is still worth saying how to fix.\n const result = await syncLinkedResources(options);\n const marketplace = parseDependencyRef(ref).namespace;\n const homeRoot = options.homeRoot ?? resolveHomeRoot();\n registerMarketplaceDeclaredByLibrary(marketplace);\n if (!marketplaceIsResolvable(marketplace, homeRoot)) {\n result.failed = [\n ...(result.failed ?? []),\n { ref, reason: unknownMarketplaceReason(marketplace) },\n ];\n } else {\n const pluginName = parseDependencyRef(ref).name;\n const harnesstapDir = getHarnesstapDir();\n const lookup = () =>\n marketplaceListsPlugin({ homeRoot, harnesstapDir, marketplace, pluginName });\n let listed = lookup();\n if (listed === undefined && !options.dryRun && findKnownMarketplace(harnesstapDir, marketplace)) {\n // Registered but never fetched: read its catalog once to answer.\n const refreshed = await refreshMarketplaceCatalog(harnesstapDir, {\n name: marketplace,\n force: false,\n unattended: false,\n });\n if (refreshed.ok) listed = lookup();\n }\n if (listed === false) {\n result.failed = [\n ...(result.failed ?? []),\n { ref, reason: new PluginNotInMarketplaceError(pluginName, marketplace).message },\n ];\n } else if (result.checked === 0) {\n // Listed, but nothing declares it and nothing is installed: say so\n // instead of reporting success for a sync that checked nothing.\n result.failed = [...(result.failed ?? []), { ref, reason: undeclaredDependencyReason(ref) }];\n }\n }\n return result;\n }\n\n const homeRoot = options.homeRoot ?? resolveHomeRoot();\n const aggregated: SyncLinkedResourcesResult = {\n checked: 0,\n updated: [],\n stale: [],\n unchanged: [],\n skipped: [],\n failed: [],\n };\n for (const pin of pins) {\n if (!options.dryRun && !resolveInstallRoot(ref, homeRoot, options.claudePluginsRoot)) {\n const metadata = pin.metadata as PluginDependencyMetadata;\n const marketplace = parseDependencyRef(ref).namespace;\n registerMarketplaceDeclaredByLibrary(marketplace);\n if (!marketplaceIsResolvable(marketplace, homeRoot)) {\n aggregated.checked += 1;\n aggregated.stale.push({\n resource: pin,\n reason: unknownMarketplaceReason(marketplace),\n });\n aggregated.failed?.push({ ref, reason: unknownMarketplaceReason(marketplace) });\n continue;\n }\n try {\n await installMarketplacePinIntoCache({\n originRef: ref,\n versionConstraint: metadata.version_constraint,\n homeRoot,\n });\n } catch (error) {\n aggregated.checked += 1;\n const reason = error instanceof PluginNotInMarketplaceError\n ? error.message\n : `could not install ${ref}: ${error instanceof Error ? error.message : String(error)}`;\n aggregated.stale.push({ resource: pin, reason });\n aggregated.failed?.push({ ref, reason });\n continue;\n }\n }\n const result = await syncPluginResource(pin, { ...options, homeRoot });\n aggregated.checked += result.checked;\n aggregated.updated.push(...result.updated);\n aggregated.stale.push(...result.stale);\n aggregated.unchanged.push(...result.unchanged);\n aggregated.skipped.push(...result.skipped);\n }\n return aggregated;\n}\n","import { readFileSync } from \"node:fs\";\nimport type { Resource } from \"../types.js\";\nimport { shortenHomePath } from \"../utils/home-path.js\";\nimport { formatRelativeTimeWithAbsolute } from \"../ui/format.js\";\nimport { renderPanel } from \"../ui/panel.js\";\nimport {\n formatOriginDisplayLabel,\n formatResourceDisplayName,\n packageDirectoryDisplayPath,\n resourceHumanName,\n} from \"../ui/resource-display.js\";\nimport { renderSubheader } from \"../ui/section.js\";\nimport { isLiveLibraryRef } from \"./live-library-ref.js\";\nimport {\n type PluginContainedResource,\n packageResourceShowExtras,\n pluginResourceShowExtras,\n} from \"./plugin-resource-show.js\";\nimport {\n readResourceContentFromPathHint,\n resolveExistingResourceFilesystemPath,\n} from \"./resource-editor-path.js\";\n\nconst DEFAULT_CONTENT_LINE_LIMIT = 15;\n\nexport type ResourceShowOptions = {\n showAllFields?: boolean;\n full?: boolean;\n};\n\nfunction resourceShowExtras(\n resource: Resource,\n): ReturnType<typeof pluginResourceShowExtras> | ReturnType<typeof packageResourceShowExtras> {\n return pluginResourceShowExtras(resource) ?? packageResourceShowExtras(resource);\n}\n\nfunction resourceShowPanelRows(\n resource: Resource,\n extras: ReturnType<typeof resourceShowExtras>,\n opts?: ResourceShowOptions,\n): Array<[string, string]> {\n const rawPath =\n extras && \"install_path\" in extras && extras.install_path\n ? extras.install_path\n : packageDirectoryDisplayPath(resource.source);\n const path = rawPath ? shortenHomePath(rawPath) : rawPath;\n const originRef = resource.origin_ref\n ? shortenHomePath(resource.origin_ref)\n : resource.origin_ref;\n const panelRows: Array<[string, string]> = [\n [\"Type\", resource.type],\n [\"Name\", resourceHumanName(resource)],\n [\"Description\", resource.description || \"none\"],\n [\"Path\", path || \"none\"],\n [\"Origin\", formatOriginDisplayLabel(\n resource.origin_kind,\n originRef,\n { includeRef: resource.type !== \"plugin\" },\n )],\n [\"Updated\", formatRelativeTimeWithAbsolute(resource.updated_at)],\n ];\n if (resource.namespace) {\n panelRows.splice(2, 0, [\"Namespace\", resource.namespace]);\n }\n if (opts?.showAllFields) {\n panelRows.push(\n [\"Source\", resource.source],\n [\"Content hash\", resource.content_hash || \"none\"],\n [\"ID\", resource.id],\n [\"Created\", resource.created_at],\n [\"Metadata\", JSON.stringify(resource.metadata)],\n );\n }\n return panelRows;\n}\n\nexport function truncateResourceContent(\n content: string,\n maxLines = DEFAULT_CONTENT_LINE_LIMIT,\n): string {\n const lines = content.split(\"\\n\");\n if (lines.length <= maxLines) {\n return content;\n }\n const totalLines = lines.length;\n return [\n ...lines.slice(0, maxLines),\n `... (${totalLines} lines in content)`,\n ].join(\"\\n\");\n}\n\nfunction readContainedSkillBody(files: PluginContainedResource[]): string | undefined {\n const skillFile = files.find((file) => {\n const base = file.relative_path.split(\"/\").at(-1)?.toLowerCase();\n return base === \"skill.md\";\n });\n if (!skillFile) {\n return undefined;\n }\n try {\n return readFileSync(skillFile.path, \"utf-8\");\n } catch {\n return undefined;\n }\n}\n\nfunction readOnDiskResourceBody(resource: Resource): string | undefined {\n const filesystemPath = resolveExistingResourceFilesystemPath(resource);\n if (!filesystemPath) {\n return undefined;\n }\n try {\n return readResourceContentFromPathHint(filesystemPath).content;\n } catch {\n return undefined;\n }\n}\n\n/**\n * Live refs keep `content: \"\"` in the library. Show the on-disk file, matching\n * desktop resource detail.\n */\nfunction resolveResourceBody(\n resource: Resource,\n extras: ReturnType<typeof resourceShowExtras>,\n): string {\n if (resource.type === \"plugin\") {\n return resource.content;\n }\n if (!isLiveLibraryRef(resource) && resource.content.trim().length > 0) {\n return resource.content;\n }\n const onDisk = readOnDiskResourceBody(resource);\n if (onDisk !== undefined) {\n return onDisk;\n }\n if (extras && \"contained_resources\" in extras) {\n const fromDisk = readContainedSkillBody(extras.contained_resources);\n if (fromDisk !== undefined) {\n return fromDisk;\n }\n }\n return resource.content;\n}\n\nfunction renderContainedFileList(files: PluginContainedResource[]): string {\n if (files.length === 0) {\n return \"Nothing loaded yet.\";\n }\n return files.map((file) => file.relative_path).join(\"\\n\");\n}\n\nfunction renderResourceContent(\n resource: Resource,\n extras: ReturnType<typeof resourceShowExtras>,\n opts?: ResourceShowOptions,\n): string {\n if (resource.type === \"plugin\") {\n if (!extras || extras.contained_resources.length === 0) {\n return \"Nothing loaded yet.\";\n }\n return renderContainedFileList(extras.contained_resources);\n }\n\n const body = resolveResourceBody(resource, extras);\n const renderedBody = opts?.full ? body : truncateResourceContent(body);\n if (!extras || extras.contained_resources.length === 0) {\n return renderedBody;\n }\n const companions = extras.contained_resources.filter((file) => {\n const base = file.relative_path.split(\"/\").at(-1)?.toLowerCase();\n return base !== \"skill.md\";\n });\n if (companions.length === 0) {\n return renderedBody;\n }\n return [renderedBody, \"\", renderContainedFileList(extras.contained_resources)].join(\"\\n\");\n}\n\nexport function renderResourceShow(resource: Resource, opts?: ResourceShowOptions): string {\n const extras = resourceShowExtras(resource);\n return [\n renderPanel({\n title: [\"RESOURCE\", formatResourceDisplayName(resource)],\n rows: resourceShowPanelRows(resource, extras, opts),\n }),\n renderSubheader(\"CONTENT\"),\n renderResourceContent(resource, extras, opts),\n ].join(\"\\n\");\n}\n\nexport function printResourceShow(resource: Resource, opts?: ResourceShowOptions): void {\n console.log(renderResourceShow(resource, opts));\n}\n","import { existsSync, statSync } from \"node:fs\";\nimport { join, relative, resolve, sep } from \"node:path\";\nimport { getHarnesstapDir } from \"../db/connection.js\";\nimport { listResourcesMatchingOriginRef } from \"../models/resource.js\";\nimport { getInstalledCursorPluginInstallPath } from \"../plugins/cursor-installed.js\";\nimport type { PluginDependencyMetadata, Resource } from \"../types.js\";\nimport {\n containedFileStem,\n inferContainedFileType,\n isPackageEntryFileName,\n packageDirectoryDisplayPath,\n} from \"../ui/resource-display.js\";\nimport { listContainedFilesPage } from \"../utils/path-containment.js\";\nimport { resolveHomeRoot } from \"../utils/home-root.js\";\nimport { listVisibleMarketplaces } from \"./host-marketplaces.js\";\nimport { parseDependencyRef } from \"./plugin-dependency.js\";\nimport {\n hostPluginPullUnavailableReason,\n listHostPluginVersions,\n type HostPluginCacheVersion,\n} from \"./host-plugin-versions.js\";\nimport { resolveExistingResourceFilesystemPath } from \"./resource-editor-path.js\";\nimport { resolveInstallRoot } from \"./resource-sync.js\";\n\nexport const CONTAINED_FILES_PAGE_SIZE = 20;\n\nexport interface PluginContainedResource {\n type: string;\n name: string;\n path: string;\n relative_path: string;\n}\n\nexport interface PluginResourceShowExtras {\n install_path: string | null;\n marketplace_url: string | null;\n contained_resources: PluginContainedResource[];\n current_version: string | null;\n advertised_version: string | null;\n available_versions: HostPluginCacheVersion[];\n pull_unavailable_reason: string | null;\n}\n\nexport type PluginResourceShowOptions = {\n homeRoot?: string;\n harnesstapDir?: string;\n pathHint?: string | null;\n includeContained?: boolean;\n limit?: number;\n offset?: number;\n};\n\nexport type ContainedResourcePage = {\n contained_resources: PluginContainedResource[];\n has_more: boolean;\n};\n\nexport function pluginResourceShowExtras(\n resource: Resource,\n options?: PluginResourceShowOptions,\n): PluginResourceShowExtras | undefined {\n if (resource.type !== \"plugin\") {\n return undefined;\n }\n const originRef = resource.origin_ref || resource.name;\n const homeRoot = options?.homeRoot ?? resolveHomeRoot();\n const cursorInstall = getInstalledCursorPluginInstallPath(homeRoot, originRef);\n const preferCursorInstall = (resource.source ?? \"\").includes(\".cursor/plugins\");\n const installPath =\n preferCursorInstall && cursorInstall\n ? cursorInstall\n : resolveInstallRoot(\n originRef,\n homeRoot,\n join(homeRoot, \".claude\", \"plugins\"),\n preferCursorInstall ? { preferCanonicalPackage: false } : {},\n );\n const marketplaceName =\n (resource.metadata as PluginDependencyMetadata).marketplace_name ||\n parseDependencyRef(originRef).namespace ||\n resource.namespace?.split(\"#\")[0] ||\n \"\";\n const marketplaceUrl =\n resource.origin_kind === \"marketplace_link\" && marketplaceName\n ? (listVisibleMarketplaces(\n options?.harnesstapDir ?? getHarnesstapDir(),\n options?.homeRoot,\n ).find((entry) => entry.name === marketplaceName)?.url ?? null)\n : null;\n const versions = listHostPluginVersions(originRef, options?.homeRoot);\n const pull_unavailable_reason = hostPluginPullUnavailableReason(\n originRef,\n options?.homeRoot,\n );\n const current_version =\n versions.current_version ??\n (resource.metadata as PluginDependencyMetadata).resolved_version ??\n null;\n const includeContained = options?.includeContained !== false;\n if (!installPath) {\n return {\n install_path: null,\n marketplace_url: marketplaceUrl,\n contained_resources: [],\n current_version,\n advertised_version: versions.advertised_version,\n available_versions: versions.available_versions,\n pull_unavailable_reason,\n };\n }\n return {\n install_path: installPath,\n marketplace_url: marketplaceUrl,\n contained_resources: includeContained\n ? listContainedPluginFiles(installPath, originRef, resource.id, {\n limit: options?.limit,\n offset: options?.offset,\n }).contained_resources\n : [],\n current_version,\n advertised_version: versions.advertised_version,\n available_versions: versions.available_versions,\n pull_unavailable_reason,\n };\n}\n\nexport interface PackageResourceShowExtras {\n contained_resources: PluginContainedResource[];\n}\n\n/** Nested files for SKILL.md / plugin.json packages that are not plugin-type resources. */\nexport function packageResourceShowExtras(\n resource: Resource,\n options?: PluginResourceShowOptions,\n): PackageResourceShowExtras | undefined {\n if (resource.type === \"plugin\") {\n return undefined;\n }\n if (options?.includeContained === false) {\n return undefined;\n }\n const page = listPackageContainedFiles(resource, options);\n if (!page || page.contained_resources.length === 0) {\n return undefined;\n }\n return { contained_resources: page.contained_resources };\n}\n\nexport function listResourceContainedFiles(\n resource: Resource,\n options?: PluginResourceShowOptions,\n): ContainedResourcePage {\n if (resource.type === \"plugin\") {\n const extras = pluginResourceShowExtras(resource, {\n ...options,\n includeContained: false,\n });\n if (!extras?.install_path) {\n return { contained_resources: [], has_more: false };\n }\n return listContainedPluginFiles(\n extras.install_path,\n resource.origin_ref || resource.name,\n resource.id,\n { limit: options?.limit, offset: options?.offset },\n );\n }\n return (\n listPackageContainedFiles(resource, options) ?? {\n contained_resources: [],\n has_more: false,\n }\n );\n}\n\nconst SKIP_TREE_SEGMENTS = new Set([\".git\", \"node_modules\"]);\n\nfunction listPluginTreeRelativePaths(\n installPath: string,\n options?: { limit?: number; offset?: number },\n): { files: string[]; hasMore: boolean } {\n try {\n const page = listContainedFilesPage(installPath, {\n limit: options?.limit,\n offset: options?.offset,\n skipDirNames: SKIP_TREE_SEGMENTS,\n });\n if (options?.limit === undefined && (options?.offset ?? 0) === 0) {\n return {\n files: page.files.slice().sort((left, right) => left.localeCompare(right)),\n hasMore: page.hasMore,\n };\n }\n return page;\n } catch {\n return { files: [], hasMore: false };\n }\n}\n\nfunction inferPackageContainedFileType(relativePath: string): string {\n const base = relativePath.split(\"/\").at(-1)?.toLowerCase() ?? \"\";\n if (base === \"skill.md\") {\n return \"skill\";\n }\n if (base === \"plugin.json\") {\n return \"plugin\";\n }\n return inferContainedFileType(relativePath);\n}\n\nfunction listPackageTreeFiles(\n packageDir: string,\n options?: { limit?: number; offset?: number },\n): ContainedResourcePage {\n const page = listPluginTreeRelativePaths(packageDir, options);\n return {\n contained_resources: page.files.map((relative_path) => ({\n type: inferPackageContainedFileType(relative_path),\n name: containedFileStem(relative_path),\n path: join(packageDir, ...relative_path.split(\"/\")),\n relative_path,\n })),\n has_more: page.hasMore,\n };\n}\n\nfunction listPackageContainedFiles(\n resource: Resource,\n options?: PluginResourceShowOptions,\n): ContainedResourcePage | undefined {\n const filePath = resolveExistingResourceFilesystemPath(resource, options?.pathHint);\n if (!filePath) {\n return undefined;\n }\n const fileName = filePath.split(/[/\\\\]/).pop() ?? \"\";\n if (!isPackageEntryFileName(fileName)) {\n return undefined;\n }\n return listPackageTreeFiles(packageDirectoryDisplayPath(filePath), {\n limit: options?.limit,\n offset: options?.offset,\n });\n}\n\nfunction listContainedPluginFiles(\n installPath: string,\n originRef: string,\n pluginResourceId: string,\n options?: { limit?: number; offset?: number },\n): ContainedResourcePage {\n const libraryByRelative = new Map<string, Resource>();\n for (const row of listResourcesMatchingOriginRef(originRef)) {\n if (row.type === \"plugin\" || row.id === pluginResourceId) {\n continue;\n }\n const contained = containedFile(installPath, row.source);\n if (contained) {\n libraryByRelative.set(contained.relative_path, row);\n }\n }\n\n const treePage = listPluginTreeRelativePaths(installPath, options);\n if (treePage.files.length === 0 && !treePage.hasMore) {\n const fallback = [...libraryByRelative.entries()]\n .map(([relative_path, row]) => {\n const contained = containedFile(installPath, row.source);\n return {\n type: row.type,\n name: row.name,\n path: contained?.path ?? join(installPath, ...relative_path.split(\"/\")),\n relative_path,\n };\n })\n .sort((left, right) => left.relative_path.localeCompare(right.relative_path));\n const start = Math.max(0, options?.offset ?? 0);\n const limit = options?.limit;\n if (limit === undefined) {\n return { contained_resources: fallback.slice(start), has_more: false };\n }\n const end = start + limit;\n return {\n contained_resources: fallback.slice(start, end),\n has_more: end < fallback.length,\n };\n }\n\n return {\n contained_resources: treePage.files.map((relative_path) => {\n const path = join(installPath, ...relative_path.split(\"/\"));\n const row = libraryByRelative.get(relative_path);\n if (row) {\n return {\n type: row.type,\n name: row.name,\n path,\n relative_path,\n };\n }\n return {\n type: inferContainedFileType(relative_path),\n name: containedFileStem(relative_path),\n path,\n relative_path,\n };\n }),\n has_more: treePage.hasMore,\n };\n}\n\nfunction containedFile(\n installPath: string,\n source: string,\n): { path: string; relative_path: string } | null {\n if (!source.trim()) {\n return null;\n }\n const absolute = resolve(installPath, source);\n const root = resolve(installPath);\n const rel = relative(root, absolute);\n if (!rel || rel.startsWith(\"..\")) {\n return null;\n }\n if (!existsSync(absolute)) {\n return null;\n }\n try {\n if (!statSync(absolute).isFile()) {\n return null;\n }\n } catch {\n return null;\n }\n return {\n path: absolute,\n relative_path: rel.split(sep).join(\"/\"),\n };\n}\n","import { existsSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport type {\n PluginMarketplaceEntry,\n PluginMarketplacePlatform,\n} from \"../config/settings.js\";\nimport { resolveHomeRoot } from \"../utils/home-root.js\";\nimport { readJsonFile } from \"../plugins/claude-installed.js\";\nimport { readMarketplaceManifest } from \"./marketplace-catalog.js\";\nimport {\n listMarketplaces,\n normalizeMarketplaceUrl,\n} from \"./marketplace-registry.js\";\nimport { builtinMarketplaceEntry } from \"./builtin-marketplaces.js\";\nimport { resolveMarketplaceRoot } from \"./host-plugin-source.js\";\n\nexport interface VisibleMarketplaceEntry extends PluginMarketplaceEntry {\n managed: boolean;\n contentRoot?: string;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction stripTrailingSlash(url: string): string {\n return url.replace(/\\/+$/, \"\");\n}\n\nfunction githubMarketplaceUrl(repo: string): string {\n const trimmed = repo.trim();\n if (trimmed.includes(\"://\")) {\n return stripTrailingSlash(normalizeMarketplaceUrl(trimmed));\n }\n return stripTrailingSlash(normalizeMarketplaceUrl(`https://github.com/${trimmed}`));\n}\n\nfunction mergeMarketplacePlatforms(\n left: PluginMarketplacePlatform[],\n right: PluginMarketplacePlatform[],\n): PluginMarketplacePlatform[] {\n const seen = new Set<PluginMarketplacePlatform>();\n const merged: PluginMarketplacePlatform[] = [];\n for (const platform of [...left, ...right]) {\n if (seen.has(platform)) continue;\n seen.add(platform);\n merged.push(platform);\n }\n return merged;\n}\n\nfunction repositoryUrlFromManifest(root: string): string | undefined {\n const raw = readMarketplaceManifest(root);\n if (!isRecord(raw)) return undefined;\n const repository = raw.repository;\n if (typeof repository === \"string\" && repository.trim()) {\n return stripTrailingSlash(normalizeMarketplaceUrl(repository));\n }\n if (isRecord(repository) && typeof repository.url === \"string\" && repository.url.trim()) {\n return stripTrailingSlash(normalizeMarketplaceUrl(repository.url));\n }\n return undefined;\n}\n\nfunction discoverClaudeMarketplaces(homeRoot: string): VisibleMarketplaceEntry[] {\n const knownPath = join(homeRoot, \".claude\", \"plugins\", \"known_marketplaces.json\");\n const known = readJsonFile<Record<string, unknown>>(knownPath);\n if (!known || !isRecord(known)) return [];\n\n const discovered: VisibleMarketplaceEntry[] = [];\n for (const [name, value] of Object.entries(known)) {\n const trimmedName = name.trim();\n if (!trimmedName || !isRecord(value)) continue;\n\n const source = isRecord(value.source) ? value.source : {};\n const kind = typeof source.source === \"string\" ? source.source : \"\";\n const installLocation =\n typeof value.installLocation === \"string\" && value.installLocation.trim()\n ? value.installLocation.trim()\n : undefined;\n const contentRoot =\n installLocation && existsSync(installLocation) ? installLocation : undefined;\n\n let url = \"\";\n switch (kind) {\n case \"github\": {\n const repo = typeof source.repo === \"string\" ? source.repo : \"\";\n if (!repo.trim()) continue;\n url = githubMarketplaceUrl(repo);\n break;\n }\n case \"directory\": {\n const path =\n typeof source.path === \"string\" && source.path.trim()\n ? source.path.trim()\n : (installLocation ?? \"\");\n if (!path) continue;\n url = (contentRoot ? repositoryUrlFromManifest(contentRoot) : undefined) ?? path;\n break;\n }\n default:\n continue;\n }\n\n const platforms: PluginMarketplacePlatform[] = [\"claude-code\"];\n discovered.push({\n name: trimmedName,\n url,\n platforms,\n managed: false,\n ...(contentRoot ? { contentRoot } : {}),\n });\n }\n return discovered;\n}\n\nexport function listVisibleMarketplaces(\n harnesstapDir: string,\n homeRoot: string = resolveHomeRoot(),\n): VisibleMarketplaceEntry[] {\n const registered: VisibleMarketplaceEntry[] = listMarketplaces(harnesstapDir).map((entry) => ({\n ...entry,\n managed: true,\n }));\n const seenNames = new Set(registered.map((entry) => entry.name));\n const seenUrls = new Set(\n registered.map((entry) => stripTrailingSlash(normalizeMarketplaceUrl(entry.url))),\n );\n\n const host: VisibleMarketplaceEntry[] = [];\n for (const entry of discoverClaudeMarketplaces(homeRoot)) {\n const urlKey = stripTrailingSlash(normalizeMarketplaceUrl(entry.url));\n if (seenNames.has(entry.name) || seenUrls.has(urlKey)) continue;\n seenNames.add(entry.name);\n seenUrls.add(urlKey);\n host.push(entry);\n }\n\n const listed = [...registered, ...host];\n const builtin = builtinMarketplaceEntry();\n const existing = listed.find((entry) => entry.name === builtin.name);\n const contentRoot = resolveMarketplaceRoot(homeRoot, builtin.name);\n if (existing) {\n existing.platforms = mergeMarketplacePlatforms(builtin.platforms, existing.platforms);\n if (!existing.url) {\n existing.url = builtin.url;\n }\n if (contentRoot && !existing.contentRoot) {\n existing.contentRoot = contentRoot;\n }\n } else {\n listed.push({\n ...builtin,\n managed: false,\n ...(contentRoot ? { contentRoot } : {}),\n });\n }\n\n return listed;\n}\n\nexport function toMarketplaceListEntry(\n entry: VisibleMarketplaceEntry,\n): PluginMarketplaceEntry & { managed: boolean } {\n return {\n name: entry.name,\n url: entry.url,\n platforms: entry.platforms,\n managed: entry.managed,\n ...(entry.trackedBranches && entry.trackedBranches.length > 0\n ? { trackedBranches: entry.trackedBranches }\n : {}),\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOO,SAAS,uBAAuB,QAAQ,IAAY;AACzD,SAAO;AAAA,IACL,KAAK;AAAA,IACL,QAAQ;AAAA,IACR;AAAA,IACA,OAAO,CAAC,UAAU,GAAG,MAAM,aAAa,KAAK;AAAA,EAC/C;AACF;AAEO,SAAS,2BAA2B,MAAmC;AAC5E,MAAI,CAAC,MAAM;AACT,WAAO;AAAA,EACT;AACA,SAAO,SAAS;AAClB;AAEO,SAAS,wBACd,gBACA,UACmD;AACnD,MAAI,kBAAkB,YAAY,mBAAmB,UAAU;AAC7D,WAAO;AAAA,EACT;AACA,QAAM,OAAO,kBAAkB;AAC/B,MAAI,CAAC,MAAM;AACT,WAAO;AAAA,EACT;AACA,QAAM,aAAa,SAAS,eAAe,WAAW;AACtD,MAAI,CAAC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C,SAAO;AAAA,IACL,YAAY;AAAA,MACV,OAAO,CAAC,YAAY,0BAA0B,QAAQ,CAAC;AAAA,MACvD,MAAM,sBAAsB,UAAU,QAAQ,IAAI;AAAA,IACpD,CAAC;AAAA,IACD,gBAAgB,SAAS;AAAA,IACzB,sBAAsB,UAAU,QAAQ,IAAI;AAAA,EAC9C,EAAE,KAAK,IAAI;AACb;AAEO,SAAS,kBAAkB,UAAoB,MAAkC;AACtF,UAAQ,IAAI,mBAAmB,UAAU,IAAI,CAAC;AAChD;","names":["homeRoot","existsSync","join","join","join","existsSync"]}
|
|
@@ -6,15 +6,15 @@ import {
|
|
|
6
6
|
loadProjectPolicy,
|
|
7
7
|
matchPolicyPattern,
|
|
8
8
|
resolutionKey
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-26QGX47N.js";
|
|
10
10
|
import {
|
|
11
11
|
parseJsonc
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-CWXCZBJR.js";
|
|
13
13
|
import {
|
|
14
14
|
formatHtCommand,
|
|
15
15
|
getHarnesstapDir,
|
|
16
16
|
quoteCliArg
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-MTCCUYBZ.js";
|
|
18
18
|
|
|
19
19
|
// src/services/executable-trust.ts
|
|
20
20
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
@@ -576,4 +576,4 @@ export {
|
|
|
576
576
|
recommendRefs,
|
|
577
577
|
pendingRefs
|
|
578
578
|
};
|
|
579
|
-
//# sourceMappingURL=chunk-
|
|
579
|
+
//# sourceMappingURL=chunk-ZZQDJGWX.js.map
|
|
@@ -1,64 +1,60 @@
|
|
|
1
1
|
import {
|
|
2
2
|
handleApplyCommand
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-U5Y6WKKT.js";
|
|
4
4
|
import {
|
|
5
5
|
addApplyCommandOptions,
|
|
6
6
|
resolveProjectCompileTargets
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-ZT7ANP3H.js";
|
|
8
|
+
import "./chunk-FLYQEB6D.js";
|
|
9
9
|
import {
|
|
10
10
|
resolveUserPath
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-XUJKZQZA.js";
|
|
11
|
+
} from "./chunk-CUOEQQFI.js";
|
|
12
|
+
import "./chunk-ZWB6YXVQ.js";
|
|
13
|
+
import "./chunk-KFIRABC7.js";
|
|
14
|
+
import "./chunk-ZUXFPAVX.js";
|
|
15
|
+
import "./chunk-262KZULH.js";
|
|
17
16
|
import "./chunk-CHQGE2HF.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-4QCGTUTM.js";
|
|
18
|
+
import "./chunk-SMLO5YPI.js";
|
|
19
|
+
import "./chunk-RM7VP6ID.js";
|
|
20
|
+
import "./chunk-Y3HJ2F2W.js";
|
|
21
|
+
import "./chunk-ZREU2UHM.js";
|
|
22
22
|
import "./chunk-VZQG2JDV.js";
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-JEC5PWNH.js";
|
|
24
|
+
import "./chunk-CKJIS2FM.js";
|
|
25
|
+
import "./chunk-I4DKV63E.js";
|
|
26
|
+
import "./chunk-27IPOVKQ.js";
|
|
27
27
|
import "./chunk-KRI4R7EM.js";
|
|
28
|
-
import "./chunk-XGTTOO4R.js";
|
|
29
28
|
import "./chunk-37E5M4JX.js";
|
|
30
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-7IBFH736.js";
|
|
31
30
|
import "./chunk-3FIWOI3H.js";
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-BPWFQKI5.js";
|
|
31
|
+
import "./chunk-LX6PMOOC.js";
|
|
32
|
+
import "./chunk-NXILQDJG.js";
|
|
33
|
+
import "./chunk-NWOYPK2O.js";
|
|
34
|
+
import "./chunk-XPONNOBR.js";
|
|
37
35
|
import "./chunk-I6XFZLTJ.js";
|
|
38
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-NIFKCS7J.js";
|
|
37
|
+
import "./chunk-ZZQDJGWX.js";
|
|
39
38
|
import {
|
|
40
39
|
parseOutputFormat,
|
|
41
40
|
printJson
|
|
42
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-4E3G4H5B.js";
|
|
43
42
|
import {
|
|
44
43
|
fail,
|
|
45
44
|
failCaught,
|
|
46
45
|
formatCommand
|
|
47
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-QHCGA6LC.js";
|
|
48
47
|
import {
|
|
49
48
|
TargetFlagError,
|
|
50
49
|
previewApmTargets
|
|
51
|
-
} from "./chunk-
|
|
52
|
-
import "./chunk-
|
|
53
|
-
import "./chunk-
|
|
54
|
-
import "./chunk-
|
|
50
|
+
} from "./chunk-26QGX47N.js";
|
|
51
|
+
import "./chunk-LGWFLVZQ.js";
|
|
52
|
+
import "./chunk-MSKTWYHG.js";
|
|
53
|
+
import "./chunk-CWXCZBJR.js";
|
|
54
|
+
import "./chunk-T2JBSRGG.js";
|
|
55
55
|
import {
|
|
56
56
|
ui
|
|
57
|
-
} from "./chunk-
|
|
58
|
-
import "./chunk-DF4Z7LAD.js";
|
|
59
|
-
import "./chunk-G6WKY2W4.js";
|
|
60
|
-
import "./chunk-73OJQTBW.js";
|
|
61
|
-
import "./chunk-WG5A6EAU.js";
|
|
57
|
+
} from "./chunk-MTCCUYBZ.js";
|
|
62
58
|
|
|
63
59
|
// src/cli/commands/compile.ts
|
|
64
60
|
import { Option } from "commander";
|
|
@@ -145,4 +141,4 @@ export {
|
|
|
145
141
|
registerCompileCommand,
|
|
146
142
|
registerTargetsCommand
|
|
147
143
|
};
|
|
148
|
-
//# sourceMappingURL=compile-
|
|
144
|
+
//# sourceMappingURL=compile-IMJHVXQO.js.map
|