@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.
- package/dist/src/index.d.ts +0 -3
- package/dist/src/index.js +0 -2
- package/dist/src/install/install-extensions.d.ts +5 -5
- package/dist/src/install/install-extensions.js +2 -1
- package/dist/src/mcps/install/plan.d.ts +1 -1
- package/dist/src/mcps/install/plan.js +58 -1
- package/dist/src/packs/uninstall/plan.js +1 -1
- 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/plan.d.ts +15 -4
- package/dist/src/skills/install/plan.js +112 -96
- package/dist/src/skills/uninstall/plan.js +9 -2
- 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 +1 -2
- package/dist/src/subagents/uninstall/plan.js +1 -1
- package/dist/src/testing.d.ts +3 -2
- package/dist/src/testing.js +7 -5
- package/dist/src/uninstall/root-intent.d.ts +1 -0
- 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.js +30 -6
- 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 -26
- package/dist/src/update/selective/subagents.d.ts +1 -2
- package/dist/src/update/selective/subagents.js +9 -8
- 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/package.json +24 -16
- 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 -66
- package/dist/src/skills/operations/install.js +0 -582
- package/dist/src/subagents/install/selection.d.ts +0 -26
- package/dist/src/subagents/install/selection.js +0 -37
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Which of a source's subagents this request installs.
|
|
3
|
-
*
|
|
4
|
-
* The same decision the skill route makes, over subagent names: named
|
|
5
|
-
* patterns must match, `--all` and an unattended invocation take everything,
|
|
6
|
-
* a single subagent needs no decision, and anything else is a person's
|
|
7
|
-
* choice.
|
|
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 subagents this request installs. */
|
|
17
|
-
export const determineSubagentsToInstall = Effect.fn("InstallExtensions.determineSubagentsToInstall")(function* (subagents, request) {
|
|
18
|
-
if (request.requestedSubagents.length > 0) {
|
|
19
|
-
const allNames = Array.map(subagents, (subagent) => subagent.subagent.name);
|
|
20
|
-
const matched = expandGlobs(request.requestedSubagents, allNames);
|
|
21
|
-
if (matched.length === 0) {
|
|
22
|
-
return yield* installRefused({
|
|
23
|
-
category: "internal",
|
|
24
|
-
detail: `No subagents matched: ${request.requestedSubagents.join(", ")}`,
|
|
25
|
-
suggestions: [{ description: "Check the subagent names or patterns and try again." }],
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
return Array.filter(subagents, (subagent) => matched.includes(subagent.subagent.name));
|
|
29
|
-
}
|
|
30
|
-
if (request.all || request.nonInteractive)
|
|
31
|
-
return subagents;
|
|
32
|
-
if (subagents.length === 1)
|
|
33
|
-
return subagents;
|
|
34
|
-
const interaction = yield* ExtensionSelectionInteraction;
|
|
35
|
-
return yield* interaction.selectSubagents(subagents);
|
|
36
|
-
});
|
|
37
|
-
//# sourceMappingURL=selection.js.map
|