struere 0.9.9 → 0.9.10
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/bin/struere.js +18 -11
- package/dist/cli/index.js +18 -11
- package/dist/cli/utils/plugin.d.ts +1 -1
- package/dist/cli/utils/plugin.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/bin/struere.js
CHANGED
|
@@ -20616,7 +20616,7 @@ function scaffoldFixture(cwd, name, slug) {
|
|
|
20616
20616
|
}
|
|
20617
20617
|
|
|
20618
20618
|
// src/cli/utils/plugin.ts
|
|
20619
|
-
import { existsSync as existsSync4, mkdirSync as mkdirSync3, writeFileSync as writeFileSync3 } from "fs";
|
|
20619
|
+
import { existsSync as existsSync4, mkdirSync as mkdirSync3, readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "fs";
|
|
20620
20620
|
import { join as join4 } from "path";
|
|
20621
20621
|
var registered = false;
|
|
20622
20622
|
var VIRTUAL_MODULE_SOURCE = `
|
|
@@ -20731,6 +20731,7 @@ function defineTools(tools) {
|
|
|
20731
20731
|
parameters: tool.parameters,
|
|
20732
20732
|
handler: wrapHandler(tool.name, tool.handler),
|
|
20733
20733
|
_originalHandler: tool.handler,
|
|
20734
|
+
templateOnly: tool.templateOnly,
|
|
20734
20735
|
}
|
|
20735
20736
|
})
|
|
20736
20737
|
}
|
|
@@ -20790,6 +20791,7 @@ var TYPE_DECLARATIONS = `declare module 'struere' {
|
|
|
20790
20791
|
description: string
|
|
20791
20792
|
parameters: ToolParameters
|
|
20792
20793
|
handler: ToolHandler
|
|
20794
|
+
templateOnly?: boolean
|
|
20793
20795
|
}
|
|
20794
20796
|
|
|
20795
20797
|
export interface ToolReference {
|
|
@@ -20798,6 +20800,7 @@ var TYPE_DECLARATIONS = `declare module 'struere' {
|
|
|
20798
20800
|
parameters: ToolParameters
|
|
20799
20801
|
handler: ToolHandler
|
|
20800
20802
|
_originalHandler?: ToolHandler
|
|
20803
|
+
templateOnly?: boolean
|
|
20801
20804
|
}
|
|
20802
20805
|
|
|
20803
20806
|
export interface AgentConfig {
|
|
@@ -20919,10 +20922,14 @@ function generateTypeDeclarations(cwd) {
|
|
|
20919
20922
|
writeFileSync3(join4(struereDir, "index.d.ts"), TYPE_DECLARATIONS);
|
|
20920
20923
|
writeFileSync3(join4(struereDir, "index.js"), VIRTUAL_MODULE_SOURCE);
|
|
20921
20924
|
const shimDir = join4(cwd, "node_modules", "struere");
|
|
20922
|
-
|
|
20923
|
-
|
|
20924
|
-
|
|
20925
|
-
|
|
20925
|
+
const realPkg = join4(shimDir, "package.json");
|
|
20926
|
+
const isRealPackage = existsSync4(realPkg) && JSON.parse(readFileSync3(realPkg, "utf8")).version !== "0.0.0";
|
|
20927
|
+
if (!isRealPackage) {
|
|
20928
|
+
mkdirSync3(shimDir, { recursive: true });
|
|
20929
|
+
writeFileSync3(join4(shimDir, "index.js"), VIRTUAL_MODULE_SOURCE);
|
|
20930
|
+
writeFileSync3(join4(shimDir, "index.d.ts"), TYPE_DECLARATIONS);
|
|
20931
|
+
writeFileSync3(join4(shimDir, "package.json"), JSON.stringify({ name: "struere", version: "0.0.0", type: "module", main: "index.js", types: "index.d.ts" }));
|
|
20932
|
+
}
|
|
20926
20933
|
}
|
|
20927
20934
|
|
|
20928
20935
|
// src/cli/commands/docs.ts
|
|
@@ -20931,7 +20938,7 @@ import { existsSync as existsSync6, mkdirSync as mkdirSync4, writeFileSync as wr
|
|
|
20931
20938
|
|
|
20932
20939
|
// src/cli/utils/loader.ts
|
|
20933
20940
|
var import_yaml = __toESM(require_dist(), 1);
|
|
20934
|
-
import { existsSync as existsSync5, readdirSync, readFileSync as
|
|
20941
|
+
import { existsSync as existsSync5, readdirSync, readFileSync as readFileSync4 } from "fs";
|
|
20935
20942
|
import { join as join5, basename } from "path";
|
|
20936
20943
|
var pluginRegistered = false;
|
|
20937
20944
|
var importCounter = 0;
|
|
@@ -21016,7 +21023,7 @@ function loadEvalSuites(dir) {
|
|
|
21016
21023
|
const files = readdirSync(dir).filter((f) => f.endsWith(".eval.yaml") || f.endsWith(".eval.yml"));
|
|
21017
21024
|
for (const file of files) {
|
|
21018
21025
|
try {
|
|
21019
|
-
const content =
|
|
21026
|
+
const content = readFileSync4(join5(dir, file), "utf-8");
|
|
21020
21027
|
const parsed = import_yaml.default.parse(content);
|
|
21021
21028
|
suites.push(parsed);
|
|
21022
21029
|
} catch (err) {
|
|
@@ -21034,7 +21041,7 @@ function loadFixtures(dir) {
|
|
|
21034
21041
|
const files = readdirSync(dir).filter((f) => f.endsWith(".fixture.yaml") || f.endsWith(".fixture.yml"));
|
|
21035
21042
|
for (const file of files) {
|
|
21036
21043
|
try {
|
|
21037
|
-
const content =
|
|
21044
|
+
const content = readFileSync4(join5(dir, file), "utf-8");
|
|
21038
21045
|
const parsed = import_yaml.default.parse(content);
|
|
21039
21046
|
fixtures.push(parsed);
|
|
21040
21047
|
} catch (err) {
|
|
@@ -25075,7 +25082,7 @@ var evalCommand = new Command("eval").description("Eval suite management");
|
|
|
25075
25082
|
evalCommand.addCommand(runCommand);
|
|
25076
25083
|
|
|
25077
25084
|
// src/cli/commands/templates.ts
|
|
25078
|
-
import { readFileSync as
|
|
25085
|
+
import { readFileSync as readFileSync5 } from "fs";
|
|
25079
25086
|
|
|
25080
25087
|
// src/cli/utils/whatsapp.ts
|
|
25081
25088
|
function getToken3() {
|
|
@@ -25364,7 +25371,7 @@ templatesCommand.command("create <name>").description("Create a new message temp
|
|
|
25364
25371
|
let components;
|
|
25365
25372
|
if (opts.file) {
|
|
25366
25373
|
try {
|
|
25367
|
-
const fileContent =
|
|
25374
|
+
const fileContent = readFileSync5(opts.file, "utf-8");
|
|
25368
25375
|
const parsed = JSON.parse(fileContent);
|
|
25369
25376
|
components = Array.isArray(parsed) ? parsed : parsed.components ?? [parsed];
|
|
25370
25377
|
} catch (err) {
|
|
@@ -26000,7 +26007,7 @@ var compilePromptCommand = new Command("compile-prompt").description("Compile an
|
|
|
26000
26007
|
// package.json
|
|
26001
26008
|
var package_default = {
|
|
26002
26009
|
name: "struere",
|
|
26003
|
-
version: "0.9.
|
|
26010
|
+
version: "0.9.10",
|
|
26004
26011
|
description: "Build, test, and deploy AI agents",
|
|
26005
26012
|
keywords: [
|
|
26006
26013
|
"ai",
|
package/dist/cli/index.js
CHANGED
|
@@ -1213,7 +1213,7 @@ function scaffoldFixture(cwd, name, slug) {
|
|
|
1213
1213
|
}
|
|
1214
1214
|
|
|
1215
1215
|
// src/cli/utils/plugin.ts
|
|
1216
|
-
import { existsSync as existsSync4, mkdirSync as mkdirSync3, writeFileSync as writeFileSync3 } from "fs";
|
|
1216
|
+
import { existsSync as existsSync4, mkdirSync as mkdirSync3, readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "fs";
|
|
1217
1217
|
import { join as join4 } from "path";
|
|
1218
1218
|
var registered = false;
|
|
1219
1219
|
var VIRTUAL_MODULE_SOURCE = `
|
|
@@ -1328,6 +1328,7 @@ function defineTools(tools) {
|
|
|
1328
1328
|
parameters: tool.parameters,
|
|
1329
1329
|
handler: wrapHandler(tool.name, tool.handler),
|
|
1330
1330
|
_originalHandler: tool.handler,
|
|
1331
|
+
templateOnly: tool.templateOnly,
|
|
1331
1332
|
}
|
|
1332
1333
|
})
|
|
1333
1334
|
}
|
|
@@ -1387,6 +1388,7 @@ var TYPE_DECLARATIONS = `declare module 'struere' {
|
|
|
1387
1388
|
description: string
|
|
1388
1389
|
parameters: ToolParameters
|
|
1389
1390
|
handler: ToolHandler
|
|
1391
|
+
templateOnly?: boolean
|
|
1390
1392
|
}
|
|
1391
1393
|
|
|
1392
1394
|
export interface ToolReference {
|
|
@@ -1395,6 +1397,7 @@ var TYPE_DECLARATIONS = `declare module 'struere' {
|
|
|
1395
1397
|
parameters: ToolParameters
|
|
1396
1398
|
handler: ToolHandler
|
|
1397
1399
|
_originalHandler?: ToolHandler
|
|
1400
|
+
templateOnly?: boolean
|
|
1398
1401
|
}
|
|
1399
1402
|
|
|
1400
1403
|
export interface AgentConfig {
|
|
@@ -1516,10 +1519,14 @@ function generateTypeDeclarations(cwd) {
|
|
|
1516
1519
|
writeFileSync3(join4(struereDir, "index.d.ts"), TYPE_DECLARATIONS);
|
|
1517
1520
|
writeFileSync3(join4(struereDir, "index.js"), VIRTUAL_MODULE_SOURCE);
|
|
1518
1521
|
const shimDir = join4(cwd, "node_modules", "struere");
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1522
|
+
const realPkg = join4(shimDir, "package.json");
|
|
1523
|
+
const isRealPackage = existsSync4(realPkg) && JSON.parse(readFileSync3(realPkg, "utf8")).version !== "0.0.0";
|
|
1524
|
+
if (!isRealPackage) {
|
|
1525
|
+
mkdirSync3(shimDir, { recursive: true });
|
|
1526
|
+
writeFileSync3(join4(shimDir, "index.js"), VIRTUAL_MODULE_SOURCE);
|
|
1527
|
+
writeFileSync3(join4(shimDir, "index.d.ts"), TYPE_DECLARATIONS);
|
|
1528
|
+
writeFileSync3(join4(shimDir, "package.json"), JSON.stringify({ name: "struere", version: "0.0.0", type: "module", main: "index.js", types: "index.d.ts" }));
|
|
1529
|
+
}
|
|
1523
1530
|
}
|
|
1524
1531
|
|
|
1525
1532
|
// src/cli/commands/docs.ts
|
|
@@ -1530,7 +1537,7 @@ import { join as join6, dirname as dirname2 } from "path";
|
|
|
1530
1537
|
import { existsSync as existsSync6, mkdirSync as mkdirSync4, writeFileSync as writeFileSync4 } from "fs";
|
|
1531
1538
|
|
|
1532
1539
|
// src/cli/utils/loader.ts
|
|
1533
|
-
import { existsSync as existsSync5, readdirSync, readFileSync as
|
|
1540
|
+
import { existsSync as existsSync5, readdirSync, readFileSync as readFileSync4 } from "fs";
|
|
1534
1541
|
import { join as join5, basename } from "path";
|
|
1535
1542
|
import YAML from "yaml";
|
|
1536
1543
|
var pluginRegistered = false;
|
|
@@ -1616,7 +1623,7 @@ function loadEvalSuites(dir) {
|
|
|
1616
1623
|
const files = readdirSync(dir).filter((f) => f.endsWith(".eval.yaml") || f.endsWith(".eval.yml"));
|
|
1617
1624
|
for (const file of files) {
|
|
1618
1625
|
try {
|
|
1619
|
-
const content =
|
|
1626
|
+
const content = readFileSync4(join5(dir, file), "utf-8");
|
|
1620
1627
|
const parsed = YAML.parse(content);
|
|
1621
1628
|
suites.push(parsed);
|
|
1622
1629
|
} catch (err) {
|
|
@@ -1634,7 +1641,7 @@ function loadFixtures(dir) {
|
|
|
1634
1641
|
const files = readdirSync(dir).filter((f) => f.endsWith(".fixture.yaml") || f.endsWith(".fixture.yml"));
|
|
1635
1642
|
for (const file of files) {
|
|
1636
1643
|
try {
|
|
1637
|
-
const content =
|
|
1644
|
+
const content = readFileSync4(join5(dir, file), "utf-8");
|
|
1638
1645
|
const parsed = YAML.parse(content);
|
|
1639
1646
|
fixtures.push(parsed);
|
|
1640
1647
|
} catch (err) {
|
|
@@ -5719,7 +5726,7 @@ evalCommand.addCommand(runCommand);
|
|
|
5719
5726
|
// src/cli/commands/templates.ts
|
|
5720
5727
|
import { Command as Command15 } from "commander";
|
|
5721
5728
|
import chalk17 from "chalk";
|
|
5722
|
-
import { readFileSync as
|
|
5729
|
+
import { readFileSync as readFileSync5 } from "fs";
|
|
5723
5730
|
import { confirm as confirm6 } from "@inquirer/prompts";
|
|
5724
5731
|
|
|
5725
5732
|
// src/cli/utils/whatsapp.ts
|
|
@@ -6009,7 +6016,7 @@ templatesCommand.command("create <name>").description("Create a new message temp
|
|
|
6009
6016
|
let components;
|
|
6010
6017
|
if (opts.file) {
|
|
6011
6018
|
try {
|
|
6012
|
-
const fileContent =
|
|
6019
|
+
const fileContent = readFileSync5(opts.file, "utf-8");
|
|
6013
6020
|
const parsed = JSON.parse(fileContent);
|
|
6014
6021
|
components = Array.isArray(parsed) ? parsed : parsed.components ?? [parsed];
|
|
6015
6022
|
} catch (err) {
|
|
@@ -6653,7 +6660,7 @@ var compilePromptCommand = new Command17("compile-prompt").description("Compile
|
|
|
6653
6660
|
// package.json
|
|
6654
6661
|
var package_default = {
|
|
6655
6662
|
name: "struere",
|
|
6656
|
-
version: "0.9.
|
|
6663
|
+
version: "0.9.10",
|
|
6657
6664
|
description: "Build, test, and deploy AI agents",
|
|
6658
6665
|
keywords: [
|
|
6659
6666
|
"ai",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const VIRTUAL_MODULE_SOURCE = "\nfunction defineAgent(config) {\n if (!config.name) throw new Error('Agent name is required')\n if (!config.version) throw new Error('Agent version is required')\n if (!config.systemPrompt) throw new Error('System prompt is required')\n return {\n model: {\n provider: 'xai',\n name: 'grok-4-1-fast',\n temperature: 0.7,\n maxTokens: 4096,\n },\n ...config,\n }\n}\n\nfunction defineRole(config) {\n if (!config.name) throw new Error('Role name is required')\n if (!config.policies || config.policies.length === 0) throw new Error('Role must have at least one policy')\n for (const policy of config.policies) {\n if (!policy.resource) throw new Error('Policy resource is required')\n if (!policy.actions || policy.actions.length === 0) throw new Error('Policy must have at least one action')\n if (!policy.effect) throw new Error('Policy effect is required')\n }\n return {\n ...config,\n scopeRules: config.scopeRules || [],\n fieldMasks: config.fieldMasks || [],\n }\n}\n\nfunction validateObjectProperties(schema, path) {\n if (schema.type === 'object' && !schema.properties) {\n throw new Error('Schema field \"' + path + '\" has type \"object\" but is missing \"properties\". All object fields must declare their properties.')\n }\n if (schema.properties) {\n for (const [key, value] of Object.entries(schema.properties)) {\n validateObjectProperties(value, path ? path + '.' + key : key)\n }\n }\n if (schema.items) {\n validateObjectProperties(schema.items, path + '[]')\n }\n}\n\nfunction defineData(config) {\n if (!config.name) throw new Error('Data type name is required')\n if (!config.slug) throw new Error('Data type slug is required')\n if (!config.schema) throw new Error('Data type schema is required')\n if (config.schema.type !== 'object') throw new Error('Data type schema must be an object type')\n if (config.schema.properties) {\n for (const [key, value] of Object.entries(config.schema.properties)) {\n validateObjectProperties(value, key)\n }\n }\n if (config.boundToRole !== undefined && config.boundToRole === '') throw new Error('boundToRole cannot be an empty string')\n if (config.userIdField !== undefined && !config.boundToRole) throw new Error('userIdField requires boundToRole to be set')\n const userIdField = config.boundToRole && !config.userIdField ? 'userId' : config.userIdField\n return {\n ...config,\n searchFields: config.searchFields || [],\n userIdField,\n }\n}\n\nfunction defineTrigger(config) {\n const VALID_ACTIONS = ['created', 'updated', 'deleted']\n if (!config.name) throw new Error('Trigger name is required')\n if (!config.slug) throw new Error('Trigger slug is required')\n if (!config.on) throw new Error('Trigger \"on\" configuration is required')\n if (!config.on.entityType) throw new Error('Trigger entityType is required')\n if (!config.on.action || !VALID_ACTIONS.includes(config.on.action)) throw new Error('Trigger action must be one of: ' + VALID_ACTIONS.join(', '))\n if (!config.actions || config.actions.length === 0) throw new Error('Trigger must have at least one action')\n for (const action of config.actions) {\n if (!action.tool) throw new Error('Trigger action tool is required')\n if (!action.args || typeof action.args !== 'object') throw new Error('Trigger action args must be an object')\n }\n if (config.schedule) {\n if (config.schedule.delay !== undefined && config.schedule.at !== undefined) throw new Error('Trigger schedule cannot have both \"delay\" and \"at\"')\n if (config.schedule.delay !== undefined && typeof config.schedule.delay !== 'number') throw new Error('Trigger schedule.delay must be a number')\n if (config.schedule.at !== undefined && typeof config.schedule.at !== 'string') throw new Error('Trigger schedule.at must be a string')\n }\n if (config.retry) {\n if (config.retry.maxAttempts !== undefined && (typeof config.retry.maxAttempts !== 'number' || config.retry.maxAttempts < 1)) throw new Error('Trigger retry.maxAttempts must be a positive number')\n if (config.retry.backoffMs !== undefined && (typeof config.retry.backoffMs !== 'number' || config.retry.backoffMs < 0)) throw new Error('Trigger retry.backoffMs must be a non-negative number')\n }\n return config\n}\n\nfunction wrapHandler(name, handler) {\n return async (params, context) => {\n try {\n return await handler(params, context)\n } catch (error) {\n console.error('Tool \"' + name + '\" execution error:', error)\n throw error\n }\n }\n}\n\nfunction defineTools(tools) {\n return tools.map((tool) => {\n if (!tool.name) throw new Error('Tool name is required')\n if (!tool.description) throw new Error('Tool \"' + tool.name + '\" requires a description')\n if (!tool.parameters) throw new Error('Tool \"' + tool.name + '\" requires parameters definition')\n if (typeof tool.handler !== 'function') throw new Error('Tool \"' + tool.name + '\" requires a handler function')\n return {\n name: tool.name,\n description: tool.description,\n parameters: tool.parameters,\n handler: wrapHandler(tool.name, tool.handler),\n _originalHandler: tool.handler,\n }\n })\n}\n\nexport { defineAgent, defineRole, defineData, defineTrigger, defineTools }\n";
|
|
1
|
+
export declare const VIRTUAL_MODULE_SOURCE = "\nfunction defineAgent(config) {\n if (!config.name) throw new Error('Agent name is required')\n if (!config.version) throw new Error('Agent version is required')\n if (!config.systemPrompt) throw new Error('System prompt is required')\n return {\n model: {\n provider: 'xai',\n name: 'grok-4-1-fast',\n temperature: 0.7,\n maxTokens: 4096,\n },\n ...config,\n }\n}\n\nfunction defineRole(config) {\n if (!config.name) throw new Error('Role name is required')\n if (!config.policies || config.policies.length === 0) throw new Error('Role must have at least one policy')\n for (const policy of config.policies) {\n if (!policy.resource) throw new Error('Policy resource is required')\n if (!policy.actions || policy.actions.length === 0) throw new Error('Policy must have at least one action')\n if (!policy.effect) throw new Error('Policy effect is required')\n }\n return {\n ...config,\n scopeRules: config.scopeRules || [],\n fieldMasks: config.fieldMasks || [],\n }\n}\n\nfunction validateObjectProperties(schema, path) {\n if (schema.type === 'object' && !schema.properties) {\n throw new Error('Schema field \"' + path + '\" has type \"object\" but is missing \"properties\". All object fields must declare their properties.')\n }\n if (schema.properties) {\n for (const [key, value] of Object.entries(schema.properties)) {\n validateObjectProperties(value, path ? path + '.' + key : key)\n }\n }\n if (schema.items) {\n validateObjectProperties(schema.items, path + '[]')\n }\n}\n\nfunction defineData(config) {\n if (!config.name) throw new Error('Data type name is required')\n if (!config.slug) throw new Error('Data type slug is required')\n if (!config.schema) throw new Error('Data type schema is required')\n if (config.schema.type !== 'object') throw new Error('Data type schema must be an object type')\n if (config.schema.properties) {\n for (const [key, value] of Object.entries(config.schema.properties)) {\n validateObjectProperties(value, key)\n }\n }\n if (config.boundToRole !== undefined && config.boundToRole === '') throw new Error('boundToRole cannot be an empty string')\n if (config.userIdField !== undefined && !config.boundToRole) throw new Error('userIdField requires boundToRole to be set')\n const userIdField = config.boundToRole && !config.userIdField ? 'userId' : config.userIdField\n return {\n ...config,\n searchFields: config.searchFields || [],\n userIdField,\n }\n}\n\nfunction defineTrigger(config) {\n const VALID_ACTIONS = ['created', 'updated', 'deleted']\n if (!config.name) throw new Error('Trigger name is required')\n if (!config.slug) throw new Error('Trigger slug is required')\n if (!config.on) throw new Error('Trigger \"on\" configuration is required')\n if (!config.on.entityType) throw new Error('Trigger entityType is required')\n if (!config.on.action || !VALID_ACTIONS.includes(config.on.action)) throw new Error('Trigger action must be one of: ' + VALID_ACTIONS.join(', '))\n if (!config.actions || config.actions.length === 0) throw new Error('Trigger must have at least one action')\n for (const action of config.actions) {\n if (!action.tool) throw new Error('Trigger action tool is required')\n if (!action.args || typeof action.args !== 'object') throw new Error('Trigger action args must be an object')\n }\n if (config.schedule) {\n if (config.schedule.delay !== undefined && config.schedule.at !== undefined) throw new Error('Trigger schedule cannot have both \"delay\" and \"at\"')\n if (config.schedule.delay !== undefined && typeof config.schedule.delay !== 'number') throw new Error('Trigger schedule.delay must be a number')\n if (config.schedule.at !== undefined && typeof config.schedule.at !== 'string') throw new Error('Trigger schedule.at must be a string')\n }\n if (config.retry) {\n if (config.retry.maxAttempts !== undefined && (typeof config.retry.maxAttempts !== 'number' || config.retry.maxAttempts < 1)) throw new Error('Trigger retry.maxAttempts must be a positive number')\n if (config.retry.backoffMs !== undefined && (typeof config.retry.backoffMs !== 'number' || config.retry.backoffMs < 0)) throw new Error('Trigger retry.backoffMs must be a non-negative number')\n }\n return config\n}\n\nfunction wrapHandler(name, handler) {\n return async (params, context) => {\n try {\n return await handler(params, context)\n } catch (error) {\n console.error('Tool \"' + name + '\" execution error:', error)\n throw error\n }\n }\n}\n\nfunction defineTools(tools) {\n return tools.map((tool) => {\n if (!tool.name) throw new Error('Tool name is required')\n if (!tool.description) throw new Error('Tool \"' + tool.name + '\" requires a description')\n if (!tool.parameters) throw new Error('Tool \"' + tool.name + '\" requires parameters definition')\n if (typeof tool.handler !== 'function') throw new Error('Tool \"' + tool.name + '\" requires a handler function')\n return {\n name: tool.name,\n description: tool.description,\n parameters: tool.parameters,\n handler: wrapHandler(tool.name, tool.handler),\n _originalHandler: tool.handler,\n templateOnly: tool.templateOnly,\n }\n })\n}\n\nexport { defineAgent, defineRole, defineData, defineTrigger, defineTools }\n";
|
|
2
2
|
export declare function registerStruerePlugin(): void;
|
|
3
3
|
export declare function generateTypeDeclarations(cwd: string): void;
|
|
4
4
|
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/plugin.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/plugin.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,qBAAqB,uwKAsHjC,CAAA;AAED,wBAAgB,qBAAqB,IAAI,IAAI,CAkB5C;AAgKD,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAkB1D"}
|