@uniqbit/mate-core 0.15.5-canary.2 → 0.15.5-canary.4
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/package.json
CHANGED
package/src/lib/install.ts
CHANGED
|
@@ -130,6 +130,8 @@ export async function resolveInstallContext(
|
|
|
130
130
|
if (root.kind === "working") return workingContext();
|
|
131
131
|
if (root.kind === "core" || !root.rootPath || !root.config) return coreContext();
|
|
132
132
|
|
|
133
|
+
const { hub: _hub, ...installConfig } = root.config;
|
|
134
|
+
|
|
133
135
|
return {
|
|
134
136
|
kind: root.kind,
|
|
135
137
|
companionPath: root.rootPath,
|
|
@@ -137,7 +139,7 @@ export async function resolveInstallContext(
|
|
|
137
139
|
fingerprint: fingerprint({
|
|
138
140
|
kind: root.kind,
|
|
139
141
|
companionPath: root.rootPath,
|
|
140
|
-
config:
|
|
142
|
+
config: installConfig,
|
|
141
143
|
}),
|
|
142
144
|
};
|
|
143
145
|
}
|
|
@@ -126,13 +126,25 @@ export async function executeSetupInstallationPlan(
|
|
|
126
126
|
});
|
|
127
127
|
|
|
128
128
|
for (const action of plan.actions) {
|
|
129
|
-
if (ctx.scope === "hub" && action.phase !== "provider") continue;
|
|
130
|
-
|
|
131
129
|
const plugin = pluginById.get(action.pluginId);
|
|
132
130
|
if (!plugin) {
|
|
133
131
|
continue;
|
|
134
132
|
}
|
|
135
133
|
|
|
134
|
+
if (ctx.scope === "hub" && action.phase !== "provider") {
|
|
135
|
+
if (action.phase === "capability" && !action.providerId) {
|
|
136
|
+
const capability = plugin as CapabilityPlugin;
|
|
137
|
+
const hubHandler = action.action === "apply" ? capability.applyHub : capability.teardownHub;
|
|
138
|
+
if (hubHandler) {
|
|
139
|
+
mediator.track(action.pluginId);
|
|
140
|
+
const actionCtx: SetupContext = { ...ctx, ...mediator.servicesFor(action.pluginId) };
|
|
141
|
+
await hubHandler(actionCtx);
|
|
142
|
+
executedActions.push(action);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
|
|
136
148
|
if (action.skipReason) {
|
|
137
149
|
skippedActions.push(action);
|
|
138
150
|
const warning = `${action.pluginId} capability disabled: ${action.skipReason}`;
|
|
@@ -228,4 +228,11 @@ export interface CapabilityPlugin extends Plugin {
|
|
|
228
228
|
preflight?(ctx: LaunchPreflightContext): Promise<string[]>;
|
|
229
229
|
}
|
|
230
230
|
>;
|
|
231
|
+
/**
|
|
232
|
+
* Hub-scope counterparts to apply/teardown. The engine calls these instead
|
|
233
|
+
* of apply/teardown when ctx.scope === "hub", never in addition. Absent
|
|
234
|
+
* hooks keep the capability-phase action skipped for hub scope, unchanged.
|
|
235
|
+
*/
|
|
236
|
+
applyHub?(ctx: SetupContext): Promise<void>;
|
|
237
|
+
teardownHub?(ctx: SetupContext): Promise<void>;
|
|
231
238
|
}
|
|
@@ -62,7 +62,11 @@ async function configureClaudeGuidance(companionPath: string): Promise<void> {
|
|
|
62
62
|
);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
const COMPANION_GITIGNORE_ENTRIES = [
|
|
65
|
+
const COMPANION_GITIGNORE_ENTRIES = [
|
|
66
|
+
".claude/settings.local.json",
|
|
67
|
+
".claude/settings.local.json.bak",
|
|
68
|
+
".claude/state/",
|
|
69
|
+
];
|
|
66
70
|
|
|
67
71
|
// Command substrings that mark a working-repo hook group as Mate-managed.
|
|
68
72
|
// The mate plugin hooks (validate-artifact-path, mate-session-banner,
|