@kraken-ai/platform 0.0.1
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/LICENSE +67 -0
- package/README.md +36 -0
- package/dist/chunk-HGJSK6MW.js +294 -0
- package/dist/chunk-HGJSK6MW.js.map +1 -0
- package/dist/cli.js +1297 -0
- package/dist/cli.js.map +1 -0
- package/dist/connector-CumEDPfS.d.cts +103 -0
- package/dist/connector-CumEDPfS.d.ts +103 -0
- package/dist/index.cjs +1381 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +796 -0
- package/dist/index.d.ts +796 -0
- package/dist/index.js +1240 -0
- package/dist/index.js.map +1 -0
- package/dist/server.cjs +315 -0
- package/dist/server.cjs.map +1 -0
- package/dist/server.d.cts +15 -0
- package/dist/server.d.ts +15 -0
- package/dist/server.js +7 -0
- package/dist/server.js.map +1 -0
- package/package.json +46 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,796 @@
|
|
|
1
|
+
import { M as McpContent, P as PlatformConnector, C as ConnectorDefinition, a as ConnectorToolDef } from './connector-CumEDPfS.cjs';
|
|
2
|
+
export { b as ConnectorHandlerContext, c as ConnectorHandlerResult, d as ConnectorPromptDef, e as ConnectorResourceDef, G as GetPromptResult, f as PromptMessageContent, R as ReadResourceResult, g as ResourceContent, T as ToolAnnotations } from './connector-CumEDPfS.cjs';
|
|
3
|
+
import * as z from 'zod';
|
|
4
|
+
import { ZodType } from 'zod';
|
|
5
|
+
import { ModelString, ToolDefinition } from 'kraken-ai';
|
|
6
|
+
|
|
7
|
+
interface ToolResultContent {
|
|
8
|
+
readonly type: string;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
interface ToolResult {
|
|
12
|
+
readonly content: ReadonlyArray<ToolResultContent>;
|
|
13
|
+
readonly isError?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/** Wrap a handler return value into MCP CallToolResult format */
|
|
16
|
+
declare const wrapToolResult: (value: unknown) => ToolResult;
|
|
17
|
+
/** Wrap a thrown error into MCP CallToolResult format with isError: true */
|
|
18
|
+
declare const wrapToolError: (error: unknown) => ToolResult;
|
|
19
|
+
/** Create an explicit MCP content pass-through result */
|
|
20
|
+
declare const mcpResult: (content: McpContent["content"], isError?: boolean) => McpContent;
|
|
21
|
+
|
|
22
|
+
/** Action names follow entity naming convention: lowercase alphanumeric with hyphens, 1-64 chars. */
|
|
23
|
+
declare const ACTION_NAME_REGEX: RegExp;
|
|
24
|
+
/** Validates an action name (allows single-char names like "a"). */
|
|
25
|
+
declare const isValidActionName: (name: string) => boolean;
|
|
26
|
+
/** Input for a single action variant in defineActions(). */
|
|
27
|
+
interface ActionVariantInput<S extends z.ZodObject<z.ZodRawShape> = z.ZodObject<z.ZodRawShape>> {
|
|
28
|
+
schema: S;
|
|
29
|
+
webhook?: string;
|
|
30
|
+
handler?(payload: z.infer<S>): Promise<void>;
|
|
31
|
+
}
|
|
32
|
+
/** Serializable config for a single action variant (stored in manifest/DB). */
|
|
33
|
+
interface ActionVariantConfig {
|
|
34
|
+
schema: Record<string, unknown>;
|
|
35
|
+
webhook?: string;
|
|
36
|
+
hasHandler: boolean;
|
|
37
|
+
}
|
|
38
|
+
/** Serializable portion of action definitions (stored in agent config). */
|
|
39
|
+
interface PlatformActionsConfig {
|
|
40
|
+
variants: Record<string, ActionVariantConfig>;
|
|
41
|
+
}
|
|
42
|
+
/** Full action definitions including in-memory schemas and handlers for runtime use. */
|
|
43
|
+
interface PlatformActions {
|
|
44
|
+
readonly __type: "PlatformActions";
|
|
45
|
+
readonly config: PlatformActionsConfig;
|
|
46
|
+
readonly zodSchemas: Record<string, z.ZodObject<z.ZodRawShape>>;
|
|
47
|
+
readonly handlers: Readonly<Record<string, (payload: unknown) => Promise<void>>>;
|
|
48
|
+
}
|
|
49
|
+
declare const actionVariantConfigSchema: z.ZodObject<{
|
|
50
|
+
schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
51
|
+
webhook: z.ZodOptional<z.ZodString>;
|
|
52
|
+
hasHandler: z.ZodBoolean;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
declare const actionsConfigSchema: z.ZodObject<{
|
|
55
|
+
variants: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
56
|
+
schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
57
|
+
webhook: z.ZodOptional<z.ZodString>;
|
|
58
|
+
hasHandler: z.ZodBoolean;
|
|
59
|
+
}, z.core.$strip>>;
|
|
60
|
+
}, z.core.$strict>;
|
|
61
|
+
|
|
62
|
+
declare const environmentSchema: z.ZodEnum<{
|
|
63
|
+
dev: "dev";
|
|
64
|
+
staging: "staging";
|
|
65
|
+
prod: "prod";
|
|
66
|
+
}>;
|
|
67
|
+
type Environment = z.infer<typeof environmentSchema>;
|
|
68
|
+
|
|
69
|
+
declare const jitPolicySchema: z.ZodEnum<{
|
|
70
|
+
"auto-approve": "auto-approve";
|
|
71
|
+
"policy-based": "policy-based";
|
|
72
|
+
"require-approval": "require-approval";
|
|
73
|
+
}>;
|
|
74
|
+
type JitPolicy = z.infer<typeof jitPolicySchema>;
|
|
75
|
+
declare const identityConfigSchema: z.ZodObject<{
|
|
76
|
+
basePermissions: z.ZodArray<z.ZodString>;
|
|
77
|
+
requestablePermissions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
78
|
+
jitPolicy: z.ZodOptional<z.ZodEnum<{
|
|
79
|
+
"auto-approve": "auto-approve";
|
|
80
|
+
"policy-based": "policy-based";
|
|
81
|
+
"require-approval": "require-approval";
|
|
82
|
+
}>>;
|
|
83
|
+
maxJitDurationMinutes: z.ZodOptional<z.ZodNumber>;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
type IdentityConfig = z.infer<typeof identityConfigSchema>;
|
|
86
|
+
|
|
87
|
+
declare const notificationConfigSchema: z.ZodObject<{
|
|
88
|
+
slack: z.ZodOptional<z.ZodString>;
|
|
89
|
+
onSuccess: z.ZodOptional<z.ZodBoolean>;
|
|
90
|
+
onFailure: z.ZodOptional<z.ZodBoolean>;
|
|
91
|
+
onTimeout: z.ZodOptional<z.ZodBoolean>;
|
|
92
|
+
}, z.core.$strip>;
|
|
93
|
+
type NotificationConfig = z.infer<typeof notificationConfigSchema>;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Type registry populated by `kraken generate` via module augmentation.
|
|
97
|
+
*
|
|
98
|
+
* Before generating, all ID types resolve to an error-message string —
|
|
99
|
+
* only local typed refs (PlatformAgent, PlatformSkill, PlatformConnector) compile.
|
|
100
|
+
*
|
|
101
|
+
* After `kraken generate`, the generated `.kraken-ai/platform-types.d.ts` augments
|
|
102
|
+
* this interface with `agentId`, `connectorId`, and `skillId` string unions,
|
|
103
|
+
* enabling autocomplete on remote IDs.
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* ```ts
|
|
107
|
+
* // .kraken-ai/platform-types.d.ts (generated)
|
|
108
|
+
* declare module "@kraken-ai/platform" {
|
|
109
|
+
* interface KrakenTypeRegistry {
|
|
110
|
+
* agentId: "analyst" | "writer";
|
|
111
|
+
* connectorId: "slack" | "jira";
|
|
112
|
+
* skillId: "competitor-deep-dive";
|
|
113
|
+
* }
|
|
114
|
+
* }
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
interface KrakenTypeRegistry {
|
|
118
|
+
}
|
|
119
|
+
/** Remote agent IDs. Resolves to an error hint before `kraken generate`. */
|
|
120
|
+
type AgentId = KrakenTypeRegistry extends {
|
|
121
|
+
agentId: infer T extends string;
|
|
122
|
+
} ? T : "ERROR: Run 'kraken generate' to unlock agent IDs";
|
|
123
|
+
/** Remote connector IDs. Resolves to an error hint before `kraken generate`. */
|
|
124
|
+
type ConnectorId = KrakenTypeRegistry extends {
|
|
125
|
+
connectorId: infer T extends string;
|
|
126
|
+
} ? T : "ERROR: Run 'kraken generate' to unlock connector IDs";
|
|
127
|
+
/** Remote skill IDs. Resolves to an error hint before `kraken generate`. */
|
|
128
|
+
type SkillId = KrakenTypeRegistry extends {
|
|
129
|
+
skillId: infer T extends string;
|
|
130
|
+
} ? T : "ERROR: Run 'kraken generate' to unlock skill IDs";
|
|
131
|
+
|
|
132
|
+
declare const agentDefinitionSchema: z.ZodObject<{
|
|
133
|
+
name: z.ZodString;
|
|
134
|
+
model: z.ZodString;
|
|
135
|
+
instructions: z.ZodString;
|
|
136
|
+
description: z.ZodOptional<z.ZodString>;
|
|
137
|
+
skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
138
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
139
|
+
allowTemperatureOverride: z.ZodOptional<z.ZodBoolean>;
|
|
140
|
+
maxOutputTokens: z.ZodOptional<z.ZodNumber>;
|
|
141
|
+
thinkingLevel: z.ZodOptional<z.ZodEnum<{
|
|
142
|
+
low: "low";
|
|
143
|
+
medium: "medium";
|
|
144
|
+
high: "high";
|
|
145
|
+
}>>;
|
|
146
|
+
logLevel: z.ZodOptional<z.ZodEnum<{
|
|
147
|
+
error: "error";
|
|
148
|
+
silent: "silent";
|
|
149
|
+
debug: "debug";
|
|
150
|
+
info: "info";
|
|
151
|
+
warn: "warn";
|
|
152
|
+
}>>;
|
|
153
|
+
}, z.core.$strict>;
|
|
154
|
+
type AgentDefinition = Omit<z.infer<typeof agentDefinitionSchema>, "model"> & {
|
|
155
|
+
model: ModelString;
|
|
156
|
+
};
|
|
157
|
+
declare const platformAgentConfigSchema: z.ZodObject<{
|
|
158
|
+
agent: z.ZodObject<{
|
|
159
|
+
name: z.ZodString;
|
|
160
|
+
model: z.ZodString;
|
|
161
|
+
instructions: z.ZodString;
|
|
162
|
+
description: z.ZodOptional<z.ZodString>;
|
|
163
|
+
skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
164
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
165
|
+
allowTemperatureOverride: z.ZodOptional<z.ZodBoolean>;
|
|
166
|
+
maxOutputTokens: z.ZodOptional<z.ZodNumber>;
|
|
167
|
+
thinkingLevel: z.ZodOptional<z.ZodEnum<{
|
|
168
|
+
low: "low";
|
|
169
|
+
medium: "medium";
|
|
170
|
+
high: "high";
|
|
171
|
+
}>>;
|
|
172
|
+
logLevel: z.ZodOptional<z.ZodEnum<{
|
|
173
|
+
error: "error";
|
|
174
|
+
silent: "silent";
|
|
175
|
+
debug: "debug";
|
|
176
|
+
info: "info";
|
|
177
|
+
warn: "warn";
|
|
178
|
+
}>>;
|
|
179
|
+
}, z.core.$strict>;
|
|
180
|
+
connectors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
181
|
+
trigger: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
182
|
+
type: z.ZodLiteral<"cron">;
|
|
183
|
+
expression: z.ZodString;
|
|
184
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
185
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
186
|
+
type: z.ZodLiteral<"webhook">;
|
|
187
|
+
path: z.ZodString;
|
|
188
|
+
method: z.ZodOptional<z.ZodEnum<{
|
|
189
|
+
GET: "GET";
|
|
190
|
+
POST: "POST";
|
|
191
|
+
}>>;
|
|
192
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
193
|
+
type: z.ZodLiteral<"event">;
|
|
194
|
+
source: z.ZodString;
|
|
195
|
+
event: z.ZodString;
|
|
196
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
197
|
+
type: z.ZodLiteral<"api">;
|
|
198
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
199
|
+
type: z.ZodLiteral<"manual">;
|
|
200
|
+
}, z.core.$strip>], "type">;
|
|
201
|
+
identity: z.ZodOptional<z.ZodObject<{
|
|
202
|
+
basePermissions: z.ZodArray<z.ZodString>;
|
|
203
|
+
requestablePermissions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
204
|
+
jitPolicy: z.ZodOptional<z.ZodEnum<{
|
|
205
|
+
"auto-approve": "auto-approve";
|
|
206
|
+
"policy-based": "policy-based";
|
|
207
|
+
"require-approval": "require-approval";
|
|
208
|
+
}>>;
|
|
209
|
+
maxJitDurationMinutes: z.ZodOptional<z.ZodNumber>;
|
|
210
|
+
}, z.core.$strip>>;
|
|
211
|
+
resources: z.ZodOptional<z.ZodObject<{
|
|
212
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
213
|
+
maxCostUsd: z.ZodOptional<z.ZodNumber>;
|
|
214
|
+
timeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
215
|
+
}, z.core.$strip>>;
|
|
216
|
+
retries: z.ZodOptional<z.ZodObject<{
|
|
217
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
218
|
+
backoffSeconds: z.ZodOptional<z.ZodNumber>;
|
|
219
|
+
}, z.core.$strip>>;
|
|
220
|
+
concurrency: z.ZodOptional<z.ZodObject<{
|
|
221
|
+
maxParallelRuns: z.ZodOptional<z.ZodNumber>;
|
|
222
|
+
}, z.core.$strip>>;
|
|
223
|
+
team: z.ZodOptional<z.ZodObject<{
|
|
224
|
+
members: z.ZodArray<z.ZodString>;
|
|
225
|
+
maxConcurrentWorkers: z.ZodOptional<z.ZodNumber>;
|
|
226
|
+
maxTokenBudgetPerWorker: z.ZodOptional<z.ZodNumber>;
|
|
227
|
+
maxDurationPerWorker: z.ZodOptional<z.ZodNumber>;
|
|
228
|
+
}, z.core.$strip>>;
|
|
229
|
+
notifications: z.ZodOptional<z.ZodObject<{
|
|
230
|
+
slack: z.ZodOptional<z.ZodString>;
|
|
231
|
+
onSuccess: z.ZodOptional<z.ZodBoolean>;
|
|
232
|
+
onFailure: z.ZodOptional<z.ZodBoolean>;
|
|
233
|
+
onTimeout: z.ZodOptional<z.ZodBoolean>;
|
|
234
|
+
}, z.core.$strip>>;
|
|
235
|
+
environment: z.ZodOptional<z.ZodEnum<{
|
|
236
|
+
dev: "dev";
|
|
237
|
+
staging: "staging";
|
|
238
|
+
prod: "prod";
|
|
239
|
+
}>>;
|
|
240
|
+
actions: z.ZodOptional<z.ZodObject<{
|
|
241
|
+
variants: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
242
|
+
schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
243
|
+
webhook: z.ZodOptional<z.ZodString>;
|
|
244
|
+
hasHandler: z.ZodBoolean;
|
|
245
|
+
}, z.core.$strip>>;
|
|
246
|
+
}, z.core.$strict>>;
|
|
247
|
+
}, z.core.$strict>;
|
|
248
|
+
type PlatformAgentConfig = Omit<z.infer<typeof platformAgentConfigSchema>, "agent" | "actions"> & {
|
|
249
|
+
agent: AgentDefinition;
|
|
250
|
+
actions?: PlatformActionsConfig;
|
|
251
|
+
};
|
|
252
|
+
interface PlatformAgent {
|
|
253
|
+
readonly __type: "PlatformAgent";
|
|
254
|
+
readonly config: PlatformAgentConfig;
|
|
255
|
+
readonly runtime?: unknown;
|
|
256
|
+
/** In-memory schemas for action variants. Not serialized — runtime use only. */
|
|
257
|
+
readonly actionZodSchemas?: Record<string, z.ZodObject<z.ZodRawShape>>;
|
|
258
|
+
/** Action handler functions. Not serialized — runtime use only. */
|
|
259
|
+
readonly actionHandlers?: Readonly<Record<string, (payload: unknown) => Promise<void>>>;
|
|
260
|
+
/** Team member PlatformAgent objects. Not serialized — runtime use only (dev mode delegation). */
|
|
261
|
+
readonly teamAgents?: readonly PlatformAgent[];
|
|
262
|
+
}
|
|
263
|
+
/** Team member reference: local PlatformAgent or remote AgentId string. */
|
|
264
|
+
type TeamMember = PlatformAgent | AgentId;
|
|
265
|
+
|
|
266
|
+
interface PlatformSkill {
|
|
267
|
+
readonly __type: "PlatformSkill";
|
|
268
|
+
readonly name: string;
|
|
269
|
+
readonly description?: string;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/** Skill reference: local PlatformSkill object or remote SkillId (populated by `kraken generate`). */
|
|
273
|
+
type SkillRef = PlatformSkill | SkillId;
|
|
274
|
+
/** Connector reference: local PlatformConnector, remote ConnectorId, or connector name string. */
|
|
275
|
+
type ConnectorRef = PlatformConnector | ConnectorId | (string & {});
|
|
276
|
+
|
|
277
|
+
declare const resourceLimitsSchema: z.ZodObject<{
|
|
278
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
279
|
+
maxCostUsd: z.ZodOptional<z.ZodNumber>;
|
|
280
|
+
timeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
281
|
+
}, z.core.$strip>;
|
|
282
|
+
type ResourceLimits = z.infer<typeof resourceLimitsSchema>;
|
|
283
|
+
declare const retryPolicySchema: z.ZodObject<{
|
|
284
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
285
|
+
backoffSeconds: z.ZodOptional<z.ZodNumber>;
|
|
286
|
+
}, z.core.$strip>;
|
|
287
|
+
type RetryPolicy = z.infer<typeof retryPolicySchema>;
|
|
288
|
+
declare const concurrencyPolicySchema: z.ZodObject<{
|
|
289
|
+
maxParallelRuns: z.ZodOptional<z.ZodNumber>;
|
|
290
|
+
}, z.core.$strip>;
|
|
291
|
+
type ConcurrencyPolicy = z.infer<typeof concurrencyPolicySchema>;
|
|
292
|
+
|
|
293
|
+
declare const teamConfigSchema: z.ZodObject<{
|
|
294
|
+
members: z.ZodArray<z.ZodString>;
|
|
295
|
+
maxConcurrentWorkers: z.ZodOptional<z.ZodNumber>;
|
|
296
|
+
maxTokenBudgetPerWorker: z.ZodOptional<z.ZodNumber>;
|
|
297
|
+
maxDurationPerWorker: z.ZodOptional<z.ZodNumber>;
|
|
298
|
+
}, z.core.$strip>;
|
|
299
|
+
type TeamConfig = z.infer<typeof teamConfigSchema>;
|
|
300
|
+
|
|
301
|
+
declare const triggerConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
302
|
+
type: z.ZodLiteral<"cron">;
|
|
303
|
+
expression: z.ZodString;
|
|
304
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
305
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
306
|
+
type: z.ZodLiteral<"webhook">;
|
|
307
|
+
path: z.ZodString;
|
|
308
|
+
method: z.ZodOptional<z.ZodEnum<{
|
|
309
|
+
GET: "GET";
|
|
310
|
+
POST: "POST";
|
|
311
|
+
}>>;
|
|
312
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
313
|
+
type: z.ZodLiteral<"event">;
|
|
314
|
+
source: z.ZodString;
|
|
315
|
+
event: z.ZodString;
|
|
316
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
317
|
+
type: z.ZodLiteral<"api">;
|
|
318
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
319
|
+
type: z.ZodLiteral<"manual">;
|
|
320
|
+
}, z.core.$strip>], "type">;
|
|
321
|
+
type TriggerConfig = z.infer<typeof triggerConfigSchema>;
|
|
322
|
+
|
|
323
|
+
type AgentInputField = (Omit<PlatformAgentConfig["agent"], "skills"> & {
|
|
324
|
+
outputSchema?: ZodType;
|
|
325
|
+
skills?: SkillRef[];
|
|
326
|
+
}) | {
|
|
327
|
+
definition: Record<string, unknown>;
|
|
328
|
+
name: string;
|
|
329
|
+
run: (...args: unknown[]) => unknown;
|
|
330
|
+
};
|
|
331
|
+
interface PlatformAgentInputConfig extends Omit<PlatformAgentConfig, "agent" | "connectors" | "team" | "actions"> {
|
|
332
|
+
agent: AgentInputField;
|
|
333
|
+
connectors?: ConnectorRef[];
|
|
334
|
+
team?: Omit<PlatformAgentConfig["team"] & object, "members"> & {
|
|
335
|
+
members: TeamMember[];
|
|
336
|
+
};
|
|
337
|
+
actions?: PlatformActions;
|
|
338
|
+
}
|
|
339
|
+
declare const definePlatformAgent: <TOutput extends ZodType = ZodType>(config: PlatformAgentInputConfig & {
|
|
340
|
+
agent: AgentInputField & {
|
|
341
|
+
outputSchema?: TOutput;
|
|
342
|
+
};
|
|
343
|
+
}) => PlatformAgent & {
|
|
344
|
+
outputSchema?: TOutput;
|
|
345
|
+
};
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Define an action variant.
|
|
349
|
+
*
|
|
350
|
+
* Infers handler payload types from the schema.
|
|
351
|
+
*
|
|
352
|
+
* @example
|
|
353
|
+
* ```ts
|
|
354
|
+
* defineAction({
|
|
355
|
+
* schema: z.object({ reason: z.string() }),
|
|
356
|
+
* handler: async (payload) => {
|
|
357
|
+
* payload.reason; // string — fully typed
|
|
358
|
+
* },
|
|
359
|
+
* });
|
|
360
|
+
* ```
|
|
361
|
+
*/
|
|
362
|
+
declare const defineAction: <S extends z.ZodObject<z.ZodRawShape>>(input: ActionVariantInput<S>) => ActionVariantInput<S>;
|
|
363
|
+
/**
|
|
364
|
+
* Define action variants for a platform agent. Actions are typed terminal
|
|
365
|
+
* outputs — the agent's final decision as structured output.
|
|
366
|
+
*
|
|
367
|
+
* Each variant has a name and an object schema. Schemas are serialized
|
|
368
|
+
* to JSON Schema for discovery/storage, and the originals are preserved
|
|
369
|
+
* in-memory for runtime validation.
|
|
370
|
+
*
|
|
371
|
+
* Handler payload types are inferred from the schema automatically:
|
|
372
|
+
*
|
|
373
|
+
* @example
|
|
374
|
+
* ```ts
|
|
375
|
+
* const actions = defineActions({
|
|
376
|
+
* approve: {
|
|
377
|
+
* schema: z.object({ reason: z.string() }),
|
|
378
|
+
* handler: async (payload) => {
|
|
379
|
+
* payload.reason; // string — fully typed
|
|
380
|
+
* },
|
|
381
|
+
* },
|
|
382
|
+
* reject: { schema: z.object({ reason: z.string(), severity: z.number() }) },
|
|
383
|
+
* });
|
|
384
|
+
* ```
|
|
385
|
+
*/
|
|
386
|
+
declare const defineActions: <V extends Record<string, ActionVariantInput>>(variants: V) => PlatformActions;
|
|
387
|
+
/**
|
|
388
|
+
* Build a discriminated-union schema from action definitions.
|
|
389
|
+
* Each variant becomes `z.object({ action: z.literal(name), ...variantSchema })`.
|
|
390
|
+
* Used as the agent's outputSchema to constrain LLM structured output.
|
|
391
|
+
*/
|
|
392
|
+
declare const buildActionOutputSchema: (actions: PlatformActions) => z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
393
|
+
readonly [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
394
|
+
}, z.core.$strip>, ...z.ZodObject<{
|
|
395
|
+
readonly [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
396
|
+
}, z.core.$strip>[]], "action">;
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* Define a connector tool.
|
|
400
|
+
*
|
|
401
|
+
* Infers handler arg types from the `input` schema.
|
|
402
|
+
*/
|
|
403
|
+
declare const defineTool: <T extends z.ZodType>(def: ConnectorToolDef<T>) => ConnectorToolDef<T>;
|
|
404
|
+
declare const defineConnector: <const T extends ConnectorDefinition>(input: T) => PlatformConnector;
|
|
405
|
+
|
|
406
|
+
declare const defineSkill: (input: {
|
|
407
|
+
name: string;
|
|
408
|
+
description?: string;
|
|
409
|
+
}) => PlatformSkill;
|
|
410
|
+
|
|
411
|
+
declare class SecurityError extends Error {
|
|
412
|
+
readonly code = "SECURITY_VIOLATION";
|
|
413
|
+
constructor(message: string);
|
|
414
|
+
}
|
|
415
|
+
declare class ConnectorError extends Error {
|
|
416
|
+
readonly code = "CONNECTOR_ERROR";
|
|
417
|
+
constructor(message: string);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
declare const MANIFEST_START = "---KRAKEN-MANIFEST-START---";
|
|
421
|
+
declare const MANIFEST_END = "---KRAKEN-MANIFEST-END---";
|
|
422
|
+
declare const projectManifestSchema: z.ZodObject<{
|
|
423
|
+
agents: z.ZodArray<z.ZodObject<{
|
|
424
|
+
name: z.ZodString;
|
|
425
|
+
entryPoint: z.ZodString;
|
|
426
|
+
config: z.ZodObject<{
|
|
427
|
+
agent: z.ZodObject<{
|
|
428
|
+
name: z.ZodString;
|
|
429
|
+
model: z.ZodString;
|
|
430
|
+
instructions: z.ZodString;
|
|
431
|
+
description: z.ZodOptional<z.ZodString>;
|
|
432
|
+
skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
433
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
434
|
+
allowTemperatureOverride: z.ZodOptional<z.ZodBoolean>;
|
|
435
|
+
maxOutputTokens: z.ZodOptional<z.ZodNumber>;
|
|
436
|
+
thinkingLevel: z.ZodOptional<z.ZodEnum<{
|
|
437
|
+
low: "low";
|
|
438
|
+
medium: "medium";
|
|
439
|
+
high: "high";
|
|
440
|
+
}>>;
|
|
441
|
+
logLevel: z.ZodOptional<z.ZodEnum<{
|
|
442
|
+
error: "error";
|
|
443
|
+
silent: "silent";
|
|
444
|
+
debug: "debug";
|
|
445
|
+
info: "info";
|
|
446
|
+
warn: "warn";
|
|
447
|
+
}>>;
|
|
448
|
+
}, z.core.$strict>;
|
|
449
|
+
connectors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
450
|
+
trigger: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
451
|
+
type: z.ZodLiteral<"cron">;
|
|
452
|
+
expression: z.ZodString;
|
|
453
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
454
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
455
|
+
type: z.ZodLiteral<"webhook">;
|
|
456
|
+
path: z.ZodString;
|
|
457
|
+
method: z.ZodOptional<z.ZodEnum<{
|
|
458
|
+
GET: "GET";
|
|
459
|
+
POST: "POST";
|
|
460
|
+
}>>;
|
|
461
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
462
|
+
type: z.ZodLiteral<"event">;
|
|
463
|
+
source: z.ZodString;
|
|
464
|
+
event: z.ZodString;
|
|
465
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
466
|
+
type: z.ZodLiteral<"api">;
|
|
467
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
468
|
+
type: z.ZodLiteral<"manual">;
|
|
469
|
+
}, z.core.$strip>], "type">;
|
|
470
|
+
identity: z.ZodOptional<z.ZodObject<{
|
|
471
|
+
basePermissions: z.ZodArray<z.ZodString>;
|
|
472
|
+
requestablePermissions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
473
|
+
jitPolicy: z.ZodOptional<z.ZodEnum<{
|
|
474
|
+
"auto-approve": "auto-approve";
|
|
475
|
+
"policy-based": "policy-based";
|
|
476
|
+
"require-approval": "require-approval";
|
|
477
|
+
}>>;
|
|
478
|
+
maxJitDurationMinutes: z.ZodOptional<z.ZodNumber>;
|
|
479
|
+
}, z.core.$strip>>;
|
|
480
|
+
resources: z.ZodOptional<z.ZodObject<{
|
|
481
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
482
|
+
maxCostUsd: z.ZodOptional<z.ZodNumber>;
|
|
483
|
+
timeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
484
|
+
}, z.core.$strip>>;
|
|
485
|
+
retries: z.ZodOptional<z.ZodObject<{
|
|
486
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
487
|
+
backoffSeconds: z.ZodOptional<z.ZodNumber>;
|
|
488
|
+
}, z.core.$strip>>;
|
|
489
|
+
concurrency: z.ZodOptional<z.ZodObject<{
|
|
490
|
+
maxParallelRuns: z.ZodOptional<z.ZodNumber>;
|
|
491
|
+
}, z.core.$strip>>;
|
|
492
|
+
team: z.ZodOptional<z.ZodObject<{
|
|
493
|
+
members: z.ZodArray<z.ZodString>;
|
|
494
|
+
maxConcurrentWorkers: z.ZodOptional<z.ZodNumber>;
|
|
495
|
+
maxTokenBudgetPerWorker: z.ZodOptional<z.ZodNumber>;
|
|
496
|
+
maxDurationPerWorker: z.ZodOptional<z.ZodNumber>;
|
|
497
|
+
}, z.core.$strip>>;
|
|
498
|
+
notifications: z.ZodOptional<z.ZodObject<{
|
|
499
|
+
slack: z.ZodOptional<z.ZodString>;
|
|
500
|
+
onSuccess: z.ZodOptional<z.ZodBoolean>;
|
|
501
|
+
onFailure: z.ZodOptional<z.ZodBoolean>;
|
|
502
|
+
onTimeout: z.ZodOptional<z.ZodBoolean>;
|
|
503
|
+
}, z.core.$strip>>;
|
|
504
|
+
environment: z.ZodOptional<z.ZodEnum<{
|
|
505
|
+
dev: "dev";
|
|
506
|
+
staging: "staging";
|
|
507
|
+
prod: "prod";
|
|
508
|
+
}>>;
|
|
509
|
+
actions: z.ZodOptional<z.ZodObject<{
|
|
510
|
+
variants: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
511
|
+
schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
512
|
+
webhook: z.ZodOptional<z.ZodString>;
|
|
513
|
+
hasHandler: z.ZodBoolean;
|
|
514
|
+
}, z.core.$strip>>;
|
|
515
|
+
}, z.core.$strict>>;
|
|
516
|
+
}, z.core.$strict>;
|
|
517
|
+
}, z.core.$strip>>;
|
|
518
|
+
skills: z.ZodArray<z.ZodObject<{
|
|
519
|
+
name: z.ZodString;
|
|
520
|
+
path: z.ZodString;
|
|
521
|
+
content: z.ZodString;
|
|
522
|
+
}, z.core.$strip>>;
|
|
523
|
+
connectors: z.ZodArray<z.ZodObject<{
|
|
524
|
+
name: z.ZodString;
|
|
525
|
+
path: z.ZodString;
|
|
526
|
+
}, z.core.$strip>>;
|
|
527
|
+
}, z.core.$strip>;
|
|
528
|
+
type ProjectManifest = z.infer<typeof projectManifestSchema>;
|
|
529
|
+
/** Parse manifest from stdout that may contain noise before/after sentinel markers. */
|
|
530
|
+
declare const parseManifestFromOutput: (stdout: string) => ProjectManifest;
|
|
531
|
+
|
|
532
|
+
declare const runDev: (agent: PlatformAgent) => Promise<never>;
|
|
533
|
+
|
|
534
|
+
interface PlatformClientConfig {
|
|
535
|
+
baseUrl: string;
|
|
536
|
+
apiKey: string;
|
|
537
|
+
}
|
|
538
|
+
interface PaginationParams {
|
|
539
|
+
cursor?: string;
|
|
540
|
+
limit?: number;
|
|
541
|
+
}
|
|
542
|
+
interface PaginatedResponse<T> {
|
|
543
|
+
data: T[];
|
|
544
|
+
cursor: string | null;
|
|
545
|
+
hasMore: boolean;
|
|
546
|
+
}
|
|
547
|
+
type AgentEvent = {
|
|
548
|
+
type: "text";
|
|
549
|
+
content: string;
|
|
550
|
+
} | {
|
|
551
|
+
type: "tool_call";
|
|
552
|
+
name: string;
|
|
553
|
+
args: Record<string, unknown>;
|
|
554
|
+
} | {
|
|
555
|
+
type: "tool_result";
|
|
556
|
+
name: string;
|
|
557
|
+
result: unknown;
|
|
558
|
+
} | {
|
|
559
|
+
type: "thinking";
|
|
560
|
+
content: string;
|
|
561
|
+
} | {
|
|
562
|
+
type: "action";
|
|
563
|
+
name: string;
|
|
564
|
+
payload: Record<string, unknown>;
|
|
565
|
+
actionExecutionId: string;
|
|
566
|
+
} | {
|
|
567
|
+
type: "done";
|
|
568
|
+
output: string;
|
|
569
|
+
usage?: {
|
|
570
|
+
tokens: number;
|
|
571
|
+
};
|
|
572
|
+
} | {
|
|
573
|
+
type: "error";
|
|
574
|
+
message: string;
|
|
575
|
+
code: string;
|
|
576
|
+
};
|
|
577
|
+
interface AgentInfo {
|
|
578
|
+
id: string;
|
|
579
|
+
name: string;
|
|
580
|
+
description?: string;
|
|
581
|
+
}
|
|
582
|
+
interface ThreadInfo {
|
|
583
|
+
id: string;
|
|
584
|
+
agentId: string;
|
|
585
|
+
createdAt: string;
|
|
586
|
+
updatedAt: string;
|
|
587
|
+
}
|
|
588
|
+
interface ThreadMessage {
|
|
589
|
+
id: string;
|
|
590
|
+
threadId: string;
|
|
591
|
+
role: "user" | "assistant";
|
|
592
|
+
content: string;
|
|
593
|
+
toolCalls?: Array<{
|
|
594
|
+
name: string;
|
|
595
|
+
args: Record<string, unknown>;
|
|
596
|
+
result: unknown;
|
|
597
|
+
}>;
|
|
598
|
+
createdAt: string;
|
|
599
|
+
usage?: {
|
|
600
|
+
tokens: number;
|
|
601
|
+
};
|
|
602
|
+
}
|
|
603
|
+
interface QueryInfo {
|
|
604
|
+
name: string;
|
|
605
|
+
description?: string;
|
|
606
|
+
params: Record<string, unknown>;
|
|
607
|
+
columns: QueryColumn[];
|
|
608
|
+
}
|
|
609
|
+
interface QueryColumn {
|
|
610
|
+
name: string;
|
|
611
|
+
type: string;
|
|
612
|
+
description?: string;
|
|
613
|
+
}
|
|
614
|
+
interface QueryResult<TRow = Record<string, unknown>> {
|
|
615
|
+
rows: TRow[];
|
|
616
|
+
cursor: string | null;
|
|
617
|
+
hasMore: boolean;
|
|
618
|
+
}
|
|
619
|
+
type RunState = "QUEUED" | "PROVISIONING" | "RUNNING" | "DRAINING" | "COMPLETED" | "FAILED" | "AWAITING_APPROVAL" | "RETRYING";
|
|
620
|
+
interface RunRecord {
|
|
621
|
+
runId: string;
|
|
622
|
+
agentId: string;
|
|
623
|
+
input: string;
|
|
624
|
+
state: RunState;
|
|
625
|
+
exitCode?: number;
|
|
626
|
+
createdAt: string;
|
|
627
|
+
updatedAt: string;
|
|
628
|
+
retryCount: number;
|
|
629
|
+
error?: string;
|
|
630
|
+
}
|
|
631
|
+
interface StartRunParams {
|
|
632
|
+
agentId: string;
|
|
633
|
+
tag?: string;
|
|
634
|
+
environment?: "dev" | "staging" | "prod";
|
|
635
|
+
input: string;
|
|
636
|
+
connectors?: string[];
|
|
637
|
+
envVars?: Record<string, string>;
|
|
638
|
+
}
|
|
639
|
+
interface RunEvent {
|
|
640
|
+
eventId: string;
|
|
641
|
+
eventType: string;
|
|
642
|
+
payload: Record<string, unknown>;
|
|
643
|
+
}
|
|
644
|
+
interface AgentSchema {
|
|
645
|
+
id: string;
|
|
646
|
+
name: string;
|
|
647
|
+
input: Record<string, unknown>;
|
|
648
|
+
output: Record<string, unknown>;
|
|
649
|
+
actions?: Record<string, Record<string, unknown>>;
|
|
650
|
+
}
|
|
651
|
+
interface QuerySchema$1 {
|
|
652
|
+
name: string;
|
|
653
|
+
params: Record<string, unknown>;
|
|
654
|
+
columns: QueryColumn[];
|
|
655
|
+
}
|
|
656
|
+
interface ConnectorSchema {
|
|
657
|
+
id: string;
|
|
658
|
+
tools: Array<{
|
|
659
|
+
name: string;
|
|
660
|
+
description: string;
|
|
661
|
+
parameters: Record<string, unknown>;
|
|
662
|
+
}>;
|
|
663
|
+
}
|
|
664
|
+
interface SkillSchema {
|
|
665
|
+
id: string;
|
|
666
|
+
name: string;
|
|
667
|
+
description?: string;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
type ToolOverride = (args: Record<string, unknown>) => Promise<unknown> | unknown;
|
|
671
|
+
declare class MockToolSet {
|
|
672
|
+
private readonly defs;
|
|
673
|
+
private readonly overrides;
|
|
674
|
+
private readonly toolNames;
|
|
675
|
+
constructor(tools: ToolDefinition[], overrides?: Record<string, ToolOverride>);
|
|
676
|
+
static fromConnectors(connectors: ConnectorSchema[], opts?: {
|
|
677
|
+
include?: string[];
|
|
678
|
+
overrides?: Record<string, ToolOverride>;
|
|
679
|
+
}): MockToolSet;
|
|
680
|
+
definitions(): ToolDefinition[];
|
|
681
|
+
call(name: string, params: Record<string, unknown>): Promise<unknown>;
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
declare class PlatformError extends Error {
|
|
685
|
+
readonly status: number;
|
|
686
|
+
constructor(message: string, status: number);
|
|
687
|
+
}
|
|
688
|
+
declare class HttpClient {
|
|
689
|
+
readonly baseUrlForStream: string;
|
|
690
|
+
private readonly baseUrl;
|
|
691
|
+
private readonly apiKey;
|
|
692
|
+
constructor(config: PlatformClientConfig);
|
|
693
|
+
get<T>(path: string, params?: Record<string, string>): Promise<T>;
|
|
694
|
+
post<T>(path: string, body?: unknown): Promise<T>;
|
|
695
|
+
postStream(path: string, body: unknown, signal?: AbortSignal): Promise<Response>;
|
|
696
|
+
private buildUrl;
|
|
697
|
+
authHeaders(): Record<string, string>;
|
|
698
|
+
private handleResponse;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
interface AgentRegistryEntry {
|
|
702
|
+
input: unknown;
|
|
703
|
+
output: unknown;
|
|
704
|
+
actions: Record<string, unknown>;
|
|
705
|
+
}
|
|
706
|
+
interface GenerateOpts {
|
|
707
|
+
signal?: AbortSignal;
|
|
708
|
+
}
|
|
709
|
+
interface GenerateResult<T extends AgentRegistryEntry> {
|
|
710
|
+
readonly threadId: string;
|
|
711
|
+
stream(): AsyncIterable<AgentEvent>;
|
|
712
|
+
readonly result: Promise<T["output"]>;
|
|
713
|
+
}
|
|
714
|
+
declare class AgentHandle<T extends AgentRegistryEntry> {
|
|
715
|
+
private readonly http;
|
|
716
|
+
private readonly agentId;
|
|
717
|
+
private readonly actionHandlers;
|
|
718
|
+
private threadId;
|
|
719
|
+
constructor(http: HttpClient, agentId: string, opts?: {
|
|
720
|
+
threadId?: string;
|
|
721
|
+
});
|
|
722
|
+
onAction<K extends keyof T["actions"] & string>(name: K, handler: (payload: T["actions"][K]) => void | Promise<void>): void;
|
|
723
|
+
generate(input: T["input"], opts?: GenerateOpts): Promise<GenerateResult<T>>;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
declare class AgentThread {
|
|
727
|
+
private readonly http;
|
|
728
|
+
private readonly agentId;
|
|
729
|
+
readonly threadId: string;
|
|
730
|
+
constructor(http: HttpClient, agentId: string, threadId: string);
|
|
731
|
+
sendMessage(content: string, opts?: {
|
|
732
|
+
signal?: AbortSignal;
|
|
733
|
+
}): Promise<AsyncIterable<AgentEvent>>;
|
|
734
|
+
getMessages(params?: PaginationParams): Promise<PaginatedResponse<ThreadMessage>>;
|
|
735
|
+
}
|
|
736
|
+
declare class AgentsNamespace {
|
|
737
|
+
private readonly http;
|
|
738
|
+
constructor(http: HttpClient);
|
|
739
|
+
list(): Promise<AgentInfo[]>;
|
|
740
|
+
createThread(agentId: string): Promise<AgentThread>;
|
|
741
|
+
getThread(agentId: string, threadId: string): Promise<AgentThread>;
|
|
742
|
+
listThreads(agentId: string, params?: PaginationParams): Promise<PaginatedResponse<ThreadInfo>>;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
declare class DataNamespace {
|
|
746
|
+
private readonly http;
|
|
747
|
+
constructor(http: HttpClient);
|
|
748
|
+
list(): Promise<QueryInfo[]>;
|
|
749
|
+
describe(queryName: string): Promise<QueryInfo>;
|
|
750
|
+
query<TRow = Record<string, unknown>>(queryName: string, params?: Record<string, unknown>, pagination?: PaginationParams): Promise<QueryResult<TRow>>;
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
interface QuerySchema<P extends z.ZodType, R extends z.ZodType> {
|
|
754
|
+
params: P;
|
|
755
|
+
returns: R;
|
|
756
|
+
}
|
|
757
|
+
declare class PipelinesNamespace {
|
|
758
|
+
private readonly http;
|
|
759
|
+
constructor(http: HttpClient);
|
|
760
|
+
query<P extends z.ZodType, R extends z.ZodType>(pipeline: string, queryName: string, schema: QuerySchema<P, R>, params: z.infer<P>): Promise<z.infer<R>[]>;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
declare class RunsNamespace {
|
|
764
|
+
private readonly http;
|
|
765
|
+
constructor(http: HttpClient);
|
|
766
|
+
start(params: StartRunParams): Promise<{
|
|
767
|
+
runId: string;
|
|
768
|
+
}>;
|
|
769
|
+
get(runId: string): Promise<RunRecord>;
|
|
770
|
+
cancel(runId: string): Promise<{
|
|
771
|
+
success: boolean;
|
|
772
|
+
}>;
|
|
773
|
+
getEvents(runId: string, opts?: {
|
|
774
|
+
afterEventId?: string;
|
|
775
|
+
}): Promise<{
|
|
776
|
+
events: RunEvent[];
|
|
777
|
+
}>;
|
|
778
|
+
streamEvents(runId: string, opts?: {
|
|
779
|
+
signal?: AbortSignal;
|
|
780
|
+
}): AsyncGenerator<RunEvent>;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
declare class PlatformClient {
|
|
784
|
+
readonly agents: AgentsNamespace;
|
|
785
|
+
readonly data: DataNamespace;
|
|
786
|
+
readonly pipelines: PipelinesNamespace;
|
|
787
|
+
readonly runs: RunsNamespace;
|
|
788
|
+
private readonly http;
|
|
789
|
+
constructor(config: PlatformClientConfig);
|
|
790
|
+
agent<T extends AgentRegistryEntry = AgentRegistryEntry>(id: string, opts?: {
|
|
791
|
+
mode?: "local" | "remote";
|
|
792
|
+
threadId?: string;
|
|
793
|
+
}): AgentHandle<T>;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
export { ACTION_NAME_REGEX, type ActionVariantConfig, type ActionVariantInput, type AgentDefinition, type AgentEvent, AgentHandle, type AgentId, type AgentInfo, type AgentRegistryEntry, type AgentSchema, AgentThread, type ConcurrencyPolicy, ConnectorDefinition, ConnectorError, type ConnectorId, type ConnectorRef, type ConnectorSchema, ConnectorToolDef, type Environment, type GenerateOpts, type GenerateResult, type IdentityConfig, type JitPolicy, type KrakenTypeRegistry, MANIFEST_END, MANIFEST_START, McpContent, MockToolSet, type NotificationConfig, type PaginatedResponse, type PaginationParams, type PlatformActions, type PlatformActionsConfig, type PlatformAgent, type PlatformAgentConfig, PlatformClient, type PlatformClientConfig, PlatformConnector, PlatformError, type PlatformSkill, type ProjectManifest, type QueryColumn, type QueryInfo, type QueryResult, type QuerySchema$1 as QuerySchema, type ResourceLimits, type RetryPolicy, type RunEvent, type RunRecord, type RunState, SecurityError, type SkillId, type SkillRef, type SkillSchema, type StartRunParams, type TeamConfig, type TeamMember, type ThreadInfo, type ThreadMessage, type TriggerConfig, actionVariantConfigSchema, actionsConfigSchema, agentDefinitionSchema, buildActionOutputSchema, concurrencyPolicySchema, defineAction, defineActions, defineConnector, definePlatformAgent, defineSkill, defineTool, environmentSchema, identityConfigSchema, isValidActionName, jitPolicySchema, mcpResult, notificationConfigSchema, parseManifestFromOutput, platformAgentConfigSchema, projectManifestSchema, resourceLimitsSchema, retryPolicySchema, runDev, teamConfigSchema, triggerConfigSchema, wrapToolError, wrapToolResult };
|