harnesstap 1.3.2 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/apply-SUNDXRJ3.js +54 -0
- package/dist/{approve-L7IFSYBO.js → approve-FBGYQGWN.js} +14 -15
- package/dist/{approve-L7IFSYBO.js.map → approve-FBGYQGWN.js.map} +1 -1
- package/dist/{audit-PBJDK7A4.js → audit-VI4QZ6X2.js} +30 -39
- package/dist/{audit-PBJDK7A4.js.map → audit-VI4QZ6X2.js.map} +1 -1
- package/dist/{auth-OM73RLNS.js → auth-4CQCDS2W.js} +17 -19
- package/dist/{auth-OM73RLNS.js.map → auth-4CQCDS2W.js.map} +1 -1
- package/dist/bin.js +3 -3
- package/dist/{chunk-YRGM7RAD.js → chunk-23XSG7LI.js} +7 -11
- package/dist/{chunk-YRGM7RAD.js.map → chunk-23XSG7LI.js.map} +1 -1
- package/dist/{chunk-LDVXYN6F.js → chunk-2A36HWDE.js} +63 -13
- package/dist/chunk-2A36HWDE.js.map +1 -0
- package/dist/{chunk-QNAIDM6W.js → chunk-3FS775NP.js} +51 -4
- package/dist/chunk-3FS775NP.js.map +1 -0
- package/dist/{chunk-XCPWLGPB.js → chunk-3P6BWL5F.js} +2 -2
- package/dist/{chunk-JJJJ2RAD.js → chunk-43BDGVN3.js} +19 -6
- package/dist/chunk-43BDGVN3.js.map +1 -0
- package/dist/{chunk-CZ4T75PP.js → chunk-4ZQ2SCGY.js} +146 -78
- package/dist/chunk-4ZQ2SCGY.js.map +1 -0
- package/dist/{chunk-ZVANUFPF.js → chunk-6LTLYV5D.js} +353 -267
- package/dist/chunk-6LTLYV5D.js.map +1 -0
- package/dist/{chunk-OPVIX7E4.js → chunk-73OJQTBW.js} +6 -2
- package/dist/chunk-73OJQTBW.js.map +1 -0
- package/dist/{chunk-WXRPQICX.js → chunk-7HP6AAI3.js} +2 -2
- package/dist/{chunk-ENHDEB7Z.js → chunk-BPWFQKI5.js} +5 -7
- package/dist/{chunk-ENHDEB7Z.js.map → chunk-BPWFQKI5.js.map} +1 -1
- package/dist/{chunk-64R32MG2.js → chunk-D432JAXV.js} +44 -19
- package/dist/chunk-D432JAXV.js.map +1 -0
- package/dist/chunk-DF4Z7LAD.js +3463 -0
- package/dist/chunk-DF4Z7LAD.js.map +1 -0
- package/dist/{chunk-FUV7QYBS.js → chunk-EOPFER6N.js} +71 -318
- package/dist/chunk-EOPFER6N.js.map +1 -0
- package/dist/chunk-G6WKY2W4.js +389 -0
- package/dist/chunk-G6WKY2W4.js.map +1 -0
- package/dist/{chunk-IHW4PCDT.js → chunk-GRASK6M6.js} +5 -5
- package/dist/{chunk-R4PTE774.js → chunk-IE7B6Q5K.js} +33 -39
- package/dist/chunk-IE7B6Q5K.js.map +1 -0
- package/dist/{chunk-UNRR4KH5.js → chunk-IMROMZ2K.js} +6 -5
- package/dist/{chunk-UNRR4KH5.js.map → chunk-IMROMZ2K.js.map} +1 -1
- package/dist/{chunk-G5RWVZZ7.js → chunk-L6YZE5MY.js} +3 -3
- package/dist/{chunk-SNVAMWB7.js → chunk-M2U3J7UX.js} +7 -1
- package/dist/chunk-M2U3J7UX.js.map +1 -0
- package/dist/{chunk-AFKCNFPP.js → chunk-M4KLHJ6U.js} +16 -13
- package/dist/chunk-M4KLHJ6U.js.map +1 -0
- package/dist/{chunk-XRXFJTAT.js → chunk-MR7IOHSX.js} +16 -19
- package/dist/chunk-MR7IOHSX.js.map +1 -0
- package/dist/{chunk-UEHDEADL.js → chunk-N3VGY3T3.js} +15 -15
- package/dist/chunk-N3VGY3T3.js.map +1 -0
- package/dist/{chunk-IKAGGJEO.js → chunk-N3ZCH64F.js} +496 -10
- package/dist/chunk-N3ZCH64F.js.map +1 -0
- package/dist/{chunk-U472S6IB.js → chunk-OML4HXKT.js} +20 -22
- package/dist/chunk-OML4HXKT.js.map +1 -0
- package/dist/{chunk-3EGM4IUI.js → chunk-P2C7JPLD.js} +3 -3
- package/dist/{chunk-MFCZN253.js → chunk-PCMON7Y2.js} +7 -7
- package/dist/{chunk-FBYAIBHP.js → chunk-PNGF5EV2.js} +2 -2
- package/dist/{chunk-6JMVGKMD.js → chunk-QA5U36JN.js} +187 -203
- package/dist/chunk-QA5U36JN.js.map +1 -0
- package/dist/{chunk-AVZOFMJX.js → chunk-R7ZOYVN3.js} +241 -126
- package/dist/chunk-R7ZOYVN3.js.map +1 -0
- package/dist/{chunk-YVJQ2QDG.js → chunk-RDG5DT7S.js} +45 -49
- package/dist/{chunk-YVJQ2QDG.js.map → chunk-RDG5DT7S.js.map} +1 -1
- package/dist/{chunk-VQVUJYYY.js → chunk-REHRUNBB.js} +8 -3
- package/dist/chunk-REHRUNBB.js.map +1 -0
- package/dist/{chunk-Y2JGMICO.js → chunk-RFQ3N7FB.js} +19 -29
- package/dist/chunk-RFQ3N7FB.js.map +1 -0
- package/dist/{chunk-EY4ES5MG.js → chunk-RVEXPMM3.js} +3 -3
- package/dist/{chunk-6I3RY6R5.js → chunk-TPEJFLV7.js} +13 -15
- package/dist/{chunk-6I3RY6R5.js.map → chunk-TPEJFLV7.js.map} +1 -1
- package/dist/{chunk-IAZNF35S.js → chunk-U6DXASQP.js} +2 -2
- package/dist/{chunk-OQ4KBUN2.js → chunk-ULCD6DJE.js} +30 -8
- package/dist/chunk-ULCD6DJE.js.map +1 -0
- package/dist/{chunk-BXSS2S4W.js → chunk-UVVZHWD2.js} +2 -2
- package/dist/{chunk-24V5ZSIF.js → chunk-WG5A6EAU.js} +269 -13
- package/dist/chunk-WG5A6EAU.js.map +1 -0
- package/dist/{chunk-LGWUTV5Q.js → chunk-WGP4GUYZ.js} +10 -10
- package/dist/{chunk-GWQVYGRD.js → chunk-XTVGCVU4.js} +124 -83
- package/dist/chunk-XTVGCVU4.js.map +1 -0
- package/dist/{chunk-YX7MVSDA.js → chunk-XUJKZQZA.js} +8 -8
- package/dist/chunk-XUJKZQZA.js.map +1 -0
- package/dist/chunk-ZUASVASP.js +30317 -0
- package/dist/chunk-ZUASVASP.js.map +1 -0
- package/dist/{compile-SDOASKGL.js → compile-GXADKGH5.js} +37 -50
- package/dist/{compile-SDOASKGL.js.map → compile-GXADKGH5.js.map} +1 -1
- package/dist/{config-4VZTVZKF.js → config-JMHNA2U5.js} +22 -35
- package/dist/{config-4VZTVZKF.js.map → config-JMHNA2U5.js.map} +1 -1
- package/dist/cursor-local-install-46RWRBDT.js +98 -0
- package/dist/cursor-local-install-46RWRBDT.js.map +1 -0
- package/dist/{doctor-HH6CFBRQ.js → doctor-N7ZULPOL.js} +18 -19
- package/dist/{doctor-HH6CFBRQ.js.map → doctor-N7ZULPOL.js.map} +1 -1
- package/dist/{environment-K7YMJJYN.js → environment-OBB3WU5B.js} +60 -71
- package/dist/{environment-K7YMJJYN.js.map → environment-OBB3WU5B.js.map} +1 -1
- package/dist/{github-A6TYG7WS.js → github-PBYBGOLH.js} +17 -17
- package/dist/{harness-772XBFZQ.js → harness-7KYATIV6.js} +56 -67
- package/dist/{harness-772XBFZQ.js.map → harness-7KYATIV6.js.map} +1 -1
- package/dist/{help-QR4VTJZU.js → help-EE3AJQD4.js} +48 -52
- package/dist/help-EE3AJQD4.js.map +1 -0
- package/dist/{help-TLHNRJJ6.js → help-VXWKLQ6A.js} +55 -15
- package/dist/help-VXWKLQ6A.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +16 -24
- package/dist/{init-AOKFPZHG.js → init-LBTMPDVJ.js} +43 -56
- package/dist/init-LBTMPDVJ.js.map +1 -0
- package/dist/live-read-cache-TUSP7U3D.js +10 -0
- package/dist/{lock-INAXNLMC.js → lock-WLJRXRVK.js} +16 -16
- package/dist/{marketplace-TUVLLPBG.js → marketplace-GXSV6QIY.js} +62 -28
- package/dist/marketplace-GXSV6QIY.js.map +1 -0
- package/dist/{mcp-MMWGRASN.js → mcp-XPDWWU75.js} +35 -48
- package/dist/{mcp-MMWGRASN.js.map → mcp-XPDWWU75.js.map} +1 -1
- package/dist/{migrate-55S4XODX.js → migrate-SBUIWN3U.js} +79 -64
- package/dist/migrate-SBUIWN3U.js.map +1 -0
- package/dist/open-HDGLYYVU.js +24 -0
- package/dist/{pack-VZIBS42E.js → pack-A73LDVOX.js} +16 -22
- package/dist/{pack-VZIBS42E.js.map → pack-A73LDVOX.js.map} +1 -1
- package/dist/plugin-CEO6ZJM5.js +51 -0
- package/dist/plugin-from-project-UK7VJVUP.js +18 -0
- package/dist/{policy-P3HGLEZS.js → policy-6VY3CMSU.js} +13 -14
- package/dist/{policy-P3HGLEZS.js.map → policy-6VY3CMSU.js.map} +1 -1
- package/dist/{profile-STS3CZUK.js → profile-YCKPMRRU.js} +96 -102
- package/dist/profile-YCKPMRRU.js.map +1 -0
- package/dist/{project-R4DGM3ZG.js → project-KHPPBKPN.js} +63 -77
- package/dist/{project-R4DGM3ZG.js.map → project-KHPPBKPN.js.map} +1 -1
- package/dist/{resource-GJVEDXVZ.js → resource-IJU3FAN5.js} +42 -49
- package/dist/{resource-GJVEDXVZ.js.map → resource-IJU3FAN5.js.map} +1 -1
- package/dist/{version-FUHV4O6U.js → version-Z66FWWMQ.js} +2 -2
- package/dist/version-Z66FWWMQ.js.map +1 -0
- package/package.json +3 -2
- package/dist/apply-Q5SFF3FY.js +0 -67
- package/dist/chunk-24V5ZSIF.js.map +0 -1
- package/dist/chunk-3JOPDYQD.js +0 -730
- package/dist/chunk-3JOPDYQD.js.map +0 -1
- package/dist/chunk-555XE3NJ.js +0 -60
- package/dist/chunk-555XE3NJ.js.map +0 -1
- package/dist/chunk-64R32MG2.js.map +0 -1
- package/dist/chunk-6JMVGKMD.js.map +0 -1
- package/dist/chunk-6ZWKF3YZ.js +0 -7795
- package/dist/chunk-6ZWKF3YZ.js.map +0 -1
- package/dist/chunk-AFKCNFPP.js.map +0 -1
- package/dist/chunk-AUWWL6KX.js +0 -296
- package/dist/chunk-AUWWL6KX.js.map +0 -1
- package/dist/chunk-AVZOFMJX.js.map +0 -1
- package/dist/chunk-CZ4T75PP.js.map +0 -1
- package/dist/chunk-FUV7QYBS.js.map +0 -1
- package/dist/chunk-GWQVYGRD.js.map +0 -1
- package/dist/chunk-HENOKIBB.js +0 -346
- package/dist/chunk-HENOKIBB.js.map +0 -1
- package/dist/chunk-HWL67OCJ.js +0 -238
- package/dist/chunk-HWL67OCJ.js.map +0 -1
- package/dist/chunk-IKAGGJEO.js.map +0 -1
- package/dist/chunk-JJJJ2RAD.js.map +0 -1
- package/dist/chunk-JRFUTIEH.js +0 -426
- package/dist/chunk-JRFUTIEH.js.map +0 -1
- package/dist/chunk-KJIFZLHN.js +0 -11066
- package/dist/chunk-KJIFZLHN.js.map +0 -1
- package/dist/chunk-LDVXYN6F.js.map +0 -1
- package/dist/chunk-MHOTXMD2.js +0 -430
- package/dist/chunk-MHOTXMD2.js.map +0 -1
- package/dist/chunk-NEPUP33Q.js +0 -35
- package/dist/chunk-NEPUP33Q.js.map +0 -1
- package/dist/chunk-OPVIX7E4.js.map +0 -1
- package/dist/chunk-OQ4KBUN2.js.map +0 -1
- package/dist/chunk-OXVCYRZB.js +0 -491
- package/dist/chunk-OXVCYRZB.js.map +0 -1
- package/dist/chunk-PJQAMC6L.js +0 -183
- package/dist/chunk-PJQAMC6L.js.map +0 -1
- package/dist/chunk-PW5QXRBA.js +0 -1173
- package/dist/chunk-PW5QXRBA.js.map +0 -1
- package/dist/chunk-QNAIDM6W.js.map +0 -1
- package/dist/chunk-R4PTE774.js.map +0 -1
- package/dist/chunk-S2E4KSYW.js +0 -610
- package/dist/chunk-S2E4KSYW.js.map +0 -1
- package/dist/chunk-SNVAMWB7.js.map +0 -1
- package/dist/chunk-U472S6IB.js.map +0 -1
- package/dist/chunk-UEHDEADL.js.map +0 -1
- package/dist/chunk-VQVUJYYY.js.map +0 -1
- package/dist/chunk-XRXFJTAT.js.map +0 -1
- package/dist/chunk-Y2JGMICO.js.map +0 -1
- package/dist/chunk-YX7MVSDA.js.map +0 -1
- package/dist/chunk-ZGRBIBO7.js +0 -681
- package/dist/chunk-ZGRBIBO7.js.map +0 -1
- package/dist/chunk-ZTBAMBAI.js +0 -6448
- package/dist/chunk-ZTBAMBAI.js.map +0 -1
- package/dist/chunk-ZVANUFPF.js.map +0 -1
- package/dist/help-QR4VTJZU.js.map +0 -1
- package/dist/help-TLHNRJJ6.js.map +0 -1
- package/dist/init-AOKFPZHG.js.map +0 -1
- package/dist/marketplace-TUVLLPBG.js.map +0 -1
- package/dist/migrate-55S4XODX.js.map +0 -1
- package/dist/open-SLFQV45J.js +0 -32
- package/dist/plugin-WLEFFBRY.js +0 -64
- package/dist/plugin-from-project-UV2O364T.js +0 -16
- package/dist/profile-STS3CZUK.js.map +0 -1
- /package/dist/{apply-Q5SFF3FY.js.map → apply-SUNDXRJ3.js.map} +0 -0
- /package/dist/{chunk-XCPWLGPB.js.map → chunk-3P6BWL5F.js.map} +0 -0
- /package/dist/{chunk-WXRPQICX.js.map → chunk-7HP6AAI3.js.map} +0 -0
- /package/dist/{chunk-IHW4PCDT.js.map → chunk-GRASK6M6.js.map} +0 -0
- /package/dist/{chunk-G5RWVZZ7.js.map → chunk-L6YZE5MY.js.map} +0 -0
- /package/dist/{chunk-3EGM4IUI.js.map → chunk-P2C7JPLD.js.map} +0 -0
- /package/dist/{chunk-MFCZN253.js.map → chunk-PCMON7Y2.js.map} +0 -0
- /package/dist/{chunk-FBYAIBHP.js.map → chunk-PNGF5EV2.js.map} +0 -0
- /package/dist/{chunk-EY4ES5MG.js.map → chunk-RVEXPMM3.js.map} +0 -0
- /package/dist/{chunk-IAZNF35S.js.map → chunk-U6DXASQP.js.map} +0 -0
- /package/dist/{chunk-BXSS2S4W.js.map → chunk-UVVZHWD2.js.map} +0 -0
- /package/dist/{chunk-LGWUTV5Q.js.map → chunk-WGP4GUYZ.js.map} +0 -0
- /package/dist/{github-A6TYG7WS.js.map → github-PBYBGOLH.js.map} +0 -0
- /package/dist/{open-SLFQV45J.js.map → live-read-cache-TUSP7U3D.js.map} +0 -0
- /package/dist/{lock-INAXNLMC.js.map → lock-WLJRXRVK.js.map} +0 -0
- /package/dist/{plugin-WLEFFBRY.js.map → open-HDGLYYVU.js.map} +0 -0
- /package/dist/{plugin-from-project-UV2O364T.js.map → plugin-CEO6ZJM5.js.map} +0 -0
- /package/dist/{version-FUHV4O6U.js.map → plugin-from-project-UK7VJVUP.js.map} +0 -0
|
@@ -1,86 +1,94 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
collectOwnedGlobalProfileFiles,
|
|
5
|
-
computeGlobalProfilePanelStatus,
|
|
6
|
-
countMissingHarnessRows,
|
|
7
|
-
declaredMcpFromExpectedFiles,
|
|
8
|
-
resolveProjectDriftSummary,
|
|
2
|
+
isTransparentCrossHarnessGap,
|
|
3
|
+
resourceScopesForPlugins,
|
|
9
4
|
withAffectedResources
|
|
10
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EOPFER6N.js";
|
|
11
6
|
import {
|
|
12
7
|
formatEnvironmentToml,
|
|
13
8
|
importEnvironmentToml
|
|
14
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7HP6AAI3.js";
|
|
15
10
|
import {
|
|
16
11
|
MISSING_PROJECT_CONFIG_MESSAGE
|
|
17
12
|
} from "./chunk-VZQG2JDV.js";
|
|
18
13
|
import {
|
|
14
|
+
promptForChoice,
|
|
15
|
+
promptForConfirmation,
|
|
16
|
+
promptForSearchableChoice,
|
|
17
|
+
shouldUseBrowsePicker,
|
|
18
|
+
shouldUseWizard
|
|
19
|
+
} from "./chunk-NAGAJ5UM.js";
|
|
20
|
+
import {
|
|
21
|
+
ON_CONFLICT_VALUE_HELP,
|
|
22
|
+
parseOnConflict
|
|
23
|
+
} from "./chunk-RFQ3N7FB.js";
|
|
24
|
+
import {
|
|
25
|
+
addResourceToPlugin,
|
|
19
26
|
applyProfilePlugin,
|
|
20
27
|
buildContentsFromResources,
|
|
21
28
|
buildHostManagedStatus,
|
|
22
29
|
buildProfileContents,
|
|
23
30
|
captureUntrackedResourcesForStash,
|
|
24
|
-
clearActiveProfileName,
|
|
25
31
|
clearGlobalProfileApply,
|
|
26
32
|
collectProfilePluginIds,
|
|
27
33
|
commitManagedPathFromLive,
|
|
34
|
+
createPlugin,
|
|
28
35
|
detectNotStagedProfileResources,
|
|
29
36
|
fileContentsEquivalentForDrift,
|
|
37
|
+
findProjectConfig,
|
|
30
38
|
flattenLiveRestoreFiles,
|
|
31
|
-
getActiveProfileName,
|
|
32
39
|
getGlobalActiveEnvironmentName,
|
|
33
|
-
|
|
40
|
+
getProfileEntry,
|
|
34
41
|
hashOnDiskFile,
|
|
35
42
|
installPluginFromCatalog,
|
|
43
|
+
isEmptyBuiltinProfile,
|
|
44
|
+
isNativeAgentPluginCachePath,
|
|
45
|
+
isProfilePlugin,
|
|
36
46
|
listMaterializationsForRootPath,
|
|
37
47
|
mergePluginsForApply,
|
|
48
|
+
normalizeResourceInput,
|
|
38
49
|
profileSkillNameMap,
|
|
50
|
+
readDiskTextOnce,
|
|
39
51
|
removeUntrackedStashFiles,
|
|
52
|
+
resolvePluginSelector,
|
|
53
|
+
resolveProfileEnvironment,
|
|
54
|
+
resourceKeyFromManagedPath,
|
|
40
55
|
restoreUntrackedStashFiles,
|
|
41
56
|
stashedFilesToDriftChanges,
|
|
57
|
+
upsertResource,
|
|
42
58
|
useEnvironmentCommand,
|
|
43
59
|
useProfileCommand,
|
|
44
60
|
withProfileApplyLock
|
|
45
|
-
} from "./chunk-
|
|
46
|
-
import {
|
|
47
|
-
promptForChoice,
|
|
48
|
-
promptForConfirmation,
|
|
49
|
-
promptForSearchableChoice,
|
|
50
|
-
shouldUseBrowsePicker,
|
|
51
|
-
shouldUseWizard
|
|
52
|
-
} from "./chunk-NAGAJ5UM.js";
|
|
61
|
+
} from "./chunk-ZUASVASP.js";
|
|
53
62
|
import {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
} from "./chunk-
|
|
63
|
+
parsePluginSelector,
|
|
64
|
+
resolveRemotePluginSelector
|
|
65
|
+
} from "./chunk-N3ZCH64F.js";
|
|
57
66
|
import {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
resolveProfileEnvironment
|
|
61
|
-
} from "./chunk-HENOKIBB.js";
|
|
67
|
+
ui
|
|
68
|
+
} from "./chunk-2A36HWDE.js";
|
|
62
69
|
import {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
70
|
+
buildHarnessLiveStatusMap,
|
|
71
|
+
classifyGlobalDriftChanges,
|
|
72
|
+
clearActiveProfileName,
|
|
73
|
+
collectOwnedGlobalProfileFiles,
|
|
74
|
+
computeGlobalProfilePanelStatus,
|
|
75
|
+
countMissingHarnessRows,
|
|
76
|
+
declaredMcpFromExpectedFiles,
|
|
77
|
+
driftChangeIsKept,
|
|
78
|
+
getActiveProfileName,
|
|
79
|
+
getLatestGlobalApplySnapshotForProfile,
|
|
66
80
|
resolveHomeRoot,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
} from "./chunk-
|
|
70
|
-
import {
|
|
71
|
-
ON_CONFLICT_VALUE_HELP,
|
|
72
|
-
parseOnConflict
|
|
73
|
-
} from "./chunk-Y2JGMICO.js";
|
|
74
|
-
import {
|
|
75
|
-
ui
|
|
76
|
-
} from "./chunk-LDVXYN6F.js";
|
|
81
|
+
resolveProjectDriftSummary,
|
|
82
|
+
withStatusReadCache
|
|
83
|
+
} from "./chunk-DF4Z7LAD.js";
|
|
77
84
|
import {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
} from "./chunk-
|
|
85
|
+
inStatusComputation,
|
|
86
|
+
runInStatusComputation
|
|
87
|
+
} from "./chunk-G6WKY2W4.js";
|
|
81
88
|
import {
|
|
82
89
|
CLI_COPY,
|
|
83
90
|
SWITCH_CHANGES_VALUES,
|
|
91
|
+
applyCancelledMessage,
|
|
84
92
|
applyHeaderLine,
|
|
85
93
|
applyWroteLine,
|
|
86
94
|
discardConfirm,
|
|
@@ -90,12 +98,15 @@ import {
|
|
|
90
98
|
getHarnesstapDir,
|
|
91
99
|
keptFilesHeader,
|
|
92
100
|
keptReasonLabel,
|
|
101
|
+
onConflictReplaceHint,
|
|
93
102
|
savedChangesLine,
|
|
94
103
|
snapshotSavedUndoLine,
|
|
95
104
|
stashedChangesLine,
|
|
105
|
+
traceCount,
|
|
106
|
+
traceSpan,
|
|
96
107
|
unsavedChangesFlagHint,
|
|
97
108
|
unsavedChangesLine
|
|
98
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-WG5A6EAU.js";
|
|
99
110
|
|
|
100
111
|
// src/utils/user-path.ts
|
|
101
112
|
import { existsSync } from "fs";
|
|
@@ -139,6 +150,12 @@ function resolveApplyConflictPolicy(opts) {
|
|
|
139
150
|
}
|
|
140
151
|
return "prompt";
|
|
141
152
|
}
|
|
153
|
+
function reportApplyCancelled(conflicts, scope = "apply") {
|
|
154
|
+
process.exitCode = 1;
|
|
155
|
+
ui.warn(applyCancelledMessage(conflicts, scope), {
|
|
156
|
+
hint: onConflictReplaceHint(conflicts)
|
|
157
|
+
});
|
|
158
|
+
}
|
|
142
159
|
async function promptMaterializationConflict(conflict) {
|
|
143
160
|
const ownerSummary = conflict.owners.length > 0 ? conflict.owners.map((owner) => `${owner.plugin_name}@${owner.plugin_version ?? "?"}`).join(", ") : "another plugin or manual edit";
|
|
144
161
|
ui.warn(`File already exists: ${conflict.path}`);
|
|
@@ -181,10 +198,14 @@ function printApplyPayload(payload) {
|
|
|
181
198
|
snapshotId: payload.snapshot_id
|
|
182
199
|
});
|
|
183
200
|
}
|
|
201
|
+
const listedKept = kept.length > 0;
|
|
184
202
|
for (const skipped of payload.skipped_removals ?? []) {
|
|
185
203
|
if (skipped.reason === "missing") {
|
|
186
204
|
continue;
|
|
187
205
|
}
|
|
206
|
+
if (listedKept && removalSkipReason(skipped.reason)) {
|
|
207
|
+
continue;
|
|
208
|
+
}
|
|
188
209
|
if (skipped.message) {
|
|
189
210
|
ui.warn(skipped.message);
|
|
190
211
|
}
|
|
@@ -246,7 +267,7 @@ function printApplySuccess(input) {
|
|
|
246
267
|
unchanged: input.unchanged
|
|
247
268
|
})
|
|
248
269
|
);
|
|
249
|
-
if (input.
|
|
270
|
+
if (input.kept.length > 0) {
|
|
250
271
|
printKeptFiles(input.kept);
|
|
251
272
|
}
|
|
252
273
|
if (input.snapshotId) {
|
|
@@ -266,8 +287,45 @@ function removalSkipReason(reason) {
|
|
|
266
287
|
// src/services/global-profile-drift.ts
|
|
267
288
|
import { existsSync as existsSync2, readFileSync } from "fs";
|
|
268
289
|
import { join as join2 } from "path";
|
|
290
|
+
var driftCoreComputes = 0;
|
|
291
|
+
function driftCore(fields, harness, homeRoot) {
|
|
292
|
+
const watchedPaths = (fields.expectedApply?.expected_files ?? []).map(
|
|
293
|
+
(file) => join2(homeRoot, file.path)
|
|
294
|
+
);
|
|
295
|
+
return { fields, harness, watchedPaths };
|
|
296
|
+
}
|
|
297
|
+
function keptContentDiff(path, keptModified, keptUnmanaged) {
|
|
298
|
+
if (keptModified.has(path)) {
|
|
299
|
+
return { path, type: "modified", removal_group: "owned_modified" };
|
|
300
|
+
}
|
|
301
|
+
if (keptUnmanaged.has(path)) {
|
|
302
|
+
return { path, type: "modified", removal_group: "unmanaged" };
|
|
303
|
+
}
|
|
304
|
+
return { path, type: "modified" };
|
|
305
|
+
}
|
|
306
|
+
function isMissingExpectedFileTransparent(homeRoot, path, expectedPathsByResource, scopeByResource) {
|
|
307
|
+
const mapped = resourceKeyFromManagedPath(path);
|
|
308
|
+
if (!mapped) {
|
|
309
|
+
return true;
|
|
310
|
+
}
|
|
311
|
+
const key = `${mapped.type}:${mapped.name}`;
|
|
312
|
+
const siblings = expectedPathsByResource.get(key) ?? [];
|
|
313
|
+
const onDiskSiblingPaths = siblings.filter(
|
|
314
|
+
(sibling) => sibling !== path && readGlobalFile(homeRoot, sibling) !== null
|
|
315
|
+
);
|
|
316
|
+
return isTransparentCrossHarnessGap({
|
|
317
|
+
path,
|
|
318
|
+
onDiskSiblingPaths,
|
|
319
|
+
scope: scopeByResource.get(key)
|
|
320
|
+
});
|
|
321
|
+
}
|
|
269
322
|
function readGlobalFile(homeRoot, relativePath) {
|
|
270
323
|
const fullPath = join2(homeRoot, relativePath);
|
|
324
|
+
if (!inStatusComputation()) return readGlobalFileUncached(fullPath);
|
|
325
|
+
if (!existsSync2(fullPath)) return null;
|
|
326
|
+
return readDiskTextOnce(fullPath);
|
|
327
|
+
}
|
|
328
|
+
function readGlobalFileUncached(fullPath) {
|
|
271
329
|
if (!existsSync2(fullPath)) {
|
|
272
330
|
return null;
|
|
273
331
|
}
|
|
@@ -300,25 +358,29 @@ function declaredMcpNamesFromMergedPlugins(pluginIds) {
|
|
|
300
358
|
function buildBaseStatusFields(input) {
|
|
301
359
|
const asOf = (/* @__PURE__ */ new Date()).toISOString();
|
|
302
360
|
const homeRoot = resolveHomeRoot();
|
|
303
|
-
const ownedFiles = collectOwnedGlobalProfileFiles(input.snapshotId);
|
|
304
|
-
const
|
|
305
|
-
const
|
|
361
|
+
const ownedFiles = traceSpan("db.owned-files", () => collectOwnedGlobalProfileFiles(input.snapshotId));
|
|
362
|
+
const blockingChanges = input.changes.filter((change) => !driftChangeIsKept(change));
|
|
363
|
+
const { owned, nonOwned } = classifyGlobalDriftChanges(blockingChanges, ownedFiles);
|
|
364
|
+
const declaredPins = input.pluginIds && input.pluginIds.length > 0 ? traceSpan("base.merge-plugins", () => mergePluginsForApply(input.pluginIds ?? []).pluginPins) : [];
|
|
306
365
|
const declaredFromExpected = input.expectedApply ? declaredMcpFromExpectedApply(input.expectedApply) : null;
|
|
307
366
|
const declaredMcpByHarness = declaredFromExpected?.namesByHarness ?? (input.pluginIds ? declaredMcpNamesFromMergedPlugins(input.pluginIds) : { "claude-code": [], cursor: [] });
|
|
308
|
-
const harnesses = buildHarnessLiveStatusMap({
|
|
367
|
+
const harnesses = traceSpan("base.harness-live-status", () => buildHarnessLiveStatusMap({
|
|
309
368
|
depth: input.depth,
|
|
310
369
|
homeRoot,
|
|
311
370
|
declaredPins,
|
|
312
371
|
declaredMcpByHarness,
|
|
313
372
|
...declaredFromExpected ? { expectedMcpConfigsByHarness: declaredFromExpected.configsByHarness } : {}
|
|
314
|
-
});
|
|
373
|
+
}));
|
|
315
374
|
const { missingPlugins, missingMcp } = input.depth === "full" ? countMissingHarnessRows(harnesses) : { missingPlugins: 0, missingMcp: 0 };
|
|
316
|
-
const contents = input.activeProfile ? buildProfileContents(input.activeProfile) : null;
|
|
317
|
-
const hostManaged = input.depth === "full" ?
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
375
|
+
const contents = input.activeProfile ? traceSpan("base.profile-contents", () => buildProfileContents(input.activeProfile ?? "")) : null;
|
|
376
|
+
const hostManaged = input.depth === "full" ? traceSpan(
|
|
377
|
+
"base.host-managed",
|
|
378
|
+
() => buildHostManagedStatus({
|
|
379
|
+
homeRoot,
|
|
380
|
+
profileSkills: profileSkillNameMap(contents?.resources ?? [])
|
|
381
|
+
})
|
|
382
|
+
) : void 0;
|
|
383
|
+
const projectDrift = traceSpan("base.project-drift", () => resolveProjectDriftSummary(input.projectPath));
|
|
322
384
|
const panel = computeGlobalProfilePanelStatus({
|
|
323
385
|
depth: input.depth,
|
|
324
386
|
applied: input.applied,
|
|
@@ -360,16 +422,19 @@ function buildBaseStatusFields(input) {
|
|
|
360
422
|
};
|
|
361
423
|
}
|
|
362
424
|
async function finalizeGlobalProfileStatus(fields, harness) {
|
|
363
|
-
const status = buildBaseStatusFields(fields);
|
|
425
|
+
const status = traceSpan("base", () => buildBaseStatusFields(fields));
|
|
364
426
|
if (fields.depth !== "full" || !status.active_profile || isEmptyBuiltinProfile(status.active_profile)) {
|
|
365
427
|
return status;
|
|
366
428
|
}
|
|
367
429
|
try {
|
|
368
|
-
const notStaged = await
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
430
|
+
const notStaged = await traceSpan(
|
|
431
|
+
"not-staged",
|
|
432
|
+
() => detectNotStagedProfileResources({
|
|
433
|
+
profileSelector: status.active_profile ?? "",
|
|
434
|
+
scope: "home",
|
|
435
|
+
...harness ? { harness } : {}
|
|
436
|
+
})
|
|
437
|
+
);
|
|
373
438
|
return {
|
|
374
439
|
...status,
|
|
375
440
|
untracked_resource_count: notStaged.length,
|
|
@@ -381,11 +446,38 @@ async function finalizeGlobalProfileStatus(fields, harness) {
|
|
|
381
446
|
}
|
|
382
447
|
async function detectGlobalProfileStatus(input = {}) {
|
|
383
448
|
const depth = input.depth ?? "full";
|
|
449
|
+
const request = {
|
|
450
|
+
depth,
|
|
451
|
+
harness: input.harness,
|
|
452
|
+
projectPath: input.projectPath
|
|
453
|
+
};
|
|
454
|
+
const status = await withStatusReadCache(request, () => runInStatusComputation(async () => {
|
|
455
|
+
const core = await withStatusReadCache(
|
|
456
|
+
{ ...request, includeDepth: false },
|
|
457
|
+
async () => {
|
|
458
|
+
const loaded = await loadDriftCore(input);
|
|
459
|
+
return { value: loaded, watchedPaths: loaded.watchedPaths };
|
|
460
|
+
}
|
|
461
|
+
);
|
|
462
|
+
const projected = await finalizeGlobalProfileStatus(
|
|
463
|
+
{ ...core.fields, depth },
|
|
464
|
+
core.harness
|
|
465
|
+
);
|
|
466
|
+
return { value: projected, watchedPaths: core.watchedPaths };
|
|
467
|
+
}), { staleWhileRefresh: true });
|
|
468
|
+
return {
|
|
469
|
+
...status,
|
|
470
|
+
as_of: (/* @__PURE__ */ new Date()).toISOString(),
|
|
471
|
+
refreshing: status.refreshing === true
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
async function loadDriftCore(input) {
|
|
475
|
+
driftCoreComputes += 1;
|
|
476
|
+
const homeRoot = resolveHomeRoot();
|
|
384
477
|
const activeProfile = getActiveProfileName() ?? null;
|
|
385
478
|
if (!activeProfile) {
|
|
386
|
-
return
|
|
479
|
+
return driftCore(
|
|
387
480
|
{
|
|
388
|
-
depth,
|
|
389
481
|
activeProfile: null,
|
|
390
482
|
profileExists: false,
|
|
391
483
|
applied: false,
|
|
@@ -396,10 +488,11 @@ async function detectGlobalProfileStatus(input = {}) {
|
|
|
396
488
|
changes: [],
|
|
397
489
|
projectPath: input.projectPath
|
|
398
490
|
},
|
|
399
|
-
input.harness
|
|
491
|
+
input.harness,
|
|
492
|
+
homeRoot
|
|
400
493
|
);
|
|
401
494
|
}
|
|
402
|
-
const plugin = resolvePluginSelector(activeProfile);
|
|
495
|
+
const plugin = traceSpan("db.resolve-profile", () => resolvePluginSelector(activeProfile));
|
|
403
496
|
if (!plugin) {
|
|
404
497
|
if (isEmptyBuiltinProfile(activeProfile)) {
|
|
405
498
|
const latestSnapshot2 = getLatestGlobalApplySnapshotForProfile(activeProfile);
|
|
@@ -412,8 +505,7 @@ async function detectGlobalProfileStatus(input = {}) {
|
|
|
412
505
|
pull: false
|
|
413
506
|
});
|
|
414
507
|
} catch (error) {
|
|
415
|
-
return
|
|
416
|
-
depth,
|
|
508
|
+
return driftCore({
|
|
417
509
|
activeProfile,
|
|
418
510
|
profileExists: true,
|
|
419
511
|
applied: Boolean(latestSnapshot2),
|
|
@@ -425,13 +517,12 @@ async function detectGlobalProfileStatus(input = {}) {
|
|
|
425
517
|
warning: error instanceof Error ? error.message : String(error),
|
|
426
518
|
projectPath: input.projectPath,
|
|
427
519
|
pluginIds: []
|
|
428
|
-
});
|
|
520
|
+
}, input.harness, homeRoot);
|
|
429
521
|
}
|
|
430
522
|
const stackInSync2 = latestSnapshot2 ? pluginIdsMatch(latestSnapshot2.plugin_ids, expectedApply2.configured_plugin_ids) : false;
|
|
431
523
|
const applied2 = Boolean(latestSnapshot2);
|
|
432
524
|
const hasDrift2 = !applied2 || !stackInSync2;
|
|
433
|
-
return
|
|
434
|
-
depth,
|
|
525
|
+
return driftCore({
|
|
435
526
|
activeProfile,
|
|
436
527
|
profileExists: true,
|
|
437
528
|
applied: applied2,
|
|
@@ -443,10 +534,9 @@ async function detectGlobalProfileStatus(input = {}) {
|
|
|
443
534
|
projectPath: input.projectPath,
|
|
444
535
|
expectedApply: expectedApply2,
|
|
445
536
|
pluginIds: []
|
|
446
|
-
});
|
|
537
|
+
}, input.harness, homeRoot);
|
|
447
538
|
}
|
|
448
|
-
return
|
|
449
|
-
depth,
|
|
539
|
+
return driftCore({
|
|
450
540
|
activeProfile,
|
|
451
541
|
profileExists: false,
|
|
452
542
|
applied: false,
|
|
@@ -457,11 +547,10 @@ async function detectGlobalProfileStatus(input = {}) {
|
|
|
457
547
|
changes: [],
|
|
458
548
|
warning: `missing plugin "${activeProfile}"`,
|
|
459
549
|
projectPath: input.projectPath
|
|
460
|
-
});
|
|
550
|
+
}, input.harness, homeRoot);
|
|
461
551
|
}
|
|
462
552
|
if (!isProfilePlugin(plugin)) {
|
|
463
|
-
return
|
|
464
|
-
depth,
|
|
553
|
+
return driftCore({
|
|
465
554
|
activeProfile,
|
|
466
555
|
profileExists: true,
|
|
467
556
|
applied: false,
|
|
@@ -472,24 +561,26 @@ async function detectGlobalProfileStatus(input = {}) {
|
|
|
472
561
|
changes: [],
|
|
473
562
|
warning: `plugin "${plugin.name}" is not tagged as a profile`,
|
|
474
563
|
projectPath: input.projectPath
|
|
475
|
-
});
|
|
564
|
+
}, input.harness, homeRoot);
|
|
476
565
|
}
|
|
477
566
|
const latestSnapshot = getLatestGlobalApplySnapshotForProfile(activeProfile);
|
|
478
|
-
const homeRoot = resolveHomeRoot();
|
|
479
567
|
const pluginIds = collectProfilePluginIds(plugin);
|
|
480
568
|
let expectedApply;
|
|
481
569
|
try {
|
|
482
|
-
expectedApply = await
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
570
|
+
expectedApply = await traceSpan(
|
|
571
|
+
"dry-run",
|
|
572
|
+
() => applyProfilePlugin(activeProfile, {
|
|
573
|
+
dryRun: true,
|
|
574
|
+
harness: input.harness,
|
|
575
|
+
conflictPolicy: "replace",
|
|
576
|
+
pull: false,
|
|
577
|
+
pinSkillEmits: false,
|
|
578
|
+
mergeLiveSkillMarkdown: false
|
|
579
|
+
})
|
|
580
|
+
);
|
|
581
|
+
traceCount("dry-run", "expected_files", expectedApply.expected_files?.length ?? 0);
|
|
490
582
|
} catch (error) {
|
|
491
|
-
return
|
|
492
|
-
depth,
|
|
583
|
+
return driftCore({
|
|
493
584
|
activeProfile,
|
|
494
585
|
profileExists: true,
|
|
495
586
|
applied: Boolean(latestSnapshot),
|
|
@@ -501,54 +592,76 @@ async function detectGlobalProfileStatus(input = {}) {
|
|
|
501
592
|
warning: error instanceof Error ? error.message : String(error),
|
|
502
593
|
projectPath: input.projectPath,
|
|
503
594
|
pluginIds
|
|
504
|
-
});
|
|
595
|
+
}, input.harness, homeRoot);
|
|
505
596
|
}
|
|
506
597
|
const stackInSync = latestSnapshot ? pluginIdsMatch(latestSnapshot.plugin_ids, expectedApply.configured_plugin_ids) : false;
|
|
507
598
|
const changes = [];
|
|
599
|
+
const keptModified = new Set(expectedApply.removals?.owned_modified ?? []);
|
|
600
|
+
const keptUnmanaged = new Set(expectedApply.removals?.unmanaged ?? []);
|
|
601
|
+
const scopeByResource = resourceScopesForPlugins(pluginIds);
|
|
602
|
+
const expectedPathsByResource = /* @__PURE__ */ new Map();
|
|
508
603
|
for (const file of expectedApply.expected_files ?? []) {
|
|
509
|
-
const
|
|
510
|
-
|
|
511
|
-
if (current === null) {
|
|
512
|
-
if (owned.length === 0) {
|
|
513
|
-
continue;
|
|
514
|
-
}
|
|
515
|
-
changes.push(
|
|
516
|
-
withAffectedResources({ path: file.path, type: "deleted" }, file.content, null)
|
|
517
|
-
);
|
|
604
|
+
const mapped = resourceKeyFromManagedPath(file.path);
|
|
605
|
+
if (!mapped) {
|
|
518
606
|
continue;
|
|
519
607
|
}
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
608
|
+
const key = `${mapped.type}:${mapped.name}`;
|
|
609
|
+
const paths = expectedPathsByResource.get(key) ?? [];
|
|
610
|
+
paths.push(file.path);
|
|
611
|
+
expectedPathsByResource.set(key, paths);
|
|
612
|
+
}
|
|
613
|
+
traceSpan("drift.compare-files", () => {
|
|
614
|
+
for (const file of expectedApply.expected_files ?? []) {
|
|
615
|
+
if (isNativeAgentPluginCachePath(file.path)) continue;
|
|
616
|
+
const current = readGlobalFile(homeRoot, file.path);
|
|
617
|
+
const owned = listMaterializationsForRootPath(homeRoot, file.path);
|
|
618
|
+
if (current === null) {
|
|
619
|
+
if (owned.length === 0 && isMissingExpectedFileTransparent(
|
|
620
|
+
homeRoot,
|
|
621
|
+
file.path,
|
|
622
|
+
expectedPathsByResource,
|
|
623
|
+
scopeByResource
|
|
624
|
+
)) {
|
|
625
|
+
continue;
|
|
626
|
+
}
|
|
627
|
+
changes.push(
|
|
628
|
+
withAffectedResources({ path: file.path, type: "deleted" }, file.content, null)
|
|
629
|
+
);
|
|
523
630
|
continue;
|
|
524
631
|
}
|
|
525
|
-
if (
|
|
632
|
+
if (owned.length > 0) {
|
|
633
|
+
const diskHash = hashOnDiskFile(join2(homeRoot, file.path));
|
|
634
|
+
if (owned.some((row) => row.generated_hash === diskHash)) {
|
|
635
|
+
continue;
|
|
636
|
+
}
|
|
637
|
+
if (fileContentsEquivalentForDrift(file.path, current, file.content)) {
|
|
638
|
+
continue;
|
|
639
|
+
}
|
|
640
|
+
changes.push(
|
|
641
|
+
withAffectedResources(
|
|
642
|
+
keptContentDiff(file.path, keptModified, keptUnmanaged),
|
|
643
|
+
file.content,
|
|
644
|
+
current
|
|
645
|
+
)
|
|
646
|
+
);
|
|
526
647
|
continue;
|
|
527
648
|
}
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
if (!fileContentsEquivalentForDrift(file.path, current, file.content)) {
|
|
538
|
-
changes.push(
|
|
539
|
-
withAffectedResources(
|
|
540
|
-
{ path: file.path, type: "modified" },
|
|
541
|
-
file.content,
|
|
542
|
-
current
|
|
543
|
-
)
|
|
544
|
-
);
|
|
649
|
+
if (!fileContentsEquivalentForDrift(file.path, current, file.content)) {
|
|
650
|
+
changes.push(
|
|
651
|
+
withAffectedResources(
|
|
652
|
+
keptContentDiff(file.path, keptModified, keptUnmanaged),
|
|
653
|
+
file.content,
|
|
654
|
+
current
|
|
655
|
+
)
|
|
656
|
+
);
|
|
657
|
+
}
|
|
545
658
|
}
|
|
546
|
-
}
|
|
659
|
+
});
|
|
547
660
|
const applied = Boolean(latestSnapshot);
|
|
548
|
-
const
|
|
549
|
-
|
|
661
|
+
const blockingChanges = changes.filter((change) => !driftChangeIsKept(change));
|
|
662
|
+
const hasDrift = !applied || !stackInSync || blockingChanges.length > 0;
|
|
663
|
+
return driftCore(
|
|
550
664
|
{
|
|
551
|
-
depth,
|
|
552
665
|
activeProfile,
|
|
553
666
|
profileExists: true,
|
|
554
667
|
applied,
|
|
@@ -561,7 +674,8 @@ async function detectGlobalProfileStatus(input = {}) {
|
|
|
561
674
|
expectedApply,
|
|
562
675
|
pluginIds
|
|
563
676
|
},
|
|
564
|
-
input.harness
|
|
677
|
+
input.harness,
|
|
678
|
+
homeRoot
|
|
565
679
|
);
|
|
566
680
|
}
|
|
567
681
|
|
|
@@ -1337,6 +1451,7 @@ async function executeProjectUse(options = {}) {
|
|
|
1337
1451
|
export {
|
|
1338
1452
|
resolveUserPath,
|
|
1339
1453
|
resolveApplyConflictPolicy,
|
|
1454
|
+
reportApplyCancelled,
|
|
1340
1455
|
promptMaterializationConflict,
|
|
1341
1456
|
printApplyPayload,
|
|
1342
1457
|
printApplyDryRun,
|
|
@@ -1354,4 +1469,4 @@ export {
|
|
|
1354
1469
|
importProjectConfigEnvironments,
|
|
1355
1470
|
executeProjectUse
|
|
1356
1471
|
};
|
|
1357
|
-
//# sourceMappingURL=chunk-
|
|
1472
|
+
//# sourceMappingURL=chunk-R7ZOYVN3.js.map
|