@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.
Files changed (168) hide show
  1. package/.turbo/turbo-build$colon$bundle.log +133 -0
  2. package/.turbo/turbo-build.log +134 -0
  3. package/CHANGELOG.md +212 -0
  4. package/LICENSE +21 -0
  5. package/README.md +86 -0
  6. package/dist/agent/agent.entity.d.ts +55 -0
  7. package/dist/agent/agent.entity.d.ts.map +1 -0
  8. package/dist/agent/agent.entity.js +136 -0
  9. package/dist/agent/agent.entity.js.map +1 -0
  10. package/dist/agent/agent.enum.d.ts +18 -0
  11. package/dist/agent/agent.enum.d.ts.map +1 -0
  12. package/dist/agent/agent.enum.js +34 -0
  13. package/dist/agent/agent.enum.js.map +1 -0
  14. package/dist/agent/agent.event.d.ts +128 -0
  15. package/dist/agent/agent.event.d.ts.map +1 -0
  16. package/dist/agent/agent.event.js +210 -0
  17. package/dist/agent/agent.event.js.map +1 -0
  18. package/dist/agent/agent.handler.d.ts +100 -0
  19. package/dist/agent/agent.handler.d.ts.map +1 -0
  20. package/dist/agent/agent.handler.js +84 -0
  21. package/dist/agent/agent.handler.js.map +1 -0
  22. package/dist/agent/agent.operation.d.ts +471 -0
  23. package/dist/agent/agent.operation.d.ts.map +1 -0
  24. package/dist/agent/agent.operation.js +486 -0
  25. package/dist/agent/agent.operation.js.map +1 -0
  26. package/dist/agent/agent.presentation.d.ts +19 -0
  27. package/dist/agent/agent.presentation.d.ts.map +1 -0
  28. package/dist/agent/agent.presentation.js +89 -0
  29. package/dist/agent/agent.presentation.js.map +1 -0
  30. package/dist/agent/agent.schema.d.ts +401 -0
  31. package/dist/agent/agent.schema.d.ts.map +1 -0
  32. package/dist/agent/agent.schema.js +406 -0
  33. package/dist/agent/agent.schema.js.map +1 -0
  34. package/dist/agent/index.d.ts +8 -0
  35. package/dist/agent/index.js +9 -0
  36. package/dist/agent.feature.d.ts +12 -0
  37. package/dist/agent.feature.d.ts.map +1 -0
  38. package/dist/agent.feature.js +303 -0
  39. package/dist/agent.feature.js.map +1 -0
  40. package/dist/docs/agent-console.docblock.d.ts +1 -0
  41. package/dist/docs/agent-console.docblock.js +113 -0
  42. package/dist/docs/agent-console.docblock.js.map +1 -0
  43. package/dist/docs/index.d.ts +1 -0
  44. package/dist/docs/index.js +1 -0
  45. package/dist/example.d.ts +40 -0
  46. package/dist/example.d.ts.map +1 -0
  47. package/dist/example.js +51 -0
  48. package/dist/example.js.map +1 -0
  49. package/dist/handlers/index.d.ts +4 -0
  50. package/dist/handlers/index.js +5 -0
  51. package/dist/index.d.ts +30 -0
  52. package/dist/index.js +32 -0
  53. package/dist/presentations/index.d.ts +4 -0
  54. package/dist/presentations/index.js +5 -0
  55. package/dist/run/index.d.ts +8 -0
  56. package/dist/run/index.js +9 -0
  57. package/dist/run/run.entity.d.ts +82 -0
  58. package/dist/run/run.entity.d.ts.map +1 -0
  59. package/dist/run/run.entity.js +205 -0
  60. package/dist/run/run.entity.js.map +1 -0
  61. package/dist/run/run.enum.d.ts +22 -0
  62. package/dist/run/run.enum.d.ts.map +1 -0
  63. package/dist/run/run.enum.js +45 -0
  64. package/dist/run/run.enum.js.map +1 -0
  65. package/dist/run/run.event.d.ts +290 -0
  66. package/dist/run/run.event.d.ts.map +1 -0
  67. package/dist/run/run.event.js +434 -0
  68. package/dist/run/run.event.js.map +1 -0
  69. package/dist/run/run.handler.d.ts +203 -0
  70. package/dist/run/run.handler.d.ts.map +1 -0
  71. package/dist/run/run.handler.js +83 -0
  72. package/dist/run/run.handler.js.map +1 -0
  73. package/dist/run/run.operation.d.ts +720 -0
  74. package/dist/run/run.operation.d.ts.map +1 -0
  75. package/dist/run/run.operation.js +626 -0
  76. package/dist/run/run.operation.js.map +1 -0
  77. package/dist/run/run.presentation.d.ts +15 -0
  78. package/dist/run/run.presentation.d.ts.map +1 -0
  79. package/dist/run/run.presentation.js +65 -0
  80. package/dist/run/run.presentation.js.map +1 -0
  81. package/dist/run/run.schema.d.ts +416 -0
  82. package/dist/run/run.schema.d.ts.map +1 -0
  83. package/dist/run/run.schema.js +338 -0
  84. package/dist/run/run.schema.js.map +1 -0
  85. package/dist/shared/index.d.ts +4 -0
  86. package/dist/shared/index.js +5 -0
  87. package/dist/shared/mock-agents.d.ts +88 -0
  88. package/dist/shared/mock-agents.d.ts.map +1 -0
  89. package/dist/shared/mock-agents.js +94 -0
  90. package/dist/shared/mock-agents.js.map +1 -0
  91. package/dist/shared/mock-runs.d.ts +120 -0
  92. package/dist/shared/mock-runs.d.ts.map +1 -0
  93. package/dist/shared/mock-runs.js +118 -0
  94. package/dist/shared/mock-runs.js.map +1 -0
  95. package/dist/shared/mock-tools.d.ts +244 -0
  96. package/dist/shared/mock-tools.d.ts.map +1 -0
  97. package/dist/shared/mock-tools.js +181 -0
  98. package/dist/shared/mock-tools.js.map +1 -0
  99. package/dist/tool/index.d.ts +8 -0
  100. package/dist/tool/index.js +9 -0
  101. package/dist/tool/tool.entity.d.ts +42 -0
  102. package/dist/tool/tool.entity.d.ts.map +1 -0
  103. package/dist/tool/tool.entity.js +105 -0
  104. package/dist/tool/tool.entity.js.map +1 -0
  105. package/dist/tool/tool.enum.d.ts +18 -0
  106. package/dist/tool/tool.enum.d.ts.map +1 -0
  107. package/dist/tool/tool.enum.js +35 -0
  108. package/dist/tool/tool.enum.js.map +1 -0
  109. package/dist/tool/tool.event.d.ts +103 -0
  110. package/dist/tool/tool.event.d.ts.map +1 -0
  111. package/dist/tool/tool.event.js +159 -0
  112. package/dist/tool/tool.event.js.map +1 -0
  113. package/dist/tool/tool.handler.d.ts +315 -0
  114. package/dist/tool/tool.handler.d.ts.map +1 -0
  115. package/dist/tool/tool.handler.js +87 -0
  116. package/dist/tool/tool.handler.js.map +1 -0
  117. package/dist/tool/tool.operation.d.ts +411 -0
  118. package/dist/tool/tool.operation.d.ts.map +1 -0
  119. package/dist/tool/tool.operation.js +406 -0
  120. package/dist/tool/tool.operation.js.map +1 -0
  121. package/dist/tool/tool.presentation.d.ts +15 -0
  122. package/dist/tool/tool.presentation.d.ts.map +1 -0
  123. package/dist/tool/tool.presentation.js +65 -0
  124. package/dist/tool/tool.presentation.js.map +1 -0
  125. package/dist/tool/tool.schema.d.ts +218 -0
  126. package/dist/tool/tool.schema.d.ts.map +1 -0
  127. package/dist/tool/tool.schema.js +236 -0
  128. package/dist/tool/tool.schema.js.map +1 -0
  129. package/example.ts +1 -0
  130. package/package.json +123 -0
  131. package/src/agent/agent.entity.ts +137 -0
  132. package/src/agent/agent.enum.ts +31 -0
  133. package/src/agent/agent.event.ts +142 -0
  134. package/src/agent/agent.handler.ts +178 -0
  135. package/src/agent/agent.operation.ts +444 -0
  136. package/src/agent/agent.presentation.ts +81 -0
  137. package/src/agent/agent.schema.ts +214 -0
  138. package/src/agent/index.ts +67 -0
  139. package/src/agent.feature.ts +146 -0
  140. package/src/docs/agent-console.docblock.ts +97 -0
  141. package/src/docs/index.ts +1 -0
  142. package/src/example.ts +34 -0
  143. package/src/handlers/index.ts +27 -0
  144. package/src/index.ts +27 -0
  145. package/src/presentations/index.ts +26 -0
  146. package/src/run/index.ts +68 -0
  147. package/src/run/run.entity.ts +175 -0
  148. package/src/run/run.enum.ts +43 -0
  149. package/src/run/run.event.ts +264 -0
  150. package/src/run/run.handler.ts +138 -0
  151. package/src/run/run.operation.ts +524 -0
  152. package/src/run/run.presentation.ts +55 -0
  153. package/src/run/run.schema.ts +169 -0
  154. package/src/shared/index.ts +6 -0
  155. package/src/shared/mock-agents.ts +81 -0
  156. package/src/shared/mock-runs.ts +107 -0
  157. package/src/shared/mock-tools.ts +145 -0
  158. package/src/tool/index.ts +60 -0
  159. package/src/tool/tool.entity.ts +99 -0
  160. package/src/tool/tool.enum.ts +32 -0
  161. package/src/tool/tool.event.ts +119 -0
  162. package/src/tool/tool.handler.ts +154 -0
  163. package/src/tool/tool.operation.ts +366 -0
  164. package/src/tool/tool.presentation.ts +56 -0
  165. package/src/tool/tool.schema.ts +133 -0
  166. package/tsconfig.json +10 -0
  167. package/tsconfig.tsbuildinfo +1 -0
  168. package/tsdown.config.js +7 -0
@@ -0,0 +1,218 @@
1
+ import * as _contractspec_lib_schema0 from "@contractspec/lib.schema";
2
+
3
+ //#region src/tool/tool.schema.d.ts
4
+ /**
5
+ * AI tool definition.
6
+ */
7
+ declare const ToolModel: _contractspec_lib_schema0.SchemaModel<{
8
+ id: {
9
+ type: _contractspec_lib_schema0.FieldType<string, string>;
10
+ isOptional: false;
11
+ };
12
+ organizationId: {
13
+ type: _contractspec_lib_schema0.FieldType<string, string>;
14
+ isOptional: false;
15
+ };
16
+ name: {
17
+ type: _contractspec_lib_schema0.FieldType<string, string>;
18
+ isOptional: false;
19
+ };
20
+ slug: {
21
+ type: _contractspec_lib_schema0.FieldType<string, string>;
22
+ isOptional: false;
23
+ };
24
+ description: {
25
+ type: _contractspec_lib_schema0.FieldType<string, string>;
26
+ isOptional: false;
27
+ };
28
+ category: {
29
+ type: _contractspec_lib_schema0.EnumType<[string, string, string, string, string, string]>;
30
+ isOptional: false;
31
+ };
32
+ status: {
33
+ type: _contractspec_lib_schema0.EnumType<[string, string, string, string]>;
34
+ isOptional: false;
35
+ };
36
+ parametersSchema: {
37
+ type: _contractspec_lib_schema0.FieldType<Record<string, unknown>, Record<string, unknown>>;
38
+ isOptional: false;
39
+ };
40
+ outputSchema: {
41
+ type: _contractspec_lib_schema0.FieldType<Record<string, unknown>, Record<string, unknown>>;
42
+ isOptional: true;
43
+ };
44
+ implementationType: {
45
+ type: _contractspec_lib_schema0.EnumType<[string, string, string]>;
46
+ isOptional: false;
47
+ };
48
+ implementationConfig: {
49
+ type: _contractspec_lib_schema0.FieldType<Record<string, unknown>, Record<string, unknown>>;
50
+ isOptional: false;
51
+ };
52
+ maxInvocationsPerMinute: {
53
+ type: _contractspec_lib_schema0.FieldType<number, number>;
54
+ isOptional: true;
55
+ };
56
+ timeoutMs: {
57
+ type: _contractspec_lib_schema0.FieldType<number, number>;
58
+ isOptional: false;
59
+ defaultValue: number;
60
+ };
61
+ version: {
62
+ type: _contractspec_lib_schema0.FieldType<string, string>;
63
+ isOptional: false;
64
+ };
65
+ tags: {
66
+ type: _contractspec_lib_schema0.FieldType<string, string>;
67
+ isArray: true;
68
+ isOptional: true;
69
+ };
70
+ createdAt: {
71
+ type: _contractspec_lib_schema0.FieldType<Date, string>;
72
+ isOptional: false;
73
+ };
74
+ updatedAt: {
75
+ type: _contractspec_lib_schema0.FieldType<Date, string>;
76
+ isOptional: false;
77
+ };
78
+ }>;
79
+ /**
80
+ * Summary of a tool for list views.
81
+ */
82
+ declare const ToolSummaryModel: _contractspec_lib_schema0.SchemaModel<{
83
+ id: {
84
+ type: _contractspec_lib_schema0.FieldType<string, string>;
85
+ isOptional: false;
86
+ };
87
+ name: {
88
+ type: _contractspec_lib_schema0.FieldType<string, string>;
89
+ isOptional: false;
90
+ };
91
+ slug: {
92
+ type: _contractspec_lib_schema0.FieldType<string, string>;
93
+ isOptional: false;
94
+ };
95
+ description: {
96
+ type: _contractspec_lib_schema0.FieldType<string, string>;
97
+ isOptional: false;
98
+ };
99
+ category: {
100
+ type: _contractspec_lib_schema0.EnumType<[string, string, string, string, string, string]>;
101
+ isOptional: false;
102
+ };
103
+ status: {
104
+ type: _contractspec_lib_schema0.EnumType<[string, string, string, string]>;
105
+ isOptional: false;
106
+ };
107
+ version: {
108
+ type: _contractspec_lib_schema0.FieldType<string, string>;
109
+ isOptional: false;
110
+ };
111
+ createdAt: {
112
+ type: _contractspec_lib_schema0.FieldType<Date, string>;
113
+ isOptional: false;
114
+ };
115
+ }>;
116
+ /**
117
+ * Input for creating a tool.
118
+ */
119
+ declare const CreateToolInputModel: _contractspec_lib_schema0.SchemaModel<{
120
+ organizationId: {
121
+ type: _contractspec_lib_schema0.FieldType<string, string>;
122
+ isOptional: false;
123
+ };
124
+ name: {
125
+ type: _contractspec_lib_schema0.FieldType<string, string>;
126
+ isOptional: false;
127
+ };
128
+ slug: {
129
+ type: _contractspec_lib_schema0.FieldType<string, string>;
130
+ isOptional: false;
131
+ };
132
+ description: {
133
+ type: _contractspec_lib_schema0.FieldType<string, string>;
134
+ isOptional: false;
135
+ };
136
+ category: {
137
+ type: _contractspec_lib_schema0.EnumType<[string, string, string, string, string, string]>;
138
+ isOptional: true;
139
+ };
140
+ parametersSchema: {
141
+ type: _contractspec_lib_schema0.FieldType<Record<string, unknown>, Record<string, unknown>>;
142
+ isOptional: false;
143
+ };
144
+ outputSchema: {
145
+ type: _contractspec_lib_schema0.FieldType<Record<string, unknown>, Record<string, unknown>>;
146
+ isOptional: true;
147
+ };
148
+ implementationType: {
149
+ type: _contractspec_lib_schema0.EnumType<[string, string, string]>;
150
+ isOptional: false;
151
+ };
152
+ implementationConfig: {
153
+ type: _contractspec_lib_schema0.FieldType<Record<string, unknown>, Record<string, unknown>>;
154
+ isOptional: false;
155
+ };
156
+ maxInvocationsPerMinute: {
157
+ type: _contractspec_lib_schema0.FieldType<number, number>;
158
+ isOptional: true;
159
+ };
160
+ timeoutMs: {
161
+ type: _contractspec_lib_schema0.FieldType<number, number>;
162
+ isOptional: true;
163
+ };
164
+ tags: {
165
+ type: _contractspec_lib_schema0.FieldType<string, string>;
166
+ isArray: true;
167
+ isOptional: true;
168
+ };
169
+ }>;
170
+ /**
171
+ * Input for updating a tool.
172
+ */
173
+ declare const UpdateToolInputModel: _contractspec_lib_schema0.SchemaModel<{
174
+ toolId: {
175
+ type: _contractspec_lib_schema0.FieldType<string, string>;
176
+ isOptional: false;
177
+ };
178
+ name: {
179
+ type: _contractspec_lib_schema0.FieldType<string, string>;
180
+ isOptional: true;
181
+ };
182
+ description: {
183
+ type: _contractspec_lib_schema0.FieldType<string, string>;
184
+ isOptional: true;
185
+ };
186
+ status: {
187
+ type: _contractspec_lib_schema0.EnumType<[string, string, string, string]>;
188
+ isOptional: true;
189
+ };
190
+ parametersSchema: {
191
+ type: _contractspec_lib_schema0.FieldType<Record<string, unknown>, Record<string, unknown>>;
192
+ isOptional: true;
193
+ };
194
+ outputSchema: {
195
+ type: _contractspec_lib_schema0.FieldType<Record<string, unknown>, Record<string, unknown>>;
196
+ isOptional: true;
197
+ };
198
+ implementationConfig: {
199
+ type: _contractspec_lib_schema0.FieldType<Record<string, unknown>, Record<string, unknown>>;
200
+ isOptional: true;
201
+ };
202
+ maxInvocationsPerMinute: {
203
+ type: _contractspec_lib_schema0.FieldType<number, number>;
204
+ isOptional: true;
205
+ };
206
+ timeoutMs: {
207
+ type: _contractspec_lib_schema0.FieldType<number, number>;
208
+ isOptional: true;
209
+ };
210
+ tags: {
211
+ type: _contractspec_lib_schema0.FieldType<string, string>;
212
+ isArray: true;
213
+ isOptional: true;
214
+ };
215
+ }>;
216
+ //#endregion
217
+ export { CreateToolInputModel, ToolModel, ToolSummaryModel, UpdateToolInputModel };
218
+ //# sourceMappingURL=tool.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool.schema.d.ts","names":[],"sources":["../../src/tool/tool.schema.ts"],"sourcesContent":[],"mappings":";;;;;;AAUa,cAAA,SAuCX,4BAvCoB,WAuCpB,CAAA;EAAA,EAAA,EAAA;UAAA,yBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;4CAvCoB,CAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,CAAA;IAAA,UAAA,EAAA,KAAA;EA4CT,CAAA;EAaX,gBAAA,EAAA;;;;;;;;;4CAb2B,CAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,CAAA;IAAA,UAAA,EAAA,KAAA;EAkBhB,CAAA;EA8BX,oBAAA,EAAA;;;;;;;;;;;;;;;;;;6CA9B+B,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,OAAA,EAAA,IAAA;IAmCpB,UAAA,EAAA,IAAA;EAyBX,CAAA;;;;;;;;;;;;;cA9EW,4CAAgB;;UAa3B,yBAAA,CAAA;;EAwC+B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAnCpB,gDAAoB;;UA8B/B,yBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAKW,gDAAoB;;UAyB/B,yBAAA,CAAA"}
@@ -0,0 +1,236 @@
1
+ import { ImplementationTypeEnum, ToolCategoryEnum, ToolStatusEnum } from "./tool.enum.js";
2
+ import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
3
+
4
+ //#region src/tool/tool.schema.ts
5
+ /**
6
+ * AI tool definition.
7
+ */
8
+ const ToolModel = defineSchemaModel({
9
+ name: "Tool",
10
+ description: "AI tool definition",
11
+ fields: {
12
+ id: {
13
+ type: ScalarTypeEnum.String_unsecure(),
14
+ isOptional: false
15
+ },
16
+ organizationId: {
17
+ type: ScalarTypeEnum.String_unsecure(),
18
+ isOptional: false
19
+ },
20
+ name: {
21
+ type: ScalarTypeEnum.NonEmptyString(),
22
+ isOptional: false
23
+ },
24
+ slug: {
25
+ type: ScalarTypeEnum.String_unsecure(),
26
+ isOptional: false
27
+ },
28
+ description: {
29
+ type: ScalarTypeEnum.String_unsecure(),
30
+ isOptional: false
31
+ },
32
+ category: {
33
+ type: ToolCategoryEnum,
34
+ isOptional: false
35
+ },
36
+ status: {
37
+ type: ToolStatusEnum,
38
+ isOptional: false
39
+ },
40
+ parametersSchema: {
41
+ type: ScalarTypeEnum.JSONObject(),
42
+ isOptional: false
43
+ },
44
+ outputSchema: {
45
+ type: ScalarTypeEnum.JSONObject(),
46
+ isOptional: true
47
+ },
48
+ implementationType: {
49
+ type: ImplementationTypeEnum,
50
+ isOptional: false
51
+ },
52
+ implementationConfig: {
53
+ type: ScalarTypeEnum.JSONObject(),
54
+ isOptional: false
55
+ },
56
+ maxInvocationsPerMinute: {
57
+ type: ScalarTypeEnum.Int_unsecure(),
58
+ isOptional: true
59
+ },
60
+ timeoutMs: {
61
+ type: ScalarTypeEnum.Int_unsecure(),
62
+ isOptional: false,
63
+ defaultValue: 3e4
64
+ },
65
+ version: {
66
+ type: ScalarTypeEnum.NonEmptyString(),
67
+ isOptional: false
68
+ },
69
+ tags: {
70
+ type: ScalarTypeEnum.String_unsecure(),
71
+ isArray: true,
72
+ isOptional: true
73
+ },
74
+ createdAt: {
75
+ type: ScalarTypeEnum.DateTime(),
76
+ isOptional: false
77
+ },
78
+ updatedAt: {
79
+ type: ScalarTypeEnum.DateTime(),
80
+ isOptional: false
81
+ }
82
+ }
83
+ });
84
+ /**
85
+ * Summary of a tool for list views.
86
+ */
87
+ const ToolSummaryModel = defineSchemaModel({
88
+ name: "ToolSummary",
89
+ description: "Summary of a tool for list views",
90
+ fields: {
91
+ id: {
92
+ type: ScalarTypeEnum.String_unsecure(),
93
+ isOptional: false
94
+ },
95
+ name: {
96
+ type: ScalarTypeEnum.NonEmptyString(),
97
+ isOptional: false
98
+ },
99
+ slug: {
100
+ type: ScalarTypeEnum.String_unsecure(),
101
+ isOptional: false
102
+ },
103
+ description: {
104
+ type: ScalarTypeEnum.String_unsecure(),
105
+ isOptional: false
106
+ },
107
+ category: {
108
+ type: ToolCategoryEnum,
109
+ isOptional: false
110
+ },
111
+ status: {
112
+ type: ToolStatusEnum,
113
+ isOptional: false
114
+ },
115
+ version: {
116
+ type: ScalarTypeEnum.NonEmptyString(),
117
+ isOptional: false
118
+ },
119
+ createdAt: {
120
+ type: ScalarTypeEnum.DateTime(),
121
+ isOptional: false
122
+ }
123
+ }
124
+ });
125
+ /**
126
+ * Input for creating a tool.
127
+ */
128
+ const CreateToolInputModel = defineSchemaModel({
129
+ name: "CreateToolInput",
130
+ description: "Input for creating a tool",
131
+ fields: {
132
+ organizationId: {
133
+ type: ScalarTypeEnum.String_unsecure(),
134
+ isOptional: false
135
+ },
136
+ name: {
137
+ type: ScalarTypeEnum.NonEmptyString(),
138
+ isOptional: false
139
+ },
140
+ slug: {
141
+ type: ScalarTypeEnum.String_unsecure(),
142
+ isOptional: false
143
+ },
144
+ description: {
145
+ type: ScalarTypeEnum.String_unsecure(),
146
+ isOptional: false
147
+ },
148
+ category: {
149
+ type: ToolCategoryEnum,
150
+ isOptional: true
151
+ },
152
+ parametersSchema: {
153
+ type: ScalarTypeEnum.JSONObject(),
154
+ isOptional: false
155
+ },
156
+ outputSchema: {
157
+ type: ScalarTypeEnum.JSONObject(),
158
+ isOptional: true
159
+ },
160
+ implementationType: {
161
+ type: ImplementationTypeEnum,
162
+ isOptional: false
163
+ },
164
+ implementationConfig: {
165
+ type: ScalarTypeEnum.JSONObject(),
166
+ isOptional: false
167
+ },
168
+ maxInvocationsPerMinute: {
169
+ type: ScalarTypeEnum.Int_unsecure(),
170
+ isOptional: true
171
+ },
172
+ timeoutMs: {
173
+ type: ScalarTypeEnum.Int_unsecure(),
174
+ isOptional: true
175
+ },
176
+ tags: {
177
+ type: ScalarTypeEnum.String_unsecure(),
178
+ isArray: true,
179
+ isOptional: true
180
+ }
181
+ }
182
+ });
183
+ /**
184
+ * Input for updating a tool.
185
+ */
186
+ const UpdateToolInputModel = defineSchemaModel({
187
+ name: "UpdateToolInput",
188
+ description: "Input for updating a tool",
189
+ fields: {
190
+ toolId: {
191
+ type: ScalarTypeEnum.String_unsecure(),
192
+ isOptional: false
193
+ },
194
+ name: {
195
+ type: ScalarTypeEnum.NonEmptyString(),
196
+ isOptional: true
197
+ },
198
+ description: {
199
+ type: ScalarTypeEnum.String_unsecure(),
200
+ isOptional: true
201
+ },
202
+ status: {
203
+ type: ToolStatusEnum,
204
+ isOptional: true
205
+ },
206
+ parametersSchema: {
207
+ type: ScalarTypeEnum.JSONObject(),
208
+ isOptional: true
209
+ },
210
+ outputSchema: {
211
+ type: ScalarTypeEnum.JSONObject(),
212
+ isOptional: true
213
+ },
214
+ implementationConfig: {
215
+ type: ScalarTypeEnum.JSONObject(),
216
+ isOptional: true
217
+ },
218
+ maxInvocationsPerMinute: {
219
+ type: ScalarTypeEnum.Int_unsecure(),
220
+ isOptional: true
221
+ },
222
+ timeoutMs: {
223
+ type: ScalarTypeEnum.Int_unsecure(),
224
+ isOptional: true
225
+ },
226
+ tags: {
227
+ type: ScalarTypeEnum.String_unsecure(),
228
+ isArray: true,
229
+ isOptional: true
230
+ }
231
+ }
232
+ });
233
+
234
+ //#endregion
235
+ export { CreateToolInputModel, ToolModel, ToolSummaryModel, UpdateToolInputModel };
236
+ //# sourceMappingURL=tool.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool.schema.js","names":[],"sources":["../../src/tool/tool.schema.ts"],"sourcesContent":["import { defineSchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';\nimport {\n ToolCategoryEnum,\n ToolStatusEnum,\n ImplementationTypeEnum,\n} from './tool.enum';\n\n/**\n * AI tool definition.\n */\nexport const ToolModel = defineSchemaModel({\n name: 'Tool',\n description: 'AI tool definition',\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.NonEmptyString(), isOptional: false },\n slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n category: { type: ToolCategoryEnum, isOptional: false },\n status: { type: ToolStatusEnum, isOptional: false },\n parametersSchema: { type: ScalarTypeEnum.JSONObject(), isOptional: false },\n outputSchema: { type: ScalarTypeEnum.JSONObject(), isOptional: true },\n implementationType: { type: ImplementationTypeEnum, isOptional: false },\n implementationConfig: {\n type: ScalarTypeEnum.JSONObject(),\n isOptional: false,\n },\n maxInvocationsPerMinute: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n },\n timeoutMs: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: false,\n defaultValue: 30000,\n },\n version: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n tags: {\n type: ScalarTypeEnum.String_unsecure(),\n isArray: true,\n isOptional: true,\n },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * Summary of a tool for list views.\n */\nexport const ToolSummaryModel = defineSchemaModel({\n name: 'ToolSummary',\n description: 'Summary of a tool for list views',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n category: { type: ToolCategoryEnum, isOptional: false },\n status: { type: ToolStatusEnum, isOptional: false },\n version: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * Input for creating a tool.\n */\nexport const CreateToolInputModel = defineSchemaModel({\n name: 'CreateToolInput',\n description: 'Input for creating a tool',\n fields: {\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n category: { type: ToolCategoryEnum, isOptional: true },\n parametersSchema: { type: ScalarTypeEnum.JSONObject(), isOptional: false },\n outputSchema: { type: ScalarTypeEnum.JSONObject(), isOptional: true },\n implementationType: { type: ImplementationTypeEnum, isOptional: false },\n implementationConfig: {\n type: ScalarTypeEnum.JSONObject(),\n isOptional: false,\n },\n maxInvocationsPerMinute: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n },\n timeoutMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n tags: {\n type: ScalarTypeEnum.String_unsecure(),\n isArray: true,\n isOptional: true,\n },\n },\n});\n\n/**\n * Input for updating a tool.\n */\nexport const UpdateToolInputModel = defineSchemaModel({\n name: 'UpdateToolInput',\n description: 'Input for updating a tool',\n fields: {\n toolId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: true },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n status: { type: ToolStatusEnum, isOptional: true },\n parametersSchema: { type: ScalarTypeEnum.JSONObject(), isOptional: true },\n outputSchema: { type: ScalarTypeEnum.JSONObject(), isOptional: true },\n implementationConfig: {\n type: ScalarTypeEnum.JSONObject(),\n isOptional: true,\n },\n maxInvocationsPerMinute: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n },\n timeoutMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n tags: {\n type: ScalarTypeEnum.String_unsecure(),\n isArray: true,\n isOptional: true,\n },\n },\n});\n"],"mappings":"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"}
package/example.ts ADDED
@@ -0,0 +1 @@
1
+ export { default } from './src/example';
package/package.json ADDED
@@ -0,0 +1,123 @@
1
+ {
2
+ "name": "@contractspec/example.agent-console",
3
+ "version": "1.44.0",
4
+ "description": "Agent Console example - AI agent orchestration with tools, runs, and logs",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": "./dist/index.js",
10
+ "./agent": "./dist/agent/index.js",
11
+ "./agent.feature": "./dist/agent.feature.js",
12
+ "./agent/agent.entity": "./dist/agent/agent.entity.js",
13
+ "./agent/agent.enum": "./dist/agent/agent.enum.js",
14
+ "./agent/agent.event": "./dist/agent/agent.event.js",
15
+ "./agent/agent.handler": "./dist/agent/agent.handler.js",
16
+ "./agent/agent.operation": "./dist/agent/agent.operation.js",
17
+ "./agent/agent.presentation": "./dist/agent/agent.presentation.js",
18
+ "./agent/agent.schema": "./dist/agent/agent.schema.js",
19
+ "./docs": "./dist/docs/index.js",
20
+ "./docs/agent-console.docblock": "./dist/docs/agent-console.docblock.js",
21
+ "./example": "./dist/example.js",
22
+ "./handlers": "./dist/handlers/index.js",
23
+ "./presentations": "./dist/presentations/index.js",
24
+ "./run": "./dist/run/index.js",
25
+ "./run/run.entity": "./dist/run/run.entity.js",
26
+ "./run/run.enum": "./dist/run/run.enum.js",
27
+ "./run/run.event": "./dist/run/run.event.js",
28
+ "./run/run.handler": "./dist/run/run.handler.js",
29
+ "./run/run.operation": "./dist/run/run.operation.js",
30
+ "./run/run.presentation": "./dist/run/run.presentation.js",
31
+ "./run/run.schema": "./dist/run/run.schema.js",
32
+ "./shared": "./dist/shared/index.js",
33
+ "./shared/mock-agents": "./dist/shared/mock-agents.js",
34
+ "./shared/mock-runs": "./dist/shared/mock-runs.js",
35
+ "./shared/mock-tools": "./dist/shared/mock-tools.js",
36
+ "./tool": "./dist/tool/index.js",
37
+ "./tool/tool.entity": "./dist/tool/tool.entity.js",
38
+ "./tool/tool.enum": "./dist/tool/tool.enum.js",
39
+ "./tool/tool.event": "./dist/tool/tool.event.js",
40
+ "./tool/tool.handler": "./dist/tool/tool.handler.js",
41
+ "./tool/tool.operation": "./dist/tool/tool.operation.js",
42
+ "./tool/tool.presentation": "./dist/tool/tool.presentation.js",
43
+ "./tool/tool.schema": "./dist/tool/tool.schema.js",
44
+ "./*": "./*"
45
+ },
46
+ "scripts": {
47
+ "publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
48
+ "publish:pkg:canary": "bun publish:pkg --tag canary",
49
+ "build": "bun build:types && bun build:bundle",
50
+ "build:bundle": "tsdown",
51
+ "build:types": "tsc --noEmit",
52
+ "dev": "bun build:bundle --watch",
53
+ "clean": "rimraf dist .turbo",
54
+ "lint": "bun lint:fix",
55
+ "lint:fix": "eslint src --fix",
56
+ "lint:check": "eslint src",
57
+ "test": "bun run"
58
+ },
59
+ "dependencies": {
60
+ "@contractspec/lib.schema": "1.44.0",
61
+ "@contractspec/lib.contracts": "1.44.0",
62
+ "@contractspec/lib.identity-rbac": "1.44.0",
63
+ "@contractspec/module.audit-trail": "1.44.0",
64
+ "@contractspec/lib.jobs": "1.44.0",
65
+ "zod": "^4.1.13"
66
+ },
67
+ "devDependencies": {
68
+ "@contractspec/tool.tsdown": "1.44.0",
69
+ "@contractspec/tool.typescript": "1.44.0",
70
+ "tsdown": "^0.18.3",
71
+ "typescript": "^5.9.3"
72
+ },
73
+ "module": "./dist/index.js",
74
+ "publishConfig": {
75
+ "exports": {
76
+ ".": "./dist/index.js",
77
+ "./agent": "./dist/agent/index.js",
78
+ "./agent.feature": "./dist/agent.feature.js",
79
+ "./agent/agent.contracts": "./dist/agent/agent.operations.js",
80
+ "./agent/agent.entity": "./dist/agent/agent.entity.js",
81
+ "./agent/agent.enum": "./dist/agent/agent.enum.js",
82
+ "./agent/agent.event": "./dist/agent/agent.event.js",
83
+ "./agent/agent.handler": "./dist/agent/agent.handler.js",
84
+ "./agent/agent.presentation": "./dist/agent/agent.presentation.js",
85
+ "./agent/agent.schema": "./dist/agent/agent.schema.js",
86
+ "./docs": "./dist/docs/index.js",
87
+ "./docs/agent-console.docblock": "./dist/docs/agent-console.docblock.js",
88
+ "./example": "./dist/example.js",
89
+ "./handlers": "./dist/handlers/index.js",
90
+ "./presentations": "./dist/presentations/index.js",
91
+ "./run": "./dist/run/index.js",
92
+ "./run/run.contracts": "./dist/run/run.operations.js",
93
+ "./run/run.entity": "./dist/run/run.entity.js",
94
+ "./run/run.enum": "./dist/run/run.enum.js",
95
+ "./run/run.event": "./dist/run/run.event.js",
96
+ "./run/run.handler": "./dist/run/run.handler.js",
97
+ "./run/run.presentation": "./dist/run/run.presentation.js",
98
+ "./run/run.schema": "./dist/run/run.schema.js",
99
+ "./shared": "./dist/shared/index.js",
100
+ "./shared/mock-agents": "./dist/shared/mock-agents.js",
101
+ "./shared/mock-runs": "./dist/shared/mock-runs.js",
102
+ "./shared/mock-tools": "./dist/shared/mock-tools.js",
103
+ "./tool": "./dist/tool/index.js",
104
+ "./tool/tool.contracts": "./dist/tool/tool.operations.js",
105
+ "./tool/tool.entity": "./dist/tool/tool.entity.js",
106
+ "./tool/tool.enum": "./dist/tool/tool.enum.js",
107
+ "./tool/tool.event": "./dist/tool/tool.event.js",
108
+ "./tool/tool.handler": "./dist/tool/tool.handler.js",
109
+ "./tool/tool.presentation": "./dist/tool/tool.presentation.js",
110
+ "./tool/tool.schema": "./dist/tool/tool.schema.js",
111
+ "./*": "./*"
112
+ },
113
+ "registry": "https://registry.npmjs.org/",
114
+ "access": "public"
115
+ },
116
+ "license": "MIT",
117
+ "repository": {
118
+ "type": "git",
119
+ "url": "https://github.com/lssm-tech/contractspec.git",
120
+ "directory": "packages/examples/agent-console"
121
+ },
122
+ "homepage": "https://contractspec.io"
123
+ }