@contractspec/example.agent-console 1.44.0
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/.turbo/turbo-build$colon$bundle.log +133 -0
- package/.turbo/turbo-build.log +134 -0
- package/CHANGELOG.md +212 -0
- package/LICENSE +21 -0
- package/README.md +86 -0
- package/dist/agent/agent.entity.d.ts +55 -0
- package/dist/agent/agent.entity.d.ts.map +1 -0
- package/dist/agent/agent.entity.js +136 -0
- package/dist/agent/agent.entity.js.map +1 -0
- package/dist/agent/agent.enum.d.ts +18 -0
- package/dist/agent/agent.enum.d.ts.map +1 -0
- package/dist/agent/agent.enum.js +34 -0
- package/dist/agent/agent.enum.js.map +1 -0
- package/dist/agent/agent.event.d.ts +128 -0
- package/dist/agent/agent.event.d.ts.map +1 -0
- package/dist/agent/agent.event.js +210 -0
- package/dist/agent/agent.event.js.map +1 -0
- package/dist/agent/agent.handler.d.ts +100 -0
- package/dist/agent/agent.handler.d.ts.map +1 -0
- package/dist/agent/agent.handler.js +84 -0
- package/dist/agent/agent.handler.js.map +1 -0
- package/dist/agent/agent.operation.d.ts +471 -0
- package/dist/agent/agent.operation.d.ts.map +1 -0
- package/dist/agent/agent.operation.js +486 -0
- package/dist/agent/agent.operation.js.map +1 -0
- package/dist/agent/agent.presentation.d.ts +19 -0
- package/dist/agent/agent.presentation.d.ts.map +1 -0
- package/dist/agent/agent.presentation.js +89 -0
- package/dist/agent/agent.presentation.js.map +1 -0
- package/dist/agent/agent.schema.d.ts +401 -0
- package/dist/agent/agent.schema.d.ts.map +1 -0
- package/dist/agent/agent.schema.js +406 -0
- package/dist/agent/agent.schema.js.map +1 -0
- package/dist/agent/index.d.ts +8 -0
- package/dist/agent/index.js +9 -0
- package/dist/agent.feature.d.ts +12 -0
- package/dist/agent.feature.d.ts.map +1 -0
- package/dist/agent.feature.js +303 -0
- package/dist/agent.feature.js.map +1 -0
- package/dist/docs/agent-console.docblock.d.ts +1 -0
- package/dist/docs/agent-console.docblock.js +113 -0
- package/dist/docs/agent-console.docblock.js.map +1 -0
- package/dist/docs/index.d.ts +1 -0
- package/dist/docs/index.js +1 -0
- package/dist/example.d.ts +40 -0
- package/dist/example.d.ts.map +1 -0
- package/dist/example.js +51 -0
- package/dist/example.js.map +1 -0
- package/dist/handlers/index.d.ts +4 -0
- package/dist/handlers/index.js +5 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +32 -0
- package/dist/presentations/index.d.ts +4 -0
- package/dist/presentations/index.js +5 -0
- package/dist/run/index.d.ts +8 -0
- package/dist/run/index.js +9 -0
- package/dist/run/run.entity.d.ts +82 -0
- package/dist/run/run.entity.d.ts.map +1 -0
- package/dist/run/run.entity.js +205 -0
- package/dist/run/run.entity.js.map +1 -0
- package/dist/run/run.enum.d.ts +22 -0
- package/dist/run/run.enum.d.ts.map +1 -0
- package/dist/run/run.enum.js +45 -0
- package/dist/run/run.enum.js.map +1 -0
- package/dist/run/run.event.d.ts +290 -0
- package/dist/run/run.event.d.ts.map +1 -0
- package/dist/run/run.event.js +434 -0
- package/dist/run/run.event.js.map +1 -0
- package/dist/run/run.handler.d.ts +203 -0
- package/dist/run/run.handler.d.ts.map +1 -0
- package/dist/run/run.handler.js +83 -0
- package/dist/run/run.handler.js.map +1 -0
- package/dist/run/run.operation.d.ts +720 -0
- package/dist/run/run.operation.d.ts.map +1 -0
- package/dist/run/run.operation.js +626 -0
- package/dist/run/run.operation.js.map +1 -0
- package/dist/run/run.presentation.d.ts +15 -0
- package/dist/run/run.presentation.d.ts.map +1 -0
- package/dist/run/run.presentation.js +65 -0
- package/dist/run/run.presentation.js.map +1 -0
- package/dist/run/run.schema.d.ts +416 -0
- package/dist/run/run.schema.d.ts.map +1 -0
- package/dist/run/run.schema.js +338 -0
- package/dist/run/run.schema.js.map +1 -0
- package/dist/shared/index.d.ts +4 -0
- package/dist/shared/index.js +5 -0
- package/dist/shared/mock-agents.d.ts +88 -0
- package/dist/shared/mock-agents.d.ts.map +1 -0
- package/dist/shared/mock-agents.js +94 -0
- package/dist/shared/mock-agents.js.map +1 -0
- package/dist/shared/mock-runs.d.ts +120 -0
- package/dist/shared/mock-runs.d.ts.map +1 -0
- package/dist/shared/mock-runs.js +118 -0
- package/dist/shared/mock-runs.js.map +1 -0
- package/dist/shared/mock-tools.d.ts +244 -0
- package/dist/shared/mock-tools.d.ts.map +1 -0
- package/dist/shared/mock-tools.js +181 -0
- package/dist/shared/mock-tools.js.map +1 -0
- package/dist/tool/index.d.ts +8 -0
- package/dist/tool/index.js +9 -0
- package/dist/tool/tool.entity.d.ts +42 -0
- package/dist/tool/tool.entity.d.ts.map +1 -0
- package/dist/tool/tool.entity.js +105 -0
- package/dist/tool/tool.entity.js.map +1 -0
- package/dist/tool/tool.enum.d.ts +18 -0
- package/dist/tool/tool.enum.d.ts.map +1 -0
- package/dist/tool/tool.enum.js +35 -0
- package/dist/tool/tool.enum.js.map +1 -0
- package/dist/tool/tool.event.d.ts +103 -0
- package/dist/tool/tool.event.d.ts.map +1 -0
- package/dist/tool/tool.event.js +159 -0
- package/dist/tool/tool.event.js.map +1 -0
- package/dist/tool/tool.handler.d.ts +315 -0
- package/dist/tool/tool.handler.d.ts.map +1 -0
- package/dist/tool/tool.handler.js +87 -0
- package/dist/tool/tool.handler.js.map +1 -0
- package/dist/tool/tool.operation.d.ts +411 -0
- package/dist/tool/tool.operation.d.ts.map +1 -0
- package/dist/tool/tool.operation.js +406 -0
- package/dist/tool/tool.operation.js.map +1 -0
- package/dist/tool/tool.presentation.d.ts +15 -0
- package/dist/tool/tool.presentation.d.ts.map +1 -0
- package/dist/tool/tool.presentation.js +65 -0
- package/dist/tool/tool.presentation.js.map +1 -0
- package/dist/tool/tool.schema.d.ts +218 -0
- package/dist/tool/tool.schema.d.ts.map +1 -0
- package/dist/tool/tool.schema.js +236 -0
- package/dist/tool/tool.schema.js.map +1 -0
- package/example.ts +1 -0
- package/package.json +123 -0
- package/src/agent/agent.entity.ts +137 -0
- package/src/agent/agent.enum.ts +31 -0
- package/src/agent/agent.event.ts +142 -0
- package/src/agent/agent.handler.ts +178 -0
- package/src/agent/agent.operation.ts +444 -0
- package/src/agent/agent.presentation.ts +81 -0
- package/src/agent/agent.schema.ts +214 -0
- package/src/agent/index.ts +67 -0
- package/src/agent.feature.ts +146 -0
- package/src/docs/agent-console.docblock.ts +97 -0
- package/src/docs/index.ts +1 -0
- package/src/example.ts +34 -0
- package/src/handlers/index.ts +27 -0
- package/src/index.ts +27 -0
- package/src/presentations/index.ts +26 -0
- package/src/run/index.ts +68 -0
- package/src/run/run.entity.ts +175 -0
- package/src/run/run.enum.ts +43 -0
- package/src/run/run.event.ts +264 -0
- package/src/run/run.handler.ts +138 -0
- package/src/run/run.operation.ts +524 -0
- package/src/run/run.presentation.ts +55 -0
- package/src/run/run.schema.ts +169 -0
- package/src/shared/index.ts +6 -0
- package/src/shared/mock-agents.ts +81 -0
- package/src/shared/mock-runs.ts +107 -0
- package/src/shared/mock-tools.ts +145 -0
- package/src/tool/index.ts +60 -0
- package/src/tool/tool.entity.ts +99 -0
- package/src/tool/tool.enum.ts +32 -0
- package/src/tool/tool.event.ts +119 -0
- package/src/tool/tool.handler.ts +154 -0
- package/src/tool/tool.operation.ts +366 -0
- package/src/tool/tool.presentation.ts +56 -0
- package/src/tool/tool.schema.ts +133 -0
- package/tsconfig.json +10 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/tsdown.config.js +7 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { defineEntity, defineEntityEnum, field, index } from "@contractspec/lib.schema";
|
|
2
|
+
|
|
3
|
+
//#region src/tool/tool.entity.ts
|
|
4
|
+
/**
|
|
5
|
+
* Tool category enum for entities.
|
|
6
|
+
*/
|
|
7
|
+
const ToolCategoryEntityEnum = defineEntityEnum({
|
|
8
|
+
name: "ToolCategory",
|
|
9
|
+
values: [
|
|
10
|
+
"RETRIEVAL",
|
|
11
|
+
"COMPUTATION",
|
|
12
|
+
"COMMUNICATION",
|
|
13
|
+
"INTEGRATION",
|
|
14
|
+
"UTILITY",
|
|
15
|
+
"CUSTOM"
|
|
16
|
+
],
|
|
17
|
+
description: "Category of tool"
|
|
18
|
+
});
|
|
19
|
+
/**
|
|
20
|
+
* Tool status enum for entities.
|
|
21
|
+
*/
|
|
22
|
+
const ToolStatusEntityEnum = defineEntityEnum({
|
|
23
|
+
name: "ToolStatus",
|
|
24
|
+
values: [
|
|
25
|
+
"DRAFT",
|
|
26
|
+
"ACTIVE",
|
|
27
|
+
"DEPRECATED",
|
|
28
|
+
"DISABLED"
|
|
29
|
+
],
|
|
30
|
+
description: "Status of tool"
|
|
31
|
+
});
|
|
32
|
+
/**
|
|
33
|
+
* Implementation type enum for entities.
|
|
34
|
+
*/
|
|
35
|
+
const ImplementationTypeEntityEnum = defineEntityEnum({
|
|
36
|
+
name: "ImplementationType",
|
|
37
|
+
values: [
|
|
38
|
+
"http",
|
|
39
|
+
"function",
|
|
40
|
+
"workflow"
|
|
41
|
+
],
|
|
42
|
+
description: "How the tool is implemented"
|
|
43
|
+
});
|
|
44
|
+
/**
|
|
45
|
+
* Tool entity - Represents an AI tool definition.
|
|
46
|
+
*/
|
|
47
|
+
const ToolEntity = defineEntity({
|
|
48
|
+
name: "Tool",
|
|
49
|
+
schema: "agent_console",
|
|
50
|
+
description: "An AI tool that can be used by agents.",
|
|
51
|
+
fields: {
|
|
52
|
+
id: field.id(),
|
|
53
|
+
organizationId: field.string({ description: "Organization that owns this tool" }),
|
|
54
|
+
name: field.string({ description: "Tool name" }),
|
|
55
|
+
slug: field.string({ description: "URL-safe identifier" }),
|
|
56
|
+
description: field.string({ description: "Tool description" }),
|
|
57
|
+
category: field.enum("ToolCategory", { default: "CUSTOM" }),
|
|
58
|
+
status: field.enum("ToolStatus", { default: "DRAFT" }),
|
|
59
|
+
parametersSchema: field.json({ description: "JSON Schema for tool parameters" }),
|
|
60
|
+
outputSchema: field.json({
|
|
61
|
+
isOptional: true,
|
|
62
|
+
description: "JSON Schema for tool output"
|
|
63
|
+
}),
|
|
64
|
+
implementationType: field.enum("ImplementationType"),
|
|
65
|
+
implementationConfig: field.json({ description: "Implementation configuration" }),
|
|
66
|
+
maxInvocationsPerMinute: field.int({
|
|
67
|
+
isOptional: true,
|
|
68
|
+
description: "Rate limit"
|
|
69
|
+
}),
|
|
70
|
+
timeoutMs: field.int({
|
|
71
|
+
default: 3e4,
|
|
72
|
+
description: "Execution timeout"
|
|
73
|
+
}),
|
|
74
|
+
version: field.string({
|
|
75
|
+
default: "1.0.0",
|
|
76
|
+
description: "Tool version"
|
|
77
|
+
}),
|
|
78
|
+
tags: field.string({
|
|
79
|
+
isArray: true,
|
|
80
|
+
isOptional: true,
|
|
81
|
+
description: "Tags for categorization"
|
|
82
|
+
}),
|
|
83
|
+
createdAt: field.createdAt(),
|
|
84
|
+
updatedAt: field.updatedAt(),
|
|
85
|
+
createdById: field.string({
|
|
86
|
+
isOptional: true,
|
|
87
|
+
description: "User who created this tool"
|
|
88
|
+
}),
|
|
89
|
+
agents: field.hasMany("Agent", { description: "Agents using this tool" })
|
|
90
|
+
},
|
|
91
|
+
indexes: [
|
|
92
|
+
index.unique(["organizationId", "slug"]),
|
|
93
|
+
index.on(["organizationId", "category"]),
|
|
94
|
+
index.on(["organizationId", "status"])
|
|
95
|
+
],
|
|
96
|
+
enums: [
|
|
97
|
+
ToolCategoryEntityEnum,
|
|
98
|
+
ToolStatusEntityEnum,
|
|
99
|
+
ImplementationTypeEntityEnum
|
|
100
|
+
]
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
//#endregion
|
|
104
|
+
export { ImplementationTypeEntityEnum, ToolCategoryEntityEnum, ToolEntity, ToolStatusEntityEnum };
|
|
105
|
+
//# sourceMappingURL=tool.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool.entity.js","names":[],"sources":["../../src/tool/tool.entity.ts"],"sourcesContent":["import {\n defineEntity,\n defineEntityEnum,\n field,\n index,\n} from '@contractspec/lib.schema';\n\n/**\n * Tool category enum for entities.\n */\nexport const ToolCategoryEntityEnum = defineEntityEnum({\n name: 'ToolCategory',\n values: [\n 'RETRIEVAL',\n 'COMPUTATION',\n 'COMMUNICATION',\n 'INTEGRATION',\n 'UTILITY',\n 'CUSTOM',\n ],\n description: 'Category of tool',\n});\n\n/**\n * Tool status enum for entities.\n */\nexport const ToolStatusEntityEnum = defineEntityEnum({\n name: 'ToolStatus',\n values: ['DRAFT', 'ACTIVE', 'DEPRECATED', 'DISABLED'],\n description: 'Status of tool',\n});\n\n/**\n * Implementation type enum for entities.\n */\nexport const ImplementationTypeEntityEnum = defineEntityEnum({\n name: 'ImplementationType',\n values: ['http', 'function', 'workflow'],\n description: 'How the tool is implemented',\n});\n\n/**\n * Tool entity - Represents an AI tool definition.\n */\nexport const ToolEntity = defineEntity({\n name: 'Tool',\n schema: 'agent_console',\n description: 'An AI tool that can be used by agents.',\n fields: {\n id: field.id(),\n organizationId: field.string({\n description: 'Organization that owns this tool',\n }),\n name: field.string({ description: 'Tool name' }),\n slug: field.string({ description: 'URL-safe identifier' }),\n description: field.string({ description: 'Tool description' }),\n category: field.enum('ToolCategory', { default: 'CUSTOM' }),\n status: field.enum('ToolStatus', { default: 'DRAFT' }),\n parametersSchema: field.json({\n description: 'JSON Schema for tool parameters',\n }),\n outputSchema: field.json({\n isOptional: true,\n description: 'JSON Schema for tool output',\n }),\n implementationType: field.enum('ImplementationType'),\n implementationConfig: field.json({\n description: 'Implementation configuration',\n }),\n maxInvocationsPerMinute: field.int({\n isOptional: true,\n description: 'Rate limit',\n }),\n timeoutMs: field.int({ default: 30000, description: 'Execution timeout' }),\n version: field.string({ default: '1.0.0', description: 'Tool version' }),\n tags: field.string({\n isArray: true,\n isOptional: true,\n description: 'Tags for categorization',\n }),\n createdAt: field.createdAt(),\n updatedAt: field.updatedAt(),\n createdById: field.string({\n isOptional: true,\n description: 'User who created this tool',\n }),\n agents: field.hasMany('Agent', { description: 'Agents using this tool' }),\n },\n indexes: [\n index.unique(['organizationId', 'slug']),\n index.on(['organizationId', 'category']),\n index.on(['organizationId', 'status']),\n ],\n enums: [\n ToolCategoryEntityEnum,\n ToolStatusEntityEnum,\n ImplementationTypeEntityEnum,\n ],\n});\n"],"mappings":";;;;;;AAUA,MAAa,yBAAyB,iBAAiB;CACrD,MAAM;CACN,QAAQ;EACN;EACA;EACA;EACA;EACA;EACA;EACD;CACD,aAAa;CACd,CAAC;;;;AAKF,MAAa,uBAAuB,iBAAiB;CACnD,MAAM;CACN,QAAQ;EAAC;EAAS;EAAU;EAAc;EAAW;CACrD,aAAa;CACd,CAAC;;;;AAKF,MAAa,+BAA+B,iBAAiB;CAC3D,MAAM;CACN,QAAQ;EAAC;EAAQ;EAAY;EAAW;CACxC,aAAa;CACd,CAAC;;;;AAKF,MAAa,aAAa,aAAa;CACrC,MAAM;CACN,QAAQ;CACR,aAAa;CACb,QAAQ;EACN,IAAI,MAAM,IAAI;EACd,gBAAgB,MAAM,OAAO,EAC3B,aAAa,oCACd,CAAC;EACF,MAAM,MAAM,OAAO,EAAE,aAAa,aAAa,CAAC;EAChD,MAAM,MAAM,OAAO,EAAE,aAAa,uBAAuB,CAAC;EAC1D,aAAa,MAAM,OAAO,EAAE,aAAa,oBAAoB,CAAC;EAC9D,UAAU,MAAM,KAAK,gBAAgB,EAAE,SAAS,UAAU,CAAC;EAC3D,QAAQ,MAAM,KAAK,cAAc,EAAE,SAAS,SAAS,CAAC;EACtD,kBAAkB,MAAM,KAAK,EAC3B,aAAa,mCACd,CAAC;EACF,cAAc,MAAM,KAAK;GACvB,YAAY;GACZ,aAAa;GACd,CAAC;EACF,oBAAoB,MAAM,KAAK,qBAAqB;EACpD,sBAAsB,MAAM,KAAK,EAC/B,aAAa,gCACd,CAAC;EACF,yBAAyB,MAAM,IAAI;GACjC,YAAY;GACZ,aAAa;GACd,CAAC;EACF,WAAW,MAAM,IAAI;GAAE,SAAS;GAAO,aAAa;GAAqB,CAAC;EAC1E,SAAS,MAAM,OAAO;GAAE,SAAS;GAAS,aAAa;GAAgB,CAAC;EACxE,MAAM,MAAM,OAAO;GACjB,SAAS;GACT,YAAY;GACZ,aAAa;GACd,CAAC;EACF,WAAW,MAAM,WAAW;EAC5B,WAAW,MAAM,WAAW;EAC5B,aAAa,MAAM,OAAO;GACxB,YAAY;GACZ,aAAa;GACd,CAAC;EACF,QAAQ,MAAM,QAAQ,SAAS,EAAE,aAAa,0BAA0B,CAAC;EAC1E;CACD,SAAS;EACP,MAAM,OAAO,CAAC,kBAAkB,OAAO,CAAC;EACxC,MAAM,GAAG,CAAC,kBAAkB,WAAW,CAAC;EACxC,MAAM,GAAG,CAAC,kBAAkB,SAAS,CAAC;EACvC;CACD,OAAO;EACL;EACA;EACA;EACD;CACF,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as _contractspec_lib_schema539 from "@contractspec/lib.schema";
|
|
2
|
+
|
|
3
|
+
//#region src/tool/tool.enum.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Tool category enum.
|
|
6
|
+
*/
|
|
7
|
+
declare const ToolCategoryEnum: _contractspec_lib_schema539.EnumType<[string, string, string, string, string, string]>;
|
|
8
|
+
/**
|
|
9
|
+
* Tool status enum.
|
|
10
|
+
*/
|
|
11
|
+
declare const ToolStatusEnum: _contractspec_lib_schema539.EnumType<[string, string, string, string]>;
|
|
12
|
+
/**
|
|
13
|
+
* Implementation type enum.
|
|
14
|
+
*/
|
|
15
|
+
declare const ImplementationTypeEnum: _contractspec_lib_schema539.EnumType<[string, string, string]>;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { ImplementationTypeEnum, ToolCategoryEnum, ToolStatusEnum };
|
|
18
|
+
//# sourceMappingURL=tool.enum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool.enum.d.ts","names":[],"sources":["../../src/tool/tool.enum.ts"],"sourcesContent":[],"mappings":";;;;;;AAKa,cAAA,gBAOX,EAAA,2BAAA,CAP2B,QAAA,CAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,CAAA;AAY7B;AAUA;;cAVa,gBAKX,2BAAA,CALyB;;;;cAUd,wBAIX,2BAAA,CAJiC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { defineEnum } from "@contractspec/lib.schema";
|
|
2
|
+
|
|
3
|
+
//#region src/tool/tool.enum.ts
|
|
4
|
+
/**
|
|
5
|
+
* Tool category enum.
|
|
6
|
+
*/
|
|
7
|
+
const ToolCategoryEnum = defineEnum("ToolCategory", [
|
|
8
|
+
"RETRIEVAL",
|
|
9
|
+
"COMPUTATION",
|
|
10
|
+
"COMMUNICATION",
|
|
11
|
+
"INTEGRATION",
|
|
12
|
+
"UTILITY",
|
|
13
|
+
"CUSTOM"
|
|
14
|
+
]);
|
|
15
|
+
/**
|
|
16
|
+
* Tool status enum.
|
|
17
|
+
*/
|
|
18
|
+
const ToolStatusEnum = defineEnum("ToolStatus", [
|
|
19
|
+
"DRAFT",
|
|
20
|
+
"ACTIVE",
|
|
21
|
+
"DEPRECATED",
|
|
22
|
+
"DISABLED"
|
|
23
|
+
]);
|
|
24
|
+
/**
|
|
25
|
+
* Implementation type enum.
|
|
26
|
+
*/
|
|
27
|
+
const ImplementationTypeEnum = defineEnum("ImplementationType", [
|
|
28
|
+
"http",
|
|
29
|
+
"function",
|
|
30
|
+
"workflow"
|
|
31
|
+
]);
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
export { ImplementationTypeEnum, ToolCategoryEnum, ToolStatusEnum };
|
|
35
|
+
//# sourceMappingURL=tool.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool.enum.js","names":[],"sources":["../../src/tool/tool.enum.ts"],"sourcesContent":["import { defineEnum } from '@contractspec/lib.schema';\n\n/**\n * Tool category enum.\n */\nexport const ToolCategoryEnum = defineEnum('ToolCategory', [\n 'RETRIEVAL',\n 'COMPUTATION',\n 'COMMUNICATION',\n 'INTEGRATION',\n 'UTILITY',\n 'CUSTOM',\n]);\n\n/**\n * Tool status enum.\n */\nexport const ToolStatusEnum = defineEnum('ToolStatus', [\n 'DRAFT',\n 'ACTIVE',\n 'DEPRECATED',\n 'DISABLED',\n]);\n\n/**\n * Implementation type enum.\n */\nexport const ImplementationTypeEnum = defineEnum('ImplementationType', [\n 'http',\n 'function',\n 'workflow',\n]);\n"],"mappings":";;;;;;AAKA,MAAa,mBAAmB,WAAW,gBAAgB;CACzD;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;;;;AAKF,MAAa,iBAAiB,WAAW,cAAc;CACrD;CACA;CACA;CACA;CACD,CAAC;;;;AAKF,MAAa,yBAAyB,WAAW,sBAAsB;CACrE;CACA;CACA;CACD,CAAC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import * as _contractspec_lib_schema542 from "@contractspec/lib.schema";
|
|
2
|
+
import * as _contractspec_lib_contracts17 from "@contractspec/lib.contracts";
|
|
3
|
+
|
|
4
|
+
//#region src/tool/tool.event.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* ToolCreatedEvent - A new tool was created.
|
|
7
|
+
*/
|
|
8
|
+
declare const ToolCreatedEvent: _contractspec_lib_contracts17.EventSpec<_contractspec_lib_schema542.SchemaModel<{
|
|
9
|
+
id: {
|
|
10
|
+
type: _contractspec_lib_schema542.FieldType<string, string>;
|
|
11
|
+
isOptional: false;
|
|
12
|
+
};
|
|
13
|
+
organizationId: {
|
|
14
|
+
type: _contractspec_lib_schema542.FieldType<string, string>;
|
|
15
|
+
isOptional: false;
|
|
16
|
+
};
|
|
17
|
+
name: {
|
|
18
|
+
type: _contractspec_lib_schema542.FieldType<string, string>;
|
|
19
|
+
isOptional: false;
|
|
20
|
+
};
|
|
21
|
+
slug: {
|
|
22
|
+
type: _contractspec_lib_schema542.FieldType<string, string>;
|
|
23
|
+
isOptional: false;
|
|
24
|
+
};
|
|
25
|
+
category: {
|
|
26
|
+
type: _contractspec_lib_schema542.FieldType<string, string>;
|
|
27
|
+
isOptional: false;
|
|
28
|
+
};
|
|
29
|
+
implementationType: {
|
|
30
|
+
type: _contractspec_lib_schema542.FieldType<string, string>;
|
|
31
|
+
isOptional: false;
|
|
32
|
+
};
|
|
33
|
+
createdById: {
|
|
34
|
+
type: _contractspec_lib_schema542.FieldType<string, string>;
|
|
35
|
+
isOptional: true;
|
|
36
|
+
};
|
|
37
|
+
createdAt: {
|
|
38
|
+
type: _contractspec_lib_schema542.FieldType<Date, string>;
|
|
39
|
+
isOptional: false;
|
|
40
|
+
};
|
|
41
|
+
}>>;
|
|
42
|
+
/**
|
|
43
|
+
* ToolUpdatedEvent - A tool was updated.
|
|
44
|
+
*/
|
|
45
|
+
declare const ToolUpdatedEvent: _contractspec_lib_contracts17.EventSpec<_contractspec_lib_schema542.SchemaModel<{
|
|
46
|
+
id: {
|
|
47
|
+
type: _contractspec_lib_schema542.FieldType<string, string>;
|
|
48
|
+
isOptional: false;
|
|
49
|
+
};
|
|
50
|
+
organizationId: {
|
|
51
|
+
type: _contractspec_lib_schema542.FieldType<string, string>;
|
|
52
|
+
isOptional: false;
|
|
53
|
+
};
|
|
54
|
+
name: {
|
|
55
|
+
type: _contractspec_lib_schema542.FieldType<string, string>;
|
|
56
|
+
isOptional: false;
|
|
57
|
+
};
|
|
58
|
+
status: {
|
|
59
|
+
type: _contractspec_lib_schema542.FieldType<string, string>;
|
|
60
|
+
isOptional: false;
|
|
61
|
+
};
|
|
62
|
+
updatedFields: {
|
|
63
|
+
type: _contractspec_lib_schema542.FieldType<string, string>;
|
|
64
|
+
isArray: true;
|
|
65
|
+
isOptional: false;
|
|
66
|
+
};
|
|
67
|
+
updatedAt: {
|
|
68
|
+
type: _contractspec_lib_schema542.FieldType<Date, string>;
|
|
69
|
+
isOptional: false;
|
|
70
|
+
};
|
|
71
|
+
}>>;
|
|
72
|
+
/**
|
|
73
|
+
* ToolStatusChangedEvent - A tool's status was changed.
|
|
74
|
+
*/
|
|
75
|
+
declare const ToolStatusChangedEvent: _contractspec_lib_contracts17.EventSpec<_contractspec_lib_schema542.SchemaModel<{
|
|
76
|
+
id: {
|
|
77
|
+
type: _contractspec_lib_schema542.FieldType<string, string>;
|
|
78
|
+
isOptional: false;
|
|
79
|
+
};
|
|
80
|
+
organizationId: {
|
|
81
|
+
type: _contractspec_lib_schema542.FieldType<string, string>;
|
|
82
|
+
isOptional: false;
|
|
83
|
+
};
|
|
84
|
+
name: {
|
|
85
|
+
type: _contractspec_lib_schema542.FieldType<string, string>;
|
|
86
|
+
isOptional: false;
|
|
87
|
+
};
|
|
88
|
+
previousStatus: {
|
|
89
|
+
type: _contractspec_lib_schema542.FieldType<string, string>;
|
|
90
|
+
isOptional: false;
|
|
91
|
+
};
|
|
92
|
+
newStatus: {
|
|
93
|
+
type: _contractspec_lib_schema542.FieldType<string, string>;
|
|
94
|
+
isOptional: false;
|
|
95
|
+
};
|
|
96
|
+
changedAt: {
|
|
97
|
+
type: _contractspec_lib_schema542.FieldType<Date, string>;
|
|
98
|
+
isOptional: false;
|
|
99
|
+
};
|
|
100
|
+
}>>;
|
|
101
|
+
//#endregion
|
|
102
|
+
export { ToolCreatedEvent, ToolStatusChangedEvent, ToolUpdatedEvent };
|
|
103
|
+
//# sourceMappingURL=tool.event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool.event.d.ts","names":[],"sources":["../../src/tool/tool.event.ts"],"sourcesContent":[],"mappings":";;;;;;;cAgCa,kBAAgB,6BAAA,CAAA,sCAAA;EAAhB,EAAA,EAAA;IAUX,IAAA,EAAA,2BAAA,CAAA,SAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;;EAV2B,CAAA;EAAA,IAAA,EAAA;IAsChB,IAAA,uCAUX,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;;;;+CAV2B,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;EAAA,CAAA;EAqChB,WAAA,EAAA;IAWX,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;;;cAhDW,kBAAgB,6BAAA,CAAA,sCAAA;;UAU3B,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA2BW,wBAAsB,6BAAA,CAAA,sCAAA;;UAWjC,2BAAA,CAAA"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
2
|
+
import { defineEvent, defineSchemaModel as defineSchemaModel$1 } from "@contractspec/lib.contracts";
|
|
3
|
+
|
|
4
|
+
//#region src/tool/tool.event.ts
|
|
5
|
+
const OWNERS = ["@agent-console-team"];
|
|
6
|
+
/**
|
|
7
|
+
* Payload for tool created event.
|
|
8
|
+
*/
|
|
9
|
+
const ToolCreatedPayload = defineSchemaModel$1({
|
|
10
|
+
name: "ToolCreatedPayload",
|
|
11
|
+
description: "Payload for tool created event",
|
|
12
|
+
fields: {
|
|
13
|
+
id: {
|
|
14
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
15
|
+
isOptional: false
|
|
16
|
+
},
|
|
17
|
+
organizationId: {
|
|
18
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
19
|
+
isOptional: false
|
|
20
|
+
},
|
|
21
|
+
name: {
|
|
22
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
23
|
+
isOptional: false
|
|
24
|
+
},
|
|
25
|
+
slug: {
|
|
26
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
27
|
+
isOptional: false
|
|
28
|
+
},
|
|
29
|
+
category: {
|
|
30
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
31
|
+
isOptional: false
|
|
32
|
+
},
|
|
33
|
+
implementationType: {
|
|
34
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
35
|
+
isOptional: false
|
|
36
|
+
},
|
|
37
|
+
createdById: {
|
|
38
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
39
|
+
isOptional: true
|
|
40
|
+
},
|
|
41
|
+
createdAt: {
|
|
42
|
+
type: ScalarTypeEnum.DateTime(),
|
|
43
|
+
isOptional: false
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
/**
|
|
48
|
+
* ToolCreatedEvent - A new tool was created.
|
|
49
|
+
*/
|
|
50
|
+
const ToolCreatedEvent = defineEvent({
|
|
51
|
+
meta: {
|
|
52
|
+
key: "agent.tool.created",
|
|
53
|
+
version: 1,
|
|
54
|
+
description: "A new AI tool was created.",
|
|
55
|
+
stability: "stable",
|
|
56
|
+
owners: [...OWNERS],
|
|
57
|
+
tags: ["tool", "created"]
|
|
58
|
+
},
|
|
59
|
+
payload: ToolCreatedPayload
|
|
60
|
+
});
|
|
61
|
+
/**
|
|
62
|
+
* Payload for tool updated event.
|
|
63
|
+
*/
|
|
64
|
+
const ToolUpdatedPayload = defineSchemaModel$1({
|
|
65
|
+
name: "ToolUpdatedPayload",
|
|
66
|
+
description: "Payload for tool updated event",
|
|
67
|
+
fields: {
|
|
68
|
+
id: {
|
|
69
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
70
|
+
isOptional: false
|
|
71
|
+
},
|
|
72
|
+
organizationId: {
|
|
73
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
74
|
+
isOptional: false
|
|
75
|
+
},
|
|
76
|
+
name: {
|
|
77
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
78
|
+
isOptional: false
|
|
79
|
+
},
|
|
80
|
+
status: {
|
|
81
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
82
|
+
isOptional: false
|
|
83
|
+
},
|
|
84
|
+
updatedFields: {
|
|
85
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
86
|
+
isArray: true,
|
|
87
|
+
isOptional: false
|
|
88
|
+
},
|
|
89
|
+
updatedAt: {
|
|
90
|
+
type: ScalarTypeEnum.DateTime(),
|
|
91
|
+
isOptional: false
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
/**
|
|
96
|
+
* ToolUpdatedEvent - A tool was updated.
|
|
97
|
+
*/
|
|
98
|
+
const ToolUpdatedEvent = defineEvent({
|
|
99
|
+
meta: {
|
|
100
|
+
key: "agent.tool.updated",
|
|
101
|
+
version: 1,
|
|
102
|
+
description: "An AI tool configuration was updated.",
|
|
103
|
+
stability: "stable",
|
|
104
|
+
owners: [...OWNERS],
|
|
105
|
+
tags: ["tool", "updated"]
|
|
106
|
+
},
|
|
107
|
+
payload: ToolUpdatedPayload
|
|
108
|
+
});
|
|
109
|
+
/**
|
|
110
|
+
* Payload for tool status changed event.
|
|
111
|
+
*/
|
|
112
|
+
const ToolStatusChangedPayload = defineSchemaModel$1({
|
|
113
|
+
name: "ToolStatusChangedPayload",
|
|
114
|
+
description: "Payload for tool status changed event",
|
|
115
|
+
fields: {
|
|
116
|
+
id: {
|
|
117
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
118
|
+
isOptional: false
|
|
119
|
+
},
|
|
120
|
+
organizationId: {
|
|
121
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
122
|
+
isOptional: false
|
|
123
|
+
},
|
|
124
|
+
name: {
|
|
125
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
126
|
+
isOptional: false
|
|
127
|
+
},
|
|
128
|
+
previousStatus: {
|
|
129
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
130
|
+
isOptional: false
|
|
131
|
+
},
|
|
132
|
+
newStatus: {
|
|
133
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
134
|
+
isOptional: false
|
|
135
|
+
},
|
|
136
|
+
changedAt: {
|
|
137
|
+
type: ScalarTypeEnum.DateTime(),
|
|
138
|
+
isOptional: false
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
/**
|
|
143
|
+
* ToolStatusChangedEvent - A tool's status was changed.
|
|
144
|
+
*/
|
|
145
|
+
const ToolStatusChangedEvent = defineEvent({
|
|
146
|
+
meta: {
|
|
147
|
+
key: "agent.tool.statusChanged",
|
|
148
|
+
version: 1,
|
|
149
|
+
description: "An AI tool status was changed (activated, deprecated, disabled).",
|
|
150
|
+
stability: "stable",
|
|
151
|
+
owners: [...OWNERS],
|
|
152
|
+
tags: ["tool", "status"]
|
|
153
|
+
},
|
|
154
|
+
payload: ToolStatusChangedPayload
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
//#endregion
|
|
158
|
+
export { ToolCreatedEvent, ToolStatusChangedEvent, ToolUpdatedEvent };
|
|
159
|
+
//# sourceMappingURL=tool.event.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool.event.js","names":["defineSchemaModel"],"sources":["../../src/tool/tool.event.ts"],"sourcesContent":["import { defineEvent, defineSchemaModel } from '@contractspec/lib.contracts';\nimport { ScalarTypeEnum } from '@contractspec/lib.schema';\n\nconst OWNERS = ['@agent-console-team'] as const;\n\n/**\n * Payload for tool created event.\n */\nconst ToolCreatedPayload = defineSchemaModel({\n name: 'ToolCreatedPayload',\n description: 'Payload for tool created event',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n category: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n implementationType: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n createdById: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * ToolCreatedEvent - A new tool was created.\n */\nexport const ToolCreatedEvent = defineEvent({\n meta: {\n key: 'agent.tool.created',\n version: 1,\n description: 'A new AI tool was created.',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['tool', 'created'],\n },\n payload: ToolCreatedPayload,\n});\n\n/**\n * Payload for tool updated event.\n */\nconst ToolUpdatedPayload = defineSchemaModel({\n name: 'ToolUpdatedPayload',\n description: 'Payload for tool updated event',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n updatedFields: {\n type: ScalarTypeEnum.String_unsecure(),\n isArray: true,\n isOptional: false,\n },\n updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * ToolUpdatedEvent - A tool was updated.\n */\nexport const ToolUpdatedEvent = defineEvent({\n meta: {\n key: 'agent.tool.updated',\n version: 1,\n description: 'An AI tool configuration was updated.',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['tool', 'updated'],\n },\n payload: ToolUpdatedPayload,\n});\n\n/**\n * Payload for tool status changed event.\n */\nconst ToolStatusChangedPayload = defineSchemaModel({\n name: 'ToolStatusChangedPayload',\n description: 'Payload for tool status changed event',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n previousStatus: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n newStatus: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n changedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * ToolStatusChangedEvent - A tool's status was changed.\n */\nexport const ToolStatusChangedEvent = defineEvent({\n meta: {\n key: 'agent.tool.statusChanged',\n version: 1,\n description:\n 'An AI tool status was changed (activated, deprecated, disabled).',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['tool', 'status'],\n },\n payload: ToolStatusChangedPayload,\n});\n"],"mappings":";;;;AAGA,MAAM,SAAS,CAAC,sBAAsB;;;;AAKtC,MAAM,qBAAqBA,oBAAkB;CAC3C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,IAAI;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,gBAAgB;GACd,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,oBAAoB;GAClB,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACzE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;;;;AAKF,MAAa,mBAAmB,YAAY;CAC1C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM,CAAC,QAAQ,UAAU;EAC1B;CACD,SAAS;CACV,CAAC;;;;AAKF,MAAM,qBAAqBA,oBAAkB;CAC3C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,IAAI;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,gBAAgB;GACd,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,QAAQ;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACrE,eAAe;GACb,MAAM,eAAe,iBAAiB;GACtC,SAAS;GACT,YAAY;GACb;EACD,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;;;;AAKF,MAAa,mBAAmB,YAAY;CAC1C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM,CAAC,QAAQ,UAAU;EAC1B;CACD,SAAS;CACV,CAAC;;;;AAKF,MAAM,2BAA2BA,oBAAkB;CACjD,MAAM;CACN,aAAa;CACb,QAAQ;EACN,IAAI;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,gBAAgB;GACd,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,gBAAgB;GACd,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;;;;AAKF,MAAa,yBAAyB,YAAY;CAChD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aACE;EACF,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM,CAAC,QAAQ,SAAS;EACzB;CACD,SAAS;CACV,CAAC"}
|