@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,133 @@
|
|
|
1
|
+
import { defineSchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';
|
|
2
|
+
import {
|
|
3
|
+
ToolCategoryEnum,
|
|
4
|
+
ToolStatusEnum,
|
|
5
|
+
ImplementationTypeEnum,
|
|
6
|
+
} from './tool.enum';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* AI tool definition.
|
|
10
|
+
*/
|
|
11
|
+
export const ToolModel = defineSchemaModel({
|
|
12
|
+
name: 'Tool',
|
|
13
|
+
description: 'AI tool definition',
|
|
14
|
+
fields: {
|
|
15
|
+
id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
16
|
+
organizationId: {
|
|
17
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
18
|
+
isOptional: false,
|
|
19
|
+
},
|
|
20
|
+
name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
|
|
21
|
+
slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
22
|
+
description: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
23
|
+
category: { type: ToolCategoryEnum, isOptional: false },
|
|
24
|
+
status: { type: ToolStatusEnum, isOptional: false },
|
|
25
|
+
parametersSchema: { type: ScalarTypeEnum.JSONObject(), isOptional: false },
|
|
26
|
+
outputSchema: { type: ScalarTypeEnum.JSONObject(), isOptional: true },
|
|
27
|
+
implementationType: { type: ImplementationTypeEnum, isOptional: false },
|
|
28
|
+
implementationConfig: {
|
|
29
|
+
type: ScalarTypeEnum.JSONObject(),
|
|
30
|
+
isOptional: false,
|
|
31
|
+
},
|
|
32
|
+
maxInvocationsPerMinute: {
|
|
33
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
34
|
+
isOptional: true,
|
|
35
|
+
},
|
|
36
|
+
timeoutMs: {
|
|
37
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
38
|
+
isOptional: false,
|
|
39
|
+
defaultValue: 30000,
|
|
40
|
+
},
|
|
41
|
+
version: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
|
|
42
|
+
tags: {
|
|
43
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
44
|
+
isArray: true,
|
|
45
|
+
isOptional: true,
|
|
46
|
+
},
|
|
47
|
+
createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
|
|
48
|
+
updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Summary of a tool for list views.
|
|
54
|
+
*/
|
|
55
|
+
export const ToolSummaryModel = defineSchemaModel({
|
|
56
|
+
name: 'ToolSummary',
|
|
57
|
+
description: 'Summary of a tool for list views',
|
|
58
|
+
fields: {
|
|
59
|
+
id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
60
|
+
name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
|
|
61
|
+
slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
62
|
+
description: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
63
|
+
category: { type: ToolCategoryEnum, isOptional: false },
|
|
64
|
+
status: { type: ToolStatusEnum, isOptional: false },
|
|
65
|
+
version: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
|
|
66
|
+
createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Input for creating a tool.
|
|
72
|
+
*/
|
|
73
|
+
export const CreateToolInputModel = defineSchemaModel({
|
|
74
|
+
name: 'CreateToolInput',
|
|
75
|
+
description: 'Input for creating a tool',
|
|
76
|
+
fields: {
|
|
77
|
+
organizationId: {
|
|
78
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
79
|
+
isOptional: false,
|
|
80
|
+
},
|
|
81
|
+
name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
|
|
82
|
+
slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
83
|
+
description: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
84
|
+
category: { type: ToolCategoryEnum, isOptional: true },
|
|
85
|
+
parametersSchema: { type: ScalarTypeEnum.JSONObject(), isOptional: false },
|
|
86
|
+
outputSchema: { type: ScalarTypeEnum.JSONObject(), isOptional: true },
|
|
87
|
+
implementationType: { type: ImplementationTypeEnum, isOptional: false },
|
|
88
|
+
implementationConfig: {
|
|
89
|
+
type: ScalarTypeEnum.JSONObject(),
|
|
90
|
+
isOptional: false,
|
|
91
|
+
},
|
|
92
|
+
maxInvocationsPerMinute: {
|
|
93
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
94
|
+
isOptional: true,
|
|
95
|
+
},
|
|
96
|
+
timeoutMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
|
|
97
|
+
tags: {
|
|
98
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
99
|
+
isArray: true,
|
|
100
|
+
isOptional: true,
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Input for updating a tool.
|
|
107
|
+
*/
|
|
108
|
+
export const UpdateToolInputModel = defineSchemaModel({
|
|
109
|
+
name: 'UpdateToolInput',
|
|
110
|
+
description: 'Input for updating a tool',
|
|
111
|
+
fields: {
|
|
112
|
+
toolId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
113
|
+
name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: true },
|
|
114
|
+
description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
115
|
+
status: { type: ToolStatusEnum, isOptional: true },
|
|
116
|
+
parametersSchema: { type: ScalarTypeEnum.JSONObject(), isOptional: true },
|
|
117
|
+
outputSchema: { type: ScalarTypeEnum.JSONObject(), isOptional: true },
|
|
118
|
+
implementationConfig: {
|
|
119
|
+
type: ScalarTypeEnum.JSONObject(),
|
|
120
|
+
isOptional: true,
|
|
121
|
+
},
|
|
122
|
+
maxInvocationsPerMinute: {
|
|
123
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
124
|
+
isOptional: true,
|
|
125
|
+
},
|
|
126
|
+
timeoutMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
|
|
127
|
+
tags: {
|
|
128
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
129
|
+
isArray: true,
|
|
130
|
+
isOptional: true,
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
});
|