@agentxm/extension-lifecycle 0.29.4 → 0.30.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/dist/src/activation/set-activation.d.ts +22 -40
- package/dist/src/activation/set-activation.js +191 -336
- package/dist/src/demote/demote-to-external-source.d.ts +1 -1
- package/dist/src/demote/demote-to-external-source.js +53 -24
- package/dist/src/hooks/install/plan.js +6 -3
- package/dist/src/hooks/uninstall/plan.js +4 -3
- package/dist/src/index.d.ts +1 -2
- package/dist/src/index.js +1 -2
- package/dist/src/install/root-intent.d.ts +2 -2
- package/dist/src/install/vocabulary.d.ts +5 -4
- package/dist/src/knowledge/install/plan.js +2 -1
- package/dist/src/knowledge/uninstall/plan.js +4 -3
- package/dist/src/mcps/install/plan.js +2 -3
- package/dist/src/mcps/operations/uninstall.js +2 -1
- package/dist/src/mcps/uninstall/plan.js +13 -4
- package/dist/src/packs/graph-transition.d.ts +0 -25
- package/dist/src/packs/graph-transition.js +0 -101
- package/dist/src/packs/install/plan.d.ts +0 -13
- package/dist/src/packs/install/plan.js +12 -9
- package/dist/src/packs/member-install-step.js +8 -21
- package/dist/src/packs/promote-authored-pack.js +6 -3
- package/dist/src/packs/uninstall/plan.js +52 -20
- package/dist/src/rules/install/plan.js +6 -3
- package/dist/src/rules/uninstall/plan.js +4 -3
- package/dist/src/skills/install/bundled.js +4 -4
- package/dist/src/skills/install/plan.js +3 -2
- package/dist/src/skills/operations/install.d.ts +0 -1
- package/dist/src/skills/operations/install.js +9 -18
- package/dist/src/skills/uninstall/plan.js +4 -3
- package/dist/src/subagents/install/plan.js +3 -2
- package/dist/src/subagents/operations/enable.js +1 -3
- package/dist/src/subagents/uninstall/plan.js +4 -3
- package/dist/src/testing.d.ts +1 -1
- package/dist/src/testing.js +2 -1
- package/dist/src/uninstall/root-intent.d.ts +1 -1
- package/dist/src/uninstall/uninstall-extensions.d.ts +1 -1
- package/dist/src/uninstall/uninstall-extensions.js +77 -1
- package/dist/src/update/root-request.d.ts +2 -2
- package/dist/src/update/selective/skills.d.ts +1 -1
- package/dist/src/update/selective/skills.js +0 -1
- package/dist/src/update/selective/subagents.d.ts +1 -1
- package/dist/src/update/selective/subagents.js +3 -2
- package/dist/src/update/selective/use-case.d.ts +2 -2
- package/dist/src/update/targeted-plan.js +4 -2
- package/dist/src/workspace-paths.d.ts +0 -6
- package/dist/src/workspace-paths.js +0 -10
- package/package.json +22 -24
- package/dist/src/uninstall/retention-policy.d.ts +0 -21
- package/dist/src/uninstall/retention-policy.js +0 -28
|
@@ -11,7 +11,10 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import * as Effect from "effect/Effect";
|
|
13
13
|
import * as Option from "effect/Option";
|
|
14
|
+
import { proposeDesiredState, prepareUninstallArtifact, collectCleanupStep, buildReconciliationClosure, } from "@agentxm/workspace-reconciliation";
|
|
15
|
+
import { lifecycleStepFailure } from "../step-failure.js";
|
|
14
16
|
import { operationPresentation, prepareExecutionCandidate, resolveExecutionCandidate, } from "@agentxm/workspace-operations";
|
|
17
|
+
import { ExtensionLifecycleFailed } from "../errors.js";
|
|
15
18
|
import { parseHookUninstallRequest, planHookUninstall } from "../hooks/uninstall/plan.js";
|
|
16
19
|
import { parseKnowledgeUninstallRequest, planKnowledgeUninstall, } from "../knowledge/uninstall/plan.js";
|
|
17
20
|
import { parseMcpServerUninstallRequest, planMcpServerUninstall } from "../mcps/uninstall/plan.js";
|
|
@@ -91,19 +94,92 @@ export const prepareUninstallExtensions = Effect.fn("UninstallExtensions.prepare
|
|
|
91
94
|
onNone: () => resolveRootUninstallIntent(request.selector).pipe(Effect.map((intent) => ({ type: intent.type, selector: intent.name }))),
|
|
92
95
|
});
|
|
93
96
|
const planned = yield* planForType(resolved.type, resolved.selector);
|
|
97
|
+
const proposal = yield* proposeDesiredState(planned.names.map((name) => ({ kind: "remove", type: resolved.type, name }))).pipe(Effect.mapError((cause) => new ExtensionLifecycleFailed({
|
|
98
|
+
category: "conflict",
|
|
99
|
+
detail: "Cannot derive desired state after uninstall",
|
|
100
|
+
cause,
|
|
101
|
+
})));
|
|
94
102
|
// The plan's own name stands whichever spelling produced it: the removal a
|
|
95
103
|
// person asked for is type-specific, and the plan name is what they read.
|
|
96
104
|
// Only the presented subject varies — the root form routes across every
|
|
97
105
|
// type, so it presents the default subject rather than the one this
|
|
98
106
|
// request happened to settle on.
|
|
107
|
+
const leafType = resolved.type === "pack" ? undefined : resolved.type;
|
|
108
|
+
const artifacts = leafType === undefined
|
|
109
|
+
? []
|
|
110
|
+
: yield* Effect.forEach(planned.names, (name) => prepareUninstallArtifact({ type: leafType, name }, proposal)).pipe(Effect.mapError((cause) => new ExtensionLifecycleFailed({
|
|
111
|
+
category: "conflict",
|
|
112
|
+
detail: "Cannot establish uninstall effects",
|
|
113
|
+
cause,
|
|
114
|
+
})));
|
|
115
|
+
const artifactByName = new Map(planned.names.flatMap((name, index) => artifacts[index] === undefined ? [] : [[name, artifacts[index]]]));
|
|
116
|
+
const cleanupAdapter = {
|
|
117
|
+
toStepFailure: (cause) => lifecycleStepFailure(new ExtensionLifecycleFailed({
|
|
118
|
+
category: "conflict",
|
|
119
|
+
detail: "detail" in cause ? cause.detail : cause._tag,
|
|
120
|
+
cause,
|
|
121
|
+
})),
|
|
122
|
+
};
|
|
123
|
+
const activeNames = (type) => new Set(proposal.after.nodes
|
|
124
|
+
.filter((node) => node.type === type && node.enabled)
|
|
125
|
+
.map((node) => node.name));
|
|
126
|
+
const jobs = yield* Effect.forEach(planned.plan.jobs, (job) => Effect.gen(function* () {
|
|
127
|
+
const steps = yield* Effect.forEach(job.steps, (step) => Effect.gen(function* () {
|
|
128
|
+
const artifact = artifactByName.get(step.label ?? "");
|
|
129
|
+
if (artifact === undefined ||
|
|
130
|
+
step.readiness === "error" ||
|
|
131
|
+
leafType === undefined ||
|
|
132
|
+
((artifact.targets?.length ?? 0) === 0 && (artifact.references?.length ?? 0) === 0))
|
|
133
|
+
return step;
|
|
134
|
+
const cleanup = yield* collectCleanupStep({
|
|
135
|
+
expectedSkillNames: activeNames("skill"),
|
|
136
|
+
expectedSubagentNames: activeNames("subagent"),
|
|
137
|
+
expectedMcpServerNames: activeNames("mcp-server"),
|
|
138
|
+
expectedHookNames: activeNames("hook"),
|
|
139
|
+
subjects: [{ type: leafType, name: step.label }],
|
|
140
|
+
adapter: cleanupAdapter,
|
|
141
|
+
}).pipe(Effect.mapError((cause) => new ExtensionLifecycleFailed({
|
|
142
|
+
category: "conflict",
|
|
143
|
+
detail: "Cannot establish owned uninstall outputs",
|
|
144
|
+
cause,
|
|
145
|
+
})));
|
|
146
|
+
const removal = {
|
|
147
|
+
...step,
|
|
148
|
+
artifact,
|
|
149
|
+
run: step.run.pipe(Effect.map((result) => result.result === "success" ? { ...result, artifact } : result)),
|
|
150
|
+
};
|
|
151
|
+
if (Option.isNone(cleanup))
|
|
152
|
+
return removal;
|
|
153
|
+
return yield* buildReconciliationClosure({
|
|
154
|
+
label: step.label,
|
|
155
|
+
message: `Uninstalled ${step.label}`,
|
|
156
|
+
artifact,
|
|
157
|
+
children: [
|
|
158
|
+
{ step: cleanup.value, coverage: "ineligible" },
|
|
159
|
+
{ step: removal, coverage: "eligible" },
|
|
160
|
+
],
|
|
161
|
+
toStepFailure: (failure) => failure._tag === "StepFailure" ? failure : cleanupAdapter.toStepFailure(failure),
|
|
162
|
+
validate: Effect.void,
|
|
163
|
+
});
|
|
164
|
+
}));
|
|
165
|
+
return { ...job, steps };
|
|
166
|
+
}));
|
|
99
167
|
const plan = {
|
|
100
168
|
...planned.plan,
|
|
169
|
+
jobs,
|
|
101
170
|
presentation: operationPresentation({ imperative: "uninstall", past: "Uninstalled", gerund: "Uninstalling" }, Option.getOrUndefined(request.type)),
|
|
102
171
|
};
|
|
103
172
|
// Every removal withdraws the extension's per-agent projection, so the
|
|
104
173
|
// candidate carries the configured-agent operation the resolution projects
|
|
105
174
|
// before the removal and verifies after it.
|
|
106
|
-
const configuredAgentOperations = planned.names.map((name) =>
|
|
175
|
+
const configuredAgentOperations = planned.names.map((name) => {
|
|
176
|
+
const retained = proposal.after.nodes.find((node) => node.type === resolved.type && node.name === name);
|
|
177
|
+
return {
|
|
178
|
+
extensionType: resolved.type,
|
|
179
|
+
name,
|
|
180
|
+
plannedState: retained === undefined ? "absent" : retained.enabled ? "enabled" : "disabled",
|
|
181
|
+
};
|
|
182
|
+
});
|
|
107
183
|
const execution = yield* prepareExecutionCandidate(plan, { configuredAgentOperations });
|
|
108
184
|
return {
|
|
109
185
|
type: resolved.type,
|
|
@@ -18,8 +18,8 @@ import { ExtensionLifecycleFailed } from "../errors.js";
|
|
|
18
18
|
import { type InstallableExtensionType } from "@agentxm/extension-model/unstable/extensions/installable-types";
|
|
19
19
|
import { type ExtensionName, type Handle } from "@agentxm/extension-model/unstable/extensions";
|
|
20
20
|
import type { VersionRange } from "@agentxm/extension-model/unstable/version-constraints";
|
|
21
|
-
export declare const rootUpdatableTypeSegments: readonly ("knowledge" | "rules" | "hooks" | "
|
|
22
|
-
export declare const RootUpdatableTypeSegmentSchema: Schema.Literals<readonly ("knowledge" | "rules" | "hooks" | "
|
|
21
|
+
export declare const rootUpdatableTypeSegments: readonly ("knowledge" | "rules" | "hooks" | "skills" | "subagents" | "packs" | "mcps")[];
|
|
22
|
+
export declare const RootUpdatableTypeSegmentSchema: Schema.Literals<readonly ("knowledge" | "rules" | "hooks" | "skills" | "subagents" | "packs" | "mcps")[]>;
|
|
23
23
|
export type RootUpdatableTypeSegment = typeof RootUpdatableTypeSegmentSchema.Type;
|
|
24
24
|
export type RootUpdatableType = InstallableExtensionType;
|
|
25
25
|
/** One Registry identity a root update names, with the range it requested. */
|
|
@@ -51,5 +51,5 @@ export declare const prepareSelectiveSkillUpdate: (request: SelectiveSkillUpdate
|
|
|
51
51
|
reason?: never;
|
|
52
52
|
message?: never;
|
|
53
53
|
planDescription?: never;
|
|
54
|
-
}, ExtensionLifecycleFailed | import("@agentxm/extension-sources").SourceSyntaxInvalid | import("@agentxm/extension-sources").SourceHostNotConfigured | import("@agentxm/extension-sources").SourceNotResolvable | import("@agentxm/extension-sources").SourceNetworkFailure | import("@agentxm/extension-sources").GitOperationFailed | import("@agentxm/extension-sources").WorkspaceCatalogUnavailable | import("@agentxm/extension-sources").AxmSkillGateUnavailable | import("@agentxm/registry-client").RegistryProblem | import("@agentxm/registry-client").RegistryRequestFailed | import("@agentxm/registry-client").RegistryOperationFailed | import("@agentxm/workspace-state").SettingsIoError | import("@agentxm/workspace-state").SettingsParseError | import("@agentxm/workspace-state").SettingsDecodeError | import("@agentxm/workspace-state").LockfileIoError | import("@agentxm/workspace-state").LockfileParseError | import("@agentxm/workspace-state").LockfileDecodeError | import("@agentxm/workspace-state").LockfileVersionUnsupported | import("@agentxm/workspace-state").WorkspaceRootEscape | import("@agentxm/workspace-state").LockfileValidationError | import("@agentxm/extension-resolution").ExtensionResolutionFailed | import("@agentxm/workspace-operations").CandidateFingerprintFailed, import("effect/FileSystem").FileSystem | import("effect/Path").Path | WorkspaceMutations | import("
|
|
54
|
+
}, ExtensionLifecycleFailed | import("@agentxm/extension-sources").SourceSyntaxInvalid | import("@agentxm/extension-sources").SourceHostNotConfigured | import("@agentxm/extension-sources").SourceNotResolvable | import("@agentxm/extension-sources").SourceNetworkFailure | import("@agentxm/extension-sources").GitOperationFailed | import("@agentxm/extension-sources").WorkspaceCatalogUnavailable | import("@agentxm/extension-sources").AxmSkillGateUnavailable | import("@agentxm/registry-client").RegistryProblem | import("@agentxm/registry-client").RegistryRequestFailed | import("@agentxm/registry-client").RegistryOperationFailed | import("@agentxm/workspace-state").SettingsIoError | import("@agentxm/workspace-state").SettingsParseError | import("@agentxm/workspace-state").SettingsDecodeError | import("@agentxm/workspace-state").LockfileIoError | import("@agentxm/workspace-state").LockfileParseError | import("@agentxm/workspace-state").LockfileDecodeError | import("@agentxm/workspace-state").LockfileVersionUnsupported | import("@agentxm/workspace-state").WorkspaceRootEscape | import("@agentxm/workspace-state").LockfileValidationError | import("@agentxm/extension-resolution").ExtensionResolutionFailed | import("@agentxm/workspace-operations").CandidateFingerprintFailed, import("effect/FileSystem").FileSystem | import("effect/Path").Path | WorkspaceMutations | import("effect/unstable/http/HttpClient").HttpClient | import("@agentxm/workspace-state").ConfiguredAgentOutcomesProvider | import("@agentxm/extension-resolution").ReleaseAgePosture | import("effect/Scope").Scope | SourceHostProviders | import("@agentxm/extension-sources").WorkspaceCatalog>;
|
|
55
55
|
//# sourceMappingURL=skills.d.ts.map
|
|
@@ -532,7 +532,6 @@ export const prepareSelectiveSkillUpdate = Effect.fn("SelectiveSkillUpdate.prepa
|
|
|
532
532
|
ref: item.ref,
|
|
533
533
|
force: request.ignoreVersionConstraints || item.ref.refType !== "registry",
|
|
534
534
|
versionRange: item.versionRange,
|
|
535
|
-
skipSettings: Option.none(),
|
|
536
535
|
strictUnknownAgents: Option.none(),
|
|
537
536
|
sourceName: Option.none(),
|
|
538
537
|
},
|
|
@@ -48,5 +48,5 @@ export declare const prepareSelectiveSubagentUpdate: (request: SelectiveSubagent
|
|
|
48
48
|
reason?: never;
|
|
49
49
|
message?: never;
|
|
50
50
|
planDescription?: never;
|
|
51
|
-
}, ExtensionLifecycleFailed | import("@agentxm/extension-sources").SourceSyntaxInvalid | import("@agentxm/extension-sources").SourceHostNotConfigured | import("@agentxm/extension-sources").SourceNotResolvable | import("@agentxm/extension-sources").SourceNetworkFailure | import("@agentxm/extension-sources").GitOperationFailed | import("@agentxm/extension-sources").WorkspaceCatalogUnavailable | import("@agentxm/extension-sources").AxmSkillGateUnavailable | import("@agentxm/registry-client").RegistryProblem | import("@agentxm/registry-client").RegistryRequestFailed | import("@agentxm/registry-client").RegistryOperationFailed | import("@agentxm/workspace-state").SettingsIoError | import("@agentxm/workspace-state").SettingsParseError | import("@agentxm/workspace-state").SettingsDecodeError | import("@agentxm/workspace-state").LockfileIoError | import("@agentxm/workspace-state").LockfileParseError | import("@agentxm/workspace-state").LockfileDecodeError | import("@agentxm/workspace-state").LockfileVersionUnsupported | import("@agentxm/workspace-state").WorkspaceRootEscape | import("@agentxm/workspace-state").LockfileValidationError | import("@agentxm/extension-resolution").ExtensionResolutionFailed | import("@agentxm/workspace-operations").CandidateFingerprintFailed, StepFailureConversion | import("effect/FileSystem").FileSystem | import("effect/Path").Path | WorkspaceMutations | import("
|
|
51
|
+
}, ExtensionLifecycleFailed | import("@agentxm/extension-sources").SourceSyntaxInvalid | import("@agentxm/extension-sources").SourceHostNotConfigured | import("@agentxm/extension-sources").SourceNotResolvable | import("@agentxm/extension-sources").SourceNetworkFailure | import("@agentxm/extension-sources").GitOperationFailed | import("@agentxm/extension-sources").WorkspaceCatalogUnavailable | import("@agentxm/extension-sources").AxmSkillGateUnavailable | import("@agentxm/registry-client").RegistryProblem | import("@agentxm/registry-client").RegistryRequestFailed | import("@agentxm/registry-client").RegistryOperationFailed | import("@agentxm/workspace-state").SettingsIoError | import("@agentxm/workspace-state").SettingsParseError | import("@agentxm/workspace-state").SettingsDecodeError | import("@agentxm/workspace-state").LockfileIoError | import("@agentxm/workspace-state").LockfileParseError | import("@agentxm/workspace-state").LockfileDecodeError | import("@agentxm/workspace-state").LockfileVersionUnsupported | import("@agentxm/workspace-state").WorkspaceRootEscape | import("@agentxm/workspace-state").LockfileValidationError | import("@agentxm/extension-resolution").ExtensionResolutionFailed | import("@agentxm/workspace-operations").CandidateFingerprintFailed, StepFailureConversion | import("effect/FileSystem").FileSystem | import("effect/Path").Path | WorkspaceMutations | import("effect/unstable/http/HttpClient").HttpClient | import("@agentxm/workspace-state").ConfiguredAgentOutcomesProvider | import("@agentxm/extension-resolution").ReleaseAgePosture | import("effect/Scope").Scope | SourceHostProviders | SubagentManager | import("@agentxm/extension-sources").WorkspaceCatalog>;
|
|
52
52
|
//# sourceMappingURL=subagents.d.ts.map
|
|
@@ -15,7 +15,8 @@ import * as Effect from "effect/Effect";
|
|
|
15
15
|
import * as Option from "effect/Option";
|
|
16
16
|
import { decodeExtensionNameSync, parseSourceQualifiedRegistrySourcePatternParts, } from "@agentxm/extension-model/unstable/extensions";
|
|
17
17
|
import { isWorkspaceSourceLocator } from "@agentxm/extension-model/unstable/sources/workspace";
|
|
18
|
-
import {
|
|
18
|
+
import { SubagentManager } from "@agentxm/extension-materialization";
|
|
19
|
+
import { buildInstallOperation } from "@agentxm/workspace-reconciliation";
|
|
19
20
|
import { classifyPublisherBindingTransition, makeConfiguredReleaseAgeEvaluation, normalizeReleaseAgeRecords, publisherTransitionWarning, registryBindingProposal, } from "@agentxm/extension-resolution";
|
|
20
21
|
import { resolveSource, SourceHostProviders } from "@agentxm/extension-sources";
|
|
21
22
|
import { operationPresentation, prepareExecutionCandidate, StepFailure, } from "@agentxm/workspace-operations";
|
|
@@ -271,7 +272,7 @@ export const prepareSelectiveSubagentUpdate = Effect.fn("SelectiveSubagentUpdate
|
|
|
271
272
|
const step = buildInstallOperation(subagentManager, {
|
|
272
273
|
toStepFailure: failureConversion.toStepFailure,
|
|
273
274
|
ref,
|
|
274
|
-
versionRange: Option.none(),
|
|
275
|
+
declaration: { name: ref.subagent.name, versionRange: Option.none() },
|
|
275
276
|
});
|
|
276
277
|
if (step.readiness === "error") {
|
|
277
278
|
return Effect.fail(new StepFailure({ category: "conflict", detail: step.errorMessage }));
|
|
@@ -64,7 +64,7 @@ export declare const prepareSelectiveUpdate: (request: SelectiveUpdateRequest) =
|
|
|
64
64
|
reason?: never;
|
|
65
65
|
message?: never;
|
|
66
66
|
planDescription?: never;
|
|
67
|
-
}, import("../../errors.ts").ExtensionLifecycleFailed | import("@agentxm/extension-sources").SourceSyntaxInvalid | import("@agentxm/extension-sources").SourceHostNotConfigured | import("@agentxm/extension-sources").SourceNotResolvable | import("@agentxm/extension-sources").SourceNetworkFailure | import("@agentxm/extension-sources").GitOperationFailed | import("@agentxm/extension-sources").WorkspaceCatalogUnavailable | import("@agentxm/extension-sources").AxmSkillGateUnavailable | import("@agentxm/registry-client").RegistryProblem | import("@agentxm/registry-client").RegistryRequestFailed | import("@agentxm/registry-client").RegistryOperationFailed | import("@agentxm/workspace-state").SettingsIoError | import("@agentxm/workspace-state").SettingsParseError | import("@agentxm/workspace-state").SettingsDecodeError | import("@agentxm/workspace-state").LockfileIoError | import("@agentxm/workspace-state").LockfileParseError | import("@agentxm/workspace-state").LockfileDecodeError | import("@agentxm/workspace-state").LockfileVersionUnsupported | import("@agentxm/workspace-state").WorkspaceRootEscape | import("@agentxm/workspace-state").LockfileValidationError | import("@agentxm/extension-resolution").ExtensionResolutionFailed | import("@agentxm/workspace-operations").CandidateFingerprintFailed, import("../../step-failure-conversion.ts").StepFailureConversion | import("effect/FileSystem").FileSystem | import("effect/Path").Path | import("@agentxm/workspace-state").WorkspaceMutations | import("
|
|
67
|
+
}, import("../../errors.ts").ExtensionLifecycleFailed | import("@agentxm/extension-sources").SourceSyntaxInvalid | import("@agentxm/extension-sources").SourceHostNotConfigured | import("@agentxm/extension-sources").SourceNotResolvable | import("@agentxm/extension-sources").SourceNetworkFailure | import("@agentxm/extension-sources").GitOperationFailed | import("@agentxm/extension-sources").WorkspaceCatalogUnavailable | import("@agentxm/extension-sources").AxmSkillGateUnavailable | import("@agentxm/registry-client").RegistryProblem | import("@agentxm/registry-client").RegistryRequestFailed | import("@agentxm/registry-client").RegistryOperationFailed | import("@agentxm/workspace-state").SettingsIoError | import("@agentxm/workspace-state").SettingsParseError | import("@agentxm/workspace-state").SettingsDecodeError | import("@agentxm/workspace-state").LockfileIoError | import("@agentxm/workspace-state").LockfileParseError | import("@agentxm/workspace-state").LockfileDecodeError | import("@agentxm/workspace-state").LockfileVersionUnsupported | import("@agentxm/workspace-state").WorkspaceRootEscape | import("@agentxm/workspace-state").LockfileValidationError | import("@agentxm/extension-resolution").ExtensionResolutionFailed | import("@agentxm/workspace-operations").CandidateFingerprintFailed, import("../../step-failure-conversion.ts").StepFailureConversion | import("effect/FileSystem").FileSystem | import("effect/Path").Path | import("@agentxm/workspace-state").WorkspaceMutations | import("effect/unstable/http/HttpClient").HttpClient | import("@agentxm/workspace-state").ConfiguredAgentOutcomesProvider | import("@agentxm/extension-resolution").ReleaseAgePosture | import("effect/Scope").Scope | import("@agentxm/extension-sources").SourceHostProviders | import("@agentxm/extension-materialization").SubagentManager | import("@agentxm/extension-sources").WorkspaceCatalog>;
|
|
68
68
|
/** Settle a selective update, then preview or apply it. */
|
|
69
69
|
export declare const SelectiveUpdate: {
|
|
70
70
|
readonly prepare: (request: SelectiveUpdateRequest) => Effect.Effect<{
|
|
@@ -115,7 +115,7 @@ export declare const SelectiveUpdate: {
|
|
|
115
115
|
reason?: never;
|
|
116
116
|
message?: never;
|
|
117
117
|
planDescription?: never;
|
|
118
|
-
}, import("../../errors.ts").ExtensionLifecycleFailed | import("@agentxm/extension-sources").SourceSyntaxInvalid | import("@agentxm/extension-sources").SourceHostNotConfigured | import("@agentxm/extension-sources").SourceNotResolvable | import("@agentxm/extension-sources").SourceNetworkFailure | import("@agentxm/extension-sources").GitOperationFailed | import("@agentxm/extension-sources").WorkspaceCatalogUnavailable | import("@agentxm/extension-sources").AxmSkillGateUnavailable | import("@agentxm/registry-client").RegistryProblem | import("@agentxm/registry-client").RegistryRequestFailed | import("@agentxm/registry-client").RegistryOperationFailed | import("@agentxm/workspace-state").SettingsIoError | import("@agentxm/workspace-state").SettingsParseError | import("@agentxm/workspace-state").SettingsDecodeError | import("@agentxm/workspace-state").LockfileIoError | import("@agentxm/workspace-state").LockfileParseError | import("@agentxm/workspace-state").LockfileDecodeError | import("@agentxm/workspace-state").LockfileVersionUnsupported | import("@agentxm/workspace-state").WorkspaceRootEscape | import("@agentxm/workspace-state").LockfileValidationError | import("@agentxm/extension-resolution").ExtensionResolutionFailed | import("@agentxm/workspace-operations").CandidateFingerprintFailed, import("../../step-failure-conversion.ts").StepFailureConversion | import("effect/FileSystem").FileSystem | import("effect/Path").Path | import("@agentxm/workspace-state").WorkspaceMutations | import("
|
|
118
|
+
}, import("../../errors.ts").ExtensionLifecycleFailed | import("@agentxm/extension-sources").SourceSyntaxInvalid | import("@agentxm/extension-sources").SourceHostNotConfigured | import("@agentxm/extension-sources").SourceNotResolvable | import("@agentxm/extension-sources").SourceNetworkFailure | import("@agentxm/extension-sources").GitOperationFailed | import("@agentxm/extension-sources").WorkspaceCatalogUnavailable | import("@agentxm/extension-sources").AxmSkillGateUnavailable | import("@agentxm/registry-client").RegistryProblem | import("@agentxm/registry-client").RegistryRequestFailed | import("@agentxm/registry-client").RegistryOperationFailed | import("@agentxm/workspace-state").SettingsIoError | import("@agentxm/workspace-state").SettingsParseError | import("@agentxm/workspace-state").SettingsDecodeError | import("@agentxm/workspace-state").LockfileIoError | import("@agentxm/workspace-state").LockfileParseError | import("@agentxm/workspace-state").LockfileDecodeError | import("@agentxm/workspace-state").LockfileVersionUnsupported | import("@agentxm/workspace-state").WorkspaceRootEscape | import("@agentxm/workspace-state").LockfileValidationError | import("@agentxm/extension-resolution").ExtensionResolutionFailed | import("@agentxm/workspace-operations").CandidateFingerprintFailed, import("../../step-failure-conversion.ts").StepFailureConversion | import("effect/FileSystem").FileSystem | import("effect/Path").Path | import("@agentxm/workspace-state").WorkspaceMutations | import("effect/unstable/http/HttpClient").HttpClient | import("@agentxm/workspace-state").ConfiguredAgentOutcomesProvider | import("@agentxm/extension-resolution").ReleaseAgePosture | import("effect/Scope").Scope | import("@agentxm/extension-sources").SourceHostProviders | import("@agentxm/extension-materialization").SubagentManager | import("@agentxm/extension-sources").WorkspaceCatalog>;
|
|
119
119
|
readonly previewOrApply: (candidate: import("./vocabulary.js").PlannedSelectiveUpdateCandidate, execution: import("@agentxm/workspace-operations").PlanExecution) => Effect.Effect<import("@agentxm/workspace-operations").OperationResolution<never>, import("@agentxm/workspace-state").WorkspaceSettingsReadFailure | import("@agentxm/workspace-operations").ApprovalRecoveryMissing | import("@agentxm/workspace-operations").PlanInteractionFailed | import("@agentxm/workspace-transactions").WorkspaceTransitionAcquireFailure, import("@agentxm/workspace-state").ConfiguredAgentOutcomesProvider | import("@agentxm/workspace-transactions").FootprintRecorder | import("@agentxm/workspace-operations").OperationJournal | import("@agentxm/workspace-operations").ResolvePlanInteraction | import("./requirements.ts").SelectiveUpdateStepRequirements>;
|
|
120
120
|
};
|
|
121
121
|
//# sourceMappingURL=use-case.d.ts.map
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { lifecycleStepFailure } from "../step-failure.js";
|
|
2
|
+
import { buildReconciliationClosure, } from "@agentxm/workspace-reconciliation";
|
|
1
3
|
/**
|
|
2
4
|
* Wrapping a targeted update in one atomic ownership transition.
|
|
3
5
|
*
|
|
@@ -18,7 +20,6 @@ import { operationPresentation, } from "@agentxm/workspace-operations";
|
|
|
18
20
|
import { WorkspaceMutations } from "@agentxm/workspace-state";
|
|
19
21
|
import { resolveTargetedUpdateContext, } from "@agentxm/extension-resolution";
|
|
20
22
|
import { ExtensionLifecycleFailed } from "../errors.js";
|
|
21
|
-
import { buildAtomicPackGraphStep } from "../packs/graph-transition.js";
|
|
22
23
|
export const TARGETED_UPDATE_STALE_DETAIL = "The targeted update ownership context became stale before apply.";
|
|
23
24
|
const same = (left, right) => JSON.stringify(left) === JSON.stringify(right);
|
|
24
25
|
const validatePostcondition = (args) => {
|
|
@@ -63,7 +64,8 @@ export const wrapTargetedUpdatePlan = (args) => Effect.gen(function* () {
|
|
|
63
64
|
scope: workspace.scope,
|
|
64
65
|
change: "updated",
|
|
65
66
|
};
|
|
66
|
-
const builtStep = yield*
|
|
67
|
+
const builtStep = yield* buildReconciliationClosure({
|
|
68
|
+
toStepFailure: lifecycleStepFailure,
|
|
67
69
|
label: args.context.public.target.fqn,
|
|
68
70
|
message: `Updated ${args.context.public.target.fqn}`,
|
|
69
71
|
artifact,
|
|
@@ -20,12 +20,6 @@ export declare const workspaceLockfilePath: (scope: WorkspaceScope) => string;
|
|
|
20
20
|
export declare const workspaceCanonicalRoot: (scope: WorkspaceScope) => string;
|
|
21
21
|
/** One acquired package's path, relative to the workspace root. */
|
|
22
22
|
export declare const workspaceCanonicalPath: (scope: WorkspaceScope, relativePath: string) => string;
|
|
23
|
-
/** Where one desired-graph node's package sits, authored or acquired. */
|
|
24
|
-
export declare const workspaceCanonicalNodePath: (path: Path.Path, ws: WorkspaceMutationsService, node: {
|
|
25
|
-
readonly type: ExtensionType;
|
|
26
|
-
readonly name: string;
|
|
27
|
-
readonly identity: string;
|
|
28
|
-
}) => string;
|
|
29
23
|
/** Where a workspace-authored package of this type and name sits. */
|
|
30
24
|
export declare const workspaceAuthoredPath: (path: Path.Path, ws: WorkspaceMutationsService, type: ExtensionType, name: string) => string;
|
|
31
25
|
//# sourceMappingURL=workspace-paths.d.ts.map
|
|
@@ -25,16 +25,6 @@ const extensionDirectory = {
|
|
|
25
25
|
knowledge: "knowledge",
|
|
26
26
|
pack: "packs",
|
|
27
27
|
};
|
|
28
|
-
/** Where one desired-graph node's package sits, authored or acquired. */
|
|
29
|
-
export const workspaceCanonicalNodePath = (path, ws, node) => {
|
|
30
|
-
if (node.identity.startsWith("workspace:") && ws.layout.scope === "project") {
|
|
31
|
-
return path.join(path.relative(ws.baseDir, ws.layout.authoredRoot(node.type)), node.name);
|
|
32
|
-
}
|
|
33
|
-
const identity = node.identity.startsWith("workspace:")
|
|
34
|
-
? node.identity.slice("workspace:".length)
|
|
35
|
-
: node.identity;
|
|
36
|
-
return workspaceCanonicalPath(ws.scope, identity);
|
|
37
|
-
};
|
|
38
28
|
/** Where a workspace-authored package of this type and name sits. */
|
|
39
29
|
export const workspaceAuthoredPath = (path, ws, type, name) => {
|
|
40
30
|
if (ws.layout.scope === "project") {
|
package/package.json
CHANGED
|
@@ -4,20 +4,21 @@
|
|
|
4
4
|
"url": "https://github.com/agentxm/axm/issues"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@agentxm/agent-integration": "^0.
|
|
8
|
-
"@agentxm/
|
|
9
|
-
"@agentxm/extension-
|
|
10
|
-
"@agentxm/extension-
|
|
11
|
-
"@agentxm/extension-
|
|
12
|
-
"@agentxm/extension-
|
|
13
|
-
"@agentxm/
|
|
14
|
-
"@agentxm/registry-
|
|
15
|
-
"@agentxm/registry-
|
|
16
|
-
"@agentxm/
|
|
17
|
-
"@agentxm/workspace-
|
|
18
|
-
"@agentxm/workspace-
|
|
19
|
-
"@agentxm/workspace-
|
|
20
|
-
"@
|
|
7
|
+
"@agentxm/agent-integration": "^0.30.1",
|
|
8
|
+
"@agentxm/cli-maintenance": "^0.30.1",
|
|
9
|
+
"@agentxm/extension-content": "^0.30.1",
|
|
10
|
+
"@agentxm/extension-materialization": "^0.30.1",
|
|
11
|
+
"@agentxm/extension-model": "^0.30.1",
|
|
12
|
+
"@agentxm/extension-resolution": "^0.30.1",
|
|
13
|
+
"@agentxm/extension-sources": "^0.30.1",
|
|
14
|
+
"@agentxm/registry-auth": "^0.30.1",
|
|
15
|
+
"@agentxm/registry-client": "^0.30.1",
|
|
16
|
+
"@agentxm/registry-protocol": "^0.30.1",
|
|
17
|
+
"@agentxm/workspace-operations": "^0.30.1",
|
|
18
|
+
"@agentxm/workspace-projection": "^0.30.1",
|
|
19
|
+
"@agentxm/workspace-reconciliation": "^0.30.1",
|
|
20
|
+
"@agentxm/workspace-state": "^0.30.1",
|
|
21
|
+
"@agentxm/workspace-transactions": "^0.30.1",
|
|
21
22
|
"effect": "4.0.0-rc.115",
|
|
22
23
|
"fflate": "^0.8.3"
|
|
23
24
|
},
|
|
@@ -37,19 +38,16 @@
|
|
|
37
38
|
},
|
|
38
39
|
"exports": {
|
|
39
40
|
".": {
|
|
40
|
-
"
|
|
41
|
-
"default": "./dist/src/index.js"
|
|
42
|
-
"types": "./dist/src/index.d.ts"
|
|
41
|
+
"types": "./dist/src/index.d.ts",
|
|
42
|
+
"default": "./dist/src/index.js"
|
|
43
43
|
},
|
|
44
44
|
"./live": {
|
|
45
|
-
"
|
|
46
|
-
"default": "./dist/src/live.js"
|
|
47
|
-
"types": "./dist/src/live.d.ts"
|
|
45
|
+
"types": "./dist/src/live.d.ts",
|
|
46
|
+
"default": "./dist/src/live.js"
|
|
48
47
|
},
|
|
49
48
|
"./testing": {
|
|
50
|
-
"
|
|
51
|
-
"default": "./dist/src/testing.js"
|
|
52
|
-
"types": "./dist/src/testing.d.ts"
|
|
49
|
+
"types": "./dist/src/testing.d.ts",
|
|
50
|
+
"default": "./dist/src/testing.js"
|
|
53
51
|
}
|
|
54
52
|
},
|
|
55
53
|
"files": [
|
|
@@ -72,5 +70,5 @@
|
|
|
72
70
|
},
|
|
73
71
|
"sideEffects": false,
|
|
74
72
|
"type": "module",
|
|
75
|
-
"version": "0.
|
|
73
|
+
"version": "0.30.1"
|
|
76
74
|
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Whether a removal may delete the package it withdraws.
|
|
3
|
-
*
|
|
4
|
-
* An extension declared directly and also required by an installed pack keeps
|
|
5
|
-
* its package when the direct declaration goes: the pack still depends on it.
|
|
6
|
-
* The membership fact is workspace state's; deciding that it means "retain"
|
|
7
|
-
* is this feature's.
|
|
8
|
-
*
|
|
9
|
-
* @experimental This API is unstable and may change without notice.
|
|
10
|
-
*/
|
|
11
|
-
import type { UninstallRetentionPolicy } from "@agentxm/extension-materialization";
|
|
12
|
-
import type { WorkspaceMutationsService } from "@agentxm/workspace-state";
|
|
13
|
-
import type { ExtensionLifecycleFailed } from "../errors.js";
|
|
14
|
-
/** Retain a package an installed pack still requires. */
|
|
15
|
-
export declare const makeWorkspaceRetentionPolicy: (ws: WorkspaceMutationsService) => UninstallRetentionPolicy<ExtensionLifecycleFailed>;
|
|
16
|
-
/**
|
|
17
|
-
* A pack's own exclusive members carry no separate retention question: the
|
|
18
|
-
* pack that required them is being removed in the same transition.
|
|
19
|
-
*/
|
|
20
|
-
export declare const exclusiveMemberRetentionPolicy: UninstallRetentionPolicy<ExtensionLifecycleFailed>;
|
|
21
|
-
//# sourceMappingURL=retention-policy.d.ts.map
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Whether a removal may delete the package it withdraws.
|
|
3
|
-
*
|
|
4
|
-
* An extension declared directly and also required by an installed pack keeps
|
|
5
|
-
* its package when the direct declaration goes: the pack still depends on it.
|
|
6
|
-
* The membership fact is workspace state's; deciding that it means "retain"
|
|
7
|
-
* is this feature's.
|
|
8
|
-
*
|
|
9
|
-
* @experimental This API is unstable and may change without notice.
|
|
10
|
-
*/
|
|
11
|
-
import * as Effect from "effect/Effect";
|
|
12
|
-
import { installRefused } from "../install/vocabulary.js";
|
|
13
|
-
/** Retain a package an installed pack still requires. */
|
|
14
|
-
export const makeWorkspaceRetentionPolicy = (ws) => ({
|
|
15
|
-
isRequiredByInstalledPack: (args) => ws.isExtensionRequiredByInstalledPack(args.target).pipe(Effect.mapError((cause) => installRefused({
|
|
16
|
-
category: "internal",
|
|
17
|
-
detail: `Pack membership for ${args.target.type} "${args.target.name}" could not be read`,
|
|
18
|
-
cause,
|
|
19
|
-
}))),
|
|
20
|
-
});
|
|
21
|
-
/**
|
|
22
|
-
* A pack's own exclusive members carry no separate retention question: the
|
|
23
|
-
* pack that required them is being removed in the same transition.
|
|
24
|
-
*/
|
|
25
|
-
export const exclusiveMemberRetentionPolicy = {
|
|
26
|
-
isRequiredByInstalledPack: () => Effect.succeed(false),
|
|
27
|
-
};
|
|
28
|
-
//# sourceMappingURL=retention-policy.js.map
|