@enactprotocol/shared 1.0.12

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 (97) hide show
  1. package/dist/LocalToolResolver.d.ts +84 -0
  2. package/dist/LocalToolResolver.js +353 -0
  3. package/dist/api/enact-api.d.ts +124 -0
  4. package/dist/api/enact-api.js +406 -0
  5. package/dist/api/index.d.ts +2 -0
  6. package/dist/api/index.js +2 -0
  7. package/dist/api/types.d.ts +83 -0
  8. package/dist/api/types.js +1 -0
  9. package/dist/core/DaggerExecutionProvider.d.ts +169 -0
  10. package/dist/core/DaggerExecutionProvider.js +996 -0
  11. package/dist/core/DirectExecutionProvider.d.ts +23 -0
  12. package/dist/core/DirectExecutionProvider.js +406 -0
  13. package/dist/core/EnactCore.d.ts +138 -0
  14. package/dist/core/EnactCore.js +609 -0
  15. package/dist/core/index.d.ts +3 -0
  16. package/dist/core/index.js +3 -0
  17. package/dist/exec/index.d.ts +3 -0
  18. package/dist/exec/index.js +3 -0
  19. package/dist/exec/logger.d.ts +11 -0
  20. package/dist/exec/logger.js +57 -0
  21. package/dist/exec/validate.d.ts +5 -0
  22. package/dist/exec/validate.js +167 -0
  23. package/dist/index.d.ts +25 -0
  24. package/dist/index.js +29 -0
  25. package/dist/lib/enact-direct.d.ts +156 -0
  26. package/dist/lib/enact-direct.js +158 -0
  27. package/dist/lib/index.d.ts +1 -0
  28. package/dist/lib/index.js +1 -0
  29. package/dist/security/index.d.ts +3 -0
  30. package/dist/security/index.js +3 -0
  31. package/dist/security/security.d.ts +23 -0
  32. package/dist/security/security.js +137 -0
  33. package/dist/security/sign.d.ts +103 -0
  34. package/dist/security/sign.js +532 -0
  35. package/dist/security/verification-enforcer.d.ts +41 -0
  36. package/dist/security/verification-enforcer.js +181 -0
  37. package/dist/services/McpCoreService.d.ts +102 -0
  38. package/dist/services/McpCoreService.js +120 -0
  39. package/dist/services/index.d.ts +1 -0
  40. package/dist/services/index.js +1 -0
  41. package/dist/types.d.ts +130 -0
  42. package/dist/types.js +3 -0
  43. package/dist/utils/config.d.ts +32 -0
  44. package/dist/utils/config.js +78 -0
  45. package/dist/utils/env-loader.d.ts +54 -0
  46. package/dist/utils/env-loader.js +270 -0
  47. package/dist/utils/help.d.ts +36 -0
  48. package/dist/utils/help.js +248 -0
  49. package/dist/utils/index.d.ts +7 -0
  50. package/dist/utils/index.js +7 -0
  51. package/dist/utils/logger.d.ts +35 -0
  52. package/dist/utils/logger.js +75 -0
  53. package/dist/utils/silent-monitor.d.ts +67 -0
  54. package/dist/utils/silent-monitor.js +242 -0
  55. package/dist/utils/timeout.d.ts +5 -0
  56. package/dist/utils/timeout.js +23 -0
  57. package/dist/utils/version.d.ts +4 -0
  58. package/dist/utils/version.js +14 -0
  59. package/dist/web/env-manager-server.d.ts +29 -0
  60. package/dist/web/env-manager-server.js +367 -0
  61. package/dist/web/index.d.ts +1 -0
  62. package/dist/web/index.js +1 -0
  63. package/package.json +79 -0
  64. package/src/LocalToolResolver.ts +424 -0
  65. package/src/api/enact-api.ts +569 -0
  66. package/src/api/index.ts +2 -0
  67. package/src/api/types.ts +93 -0
  68. package/src/core/DaggerExecutionProvider.ts +1308 -0
  69. package/src/core/DirectExecutionProvider.ts +484 -0
  70. package/src/core/EnactCore.ts +833 -0
  71. package/src/core/index.ts +3 -0
  72. package/src/exec/index.ts +3 -0
  73. package/src/exec/logger.ts +63 -0
  74. package/src/exec/validate.ts +238 -0
  75. package/src/index.ts +42 -0
  76. package/src/lib/enact-direct.ts +258 -0
  77. package/src/lib/index.ts +1 -0
  78. package/src/security/index.ts +3 -0
  79. package/src/security/security.ts +188 -0
  80. package/src/security/sign.ts +797 -0
  81. package/src/security/verification-enforcer.ts +268 -0
  82. package/src/services/McpCoreService.ts +203 -0
  83. package/src/services/index.ts +1 -0
  84. package/src/types.ts +190 -0
  85. package/src/utils/config.ts +97 -0
  86. package/src/utils/env-loader.ts +370 -0
  87. package/src/utils/help.ts +257 -0
  88. package/src/utils/index.ts +7 -0
  89. package/src/utils/logger.ts +83 -0
  90. package/src/utils/silent-monitor.ts +328 -0
  91. package/src/utils/timeout.ts +26 -0
  92. package/src/utils/version.ts +16 -0
  93. package/src/web/env-manager-server.ts +465 -0
  94. package/src/web/index.ts +1 -0
  95. package/src/web/static/app.js +663 -0
  96. package/src/web/static/index.html +117 -0
  97. package/src/web/static/style.css +291 -0
@@ -0,0 +1,23 @@
1
+ import { ExecutionProvider, type EnactTool, type ExecutionEnvironment, type ExecutionResult } from "../types.js";
2
+ export declare class DirectExecutionProvider extends ExecutionProvider {
3
+ resolveEnvironmentVariables(envConfig: Record<string, any>, namespace?: string): Promise<Record<string, any>>;
4
+ executeCommand(command: string, inputs: Record<string, any>, environment: ExecutionEnvironment, timeout?: string, options?: {
5
+ verbose?: boolean;
6
+ showSpinner?: boolean;
7
+ streamOutput?: boolean;
8
+ }): Promise<{
9
+ stdout: string;
10
+ stderr: string;
11
+ exitCode: number;
12
+ }>;
13
+ /**
14
+ * Execute command with exec.ts compatible interface
15
+ * This method provides the same interface as the exec.ts executeCommand function
16
+ */
17
+ executeCommandExecStyle(command: string, timeout: string, verbose?: boolean, envVars?: Record<string, string>): Promise<void>;
18
+ setup(tool: EnactTool): Promise<boolean>;
19
+ execute(tool: EnactTool, inputs: Record<string, any>, environment: ExecutionEnvironment): Promise<ExecutionResult>;
20
+ cleanup(): Promise<boolean>;
21
+ private generateExecutionId;
22
+ private parseCommand;
23
+ }
@@ -0,0 +1,406 @@
1
+ // src/core/DirectExecutionProvider.ts - Direct execution provider that doesn't use external CLI
2
+ import { spawn } from "child_process";
3
+ import { ExecutionProvider, } from "../types.js";
4
+ import logger from "../exec/logger.js";
5
+ import { parseTimeout } from "../utils/timeout.js";
6
+ export class DirectExecutionProvider extends ExecutionProvider {
7
+ async resolveEnvironmentVariables(envConfig, namespace) {
8
+ const resolved = {};
9
+ for (const [key, config] of Object.entries(envConfig)) {
10
+ if (typeof config === "object" && config.source) {
11
+ // Handle different sources
12
+ switch (config.source) {
13
+ case "env":
14
+ resolved[key] = process.env[key] || config.default;
15
+ break;
16
+ case "user":
17
+ // Could get from user config file
18
+ resolved[key] = config.default;
19
+ break;
20
+ default:
21
+ resolved[key] = config.default;
22
+ }
23
+ }
24
+ else {
25
+ // Direct value
26
+ resolved[key] = config;
27
+ }
28
+ }
29
+ return resolved;
30
+ }
31
+ async executeCommand(command, inputs, environment, timeout, options) {
32
+ return new Promise((resolve, reject) => {
33
+ let stdout = "";
34
+ let stderr = "";
35
+ // UI Setup
36
+ const verbose = options?.verbose ?? false;
37
+ const showSpinner = options?.showSpinner ?? false;
38
+ const streamOutput = options?.streamOutput ?? true;
39
+ let spinner = null;
40
+ if (showSpinner) {
41
+ // Dynamic import to avoid dependency issues when not needed
42
+ try {
43
+ const p = require("@clack/prompts");
44
+ spinner = p.spinner();
45
+ spinner.start("Executing tool...");
46
+ }
47
+ catch (e) {
48
+ // Fallback if @clack/prompts not available
49
+ console.log("Executing tool...");
50
+ }
51
+ }
52
+ if (verbose) {
53
+ try {
54
+ const pc = require("picocolors");
55
+ console.error(pc.cyan("\n🚀 Executing command:"));
56
+ console.error(pc.white(command));
57
+ }
58
+ catch (e) {
59
+ console.error("\n🚀 Executing command:");
60
+ console.error(command);
61
+ }
62
+ }
63
+ // Substitute template variables in command with input values
64
+ let substitutedCommand = command;
65
+ for (const [key, value] of Object.entries(inputs)) {
66
+ const templateVar = `\${${key}}`;
67
+ // Handle different value types
68
+ let substitutionValue;
69
+ if (typeof value === "string") {
70
+ substitutionValue = value;
71
+ }
72
+ else if (typeof value === "object") {
73
+ substitutionValue = JSON.stringify(value);
74
+ }
75
+ else {
76
+ substitutionValue = String(value);
77
+ }
78
+ substitutedCommand = substitutedCommand.replace(new RegExp(`\\$\\{${key}\\}`, "g"), substitutionValue);
79
+ }
80
+ // Prepare environment
81
+ const env = {
82
+ ...process.env,
83
+ ...environment.vars,
84
+ };
85
+ // Parse command and arguments properly handling quoted strings
86
+ const commandParts = this.parseCommand(substitutedCommand);
87
+ const cmd = commandParts[0];
88
+ const args = commandParts.slice(1);
89
+ logger.info(`Executing command: ${command}`);
90
+ try {
91
+ const proc = spawn(cmd, args, {
92
+ env,
93
+ stdio: ["pipe", "pipe", "pipe"],
94
+ // Create a new process group for better cleanup of child processes
95
+ detached: process.platform !== "win32",
96
+ });
97
+ // Cleanup function to ensure process and children are properly terminated
98
+ let isCleanedUp = false;
99
+ let cleanupTimer = null;
100
+ const cleanup = () => {
101
+ if (isCleanedUp)
102
+ return;
103
+ isCleanedUp = true;
104
+ // Clear any pending cleanup timer
105
+ if (cleanupTimer) {
106
+ clearTimeout(cleanupTimer);
107
+ cleanupTimer = null;
108
+ }
109
+ if (proc && !proc.killed) {
110
+ try {
111
+ logger.debug(`Cleaning up process PID: ${proc.pid}`);
112
+ // For Dagger and other tools that may spawn child processes
113
+ if (process.platform === "win32") {
114
+ proc.kill("SIGKILL");
115
+ }
116
+ else {
117
+ // Try graceful termination first
118
+ proc.kill("SIGTERM");
119
+ // Set a cleanup timer for force kill if needed
120
+ cleanupTimer = setTimeout(() => {
121
+ if (!proc.killed && !isCleanedUp) {
122
+ logger.debug(`Force killing process PID: ${proc.pid}`);
123
+ try {
124
+ proc.kill("SIGKILL");
125
+ }
126
+ catch (killError) {
127
+ // Process might already be dead, ignore
128
+ logger.debug(`Force kill error (likely harmless): ${killError}`);
129
+ }
130
+ }
131
+ cleanupTimer = null;
132
+ }, 1000); // Reduced from 2000ms to 1000ms
133
+ }
134
+ }
135
+ catch (killError) {
136
+ // Process might already be dead, ignore
137
+ logger.debug(`Process cleanup error (likely harmless): ${killError}`);
138
+ }
139
+ }
140
+ };
141
+ // Collect stdout and stream it in real-time
142
+ proc.stdout.on("data", (data) => {
143
+ const chunk = data.toString();
144
+ stdout += chunk;
145
+ // Stream stdout to console in real-time if enabled
146
+ if (streamOutput) {
147
+ process.stdout.write(chunk);
148
+ }
149
+ });
150
+ // Collect stderr and stream it in real-time
151
+ proc.stderr.on("data", (data) => {
152
+ const chunk = data.toString();
153
+ stderr += chunk;
154
+ // Stream stderr to console in real-time if enabled
155
+ if (streamOutput) {
156
+ process.stderr.write(chunk);
157
+ }
158
+ });
159
+ // Handle process completion with more robust cleanup
160
+ proc.on("close", (code) => {
161
+ logger.debug(`Process closed with code: ${code}, PID: ${proc.pid}`);
162
+ // Force cleanup any remaining resources
163
+ cleanup();
164
+ // Handle spinner cleanup and success/error messaging
165
+ if (spinner) {
166
+ spinner.stop("Execution completed");
167
+ }
168
+ if (code === 0) {
169
+ if (showSpinner || verbose) {
170
+ try {
171
+ const pc = require("picocolors");
172
+ console.error(pc.green("\n✅ Tool executed successfully"));
173
+ if (stdout.trim() && !streamOutput) {
174
+ console.error(pc.cyan("\n📤 Output:"));
175
+ console.error(stdout.trim());
176
+ }
177
+ }
178
+ catch (e) {
179
+ console.error("\n✅ Tool executed successfully");
180
+ if (stdout.trim() && !streamOutput) {
181
+ console.error("\n📤 Output:");
182
+ console.error(stdout.trim());
183
+ }
184
+ }
185
+ }
186
+ }
187
+ else {
188
+ if (showSpinner || verbose) {
189
+ try {
190
+ const pc = require("picocolors");
191
+ console.error(pc.red(`\n❌ Tool execution failed (exit code: ${code})`));
192
+ if (stderr.trim() && !streamOutput) {
193
+ console.error(pc.red("\n📤 Error output:"));
194
+ console.error(stderr.trim());
195
+ }
196
+ if (stdout.trim() && !streamOutput) {
197
+ console.error(pc.yellow("\n📤 Standard output:"));
198
+ console.error(stdout.trim());
199
+ }
200
+ }
201
+ catch (e) {
202
+ console.error(`\n❌ Tool execution failed (exit code: ${code})`);
203
+ if (stderr.trim() && !streamOutput) {
204
+ console.error("\n📤 Error output:");
205
+ console.error(stderr.trim());
206
+ }
207
+ if (stdout.trim() && !streamOutput) {
208
+ console.error("\n📤 Standard output:");
209
+ console.error(stdout.trim());
210
+ }
211
+ }
212
+ }
213
+ }
214
+ resolve({
215
+ stdout: stdout.trim(),
216
+ stderr: stderr.trim(),
217
+ exitCode: code || 0,
218
+ });
219
+ });
220
+ // Handle process errors
221
+ proc.on("error", (error) => {
222
+ cleanup();
223
+ if (spinner) {
224
+ spinner.stop("Execution failed");
225
+ }
226
+ if (showSpinner || verbose) {
227
+ try {
228
+ const pc = require("picocolors");
229
+ console.error(pc.red(`\n❌ Failed to execute command: ${error.message}`));
230
+ }
231
+ catch (e) {
232
+ console.error(`\n❌ Failed to execute command: ${error.message}`);
233
+ }
234
+ }
235
+ reject(new Error(`Command execution error: ${error.message}`));
236
+ });
237
+ // Set timeout if specified
238
+ if (timeout) {
239
+ const timeoutMs = parseTimeout(timeout);
240
+ setTimeout(() => {
241
+ cleanup();
242
+ if (spinner) {
243
+ spinner.stop("Execution failed");
244
+ }
245
+ reject(new Error(`Command timed out after ${timeout}`));
246
+ }, timeoutMs);
247
+ }
248
+ }
249
+ catch (spawnError) {
250
+ reject(new Error(`Failed to spawn command: ${spawnError}`));
251
+ }
252
+ });
253
+ }
254
+ /**
255
+ * Execute command with exec.ts compatible interface
256
+ * This method provides the same interface as the exec.ts executeCommand function
257
+ */
258
+ async executeCommandExecStyle(command, timeout, verbose = false, envVars = {}) {
259
+ const environment = {
260
+ vars: envVars,
261
+ resources: { timeout },
262
+ };
263
+ const result = await this.executeCommand(command, {}, // No template substitution needed for this interface
264
+ environment, timeout, {
265
+ verbose,
266
+ showSpinner: true,
267
+ streamOutput: false, // Don't stream since exec.ts shows output at the end
268
+ });
269
+ if (result.exitCode !== 0) {
270
+ throw new Error(`Command failed with exit code ${result.exitCode}`);
271
+ }
272
+ }
273
+ async setup(tool) {
274
+ // No special setup needed for direct execution
275
+ logger.debug(`Setting up direct execution for tool: ${tool.name}`);
276
+ return true;
277
+ }
278
+ async execute(tool, inputs, environment) {
279
+ const executionId = this.generateExecutionId();
280
+ const timeout = tool.timeout || environment.resources?.timeout;
281
+ // Substitute template variables in command with input values
282
+ let substitutedCommand = tool.command;
283
+ for (const [key, value] of Object.entries(inputs)) {
284
+ const templateVar = `\${${key}}`;
285
+ // Handle different value types
286
+ let substitutionValue;
287
+ if (typeof value === "string") {
288
+ substitutionValue = value;
289
+ }
290
+ else if (typeof value === "object") {
291
+ substitutionValue = JSON.stringify(value);
292
+ }
293
+ else {
294
+ substitutionValue = String(value);
295
+ }
296
+ substitutedCommand = substitutedCommand.replace(new RegExp(`\\$\\{${key}\\}`, "g"), substitutionValue);
297
+ }
298
+ try {
299
+ // Execute the command
300
+ const result = await this.executeCommand(substitutedCommand, inputs, environment, timeout);
301
+ // Parse output
302
+ let parsedOutput;
303
+ try {
304
+ // Try to parse as JSON first
305
+ parsedOutput = JSON.parse(result.stdout);
306
+ }
307
+ catch {
308
+ // If not JSON, return structured output
309
+ parsedOutput = {
310
+ stdout: result.stdout,
311
+ stderr: result.stderr,
312
+ };
313
+ }
314
+ return {
315
+ success: result.exitCode === 0,
316
+ output: parsedOutput,
317
+ ...(result.exitCode !== 0 && {
318
+ error: {
319
+ message: `Command failed with exit code ${result.exitCode}`,
320
+ code: "COMMAND_FAILED",
321
+ details: {
322
+ stdout: result.stdout,
323
+ stderr: result.stderr,
324
+ command: substitutedCommand, // Show the substituted command
325
+ exitCode: result.exitCode,
326
+ },
327
+ },
328
+ }),
329
+ metadata: {
330
+ executionId,
331
+ toolName: tool.name,
332
+ version: tool.version,
333
+ executedAt: new Date().toISOString(),
334
+ environment: "direct",
335
+ timeout,
336
+ command: substitutedCommand, // Show the substituted command in metadata
337
+ },
338
+ };
339
+ }
340
+ catch (error) {
341
+ return {
342
+ success: false,
343
+ error: {
344
+ message: error.message,
345
+ code: "EXECUTION_ERROR",
346
+ details: error,
347
+ },
348
+ metadata: {
349
+ executionId,
350
+ toolName: tool.name,
351
+ version: tool.version,
352
+ executedAt: new Date().toISOString(),
353
+ environment: "direct",
354
+ },
355
+ };
356
+ }
357
+ }
358
+ async cleanup() {
359
+ // No cleanup needed for direct execution
360
+ return true;
361
+ }
362
+ generateExecutionId() {
363
+ return `exec_${Date.now()}_${Math.random().toString(36).substring(2, 9)}`;
364
+ }
365
+ parseCommand(command) {
366
+ const parts = [];
367
+ let current = "";
368
+ let inQuotes = false;
369
+ let quoteChar = "";
370
+ let i = 0;
371
+ while (i < command.length) {
372
+ const char = command[i];
373
+ if (!inQuotes && (char === '"' || char === "'")) {
374
+ // Start of quoted section
375
+ inQuotes = true;
376
+ quoteChar = char;
377
+ }
378
+ else if (inQuotes && char === quoteChar) {
379
+ // End of quoted section
380
+ inQuotes = false;
381
+ quoteChar = "";
382
+ }
383
+ else if (!inQuotes && char === " ") {
384
+ // Space outside quotes - end current part
385
+ if (current.length > 0) {
386
+ parts.push(current);
387
+ current = "";
388
+ }
389
+ // Skip whitespace
390
+ while (i + 1 < command.length && command[i + 1] === " ") {
391
+ i++;
392
+ }
393
+ }
394
+ else {
395
+ // Regular character or space inside quotes
396
+ current += char;
397
+ }
398
+ i++;
399
+ }
400
+ // Add the last part if it exists
401
+ if (current.length > 0) {
402
+ parts.push(current);
403
+ }
404
+ return parts;
405
+ }
406
+ }
@@ -0,0 +1,138 @@
1
+ import type { EnactTool, ExecutionResult } from "../types.js";
2
+ export interface EnactCoreOptions {
3
+ apiUrl?: string;
4
+ supabaseUrl?: string;
5
+ executionProvider?: "direct" | "docker" | "dagger" | "cloud";
6
+ authToken?: string;
7
+ verbose?: boolean;
8
+ defaultTimeout?: string;
9
+ verificationPolicy?: "permissive" | "enterprise" | "paranoid";
10
+ daggerOptions?: {
11
+ baseImage?: string;
12
+ enableNetwork?: boolean;
13
+ enableHostFS?: boolean;
14
+ maxMemory?: string;
15
+ maxCPU?: string;
16
+ };
17
+ }
18
+ export interface ToolSearchOptions {
19
+ query: string;
20
+ limit?: number;
21
+ tags?: string[];
22
+ author?: string;
23
+ format?: "json" | "table" | "list";
24
+ }
25
+ export interface ToolExecuteOptions {
26
+ timeout?: string;
27
+ verifyPolicy?: "permissive" | "enterprise" | "paranoid";
28
+ skipVerification?: boolean;
29
+ force?: boolean;
30
+ dryRun?: boolean;
31
+ verbose?: boolean;
32
+ }
33
+ export declare class EnactCore {
34
+ private apiClient;
35
+ private executionProvider;
36
+ private options;
37
+ constructor(options?: EnactCoreOptions);
38
+ /**
39
+ * Set authentication token for API operations
40
+ */
41
+ setAuthToken(token: string): void;
42
+ /**
43
+ * Search for tools
44
+ */
45
+ searchTools(options: ToolSearchOptions): Promise<EnactTool[]>;
46
+ /**
47
+ * Fallback search method that gets all tools and filters locally
48
+ */
49
+ private searchToolsFallback;
50
+ /**
51
+ * Get a specific tool by name
52
+ */
53
+ getToolByName(name: string, version?: string): Promise<EnactTool | null>;
54
+ /**
55
+ * Execute a tool by name
56
+ */
57
+ executeToolByName(name: string, inputs?: Record<string, any>, options?: ToolExecuteOptions): Promise<ExecutionResult>;
58
+ /**
59
+ * Execute a tool directly
60
+ */
61
+ executeTool(tool: EnactTool, inputs?: Record<string, any>, options?: ToolExecuteOptions): Promise<ExecutionResult>;
62
+ /**
63
+ * Execute a tool from raw YAML definition
64
+ */
65
+ executeRawTool(toolYaml: string, inputs?: Record<string, any>, options?: ToolExecuteOptions): Promise<ExecutionResult>;
66
+ /**
67
+ * Verify a tool's signature
68
+ */
69
+ verifyTool(name: string, policy?: string): Promise<{
70
+ verified: boolean;
71
+ signatures: any[];
72
+ policy: string;
73
+ errors?: string[];
74
+ }>;
75
+ /**
76
+ * Check if a tool exists
77
+ */
78
+ toolExists(name: string): Promise<boolean>;
79
+ /**
80
+ * Get tools by tags
81
+ */
82
+ getToolsByTags(tags: string[], limit?: number): Promise<EnactTool[]>;
83
+ /**
84
+ * Get tools by author
85
+ */
86
+ getToolsByAuthor(author: string, limit?: number): Promise<EnactTool[]>;
87
+ /**
88
+ * Get all tools with filters
89
+ */
90
+ getTools(options?: {
91
+ limit?: number;
92
+ offset?: number;
93
+ tags?: string[];
94
+ author?: string;
95
+ }): Promise<EnactTool[]>;
96
+ /**
97
+ * Get authentication status (placeholder - would need actual auth implementation)
98
+ */
99
+ getAuthStatus(): Promise<{
100
+ authenticated: boolean;
101
+ user?: string;
102
+ server?: string;
103
+ }>;
104
+ /**
105
+ * Publish a tool (requires authentication)
106
+ */
107
+ publishTool(tool: EnactTool): Promise<{
108
+ success: boolean;
109
+ message: string;
110
+ }>;
111
+ /**
112
+ * Get tool information (alias for getToolByName for consistency)
113
+ */
114
+ getToolInfo(name: string, version?: string): Promise<EnactTool | null>;
115
+ /**
116
+ * Get core library status
117
+ */
118
+ getStatus(): Promise<{
119
+ executionProvider: string;
120
+ apiUrl: string;
121
+ verificationPolicy: string;
122
+ defaultTimeout: string;
123
+ authenticated: boolean;
124
+ }>;
125
+ /**
126
+ * Create the appropriate execution provider based on options
127
+ */
128
+ private createExecutionProvider;
129
+ /**
130
+ * Switch execution provider at runtime
131
+ */
132
+ switchExecutionProvider(provider: "direct" | "dagger", options?: any): void;
133
+ /**
134
+ * Generate execution ID
135
+ */
136
+ private generateExecutionId;
137
+ }
138
+ export declare const enactCore: EnactCore;