@crewx/sdk 0.8.0-rc.80 → 0.8.0-rc.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__tests__/adapter/context-builder.test.d.ts +1 -0
- package/dist/__tests__/adapter/plugin-helper.test.d.ts +1 -0
- package/dist/__tests__/adapter/registration-integration.test.d.ts +1 -0
- package/dist/__tests__/adapter/scoped-store.test.d.ts +1 -0
- package/dist/__tests__/plugins/conversation.test.d.ts +1 -0
- package/dist/__tests__/testing/createMockContext.test.d.ts +1 -0
- package/dist/adapter/context-builder.d.ts +0 -9
- package/dist/adapter/index.d.ts +0 -1
- package/dist/adapter/plugin-helper.d.ts +0 -7
- package/dist/adapter/scoped-store.d.ts +0 -10
- package/dist/adapter/types.d.ts +0 -7
- package/dist/agent/resolver.d.ts +0 -13
- package/dist/boxing/box-storage.interface.d.ts +0 -4
- package/dist/boxing/box.service.d.ts +0 -4
- package/dist/boxing/box.types.d.ts +0 -4
- package/dist/boxing/context-builder.d.ts +0 -4
- package/dist/client/CrewxClient.d.ts +0 -32
- package/dist/client/index.d.ts +0 -1
- package/dist/client/index.js +1 -6
- package/dist/config/loader.browser.d.ts +0 -8
- package/dist/config/loader.d.ts +0 -12
- package/dist/conversation/__tests__/sqlite-provider.test.d.ts +1 -0
- package/dist/conversation/__tests__/to-task-reader.test.d.ts +1 -0
- package/dist/conversation/index.d.ts +0 -1
- package/dist/conversation/sqlite-provider.d.ts +0 -9
- package/dist/conversation/to-task-reader.d.ts +0 -11
- package/dist/conversation/to-template-messages.d.ts +0 -13
- package/dist/conversation/types.d.ts +0 -58
- package/dist/esm/client/index.js +1 -0
- package/dist/esm/hooks/index.js +7 -0
- package/dist/esm/index.js +79 -0
- package/dist/esm/plugins/index.js +52 -0
- package/dist/esm/testing/index.js +1 -0
- package/dist/esm/tools/node/index.js +36 -0
- package/dist/events/TypedEventEmitter.d.ts +0 -24
- package/dist/events/types.d.ts +0 -43
- package/dist/facade/Crewx.browser.d.ts +0 -40
- package/dist/facade/Crewx.d.ts +0 -163
- package/dist/hooks/define.d.ts +0 -1
- package/dist/hooks/dispatch.d.ts +0 -12
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/index.js +7 -24
- package/dist/hooks/observer.d.ts +0 -1
- package/dist/hooks/plugin.d.ts +0 -1
- package/dist/hooks/tool-normalize.d.ts +0 -26
- package/dist/hooks/types.d.ts +0 -1
- package/dist/hooks/yaml-plugin.d.ts +0 -1
- package/dist/index.browser.d.ts +0 -7
- package/dist/index.browser.js +2 -25
- package/dist/index.d.ts +0 -4
- package/dist/index.js +79 -151
- package/dist/layout/loader.d.ts +0 -20
- package/dist/layout/props-validator.d.ts +0 -6
- package/dist/layout/renderer.d.ts +0 -24
- package/dist/layout/types.d.ts +0 -42
- package/dist/parallel/agent-runtime.d.ts +0 -11
- package/dist/parallel/helpers.d.ts +0 -1
- package/dist/parallel/index.d.ts +0 -1
- package/dist/parallel/parallel-runner.d.ts +0 -8
- package/dist/parallel/types.d.ts +0 -24
- package/dist/parsers/agent-call.util.d.ts +0 -3
- package/dist/parsers/claude.parser.d.ts +0 -8
- package/dist/parsers/codex.parser.d.ts +0 -8
- package/dist/parsers/copilot.parser.d.ts +0 -9
- package/dist/parsers/gemini.parser.d.ts +0 -10
- package/dist/parsers/opencode.parser.d.ts +0 -10
- package/dist/parsers/router.d.ts +0 -5
- package/dist/paths.d.ts +1 -0
- package/dist/platform/BrowserFsAdapter.d.ts +0 -20
- package/dist/platform/IFsAdapter.d.ts +0 -23
- package/dist/platform/NodeFsAdapter.d.ts +0 -8
- package/dist/plugin/plugin-provider.d.ts +0 -22
- package/dist/plugin/types.d.ts +0 -31
- package/dist/plugin.d.ts +0 -27
- package/dist/plugins/conversation.d.ts +0 -2
- package/dist/plugins/file-logger.d.ts +0 -13
- package/dist/plugins/index.d.ts +0 -10
- package/dist/plugins/index.js +52 -19
- package/dist/plugins/sqlite-tracing.d.ts +0 -13
- package/dist/plugins/sqlite-tracing.spec.d.ts +1 -0
- package/dist/provider/bridge.browser.d.ts +0 -20
- package/dist/provider/bridge.d.ts +0 -47
- package/dist/provider/parse-usage.d.ts +0 -14
- package/dist/provider/register-api.d.ts +0 -7
- package/dist/provider/vercel-runtime.d.ts +0 -29
- package/dist/remote/index.d.ts +0 -6
- package/dist/remote/remote-agent-manager.d.ts +0 -31
- package/dist/remote/remote-provider.d.ts +0 -15
- package/dist/remote/remote-transport.d.ts +0 -17
- package/dist/remote/types.d.ts +0 -59
- package/dist/server/auth.d.ts +0 -16
- package/dist/server/handler.d.ts +0 -17
- package/dist/server/index.d.ts +0 -4
- package/dist/server/tool-adapter.d.ts +0 -16
- package/dist/template/engine.d.ts +0 -19
- package/dist/template/helpers/exec.browser.d.ts +0 -7
- package/dist/template/helpers/exec.d.ts +0 -45
- package/dist/template/helpers/fenced_code.d.ts +0 -16
- package/dist/template/helpers/format-conversation.d.ts +0 -22
- package/dist/template/helpers/include.d.ts +0 -15
- package/dist/template/helpers/p1p2.d.ts +0 -32
- package/dist/template/loader/DocumentLoader.d.ts +0 -30
- package/dist/template/types.d.ts +0 -30
- package/dist/testing/index.d.ts +0 -1
- package/dist/testing/index.js +1 -16
- package/dist/testing/mock-audit.d.ts +0 -1
- package/dist/testing/mock-context.d.ts +0 -1
- package/dist/testing/mock-logger.d.ts +0 -1
- package/dist/testing/mock-router.d.ts +0 -1
- package/dist/testing/mock-storage.d.ts +0 -1
- package/dist/testing/mock-store.d.ts +0 -1
- package/dist/tools/delegate.d.ts +0 -7
- package/dist/tools/index.d.ts +0 -4
- package/dist/tools/node/builtin.d.ts +0 -16
- package/dist/tools/node/index.d.ts +0 -20
- package/dist/tools/node/index.js +36 -59
- package/dist/types/index.d.ts +0 -20
- package/dist/types/task-log.types.d.ts +0 -4
- package/dist/utils/env-defaults.d.ts +0 -16
- package/dist/utils/glob-match.d.ts +0 -16
- package/dist/utils/id.d.ts +0 -15
- package/dist/utils/timestamp.d.ts +0 -1
- package/dist/utils/workspace.d.ts +0 -4
- package/package.json +24 -25
- package/dist/adapter/context-builder.js +0 -87
- package/dist/adapter/index.js +0 -21
- package/dist/adapter/plugin-helper.js +0 -45
- package/dist/adapter/scoped-store.js +0 -43
- package/dist/adapter/types.js +0 -23
- package/dist/agent/resolver.js +0 -46
- package/dist/boxing/box-storage.interface.js +0 -6
- package/dist/boxing/box.service.js +0 -73
- package/dist/boxing/box.types.js +0 -6
- package/dist/boxing/context-builder.js +0 -79
- package/dist/client/CrewxClient.js +0 -86
- package/dist/config/loader.browser.js +0 -59
- package/dist/config/loader.js +0 -95
- package/dist/conversation/index.js +0 -25
- package/dist/conversation/sqlite-provider.js +0 -178
- package/dist/conversation/to-task-reader.js +0 -28
- package/dist/conversation/to-template-messages.js +0 -34
- package/dist/conversation/types.js +0 -10
- package/dist/events/TypedEventEmitter.js +0 -65
- package/dist/events/types.js +0 -9
- package/dist/facade/Crewx.browser.js +0 -314
- package/dist/facade/Crewx.js +0 -1299
- package/dist/hooks/define.js +0 -13
- package/dist/hooks/dispatch.js +0 -147
- package/dist/hooks/observer.js +0 -60
- package/dist/hooks/plugin.js +0 -17
- package/dist/hooks/tool-normalize.js +0 -110
- package/dist/hooks/types.js +0 -12
- package/dist/hooks/yaml-plugin.js +0 -356
- package/dist/layout/loader.js +0 -305
- package/dist/layout/props-validator.js +0 -301
- package/dist/layout/renderer.js +0 -193
- package/dist/layout/types.js +0 -36
- package/dist/parallel/agent-runtime.js +0 -25
- package/dist/parallel/helpers.js +0 -219
- package/dist/parallel/index.js +0 -13
- package/dist/parallel/parallel-runner.js +0 -226
- package/dist/parallel/types.js +0 -6
- package/dist/parsers/agent-call.util.js +0 -19
- package/dist/parsers/claude.parser.js +0 -67
- package/dist/parsers/codex.parser.js +0 -100
- package/dist/parsers/copilot.parser.js +0 -66
- package/dist/parsers/gemini.parser.js +0 -46
- package/dist/parsers/opencode.parser.js +0 -76
- package/dist/parsers/router.js +0 -56
- package/dist/platform/BrowserFsAdapter.js +0 -84
- package/dist/platform/IFsAdapter.js +0 -3
- package/dist/platform/NodeFsAdapter.js +0 -38
- package/dist/plugin/plugin-provider.js +0 -207
- package/dist/plugin/types.js +0 -9
- package/dist/plugin.js +0 -29
- package/dist/plugins/conversation.js +0 -59
- package/dist/plugins/file-logger.js +0 -87
- package/dist/plugins/sqlite-tracing.js +0 -112
- package/dist/provider/bridge.browser.js +0 -49
- package/dist/provider/bridge.js +0 -381
- package/dist/provider/parse-usage.js +0 -83
- package/dist/provider/register-api.js +0 -24
- package/dist/provider/vercel-runtime.js +0 -347
- package/dist/remote/index.js +0 -32
- package/dist/remote/remote-agent-manager.js +0 -198
- package/dist/remote/remote-provider.js +0 -141
- package/dist/remote/remote-transport.js +0 -83
- package/dist/remote/types.js +0 -9
- package/dist/server/auth.js +0 -35
- package/dist/server/handler.js +0 -75
- package/dist/server/index.js +0 -9
- package/dist/server/tool-adapter.js +0 -95
- package/dist/template/engine.js +0 -137
- package/dist/template/helpers/exec.browser.js +0 -41
- package/dist/template/helpers/exec.js +0 -230
- package/dist/template/helpers/fenced_code.js +0 -20
- package/dist/template/helpers/format-conversation.js +0 -53
- package/dist/template/helpers/include.js +0 -23
- package/dist/template/helpers/p1p2.js +0 -90
- package/dist/template/loader/DocumentLoader.js +0 -128
- package/dist/template/types.js +0 -6
- package/dist/testing/mock-audit.js +0 -13
- package/dist/testing/mock-context.js +0 -68
- package/dist/testing/mock-logger.js +0 -27
- package/dist/testing/mock-router.js +0 -67
- package/dist/testing/mock-storage.js +0 -21
- package/dist/testing/mock-store.js +0 -8
- package/dist/tools/delegate.js +0 -60
- package/dist/tools/index.js +0 -9
- package/dist/tools/node/builtin.js +0 -547
- package/dist/types/index.js +0 -32
- package/dist/types/task-log.types.js +0 -6
- package/dist/utils/env-defaults.js +0 -27
- package/dist/utils/glob-match.js +0 -42
- package/dist/utils/id.js +0 -50
- package/dist/utils/timestamp.js +0 -13
- package/dist/utils/workspace.js +0 -58
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Remote Provider Runtime
|
|
4
|
-
*
|
|
5
|
-
* Implements ProviderRuntime for remote agents via MCP-HTTP transport.
|
|
6
|
-
*
|
|
7
|
-
* Resolution path:
|
|
8
|
-
* - http(s):// → MCP-HTTP transport via RemoteAgentManager
|
|
9
|
-
*
|
|
10
|
-
* Note: file:// remote agents are handled at the CLI level by swapping the
|
|
11
|
-
* Crewx instance to the target crewx.yaml before calling query/execute.
|
|
12
|
-
* See packages/cli/src/commands/execute.ts and query.ts for details.
|
|
13
|
-
*/
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.RemoteProviderRuntime = void 0;
|
|
16
|
-
exports.resolveFileRemoteAgent = resolveFileRemoteAgent;
|
|
17
|
-
exports.createRemoteProviderFactory = createRemoteProviderFactory;
|
|
18
|
-
const fs_1 = require("fs");
|
|
19
|
-
const path_1 = require("path");
|
|
20
|
-
const js_yaml_1 = require("js-yaml");
|
|
21
|
-
const bridge_js_1 = require("../provider/bridge.js");
|
|
22
|
-
const remote_agent_manager_js_1 = require("./remote-agent-manager.js");
|
|
23
|
-
/**
|
|
24
|
-
* Load a remote crewx.yaml without strict schema validation.
|
|
25
|
-
*
|
|
26
|
-
* Unlike loadYamlFile(), this does not run Zod validation so it tolerates
|
|
27
|
-
* schema variations in remote workspaces (e.g. provider nested in inline).
|
|
28
|
-
*/
|
|
29
|
-
function loadYamlFileLenient(filePath) {
|
|
30
|
-
const content = (0, fs_1.readFileSync)(filePath, 'utf-8');
|
|
31
|
-
const raw = (0, js_yaml_1.load)(content);
|
|
32
|
-
const agents = Array.isArray(raw?.agents) ? raw.agents : undefined;
|
|
33
|
-
return { agents };
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Extract provider string from an agent, handling both formats:
|
|
37
|
-
* - top-level: agent.provider = "cli/claude"
|
|
38
|
-
* - inline: agent.inline.provider = "cli/claude"
|
|
39
|
-
*/
|
|
40
|
-
function extractAgentProvider(agent) {
|
|
41
|
-
const direct = Array.isArray(agent.provider) ? agent.provider[0] : agent.provider;
|
|
42
|
-
if (direct)
|
|
43
|
-
return direct;
|
|
44
|
-
const fromInline = Array.isArray(agent.inline?.provider)
|
|
45
|
-
? agent.inline.provider[0]
|
|
46
|
-
: agent.inline?.provider;
|
|
47
|
-
return fromInline;
|
|
48
|
-
}
|
|
49
|
-
function resolveFileRemoteAgent(config, yamlLoader = loadYamlFileLenient, existsFn = fs_1.existsSync) {
|
|
50
|
-
const configPath = config.location.replace('file://', '');
|
|
51
|
-
if (!existsFn(configPath)) {
|
|
52
|
-
throw new Error(`Remote config file not found: ${configPath}`);
|
|
53
|
-
}
|
|
54
|
-
if (!config.external_agent_id) {
|
|
55
|
-
throw new Error(`external_agent_id is required for file:// remote provider "${config.id}"`);
|
|
56
|
-
}
|
|
57
|
-
const targetConfig = yamlLoader(configPath);
|
|
58
|
-
const targetAgent = targetConfig.agents?.find((a) => a.id === config.external_agent_id);
|
|
59
|
-
if (!targetAgent) {
|
|
60
|
-
throw new Error(`Agent "${config.external_agent_id}" not found in ${configPath}`);
|
|
61
|
-
}
|
|
62
|
-
const targetProvider = extractAgentProvider(targetAgent);
|
|
63
|
-
if (!targetProvider) {
|
|
64
|
-
throw new Error(`Agent "${config.external_agent_id}" in ${configPath} has no provider configured`);
|
|
65
|
-
}
|
|
66
|
-
if (targetProvider.startsWith('remote/')) {
|
|
67
|
-
throw new Error(`Chained remotes not allowed: ${config.id} → ${targetProvider}`);
|
|
68
|
-
}
|
|
69
|
-
// Resolve working_directory relative to target config file's directory.
|
|
70
|
-
// path.resolve handles absolute paths transparently (absolute overrides base).
|
|
71
|
-
const resolvedDir = (0, path_1.resolve)((0, path_1.dirname)(configPath), targetAgent.working_directory ?? '.');
|
|
72
|
-
return {
|
|
73
|
-
agent: { ...targetAgent, working_directory: resolvedDir },
|
|
74
|
-
provider: targetProvider,
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
class RemoteProviderRuntime {
|
|
78
|
-
manager;
|
|
79
|
-
agentId;
|
|
80
|
-
constructor(remoteId, providerConfig, _providerFactory = bridge_js_1.createProvider) {
|
|
81
|
-
this.agentId = providerConfig.external_agent_id ?? remoteId;
|
|
82
|
-
this.manager = new remote_agent_manager_js_1.RemoteAgentManager();
|
|
83
|
-
const mcpConfig = toRemoteAgentConfig(remoteId, providerConfig);
|
|
84
|
-
this.manager.loadConfig(this.agentId, mcpConfig);
|
|
85
|
-
}
|
|
86
|
-
async query(message, options) {
|
|
87
|
-
const response = await this.manager.query(this.agentId, {
|
|
88
|
-
agentId: this.agentId,
|
|
89
|
-
query: message,
|
|
90
|
-
model: options?.model,
|
|
91
|
-
context: options?.context ?? options?.systemPrompt,
|
|
92
|
-
});
|
|
93
|
-
return response.content.map((c) => c.text).join('\n');
|
|
94
|
-
}
|
|
95
|
-
async execute(message, options) {
|
|
96
|
-
const response = await this.manager.execute(this.agentId, {
|
|
97
|
-
agentId: this.agentId,
|
|
98
|
-
task: message,
|
|
99
|
-
model: options?.model,
|
|
100
|
-
context: options?.context ?? options?.systemPrompt,
|
|
101
|
-
});
|
|
102
|
-
return response.content.map((c) => c.text).join('\n');
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
exports.RemoteProviderRuntime = RemoteProviderRuntime;
|
|
106
|
-
// ── Factory ─────────────────────────────────────────────────────────────────
|
|
107
|
-
function createRemoteProviderFactory(remoteConfigs, providerFactory = bridge_js_1.createProvider) {
|
|
108
|
-
return (id, _providerStr) => {
|
|
109
|
-
const config = remoteConfigs.get(id);
|
|
110
|
-
if (!config) {
|
|
111
|
-
throw new Error(`Remote provider "${id}" not found. Available: ${Array.from(remoteConfigs.keys()).join(', ') || '(none)'}`);
|
|
112
|
-
}
|
|
113
|
-
// file:// locations are handled at the CLI level (Crewx instance swap).
|
|
114
|
-
// RemoteProviderRuntime only supports http(s):// (MCP-HTTP).
|
|
115
|
-
if (config.location.startsWith('file://')) {
|
|
116
|
-
throw new Error(`Remote provider "${id}" uses file:// location which is not supported at the SDK level. ` +
|
|
117
|
-
'Use the CLI commands (crewx query / crewx execute) which handle file:// remotes automatically.');
|
|
118
|
-
}
|
|
119
|
-
return new RemoteProviderRuntime(id, config, providerFactory);
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
// ── Helpers ─────────────────────────────────────────────────────────────────
|
|
123
|
-
function toRemoteAgentConfig(remoteId, config) {
|
|
124
|
-
const location = config.location;
|
|
125
|
-
if (!location) {
|
|
126
|
-
throw new Error('Remote provider config requires a location');
|
|
127
|
-
}
|
|
128
|
-
if (!location.startsWith('http://') &&
|
|
129
|
-
!location.startsWith('https://')) {
|
|
130
|
-
throw new Error(`Unsupported remote location protocol for MCP-HTTP: ${location}`);
|
|
131
|
-
}
|
|
132
|
-
return {
|
|
133
|
-
type: 'mcp-http',
|
|
134
|
-
url: location,
|
|
135
|
-
apiKey: config.apiKey,
|
|
136
|
-
headers: config.headers,
|
|
137
|
-
timeoutMs: config.timeout?.query ?? 30000,
|
|
138
|
-
agentId: config.external_agent_id ?? remoteId,
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
//# sourceMappingURL=remote-provider.js.map
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Remote Transport Implementations
|
|
4
|
-
*
|
|
5
|
-
* MCP-HTTP JSON-RPC 2.0 transport for communicating with remote MCP servers.
|
|
6
|
-
* Migrated from sdk-bak and adapted to the new RemoteTransport interface.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.McpHttpTransport = void 0;
|
|
10
|
-
/**
|
|
11
|
-
* MCP-HTTP transport — sends JSON-RPC 2.0 requests over HTTP POST.
|
|
12
|
-
*
|
|
13
|
-
* Endpoint: `${baseUrl}/mcp`
|
|
14
|
-
*/
|
|
15
|
-
class McpHttpTransport {
|
|
16
|
-
endpoint;
|
|
17
|
-
headers;
|
|
18
|
-
timeoutMs;
|
|
19
|
-
constructor(options) {
|
|
20
|
-
const baseUrl = normalizeUrl(options.url);
|
|
21
|
-
this.endpoint = `${baseUrl}/mcp`;
|
|
22
|
-
this.headers = {
|
|
23
|
-
'Content-Type': 'application/json',
|
|
24
|
-
...(options.headers ?? {}),
|
|
25
|
-
};
|
|
26
|
-
if (options.apiKey) {
|
|
27
|
-
this.headers['Authorization'] = `Bearer ${options.apiKey}`;
|
|
28
|
-
}
|
|
29
|
-
this.timeoutMs = options.timeoutMs ?? 30000;
|
|
30
|
-
}
|
|
31
|
-
async send(request) {
|
|
32
|
-
const controller = new AbortController();
|
|
33
|
-
const timeout = setTimeout(() => controller.abort(), this.timeoutMs);
|
|
34
|
-
try {
|
|
35
|
-
const response = await fetch(this.endpoint, {
|
|
36
|
-
method: 'POST',
|
|
37
|
-
headers: this.headers,
|
|
38
|
-
body: JSON.stringify(request),
|
|
39
|
-
signal: controller.signal,
|
|
40
|
-
});
|
|
41
|
-
clearTimeout(timeout);
|
|
42
|
-
if (!response.ok) {
|
|
43
|
-
const text = await response.text();
|
|
44
|
-
throw new Error(`HTTP ${response.status}: ${response.statusText}${text ? ` - ${text}` : ''}`);
|
|
45
|
-
}
|
|
46
|
-
const contentType = response.headers.get('content-type');
|
|
47
|
-
if (contentType?.includes('application/json')) {
|
|
48
|
-
return (await response.json());
|
|
49
|
-
}
|
|
50
|
-
// Non-JSON response — wrap as error
|
|
51
|
-
const body = await response.text();
|
|
52
|
-
return {
|
|
53
|
-
jsonrpc: '2.0',
|
|
54
|
-
id: request.id,
|
|
55
|
-
error: { code: -32600, message: `Unexpected response content-type: ${contentType}`, data: body },
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
catch (error) {
|
|
59
|
-
clearTimeout(timeout);
|
|
60
|
-
if (error instanceof Error && error.name === 'AbortError') {
|
|
61
|
-
throw new Error(`MCP-HTTP request timeout after ${this.timeoutMs}ms to ${this.endpoint}`);
|
|
62
|
-
}
|
|
63
|
-
throw error;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
async close() {
|
|
67
|
-
// No persistent connection to close for HTTP transport.
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
exports.McpHttpTransport = McpHttpTransport;
|
|
71
|
-
// ── Helpers ─────────────────────────────────────────────────────────────────
|
|
72
|
-
/**
|
|
73
|
-
* Normalize a URL: remove trailing slashes and redundant /mcp suffix.
|
|
74
|
-
*/
|
|
75
|
-
function normalizeUrl(url) {
|
|
76
|
-
if (!url)
|
|
77
|
-
return url;
|
|
78
|
-
const trimmed = url.trim().replace(/\/+$/, '');
|
|
79
|
-
return trimmed.toLowerCase().endsWith('/mcp')
|
|
80
|
-
? trimmed.slice(0, -4)
|
|
81
|
-
: trimmed;
|
|
82
|
-
}
|
|
83
|
-
//# sourceMappingURL=remote-transport.js.map
|
package/dist/remote/types.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Remote Agent Module — Type Definitions
|
|
4
|
-
*
|
|
5
|
-
* Types for remote agent communication via MCP (Model Context Protocol).
|
|
6
|
-
* Migrated from sdk-bak/src/core/remote/types.ts and adapted to SDK conventions.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
//# sourceMappingURL=types.js.map
|
package/dist/server/auth.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* MCP Server authentication & Origin validation.
|
|
4
|
-
*
|
|
5
|
-
* - Origin header 검증 (DNS rebinding 방어, MCP 스펙 필수)
|
|
6
|
-
* - 커스텀 auth 콜백 래퍼
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.validateOrigin = validateOrigin;
|
|
10
|
-
exports.runAuthCallback = runAuthCallback;
|
|
11
|
-
/**
|
|
12
|
-
* Validate the Origin header is present (MCP spec requirement).
|
|
13
|
-
* Returns a 403 Response if validation fails, or null if ok.
|
|
14
|
-
*/
|
|
15
|
-
function validateOrigin(req) {
|
|
16
|
-
const origin = req.headers.get('Origin');
|
|
17
|
-
if (!origin) {
|
|
18
|
-
return new Response(JSON.stringify({ error: 'Forbidden: Origin header required' }), { status: 403, headers: { 'Content-Type': 'application/json' } });
|
|
19
|
-
}
|
|
20
|
-
return null;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Run the custom auth callback if provided.
|
|
24
|
-
* Returns a 401 Response if auth fails, or null if ok.
|
|
25
|
-
*/
|
|
26
|
-
async function runAuthCallback(req, auth) {
|
|
27
|
-
if (!auth)
|
|
28
|
-
return null;
|
|
29
|
-
const allowed = await auth(req);
|
|
30
|
-
if (!allowed) {
|
|
31
|
-
return new Response(JSON.stringify({ error: 'Unauthorized' }), { status: 401, headers: { 'Content-Type': 'application/json' } });
|
|
32
|
-
}
|
|
33
|
-
return null;
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=auth.js.map
|
package/dist/server/handler.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* crewx.handler() — Framework-independent MCP HTTP handler.
|
|
4
|
-
*
|
|
5
|
-
* Returns a Web Standard `(req: Request) => Promise<Response>` handler
|
|
6
|
-
* that can be mounted on Express, Next.js, Hono, Bun, etc.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.createHandler = createHandler;
|
|
10
|
-
const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
11
|
-
const webStandardStreamableHttp_js_1 = require("@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js");
|
|
12
|
-
const tool_adapter_1 = require("./tool-adapter");
|
|
13
|
-
const auth_1 = require("./auth");
|
|
14
|
-
/**
|
|
15
|
-
* Create a fresh McpServer with tools registered.
|
|
16
|
-
*/
|
|
17
|
-
function createMcpServer(crewx, allowedAgents) {
|
|
18
|
-
const mcpServer = new mcp_js_1.McpServer({
|
|
19
|
-
name: 'crewx-mcp-server',
|
|
20
|
-
version: '1.0.0',
|
|
21
|
-
}, {
|
|
22
|
-
capabilities: {
|
|
23
|
-
tools: {},
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
|
-
(0, tool_adapter_1.registerCrewxTools)(mcpServer, crewx, allowedAgents);
|
|
27
|
-
return mcpServer;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Create an MCP handler bound to the given Crewx instance.
|
|
31
|
-
*
|
|
32
|
-
* @param crewx - Crewx facade instance
|
|
33
|
-
* @param options - Handler configuration (agents list required)
|
|
34
|
-
* @returns Web Standard request handler
|
|
35
|
-
*/
|
|
36
|
-
function createHandler(crewx, options) {
|
|
37
|
-
if (!options.agents || options.agents.length === 0) {
|
|
38
|
-
throw new Error('crewx.handler() requires at least one agent in the agents option');
|
|
39
|
-
}
|
|
40
|
-
const allowedAgents = new Set(options.agents);
|
|
41
|
-
// Per-session transport + server map
|
|
42
|
-
const sessions = new Map();
|
|
43
|
-
return async (req) => {
|
|
44
|
-
// ── Security: Origin validation ──────────────────────────────────────
|
|
45
|
-
const originError = (0, auth_1.validateOrigin)(req);
|
|
46
|
-
if (originError)
|
|
47
|
-
return originError;
|
|
48
|
-
// ── Security: Custom auth callback ───────────────────────────────────
|
|
49
|
-
const authError = await (0, auth_1.runAuthCallback)(req, options.auth);
|
|
50
|
-
if (authError)
|
|
51
|
-
return authError;
|
|
52
|
-
// ── Route to transport ───────────────────────────────────────────────
|
|
53
|
-
const sessionId = req.headers.get('mcp-session-id');
|
|
54
|
-
if (sessionId && sessions.has(sessionId)) {
|
|
55
|
-
// Existing session — reuse transport
|
|
56
|
-
const session = sessions.get(sessionId);
|
|
57
|
-
return session.transport.handleRequest(req);
|
|
58
|
-
}
|
|
59
|
-
// New session: create McpServer + transport pair
|
|
60
|
-
const mcpServer = createMcpServer(crewx, allowedAgents);
|
|
61
|
-
const transport = new webStandardStreamableHttp_js_1.WebStandardStreamableHTTPServerTransport({
|
|
62
|
-
sessionIdGenerator: () => crypto.randomUUID(),
|
|
63
|
-
onsessioninitialized: (sid) => {
|
|
64
|
-
sessions.set(sid, { transport, server: mcpServer });
|
|
65
|
-
},
|
|
66
|
-
onsessionclosed: (sid) => {
|
|
67
|
-
sessions.delete(sid);
|
|
68
|
-
},
|
|
69
|
-
enableJsonResponse: true,
|
|
70
|
-
});
|
|
71
|
-
await mcpServer.connect(transport);
|
|
72
|
-
return transport.handleRequest(req);
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
//# sourceMappingURL=handler.js.map
|
package/dist/server/index.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @crewx/sdk server module — MCP HTTP handler for exposing agents.
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.createHandler = void 0;
|
|
7
|
-
var handler_1 = require("./handler");
|
|
8
|
-
Object.defineProperty(exports, "createHandler", { enumerable: true, get: function () { return handler_1.createHandler; } });
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* MCP tool adapter — 범용 MCP 도구 3개를 McpServer에 등록한다.
|
|
4
|
-
*
|
|
5
|
-
* 도구:
|
|
6
|
-
* crewx_queryAgent(agentId, query, context?, thread?)
|
|
7
|
-
* crewx_executeAgent(agentId, task, context?, thread?)
|
|
8
|
-
* crewx_listAgents()
|
|
9
|
-
*/
|
|
10
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.registerCrewxTools = registerCrewxTools;
|
|
12
|
-
const zod_1 = require("zod");
|
|
13
|
-
const querySchema = {
|
|
14
|
-
agentId: zod_1.z.string().describe('The agent ID to query'),
|
|
15
|
-
query: zod_1.z.string().describe('The query message to send'),
|
|
16
|
-
context: zod_1.z.string().optional().describe('Additional context'),
|
|
17
|
-
thread: zod_1.z.string().optional().describe('Thread ID for conversation continuity'),
|
|
18
|
-
};
|
|
19
|
-
const executeSchema = {
|
|
20
|
-
agentId: zod_1.z.string().describe('The agent ID to execute'),
|
|
21
|
-
task: zod_1.z.string().describe('The task description to execute'),
|
|
22
|
-
context: zod_1.z.string().optional().describe('Additional context'),
|
|
23
|
-
thread: zod_1.z.string().optional().describe('Thread ID for conversation continuity'),
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Register the 3 universal tools on the given McpServer.
|
|
27
|
-
*
|
|
28
|
-
* @param server - McpServer instance
|
|
29
|
-
* @param crewx - Crewx facade instance
|
|
30
|
-
* @param allowedAgents - Set of agent IDs exposed via handler
|
|
31
|
-
*/
|
|
32
|
-
function registerCrewxTools(server, crewx, allowedAgents) {
|
|
33
|
-
// ── crewx_listAgents (no schema — zero-arg tool) ────────────────────────
|
|
34
|
-
server.tool('crewx_listAgents', 'List available CrewX agents exposed by this server', async () => {
|
|
35
|
-
const agents = [];
|
|
36
|
-
for (const agentId of allowedAgents) {
|
|
37
|
-
const agent = crewx.agents.get(agentId);
|
|
38
|
-
if (agent) {
|
|
39
|
-
agents.push({
|
|
40
|
-
id: agent.id,
|
|
41
|
-
name: agent.name ?? agent.id,
|
|
42
|
-
description: agent.description ?? '',
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return {
|
|
47
|
-
content: [{ type: 'text', text: JSON.stringify(agents, null, 2) }],
|
|
48
|
-
};
|
|
49
|
-
});
|
|
50
|
-
// ── crewx_queryAgent ────────────────────────────────────────────────────
|
|
51
|
-
server.tool('crewx_queryAgent', 'Query a CrewX agent with a read-only question', querySchema, async ({ agentId, query, context, thread }) => {
|
|
52
|
-
if (!allowedAgents.has(agentId)) {
|
|
53
|
-
return {
|
|
54
|
-
content: [{ type: 'text', text: `Agent '${agentId}' is not exposed by this server` }],
|
|
55
|
-
isError: true,
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
const result = await crewx.query(agentId, query, {
|
|
59
|
-
context,
|
|
60
|
-
threadId: thread,
|
|
61
|
-
});
|
|
62
|
-
if (!result.ok) {
|
|
63
|
-
return {
|
|
64
|
-
content: [{ type: 'text', text: result.error?.message ?? 'Query failed' }],
|
|
65
|
-
isError: true,
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
return {
|
|
69
|
-
content: [{ type: 'text', text: result.data }],
|
|
70
|
-
};
|
|
71
|
-
});
|
|
72
|
-
// ── crewx_executeAgent ──────────────────────────────────────────────────
|
|
73
|
-
server.tool('crewx_executeAgent', 'Execute a task on a CrewX agent (may modify state)', executeSchema, async ({ agentId, task, context, thread }) => {
|
|
74
|
-
if (!allowedAgents.has(agentId)) {
|
|
75
|
-
return {
|
|
76
|
-
content: [{ type: 'text', text: `Agent '${agentId}' is not exposed by this server` }],
|
|
77
|
-
isError: true,
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
const result = await crewx.execute(agentId, task, {
|
|
81
|
-
context,
|
|
82
|
-
threadId: thread,
|
|
83
|
-
});
|
|
84
|
-
if (!result.ok) {
|
|
85
|
-
return {
|
|
86
|
-
content: [{ type: 'text', text: result.error?.message ?? 'Execute failed' }],
|
|
87
|
-
isError: true,
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
return {
|
|
91
|
-
content: [{ type: 'text', text: result.data }],
|
|
92
|
-
};
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
//# sourceMappingURL=tool-adapter.js.map
|
package/dist/template/engine.js
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* CrewX template engine — Handlebars-based rendering with P0 helpers.
|
|
4
|
-
*
|
|
5
|
-
* P0 helpers implemented here:
|
|
6
|
-
* - exec : shell command execution (5-stage security)
|
|
7
|
-
* - include : inline string content passthrough
|
|
8
|
-
* - fenced_code : Markdown fenced code block wrapper
|
|
9
|
-
* - eq, ne, and, or, not, json (condition helpers)
|
|
10
|
-
*/
|
|
11
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
12
|
-
if (k2 === undefined) k2 = k;
|
|
13
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
14
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
15
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
16
|
-
}
|
|
17
|
-
Object.defineProperty(o, k2, desc);
|
|
18
|
-
}) : (function(o, m, k, k2) {
|
|
19
|
-
if (k2 === undefined) k2 = k;
|
|
20
|
-
o[k2] = m[k];
|
|
21
|
-
}));
|
|
22
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
23
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
24
|
-
}) : function(o, v) {
|
|
25
|
-
o["default"] = v;
|
|
26
|
-
});
|
|
27
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
28
|
-
var ownKeys = function(o) {
|
|
29
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
30
|
-
var ar = [];
|
|
31
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
32
|
-
return ar;
|
|
33
|
-
};
|
|
34
|
-
return ownKeys(o);
|
|
35
|
-
};
|
|
36
|
-
return function (mod) {
|
|
37
|
-
if (mod && mod.__esModule) return mod;
|
|
38
|
-
var result = {};
|
|
39
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
40
|
-
__setModuleDefault(result, mod);
|
|
41
|
-
return result;
|
|
42
|
-
};
|
|
43
|
-
})();
|
|
44
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
-
exports.TemplateEngine = void 0;
|
|
46
|
-
const Handlebars = __importStar(require("handlebars"));
|
|
47
|
-
const exec_1 = require("./helpers/exec");
|
|
48
|
-
const include_1 = require("./helpers/include");
|
|
49
|
-
const fenced_code_1 = require("./helpers/fenced_code");
|
|
50
|
-
const p1p2_1 = require("./helpers/p1p2");
|
|
51
|
-
class TemplateEngine {
|
|
52
|
-
hbs;
|
|
53
|
-
execPolicy;
|
|
54
|
-
execEnabled;
|
|
55
|
-
constructor(options = {}) {
|
|
56
|
-
// Create an isolated Handlebars environment to avoid global state conflicts
|
|
57
|
-
this.hbs = Handlebars.create();
|
|
58
|
-
this.execPolicy = options.execPolicy ?? { allow: [], deny: [] };
|
|
59
|
-
this.execEnabled = options.execEnabled ?? true;
|
|
60
|
-
this.registerHelpers();
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Register all P0 helpers onto this engine's Handlebars instance.
|
|
64
|
-
*/
|
|
65
|
-
registerHelpers() {
|
|
66
|
-
const hbs = this.hbs;
|
|
67
|
-
const policy = this.execPolicy;
|
|
68
|
-
// ── exec: shell command execution ────────────────────────────────────────
|
|
69
|
-
const execEnabled = this.execEnabled;
|
|
70
|
-
hbs.registerHelper('exec', function (command) {
|
|
71
|
-
if (typeof command !== 'string')
|
|
72
|
-
return '';
|
|
73
|
-
if (!execEnabled)
|
|
74
|
-
return '(exec disabled)';
|
|
75
|
-
return new hbs.SafeString((0, exec_1.executeCommand)(command, policy));
|
|
76
|
-
});
|
|
77
|
-
// ── include: inline string passthrough ───────────────────────────────────
|
|
78
|
-
hbs.registerHelper('include', function (content) {
|
|
79
|
-
return new hbs.SafeString((0, include_1.includeHelper)(content));
|
|
80
|
-
});
|
|
81
|
-
// ── fenced_code: Markdown code block wrapper ──────────────────────────────
|
|
82
|
-
hbs.registerHelper('fenced_code', function (content, options) {
|
|
83
|
-
return new hbs.SafeString((0, fenced_code_1.fencedCodeHelper)(content, options));
|
|
84
|
-
});
|
|
85
|
-
// ── Condition helpers ─────────────────────────────────────────────────────
|
|
86
|
-
hbs.registerHelper('eq', function (a, b) {
|
|
87
|
-
return a === b;
|
|
88
|
-
});
|
|
89
|
-
hbs.registerHelper('ne', function (a, b) {
|
|
90
|
-
return a !== b;
|
|
91
|
-
});
|
|
92
|
-
hbs.registerHelper('and', function (a, b) {
|
|
93
|
-
return a && b;
|
|
94
|
-
});
|
|
95
|
-
hbs.registerHelper('or', function (a, b) {
|
|
96
|
-
return a || b;
|
|
97
|
-
});
|
|
98
|
-
hbs.registerHelper('not', function (a) {
|
|
99
|
-
return !a;
|
|
100
|
-
});
|
|
101
|
-
hbs.registerHelper('contains', function (array, value) {
|
|
102
|
-
return Array.isArray(array) && array.includes(value);
|
|
103
|
-
});
|
|
104
|
-
hbs.registerHelper('json', function (context) {
|
|
105
|
-
return JSON.stringify(context, null, 2);
|
|
106
|
-
});
|
|
107
|
-
// ── P1 helpers ────────────────────────────────────────────────────────────
|
|
108
|
-
hbs.registerHelper('truncate', function (text, maxLength) {
|
|
109
|
-
return (0, p1p2_1.truncateHelper)(text, maxLength);
|
|
110
|
-
});
|
|
111
|
-
hbs.registerHelper('length', function (value) {
|
|
112
|
-
return (0, p1p2_1.lengthHelper)(value);
|
|
113
|
-
});
|
|
114
|
-
hbs.registerHelper('escapeHandlebars', function (text) {
|
|
115
|
-
return new hbs.SafeString((0, p1p2_1.escapeHandlebarsHelper)(text));
|
|
116
|
-
});
|
|
117
|
-
// ── P2 helpers ────────────────────────────────────────────────────────────
|
|
118
|
-
hbs.registerHelper('formatFileSize', function (bytes) {
|
|
119
|
-
return (0, p1p2_1.formatFileSizeHelper)(bytes);
|
|
120
|
-
});
|
|
121
|
-
hbs.registerHelper('formatTimestamp', function (timestamp) {
|
|
122
|
-
return (0, p1p2_1.formatTimestampHelper)(timestamp);
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* Render a Handlebars template string with the given context.
|
|
127
|
-
* @param template - Handlebars template string
|
|
128
|
-
* @param context - Template context (documents, env, agent, etc.)
|
|
129
|
-
* @returns Rendered string
|
|
130
|
-
*/
|
|
131
|
-
async render(template, context = {}) {
|
|
132
|
-
const compiled = this.hbs.compile(template, { noEscape: true });
|
|
133
|
-
return compiled(context);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
exports.TemplateEngine = TemplateEngine;
|
|
137
|
-
//# sourceMappingURL=engine.js.map
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Browser stub for the exec helper.
|
|
4
|
-
*
|
|
5
|
-
* Replaces the Node.js exec helper in browser bundles (via package.json "browser" field).
|
|
6
|
-
* All functions are no-ops or return safe defaults — child_process is not available in browsers.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.getSanitizedEnv = getSanitizedEnv;
|
|
10
|
-
exports.validateCommand = validateCommand;
|
|
11
|
-
exports.isBuiltinAllowed = isBuiltinAllowed;
|
|
12
|
-
exports.validateAllowPattern = validateAllowPattern;
|
|
13
|
-
exports.isAllowed = isAllowed;
|
|
14
|
-
exports.setAuditVerbose = setAuditVerbose;
|
|
15
|
-
exports.logExecAudit = logExecAudit;
|
|
16
|
-
exports.executeCommand = executeCommand;
|
|
17
|
-
function getSanitizedEnv() {
|
|
18
|
-
return {};
|
|
19
|
-
}
|
|
20
|
-
function validateCommand(_command) {
|
|
21
|
-
// noop in browser
|
|
22
|
-
}
|
|
23
|
-
function isBuiltinAllowed(_command) {
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
function validateAllowPattern(_pattern) {
|
|
27
|
-
// noop in browser
|
|
28
|
-
}
|
|
29
|
-
function isAllowed(_command, _policy) {
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
function setAuditVerbose(_enabled) {
|
|
33
|
-
// noop in browser
|
|
34
|
-
}
|
|
35
|
-
function logExecAudit(_entry) {
|
|
36
|
-
// noop in browser
|
|
37
|
-
}
|
|
38
|
-
function executeCommand(_command, _policy) {
|
|
39
|
-
return '(exec disabled: browser environment)';
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=exec.browser.js.map
|