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
|
@@ -2,28 +2,24 @@ import "./chunk-I6XFZLTJ.js";
|
|
|
2
2
|
import {
|
|
3
3
|
parseOutputFormat,
|
|
4
4
|
printJson
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-4E3G4H5B.js";
|
|
6
6
|
import {
|
|
7
7
|
fail,
|
|
8
8
|
formatCommand,
|
|
9
9
|
isVerboseMode
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QHCGA6LC.js";
|
|
11
11
|
import {
|
|
12
12
|
PackError,
|
|
13
13
|
packProject
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-26QGX47N.js";
|
|
15
|
+
import "./chunk-LGWFLVZQ.js";
|
|
16
|
+
import "./chunk-MSKTWYHG.js";
|
|
17
|
+
import "./chunk-CWXCZBJR.js";
|
|
18
|
+
import "./chunk-T2JBSRGG.js";
|
|
18
19
|
import {
|
|
20
|
+
formatCount,
|
|
19
21
|
ui
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-DF4Z7LAD.js";
|
|
22
|
-
import "./chunk-G6WKY2W4.js";
|
|
23
|
-
import "./chunk-73OJQTBW.js";
|
|
24
|
-
import {
|
|
25
|
-
formatCount
|
|
26
|
-
} from "./chunk-WG5A6EAU.js";
|
|
22
|
+
} from "./chunk-MTCCUYBZ.js";
|
|
27
23
|
|
|
28
24
|
// src/cli/commands/pack.ts
|
|
29
25
|
import { resolve } from "path";
|
|
@@ -90,4 +86,4 @@ export {
|
|
|
90
86
|
handlePackCommand,
|
|
91
87
|
registerPackCommand
|
|
92
88
|
};
|
|
93
|
-
//# sourceMappingURL=pack-
|
|
89
|
+
//# sourceMappingURL=pack-NTECD3BZ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/cli/commands/pack.ts"],"sourcesContent":["import type { Command } from \"commander\";\nimport { resolve } from \"node:path\";\nimport { packProject, PackError } from \"../../services/apm-pack.js\";\nimport { parseOutputFormat, printJson } from \"../../utils/output-format.js\";\nimport { ui } from \"../../ui/index.js\";\nimport { formatCount } from \"../formatting.js\";\nimport {\n fail,\n formatCommand,\n isVerboseMode,\n} from \"../shared.js\";\n\nexport interface PackCommandOpts {\n project?: string;\n output?: string;\n archive?: boolean;\n dryRun?: boolean;\n verbose?: boolean;\n format?: string;\n}\n\nexport function handlePackCommand(opts: PackCommandOpts): void {\n const format = parseOutputFormat(opts.format);\n const verbose = Boolean(opts.verbose) || isVerboseMode();\n\n try {\n const result = packProject({\n projectRoot: resolve(opts.project ?? \".\"),\n outputDir: opts.output,\n archive: opts.archive,\n dryRun: opts.dryRun,\n verbose,\n });\n\n if (format === \"json\") {\n printJson({\n name: result.name,\n version: result.version,\n output: result.outputPath,\n archive: result.archive,\n dry_run: result.dryRun,\n file_count: result.fileCount,\n files: result.files,\n warnings: result.warnings,\n });\n return;\n }\n\n for (const warning of result.warnings) {\n ui.warn(warning);\n }\n if (verbose) {\n for (const file of result.files) {\n const remap = file.remappedFrom ? ` ← ${file.remappedFrom}` : \"\";\n console.log(` ${file.path}${remap}`);\n }\n }\n\n const dest = result.dryRun ? `${result.outputPath} (dry run)` : result.outputPath;\n ui.success(`Packed ${formatCount(result.fileCount, \"file\")} -> ${dest}`);\n console.log(\n ui.theme.muted(\n \"Plugin bundle ready: contains plugin.json plus plugin-native directories (agents/, skills/, commands/, hooks/) and an embedded apm.lock.yaml for install-time integrity verification.\",\n ),\n );\n ui.info(`Share with: ${formatCommand([\"apply\", result.outputPath])}`);\n } catch (error) {\n process.exitCode = 1;\n if (error instanceof PackError) {\n fail(error.message, {\n hints: [formatCommand(\"config init\"), formatCommand(\"apply\")],\n });\n return;\n }\n fail(error instanceof Error ? error.message : String(error));\n }\n}\n\nexport function registerPackCommand(root: Command): void {\n root\n .command(\"pack\")\n .description(\n \"Pack an apm.yml project into an Agent Plugins 1.0 bundle (plugin.json + primitives + apm.lock.yaml)\",\n )\n .option(\"--project <path>\", \"Project directory\", \".\")\n .option(\"-o, --output <dir>\", \"Bundle output directory\", \"build\")\n .option(\"--archive\", \"Write a .zip archive instead of a directory\")\n .option(\"--dry-run\", \"Print what would be packed without writing\")\n .option(\"--verbose\", \"List every packed file and remapping\")\n .option(\"--format <mode>\", \"Output format: human or json\", \"human\")\n .action((opts: PackCommandOpts) => {\n handlePackCommand(opts);\n });\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/cli/commands/pack.ts"],"sourcesContent":["import type { Command } from \"commander\";\nimport { resolve } from \"node:path\";\nimport { packProject, PackError } from \"../../services/apm-pack.js\";\nimport { parseOutputFormat, printJson } from \"../../utils/output-format.js\";\nimport { ui } from \"../../ui/index.js\";\nimport { formatCount } from \"../formatting.js\";\nimport {\n fail,\n formatCommand,\n isVerboseMode,\n} from \"../shared.js\";\n\nexport interface PackCommandOpts {\n project?: string;\n output?: string;\n archive?: boolean;\n dryRun?: boolean;\n verbose?: boolean;\n format?: string;\n}\n\nexport function handlePackCommand(opts: PackCommandOpts): void {\n const format = parseOutputFormat(opts.format);\n const verbose = Boolean(opts.verbose) || isVerboseMode();\n\n try {\n const result = packProject({\n projectRoot: resolve(opts.project ?? \".\"),\n outputDir: opts.output,\n archive: opts.archive,\n dryRun: opts.dryRun,\n verbose,\n });\n\n if (format === \"json\") {\n printJson({\n name: result.name,\n version: result.version,\n output: result.outputPath,\n archive: result.archive,\n dry_run: result.dryRun,\n file_count: result.fileCount,\n files: result.files,\n warnings: result.warnings,\n });\n return;\n }\n\n for (const warning of result.warnings) {\n ui.warn(warning);\n }\n if (verbose) {\n for (const file of result.files) {\n const remap = file.remappedFrom ? ` ← ${file.remappedFrom}` : \"\";\n console.log(` ${file.path}${remap}`);\n }\n }\n\n const dest = result.dryRun ? `${result.outputPath} (dry run)` : result.outputPath;\n ui.success(`Packed ${formatCount(result.fileCount, \"file\")} -> ${dest}`);\n console.log(\n ui.theme.muted(\n \"Plugin bundle ready: contains plugin.json plus plugin-native directories (agents/, skills/, commands/, hooks/) and an embedded apm.lock.yaml for install-time integrity verification.\",\n ),\n );\n ui.info(`Share with: ${formatCommand([\"apply\", result.outputPath])}`);\n } catch (error) {\n process.exitCode = 1;\n if (error instanceof PackError) {\n fail(error.message, {\n hints: [formatCommand(\"config init\"), formatCommand(\"apply\")],\n });\n return;\n }\n fail(error instanceof Error ? error.message : String(error));\n }\n}\n\nexport function registerPackCommand(root: Command): void {\n root\n .command(\"pack\")\n .description(\n \"Pack an apm.yml project into an Agent Plugins 1.0 bundle (plugin.json + primitives + apm.lock.yaml)\",\n )\n .option(\"--project <path>\", \"Project directory\", \".\")\n .option(\"-o, --output <dir>\", \"Bundle output directory\", \"build\")\n .option(\"--archive\", \"Write a .zip archive instead of a directory\")\n .option(\"--dry-run\", \"Print what would be packed without writing\")\n .option(\"--verbose\", \"List every packed file and remapping\")\n .option(\"--format <mode>\", \"Output format: human or json\", \"human\")\n .action((opts: PackCommandOpts) => {\n handlePackCommand(opts);\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,eAAe;AAoBjB,SAAS,kBAAkB,MAA6B;AAC7D,QAAM,SAAS,kBAAkB,KAAK,MAAM;AAC5C,QAAM,UAAU,QAAQ,KAAK,OAAO,KAAK,cAAc;AAEvD,MAAI;AACF,UAAM,SAAS,YAAY;AAAA,MACzB,aAAa,QAAQ,KAAK,WAAW,GAAG;AAAA,MACxC,WAAW,KAAK;AAAA,MAChB,SAAS,KAAK;AAAA,MACd,QAAQ,KAAK;AAAA,MACb;AAAA,IACF,CAAC;AAED,QAAI,WAAW,QAAQ;AACrB,gBAAU;AAAA,QACR,MAAM,OAAO;AAAA,QACb,SAAS,OAAO;AAAA,QAChB,QAAQ,OAAO;AAAA,QACf,SAAS,OAAO;AAAA,QAChB,SAAS,OAAO;AAAA,QAChB,YAAY,OAAO;AAAA,QACnB,OAAO,OAAO;AAAA,QACd,UAAU,OAAO;AAAA,MACnB,CAAC;AACD;AAAA,IACF;AAEA,eAAW,WAAW,OAAO,UAAU;AACrC,SAAG,KAAK,OAAO;AAAA,IACjB;AACA,QAAI,SAAS;AACX,iBAAW,QAAQ,OAAO,OAAO;AAC/B,cAAM,QAAQ,KAAK,eAAe,YAAO,KAAK,YAAY,KAAK;AAC/D,gBAAQ,IAAI,KAAK,KAAK,IAAI,GAAG,KAAK,EAAE;AAAA,MACtC;AAAA,IACF;AAEA,UAAM,OAAO,OAAO,SAAS,GAAG,OAAO,UAAU,eAAe,OAAO;AACvE,OAAG,QAAQ,UAAU,YAAY,OAAO,WAAW,MAAM,CAAC,OAAO,IAAI,EAAE;AACvE,YAAQ;AAAA,MACN,GAAG,MAAM;AAAA,QACP;AAAA,MACF;AAAA,IACF;AACA,OAAG,KAAK,eAAe,cAAc,CAAC,SAAS,OAAO,UAAU,CAAC,CAAC,EAAE;AAAA,EACtE,SAAS,OAAO;AACd,YAAQ,WAAW;AACnB,QAAI,iBAAiB,WAAW;AAC9B,WAAK,MAAM,SAAS;AAAA,QAClB,OAAO,CAAC,cAAc,aAAa,GAAG,cAAc,OAAO,CAAC;AAAA,MAC9D,CAAC;AACD;AAAA,IACF;AACA,SAAK,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,CAAC;AAAA,EAC7D;AACF;AAEO,SAAS,oBAAoB,MAAqB;AACvD,OACG,QAAQ,MAAM,EACd;AAAA,IACC;AAAA,EACF,EACC,OAAO,oBAAoB,qBAAqB,GAAG,EACnD,OAAO,sBAAsB,2BAA2B,OAAO,EAC/D,OAAO,aAAa,6CAA6C,EACjE,OAAO,aAAa,4CAA4C,EAChE,OAAO,aAAa,sCAAsC,EAC1D,OAAO,mBAAmB,gCAAgC,OAAO,EACjE,OAAO,CAAC,SAA0B;AACjC,sBAAkB,IAAI;AAAA,EACxB,CAAC;AACL;","names":[]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import {
|
|
2
|
+
handleProjectApplyCommand,
|
|
3
|
+
registerDeprecatedLayerAlias,
|
|
4
|
+
registerPluginCommands
|
|
5
|
+
} from "./chunk-ZT7ANP3H.js";
|
|
6
|
+
import "./chunk-FLYQEB6D.js";
|
|
7
|
+
import "./chunk-CUOEQQFI.js";
|
|
8
|
+
import "./chunk-ZWB6YXVQ.js";
|
|
9
|
+
import "./chunk-KFIRABC7.js";
|
|
10
|
+
import "./chunk-ZUXFPAVX.js";
|
|
11
|
+
import "./chunk-262KZULH.js";
|
|
12
|
+
import "./chunk-CHQGE2HF.js";
|
|
13
|
+
import "./chunk-4QCGTUTM.js";
|
|
14
|
+
import "./chunk-SMLO5YPI.js";
|
|
15
|
+
import "./chunk-RM7VP6ID.js";
|
|
16
|
+
import "./chunk-Y3HJ2F2W.js";
|
|
17
|
+
import "./chunk-ZREU2UHM.js";
|
|
18
|
+
import "./chunk-VZQG2JDV.js";
|
|
19
|
+
import "./chunk-JEC5PWNH.js";
|
|
20
|
+
import "./chunk-CKJIS2FM.js";
|
|
21
|
+
import "./chunk-I4DKV63E.js";
|
|
22
|
+
import "./chunk-27IPOVKQ.js";
|
|
23
|
+
import "./chunk-KRI4R7EM.js";
|
|
24
|
+
import "./chunk-37E5M4JX.js";
|
|
25
|
+
import "./chunk-7IBFH736.js";
|
|
26
|
+
import "./chunk-3FIWOI3H.js";
|
|
27
|
+
import "./chunk-LX6PMOOC.js";
|
|
28
|
+
import "./chunk-NXILQDJG.js";
|
|
29
|
+
import "./chunk-NWOYPK2O.js";
|
|
30
|
+
import "./chunk-XPONNOBR.js";
|
|
31
|
+
import "./chunk-I6XFZLTJ.js";
|
|
32
|
+
import "./chunk-NIFKCS7J.js";
|
|
33
|
+
import "./chunk-ZZQDJGWX.js";
|
|
34
|
+
import "./chunk-4E3G4H5B.js";
|
|
35
|
+
import "./chunk-QHCGA6LC.js";
|
|
36
|
+
import "./chunk-26QGX47N.js";
|
|
37
|
+
import "./chunk-LGWFLVZQ.js";
|
|
38
|
+
import "./chunk-MSKTWYHG.js";
|
|
39
|
+
import "./chunk-CWXCZBJR.js";
|
|
40
|
+
import "./chunk-T2JBSRGG.js";
|
|
41
|
+
import "./chunk-MTCCUYBZ.js";
|
|
42
|
+
export {
|
|
43
|
+
handleProjectApplyCommand,
|
|
44
|
+
registerDeprecatedLayerAlias,
|
|
45
|
+
registerPluginCommands
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=plugin-T2YFCYIO.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createPluginFromProject,
|
|
3
|
+
previewPluginFromProject
|
|
4
|
+
} from "./chunk-NIFKCS7J.js";
|
|
5
|
+
import "./chunk-26QGX47N.js";
|
|
6
|
+
import "./chunk-LGWFLVZQ.js";
|
|
7
|
+
import "./chunk-MSKTWYHG.js";
|
|
8
|
+
import "./chunk-CWXCZBJR.js";
|
|
9
|
+
import "./chunk-T2JBSRGG.js";
|
|
10
|
+
import "./chunk-MTCCUYBZ.js";
|
|
11
|
+
export {
|
|
12
|
+
createPluginFromProject,
|
|
13
|
+
previewPluginFromProject
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=plugin-from-project-FGX5AHW6.js.map
|
|
@@ -5,24 +5,21 @@ import {
|
|
|
5
5
|
exactGrantMatch,
|
|
6
6
|
execStatusFromDecisions,
|
|
7
7
|
installedTrustReports
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZZQDJGWX.js";
|
|
9
9
|
import {
|
|
10
10
|
parseOutputFormat,
|
|
11
11
|
printJson
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-4E3G4H5B.js";
|
|
13
13
|
import {
|
|
14
14
|
readLockfile
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-26QGX47N.js";
|
|
16
|
+
import "./chunk-LGWFLVZQ.js";
|
|
17
|
+
import "./chunk-MSKTWYHG.js";
|
|
18
|
+
import "./chunk-CWXCZBJR.js";
|
|
19
|
+
import "./chunk-T2JBSRGG.js";
|
|
19
20
|
import {
|
|
20
21
|
ui
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-DF4Z7LAD.js";
|
|
23
|
-
import "./chunk-G6WKY2W4.js";
|
|
24
|
-
import "./chunk-73OJQTBW.js";
|
|
25
|
-
import "./chunk-WG5A6EAU.js";
|
|
22
|
+
} from "./chunk-MTCCUYBZ.js";
|
|
26
23
|
|
|
27
24
|
// src/cli/commands/policy.ts
|
|
28
25
|
import { resolve } from "path";
|
|
@@ -101,4 +98,4 @@ export {
|
|
|
101
98
|
handlePolicyExplainCommand,
|
|
102
99
|
registerPolicyCommands
|
|
103
100
|
};
|
|
104
|
-
//# sourceMappingURL=policy-
|
|
101
|
+
//# sourceMappingURL=policy-3FOWB4GR.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/cli/commands/policy.ts"],"sourcesContent":["import type { Command } from \"commander\";\nimport { resolve } from \"node:path\";\nimport {\n buildExecutableTrustContext,\n evaluateExecutableType,\n exactGrantMatch,\n EXEC_TYPES,\n execStatusFromDecisions,\n installedTrustReports,\n type PackageTrustReport,\n} from \"../../services/executable-trust.js\";\nimport { readLockfile } from \"../../services/lockfile.js\";\nimport { parseOutputFormat, printJson } from \"../../utils/output-format.js\";\nimport { ui } from \"../../ui/index.js\";\n\nexport interface PolicyExplainOpts {\n project?: string;\n format?: string;\n}\n\nfunction shadowedLine(decision: PackageTrustReport[\"decisions\"][number]): string {\n if (decision.shadowed.length === 0) {\n return \"none\";\n }\n return decision.shadowed\n .map((entry) => `${entry.layer} (${entry.outcome})`)\n .join(\", \");\n}\n\nfunction printExplain(report: PackageTrustReport, optedIn: boolean): void {\n if (!optedIn) {\n ui.info(`${report.ref} gate off`);\n return;\n }\n ui.info(`${report.ref} ${report.execStatus}`);\n const types = report.gatedTypes.length > 0 ? report.gatedTypes : EXEC_TYPES;\n for (const type of types) {\n const decision = report.decisions.find((entry) => entry.type === type);\n if (!decision) continue;\n ui.info(\n ` ${type} ${decision.outcome} layer ${decision.layer} shadowed ${shadowedLine(decision)}`,\n );\n }\n}\n\nfunction reportForRef(\n packageRef: string,\n installed: PackageTrustReport[],\n context: ReturnType<typeof buildExecutableTrustContext>,\n): PackageTrustReport {\n const existing = installed.find((entry) =>\n exactGrantMatch(packageRef, [entry.ref, entry.name, ...entry.identities]),\n );\n if (existing) {\n return existing;\n }\n const identities = [packageRef];\n const decisions = EXEC_TYPES.map((type) => evaluateExecutableType(context, identities, type));\n return {\n ref: packageRef,\n name: packageRef,\n version: \"\",\n identities,\n gatedTypes: [...EXEC_TYPES],\n decisions,\n execStatus: execStatusFromDecisions([...EXEC_TYPES], decisions),\n };\n}\n\nexport function handlePolicyExplainCommand(\n packageRef: string,\n opts: PolicyExplainOpts,\n): void {\n const format = parseOutputFormat(opts.format);\n const projectRoot = resolve(opts.project ?? \".\");\n const context = buildExecutableTrustContext({ projectRoot });\n const lock = readLockfile(projectRoot);\n const installed = installedTrustReports(context, { ...(lock ? { lock } : {}) });\n const report = reportForRef(packageRef, installed, context);\n\n if (format === \"json\") {\n printJson({\n ref: report.ref,\n name: report.name,\n version: report.version,\n exec_status: report.execStatus,\n opted_in: context.optedIn,\n deciding_layer: report.decisions[0]?.layer,\n decisions: report.decisions,\n warnings: context.warnings,\n });\n return;\n }\n for (const warning of context.warnings) {\n ui.warn(warning);\n }\n printExplain(report, context.optedIn);\n}\n\nexport function registerPolicyCommands(root: Command): void {\n const policy = root\n .command(\"policy\")\n .description(\"Inspect executable-trust and apm-policy.yml decisions\");\n\n policy\n .command(\"explain\")\n .description(\"Print the effective executable-trust decision for a package\")\n .argument(\"<PACKAGE_REF>\", \"Package to explain (owner/repo)\")\n .option(\"--project <path>\", \"Project directory\", \".\")\n .option(\"--format <mode>\", \"Output format: human or json\", \"human\")\n .action((ref: string, explainOpts: PolicyExplainOpts) => {\n handlePolicyExplainCommand(ref, explainOpts);\n });\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/cli/commands/policy.ts"],"sourcesContent":["import type { Command } from \"commander\";\nimport { resolve } from \"node:path\";\nimport {\n buildExecutableTrustContext,\n evaluateExecutableType,\n exactGrantMatch,\n EXEC_TYPES,\n execStatusFromDecisions,\n installedTrustReports,\n type PackageTrustReport,\n} from \"../../services/executable-trust.js\";\nimport { readLockfile } from \"../../services/lockfile.js\";\nimport { parseOutputFormat, printJson } from \"../../utils/output-format.js\";\nimport { ui } from \"../../ui/index.js\";\n\nexport interface PolicyExplainOpts {\n project?: string;\n format?: string;\n}\n\nfunction shadowedLine(decision: PackageTrustReport[\"decisions\"][number]): string {\n if (decision.shadowed.length === 0) {\n return \"none\";\n }\n return decision.shadowed\n .map((entry) => `${entry.layer} (${entry.outcome})`)\n .join(\", \");\n}\n\nfunction printExplain(report: PackageTrustReport, optedIn: boolean): void {\n if (!optedIn) {\n ui.info(`${report.ref} gate off`);\n return;\n }\n ui.info(`${report.ref} ${report.execStatus}`);\n const types = report.gatedTypes.length > 0 ? report.gatedTypes : EXEC_TYPES;\n for (const type of types) {\n const decision = report.decisions.find((entry) => entry.type === type);\n if (!decision) continue;\n ui.info(\n ` ${type} ${decision.outcome} layer ${decision.layer} shadowed ${shadowedLine(decision)}`,\n );\n }\n}\n\nfunction reportForRef(\n packageRef: string,\n installed: PackageTrustReport[],\n context: ReturnType<typeof buildExecutableTrustContext>,\n): PackageTrustReport {\n const existing = installed.find((entry) =>\n exactGrantMatch(packageRef, [entry.ref, entry.name, ...entry.identities]),\n );\n if (existing) {\n return existing;\n }\n const identities = [packageRef];\n const decisions = EXEC_TYPES.map((type) => evaluateExecutableType(context, identities, type));\n return {\n ref: packageRef,\n name: packageRef,\n version: \"\",\n identities,\n gatedTypes: [...EXEC_TYPES],\n decisions,\n execStatus: execStatusFromDecisions([...EXEC_TYPES], decisions),\n };\n}\n\nexport function handlePolicyExplainCommand(\n packageRef: string,\n opts: PolicyExplainOpts,\n): void {\n const format = parseOutputFormat(opts.format);\n const projectRoot = resolve(opts.project ?? \".\");\n const context = buildExecutableTrustContext({ projectRoot });\n const lock = readLockfile(projectRoot);\n const installed = installedTrustReports(context, { ...(lock ? { lock } : {}) });\n const report = reportForRef(packageRef, installed, context);\n\n if (format === \"json\") {\n printJson({\n ref: report.ref,\n name: report.name,\n version: report.version,\n exec_status: report.execStatus,\n opted_in: context.optedIn,\n deciding_layer: report.decisions[0]?.layer,\n decisions: report.decisions,\n warnings: context.warnings,\n });\n return;\n }\n for (const warning of context.warnings) {\n ui.warn(warning);\n }\n printExplain(report, context.optedIn);\n}\n\nexport function registerPolicyCommands(root: Command): void {\n const policy = root\n .command(\"policy\")\n .description(\"Inspect executable-trust and apm-policy.yml decisions\");\n\n policy\n .command(\"explain\")\n .description(\"Print the effective executable-trust decision for a package\")\n .argument(\"<PACKAGE_REF>\", \"Package to explain (owner/repo)\")\n .option(\"--project <path>\", \"Project directory\", \".\")\n .option(\"--format <mode>\", \"Output format: human or json\", \"human\")\n .action((ref: string, explainOpts: PolicyExplainOpts) => {\n handlePolicyExplainCommand(ref, explainOpts);\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,eAAe;AAmBxB,SAAS,aAAa,UAA2D;AAC/E,MAAI,SAAS,SAAS,WAAW,GAAG;AAClC,WAAO;AAAA,EACT;AACA,SAAO,SAAS,SACb,IAAI,CAAC,UAAU,GAAG,MAAM,KAAK,KAAK,MAAM,OAAO,GAAG,EAClD,KAAK,IAAI;AACd;AAEA,SAAS,aAAa,QAA4B,SAAwB;AACxE,MAAI,CAAC,SAAS;AACZ,OAAG,KAAK,GAAG,OAAO,GAAG,YAAY;AACjC;AAAA,EACF;AACA,KAAG,KAAK,GAAG,OAAO,GAAG,KAAK,OAAO,UAAU,EAAE;AAC7C,QAAM,QAAQ,OAAO,WAAW,SAAS,IAAI,OAAO,aAAa;AACjE,aAAW,QAAQ,OAAO;AACxB,UAAM,WAAW,OAAO,UAAU,KAAK,CAAC,UAAU,MAAM,SAAS,IAAI;AACrE,QAAI,CAAC,SAAU;AACf,OAAG;AAAA,MACD,KAAK,IAAI,KAAK,SAAS,OAAO,WAAW,SAAS,KAAK,cAAc,aAAa,QAAQ,CAAC;AAAA,IAC7F;AAAA,EACF;AACF;AAEA,SAAS,aACP,YACA,WACA,SACoB;AACpB,QAAM,WAAW,UAAU;AAAA,IAAK,CAAC,UAC/B,gBAAgB,YAAY,CAAC,MAAM,KAAK,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC;AAAA,EAC1E;AACA,MAAI,UAAU;AACZ,WAAO;AAAA,EACT;AACA,QAAM,aAAa,CAAC,UAAU;AAC9B,QAAM,YAAY,WAAW,IAAI,CAAC,SAAS,uBAAuB,SAAS,YAAY,IAAI,CAAC;AAC5F,SAAO;AAAA,IACL,KAAK;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA,IACT;AAAA,IACA,YAAY,CAAC,GAAG,UAAU;AAAA,IAC1B;AAAA,IACA,YAAY,wBAAwB,CAAC,GAAG,UAAU,GAAG,SAAS;AAAA,EAChE;AACF;AAEO,SAAS,2BACd,YACA,MACM;AACN,QAAM,SAAS,kBAAkB,KAAK,MAAM;AAC5C,QAAM,cAAc,QAAQ,KAAK,WAAW,GAAG;AAC/C,QAAM,UAAU,4BAA4B,EAAE,YAAY,CAAC;AAC3D,QAAM,OAAO,aAAa,WAAW;AACrC,QAAM,YAAY,sBAAsB,SAAS,EAAE,GAAI,OAAO,EAAE,KAAK,IAAI,CAAC,EAAG,CAAC;AAC9E,QAAM,SAAS,aAAa,YAAY,WAAW,OAAO;AAE1D,MAAI,WAAW,QAAQ;AACrB,cAAU;AAAA,MACR,KAAK,OAAO;AAAA,MACZ,MAAM,OAAO;AAAA,MACb,SAAS,OAAO;AAAA,MAChB,aAAa,OAAO;AAAA,MACpB,UAAU,QAAQ;AAAA,MAClB,gBAAgB,OAAO,UAAU,CAAC,GAAG;AAAA,MACrC,WAAW,OAAO;AAAA,MAClB,UAAU,QAAQ;AAAA,IACpB,CAAC;AACD;AAAA,EACF;AACA,aAAW,WAAW,QAAQ,UAAU;AACtC,OAAG,KAAK,OAAO;AAAA,EACjB;AACA,eAAa,QAAQ,QAAQ,OAAO;AACtC;AAEO,SAAS,uBAAuB,MAAqB;AAC1D,QAAM,SAAS,KACZ,QAAQ,QAAQ,EAChB,YAAY,uDAAuD;AAEtE,SACG,QAAQ,SAAS,EACjB,YAAY,6DAA6D,EACzE,SAAS,iBAAiB,iCAAiC,EAC3D,OAAO,oBAAoB,qBAAqB,GAAG,EACnD,OAAO,mBAAmB,gCAAgC,OAAO,EACjE,OAAO,CAAC,KAAa,gBAAmC;AACvD,+BAA2B,KAAK,WAAW;AAAA,EAC7C,CAAC;AACL;","names":[]}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
mapProfileUseDelegationOptions,
|
|
3
3
|
renderProjectUseHuman
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2BESDRYP.js";
|
|
5
5
|
import {
|
|
6
|
+
harnessDisplayName,
|
|
6
7
|
registerProfileParityCommands
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-2NMLWSUH.js";
|
|
9
|
+
import "./chunk-2BWIEB2G.js";
|
|
10
|
+
import "./chunk-MILGCNBK.js";
|
|
10
11
|
import {
|
|
11
12
|
countMaterialPluginResources,
|
|
12
13
|
createPluginFromSource,
|
|
@@ -14,13 +15,15 @@ import {
|
|
|
14
15
|
handlePluginListCommand,
|
|
15
16
|
handlePluginPublishCommand,
|
|
16
17
|
handlePluginShowCommand,
|
|
18
|
+
registerProfileDuplicateCommands,
|
|
17
19
|
runPluginCreateFromSourceWizard
|
|
18
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-FLYQEB6D.js";
|
|
19
21
|
import {
|
|
20
22
|
applyProfileStashCommand,
|
|
21
23
|
buildProjectProfileChoices,
|
|
22
24
|
detectGlobalProfileStatus,
|
|
23
25
|
executeProjectUse,
|
|
26
|
+
globalProfileStatusGaps,
|
|
24
27
|
listProfileStashEntries,
|
|
25
28
|
maybeSyncActiveProfileBeforeSwitch,
|
|
26
29
|
popProfileStashCommand,
|
|
@@ -32,54 +35,45 @@ import {
|
|
|
32
35
|
resolveExpectedPluginName,
|
|
33
36
|
resolveUserPath,
|
|
34
37
|
stashProfileCommand
|
|
35
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-CUOEQQFI.js";
|
|
36
39
|
import {
|
|
37
40
|
resolvePluginMutationTarget
|
|
38
|
-
} from "./chunk-
|
|
39
|
-
import "./chunk-
|
|
41
|
+
} from "./chunk-KFIRABC7.js";
|
|
42
|
+
import "./chunk-ZUXFPAVX.js";
|
|
40
43
|
import {
|
|
41
44
|
resolveSkillPackageCheckout
|
|
42
|
-
} from "./chunk-
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-GRASK6M6.js";
|
|
45
|
+
} from "./chunk-262KZULH.js";
|
|
46
|
+
import "./chunk-SMLO5YPI.js";
|
|
47
|
+
import "./chunk-Y3HJ2F2W.js";
|
|
48
|
+
import "./chunk-ZREU2UHM.js";
|
|
47
49
|
import "./chunk-VZQG2JDV.js";
|
|
48
|
-
import "./chunk-
|
|
49
|
-
import "./chunk-
|
|
50
|
+
import "./chunk-CKJIS2FM.js";
|
|
51
|
+
import "./chunk-I4DKV63E.js";
|
|
50
52
|
import "./chunk-KRI4R7EM.js";
|
|
51
|
-
import "./chunk-XGTTOO4R.js";
|
|
52
53
|
import {
|
|
53
54
|
parseCommaSeparatedList
|
|
54
55
|
} from "./chunk-37E5M4JX.js";
|
|
55
|
-
import "./chunk-
|
|
56
|
+
import "./chunk-7IBFH736.js";
|
|
56
57
|
import "./chunk-3FIWOI3H.js";
|
|
57
58
|
import {
|
|
58
59
|
renderCliError
|
|
59
|
-
} from "./chunk-
|
|
60
|
-
import {
|
|
61
|
-
isPromptCancellationError,
|
|
62
|
-
promptForChoice,
|
|
63
|
-
promptForConfirmation,
|
|
64
|
-
promptForSearchableChoice,
|
|
65
|
-
shouldUseWizard
|
|
66
|
-
} from "./chunk-NAGAJ5UM.js";
|
|
60
|
+
} from "./chunk-LX6PMOOC.js";
|
|
67
61
|
import {
|
|
68
62
|
initializeSchema
|
|
69
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-NXILQDJG.js";
|
|
70
64
|
import {
|
|
71
65
|
configureCommandGroup
|
|
72
|
-
} from "./chunk-
|
|
73
|
-
import {
|
|
74
|
-
previewPluginFromProject
|
|
75
|
-
} from "./chunk-BPWFQKI5.js";
|
|
66
|
+
} from "./chunk-NWOYPK2O.js";
|
|
76
67
|
import {
|
|
77
68
|
formatPluginLabel
|
|
78
69
|
} from "./chunk-I6XFZLTJ.js";
|
|
70
|
+
import {
|
|
71
|
+
previewPluginFromProject
|
|
72
|
+
} from "./chunk-NIFKCS7J.js";
|
|
79
73
|
import {
|
|
80
74
|
parseOutputFormat,
|
|
81
75
|
printJson
|
|
82
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-4E3G4H5B.js";
|
|
83
77
|
import {
|
|
84
78
|
ON_CONFLICT_APPLY_HELP,
|
|
85
79
|
ON_CONFLICT_PLUGIN_IMPORT_HELP,
|
|
@@ -90,7 +84,7 @@ import {
|
|
|
90
84
|
formatHintCommand,
|
|
91
85
|
parseOnConflict,
|
|
92
86
|
toPluginImportOnConflict
|
|
93
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-QHCGA6LC.js";
|
|
94
88
|
import {
|
|
95
89
|
PROFILE_PLUGIN_TAG,
|
|
96
90
|
PinnedPluginInstallConsentError,
|
|
@@ -98,13 +92,16 @@ import {
|
|
|
98
92
|
addPluginAttachment,
|
|
99
93
|
addResourceToPlugin,
|
|
100
94
|
assertSupportedHarnessTargets,
|
|
95
|
+
clearLiveReadCaches,
|
|
101
96
|
createPlugin,
|
|
102
97
|
createProfileCommand,
|
|
103
98
|
deletePlugin,
|
|
104
99
|
deleteProfileCommand,
|
|
105
100
|
diskCaptureHarnessScope,
|
|
101
|
+
driftChangeIsKept,
|
|
106
102
|
findProjectConfig,
|
|
107
103
|
formatPluginRef,
|
|
104
|
+
getActiveProfileName,
|
|
108
105
|
getPlugin,
|
|
109
106
|
getPluginByName,
|
|
110
107
|
getProfileEntry,
|
|
@@ -118,29 +115,27 @@ import {
|
|
|
118
115
|
listResources,
|
|
119
116
|
persistMergedProjectScan,
|
|
120
117
|
persistScanResults,
|
|
121
|
-
|
|
118
|
+
resolveProfileUseTarget,
|
|
122
119
|
scanHomeDefaults,
|
|
123
120
|
showProfileCommand,
|
|
124
121
|
tagProfileCommand,
|
|
125
122
|
useProfileCommand,
|
|
126
123
|
useProfileCommandUnlocked,
|
|
127
124
|
withProfileApplyLock
|
|
128
|
-
} from "./chunk-
|
|
129
|
-
import "./chunk-6LTLYV5D.js";
|
|
130
|
-
import "./chunk-N3ZCH64F.js";
|
|
131
|
-
import "./chunk-REHRUNBB.js";
|
|
132
|
-
import {
|
|
133
|
-
missingRequiredArg,
|
|
134
|
-
ui
|
|
135
|
-
} from "./chunk-2A36HWDE.js";
|
|
125
|
+
} from "./chunk-26QGX47N.js";
|
|
136
126
|
import {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
127
|
+
isPromptCancellationError,
|
|
128
|
+
promptForChoice,
|
|
129
|
+
promptForConfirmation,
|
|
130
|
+
promptForSearchableChoice,
|
|
131
|
+
resolveHomeRoot,
|
|
132
|
+
shouldUseWizard
|
|
133
|
+
} from "./chunk-LGWFLVZQ.js";
|
|
134
|
+
import "./chunk-MSKTWYHG.js";
|
|
135
|
+
import "./chunk-CWXCZBJR.js";
|
|
136
|
+
import "./chunk-T2JBSRGG.js";
|
|
143
137
|
import {
|
|
138
|
+
CLI_COPY,
|
|
144
139
|
CLI_ERRORS,
|
|
145
140
|
CLI_HINTS,
|
|
146
141
|
SWITCH_CHANGES_FLAG_HELP,
|
|
@@ -148,8 +143,10 @@ import {
|
|
|
148
143
|
formatCount,
|
|
149
144
|
formatHtArgs,
|
|
150
145
|
getDb,
|
|
151
|
-
getHarnesstapDir
|
|
152
|
-
|
|
146
|
+
getHarnesstapDir,
|
|
147
|
+
missingRequiredArg,
|
|
148
|
+
ui
|
|
149
|
+
} from "./chunk-MTCCUYBZ.js";
|
|
153
150
|
|
|
154
151
|
// src/cli/commands/profile.ts
|
|
155
152
|
import { Option } from "commander";
|
|
@@ -1185,7 +1182,7 @@ async function handleProfileCreateCommand(name, opts) {
|
|
|
1185
1182
|
const result = createProfileCommand({
|
|
1186
1183
|
name,
|
|
1187
1184
|
description: opts.description,
|
|
1188
|
-
version
|
|
1185
|
+
...opts.version ? { version: opts.version } : {}
|
|
1189
1186
|
});
|
|
1190
1187
|
if (format === "json" && !opts.use) {
|
|
1191
1188
|
printJson(result);
|
|
@@ -1280,7 +1277,7 @@ function registerProfileCreateSourceOptions(command) {
|
|
|
1280
1277
|
).option("--from-home", "Import from global home harness files").option("--from-project <path>", "Import from a project path").option("--preview", "Print create preview without writing").option("--no-interactive", "Don't open the compose picker");
|
|
1281
1278
|
}
|
|
1282
1279
|
function registerProfileCreateCommand(profileCmd) {
|
|
1283
|
-
const createCmd = profileCmd.command("create").argument("<name>", "Profile plugin name").option("-d, --description <text>", "Profile description").option("--version <semver>", "Plugin version
|
|
1280
|
+
const createCmd = profileCmd.command("create").argument("<name>", "Profile plugin name").option("-d, --description <text>", "Profile description").option("--version <semver>", "Plugin version for a new profile (default 1.0.0)").option(
|
|
1284
1281
|
"--from <source>",
|
|
1285
1282
|
"Skill package source (owner/repo, git URL, or local path)"
|
|
1286
1283
|
).option("--skill <names>", "Comma-separated skills to attach when using --from").option("--all", "Attach all discovered skills when using --from").option(
|
|
@@ -1310,7 +1307,7 @@ function registerProfileCreateCommand(profileCmd) {
|
|
|
1310
1307
|
|
|
1311
1308
|
// src/cli/commands/profile.ts
|
|
1312
1309
|
async function handleProfilePullCommand(selector, opts) {
|
|
1313
|
-
const installed = await handlePluginInstallCommand(selector, opts);
|
|
1310
|
+
const installed = await handlePluginInstallCommand(selector, { ...opts, profile: true });
|
|
1314
1311
|
if (!installed || process.exitCode) {
|
|
1315
1312
|
return;
|
|
1316
1313
|
}
|
|
@@ -1330,23 +1327,6 @@ function warnProfilePublishValidation(plugin) {
|
|
|
1330
1327
|
`Profile ${ui.theme.accent(plugin.name)} has no plugin references and no material resources.`
|
|
1331
1328
|
);
|
|
1332
1329
|
}
|
|
1333
|
-
const unresolvedLocalRefs = [];
|
|
1334
|
-
for (const ref of refs) {
|
|
1335
|
-
const local = resolvePluginSelector(
|
|
1336
|
-
ref.version_constraint ? `${ref.dependency_name}@${ref.version_constraint}` : ref.dependency_name
|
|
1337
|
-
);
|
|
1338
|
-
if (!local) {
|
|
1339
|
-
continue;
|
|
1340
|
-
}
|
|
1341
|
-
if (!local.org_slug || !local.catalog_slug) {
|
|
1342
|
-
unresolvedLocalRefs.push(ref.dependency_name);
|
|
1343
|
-
}
|
|
1344
|
-
}
|
|
1345
|
-
if (unresolvedLocalRefs.length > 0) {
|
|
1346
|
-
ui.warn(
|
|
1347
|
-
`Profile ${ui.theme.accent(plugin.name)} references unpublished local plugins: ${unresolvedLocalRefs.join(", ")}`
|
|
1348
|
-
);
|
|
1349
|
-
}
|
|
1350
1330
|
}
|
|
1351
1331
|
async function handleProfilePublishCommand(pluginName, opts) {
|
|
1352
1332
|
const db = getDb();
|
|
@@ -1426,6 +1406,7 @@ function registerProfileCommands(root) {
|
|
|
1426
1406
|
depth,
|
|
1427
1407
|
projectPath: opts.project
|
|
1428
1408
|
});
|
|
1409
|
+
const gaps = globalProfileStatusGaps(status);
|
|
1429
1410
|
if (format === "json") {
|
|
1430
1411
|
printJson(status);
|
|
1431
1412
|
} else if (!status.active_profile) {
|
|
@@ -1439,8 +1420,9 @@ function registerProfileCommands(root) {
|
|
|
1439
1420
|
ui.hint(
|
|
1440
1421
|
`Run ${formatHintCommand(["profile", "use", status.active_profile])} to materialize home harness files.`
|
|
1441
1422
|
);
|
|
1442
|
-
} else if (
|
|
1423
|
+
} else if (gaps.inSync) {
|
|
1443
1424
|
ui.success(`Global harness files are in sync with profile ${ui.theme.accent(status.active_profile)}.`);
|
|
1425
|
+
printKeptStatusChanges(status.changes);
|
|
1444
1426
|
} else {
|
|
1445
1427
|
ui.warn(
|
|
1446
1428
|
`Global harness files are out of sync with profile ${ui.theme.accent(status.active_profile)}.`
|
|
@@ -1453,9 +1435,15 @@ function registerProfileCommands(root) {
|
|
|
1453
1435
|
`${formatCount(status.changes.length, "file")} ${status.changes.length === 1 ? "differs" : "differ"} on disk.`
|
|
1454
1436
|
);
|
|
1455
1437
|
for (const change of status.changes) {
|
|
1456
|
-
console.log(` ${change.path}`);
|
|
1438
|
+
console.log(driftChangeIsKept(change) ? ` ${change.path} ${keptStatusReason(change)}` : ` ${change.path}`);
|
|
1457
1439
|
}
|
|
1458
1440
|
}
|
|
1441
|
+
for (const gap of gaps.missing) {
|
|
1442
|
+
const harnessName = harnessDisplayName(gap.harness);
|
|
1443
|
+
ui.dim(
|
|
1444
|
+
gap.kind === "plugin" ? `Plugin ${gap.id} is not installed in ${harnessName}.` : `MCP server ${gap.id} is missing or different in ${harnessName}.`
|
|
1445
|
+
);
|
|
1446
|
+
}
|
|
1459
1447
|
ui.hint(
|
|
1460
1448
|
`Run ${formatHintCommand(["profile", "use", status.active_profile])} to refresh global harness files.`
|
|
1461
1449
|
);
|
|
@@ -1469,7 +1457,7 @@ function registerProfileCommands(root) {
|
|
|
1469
1457
|
"Cursor built-ins live under ~/.cursor/skills-cursor/ (read-only inventory). User skills belong in ~/.cursor/skills/."
|
|
1470
1458
|
);
|
|
1471
1459
|
}
|
|
1472
|
-
if (opts.check &&
|
|
1460
|
+
if (opts.check && !gaps.inSync) {
|
|
1473
1461
|
process.exitCode = 1;
|
|
1474
1462
|
}
|
|
1475
1463
|
} catch (err) {
|
|
@@ -1477,6 +1465,22 @@ function registerProfileCommands(root) {
|
|
|
1477
1465
|
fail(err instanceof Error ? err.message : String(err));
|
|
1478
1466
|
}
|
|
1479
1467
|
});
|
|
1468
|
+
function printKeptStatusChanges(changes) {
|
|
1469
|
+
const kept = changes.filter(driftChangeIsKept);
|
|
1470
|
+
if (kept.length === 0) return;
|
|
1471
|
+
ui.dim(
|
|
1472
|
+
`${formatCount(kept.length, "file")} ${kept.length === 1 ? "differs" : "differ"} from the profile and apply keeps ${kept.length === 1 ? "it" : "them"} as ${kept.length === 1 ? "it is" : "they are"}:`
|
|
1473
|
+
);
|
|
1474
|
+
for (const change of kept) {
|
|
1475
|
+
console.log(` ${change.path} ${keptStatusReason(change)}`);
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
function keptStatusReason(change) {
|
|
1479
|
+
if (change.changed_by === "claude-code") {
|
|
1480
|
+
return change.detail ? `Claude Code changed ${change.detail}` : CLI_COPY.keptClaudeChanged;
|
|
1481
|
+
}
|
|
1482
|
+
return change.removal_group === "owned_modified" ? "you changed it" : "not made by HarnessTap";
|
|
1483
|
+
}
|
|
1480
1484
|
profileCmd.command("use").argument("[name]", "Profile plugin name or selector").option("--profile <name>", "Profile key from apm.yml").option("--project <path>", "Project directory for apm.yml discovery", ".").option("--dry-run", "Show what would be written or removed").option(
|
|
1481
1485
|
"--harness <slugs>",
|
|
1482
1486
|
"Comma-separated harness slugs (defaults to global harness preference)"
|
|
@@ -1486,7 +1490,7 @@ function registerProfileCommands(root) {
|
|
|
1486
1490
|
).option(
|
|
1487
1491
|
"--force-remove",
|
|
1488
1492
|
"Also remove user-modified managed files and unmanaged files in the planned removal set"
|
|
1489
|
-
).option("--account <name>", "Cloud account name for dependency pulls").option("--base-url <url>", "Cloud base URL for dependency pulls").option("--no-pull", "Do not
|
|
1493
|
+
).option("--account <name>", "Cloud account name for dependency pulls").option("--base-url <url>", "Cloud base URL for dependency pulls").option("--no-pull", "Do not pull the profile or its missing published plugin dependencies from the catalog").option("--force", "Apply even when the profile is already active and in sync").option("--no-interactive", "Disable interactive prompts").option("--interactive", "Enable interactive prompts").option("-y, --yes", "Install pinned marketplace plugins without a prompt").option("--format <mode>", "Output format: human or json", "human").option(
|
|
1490
1494
|
"--changes <action>",
|
|
1491
1495
|
SWITCH_CHANGES_FLAG_HELP
|
|
1492
1496
|
).description("Switch the active profile and apply globally to harness home paths").action(async (name, opts) => {
|
|
@@ -1532,9 +1536,21 @@ function registerProfileCommands(root) {
|
|
|
1532
1536
|
noInteractive: opts.noInteractive ?? format === "json"
|
|
1533
1537
|
});
|
|
1534
1538
|
try {
|
|
1539
|
+
const target = await resolveProfileUseTarget(name, {
|
|
1540
|
+
pull: opts.pull,
|
|
1541
|
+
dryRun: opts.dryRun,
|
|
1542
|
+
account: opts.account,
|
|
1543
|
+
baseUrl: opts.baseUrl,
|
|
1544
|
+
interactive: opts.interactive,
|
|
1545
|
+
noInteractive: opts.noInteractive,
|
|
1546
|
+
format
|
|
1547
|
+
});
|
|
1548
|
+
if (target.pulled && format !== "json") {
|
|
1549
|
+
ui.info(`Pulled profile ${ui.theme.accent(target.pulled.plugin_name)} from ${target.pulled.source}`);
|
|
1550
|
+
}
|
|
1535
1551
|
if (!opts.dryRun) {
|
|
1536
1552
|
const sync = await maybeSyncActiveProfileBeforeSwitch({
|
|
1537
|
-
targetProfileName: name,
|
|
1553
|
+
targetProfileName: target.name,
|
|
1538
1554
|
harness: opts.harness,
|
|
1539
1555
|
format,
|
|
1540
1556
|
changes: opts.changes,
|
|
@@ -1545,8 +1561,9 @@ function registerProfileCommands(root) {
|
|
|
1545
1561
|
return;
|
|
1546
1562
|
}
|
|
1547
1563
|
}
|
|
1548
|
-
const payload = await useProfileCommand(
|
|
1564
|
+
const payload = await useProfileCommand(target.selector, {
|
|
1549
1565
|
dryRun: opts.dryRun,
|
|
1566
|
+
planPluginFolders: opts.dryRun,
|
|
1550
1567
|
harness: opts.harness,
|
|
1551
1568
|
pull: opts.pull,
|
|
1552
1569
|
account: opts.account,
|
|
@@ -1561,7 +1578,7 @@ function registerProfileCommands(root) {
|
|
|
1561
1578
|
process.exitCode = 1;
|
|
1562
1579
|
}
|
|
1563
1580
|
if (format === "json") {
|
|
1564
|
-
printJson(payload);
|
|
1581
|
+
printJson(target.pulled ? { ...payload, pulled_profile: target.pulled } : payload);
|
|
1565
1582
|
return;
|
|
1566
1583
|
}
|
|
1567
1584
|
if (payload.cancelled) {
|
|
@@ -1771,9 +1788,21 @@ function registerProfileCommands(root) {
|
|
|
1771
1788
|
noInteractive: opts.noInteractive ?? format === "json"
|
|
1772
1789
|
});
|
|
1773
1790
|
try {
|
|
1791
|
+
const target = await resolveProfileUseTarget(name, {
|
|
1792
|
+
pull: opts.pull,
|
|
1793
|
+
dryRun: opts.dryRun,
|
|
1794
|
+
account: opts.account,
|
|
1795
|
+
baseUrl: opts.baseUrl,
|
|
1796
|
+
interactive: opts.interactive,
|
|
1797
|
+
noInteractive: opts.noInteractive,
|
|
1798
|
+
format
|
|
1799
|
+
});
|
|
1800
|
+
if (target.pulled && format !== "json") {
|
|
1801
|
+
ui.info(`Pulled profile ${ui.theme.accent(target.pulled.plugin_name)} from ${target.pulled.source}`);
|
|
1802
|
+
}
|
|
1774
1803
|
if (!opts.dryRun) {
|
|
1775
1804
|
const sync = await maybeSyncActiveProfileBeforeSwitch({
|
|
1776
|
-
targetProfileName: name,
|
|
1805
|
+
targetProfileName: target.name,
|
|
1777
1806
|
harness: opts.harness,
|
|
1778
1807
|
format,
|
|
1779
1808
|
changes: opts.changes,
|
|
@@ -1827,6 +1856,7 @@ function registerProfileCommands(root) {
|
|
|
1827
1856
|
}
|
|
1828
1857
|
});
|
|
1829
1858
|
registerProfileCreateCommand(profileCmd);
|
|
1859
|
+
registerProfileDuplicateCommands(profileCmd);
|
|
1830
1860
|
profileCmd.command("delete").argument("<name>", "Profile plugin name or selector").option("--plugin", "Also delete the underlying plugin without prompting").option("-y, --yes", "Skip the interactive plugin delete prompt").option("--format <mode>", "Output format: human or json", "human").description("Demote a profile plugin and optionally delete the underlying plugin").action(async (name, opts) => {
|
|
1831
1861
|
const db = getDb();
|
|
1832
1862
|
initializeSchema(db);
|
|
@@ -1877,4 +1907,4 @@ function registerProfileCommands(root) {
|
|
|
1877
1907
|
export {
|
|
1878
1908
|
registerProfileCommands
|
|
1879
1909
|
};
|
|
1880
|
-
//# sourceMappingURL=profile-
|
|
1910
|
+
//# sourceMappingURL=profile-HM3ROXXB.js.map
|