axm.sh 0.1.6 → 0.2.0

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 (95) hide show
  1. package/dist/src/app.d.ts.map +1 -1
  2. package/dist/src/app.js +10 -0
  3. package/dist/src/app.js.map +1 -1
  4. package/dist/src/formatter.d.ts +1 -1
  5. package/dist/src/formatter.d.ts.map +1 -1
  6. package/dist/src/formatter.js +1 -1
  7. package/dist/src/formatter.js.map +1 -1
  8. package/dist/src/root/commands/install/command-actions.d.ts +2 -2
  9. package/dist/src/root/commands/install/command-actions.d.ts.map +1 -1
  10. package/dist/src/root/commands/install/command-actions.js +1 -1
  11. package/dist/src/root/commands/install/command-actions.js.map +1 -1
  12. package/dist/src/root/commands/uninstall/command-actions.d.ts +1 -1
  13. package/dist/src/root/commands/uninstall/command-actions.d.ts.map +1 -1
  14. package/dist/src/root/commands/uninstall/command-actions.js +1 -1
  15. package/dist/src/root/commands/uninstall/command-actions.js.map +1 -1
  16. package/dist/src/root/init.js +1 -1
  17. package/dist/src/root/init.js.map +1 -1
  18. package/dist/src/root/mcp-servers/install/command-actions.d.ts +2 -2
  19. package/dist/src/root/mcp-servers/install/command-actions.d.ts.map +1 -1
  20. package/dist/src/root/mcp-servers/install/command-actions.js +1 -1
  21. package/dist/src/root/mcp-servers/install/command-actions.js.map +1 -1
  22. package/dist/src/root/mcp-servers/uninstall/command-actions.d.ts +1 -1
  23. package/dist/src/root/mcp-servers/uninstall/command-actions.d.ts.map +1 -1
  24. package/dist/src/root/mcp-servers/uninstall/command-actions.js +1 -1
  25. package/dist/src/root/mcp-servers/uninstall/command-actions.js.map +1 -1
  26. package/dist/src/root/outdated/command.d.ts +3 -0
  27. package/dist/src/root/outdated/command.d.ts.map +1 -0
  28. package/dist/src/root/outdated/command.js +20 -0
  29. package/dist/src/root/outdated/command.js.map +1 -0
  30. package/dist/src/root/outdated/handler.d.ts +17 -0
  31. package/dist/src/root/outdated/handler.d.ts.map +1 -0
  32. package/dist/src/root/outdated/handler.js +130 -0
  33. package/dist/src/root/outdated/handler.js.map +1 -0
  34. package/dist/src/root/packs/install/command-actions.d.ts +2 -2
  35. package/dist/src/root/packs/install/command-actions.d.ts.map +1 -1
  36. package/dist/src/root/packs/install/command-actions.js +121 -4
  37. package/dist/src/root/packs/install/command-actions.js.map +1 -1
  38. package/dist/src/root/packs/uninstall/command-actions.d.ts +1 -1
  39. package/dist/src/root/packs/uninstall/command-actions.d.ts.map +1 -1
  40. package/dist/src/root/packs/uninstall/command-actions.js +1 -1
  41. package/dist/src/root/packs/uninstall/command-actions.js.map +1 -1
  42. package/dist/src/root/skills/install/command-actions.d.ts +1 -1
  43. package/dist/src/root/skills/install/command-actions.d.ts.map +1 -1
  44. package/dist/src/root/skills/install/command-actions.js +1 -1
  45. package/dist/src/root/skills/install/command-actions.js.map +1 -1
  46. package/dist/src/root/skills/uninstall/command-actions.d.ts +1 -1
  47. package/dist/src/root/skills/uninstall/command-actions.d.ts.map +1 -1
  48. package/dist/src/root/skills/uninstall/command-actions.js +1 -1
  49. package/dist/src/root/skills/uninstall/command-actions.js.map +1 -1
  50. package/dist/src/root/subagents/install/command-actions.d.ts +1 -1
  51. package/dist/src/root/subagents/install/command-actions.d.ts.map +1 -1
  52. package/dist/src/root/subagents/install/command-actions.js +1 -1
  53. package/dist/src/root/subagents/install/command-actions.js.map +1 -1
  54. package/dist/src/root/subagents/uninstall/command-actions.d.ts +1 -1
  55. package/dist/src/root/subagents/uninstall/command-actions.d.ts.map +1 -1
  56. package/dist/src/root/subagents/uninstall/command-actions.js +1 -1
  57. package/dist/src/root/subagents/uninstall/command-actions.js.map +1 -1
  58. package/dist/src/root/uninstall/command.d.ts +3 -0
  59. package/dist/src/root/uninstall/command.d.ts.map +1 -0
  60. package/dist/src/root/uninstall/command.js +27 -0
  61. package/dist/src/root/uninstall/command.js.map +1 -0
  62. package/dist/src/root/uninstall/handler.d.ts +16 -0
  63. package/dist/src/root/uninstall/handler.d.ts.map +1 -0
  64. package/dist/src/root/uninstall/handler.js +49 -0
  65. package/dist/src/root/uninstall/handler.js.map +1 -0
  66. package/dist/src/root/uninstall/resolve-root-uninstall-intent.d.ts +15 -0
  67. package/dist/src/root/uninstall/resolve-root-uninstall-intent.d.ts.map +1 -0
  68. package/dist/src/root/uninstall/resolve-root-uninstall-intent.js +75 -0
  69. package/dist/src/root/uninstall/resolve-root-uninstall-intent.js.map +1 -0
  70. package/dist/src/root/update/command.d.ts +3 -0
  71. package/dist/src/root/update/command.d.ts.map +1 -0
  72. package/dist/src/root/update/command.js +32 -0
  73. package/dist/src/root/update/command.js.map +1 -0
  74. package/dist/src/root/update/handler.d.ts +17 -0
  75. package/dist/src/root/update/handler.d.ts.map +1 -0
  76. package/dist/src/root/update/handler.js +62 -0
  77. package/dist/src/root/update/handler.js.map +1 -0
  78. package/dist/src/root/update/resolve-root-update-intent.d.ts +16 -0
  79. package/dist/src/root/update/resolve-root-update-intent.d.ts.map +1 -0
  80. package/dist/src/root/update/resolve-root-update-intent.js +75 -0
  81. package/dist/src/root/update/resolve-root-update-intent.js.map +1 -0
  82. package/dist/src/root/update/workspace-update-handler.d.ts +16 -0
  83. package/dist/src/root/update/workspace-update-handler.d.ts.map +1 -0
  84. package/dist/src/root/update/workspace-update-handler.js +40 -0
  85. package/dist/src/root/update/workspace-update-handler.js.map +1 -0
  86. package/dist/src/root/update/workspace-update.d.ts +38 -0
  87. package/dist/src/root/update/workspace-update.d.ts.map +1 -0
  88. package/dist/src/root/update/workspace-update.js +160 -0
  89. package/dist/src/root/update/workspace-update.js.map +1 -0
  90. package/dist/src/runtime.d.ts +1 -1
  91. package/dist/src/test-helpers.d.ts +1 -0
  92. package/dist/src/test-helpers.d.ts.map +1 -1
  93. package/dist/src/test-helpers.js +42 -2
  94. package/dist/src/test-helpers.js.map +1 -1
  95. package/package.json +6 -6
@@ -0,0 +1,27 @@
1
+ import { Argument, Command, Flag } from "effect/unstable/cli";
2
+ import { forceFlag, previewFlag, yesFlag } from "@agentxm/client-core/unstable/cli-flags";
3
+ import { withArgvTracking } from "@agentxm/client-core/unstable/cli-runtime";
4
+ import { DEFAULT_WORKSPACE_SCOPE } from "@agentxm/client-core/unstable/workspace";
5
+ import { withRuntime, withWorkspace } from "../../runtime.js";
6
+ import { handleUninstall } from "./handler.js";
7
+ const uninstallConfig = {
8
+ source: Argument.string("source").pipe(Argument.withDescription("Registry FQN (@owner/<plural-type>/<name>[@version])")),
9
+ yes: yesFlag.pipe(Flag.withDescription("Skip confirmation after reviewing the uninstall plan")),
10
+ force: forceFlag.pipe(Flag.withDescription("Remove even if the extension is referenced by other extensions")),
11
+ preview: previewFlag.pipe(Flag.withDescription("Show what would be removed without making changes")),
12
+ };
13
+ export const uninstallCommand = Command.make("uninstall", uninstallConfig, ({ source, yes, force, preview }) => handleUninstall({ source, yes, force, preview }).pipe(withWorkspace(DEFAULT_WORKSPACE_SCOPE), withRuntime("uninstall"))).pipe(withArgvTracking(uninstallConfig), Command.withDescription("Uninstall a registry FQN (@owner/<plural-type>/<name>[@version]) from the current workspace"), Command.withExamples([
14
+ {
15
+ command: "axm uninstall @acme/skills/code-review",
16
+ description: "Remove an installed skill by fully qualified registry name",
17
+ },
18
+ {
19
+ command: "axm uninstall @acme/commands/release-notes@^1.2.0 --preview",
20
+ description: "Preview uninstalling a command; version is ignored for uninstall routing",
21
+ },
22
+ {
23
+ command: "axm uninstall @acme/packs/frontend-tools --yes",
24
+ description: "Remove a pack and skip confirmation in scripts or CI",
25
+ },
26
+ ]));
27
+ //# sourceMappingURL=command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command.js","sourceRoot":"","sources":["../../../../src/root/uninstall/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE9D,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AAC1F,OAA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AAW,EAAE,sDAAsD;KACpE;CACF,CAAC,CACH,CAAC"}
@@ -0,0 +1,16 @@
1
+ import * as Effect from "effect/Effect";
2
+ import { UninstallCommandCommandWorkflowActions } from "../commands/uninstall/command-actions.js";
3
+ import { UninstallMcpServerCommandWorkflowActions } from "../mcp-servers/uninstall/command-actions.js";
4
+ import { UninstallPackCommandWorkflowActions } from "../packs/uninstall/command-actions.js";
5
+ import { UninstallSkillCommandWorkflowActions } from "../skills/uninstall/command-actions.js";
6
+ import { UninstallSubagentCommandWorkflowActions } from "../subagents/uninstall/command-actions.js";
7
+ export interface RootUninstallFlags {
8
+ readonly yes: boolean;
9
+ readonly force: boolean;
10
+ readonly preview: boolean;
11
+ }
12
+ export interface RootUninstallHandlerArgs extends RootUninstallFlags {
13
+ readonly source: string;
14
+ }
15
+ export declare const handleUninstall: (args: RootUninstallHandlerArgs) => Effect.Effect<void, import("packages/core/src/unstable/app-error/app-error.ts").AppError | import("packages/core/src/unstable/cli-prompt/prompt-cancelled.ts").PromptCancelled, import("packages/core/src/unstable/cli-renderer/cli-renderer.ts").CliRenderer | import("packages/core/src/unstable/cli-flags/verbosity.ts").Verbosity | import("effect/FileSystem").FileSystem | import("effect/Path").Path | "effect/unstable/cli/GlobalFlag/axm-non-interactive" | import("packages/core/src/unstable/workspace/service-interface.ts").Workspace | UninstallCommandCommandWorkflowActions | UninstallMcpServerCommandWorkflowActions | UninstallPackCommandWorkflowActions | UninstallSkillCommandWorkflowActions | UninstallSubagentCommandWorkflowActions>;
16
+ //# sourceMappingURL=handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../src/root/uninstall/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAQxC,OAAO,EACL,sCAAsC,EAEvC,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,wCAAwC,EAEzC,MAAM,6CAA6C,CAAC;AACrD,OAAO,EACL,mCAAmC,EAEpC,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,oCAAoC,EAErC,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,uCAAuC,EAExC,MAAM,2CAA2C,CAAC;AAGnD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,wBAAyB,SAAQ,kBAAkB;IAClE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AA+CD,eAAO,MAAM,eAAe,GAAI,MAAM,wBAAwB,muBAA6B,CAAC"}
@@ -0,0 +1,49 @@
1
+ import * as Effect from "effect/Effect";
2
+ import { setCommandSemanticProperties, summarizeCommandOutcome, } from "@agentxm/client-core/unstable/cli-runtime";
3
+ import { runUninstallCommandWorkflow } from "@agentxm/client-core/unstable/workflows";
4
+ import { emitPlanResolutionResult, planResolutionToSummary } from "../../json-output.js";
5
+ import { UninstallCommandCommandWorkflowActions, } from "../commands/uninstall/command-actions.js";
6
+ import { UninstallMcpServerCommandWorkflowActions, } from "../mcp-servers/uninstall/command-actions.js";
7
+ import { UninstallPackCommandWorkflowActions, } from "../packs/uninstall/command-actions.js";
8
+ import { UninstallSkillCommandWorkflowActions, } from "../skills/uninstall/command-actions.js";
9
+ import { UninstallSubagentCommandWorkflowActions, } from "../subagents/uninstall/command-actions.js";
10
+ import { resolveRootUninstallIntent } from "./resolve-root-uninstall-intent.js";
11
+ const runUninstallIntent = (args) => Effect.gen(function* () {
12
+ const intent = yield* resolveRootUninstallIntent(args.source);
13
+ const resolution = yield* Effect.gen(function* () {
14
+ switch (intent.type) {
15
+ case "skill": {
16
+ const actions = yield* UninstallSkillCommandWorkflowActions;
17
+ const uninstallArgs = { skill: intent.name };
18
+ return yield* runUninstallCommandWorkflow(uninstallArgs, actions, args);
19
+ }
20
+ case "command": {
21
+ const actions = yield* UninstallCommandCommandWorkflowActions;
22
+ const uninstallArgs = { commandName: intent.name };
23
+ return yield* runUninstallCommandWorkflow(uninstallArgs, actions, args);
24
+ }
25
+ case "mcp-server": {
26
+ const actions = yield* UninstallMcpServerCommandWorkflowActions;
27
+ const uninstallArgs = { serverName: intent.name };
28
+ return yield* runUninstallCommandWorkflow(uninstallArgs, actions, args);
29
+ }
30
+ case "subagent": {
31
+ const actions = yield* UninstallSubagentCommandWorkflowActions;
32
+ const uninstallArgs = { subagent: intent.name };
33
+ return yield* runUninstallCommandWorkflow(uninstallArgs, actions, args);
34
+ }
35
+ case "pack": {
36
+ const actions = yield* UninstallPackCommandWorkflowActions;
37
+ const uninstallArgs = { name: intent.name };
38
+ return yield* runUninstallCommandWorkflow(uninstallArgs, actions, args);
39
+ }
40
+ }
41
+ });
42
+ yield* setCommandSemanticProperties(summarizeCommandOutcome(planResolutionToSummary(resolution, {
43
+ subjectType: intent.type,
44
+ sourceKind: "registry",
45
+ })));
46
+ yield* emitPlanResolutionResult("uninstall", resolution);
47
+ });
48
+ export const handleUninstall = (args) => runUninstallIntent(args);
49
+ //# sourceMappingURL=handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/root/uninstall/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EACL,4BAA4B,EAC5B,uBAAuB,GACxB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AAEtF,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACzF,OAAO,EACL,sCAAsC,GAEvC,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,wCAAwC,GAEzC,MAAM,6CAA6C,CAAC;AACrD,OAAO,EACL,mCAAmC,GAEpC,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL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AAC,CAAC;YAC1E,CAAC;YACD,KAAK,UAAU,CAAC,CAAC,CAAC;gBAChB,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,uCAAuC,CAAC;gBAC/D,MAAM,aAAa,GAAiC,EAAE,QAAQ,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;gBAC9E,OAAO,KAAK,CAAC,CAAC,2BAA2B,CAAC,aAAa,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;YAC1E,CAAC;YACD,KAAK,MAAM,CAAC,CAAC,CAAC;gBACZ,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,mCAAmC,CAAC;gBAC3D,MAAM,aAAa,GAA6B,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;gBACtE,OAAO,KAAK,CAAC,CAAC,2BAA2B,CAAC,aAAa,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;YAC1E,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,KAAK,CAAC,CAAC,4BAA4B,CACjC,uBAAuB,CACrB,uBAAuB,CAAC,UAAU,EAAE;QAClC,WAAW,EAAE,MAAM,CAAC,IAAI;QACxB,UAAU,EAAE,UAAU;KACvB,CAAC,CACH,CACF,CAAC;IACF,KAAK,CAAC,CAAC,wBAAwB,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;AAC3D,CAAC,CAAC,CAAC;AAEL,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAA8B,EAAE,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC"}
@@ -0,0 +1,15 @@
1
+ import * as Effect from "effect/Effect";
2
+ import { type InstallableExtensionType } from "@agentxm/client-core/unstable/extensions";
3
+ export declare const rootUninstallableTypeSegments: readonly ["skills", "commands", "mcp-servers", "subagents", "packs"];
4
+ export type RootUninstallableType = InstallableExtensionType;
5
+ export interface RootUninstallIntent {
6
+ readonly source: string;
7
+ readonly type: RootUninstallableType;
8
+ readonly name: string;
9
+ }
10
+ export declare const resolveRootUninstallIntent: (input: string) => Effect.Effect<{
11
+ source: string;
12
+ type: "command" | "skill" | "subagent" | "pack" | "mcp-server";
13
+ name: string & import("effect/Brand").Brand<"ExtensionName">;
14
+ }, import("@agentxm/client-core/unstable/app-error").AppError, never>;
15
+ //# sourceMappingURL=resolve-root-uninstall-intent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-root-uninstall-intent.d.ts","sourceRoot":"","sources":["../../../../src/root/uninstall/resolve-root-uninstall-intent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAMxC,OAAO,EAKL,KAAK,wBAAwB,EAC9B,MAAM,0CAA0C,CAAC;AAKlD,eAAO,MAAM,6BAA6B,sEAAyC,CAAC;AACpF,MAAM,MAAM,qBAAqB,GAAG,wBAAwB,CAAC;AAE7D,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAC;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AA8BD,eAAO,MAAM,0BAA0B,GAAI,OAAO,MAAM;;;;qEAmDpD,CAAC"}
@@ -0,0 +1,75 @@
1
+ import * as Effect from "effect/Effect";
2
+ import * as Option from "effect/Option";
3
+ import * as Schema from "effect/Schema";
4
+ import * as SchemaIssue from "effect/SchemaIssue";
5
+ import { makeAppError } from "@agentxm/client-core/unstable/app-error";
6
+ import { installableExtensionTypePluralSegments, isInstallableExtensionTypePlural, RegistrySourceRefSchema, toInstallableExtensionType, } from "@agentxm/client-core/unstable/extensions";
7
+ import { parseInputPattern } from "@agentxm/client-core/unstable/sources";
8
+ const decodeRegistrySourceRef = Schema.decodeUnknownEffect(RegistrySourceRefSchema);
9
+ export const rootUninstallableTypeSegments = installableExtensionTypePluralSegments;
10
+ const rootUninstallFqnGrammar = "@<handle>/<plural-type>/<name>[@<version>]";
11
+ const supportedRootUninstallTypes = rootUninstallableTypeSegments.join(", ");
12
+ const genericPerTypeUninstallGuidance = "Use the matching per-type uninstall command instead: `axm skills uninstall <name>`, `axm commands uninstall <name>`, `axm subagents uninstall <name>`, `axm packs uninstall <name>`, or `axm mcp-servers uninstall <name>`.";
13
+ const rootUninstallRegistryOnlyHowToFix = (source) => {
14
+ const parsed = parseInputPattern(source);
15
+ if (Option.isNone(parsed)) {
16
+ return `Use \`axm uninstall ${rootUninstallFqnGrammar}\`. ${genericPerTypeUninstallGuidance}`;
17
+ }
18
+ switch (parsed.value.pattern.pattern) {
19
+ case "name-input":
20
+ case "glob-input":
21
+ return `Root uninstall only accepts registry FQNs. Use the matching per-type command instead: \`axm skills uninstall ${source}\`, \`axm commands uninstall ${source}\`, \`axm subagents uninstall ${source}\`, \`axm packs uninstall ${source}\`, or \`axm mcp-servers uninstall ${source}\`.`;
22
+ case "file-path-pattern":
23
+ case "url-input":
24
+ case "git-scp-address":
25
+ case "shorthand-input":
26
+ case "slash-pattern":
27
+ case "registry-pattern-input":
28
+ return `Use \`axm uninstall ${rootUninstallFqnGrammar}\`. ${genericPerTypeUninstallGuidance}`;
29
+ }
30
+ };
31
+ export const resolveRootUninstallIntent = (input) => Effect.gen(function* () {
32
+ const source = input.trim();
33
+ const segments = source.split("/");
34
+ const pluralType = segments.length === 3 ? segments[1] : undefined;
35
+ if (!source.startsWith("@")) {
36
+ return yield* makeAppError({
37
+ code: "UNINSTALL_SOURCE_NOT_FQN",
38
+ what: "Root uninstall only accepts registry FQNs",
39
+ details: [`Provided: ${source}`],
40
+ howToFix: rootUninstallRegistryOnlyHowToFix(source),
41
+ });
42
+ }
43
+ const parsed = yield* decodeRegistrySourceRef(source).pipe(Effect.mapError((error) => {
44
+ if (pluralType !== undefined && !isInstallableExtensionTypePlural(pluralType)) {
45
+ return makeAppError({
46
+ code: "UNINSTALL_SOURCE_UNKNOWN_TYPE",
47
+ what: "Uninstall source uses an unsupported plural type",
48
+ details: [`Provided: ${source}`, `Supported types: ${supportedRootUninstallTypes}`],
49
+ howToFix: `Use ${rootUninstallFqnGrammar}. Supported plural types: ${supportedRootUninstallTypes}.`,
50
+ cause: error,
51
+ });
52
+ }
53
+ return makeAppError({
54
+ code: "UNINSTALL_SOURCE_INVALID_FQN",
55
+ what: "Uninstall source must be a registry FQN",
56
+ details: [SchemaIssue.makeFormatterDefault()(error.issue)],
57
+ howToFix: `Use ${rootUninstallFqnGrammar} with one of: ${supportedRootUninstallTypes}.`,
58
+ cause: error,
59
+ });
60
+ }));
61
+ if (!isInstallableExtensionTypePlural(parsed.type)) {
62
+ return yield* makeAppError({
63
+ code: "UNINSTALL_SOURCE_UNSUPPORTED_TYPE",
64
+ what: "Root uninstall does not support that extension type",
65
+ details: [`Provided: ${source}`, `Supported types: ${supportedRootUninstallTypes}`],
66
+ howToFix: `Use ${rootUninstallFqnGrammar}. Supported plural types: ${supportedRootUninstallTypes}.`,
67
+ });
68
+ }
69
+ return {
70
+ source,
71
+ type: toInstallableExtensionType(parsed.type),
72
+ name: parsed.name,
73
+ };
74
+ });
75
+ //# sourceMappingURL=resolve-root-uninstall-intent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-root-uninstall-intent.js","sourceRoot":"","sources":["../../../../src/root/uninstall/resolve-root-uninstall-intent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,WAAW,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EACL,sCAAsC,EACtC,gCAAgC,EAChC,uBAAuB,EACvB,0BAA0B,GAE3B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAE1E,MAAM,uBAAuB,GAAG,MAAM,CAAC,mBAA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CAAmC;YACzC,IAAI,EAAE,qDAAqD;YAC3D,OAAO,EAAE,CAAC,aAAa,MAAM,EAAE,EAAE,oBAAoB,2BAA2B,EAAE,CAAC;YACnF,QAAQ,EAAE,OAAO,uBAAuB,6BAA6B,2BAA2B,GAAG;SACpG,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,MAAM;QACN,IAAI,EAAE,0BAA0B,CAAC,MAAM,CAAC,IAAI,CAAC;QAC7C,IAAI,EAAE,MAAM,CAAC,IAAI;KACY,CAAC;AAClC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from "effect/unstable/cli";
2
+ export declare const updateCommand: Command.Command<"update", Record<string, unknown>, {}, never, "effect/unstable/cli/GlobalFlag/axm-non-interactive" | "effect/unstable/cli/GlobalFlag/axm-json" | "effect/unstable/cli/GlobalFlag/axm-quiet" | "effect/unstable/cli/GlobalFlag/axm-verbose" | "effect/unstable/cli/GlobalFlag/axm-debug">;
3
+ //# sourceMappingURL=command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/root/update/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,OAAO,EAAQ,MAAM,qBAAqB,CAAC;AAwB9D,eAAO,MAAM,aAAa,0SA4BzB,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { Argument, Command, Flag } from "effect/unstable/cli";
2
+ import { forceFlag, previewFlag, yesFlag } from "@agentxm/client-core/unstable/cli-flags";
3
+ import { withArgvTracking } from "@agentxm/client-core/unstable/cli-runtime";
4
+ import { scopeFlag } from "../../cli-flags.js";
5
+ import { withRuntime, withWorkspace } from "../../runtime.js";
6
+ import { handleUpdate } from "./handler.js";
7
+ const updateConfig = {
8
+ source: Argument.string("source").pipe(Argument.withDescription("Registry FQN (@owner/<plural-type>/<name>[@version])"), Argument.optional),
9
+ scope: scopeFlag.pipe(Flag.withDescription("Update in project (default) or user-level configuration")),
10
+ yes: yesFlag.pipe(Flag.withDescription("Skip confirmation after reviewing the update plan")),
11
+ force: forceFlag.pipe(Flag.withDescription("Update even if already at the latest version")),
12
+ preview: previewFlag.pipe(Flag.withDescription("Show what would be updated without making changes")),
13
+ };
14
+ export const updateCommand = Command.make("update", updateConfig, ({ source, scope, yes, force, preview }) => handleUpdate({ source, yes, force, preview }).pipe(withWorkspace(scope), withRuntime("update"))).pipe(withArgvTracking(updateConfig), Command.withDescription("Update configured extensions, or update a registry FQN (@owner/<plural-type>/<name>[@version])"), Command.withExamples([
15
+ {
16
+ command: "axm update",
17
+ description: "Update all configured extensions in the current workspace",
18
+ },
19
+ {
20
+ command: "axm update @acme/skills/code-review",
21
+ description: "Update a skill by fully qualified registry name",
22
+ },
23
+ {
24
+ command: "axm update @acme/commands/release-notes@^1.2.0",
25
+ description: "Update a command with a version constraint",
26
+ },
27
+ {
28
+ command: "axm update --preview",
29
+ description: "Preview updates without applying them",
30
+ },
31
+ ]));
32
+ //# sourceMappingURL=command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command.js","sourceRoot":"","sources":["../../../../src/root/update/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE9D,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AAC1F,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAE7E,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,YAAY,GAAG;IACnB,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CACpC,QAAQ,CAAC,eAAe,CAAC,sDAAsD,CAAC,EAChF,QAAQ,CAAC,QAAQ,CAClB;IACD,KAAK,EAAE,SAAS,CAAC,IAAI,CACnB,IAAI,CAAC,eAAe,CAAC,yDAAyD,CAAC,CAChF;IACD,GAAG,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,mDAAmD,CAAC,CAAC;IAC5F,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,8CAA8C,CAAC,CAAC;IAC3F,OAAO,EAAE,WAAW,CAAC,IAAI,CACvB,IAAI,CAAC,eAAe,CAAC,mDAAmD,CAAC,CAC1E;CACO,CAAC;AAEX,MAAM,CAAC,MAAM,aAAa,GAAG,OAAO,CAAC,IAAI,CACvC,QAAQ,EACR,YAAY,EACZ,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,CACzC,YAAY,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC,CAClG,CAAC,IAAI,CACJ,gBAAgB,CAAC,YAAY,CAAC,EAC9B,OAAO,CAAC,eAAe,CACrB,gGAAgG,CACjG,EACD,OAAO,CAAC,YAAY,CAAC;IACnB;QACE,OAAO,EAAE,YAAY;QACrB,WAAW,EAAE,2DAA2D;KACzE;IACD;QACE,OAAO,EAAE,qCAAqC;QAC9C,WAAW,EAAE,iDAAiD;KAC/D;IACD;QACE,OAAO,EAAE,gDAAgD;QACzD,WAAW,EAAE,4CAA4C;KAC1D;IACD;QACE,OAAO,EAAE,sBAAsB;QAC/B,WAAW,EAAE,uCAAuC;KACrD;CACF,CAAC,CACH,CAAC"}
@@ -0,0 +1,17 @@
1
+ import * as Effect from "effect/Effect";
2
+ import * as Option from "effect/Option";
3
+ import { InstallCommandCommandWorkflowActions } from "../commands/install/command-actions.js";
4
+ import { InstallMcpServerCommandWorkflowActions } from "../mcp-servers/install/command-actions.js";
5
+ import { InstallPackCommandWorkflowActions } from "../packs/install/command-actions.js";
6
+ import { InstallSkillCommandWorkflowActions } from "../skills/install/command-actions.js";
7
+ import { InstallSubagentCommandWorkflowActions } from "../subagents/install/command-actions.js";
8
+ export interface RootUpdateFlags {
9
+ readonly yes: boolean;
10
+ readonly force: boolean;
11
+ readonly preview: boolean;
12
+ }
13
+ export interface RootUpdateHandlerArgs extends RootUpdateFlags {
14
+ readonly source: Option.Option<string>;
15
+ }
16
+ export declare const handleUpdate: (args: RootUpdateHandlerArgs) => Effect.Effect<void, import("packages/core/src/unstable/app-error/app-error.ts").AppError | import("packages/core/src/unstable/cli-prompt/prompt-cancelled.ts").PromptCancelled, import("packages/core/src/unstable/cli-renderer/cli-renderer.ts").CliRenderer | import("packages/core/src/unstable/cli-flags/verbosity.ts").Verbosity | import("effect/FileSystem").FileSystem | import("effect/Path").Path | "effect/unstable/cli/GlobalFlag/axm-non-interactive" | import("packages/core/src/unstable/workspace/service-interface.ts").Workspace | InstallCommandCommandWorkflowActions | InstallMcpServerCommandWorkflowActions | InstallPackCommandWorkflowActions | InstallSkillCommandWorkflowActions | InstallSubagentCommandWorkflowActions> | Effect.Effect<void, import("packages/core/src/unstable/app-error/app-error.ts").AppError | import("packages/core/src/unstable/cli-prompt/prompt-cancelled.ts").PromptCancelled, import("packages/core/src/unstable/cli-renderer/cli-renderer.ts").CliRenderer | import("packages/core/src/unstable/cli-flags/verbosity.ts").Verbosity | "effect/unstable/cli/GlobalFlag/axm-non-interactive" | (import("effect/Scope").Scope | import("effect/FileSystem").FileSystem | import("effect/Path").Path | import("packages/core/src/unstable/workspace/service-interface.ts").Workspace | import("packages/core/src/unstable/source-resolution/service.ts").SourceHostProviders | InstallCommandCommandWorkflowActions | InstallMcpServerCommandWorkflowActions | InstallPackCommandWorkflowActions | InstallSkillCommandWorkflowActions | InstallSubagentCommandWorkflowActions)>;
17
+ //# sourceMappingURL=handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../src/root/update/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAQxC,OAAO,EACL,oCAAoC,EAErC,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,sCAAsC,EAEvC,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,iCAAiC,EAElC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,qCAAqC,EAAE,MAAM,yCAAyC,CAAC;AAIhG,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,qBAAsB,SAAQ,eAAe;IAC5D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;CACxC;AA2CD,eAAO,MAAM,YAAY,GAAI,MAAM,qBAAqB,yiDAwBpD,CAAC"}
@@ -0,0 +1,62 @@
1
+ import * as Effect from "effect/Effect";
2
+ import * as Option from "effect/Option";
3
+ import { setCommandSemanticProperties, summarizeCommandOutcome, } from "@agentxm/client-core/unstable/cli-runtime";
4
+ import { runInstallCommandWorkflow } from "@agentxm/client-core/unstable/workflows";
5
+ import { emitPlanResolutionResult, planResolutionToSummary } from "../../json-output.js";
6
+ import { InstallCommandCommandWorkflowActions, } from "../commands/install/command-actions.js";
7
+ import { InstallMcpServerCommandWorkflowActions, } from "../mcp-servers/install/command-actions.js";
8
+ import { InstallPackCommandWorkflowActions, } from "../packs/install/command-actions.js";
9
+ import { InstallSkillCommandWorkflowActions } from "../skills/install/command-actions.js";
10
+ import { InstallSubagentCommandWorkflowActions } from "../subagents/install/command-actions.js";
11
+ import { resolveRootUpdateIntent } from "./resolve-root-update-intent.js";
12
+ import { handleWorkspaceUpdate } from "./workspace-update-handler.js";
13
+ const runUpdateIntent = (intent, args) => Effect.gen(function* () {
14
+ switch (intent.type) {
15
+ case "skill": {
16
+ const actions = yield* InstallSkillCommandWorkflowActions;
17
+ return yield* runInstallCommandWorkflow({ source: intent.source, skills: [], all: false }, actions, args);
18
+ }
19
+ case "command": {
20
+ const actions = yield* InstallCommandCommandWorkflowActions;
21
+ const commandArgs = { ...args, source: intent.source };
22
+ return yield* runInstallCommandWorkflow(commandArgs, actions, {
23
+ yes: commandArgs.yes,
24
+ force: commandArgs.force,
25
+ preview: commandArgs.preview,
26
+ });
27
+ }
28
+ case "mcp-server": {
29
+ const actions = yield* InstallMcpServerCommandWorkflowActions;
30
+ const mcpArgs = { source: intent.source };
31
+ return yield* runInstallCommandWorkflow(mcpArgs, actions, args);
32
+ }
33
+ case "subagent": {
34
+ const actions = yield* InstallSubagentCommandWorkflowActions;
35
+ return yield* runInstallCommandWorkflow({ source: intent.source, subagents: [], all: false }, actions, args);
36
+ }
37
+ case "pack": {
38
+ const actions = yield* InstallPackCommandWorkflowActions;
39
+ const packArgs = { source: intent.source };
40
+ return yield* runInstallCommandWorkflow(packArgs, actions, args);
41
+ }
42
+ }
43
+ });
44
+ export const handleUpdate = (args) => Option.match(args.source, {
45
+ onNone: () => handleWorkspaceUpdate({
46
+ command: "update",
47
+ type: Option.none(),
48
+ planName: "Update configured extensions",
49
+ planDescription: Option.some("Update configured workspace extensions"),
50
+ flags: args,
51
+ }),
52
+ onSome: (source) => Effect.gen(function* () {
53
+ const intent = yield* resolveRootUpdateIntent(source);
54
+ const resolution = yield* runUpdateIntent(intent, args);
55
+ yield* setCommandSemanticProperties(summarizeCommandOutcome(planResolutionToSummary(resolution, {
56
+ subjectType: intent.type,
57
+ sourceKind: "registry",
58
+ })));
59
+ yield* emitPlanResolutionResult("update", resolution);
60
+ }),
61
+ });
62
+ //# sourceMappingURL=handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/root/update/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EACL,4BAA4B,EAC5B,uBAAuB,GACxB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAEpF,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACzF,OAAO,EACL,oCAAoC,GAErC,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,sCAAsC,GAEvC,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,iCAAiC,GAElC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,qCAAqC,EAAE,MAAM,yCAAyC,CAAC;AAChG,OAAO,EAAE,uBAAuB,EAAyB,MAAM,iCAAiC,CAAC;AACjG,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAYtE,MAAM,eAAe,GAAG,CAAC,MAAwB,EAAE,IAAqB,EAAE,EAAE,CAC1E,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClB,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;QACpB,KAAK,OAAO,CAAC,CAAC,CAAC;YACb,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,kCAAkC,CAAC;YAC1D,OAAO,KAAK,CAAC,CAAC,yBAAyB,CACrC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,EACjD,OAAO,EACP,IAAI,CACL,CAAC;QACJ,CAAC;QACD,KAAK,SAAS,CAAC,CAAC,CAAC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G,CAAC,IAA2B,EAAE,EAAE,CAC1D,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE;IACxB,MAAM,EAAE,GAAG,EAAE,CACX,qBAAqB,CAAC;QACpB,OAAO,EAAE,QAAQ;QACjB,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE;QACnB,QAAQ,EAAE,8BAA8B;QACxC,eAAe,EAAE,MAAM,CAAC,IAAI,CAAC,wCAAwC,CAAC;QACtE,KAAK,EAAE,IAAI;KACZ,CAAC;IACJ,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CACjB,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QAClB,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,uBAAuB,CAAC,MAAM,CAAC,CAAC;QACtD,MAAM,UAAU,GAAG,KAAK,CAAC,CAAC,eAAe,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QACxD,KAAK,CAAC,CAAC,4BAA4B,CACjC,uBAAuB,CACrB,uBAAuB,CAAC,UAAU,EAAE;YAClC,WAAW,EAAE,MAAM,CAAC,IAAI;YACxB,UAAU,EAAE,UAAU;SACvB,CAAC,CACH,CACF,CAAC;QACF,KAAK,CAAC,CAAC,wBAAwB,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IACxD,CAAC,CAAC;CACL,CAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ import * as Effect from "effect/Effect";
2
+ import * as Schema from "effect/Schema";
3
+ import { type InstallableExtensionType } from "@agentxm/client-core/unstable/extensions";
4
+ export declare const rootUpdatableTypeSegments: readonly ["skills", "commands", "mcp-servers", "subagents", "packs"];
5
+ export declare const RootUpdatableTypeSegmentSchema: Schema.Literals<readonly ["skills", "commands", "mcp-servers", "subagents", "packs"]>;
6
+ export type RootUpdatableTypeSegment = typeof RootUpdatableTypeSegmentSchema.Type;
7
+ export type RootUpdatableType = InstallableExtensionType;
8
+ export interface RootUpdateIntent {
9
+ readonly source: string;
10
+ readonly type: RootUpdatableType;
11
+ }
12
+ export declare const resolveRootUpdateIntent: (input: string) => Effect.Effect<{
13
+ source: string;
14
+ type: "command" | "skill" | "subagent" | "pack" | "mcp-server";
15
+ }, import("@agentxm/client-core/unstable/app-error").AppError, never>;
16
+ //# sourceMappingURL=resolve-root-update-intent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-root-update-intent.d.ts","sourceRoot":"","sources":["../../../../src/root/update/resolve-root-update-intent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,OAAO,EAML,KAAK,wBAAwB,EAC9B,MAAM,0CAA0C,CAAC;AAKlD,eAAO,MAAM,yBAAyB,sEAAyC,CAAC;AAChF,eAAO,MAAM,8BAA8B,uFAAuC,CAAC;AACnF,MAAM,MAAM,wBAAwB,GAAG,OAAO,8BAA8B,CAAC,IAAI,CAAC;AAClF,MAAM,MAAM,iBAAiB,GAAG,wBAAwB,CAAC;AAEzD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;CAClC;AA4BD,eAAO,MAAM,uBAAuB,GAAI,OAAO,MAAM;;;qEAkDjD,CAAC"}
@@ -0,0 +1,75 @@
1
+ import * as Effect from "effect/Effect";
2
+ import * as Option from "effect/Option";
3
+ import * as Schema from "effect/Schema";
4
+ import * as SchemaIssue from "effect/SchemaIssue";
5
+ import { makeAppError } from "@agentxm/client-core/unstable/app-error";
6
+ import { installableExtensionTypePluralSegments, InstallableExtensionTypePluralSchema, isInstallableExtensionTypePlural, RegistrySourceRefSchema, toInstallableExtensionType, } from "@agentxm/client-core/unstable/extensions";
7
+ import { parseInputPattern } from "@agentxm/client-core/unstable/sources";
8
+ const decodeRegistrySourceRef = Schema.decodeUnknownEffect(RegistrySourceRefSchema);
9
+ export const rootUpdatableTypeSegments = installableExtensionTypePluralSegments;
10
+ export const RootUpdatableTypeSegmentSchema = InstallableExtensionTypePluralSchema;
11
+ const rootUpdateFqnGrammar = "@<handle>/<plural-type>/<name>[@<version>]";
12
+ const supportedRootUpdateTypes = rootUpdatableTypeSegments.join(", ");
13
+ const rootUpdateRegistryOnlyHowToFix = (source) => {
14
+ const parsed = parseInputPattern(source);
15
+ if (Option.isNone(parsed)) {
16
+ return "Use `axm update @<handle>/<plural-type>/<name>[@<version>]`. For path, URL, or git sources, use `axm skills update <source>` or `axm subagents update <source>` instead.";
17
+ }
18
+ switch (parsed.value.pattern.pattern) {
19
+ case "file-path-pattern":
20
+ case "url-input":
21
+ case "git-scp-address":
22
+ case "shorthand-input":
23
+ case "slash-pattern":
24
+ return `Root update only accepts registry FQNs. Use \`axm skills update ${source}\` or \`axm subagents update ${source}\` instead.`;
25
+ case "name-input":
26
+ case "glob-input":
27
+ return `Root update only accepts registry FQNs. Use the matching per-type command instead: \`axm skills update ${source}\`, \`axm commands update ${source}\`, \`axm subagents update ${source}\`.`;
28
+ case "registry-pattern-input":
29
+ return "Use `axm update @<handle>/<plural-type>/<name>[@<version>]`.";
30
+ }
31
+ };
32
+ export const resolveRootUpdateIntent = (input) => Effect.gen(function* () {
33
+ const source = input.trim();
34
+ const segments = source.split("/");
35
+ const pluralType = segments.length === 3 ? segments[1] : undefined;
36
+ if (!source.startsWith("@")) {
37
+ return yield* makeAppError({
38
+ code: "UPDATE_SOURCE_NOT_FQN",
39
+ what: "Root update only accepts registry FQNs",
40
+ details: [`Provided: ${source}`],
41
+ howToFix: rootUpdateRegistryOnlyHowToFix(source),
42
+ });
43
+ }
44
+ const parsed = yield* decodeRegistrySourceRef(source).pipe(Effect.mapError((error) => {
45
+ if (pluralType !== undefined && !isInstallableExtensionTypePlural(pluralType)) {
46
+ return makeAppError({
47
+ code: "UPDATE_SOURCE_UNKNOWN_TYPE",
48
+ what: "Update source uses an unsupported plural type",
49
+ details: [`Provided: ${source}`, `Supported types: ${supportedRootUpdateTypes}`],
50
+ howToFix: `Use ${rootUpdateFqnGrammar}. Supported plural types: ${supportedRootUpdateTypes}.`,
51
+ cause: error,
52
+ });
53
+ }
54
+ return makeAppError({
55
+ code: "UPDATE_SOURCE_INVALID_FQN",
56
+ what: "Update source must be a registry FQN",
57
+ details: [SchemaIssue.makeFormatterDefault()(error.issue)],
58
+ howToFix: `Use ${rootUpdateFqnGrammar} with one of: ${supportedRootUpdateTypes}.`,
59
+ cause: error,
60
+ });
61
+ }));
62
+ if (!isInstallableExtensionTypePlural(parsed.type)) {
63
+ return yield* makeAppError({
64
+ code: "UPDATE_SOURCE_UNSUPPORTED_TYPE",
65
+ what: "Root update does not support that extension type",
66
+ details: [`Provided: ${source}`, `Supported types: ${supportedRootUpdateTypes}`],
67
+ howToFix: `Use ${rootUpdateFqnGrammar}. Supported plural types: ${supportedRootUpdateTypes}.`,
68
+ });
69
+ }
70
+ return {
71
+ source,
72
+ type: toInstallableExtensionType(parsed.type),
73
+ };
74
+ });
75
+ //# sourceMappingURL=resolve-root-update-intent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-root-update-intent.js","sourceRoot":"","sources":["../../../../src/root/update/resolve-root-update-intent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,WAAW,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EACL,sCAAsC,EACtC,oCAAoC,EACpC,gCAAgC,EAChC,uBAAuB,EACvB,0BAA0B,GAE3B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAE1E,MAAM,uBAAuB,GAAG,MAAM,CAAC,mBAAmB,CAAC,uBAAuB,CAAC,CAAC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AC,aAAa,MAAM,EAAE,EAAE,oBAAoB,wBAAwB,EAAE,CAAC;YAChF,QAAQ,EAAE,OAAO,oBAAoB,6BAA6B,wBAAwB,GAAG;SAC9F,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,MAAM;QACN,IAAI,EAAE,0BAA0B,CAAC,MAAM,CAAC,IAAI,CAAC;KACnB,CAAC;AAC/B,CAAC,CAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ import * as Effect from "effect/Effect";
2
+ import * as Option from "effect/Option";
3
+ import { type WorkspaceUpdatableType } from "./workspace-update.js";
4
+ export interface WorkspaceUpdateFlags {
5
+ readonly yes: boolean;
6
+ readonly force: boolean;
7
+ readonly preview: boolean;
8
+ }
9
+ export declare const handleWorkspaceUpdate: (args: {
10
+ readonly command: string;
11
+ readonly type: Option.Option<WorkspaceUpdatableType>;
12
+ readonly planName: string;
13
+ readonly planDescription: Option.Option<string>;
14
+ readonly flags: WorkspaceUpdateFlags;
15
+ }) => Effect.Effect<void, import("packages/core/src/unstable/app-error/app-error.ts").AppError | import("packages/core/src/unstable/cli-prompt/prompt-cancelled.ts").PromptCancelled, import("packages/core/src/unstable/cli-renderer/cli-renderer.ts").CliRenderer | import("packages/core/src/unstable/cli-flags/verbosity.ts").Verbosity | "effect/unstable/cli/GlobalFlag/axm-non-interactive" | (import("effect/Scope").Scope | import("effect/FileSystem").FileSystem | import("effect/Path").Path | import("@agentxm/client-core/unstable/workspace").Workspace | import("packages/core/src/unstable/source-resolution/service.ts").SourceHostProviders | import("../commands/install/command-actions.ts").InstallCommandCommandWorkflowActions | import("../mcp-servers/install/command-actions.ts").InstallMcpServerCommandWorkflowActions | import("../packs/install/command-actions.ts").InstallPackCommandWorkflowActions | import("../skills/install/command-actions.ts").InstallSkillCommandWorkflowActions | import("../subagents/install/command-actions.ts").InstallSubagentCommandWorkflowActions)>;
16
+ //# sourceMappingURL=workspace-update-handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace-update-handler.d.ts","sourceRoot":"","sources":["../../../../src/root/update/workspace-update-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAcxC,OAAO,EAA4B,KAAK,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAQ9F,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED,eAAO,MAAM,qBAAqB,GAAI,MAAM;IAC1C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC;IACrD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAChD,QAAQ,CAAC,KAAK,EAAE,oBAAoB,CAAC;CACtC,ojCAqCG,CAAC"}
@@ -0,0 +1,40 @@
1
+ import * as Effect from "effect/Effect";
2
+ import * as Option from "effect/Option";
3
+ import { setCommandSemanticProperties, summarizeCommandOutcome, } from "@agentxm/client-core/unstable/cli-runtime";
4
+ import { previewOrApplyPlan } from "@agentxm/client-core/unstable/workspace";
5
+ import { emitNoOpResult, emitPlanResolutionResult, planResolutionToSummary, } from "../../json-output.js";
6
+ import { buildWorkspaceUpdatePlan } from "./workspace-update.js";
7
+ const workspaceUpdateSubjectType = (type) => Option.match(type, {
8
+ onNone: () => "mixed",
9
+ onSome: (value) => value,
10
+ });
11
+ export const handleWorkspaceUpdate = (args) => Effect.gen(function* () {
12
+ const planResult = yield* buildWorkspaceUpdatePlan({
13
+ type: args.type,
14
+ planName: args.planName,
15
+ planDescription: args.planDescription,
16
+ });
17
+ if (planResult._tag === "NoConfiguredExtensions") {
18
+ yield* setCommandSemanticProperties(summarizeCommandOutcome({
19
+ outcome: "no-op",
20
+ subjectType: workspaceUpdateSubjectType(args.type),
21
+ sourceKind: "workspace",
22
+ }));
23
+ yield* emitNoOpResult(args.command, {
24
+ planName: args.planName,
25
+ message: planResult.message,
26
+ ...Option.match(args.planDescription, {
27
+ onNone: () => ({}),
28
+ onSome: (planDescription) => ({ planDescription }),
29
+ }),
30
+ });
31
+ return;
32
+ }
33
+ const resolution = yield* previewOrApplyPlan(planResult.plan, args.flags);
34
+ yield* setCommandSemanticProperties(summarizeCommandOutcome(planResolutionToSummary(resolution, {
35
+ subjectType: workspaceUpdateSubjectType(args.type),
36
+ sourceKind: "workspace",
37
+ })));
38
+ yield* emitPlanResolutionResult(args.command, resolution);
39
+ });
40
+ //# sourceMappingURL=workspace-update-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace-update-handler.js","sourceRoot":"","sources":["../../../../src/root/update/workspace-update-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EACL,4BAA4B,EAC5B,uBAAuB,GAExB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,OAAO,EACL,cAAc,EACd,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,wBAAwB,EAA+B,MAAM,uBAAuB,CAAC;AAE9F,MAAM,0BAA0B,GAAG,CAAC,IAA2C,EAAe,EAAE,CAC9F,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE;IACjB,MAAM,EAAE,GAAG,EAAE,CAAC,OAAgB;IAC9B,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK;CACzB,CAAC,CAAC;AAQL,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAA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AAC,CAAC;AAC5D,CAAC,CAAC,CAAC"}
@@ -0,0 +1,38 @@
1
+ import * as Effect from "effect/Effect";
2
+ import * as Option from "effect/Option";
3
+ import type * as FileSystem from "effect/FileSystem";
4
+ import type * as Path from "effect/Path";
5
+ import type * as Scope from "effect/Scope";
6
+ import type { AppError } from "@agentxm/client-core/unstable/app-error";
7
+ import { type Plan, Workspace } from "@agentxm/client-core/unstable/workspace";
8
+ import { SourceHostProviders } from "@agentxm/client-core/unstable/source-resolution";
9
+ import { type InstallableExtensionType } from "@agentxm/client-core/unstable/extensions";
10
+ import { InstallCommandCommandWorkflowActions } from "../commands/install/command-actions.js";
11
+ import { InstallMcpServerCommandWorkflowActions } from "../mcp-servers/install/command-actions.js";
12
+ import { InstallPackCommandWorkflowActions } from "../packs/install/command-actions.js";
13
+ import { InstallSkillCommandWorkflowActions } from "../skills/install/command-actions.js";
14
+ import { InstallSubagentCommandWorkflowActions } from "../subagents/install/command-actions.js";
15
+ export type WorkspaceUpdatableType = InstallableExtensionType;
16
+ type WorkspaceUpdateCollectorContext = Scope.Scope | FileSystem.FileSystem | Path.Path | Workspace | SourceHostProviders | InstallSkillCommandWorkflowActions | InstallCommandCommandWorkflowActions | InstallSubagentCommandWorkflowActions | InstallMcpServerCommandWorkflowActions | InstallPackCommandWorkflowActions;
17
+ export type WorkspaceUpdatePlanResult = {
18
+ readonly _tag: "NoConfiguredExtensions";
19
+ readonly message: string;
20
+ } | {
21
+ readonly _tag: "WorkspaceUpdatePlan";
22
+ readonly plan: Plan;
23
+ };
24
+ export declare const buildWorkspaceUpdatePlan: (args: {
25
+ readonly type: Option.Option<WorkspaceUpdatableType>;
26
+ readonly planName: string;
27
+ readonly planDescription: Option.Option<string>;
28
+ }) => Effect.Effect<{
29
+ _tag: "NoConfiguredExtensions";
30
+ message: string;
31
+ plan?: never;
32
+ } | {
33
+ _tag: "WorkspaceUpdatePlan";
34
+ plan: Plan;
35
+ message?: never;
36
+ }, AppError, WorkspaceUpdateCollectorContext>;
37
+ export {};
38
+ //# sourceMappingURL=workspace-update.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace-update.d.ts","sourceRoot":"","sources":["../../../../src/root/update/workspace-update.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,UAAU,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,KAAK,IAAI,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAE3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AACxE,OAAO,EACL,KAAK,IAAI,EAGT,SAAS,EAMV,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AACtF,OAAO,EAEL,KAAK,wBAAwB,EAE9B,MAAM,0CAA0C,CAAC;AAElD,OAAO,EAAE,oCAAoC,EAAE,MAAM,wCAAwC,CAAC;AAE9F,OAAO,EAAE,sCAAsC,EAAE,MAAM,2CAA2C,CAAC;AAEnG,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AAExF,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AAE1F,OAAO,EAAE,qCAAqC,EAAE,MAAM,yCAAyC,CAAC;AAGhG,MAAM,MAAM,sBAAsB,GAAG,wBAAwB,CAAC;AAe9D,KAAK,+BAA+B,GAChC,KAAK,CAAC,KAAK,GACX,UAAU,CAAC,UAAU,GACrB,IAAI,CAAC,IAAI,GACT,SAAS,GACT,mBAAmB,GACnB,kCAAkC,GAClC,oCAAoC,GACpC,qCAAqC,GACrC,sCAAsC,GACtC,iCAAiC,CAAC;AAWtC,MAAM,MAAM,yBAAyB,GACjC;IACE,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC;IACxC,QAAQ,CAAC,O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