@crewx/sdk 0.8.0-rc.78 → 0.8.0-rc.80

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 (82) hide show
  1. package/dist/plugin/plugin-provider.js +1 -1
  2. package/dist/provider/bridge.js +1 -0
  3. package/package.json +1 -1
  4. package/dist/esm/agent/resolver.js +0 -41
  5. package/dist/esm/boxing/box-storage.interface.js +0 -5
  6. package/dist/esm/boxing/box.service.js +0 -69
  7. package/dist/esm/boxing/box.types.js +0 -5
  8. package/dist/esm/boxing/context-builder.js +0 -76
  9. package/dist/esm/client/CrewxClient.js +0 -82
  10. package/dist/esm/client/index.js +0 -2
  11. package/dist/esm/config/loader.browser.js +0 -54
  12. package/dist/esm/config/loader.js +0 -77
  13. package/dist/esm/events/TypedEventEmitter.js +0 -61
  14. package/dist/esm/events/types.js +0 -8
  15. package/dist/esm/facade/Crewx.browser.js +0 -310
  16. package/dist/esm/facade/Crewx.js +0 -941
  17. package/dist/esm/hooks/define.js +0 -10
  18. package/dist/esm/hooks/dispatch.js +0 -76
  19. package/dist/esm/hooks/index.js +0 -6
  20. package/dist/esm/hooks/observer.js +0 -56
  21. package/dist/esm/hooks/plugin.js +0 -12
  22. package/dist/esm/hooks/types.js +0 -9
  23. package/dist/esm/index.browser.js +0 -15
  24. package/dist/esm/index.js +0 -60
  25. package/dist/esm/layout/loader.js +0 -268
  26. package/dist/esm/layout/props-validator.js +0 -297
  27. package/dist/esm/layout/renderer.js +0 -180
  28. package/dist/esm/layout/types.js +0 -31
  29. package/dist/esm/parallel/agent-runtime.js +0 -21
  30. package/dist/esm/parallel/helpers.js +0 -214
  31. package/dist/esm/parallel/index.js +0 -5
  32. package/dist/esm/parallel/parallel-runner.js +0 -221
  33. package/dist/esm/parallel/types.js +0 -5
  34. package/dist/esm/parsers/agent-call.util.js +0 -15
  35. package/dist/esm/parsers/claude.parser.js +0 -64
  36. package/dist/esm/parsers/codex.parser.js +0 -97
  37. package/dist/esm/parsers/copilot.parser.js +0 -63
  38. package/dist/esm/parsers/gemini.parser.js +0 -43
  39. package/dist/esm/parsers/opencode.parser.js +0 -73
  40. package/dist/esm/parsers/router.js +0 -53
  41. package/dist/esm/platform/BrowserFsAdapter.js +0 -80
  42. package/dist/esm/platform/IFsAdapter.js +0 -2
  43. package/dist/esm/platform/NodeFsAdapter.js +0 -34
  44. package/dist/esm/plugin/plugin-provider.js +0 -202
  45. package/dist/esm/plugin/types.js +0 -8
  46. package/dist/esm/plugin.js +0 -25
  47. package/dist/esm/provider/bridge.browser.js +0 -43
  48. package/dist/esm/provider/bridge.js +0 -373
  49. package/dist/esm/provider/parse-usage.js +0 -80
  50. package/dist/esm/provider/register-api.js +0 -21
  51. package/dist/esm/provider/vercel-runtime.js +0 -310
  52. package/dist/esm/remote/index.js +0 -10
  53. package/dist/esm/remote/remote-agent-manager.js +0 -194
  54. package/dist/esm/remote/remote-provider.js +0 -98
  55. package/dist/esm/remote/remote-transport.js +0 -79
  56. package/dist/esm/remote/types.js +0 -8
  57. package/dist/esm/server/auth.js +0 -31
  58. package/dist/esm/server/handler.js +0 -72
  59. package/dist/esm/server/index.js +0 -5
  60. package/dist/esm/server/tool-adapter.js +0 -92
  61. package/dist/esm/template/engine.js +0 -100
  62. package/dist/esm/template/helpers/exec.browser.js +0 -31
  63. package/dist/esm/template/helpers/exec.js +0 -220
  64. package/dist/esm/template/helpers/fenced_code.js +0 -17
  65. package/dist/esm/template/helpers/include.js +0 -20
  66. package/dist/esm/template/helpers/p1p2.js +0 -83
  67. package/dist/esm/template/loader/DocumentLoader.js +0 -124
  68. package/dist/esm/template/types.js +0 -5
  69. package/dist/esm/tools/delegate.js +0 -57
  70. package/dist/esm/tools/index.js +0 -5
  71. package/dist/esm/tools/node/builtin.js +0 -541
  72. package/dist/esm/tools/node/index.js +0 -54
  73. package/dist/esm/types/index.js +0 -27
  74. package/dist/esm/types/task-log.types.js +0 -5
  75. package/dist/esm/utils/env-defaults.js +0 -23
  76. package/dist/esm/utils/glob-match.js +0 -38
  77. package/dist/esm/utils/id.js +0 -46
  78. package/dist/esm/utils/workspace.js +0 -21
  79. package/dist/parsers/api.parser.d.ts +0 -10
  80. package/dist/parsers/api.parser.js +0 -26
  81. package/dist/provider/mastra-runtime.d.ts +0 -45
  82. package/dist/provider/mastra-runtime.js +0 -208
@@ -1,297 +0,0 @@
1
- /**
2
- * PropsValidator — React PropTypes style props validation.
3
- * Ported 1:1 from packages/sdk-bak/src/services/props-validator.service.ts.
4
- * Only the import path is changed.
5
- */
6
- import { PropsValidationError, } from './types';
7
- export class PropsValidator {
8
- defaultMode;
9
- constructor(options = {}) {
10
- this.defaultMode = options.defaultMode ?? 'lenient';
11
- }
12
- validate(props, schema, mode = this.defaultMode) {
13
- const errors = [];
14
- const resolvedProps = this.validateObject(props ?? {}, schema, mode, ['props'], errors);
15
- if (errors.length > 0 && mode === 'strict') {
16
- throw new PropsValidationError('Props validation failed in strict mode', errors);
17
- }
18
- return {
19
- valid: errors.length === 0,
20
- props: resolvedProps,
21
- errors,
22
- };
23
- }
24
- validateObject(provided, schema, mode, pathSegments, errors) {
25
- const sanitized = {};
26
- if (mode === 'strict') {
27
- for (const key of Object.keys(provided)) {
28
- if (!schema[key]) {
29
- errors.push({
30
- path: this.buildPath([...pathSegments, key]),
31
- message: `Unknown prop '${key}'`,
32
- value: provided[key],
33
- });
34
- }
35
- }
36
- }
37
- for (const [key, propSchema] of Object.entries(schema)) {
38
- const fullPath = [...pathSegments, key];
39
- const rawValue = provided[key];
40
- const result = this.resolveProp(rawValue, propSchema, fullPath, mode, errors);
41
- if (result.shouldAssign) {
42
- sanitized[key] = result.value;
43
- }
44
- }
45
- return sanitized;
46
- }
47
- resolveProp(value, schema, pathSegments, mode, errors) {
48
- const path = this.buildPath(pathSegments);
49
- if (this.isNil(value)) {
50
- if (schema.isRequired) {
51
- errors.push({
52
- path,
53
- message: `Required prop '${pathSegments[pathSegments.length - 1]}' is missing`,
54
- });
55
- }
56
- if (schema.defaultValue !== undefined) {
57
- return { shouldAssign: true, value: this.cloneValue(schema.defaultValue) };
58
- }
59
- if (schema.type === 'shape' && schema.shape) {
60
- const nestedDefaults = this.applyDefaults(schema.shape);
61
- if (Object.keys(nestedDefaults).length > 0) {
62
- return { shouldAssign: true, value: nestedDefaults };
63
- }
64
- }
65
- return { shouldAssign: false };
66
- }
67
- const typeResult = this.validateType(value, schema, pathSegments, mode, errors);
68
- if (!typeResult.valid) {
69
- if (schema.type === 'shape' &&
70
- typeResult.value &&
71
- this.isPlainObject(typeResult.value)) {
72
- return { shouldAssign: true, value: typeResult.value };
73
- }
74
- errors.push({ path, message: typeResult.error ?? 'Invalid value', value });
75
- if (schema.defaultValue !== undefined) {
76
- return { shouldAssign: true, value: this.cloneValue(schema.defaultValue) };
77
- }
78
- if (schema.type === 'shape' && schema.shape) {
79
- const nestedDefaults = this.applyDefaults(schema.shape);
80
- if (Object.keys(nestedDefaults).length > 0) {
81
- return { shouldAssign: true, value: nestedDefaults };
82
- }
83
- }
84
- return { shouldAssign: false };
85
- }
86
- return { shouldAssign: true, value: typeResult.value };
87
- }
88
- validateType(value, schema, pathSegments, mode, errors) {
89
- const { type } = schema;
90
- switch (type) {
91
- case 'string':
92
- return this.validateString(value, schema);
93
- case 'number':
94
- return this.validateNumber(value, schema);
95
- case 'bool':
96
- return this.validateBoolean(value);
97
- case 'array':
98
- return this.validateArray(value, schema);
99
- case 'arrayOf':
100
- return this.validateArrayOf(value, schema, pathSegments, mode, errors);
101
- case 'object':
102
- return this.validatePlainObject(value);
103
- case 'shape':
104
- return this.validateShape(value, schema, pathSegments, mode, errors);
105
- case 'oneOfType':
106
- return this.validateOneOfType(value, schema);
107
- case 'func':
108
- return this.validateFunction(value);
109
- case 'node':
110
- return { valid: true, value };
111
- default:
112
- return { valid: true, value };
113
- }
114
- }
115
- validateString(value, schema) {
116
- if (typeof value !== 'string') {
117
- return { valid: false, error: `Expected string, got ${this.describeType(value)}` };
118
- }
119
- if (schema.oneOf && !schema.oneOf.includes(value)) {
120
- return { valid: false, error: `Expected one of: ${schema.oneOf.join(', ')}` };
121
- }
122
- if (schema.minLength !== undefined && value.length < schema.minLength) {
123
- return { valid: false, error: `String length must be >= ${schema.minLength}` };
124
- }
125
- if (schema.maxLength !== undefined && value.length > schema.maxLength) {
126
- return { valid: false, error: `String length must be <= ${schema.maxLength}` };
127
- }
128
- if (schema.pattern) {
129
- const pattern = new RegExp(schema.pattern);
130
- if (!pattern.test(value)) {
131
- return { valid: false, error: `String does not match pattern ${schema.pattern}` };
132
- }
133
- }
134
- return { valid: true, value };
135
- }
136
- validateNumber(value, schema) {
137
- if (typeof value !== 'number' || Number.isNaN(value)) {
138
- return { valid: false, error: `Expected number, got ${this.describeType(value)}` };
139
- }
140
- if (schema.min !== undefined && value < schema.min) {
141
- return { valid: false, error: `Number must be >= ${schema.min}` };
142
- }
143
- if (schema.max !== undefined && value > schema.max) {
144
- return { valid: false, error: `Number must be <= ${schema.max}` };
145
- }
146
- if (schema.oneOf && !schema.oneOf.includes(value)) {
147
- return { valid: false, error: `Expected one of: ${schema.oneOf.join(', ')}` };
148
- }
149
- return { valid: true, value };
150
- }
151
- validateBoolean(value) {
152
- if (typeof value !== 'boolean') {
153
- return { valid: false, error: `Expected boolean, got ${this.describeType(value)}` };
154
- }
155
- return { valid: true, value };
156
- }
157
- validateArray(value, schema) {
158
- if (!Array.isArray(value)) {
159
- return { valid: false, error: `Expected array, got ${this.describeType(value)}` };
160
- }
161
- if (schema.minLength !== undefined && value.length < schema.minLength) {
162
- return { valid: false, error: `Array length must be >= ${schema.minLength}` };
163
- }
164
- if (schema.maxLength !== undefined && value.length > schema.maxLength) {
165
- return { valid: false, error: `Array length must be <= ${schema.maxLength}` };
166
- }
167
- return { valid: true, value: [...value] };
168
- }
169
- validateArrayOf(value, schema, pathSegments, mode, errors) {
170
- const base = this.validateArray(value, schema);
171
- if (!base.valid)
172
- return base;
173
- const itemValues = [];
174
- const itemType = schema.itemType;
175
- const itemOneOf = schema.itemOneOf;
176
- const beforeErrors = errors.length;
177
- base.value.forEach((item, index) => {
178
- const itemPath = [...pathSegments, String(index)];
179
- if (itemType) {
180
- const result = this.validateType(item, { type: itemType }, itemPath, mode, errors);
181
- if (!result.valid) {
182
- errors.push({
183
- path: this.buildPath(itemPath),
184
- message: result.error ?? 'Invalid array item',
185
- value: item,
186
- });
187
- }
188
- else {
189
- itemValues.push(result.value);
190
- }
191
- }
192
- else {
193
- itemValues.push(item);
194
- }
195
- if (itemOneOf && !itemOneOf.includes(item)) {
196
- errors.push({
197
- path: this.buildPath(itemPath),
198
- message: `Array item must be one of: ${itemOneOf.join(', ')}`,
199
- value: item,
200
- });
201
- }
202
- });
203
- return { valid: errors.length === beforeErrors, value: itemValues };
204
- }
205
- validatePlainObject(value) {
206
- if (!this.isPlainObject(value)) {
207
- return { valid: false, error: `Expected object, got ${this.describeType(value)}` };
208
- }
209
- return { valid: true, value: { ...value } };
210
- }
211
- validateFunction(value) {
212
- if (typeof value !== 'function') {
213
- return { valid: false, error: `Expected function, got ${this.describeType(value)}` };
214
- }
215
- return { valid: true, value };
216
- }
217
- validateShape(value, schema, pathSegments, mode, errors) {
218
- if (!this.isPlainObject(value)) {
219
- return { valid: false, error: `Expected object, got ${this.describeType(value)}` };
220
- }
221
- const beforeErrors = errors.length;
222
- const nested = this.validateObject(value, schema.shape ?? {}, mode, pathSegments, errors);
223
- return { valid: errors.length === beforeErrors, value: nested };
224
- }
225
- validateOneOfType(value, schema) {
226
- const types = schema.types ?? [];
227
- const matches = types.some(typeName => this.matchesType(value, typeName));
228
- if (!matches) {
229
- return {
230
- valid: false,
231
- error: `Value does not match any allowed type: ${types.join(', ')}`,
232
- };
233
- }
234
- return { valid: true, value };
235
- }
236
- matchesType(value, typeName) {
237
- switch (typeName) {
238
- case 'string': return typeof value === 'string';
239
- case 'number': return typeof value === 'number' && !Number.isNaN(value);
240
- case 'bool':
241
- case 'boolean': return typeof value === 'boolean';
242
- case 'array': return Array.isArray(value);
243
- case 'object': return this.isPlainObject(value);
244
- case 'func':
245
- case 'function': return typeof value === 'function';
246
- case 'shape': return this.isPlainObject(value);
247
- case 'node': return value === null || value === undefined || typeof value !== 'symbol';
248
- default: return true;
249
- }
250
- }
251
- applyDefaults(schema) {
252
- const defaults = {};
253
- for (const [key, propSchema] of Object.entries(schema)) {
254
- if (propSchema.defaultValue !== undefined) {
255
- defaults[key] = this.cloneValue(propSchema.defaultValue);
256
- continue;
257
- }
258
- if (propSchema.type === 'shape' && propSchema.shape) {
259
- const nestedDefaults = this.applyDefaults(propSchema.shape);
260
- if (Object.keys(nestedDefaults).length > 0) {
261
- defaults[key] = nestedDefaults;
262
- }
263
- }
264
- }
265
- return defaults;
266
- }
267
- cloneValue(value) {
268
- if (Array.isArray(value)) {
269
- return value.map(item => this.cloneValue(item));
270
- }
271
- if (this.isPlainObject(value)) {
272
- const cloned = {};
273
- for (const [key, nested] of Object.entries(value)) {
274
- cloned[key] = this.cloneValue(nested);
275
- }
276
- return cloned;
277
- }
278
- return value;
279
- }
280
- isPlainObject(value) {
281
- return typeof value === 'object' && value !== null && !Array.isArray(value);
282
- }
283
- isNil(value) {
284
- return value === null || value === undefined;
285
- }
286
- buildPath(segments) {
287
- return segments.join('.');
288
- }
289
- describeType(value) {
290
- if (Array.isArray(value))
291
- return 'array';
292
- if (value === null)
293
- return 'null';
294
- return typeof value;
295
- }
296
- }
297
- //# sourceMappingURL=props-validator.js.map
@@ -1,180 +0,0 @@
1
- /**
2
- * LayoutRenderer — Handlebars-based layout rendering.
3
- * Ported from packages/sdk-bak/src/services/layout-renderer.service.ts.
4
- * Excluded: formatConversation helper, registerTemplateHelpers (exec/shell-quote).
5
- * Exec is handled separately by TemplateEngine in the facade layer.
6
- */
7
- import Handlebars from 'handlebars';
8
- import { PropsValidator } from './props-validator';
9
- import { PropsValidationError as LayoutPropsValidationError } from './types';
10
- export { PropsValidationError } from './types';
11
- /**
12
- * LayoutRenderer — renders layout templates with Handlebars.
13
- */
14
- export class LayoutRenderer {
15
- handlebars;
16
- propsValidator;
17
- constructor(propsValidator) {
18
- this.handlebars = Handlebars.create();
19
- this.propsValidator = propsValidator ?? new PropsValidator();
20
- this.registerHelpers();
21
- }
22
- /**
23
- * Render a layout template with the given context.
24
- */
25
- render(layout, context, options = {}) {
26
- try {
27
- const preparedContext = this.prepareRenderContext(layout, context, options);
28
- const template = this.handlebars.compile(layout.template, { noEscape: true });
29
- return template(preparedContext);
30
- }
31
- catch (error) {
32
- if (error instanceof Error) {
33
- throw new Error(`Template rendering failed for layout '${layout.id}': ${error.message}`);
34
- }
35
- throw new Error(`Unknown error rendering layout '${layout.id}'`);
36
- }
37
- }
38
- /**
39
- * Validate props against schema.
40
- */
41
- validate(props, propsSchema, mode = 'lenient') {
42
- return this.executeValidation(props, propsSchema, mode);
43
- }
44
- /**
45
- * Merge default props and runtime props, then validate.
46
- */
47
- resolveProps(layout, props, mode = 'lenient') {
48
- const mergedProps = this.mergeProps(layout.defaultProps, props);
49
- if (!layout.propsSchema || Object.keys(layout.propsSchema).length === 0) {
50
- return { valid: true, props: mergedProps, errors: [] };
51
- }
52
- return this.executeValidation(mergedProps, layout.propsSchema, mode);
53
- }
54
- prepareRenderContext(layout, context, options) {
55
- const { validationMode = 'lenient', skipValidation = false } = options;
56
- const resolvedProps = skipValidation
57
- ? this.mergeProps(layout.defaultProps, context.props)
58
- : this.resolveProps(layout, context.props, validationMode).props;
59
- return {
60
- ...context,
61
- vars: this.sanitizeVars(context.vars),
62
- props: resolvedProps,
63
- };
64
- }
65
- /**
66
- * Register built-in Handlebars helpers (no exec, no formatConversation).
67
- */
68
- registerHelpers() {
69
- // Built-in block helpers
70
- if (Handlebars.helpers.each) {
71
- this.handlebars.registerHelper('each', Handlebars.helpers.each);
72
- }
73
- if (Handlebars.helpers.if) {
74
- this.handlebars.registerHelper('if', Handlebars.helpers.if);
75
- }
76
- if (Handlebars.helpers.unless) {
77
- this.handlebars.registerHelper('unless', Handlebars.helpers.unless);
78
- }
79
- if (Handlebars.helpers.with) {
80
- this.handlebars.registerHelper('with', Handlebars.helpers.with);
81
- }
82
- this.handlebars.registerHelper('eq', function (a, b) {
83
- return a === b;
84
- });
85
- this.handlebars.registerHelper('ne', function (a, b) {
86
- return a !== b;
87
- });
88
- this.handlebars.registerHelper('gt', function (a, b) {
89
- return a > b;
90
- });
91
- this.handlebars.registerHelper('lt', function (a, b) {
92
- return a < b;
93
- });
94
- this.handlebars.registerHelper('json', function (obj) {
95
- return new Handlebars.SafeString(JSON.stringify(obj));
96
- });
97
- this.handlebars.registerHelper('raw', function (options) {
98
- return typeof options?.fn === 'function' ? options.fn(this) : '';
99
- });
100
- this.handlebars.registerHelper('escapeHandlebars', function (text) {
101
- if (typeof text !== 'string')
102
- return '';
103
- return text.replace(/\{\{/g, '&#123;&#123;').replace(/\}\}/g, '&#125;&#125;');
104
- });
105
- this.handlebars.registerHelper('formatFileSize', function (bytes) {
106
- if (bytes === 0)
107
- return '0 B';
108
- const sizes = ['B', 'KB', 'MB', 'GB'];
109
- const i = Math.floor(Math.log(bytes) / Math.log(1024));
110
- return Math.round((bytes / Math.pow(1024, i)) * 100) / 100 + ' ' + sizes[i];
111
- });
112
- }
113
- executeValidation(props, propsSchema, mode) {
114
- try {
115
- return this.propsValidator.validate(props, propsSchema, mode);
116
- }
117
- catch (error) {
118
- if (error instanceof LayoutPropsValidationError && error.errors && error.errors.length > 0) {
119
- const firstError = error.errors[0];
120
- if (firstError) {
121
- throw new LayoutPropsValidationError(firstError.message, error.errors);
122
- }
123
- }
124
- throw error;
125
- }
126
- }
127
- mergeProps(defaultProps, overrides) {
128
- const base = this.cloneDeep(defaultProps ?? {});
129
- if (!overrides)
130
- return base;
131
- return this.deepMerge(base, overrides);
132
- }
133
- deepMerge(target, source) {
134
- for (const [key, value] of Object.entries(source)) {
135
- if (this.isPlainObject(value)) {
136
- const existing = target[key];
137
- target[key] = this.deepMerge(this.isPlainObject(existing) ? existing : {}, value);
138
- continue;
139
- }
140
- if (Array.isArray(value)) {
141
- target[key] = this.cloneDeep(value);
142
- continue;
143
- }
144
- target[key] = value;
145
- }
146
- return target;
147
- }
148
- cloneDeep(value) {
149
- if (Array.isArray(value)) {
150
- return value.map(item => this.cloneDeep(item));
151
- }
152
- if (this.isPlainObject(value)) {
153
- const cloned = {};
154
- for (const [key, nested] of Object.entries(value)) {
155
- cloned[key] = this.cloneDeep(nested);
156
- }
157
- return cloned;
158
- }
159
- return value;
160
- }
161
- isPlainObject(value) {
162
- return typeof value === 'object' && value !== null && !Array.isArray(value);
163
- }
164
- sanitizeVars(vars) {
165
- if (!vars)
166
- return {};
167
- const sanitizedVars = { ...vars };
168
- if (typeof vars.user_input === 'string') {
169
- sanitizedVars.user_input_raw = vars.user_input;
170
- const escapedHandlebars = vars.user_input
171
- .replace(/\{\{\{/g, '&#123;&#123;&#123;')
172
- .replace(/\}\}\}/g, '&#125;&#125;&#125;')
173
- .replace(/\{\{/g, '&#123;&#123;')
174
- .replace(/\}\}/g, '&#125;&#125;');
175
- sanitizedVars.user_input = this.handlebars.escapeExpression(escapedHandlebars);
176
- }
177
- return sanitizedVars;
178
- }
179
- }
180
- //# sourceMappingURL=renderer.js.map
@@ -1,31 +0,0 @@
1
- /**
2
- * Layout system type definitions for CrewX SDK.
3
- * Ported from packages/sdk-bak/src/types/layout.types.ts (1:1, import path only changed).
4
- */
5
- /**
6
- * Error thrown when layout loading fails.
7
- */
8
- export class LayoutLoadError extends Error {
9
- layoutId;
10
- cause;
11
- constructor(message, layoutId, cause) {
12
- super(message);
13
- this.layoutId = layoutId;
14
- this.cause = cause;
15
- this.name = 'LayoutLoadError';
16
- }
17
- }
18
- /**
19
- * Error thrown when props validation fails (strict mode).
20
- */
21
- export class PropsValidationError extends Error {
22
- errors;
23
- cause;
24
- constructor(message, errors = [], cause) {
25
- super(message);
26
- this.errors = errors;
27
- this.cause = cause;
28
- this.name = 'PropsValidationError';
29
- }
30
- }
31
- //# sourceMappingURL=types.js.map
@@ -1,21 +0,0 @@
1
- /**
2
- * Minimal AgentRuntime for the parallel execution module.
3
- * Provides query/execute methods to run agent operations.
4
- * Tests use vi.spyOn(AgentRuntime.prototype, 'query') to mock these methods.
5
- */
6
- /**
7
- * Runtime that executes agent query/execute operations.
8
- * Default implementation throws — callers must inject a working provider
9
- * or mock the prototype methods in tests.
10
- */
11
- export class AgentRuntime {
12
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
13
- async query(_request) {
14
- throw new Error('AgentRuntime.query is not implemented. Provide a subclass or mock AgentRuntime.prototype.query.');
15
- }
16
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
17
- async execute(_request) {
18
- throw new Error('AgentRuntime.execute is not implemented. Provide a subclass or mock AgentRuntime.prototype.execute.');
19
- }
20
- }
21
- //# sourceMappingURL=agent-runtime.js.map