@agentxm/extension-lifecycle 0.29.4 → 0.30.2
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 -5
- package/dist/src/index.js +1 -4
- package/dist/src/install/install-extensions.d.ts +5 -5
- package/dist/src/install/install-extensions.js +2 -1
- 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.d.ts +1 -1
- package/dist/src/mcps/install/plan.js +59 -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 +53 -21
- package/dist/src/rules/install/plan.js +6 -3
- package/dist/src/rules/uninstall/plan.js +4 -3
- package/dist/src/skills/application/index.d.ts +42 -0
- package/dist/src/skills/application/index.js +37 -0
- package/dist/src/skills/domain/selection.d.ts +22 -0
- package/dist/src/skills/domain/selection.js +18 -0
- package/dist/src/skills/install/artifact.d.ts +4 -0
- package/dist/src/skills/install/artifact.js +29 -0
- package/dist/src/skills/install/bundled.js +4 -4
- package/dist/src/skills/install/plan.d.ts +15 -4
- package/dist/src/skills/install/plan.js +114 -97
- package/dist/src/skills/uninstall/plan.js +13 -5
- package/dist/src/step-failure.js +12 -0
- package/dist/src/subagents/application/index.d.ts +42 -0
- package/dist/src/subagents/application/index.js +37 -0
- package/dist/src/subagents/domain/selection.d.ts +22 -0
- package/dist/src/subagents/domain/selection.js +18 -0
- package/dist/src/subagents/install/plan.d.ts +2 -2
- package/dist/src/subagents/install/plan.js +4 -4
- package/dist/src/subagents/operations/enable.js +1 -3
- package/dist/src/subagents/uninstall/plan.js +5 -4
- package/dist/src/testing.d.ts +3 -2
- package/dist/src/testing.js +9 -6
- package/dist/src/uninstall/root-intent.d.ts +2 -1
- package/dist/src/uninstall/root-intent.js +1 -0
- package/dist/src/uninstall/undesired-target.d.ts +26 -0
- package/dist/src/uninstall/undesired-target.js +56 -0
- package/dist/src/uninstall/uninstall-extensions.d.ts +1 -1
- package/dist/src/uninstall/uninstall-extensions.js +103 -3
- package/dist/src/update/root-request.d.ts +2 -2
- package/dist/src/update/selective/plan.d.ts +2 -3
- package/dist/src/update/selective/plan.js +2 -2
- package/dist/src/update/selective/requirements.d.ts +2 -6
- package/dist/src/update/selective/requirements.js +1 -3
- package/dist/src/update/selective/selection.js +1 -1
- package/dist/src/update/selective/skills.d.ts +2 -4
- package/dist/src/update/selective/skills.js +22 -27
- package/dist/src/update/selective/subagents.d.ts +2 -3
- package/dist/src/update/selective/subagents.js +11 -9
- package/dist/src/update/selective/use-case.d.ts +7 -7
- package/dist/src/update/selective/vocabulary.d.ts +1 -1
- package/dist/src/update/selector.js +1 -1
- 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 +30 -24
- package/dist/src/glob.d.ts +0 -35
- package/dist/src/glob.js +0 -75
- package/dist/src/install/selection-interaction.d.ts +0 -46
- package/dist/src/install/selection-interaction.js +0 -22
- package/dist/src/skills/install/selection.d.ts +0 -26
- package/dist/src/skills/install/selection.js +0 -41
- package/dist/src/skills/operations/install-result.d.ts +0 -33
- package/dist/src/skills/operations/install-result.js +0 -10
- package/dist/src/skills/operations/install.d.ts +0 -67
- package/dist/src/skills/operations/install.js +0 -591
- package/dist/src/subagents/install/selection.d.ts +0 -26
- package/dist/src/subagents/install/selection.js +0 -37
- package/dist/src/uninstall/retention-policy.d.ts +0 -21
- package/dist/src/uninstall/retention-policy.js +0 -28
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
* configuration, a rule or Knowledge bundle through a shared managed region,
|
|
11
11
|
* a Pack through the members it contributes.
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
13
|
+
* Disabling a leaf preserves its canonical content and accepted resolution.
|
|
14
|
+
* Disabling a Pack withdraws its dependency route and retires exclusive acquired
|
|
15
|
+
* members. A type whose projection shares a file with instruction
|
|
16
16
|
* management reconciles that file inside the same transaction, so the
|
|
17
17
|
* workspace is never left with a settings change the files do not reflect.
|
|
18
18
|
*
|
|
@@ -25,14 +25,15 @@ import * as Path from "effect/Path";
|
|
|
25
25
|
import type * as Scope from "effect/Scope";
|
|
26
26
|
import type * as HttpClient from "effect/unstable/http/HttpClient";
|
|
27
27
|
import type { ExtensionType } from "@agentxm/extension-model/unstable/extensions";
|
|
28
|
-
import type { ExtensionRef } from "@agentxm/extension-model/unstable/extensions/refs/extension-ref";
|
|
29
28
|
import type { WorkspaceScope } from "@agentxm/extension-model/unstable/workspace-scope";
|
|
30
29
|
import { SourceHostProviders, WorkspaceCatalog, type SourceResolutionFailure } from "@agentxm/extension-sources";
|
|
31
|
-
import { ExtensionManagers,
|
|
30
|
+
import { ExtensionManagers, HookManager, SkillManager, RuleManager, KnowledgeManager, PackManager, McpServerManager, SubagentManager, type ExtensionManagerFailure, type ManagerRequirements } from "@agentxm/extension-materialization";
|
|
31
|
+
import { type McpServerInstallRequirements } from "@agentxm/workspace-reconciliation";
|
|
32
|
+
import { type SyncStepRequirements, type CollectedMaterializeSteps, type DesiredStateProposal, type RecipeRequirements } from "@agentxm/workspace-reconciliation";
|
|
32
33
|
import { ReleaseAgePosture, type ExtensionResolutionFailed, type PackDependencyResolutionFailure, type SourceAuthorityBlocked } from "@agentxm/extension-resolution";
|
|
33
34
|
import { CodingAgentRepository, type ProjectionParticipantRequirements, type ResolvedInstructionsConfig } from "@agentxm/workspace-projection";
|
|
34
|
-
import { OperationJournal, ResolvePlanInteraction, type JobStepArtifact, type OperationResolution, type PlanExecution } from "@agentxm/workspace-operations";
|
|
35
|
-
import { ConfiguredAgentOutcomesProvider, type ConfiguredAgentOutcome, WorkspaceMutations, type DesiredExtensionNode, type AcceptedCanonicalRefError } from "@agentxm/workspace-state";
|
|
35
|
+
import { OperationJournal, ResolvePlanInteraction, type ExecutionCandidate, type JobStepArtifact, type OperationResolution, type PlanExecution, type PlannedJobStep } from "@agentxm/workspace-operations";
|
|
36
|
+
import { LockfileReader, SettingsReader, SettingsWriter, ConfiguredAgentOutcomesProvider, type ConfiguredAgentOutcome, WorkspaceMutations, type DesiredExtensionNode, type AcceptedCanonicalRefError } from "@agentxm/workspace-state";
|
|
36
37
|
import { FootprintRecorder, WorkspaceTransactionScope } from "@agentxm/workspace-transactions";
|
|
37
38
|
import { ExtensionLifecycleFailed } from "../errors.js";
|
|
38
39
|
import { StepFailureConversion } from "../step-failure-conversion.js";
|
|
@@ -61,26 +62,16 @@ export type ActivationTransition =
|
|
|
61
62
|
readonly kind: "subagent";
|
|
62
63
|
} | {
|
|
63
64
|
readonly kind: "mcp-server";
|
|
64
|
-
}
|
|
65
|
-
/** Enabling re-runs the configured install closure for the accepted entry. */
|
|
66
|
-
| {
|
|
67
|
-
readonly kind: "reinstall";
|
|
68
|
-
readonly ref: ExtensionRef;
|
|
69
|
-
readonly versionRange: Option.Option<string>;
|
|
70
|
-
}
|
|
71
|
-
/** Disabling flips the preference and dematerializes the type's projection. */
|
|
72
|
-
| {
|
|
73
|
-
readonly kind: "deactivate-rule";
|
|
74
65
|
} | {
|
|
75
|
-
readonly kind: "
|
|
76
|
-
|
|
77
|
-
/** Rendering the discovery region is what deactivation means for Knowledge. */
|
|
78
|
-
| {
|
|
79
|
-
readonly kind: "deactivate-knowledge";
|
|
66
|
+
readonly kind: "aggregate";
|
|
67
|
+
readonly proposal: DesiredStateProposal;
|
|
80
68
|
}
|
|
81
69
|
/** A Pack contributes members; activation moves the whole member closure. */
|
|
82
70
|
| {
|
|
83
71
|
readonly kind: "pack";
|
|
72
|
+
readonly proposal: DesiredStateProposal;
|
|
73
|
+
readonly materialization?: CollectedMaterializeSteps;
|
|
74
|
+
readonly retirement: Option.Option<PlannedJobStep<SyncStepRequirements | LockfileReader>>;
|
|
84
75
|
readonly identity: string;
|
|
85
76
|
/** Members whose active/inactive state this change decides. */
|
|
86
77
|
readonly members: ReadonlyArray<DesiredExtensionNode>;
|
|
@@ -88,7 +79,7 @@ export type ActivationTransition =
|
|
|
88
79
|
readonly aggregateTypes: ReadonlySet<ExtensionType>;
|
|
89
80
|
};
|
|
90
81
|
/** A settled activation change: everything the plan needs, decided. */
|
|
91
|
-
|
|
82
|
+
interface ActivationRealization {
|
|
92
83
|
readonly _tag: "SetActivation";
|
|
93
84
|
readonly type: ExtensionType;
|
|
94
85
|
/** The installed name, after resolving a fully-qualified identifier. */
|
|
@@ -97,6 +88,7 @@ export interface SetActivationCandidate {
|
|
|
97
88
|
readonly scope: WorkspaceScope;
|
|
98
89
|
readonly artifact: JobStepArtifact;
|
|
99
90
|
readonly transition: ActivationTransition;
|
|
91
|
+
readonly proposal?: DesiredStateProposal;
|
|
100
92
|
/** The instruction configuration this change reconciles inside its transaction. */
|
|
101
93
|
readonly instructions: Option.Option<ResolvedInstructionsConfig>;
|
|
102
94
|
/** The refusal that stops the change before it is offered, when there is one. */
|
|
@@ -109,26 +101,16 @@ export interface SetActivationCandidate {
|
|
|
109
101
|
/** Every failure settling an activation request can surface. */
|
|
110
102
|
export type SetActivationFailure = AcceptedCanonicalRefError | ExtensionLifecycleFailed | ExtensionManagerFailure | ExtensionResolutionFailed | PackDependencyResolutionFailure | SourceAuthorityBlocked | SourceResolutionFailure;
|
|
111
103
|
/** Everything settling and resolving an activation needs. */
|
|
112
|
-
export type SetActivationRequirements = CodingAgentRepository | ConfiguredAgentOutcomesProvider | ExtensionManagers | FileSystem.FileSystem | FootprintRecorder | HttpClient.HttpClient | ManagerRequirements | OperationJournal | Path.Path | McpServerInstallRequirements | ProjectionParticipantRequirements | RecipeRequirements | ReleaseAgePosture | ResolvePlanInteraction | Scope.Scope | SourceHostProviders | StepFailureConversion | SubagentManager | WorkspaceCatalog | WorkspaceMutations | WorkspaceTransactionScope;
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
* than as an empty plan, so repeating a command reports what is true instead
|
|
118
|
-
* of offering to do nothing. A request naming a subject the workspace does
|
|
119
|
-
* not hold fails with the type's own recovery route.
|
|
120
|
-
*/
|
|
121
|
-
export declare const prepareSetActivation: (request: SetActivationRequest) => Effect.Effect<SetActivationCandidate | ActivationUnchanged, SetActivationFailure, CodingAgentRepository | ExtensionManagers | FileSystem.FileSystem | HttpClient.HttpClient | ManagerRequirements | Path.Path | ReleaseAgePosture | Scope.Scope | SourceHostProviders | WorkspaceCatalog | WorkspaceMutations>;
|
|
122
|
-
/**
|
|
123
|
-
* Preview or apply a settled activation. The whole change — the preference,
|
|
124
|
-
* the projections it implies, and any instruction file it shares — runs in
|
|
125
|
-
* one workspace transaction, so a projection that cannot be written never
|
|
126
|
-
* leaves the preference recorded.
|
|
127
|
-
*/
|
|
104
|
+
export type SetActivationRequirements = CodingAgentRepository | ConfiguredAgentOutcomesProvider | ExtensionManagers | HookManager | SkillManager | RuleManager | KnowledgeManager | PackManager | McpServerManager | FileSystem.FileSystem | FootprintRecorder | HttpClient.HttpClient | ManagerRequirements | OperationJournal | Path.Path | McpServerInstallRequirements | ProjectionParticipantRequirements | RecipeRequirements | LockfileReader | SettingsReader | SettingsWriter | ReleaseAgePosture | ResolvePlanInteraction | Scope.Scope | SourceHostProviders | StepFailureConversion | SubagentManager | WorkspaceCatalog | WorkspaceMutations | WorkspaceTransactionScope;
|
|
105
|
+
export interface SetActivationCandidate extends ActivationRealization {
|
|
106
|
+
readonly execution: ExecutionCandidate<SetActivationRequirements>;
|
|
107
|
+
}
|
|
108
|
+
export declare const prepareSetActivation: (request: SetActivationRequest) => Effect.Effect<SetActivationCandidate | ActivationUnchanged, SetActivationFailure | SetActivationExecutionFailure, SetActivationRequirements>;
|
|
128
109
|
export declare const previewOrApplySetActivation: (candidate: SetActivationCandidate, execution: PlanExecution) => Effect.Effect<OperationResolution<void>, SetActivationExecutionFailure, SetActivationRequirements>;
|
|
129
110
|
/** The activation use case. */
|
|
130
111
|
export declare const SetActivation: {
|
|
131
|
-
readonly prepare: (request: SetActivationRequest) => Effect.Effect<SetActivationCandidate | ActivationUnchanged, SetActivationFailure
|
|
112
|
+
readonly prepare: (request: SetActivationRequest) => Effect.Effect<SetActivationCandidate | ActivationUnchanged, SetActivationFailure | SetActivationExecutionFailure, SetActivationRequirements>;
|
|
132
113
|
readonly previewOrApply: (candidate: SetActivationCandidate, execution: PlanExecution) => Effect.Effect<OperationResolution<void>, SetActivationExecutionFailure, SetActivationRequirements>;
|
|
133
114
|
};
|
|
115
|
+
export {};
|
|
134
116
|
//# sourceMappingURL=set-activation.d.ts.map
|