@dexto/agent-management 1.5.6 → 1.5.8

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 (140) hide show
  1. package/dist/config/config-enrichment.cjs +72 -21
  2. package/dist/config/config-enrichment.d.ts +10 -2
  3. package/dist/config/config-enrichment.d.ts.map +1 -1
  4. package/dist/config/config-enrichment.js +76 -21
  5. package/dist/config/discover-prompts.cjs +1 -1
  6. package/dist/config/discover-prompts.d.ts +11 -11
  7. package/dist/config/discover-prompts.d.ts.map +1 -1
  8. package/dist/config/discover-prompts.js +1 -1
  9. package/dist/config/loader.cjs +31 -13
  10. package/dist/config/loader.d.ts.map +1 -1
  11. package/dist/config/loader.js +31 -13
  12. package/dist/index.cjs +76 -0
  13. package/dist/index.d.ts +5 -1
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +78 -0
  16. package/dist/models/custom-models.cjs +2 -1
  17. package/dist/models/custom-models.d.ts +7 -6
  18. package/dist/models/custom-models.d.ts.map +1 -1
  19. package/dist/models/custom-models.js +2 -1
  20. package/dist/plugins/discover-plugins.cjs +176 -0
  21. package/dist/plugins/discover-plugins.d.ts +39 -0
  22. package/dist/plugins/discover-plugins.d.ts.map +1 -0
  23. package/dist/plugins/discover-plugins.js +140 -0
  24. package/dist/plugins/discover-skills.cjs +93 -0
  25. package/dist/plugins/discover-skills.d.ts +49 -0
  26. package/dist/plugins/discover-skills.d.ts.map +1 -0
  27. package/dist/plugins/discover-skills.js +58 -0
  28. package/dist/plugins/error-codes.cjs +47 -0
  29. package/dist/plugins/error-codes.d.ts +24 -0
  30. package/dist/plugins/error-codes.d.ts.map +1 -0
  31. package/dist/plugins/error-codes.js +23 -0
  32. package/dist/plugins/errors.cjs +197 -0
  33. package/dist/plugins/errors.d.ts +68 -0
  34. package/dist/plugins/errors.d.ts.map +1 -0
  35. package/dist/plugins/errors.js +173 -0
  36. package/dist/plugins/index.cjs +144 -0
  37. package/dist/plugins/index.d.ts +23 -0
  38. package/dist/plugins/index.d.ts.map +1 -0
  39. package/dist/plugins/index.js +115 -0
  40. package/dist/plugins/install-plugin.cjs +211 -0
  41. package/dist/plugins/install-plugin.d.ts +47 -0
  42. package/dist/plugins/install-plugin.d.ts.map +1 -0
  43. package/dist/plugins/install-plugin.js +173 -0
  44. package/dist/plugins/list-plugins.cjs +134 -0
  45. package/dist/plugins/list-plugins.d.ts +26 -0
  46. package/dist/plugins/list-plugins.d.ts.map +1 -0
  47. package/dist/plugins/list-plugins.js +99 -0
  48. package/dist/plugins/load-plugin.cjs +197 -0
  49. package/dist/plugins/load-plugin.d.ts +20 -0
  50. package/dist/plugins/load-plugin.d.ts.map +1 -0
  51. package/dist/plugins/load-plugin.js +163 -0
  52. package/dist/plugins/marketplace/error-codes.cjs +45 -0
  53. package/dist/plugins/marketplace/error-codes.d.ts +21 -0
  54. package/dist/plugins/marketplace/error-codes.d.ts.map +1 -0
  55. package/dist/plugins/marketplace/error-codes.js +21 -0
  56. package/dist/plugins/marketplace/errors.cjs +188 -0
  57. package/dist/plugins/marketplace/errors.d.ts +64 -0
  58. package/dist/plugins/marketplace/errors.d.ts.map +1 -0
  59. package/dist/plugins/marketplace/errors.js +164 -0
  60. package/dist/plugins/marketplace/index.cjs +95 -0
  61. package/dist/plugins/marketplace/index.d.ts +14 -0
  62. package/dist/plugins/marketplace/index.d.ts.map +1 -0
  63. package/dist/plugins/marketplace/index.js +74 -0
  64. package/dist/plugins/marketplace/install-from-marketplace.cjs +152 -0
  65. package/dist/plugins/marketplace/install-from-marketplace.d.ts +25 -0
  66. package/dist/plugins/marketplace/install-from-marketplace.d.ts.map +1 -0
  67. package/dist/plugins/marketplace/install-from-marketplace.js +120 -0
  68. package/dist/plugins/marketplace/operations.cjs +374 -0
  69. package/dist/plugins/marketplace/operations.d.ts +43 -0
  70. package/dist/plugins/marketplace/operations.d.ts.map +1 -0
  71. package/dist/plugins/marketplace/operations.js +339 -0
  72. package/dist/plugins/marketplace/registry.cjs +166 -0
  73. package/dist/plugins/marketplace/registry.d.ts +72 -0
  74. package/dist/plugins/marketplace/registry.d.ts.map +1 -0
  75. package/dist/plugins/marketplace/registry.js +119 -0
  76. package/dist/plugins/marketplace/schemas.cjs +79 -0
  77. package/dist/plugins/marketplace/schemas.d.ts +260 -0
  78. package/dist/plugins/marketplace/schemas.d.ts.map +1 -0
  79. package/dist/plugins/marketplace/schemas.js +49 -0
  80. package/dist/plugins/marketplace/types.cjs +16 -0
  81. package/dist/plugins/marketplace/types.d.ts +156 -0
  82. package/dist/plugins/marketplace/types.d.ts.map +1 -0
  83. package/dist/plugins/marketplace/types.js +0 -0
  84. package/dist/plugins/schemas.cjs +74 -0
  85. package/dist/plugins/schemas.d.ts +262 -0
  86. package/dist/plugins/schemas.d.ts.map +1 -0
  87. package/dist/plugins/schemas.js +46 -0
  88. package/dist/plugins/types.cjs +16 -0
  89. package/dist/plugins/types.d.ts +186 -0
  90. package/dist/plugins/types.d.ts.map +1 -0
  91. package/dist/plugins/types.js +0 -0
  92. package/dist/plugins/uninstall-plugin.cjs +133 -0
  93. package/dist/plugins/uninstall-plugin.d.ts +24 -0
  94. package/dist/plugins/uninstall-plugin.d.ts.map +1 -0
  95. package/dist/plugins/uninstall-plugin.js +99 -0
  96. package/dist/plugins/validate-plugin.cjs +180 -0
  97. package/dist/plugins/validate-plugin.d.ts +53 -0
  98. package/dist/plugins/validate-plugin.d.ts.map +1 -0
  99. package/dist/plugins/validate-plugin.js +145 -0
  100. package/dist/preferences/errors.cjs +11 -0
  101. package/dist/preferences/errors.d.ts +1 -0
  102. package/dist/preferences/errors.d.ts.map +1 -1
  103. package/dist/preferences/errors.js +11 -0
  104. package/dist/preferences/loader.cjs +119 -6
  105. package/dist/preferences/loader.d.ts +21 -1
  106. package/dist/preferences/loader.d.ts.map +1 -1
  107. package/dist/preferences/loader.js +102 -1
  108. package/dist/preferences/schemas.cjs +12 -0
  109. package/dist/preferences/schemas.d.ts +38 -12
  110. package/dist/preferences/schemas.d.ts.map +1 -1
  111. package/dist/preferences/schemas.js +10 -0
  112. package/dist/runtime/AgentRuntime.cjs +1 -2
  113. package/dist/runtime/AgentRuntime.d.ts.map +1 -1
  114. package/dist/runtime/AgentRuntime.js +1 -2
  115. package/dist/tool-provider/llm-resolution.cjs +74 -0
  116. package/dist/tool-provider/llm-resolution.d.ts +51 -0
  117. package/dist/tool-provider/llm-resolution.d.ts.map +1 -0
  118. package/dist/tool-provider/llm-resolution.js +50 -0
  119. package/dist/tool-provider/runtime-service.cjs +246 -34
  120. package/dist/tool-provider/runtime-service.d.ts +34 -2
  121. package/dist/tool-provider/runtime-service.d.ts.map +1 -1
  122. package/dist/tool-provider/runtime-service.js +236 -34
  123. package/dist/tool-provider/tool-provider.cjs +154 -1
  124. package/dist/tool-provider/tool-provider.d.ts +7 -1
  125. package/dist/tool-provider/tool-provider.d.ts.map +1 -1
  126. package/dist/tool-provider/tool-provider.js +161 -1
  127. package/dist/tool-provider/types.d.ts +2 -0
  128. package/dist/tool-provider/types.d.ts.map +1 -1
  129. package/dist/utils/api-key-resolver.cjs +5 -2
  130. package/dist/utils/api-key-resolver.d.ts.map +1 -1
  131. package/dist/utils/api-key-resolver.js +5 -2
  132. package/dist/utils/dexto-auth.cjs +83 -0
  133. package/dist/utils/dexto-auth.d.ts +23 -0
  134. package/dist/utils/dexto-auth.d.ts.map +1 -0
  135. package/dist/utils/dexto-auth.js +57 -0
  136. package/dist/utils/feature-flags.cjs +32 -0
  137. package/dist/utils/feature-flags.d.ts +21 -0
  138. package/dist/utils/feature-flags.d.ts.map +1 -0
  139. package/dist/utils/feature-flags.js +8 -0
  140. package/package.json +3 -2
@@ -0,0 +1,119 @@
1
+ import * as path from "path";
2
+ import { existsSync, readFileSync, writeFileSync, mkdirSync } from "fs";
3
+ import { homedir } from "os";
4
+ import { KnownMarketplacesFileSchema } from "./schemas.js";
5
+ import { MarketplaceError } from "./errors.js";
6
+ const DEFAULT_MARKETPLACES = [
7
+ {
8
+ name: "claude-plugins-official",
9
+ source: {
10
+ type: "github",
11
+ value: "anthropics/claude-plugins-official"
12
+ }
13
+ }
14
+ ];
15
+ function getMarketplacesRegistryPath() {
16
+ return path.join(homedir(), ".dexto", "plugins", "known_marketplaces.json");
17
+ }
18
+ function getMarketplacesDir() {
19
+ return path.join(homedir(), ".dexto", "plugins", "marketplaces");
20
+ }
21
+ function getMarketplaceCacheDir() {
22
+ return path.join(homedir(), ".dexto", "plugins", "cache");
23
+ }
24
+ function loadKnownMarketplaces() {
25
+ const filePath = getMarketplacesRegistryPath();
26
+ if (!existsSync(filePath)) {
27
+ return { version: 1, marketplaces: {} };
28
+ }
29
+ try {
30
+ const content = readFileSync(filePath, "utf-8");
31
+ const parsed = JSON.parse(content);
32
+ const result = KnownMarketplacesFileSchema.safeParse(parsed);
33
+ if (!result.success) {
34
+ return { version: 1, marketplaces: {} };
35
+ }
36
+ return result.data;
37
+ } catch {
38
+ return { version: 1, marketplaces: {} };
39
+ }
40
+ }
41
+ function saveKnownMarketplaces(data) {
42
+ const filePath = getMarketplacesRegistryPath();
43
+ const dirPath = path.dirname(filePath);
44
+ if (!existsSync(dirPath)) {
45
+ mkdirSync(dirPath, { recursive: true });
46
+ }
47
+ try {
48
+ writeFileSync(filePath, JSON.stringify(data, null, 2), "utf-8");
49
+ } catch (error) {
50
+ throw MarketplaceError.registryWriteFailed(
51
+ filePath,
52
+ error instanceof Error ? error.message : String(error)
53
+ );
54
+ }
55
+ }
56
+ function getMarketplaceEntry(name) {
57
+ const registry = loadKnownMarketplaces();
58
+ return registry.marketplaces[name] || null;
59
+ }
60
+ function marketplaceExists(name) {
61
+ return getMarketplaceEntry(name) !== null;
62
+ }
63
+ function getAllMarketplaces() {
64
+ const registry = loadKnownMarketplaces();
65
+ return Object.values(registry.marketplaces);
66
+ }
67
+ function addMarketplaceEntry(entry) {
68
+ const registry = loadKnownMarketplaces();
69
+ registry.marketplaces[entry.name] = entry;
70
+ saveKnownMarketplaces(registry);
71
+ }
72
+ function removeMarketplaceEntry(name) {
73
+ const registry = loadKnownMarketplaces();
74
+ if (!registry.marketplaces[name]) {
75
+ return false;
76
+ }
77
+ delete registry.marketplaces[name];
78
+ saveKnownMarketplaces(registry);
79
+ return true;
80
+ }
81
+ function updateMarketplaceTimestamp(name) {
82
+ const registry = loadKnownMarketplaces();
83
+ if (registry.marketplaces[name]) {
84
+ registry.marketplaces[name].lastUpdated = (/* @__PURE__ */ new Date()).toISOString();
85
+ saveKnownMarketplaces(registry);
86
+ }
87
+ }
88
+ function getUninstalledDefaults() {
89
+ const registry = loadKnownMarketplaces();
90
+ const uninstalled = [];
91
+ for (const defaultMarket of DEFAULT_MARKETPLACES) {
92
+ if (!registry.marketplaces[defaultMarket.name]) {
93
+ uninstalled.push({
94
+ ...defaultMarket,
95
+ isDefault: true
96
+ });
97
+ }
98
+ }
99
+ return uninstalled;
100
+ }
101
+ function isDefaultMarketplace(name) {
102
+ return DEFAULT_MARKETPLACES.some((m) => m.name === name);
103
+ }
104
+ export {
105
+ DEFAULT_MARKETPLACES,
106
+ addMarketplaceEntry,
107
+ getAllMarketplaces,
108
+ getMarketplaceCacheDir,
109
+ getMarketplaceEntry,
110
+ getMarketplacesDir,
111
+ getMarketplacesRegistryPath,
112
+ getUninstalledDefaults,
113
+ isDefaultMarketplace,
114
+ loadKnownMarketplaces,
115
+ marketplaceExists,
116
+ removeMarketplaceEntry,
117
+ saveKnownMarketplaces,
118
+ updateMarketplaceTimestamp
119
+ };
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var schemas_exports = {};
20
+ __export(schemas_exports, {
21
+ KnownMarketplacesFileSchema: () => KnownMarketplacesFileSchema,
22
+ MarketplaceAddCommandSchema: () => MarketplaceAddCommandSchema,
23
+ MarketplaceEntrySchema: () => MarketplaceEntrySchema,
24
+ MarketplaceInstallCommandSchema: () => MarketplaceInstallCommandSchema,
25
+ MarketplaceManifestSchema: () => MarketplaceManifestSchema,
26
+ MarketplacePluginEntrySchema: () => MarketplacePluginEntrySchema,
27
+ MarketplaceSourceSchema: () => MarketplaceSourceSchema
28
+ });
29
+ module.exports = __toCommonJS(schemas_exports);
30
+ var import_zod = require("zod");
31
+ const MarketplaceSourceSchema = import_zod.z.object({
32
+ type: import_zod.z.enum(["github", "git", "local"]).describe("Type of marketplace source"),
33
+ value: import_zod.z.string().min(1).describe("Source value: owner/repo, git URL, or local path")
34
+ }).strict();
35
+ const MarketplaceEntrySchema = import_zod.z.object({
36
+ name: import_zod.z.string().min(1).describe("Unique name of the marketplace"),
37
+ source: MarketplaceSourceSchema.describe("Source specification"),
38
+ installLocation: import_zod.z.string().describe("Local path where marketplace is installed"),
39
+ lastUpdated: import_zod.z.string().datetime().optional().describe("ISO timestamp of last update")
40
+ }).strict();
41
+ const KnownMarketplacesFileSchema = import_zod.z.object({
42
+ version: import_zod.z.number().default(1).describe("File format version"),
43
+ marketplaces: import_zod.z.record(MarketplaceEntrySchema).default({}).describe("Registered marketplaces by name")
44
+ }).strict();
45
+ const MarketplacePluginEntrySchema = import_zod.z.object({
46
+ name: import_zod.z.string().min(1).describe("Plugin name"),
47
+ description: import_zod.z.string().optional().describe("Plugin description"),
48
+ source: import_zod.z.string().describe("Path to plugin within marketplace"),
49
+ category: import_zod.z.string().optional().describe("Plugin category"),
50
+ version: import_zod.z.string().optional().describe("Plugin version")
51
+ }).passthrough();
52
+ const MarketplaceManifestSchema = import_zod.z.object({
53
+ name: import_zod.z.string().describe("Marketplace name"),
54
+ version: import_zod.z.string().optional().describe("Marketplace version"),
55
+ owner: import_zod.z.object({
56
+ name: import_zod.z.string(),
57
+ email: import_zod.z.string().optional()
58
+ }).optional().describe("Owner information"),
59
+ plugins: import_zod.z.array(MarketplacePluginEntrySchema).optional().describe("Listed plugins")
60
+ }).passthrough();
61
+ const MarketplaceAddCommandSchema = import_zod.z.object({
62
+ source: import_zod.z.string().min(1).describe("Marketplace source (owner/repo, git URL, or local path)"),
63
+ name: import_zod.z.string().optional().describe("Custom name for the marketplace")
64
+ }).strict();
65
+ const MarketplaceInstallCommandSchema = import_zod.z.object({
66
+ plugin: import_zod.z.string().min(1).describe("Plugin spec: name or name@marketplace"),
67
+ scope: import_zod.z.enum(["user", "project", "local"]).default("user").describe("Installation scope"),
68
+ force: import_zod.z.boolean().default(false).describe("Force reinstall if already exists")
69
+ }).strict();
70
+ // Annotate the CommonJS export names for ESM import in node:
71
+ 0 && (module.exports = {
72
+ KnownMarketplacesFileSchema,
73
+ MarketplaceAddCommandSchema,
74
+ MarketplaceEntrySchema,
75
+ MarketplaceInstallCommandSchema,
76
+ MarketplaceManifestSchema,
77
+ MarketplacePluginEntrySchema,
78
+ MarketplaceSourceSchema
79
+ });
@@ -0,0 +1,260 @@
1
+ /**
2
+ * Plugin Marketplace Zod Schemas
3
+ */
4
+ import { z } from 'zod';
5
+ /**
6
+ * Marketplace source specification
7
+ */
8
+ export declare const MarketplaceSourceSchema: z.ZodObject<{
9
+ type: z.ZodEnum<["github", "git", "local"]>;
10
+ value: z.ZodString;
11
+ }, "strict", z.ZodTypeAny, {
12
+ value: string;
13
+ type: "local" | "github" | "git";
14
+ }, {
15
+ value: string;
16
+ type: "local" | "github" | "git";
17
+ }>;
18
+ /**
19
+ * Entry in the known marketplaces registry
20
+ */
21
+ export declare const MarketplaceEntrySchema: z.ZodObject<{
22
+ name: z.ZodString;
23
+ source: z.ZodObject<{
24
+ type: z.ZodEnum<["github", "git", "local"]>;
25
+ value: z.ZodString;
26
+ }, "strict", z.ZodTypeAny, {
27
+ value: string;
28
+ type: "local" | "github" | "git";
29
+ }, {
30
+ value: string;
31
+ type: "local" | "github" | "git";
32
+ }>;
33
+ installLocation: z.ZodString;
34
+ lastUpdated: z.ZodOptional<z.ZodString>;
35
+ }, "strict", z.ZodTypeAny, {
36
+ name: string;
37
+ source: {
38
+ value: string;
39
+ type: "local" | "github" | "git";
40
+ };
41
+ installLocation: string;
42
+ lastUpdated?: string | undefined;
43
+ }, {
44
+ name: string;
45
+ source: {
46
+ value: string;
47
+ type: "local" | "github" | "git";
48
+ };
49
+ installLocation: string;
50
+ lastUpdated?: string | undefined;
51
+ }>;
52
+ /**
53
+ * Structure of known_marketplaces.json
54
+ */
55
+ export declare const KnownMarketplacesFileSchema: z.ZodObject<{
56
+ version: z.ZodDefault<z.ZodNumber>;
57
+ marketplaces: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
58
+ name: z.ZodString;
59
+ source: z.ZodObject<{
60
+ type: z.ZodEnum<["github", "git", "local"]>;
61
+ value: z.ZodString;
62
+ }, "strict", z.ZodTypeAny, {
63
+ value: string;
64
+ type: "local" | "github" | "git";
65
+ }, {
66
+ value: string;
67
+ type: "local" | "github" | "git";
68
+ }>;
69
+ installLocation: z.ZodString;
70
+ lastUpdated: z.ZodOptional<z.ZodString>;
71
+ }, "strict", z.ZodTypeAny, {
72
+ name: string;
73
+ source: {
74
+ value: string;
75
+ type: "local" | "github" | "git";
76
+ };
77
+ installLocation: string;
78
+ lastUpdated?: string | undefined;
79
+ }, {
80
+ name: string;
81
+ source: {
82
+ value: string;
83
+ type: "local" | "github" | "git";
84
+ };
85
+ installLocation: string;
86
+ lastUpdated?: string | undefined;
87
+ }>>>;
88
+ }, "strict", z.ZodTypeAny, {
89
+ version: number;
90
+ marketplaces: Record<string, {
91
+ name: string;
92
+ source: {
93
+ value: string;
94
+ type: "local" | "github" | "git";
95
+ };
96
+ installLocation: string;
97
+ lastUpdated?: string | undefined;
98
+ }>;
99
+ }, {
100
+ version?: number | undefined;
101
+ marketplaces?: Record<string, {
102
+ name: string;
103
+ source: {
104
+ value: string;
105
+ type: "local" | "github" | "git";
106
+ };
107
+ installLocation: string;
108
+ lastUpdated?: string | undefined;
109
+ }> | undefined;
110
+ }>;
111
+ /**
112
+ * Plugin entry in a marketplace manifest
113
+ */
114
+ export declare const MarketplacePluginEntrySchema: z.ZodObject<{
115
+ name: z.ZodString;
116
+ description: z.ZodOptional<z.ZodString>;
117
+ source: z.ZodString;
118
+ category: z.ZodOptional<z.ZodString>;
119
+ version: z.ZodOptional<z.ZodString>;
120
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
121
+ name: z.ZodString;
122
+ description: z.ZodOptional<z.ZodString>;
123
+ source: z.ZodString;
124
+ category: z.ZodOptional<z.ZodString>;
125
+ version: z.ZodOptional<z.ZodString>;
126
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
127
+ name: z.ZodString;
128
+ description: z.ZodOptional<z.ZodString>;
129
+ source: z.ZodString;
130
+ category: z.ZodOptional<z.ZodString>;
131
+ version: z.ZodOptional<z.ZodString>;
132
+ }, z.ZodTypeAny, "passthrough">>;
133
+ /**
134
+ * Marketplace manifest format (marketplace.json in repo root)
135
+ * Compatible with Claude Code marketplace format
136
+ */
137
+ export declare const MarketplaceManifestSchema: z.ZodObject<{
138
+ name: z.ZodString;
139
+ version: z.ZodOptional<z.ZodString>;
140
+ owner: z.ZodOptional<z.ZodObject<{
141
+ name: z.ZodString;
142
+ email: z.ZodOptional<z.ZodString>;
143
+ }, "strip", z.ZodTypeAny, {
144
+ name: string;
145
+ email?: string | undefined;
146
+ }, {
147
+ name: string;
148
+ email?: string | undefined;
149
+ }>>;
150
+ plugins: z.ZodOptional<z.ZodArray<z.ZodObject<{
151
+ name: z.ZodString;
152
+ description: z.ZodOptional<z.ZodString>;
153
+ source: z.ZodString;
154
+ category: z.ZodOptional<z.ZodString>;
155
+ version: z.ZodOptional<z.ZodString>;
156
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
157
+ name: z.ZodString;
158
+ description: z.ZodOptional<z.ZodString>;
159
+ source: z.ZodString;
160
+ category: z.ZodOptional<z.ZodString>;
161
+ version: z.ZodOptional<z.ZodString>;
162
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
163
+ name: z.ZodString;
164
+ description: z.ZodOptional<z.ZodString>;
165
+ source: z.ZodString;
166
+ category: z.ZodOptional<z.ZodString>;
167
+ version: z.ZodOptional<z.ZodString>;
168
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
169
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
170
+ name: z.ZodString;
171
+ version: z.ZodOptional<z.ZodString>;
172
+ owner: z.ZodOptional<z.ZodObject<{
173
+ name: z.ZodString;
174
+ email: z.ZodOptional<z.ZodString>;
175
+ }, "strip", z.ZodTypeAny, {
176
+ name: string;
177
+ email?: string | undefined;
178
+ }, {
179
+ name: string;
180
+ email?: string | undefined;
181
+ }>>;
182
+ plugins: z.ZodOptional<z.ZodArray<z.ZodObject<{
183
+ name: z.ZodString;
184
+ description: z.ZodOptional<z.ZodString>;
185
+ source: z.ZodString;
186
+ category: z.ZodOptional<z.ZodString>;
187
+ version: z.ZodOptional<z.ZodString>;
188
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
189
+ name: z.ZodString;
190
+ description: z.ZodOptional<z.ZodString>;
191
+ source: z.ZodString;
192
+ category: z.ZodOptional<z.ZodString>;
193
+ version: z.ZodOptional<z.ZodString>;
194
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
195
+ name: z.ZodString;
196
+ description: z.ZodOptional<z.ZodString>;
197
+ source: z.ZodString;
198
+ category: z.ZodOptional<z.ZodString>;
199
+ version: z.ZodOptional<z.ZodString>;
200
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
201
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
202
+ name: z.ZodString;
203
+ version: z.ZodOptional<z.ZodString>;
204
+ owner: z.ZodOptional<z.ZodObject<{
205
+ name: z.ZodString;
206
+ email: z.ZodOptional<z.ZodString>;
207
+ }, "strip", z.ZodTypeAny, {
208
+ name: string;
209
+ email?: string | undefined;
210
+ }, {
211
+ name: string;
212
+ email?: string | undefined;
213
+ }>>;
214
+ plugins: z.ZodOptional<z.ZodArray<z.ZodObject<{
215
+ name: z.ZodString;
216
+ description: z.ZodOptional<z.ZodString>;
217
+ source: z.ZodString;
218
+ category: z.ZodOptional<z.ZodString>;
219
+ version: z.ZodOptional<z.ZodString>;
220
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
221
+ name: z.ZodString;
222
+ description: z.ZodOptional<z.ZodString>;
223
+ source: z.ZodString;
224
+ category: z.ZodOptional<z.ZodString>;
225
+ version: z.ZodOptional<z.ZodString>;
226
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
227
+ name: z.ZodString;
228
+ description: z.ZodOptional<z.ZodString>;
229
+ source: z.ZodString;
230
+ category: z.ZodOptional<z.ZodString>;
231
+ version: z.ZodOptional<z.ZodString>;
232
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
233
+ }, z.ZodTypeAny, "passthrough">>;
234
+ /**
235
+ * CLI command schemas
236
+ */
237
+ export declare const MarketplaceAddCommandSchema: z.ZodObject<{
238
+ source: z.ZodString;
239
+ name: z.ZodOptional<z.ZodString>;
240
+ }, "strict", z.ZodTypeAny, {
241
+ source: string;
242
+ name?: string | undefined;
243
+ }, {
244
+ source: string;
245
+ name?: string | undefined;
246
+ }>;
247
+ export declare const MarketplaceInstallCommandSchema: z.ZodObject<{
248
+ plugin: z.ZodString;
249
+ scope: z.ZodDefault<z.ZodEnum<["user", "project", "local"]>>;
250
+ force: z.ZodDefault<z.ZodBoolean>;
251
+ }, "strict", z.ZodTypeAny, {
252
+ force: boolean;
253
+ scope: "local" | "project" | "user";
254
+ plugin: string;
255
+ }, {
256
+ plugin: string;
257
+ force?: boolean | undefined;
258
+ scope?: "local" | "project" | "user" | undefined;
259
+ }>;
260
+ //# sourceMappingURL=schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/marketplace/schemas.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;EAKvB,CAAC;AAEd;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOtB,CAAC;AAEd;;GAEG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQ3B,CAAC;AAEd;;GAEG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;gCAQvB,CAAC;AAEnB;;;GAGG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAapB,CAAC;AAEnB;;GAEG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;EAQ3B,CAAC;AAEd,eAAO,MAAM,+BAA+B;;;;;;;;;;;;EAM/B,CAAC"}
@@ -0,0 +1,49 @@
1
+ import { z } from "zod";
2
+ const MarketplaceSourceSchema = z.object({
3
+ type: z.enum(["github", "git", "local"]).describe("Type of marketplace source"),
4
+ value: z.string().min(1).describe("Source value: owner/repo, git URL, or local path")
5
+ }).strict();
6
+ const MarketplaceEntrySchema = z.object({
7
+ name: z.string().min(1).describe("Unique name of the marketplace"),
8
+ source: MarketplaceSourceSchema.describe("Source specification"),
9
+ installLocation: z.string().describe("Local path where marketplace is installed"),
10
+ lastUpdated: z.string().datetime().optional().describe("ISO timestamp of last update")
11
+ }).strict();
12
+ const KnownMarketplacesFileSchema = z.object({
13
+ version: z.number().default(1).describe("File format version"),
14
+ marketplaces: z.record(MarketplaceEntrySchema).default({}).describe("Registered marketplaces by name")
15
+ }).strict();
16
+ const MarketplacePluginEntrySchema = z.object({
17
+ name: z.string().min(1).describe("Plugin name"),
18
+ description: z.string().optional().describe("Plugin description"),
19
+ source: z.string().describe("Path to plugin within marketplace"),
20
+ category: z.string().optional().describe("Plugin category"),
21
+ version: z.string().optional().describe("Plugin version")
22
+ }).passthrough();
23
+ const MarketplaceManifestSchema = z.object({
24
+ name: z.string().describe("Marketplace name"),
25
+ version: z.string().optional().describe("Marketplace version"),
26
+ owner: z.object({
27
+ name: z.string(),
28
+ email: z.string().optional()
29
+ }).optional().describe("Owner information"),
30
+ plugins: z.array(MarketplacePluginEntrySchema).optional().describe("Listed plugins")
31
+ }).passthrough();
32
+ const MarketplaceAddCommandSchema = z.object({
33
+ source: z.string().min(1).describe("Marketplace source (owner/repo, git URL, or local path)"),
34
+ name: z.string().optional().describe("Custom name for the marketplace")
35
+ }).strict();
36
+ const MarketplaceInstallCommandSchema = z.object({
37
+ plugin: z.string().min(1).describe("Plugin spec: name or name@marketplace"),
38
+ scope: z.enum(["user", "project", "local"]).default("user").describe("Installation scope"),
39
+ force: z.boolean().default(false).describe("Force reinstall if already exists")
40
+ }).strict();
41
+ export {
42
+ KnownMarketplacesFileSchema,
43
+ MarketplaceAddCommandSchema,
44
+ MarketplaceEntrySchema,
45
+ MarketplaceInstallCommandSchema,
46
+ MarketplaceManifestSchema,
47
+ MarketplacePluginEntrySchema,
48
+ MarketplaceSourceSchema
49
+ };
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var types_exports = {};
16
+ module.exports = __toCommonJS(types_exports);
@@ -0,0 +1,156 @@
1
+ /**
2
+ * Plugin Marketplace Types
3
+ *
4
+ * Types for managing plugin marketplaces - repositories of plugins
5
+ * that can be browsed and installed.
6
+ */
7
+ /**
8
+ * Type of marketplace source
9
+ */
10
+ export type MarketplaceSourceType = 'github' | 'git' | 'local';
11
+ /**
12
+ * Marketplace source specification
13
+ */
14
+ export interface MarketplaceSource {
15
+ /** Type of source */
16
+ type: MarketplaceSourceType;
17
+ /** Value: owner/repo for GitHub, URL for git, path for local */
18
+ value: string;
19
+ }
20
+ /**
21
+ * Entry in the known marketplaces registry
22
+ */
23
+ export interface MarketplaceEntry {
24
+ /** Unique name of the marketplace */
25
+ name: string;
26
+ /** Source specification */
27
+ source: MarketplaceSource;
28
+ /** Local path where marketplace is installed */
29
+ installLocation: string;
30
+ /** ISO timestamp of last update */
31
+ lastUpdated?: string | undefined;
32
+ }
33
+ /**
34
+ * Structure of known_marketplaces.json
35
+ */
36
+ export interface KnownMarketplacesFile {
37
+ /** File format version */
38
+ version: number;
39
+ /** Registered marketplaces by name */
40
+ marketplaces: Record<string, MarketplaceEntry>;
41
+ }
42
+ /**
43
+ * Plugin metadata from a marketplace
44
+ */
45
+ export interface MarketplacePlugin {
46
+ /** Plugin name */
47
+ name: string;
48
+ /** Plugin description */
49
+ description?: string | undefined;
50
+ /** Plugin version */
51
+ version?: string | undefined;
52
+ /** Plugin category */
53
+ category?: string | undefined;
54
+ /** Path within the marketplace */
55
+ sourcePath: string;
56
+ /** Marketplace this plugin belongs to */
57
+ marketplace: string;
58
+ }
59
+ /**
60
+ * Result of adding a marketplace
61
+ */
62
+ export interface MarketplaceAddResult {
63
+ /** Whether the operation succeeded */
64
+ success: boolean;
65
+ /** Name of the marketplace */
66
+ name: string;
67
+ /** Number of plugins found */
68
+ pluginCount: number;
69
+ /** Non-fatal warnings */
70
+ warnings: string[];
71
+ }
72
+ /**
73
+ * Result of removing a marketplace
74
+ */
75
+ export interface MarketplaceRemoveResult {
76
+ /** Whether the operation succeeded */
77
+ success: boolean;
78
+ /** Name of the marketplace removed */
79
+ name: string;
80
+ }
81
+ /**
82
+ * Result of updating a marketplace
83
+ */
84
+ export interface MarketplaceUpdateResult {
85
+ /** Whether the operation succeeded */
86
+ success: boolean;
87
+ /** Name of the marketplace */
88
+ name: string;
89
+ /** Previous git commit SHA (if applicable) */
90
+ previousSha?: string | undefined;
91
+ /** New git commit SHA (if applicable) */
92
+ newSha?: string | undefined;
93
+ /** Whether there were changes */
94
+ hasChanges: boolean;
95
+ /** Non-fatal warnings */
96
+ warnings: string[];
97
+ }
98
+ /**
99
+ * Result of installing a plugin from marketplace
100
+ */
101
+ export interface MarketplaceInstallResult {
102
+ /** Whether the operation succeeded */
103
+ success: boolean;
104
+ /** Name of the plugin installed */
105
+ pluginName: string;
106
+ /** Name of the marketplace it came from */
107
+ marketplace: string;
108
+ /** Local installation path */
109
+ installPath: string;
110
+ /** Git commit SHA at time of install */
111
+ gitCommitSha?: string | undefined;
112
+ /** Non-fatal warnings */
113
+ warnings: string[];
114
+ }
115
+ /**
116
+ * Options for adding a marketplace
117
+ */
118
+ export interface MarketplaceAddOptions {
119
+ /** Custom name for the marketplace (defaults to derived from source) */
120
+ name?: string | undefined;
121
+ }
122
+ /**
123
+ * Options for installing from marketplace
124
+ */
125
+ export interface MarketplaceInstallOptions {
126
+ /** Installation scope */
127
+ scope?: 'user' | 'project' | 'local' | undefined;
128
+ /** Project path for project-scoped installation */
129
+ projectPath?: string | undefined;
130
+ /** Force reinstall if already exists */
131
+ force?: boolean | undefined;
132
+ }
133
+ /**
134
+ * Marketplace manifest format (marketplace.json in repo root)
135
+ * Compatible with Claude Code marketplace format
136
+ */
137
+ export interface MarketplaceManifest {
138
+ /** Marketplace name */
139
+ name: string;
140
+ /** Marketplace version */
141
+ version?: string;
142
+ /** Owner information */
143
+ owner?: {
144
+ name: string;
145
+ email?: string;
146
+ };
147
+ /** List of plugins in the marketplace */
148
+ plugins?: Array<{
149
+ name: string;
150
+ description?: string;
151
+ source: string;
152
+ category?: string;
153
+ version?: string;
154
+ }>;
155
+ }
156
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/plugins/marketplace/types.ts"],"names":[],"mappings":"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"}