@agentxm/extension-lifecycle 0.30.1 → 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.
Files changed (56) hide show
  1. package/dist/src/index.d.ts +0 -3
  2. package/dist/src/index.js +0 -2
  3. package/dist/src/install/install-extensions.d.ts +5 -5
  4. package/dist/src/install/install-extensions.js +2 -1
  5. package/dist/src/mcps/install/plan.d.ts +1 -1
  6. package/dist/src/mcps/install/plan.js +58 -1
  7. package/dist/src/packs/uninstall/plan.js +1 -1
  8. package/dist/src/skills/application/index.d.ts +42 -0
  9. package/dist/src/skills/application/index.js +37 -0
  10. package/dist/src/skills/domain/selection.d.ts +22 -0
  11. package/dist/src/skills/domain/selection.js +18 -0
  12. package/dist/src/skills/install/artifact.d.ts +4 -0
  13. package/dist/src/skills/install/artifact.js +29 -0
  14. package/dist/src/skills/install/plan.d.ts +15 -4
  15. package/dist/src/skills/install/plan.js +112 -96
  16. package/dist/src/skills/uninstall/plan.js +9 -2
  17. package/dist/src/step-failure.js +12 -0
  18. package/dist/src/subagents/application/index.d.ts +42 -0
  19. package/dist/src/subagents/application/index.js +37 -0
  20. package/dist/src/subagents/domain/selection.d.ts +22 -0
  21. package/dist/src/subagents/domain/selection.js +18 -0
  22. package/dist/src/subagents/install/plan.d.ts +2 -2
  23. package/dist/src/subagents/install/plan.js +1 -2
  24. package/dist/src/subagents/uninstall/plan.js +1 -1
  25. package/dist/src/testing.d.ts +3 -2
  26. package/dist/src/testing.js +7 -5
  27. package/dist/src/uninstall/root-intent.d.ts +1 -0
  28. package/dist/src/uninstall/root-intent.js +1 -0
  29. package/dist/src/uninstall/undesired-target.d.ts +26 -0
  30. package/dist/src/uninstall/undesired-target.js +56 -0
  31. package/dist/src/uninstall/uninstall-extensions.js +30 -6
  32. package/dist/src/update/selective/plan.d.ts +2 -3
  33. package/dist/src/update/selective/plan.js +2 -2
  34. package/dist/src/update/selective/requirements.d.ts +2 -6
  35. package/dist/src/update/selective/requirements.js +1 -3
  36. package/dist/src/update/selective/selection.js +1 -1
  37. package/dist/src/update/selective/skills.d.ts +2 -4
  38. package/dist/src/update/selective/skills.js +22 -26
  39. package/dist/src/update/selective/subagents.d.ts +1 -2
  40. package/dist/src/update/selective/subagents.js +9 -8
  41. package/dist/src/update/selective/use-case.d.ts +7 -7
  42. package/dist/src/update/selective/vocabulary.d.ts +1 -1
  43. package/dist/src/update/selector.js +1 -1
  44. package/package.json +24 -16
  45. package/dist/src/glob.d.ts +0 -35
  46. package/dist/src/glob.js +0 -75
  47. package/dist/src/install/selection-interaction.d.ts +0 -46
  48. package/dist/src/install/selection-interaction.js +0 -22
  49. package/dist/src/skills/install/selection.d.ts +0 -26
  50. package/dist/src/skills/install/selection.js +0 -41
  51. package/dist/src/skills/operations/install-result.d.ts +0 -33
  52. package/dist/src/skills/operations/install-result.js +0 -10
  53. package/dist/src/skills/operations/install.d.ts +0 -66
  54. package/dist/src/skills/operations/install.js +0 -582
  55. package/dist/src/subagents/install/selection.d.ts +0 -26
  56. package/dist/src/subagents/install/selection.js +0 -37
@@ -27,7 +27,7 @@ import { operationPresentation, prepareExecutionCandidate, } from "@agentxm/work
27
27
  import { acceptedResolutionRef, configuredRowsByName, WorkspaceMutations, } from "@agentxm/workspace-state";
28
28
  import { ExtensionLifecycleFailed } from "../../errors.js";
29
29
  import { withPublisherTrustConditions } from "../../publisher-binding.js";
30
- import { installSkill } from "../../skills/operations/install.js";
30
+ import { planSkillInstallationStep } from "../../skills/install/plan.js";
31
31
  import { buildSelectiveUpdatePlan } from "./plan.js";
32
32
  import { selectUpdateTargets, } from "./selection.js";
33
33
  import { ignoreVersionConstraintsCondition, selectiveUpdatePlanName, } from "./vocabulary.js";
@@ -47,14 +47,6 @@ const allSkillResolutionsFailed = new ExtensionLifecycleFailed({
47
47
  recover: "Review the registries declared under `sources` in workspace settings",
48
48
  cmd: "axm help settings",
49
49
  });
50
- /**
51
- * The install operation reports more than the plan vocabulary carries. Only
52
- * the outcome and its sentence cross into the step result; a failed step
53
- * carries the typed failure the boundary renders.
54
- */
55
- const toJobStepResult = (result) => result.result === "error" && result.error !== undefined
56
- ? { result: "error", message: result.message, error: result.error }
57
- : { result: "success", message: result.message };
58
50
  const skippedSkillStep = (outcome) => ({
59
51
  readiness: "ready",
60
52
  label: `Skip ${outcome.name}`,
@@ -522,23 +514,27 @@ export const prepareSelectiveSkillUpdate = Effect.fn("SelectiveSkillUpdate.prepa
522
514
  if (warnings.length > 0)
523
515
  warningsBySkill.set(item.ref.skill.name, warnings);
524
516
  }
525
- const units = resolved.map((item) => ({
526
- name: item.ref.skill.name,
527
- ref: item.ref,
528
- force: request.ignoreVersionConstraints || item.ref.refType !== "registry",
529
- operation: {
530
- name: "install-skill",
531
- args: {
532
- ref: item.ref,
533
- force: request.ignoreVersionConstraints || item.ref.refType !== "registry",
534
- versionRange: item.versionRange,
535
- strictUnknownAgents: Option.none(),
536
- sourceName: Option.none(),
537
- },
538
- },
539
- }));
540
- const makeRunClosure = (operation) => installSkill(operation).pipe(Effect.map(toJobStepResult), Effect.map(appendWarningsToResult(warningsBySkill.get(operation.args.ref.skill.name) ?? [])));
541
- const rawPlan = buildSelectiveUpdatePlan(units, lockedSkills, PLAN_NAME, Option.some(PLAN_DESCRIPTION), makeRunClosure);
517
+ const units = yield* Effect.forEach(resolved, (item) => Effect.gen(function* () {
518
+ const force = request.ignoreVersionConstraints || item.ref.refType !== "registry";
519
+ const step = yield* planSkillInstallationStep({
520
+ ref: item.ref,
521
+ force,
522
+ operation: "update",
523
+ });
524
+ const operation = step.readiness === "error"
525
+ ? step
526
+ : {
527
+ ...step,
528
+ run: step.run.pipe(Effect.map(appendWarningsToResult(warningsBySkill.get(item.ref.skill.name) ?? []))),
529
+ };
530
+ return {
531
+ name: item.ref.skill.name,
532
+ ref: item.ref,
533
+ force,
534
+ operation,
535
+ };
536
+ }), { concurrency: 1 });
537
+ const rawPlan = buildSelectiveUpdatePlan(units, lockedSkills, PLAN_NAME, Option.some(PLAN_DESCRIPTION), (step) => step);
542
538
  const basePlanWithWarnings = {
543
539
  ...rawPlan,
544
540
  presentation: operationPresentation({ imperative: "update", past: "Updated", gerund: "Updating" }, "skill"),
@@ -15,7 +15,6 @@ import { SourceHostProviders } from "@agentxm/extension-sources";
15
15
  import { WorkspaceMutations } from "@agentxm/workspace-state";
16
16
  import { ExtensionLifecycleFailed } from "../../errors.js";
17
17
  import { StepFailureConversion } from "../../step-failure-conversion.js";
18
- import type { SelectiveUpdateStepRequirements } from "./requirements.js";
19
18
  import { type SelectiveUpdateSelectors } from "./selection.js";
20
19
  /** Everything `subagents update` needs beyond the workspace it runs in. */
21
20
  export interface SelectiveSubagentUpdateRequest extends SelectiveUpdateSelectors {
@@ -44,7 +43,7 @@ export declare const prepareSelectiveSubagentUpdate: (request: SelectiveSubagent
44
43
  outcome: "planned";
45
44
  subjectType: "subagent";
46
45
  planName: string;
47
- execution: import("@agentxm/workspace-operations").ExecutionCandidate<SelectiveUpdateStepRequirements, never>;
46
+ execution: import("@agentxm/workspace-operations").ExecutionCandidate<import("../../index.ts").InstallStepRequirements, never>;
48
47
  reason?: never;
49
48
  message?: never;
50
49
  planDescription?: never;
@@ -19,7 +19,7 @@ import { SubagentManager } from "@agentxm/extension-materialization";
19
19
  import { buildInstallOperation } from "@agentxm/workspace-reconciliation";
20
20
  import { classifyPublisherBindingTransition, makeConfiguredReleaseAgeEvaluation, normalizeReleaseAgeRecords, publisherTransitionWarning, registryBindingProposal, } from "@agentxm/extension-resolution";
21
21
  import { resolveSource, SourceHostProviders } from "@agentxm/extension-sources";
22
- import { operationPresentation, prepareExecutionCandidate, StepFailure, } from "@agentxm/workspace-operations";
22
+ import { operationPresentation, prepareExecutionCandidate, } from "@agentxm/workspace-operations";
23
23
  import { acceptedResolutionRef, configuredRowsByName, WorkspaceMutations, } from "@agentxm/workspace-state";
24
24
  import { ExtensionLifecycleFailed } from "../../errors.js";
25
25
  import { withPublisherTrustConditions } from "../../publisher-binding.js";
@@ -268,16 +268,17 @@ export const prepareSelectiveSubagentUpdate = Effect.fn("SelectiveSubagentUpdate
268
268
  warningsBySubagent.set(item.ref.subagent.name, publisherTransitionWarning(transition.value));
269
269
  }
270
270
  }
271
- const makeRunClosure = (ref) => {
271
+ const makeStep = (ref) => {
272
272
  const step = buildInstallOperation(subagentManager, {
273
273
  toStepFailure: failureConversion.toStepFailure,
274
274
  ref,
275
- declaration: { name: ref.subagent.name, versionRange: Option.none() },
276
275
  });
277
- if (step.readiness === "error") {
278
- return Effect.fail(new StepFailure({ category: "conflict", detail: step.errorMessage }));
279
- }
280
- return step.run.pipe(Effect.map(appendWarning(warningsBySubagent.get(ref.subagent.name))));
276
+ if (step.readiness === "error")
277
+ return step;
278
+ return {
279
+ ...step,
280
+ run: step.run.pipe(Effect.map(appendWarning(warningsBySubagent.get(ref.subagent.name)))),
281
+ };
281
282
  };
282
283
  const units = resolved.map((item) => ({
283
284
  name: item.ref.subagent.name,
@@ -285,7 +286,7 @@ export const prepareSelectiveSubagentUpdate = Effect.fn("SelectiveSubagentUpdate
285
286
  force: request.ignoreVersionConstraints,
286
287
  operation: item.ref,
287
288
  }));
288
- const rawPlan = buildSelectiveUpdatePlan(units, lockedSubagents, PLAN_NAME, Option.some(PLAN_DESCRIPTION), makeRunClosure);
289
+ const rawPlan = buildSelectiveUpdatePlan(units, lockedSubagents, PLAN_NAME, Option.some(PLAN_DESCRIPTION), makeStep);
289
290
  const basePlanWithReleaseAge = {
290
291
  ...rawPlan,
291
292
  presentation: operationPresentation({ imperative: "update", past: "Updated", gerund: "Updating" }, "subagent"),
@@ -36,7 +36,7 @@ export declare const prepareSelectiveUpdate: (request: SelectiveUpdateRequest) =
36
36
  outcome: "planned";
37
37
  subjectType: "skill";
38
38
  planName: string;
39
- execution: import("@agentxm/workspace-operations").ExecutionCandidate<import("./requirements.ts").SelectiveUpdateStepRequirements, never>;
39
+ execution: import("@agentxm/workspace-operations").ExecutionCandidate<import("../../index.ts").InstallStepRequirements, never>;
40
40
  reason?: never;
41
41
  message?: never;
42
42
  planDescription?: never;
@@ -60,11 +60,11 @@ export declare const prepareSelectiveUpdate: (request: SelectiveUpdateRequest) =
60
60
  outcome: "planned";
61
61
  subjectType: "subagent";
62
62
  planName: string;
63
- execution: import("@agentxm/workspace-operations").ExecutionCandidate<import("./requirements.ts").SelectiveUpdateStepRequirements, never>;
63
+ execution: import("@agentxm/workspace-operations").ExecutionCandidate<import("../../index.ts").InstallStepRequirements, never>;
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("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>;
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("@agentxm/workspace-state").ConfiguredAgentOutcomesProvider | import("@agentxm/extension-materialization").SkillManager | import("@agentxm/extension-resolution").ReleaseAgePosture | import("effect/Scope").Scope | import("@agentxm/extension-sources").SourceHostProviders | import("@agentxm/extension-materialization").SubagentManager | import("@agentxm/extension-sources").WorkspaceCatalog | import("../../index.ts").InstallStepRequirements>;
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<{
@@ -87,7 +87,7 @@ export declare const SelectiveUpdate: {
87
87
  outcome: "planned";
88
88
  subjectType: "skill";
89
89
  planName: string;
90
- execution: import("@agentxm/workspace-operations").ExecutionCandidate<import("./requirements.ts").SelectiveUpdateStepRequirements, never>;
90
+ execution: import("@agentxm/workspace-operations").ExecutionCandidate<import("../../index.ts").InstallStepRequirements, never>;
91
91
  reason?: never;
92
92
  message?: never;
93
93
  planDescription?: never;
@@ -111,11 +111,11 @@ export declare const SelectiveUpdate: {
111
111
  outcome: "planned";
112
112
  subjectType: "subagent";
113
113
  planName: string;
114
- execution: import("@agentxm/workspace-operations").ExecutionCandidate<import("./requirements.ts").SelectiveUpdateStepRequirements, never>;
114
+ execution: import("@agentxm/workspace-operations").ExecutionCandidate<import("../../index.ts").InstallStepRequirements, never>;
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("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
- 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>;
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("@agentxm/workspace-state").ConfiguredAgentOutcomesProvider | import("@agentxm/extension-materialization").SkillManager | import("@agentxm/extension-resolution").ReleaseAgePosture | import("effect/Scope").Scope | import("@agentxm/extension-sources").SourceHostProviders | import("@agentxm/extension-materialization").SubagentManager | import("@agentxm/extension-sources").WorkspaceCatalog | import("../../index.ts").InstallStepRequirements>;
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("../../index.ts").InstallStepRequirements>;
120
120
  };
121
121
  //# sourceMappingURL=use-case.d.ts.map
@@ -39,5 +39,5 @@ export interface NothingSelectiveUpdateCandidate {
39
39
  }
40
40
  export type SelectiveUpdateCandidate = PlannedSelectiveUpdateCandidate | NothingSelectiveUpdateCandidate;
41
41
  /** Preview or apply a settled selective update. */
42
- export declare const previewOrApplySelectiveUpdate: (candidate: PlannedSelectiveUpdateCandidate, execution: PlanExecution) => import("effect/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 | SelectiveUpdateStepRequirements>;
42
+ export declare const previewOrApplySelectiveUpdate: (candidate: PlannedSelectiveUpdateCandidate, execution: PlanExecution) => import("effect/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("../../index.ts").InstallStepRequirements>;
43
43
  //# sourceMappingURL=vocabulary.d.ts.map
@@ -20,7 +20,7 @@ import { extensionTypeSentenceLabels, extensionTypePluralSentenceLabels, parseSo
20
20
  import { isCatalogExtensionType } from "@agentxm/extension-model/unstable/extension-types";
21
21
  import { SourceHostProviders, resolveInstalledIdentifierNameOrInput, resolveSource, } from "@agentxm/extension-sources";
22
22
  import { WorkspaceRecords, configuredRowsByName, enabledConfiguredEntries, } from "@agentxm/workspace-state";
23
- import { expandGlobs } from "../glob.js";
23
+ import { expandGlobs } from "@agentxm/extension-model/unstable/extensions/name-patterns";
24
24
  /** The flag spelling reported when a `--name` filter matches nothing. */
25
25
  export const UPDATE_NAME_FILTER_FLAG = "--name";
26
26
  const sourceMatchesEntrySource = (sourceValue, entrySource) => Effect.gen(function* () {
package/package.json CHANGED
@@ -4,21 +4,21 @@
4
4
  "url": "https://github.com/agentxm/axm/issues"
5
5
  },
6
6
  "dependencies": {
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",
7
+ "@agentxm/agent-integration": "^0.30.2",
8
+ "@agentxm/cli-maintenance": "^0.30.2",
9
+ "@agentxm/extension-content": "^0.30.2",
10
+ "@agentxm/extension-materialization": "^0.30.2",
11
+ "@agentxm/extension-model": "^0.30.2",
12
+ "@agentxm/extension-resolution": "^0.30.2",
13
+ "@agentxm/extension-sources": "^0.30.2",
14
+ "@agentxm/registry-auth": "^0.30.2",
15
+ "@agentxm/registry-client": "^0.30.2",
16
+ "@agentxm/registry-protocol": "^0.30.2",
17
+ "@agentxm/workspace-operations": "^0.30.2",
18
+ "@agentxm/workspace-projection": "^0.30.2",
19
+ "@agentxm/workspace-reconciliation": "^0.30.2",
20
+ "@agentxm/workspace-state": "^0.30.2",
21
+ "@agentxm/workspace-transactions": "^0.30.2",
22
22
  "effect": "4.0.0-rc.115",
23
23
  "fflate": "^0.8.3"
24
24
  },
@@ -48,6 +48,14 @@
48
48
  "./testing": {
49
49
  "types": "./dist/src/testing.d.ts",
50
50
  "default": "./dist/src/testing.js"
51
+ },
52
+ "./skills/application": {
53
+ "types": "./dist/src/skills/application/index.d.ts",
54
+ "default": "./dist/src/skills/application/index.js"
55
+ },
56
+ "./subagents/application": {
57
+ "types": "./dist/src/subagents/application/index.d.ts",
58
+ "default": "./dist/src/subagents/application/index.js"
51
59
  }
52
60
  },
53
61
  "files": [
@@ -70,5 +78,5 @@
70
78
  },
71
79
  "sideEffects": false,
72
80
  "type": "module",
73
- "version": "0.30.1"
81
+ "version": "0.30.2"
74
82
  }
@@ -1,35 +0,0 @@
1
- /**
2
- * Glob expansion for extension names.
3
- *
4
- * Expands `*` wildcards against a list of names. Only `*` is supported
5
- * as a wildcard — all other characters are treated as literals.
6
- *
7
- * @experimental This API is unstable and may change without notice.
8
- */
9
- /**
10
- * Expand a glob pattern against a list of names.
11
- *
12
- * Only `*` wildcards are supported. All other characters (including `?`, `[`, `]`)
13
- * are treated as literals. Matching is case-sensitive.
14
- *
15
- * @param pattern - The pattern to match (may contain `*`)
16
- * @param names - Available names to match against
17
- * @returns Matching names in their original order
18
- */
19
- export declare const expandGlob: (pattern: string, names: ReadonlyArray<string>) => ReadonlyArray<string>;
20
- /**
21
- * Expand multiple glob patterns against a list of skill names.
22
- *
23
- * Returns the union of all matches, deduplicated, preserving the original
24
- * order of `names`.
25
- *
26
- * @param patterns - Patterns to match (may contain `*`)
27
- * @param names - Available names to match against
28
- * @returns Matching names in their original order, deduplicated
29
- */
30
- export declare const expandGlobs: (patterns: ReadonlyArray<string>, names: ReadonlyArray<string>) => ReadonlyArray<string>;
31
- /**
32
- * Returns true when an input should be treated as a glob pattern.
33
- */
34
- export declare const isGlobPattern: (input: string) => boolean;
35
- //# sourceMappingURL=glob.d.ts.map
package/dist/src/glob.js DELETED
@@ -1,75 +0,0 @@
1
- /**
2
- * Glob expansion for extension names.
3
- *
4
- * Expands `*` wildcards against a list of names. Only `*` is supported
5
- * as a wildcard — all other characters are treated as literals.
6
- *
7
- * @experimental This API is unstable and may change without notice.
8
- */
9
- /**
10
- * Expand a glob pattern against a list of names.
11
- *
12
- * Only `*` wildcards are supported. All other characters (including `?`, `[`, `]`)
13
- * are treated as literals. Matching is case-sensitive.
14
- *
15
- * @param pattern - The pattern to match (may contain `*`)
16
- * @param names - Available names to match against
17
- * @returns Matching names in their original order
18
- */
19
- export const expandGlob = (pattern, names) => {
20
- const matches = (name) => {
21
- let patternIndex = 0;
22
- let nameIndex = 0;
23
- let wildcardIndex = -1;
24
- let wildcardNameIndex = 0;
25
- while (nameIndex < name.length) {
26
- const token = pattern[patternIndex];
27
- if (token !== undefined && token !== "*" && token === name[nameIndex]) {
28
- patternIndex += 1;
29
- nameIndex += 1;
30
- }
31
- else if (token === "*") {
32
- wildcardIndex = patternIndex;
33
- wildcardNameIndex = nameIndex;
34
- patternIndex += 1;
35
- }
36
- else if (wildcardIndex >= 0) {
37
- patternIndex = wildcardIndex + 1;
38
- wildcardNameIndex += 1;
39
- nameIndex = wildcardNameIndex;
40
- }
41
- else {
42
- return false;
43
- }
44
- }
45
- while (pattern[patternIndex] === "*") {
46
- patternIndex += 1;
47
- }
48
- return patternIndex === pattern.length;
49
- };
50
- return names.filter(matches);
51
- };
52
- /**
53
- * Expand multiple glob patterns against a list of skill names.
54
- *
55
- * Returns the union of all matches, deduplicated, preserving the original
56
- * order of `names`.
57
- *
58
- * @param patterns - Patterns to match (may contain `*`)
59
- * @param names - Available names to match against
60
- * @returns Matching names in their original order, deduplicated
61
- */
62
- export const expandGlobs = (patterns, names) => {
63
- const matched = new Set();
64
- for (const pattern of patterns) {
65
- for (const name of expandGlob(pattern, names)) {
66
- matched.add(name);
67
- }
68
- }
69
- return names.filter((n) => matched.has(n));
70
- };
71
- /**
72
- * Returns true when an input should be treated as a glob pattern.
73
- */
74
- export const isGlobPattern = (input) => input.includes("*");
75
- //# sourceMappingURL=glob.js.map
@@ -1,46 +0,0 @@
1
- /**
2
- * Choosing among the extensions a source offers.
3
- *
4
- * When a source contains several skills or subagents and the request named
5
- * none of them, someone has to choose. Which candidates are offered and what
6
- * a choice means is this feature's; how the choice is asked for — a terminal
7
- * multiselect, a test double, nothing at all — is the application's.
8
- *
9
- * @experimental This API is unstable and may change without notice.
10
- */
11
- import type * as Array from "effect/Array";
12
- import * as ServiceMap from "effect/Context";
13
- import type * as Effect from "effect/Effect";
14
- import type { SkillExtensionRef } from "@agentxm/extension-model/unstable/extensions/refs/skill";
15
- import type { SubagentExtensionRef } from "@agentxm/extension-model/unstable/extensions/refs/subagent";
16
- import type { ExtensionLifecycleFailed } from "../errors.js";
17
- declare const ExtensionSelectionCancelled_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
18
- readonly _tag: "ExtensionSelectionCancelled";
19
- } & Readonly<A>;
20
- /**
21
- * The person was asked which extensions to install and declined to answer.
22
- * Nothing was written and nothing is pending, so the application reports a
23
- * cancelled invocation rather than a failure.
24
- */
25
- export declare class ExtensionSelectionCancelled extends ExtensionSelectionCancelled_base<{
26
- readonly message: string;
27
- }> {
28
- }
29
- /**
30
- * A surface that cannot open the choice refuses with the feature's own typed
31
- * failure rather than reporting a cancellation nobody made: declining is a
32
- * clean exit, being unable to ask is a refusal the operator must act on. Both
33
- * callers already carry the pair, so naming it here narrows nothing.
34
- */
35
- export type ExtensionSelectionFailure = ExtensionSelectionCancelled | ExtensionLifecycleFailed;
36
- export interface ExtensionSelectionInteractionService {
37
- /** Choose which of the discovered skills to install; at least one. */
38
- readonly selectSkills: (candidates: Array.NonEmptyReadonlyArray<SkillExtensionRef>) => Effect.Effect<ReadonlyArray<SkillExtensionRef>, ExtensionSelectionFailure>;
39
- /** Choose which of the discovered subagents to install; at least one. */
40
- readonly selectSubagents: (candidates: Array.NonEmptyReadonlyArray<SubagentExtensionRef>) => Effect.Effect<ReadonlyArray<SubagentExtensionRef>, ExtensionSelectionFailure>;
41
- }
42
- declare const ExtensionSelectionInteraction_base: ServiceMap.ServiceClass<ExtensionSelectionInteraction, "@agentxm/extension-lifecycle/install/ExtensionSelectionInteraction", ExtensionSelectionInteractionService>;
43
- export declare class ExtensionSelectionInteraction extends ExtensionSelectionInteraction_base {
44
- }
45
- export {};
46
- //# sourceMappingURL=selection-interaction.d.ts.map
@@ -1,22 +0,0 @@
1
- /**
2
- * Choosing among the extensions a source offers.
3
- *
4
- * When a source contains several skills or subagents and the request named
5
- * none of them, someone has to choose. Which candidates are offered and what
6
- * a choice means is this feature's; how the choice is asked for — a terminal
7
- * multiselect, a test double, nothing at all — is the application's.
8
- *
9
- * @experimental This API is unstable and may change without notice.
10
- */
11
- import * as ServiceMap from "effect/Context";
12
- import * as Data from "effect/Data";
13
- /**
14
- * The person was asked which extensions to install and declined to answer.
15
- * Nothing was written and nothing is pending, so the application reports a
16
- * cancelled invocation rather than a failure.
17
- */
18
- export class ExtensionSelectionCancelled extends Data.TaggedError("ExtensionSelectionCancelled") {
19
- }
20
- export class ExtensionSelectionInteraction extends ServiceMap.Service()("@agentxm/extension-lifecycle/install/ExtensionSelectionInteraction") {
21
- }
22
- //# sourceMappingURL=selection-interaction.js.map
@@ -1,26 +0,0 @@
1
- /**
2
- * Which of a source's skills this request installs.
3
- *
4
- * Named skills are matched by glob and every named pattern must match
5
- * something; `--all` and an unattended invocation take everything; a source
6
- * offering exactly one skill needs no decision; anything else is a choice
7
- * only a person can make.
8
- *
9
- * @experimental This API is unstable and may change without notice.
10
- */
11
- import * as Array from "effect/Array";
12
- import * as Effect from "effect/Effect";
13
- import type { SkillExtensionRef } from "@agentxm/extension-model/unstable/extensions/refs/skill";
14
- import type { ExtensionLifecycleFailed } from "../../errors.js";
15
- import { ExtensionSelectionInteraction, type ExtensionSelectionCancelled } from "../../install/selection-interaction.js";
16
- export interface SkillSelectionRequest {
17
- /** Names or glob patterns the request named explicitly. */
18
- readonly requestedSkills: ReadonlyArray<string>;
19
- /** Take everything the source offers without asking. */
20
- readonly all: boolean;
21
- /** No prompt can open in this invocation. */
22
- readonly nonInteractive: boolean;
23
- }
24
- /** Settle which discovered skills this request installs. */
25
- export declare const determineSkillsToInstall: (skills: Array.NonEmptyReadonlyArray<SkillExtensionRef>, request: SkillSelectionRequest) => Effect.Effect<ReadonlyArray<SkillExtensionRef>, ExtensionLifecycleFailed | ExtensionSelectionCancelled, ExtensionSelectionInteraction>;
26
- //# sourceMappingURL=selection.d.ts.map
@@ -1,41 +0,0 @@
1
- /**
2
- * Which of a source's skills this request installs.
3
- *
4
- * Named skills are matched by glob and every named pattern must match
5
- * something; `--all` and an unattended invocation take everything; a source
6
- * offering exactly one skill needs no decision; anything else is a choice
7
- * only a person can make.
8
- *
9
- * @experimental This API is unstable and may change without notice.
10
- */
11
- import * as Array from "effect/Array";
12
- import * as Effect from "effect/Effect";
13
- import { expandGlobs } from "../../glob.js";
14
- import { ExtensionSelectionInteraction, } from "../../install/selection-interaction.js";
15
- import { installRefused } from "../../install/vocabulary.js";
16
- /** Settle which discovered skills this request installs. */
17
- export const determineSkillsToInstall = Effect.fn("InstallExtensions.determineSkillsToInstall")(function* (skills, request) {
18
- if (request.requestedSkills.length > 0) {
19
- const allNames = Array.map(skills, (skill) => skill.skill.name);
20
- const matched = expandGlobs(request.requestedSkills, allNames);
21
- if (matched.length === 0) {
22
- return yield* installRefused({
23
- category: "not_found",
24
- detail: `No skills matched: ${request.requestedSkills.join(", ")}. Source contains: ${[
25
- ...allNames,
26
- ]
27
- .sort((left, right) => left.localeCompare(right))
28
- .join(", ")}`,
29
- recover: "Check the skill names or patterns and try again",
30
- });
31
- }
32
- return Array.filter(skills, (skill) => matched.includes(skill.skill.name));
33
- }
34
- if (request.all || request.nonInteractive)
35
- return skills;
36
- if (skills.length === 1)
37
- return skills;
38
- const interaction = yield* ExtensionSelectionInteraction;
39
- return yield* interaction.selectSkills(skills);
40
- });
41
- //# sourceMappingURL=selection.js.map
@@ -1,33 +0,0 @@
1
- /**
2
- * Structured per-agent installation result.
3
- *
4
- * Captures the outcome of installing a skill for a single agent,
5
- * including success/failure state and symlink fallback information.
6
- *
7
- * @experimental This API is unstable and may change without notice.
8
- */
9
- import type * as Option from "effect/Option";
10
- /**
11
- * Result of installing a skill for a single agent.
12
- *
13
- * - `success: true, mode: "symlink"` — installed via symlink
14
- * - `success: true, mode: "copy"` — symlink failed, fell back to copy
15
- * - `success: false` — installation failed
16
- */
17
- export interface InstallResult {
18
- /** Whether the installation succeeded for this agent. */
19
- readonly success: boolean;
20
- /** Installation mode used ("symlink" or "copy"). */
21
- readonly mode: "symlink" | "copy";
22
- /** Whether symlink creation was attempted and failed (triggering copy fallback). */
23
- readonly symlinkFailed: boolean;
24
- /** Error message if installation failed. */
25
- readonly error: Option.Option<string>;
26
- /** Agent-specific skill directory path. */
27
- readonly path: string;
28
- /** Exact source-qualified canonical skill location. */
29
- readonly canonicalPath: string;
30
- /** User-visible change at the agent-specific skill path. */
31
- readonly change?: "created" | "updated" | "unchanged";
32
- }
33
- //# sourceMappingURL=install-result.d.ts.map
@@ -1,10 +0,0 @@
1
- /**
2
- * Structured per-agent installation result.
3
- *
4
- * Captures the outcome of installing a skill for a single agent,
5
- * including success/failure state and symlink fallback information.
6
- *
7
- * @experimental This API is unstable and may change without notice.
8
- */
9
- export {};
10
- //# sourceMappingURL=install-result.js.map