@lssm/example.agent-console 0.0.0-canary-20251217063201 → 0.0.0-canary-20251217073102
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 +201 -166
- package/CHANGELOG.md +6 -6
- package/dist/agent/agent.contracts.d.ts +126 -126
- package/dist/agent/agent.contracts.js +336 -1
- package/dist/agent/agent.entity.d.ts +36 -36
- package/dist/agent/agent.entity.js +136 -1
- package/dist/agent/agent.enum.d.ts +4 -4
- package/dist/agent/agent.enum.js +34 -1
- package/dist/agent/agent.event.d.ts +31 -31
- package/dist/agent/agent.event.js +183 -1
- package/dist/agent/agent.handler.d.ts +1 -1
- package/dist/agent/agent.handler.js +83 -1
- package/dist/agent/agent.presentation.js +75 -1
- package/dist/agent/agent.schema.d.ts +95 -95
- package/dist/agent/agent.schema.js +407 -1
- package/dist/agent/index.js +9 -1
- package/dist/agent.feature.js +295 -1
- package/dist/docs/agent-console.docblock.js +69 -5
- package/dist/docs/index.js +1 -1
- package/dist/example.js +50 -1
- package/dist/handlers/index.js +5 -1
- package/dist/index.js +32 -1
- package/dist/libs/contracts/dist/capabilities/openbanking.js +88 -1
- package/dist/libs/contracts/dist/client/index.js +5 -1
- package/dist/libs/contracts/dist/client/react/feature-render.js +2 -1
- package/dist/libs/contracts/dist/client/react/form-render.js +4 -1
- package/dist/libs/contracts/dist/client/react/index.js +4 -1
- package/dist/libs/contracts/dist/contract-registry/index.js +1 -1
- package/dist/libs/contracts/dist/contract-registry/schemas.js +60 -1
- package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +16 -76
- package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +16 -350
- package/dist/libs/contracts/dist/docs/index.js +29 -1
- package/dist/libs/contracts/dist/docs/presentations.js +71 -1
- package/dist/libs/contracts/dist/docs/registry.js +44 -1
- package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +16 -383
- package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +16 -68
- package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +16 -140
- package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +16 -86
- package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +16 -1
- package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +24 -2
- package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +21 -2
- package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +16 -213
- package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +73 -5
- package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +37 -1
- package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +16 -1
- package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +20 -262
- package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +48 -1
- package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +24 -2
- package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +23 -2
- package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +25 -16
- package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +67 -1
- package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +22 -2
- package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +40 -36
- package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +47 -1
- package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +23 -2
- package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +36 -3
- package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +20 -1
- package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +36 -3
- package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +20 -1
- package/dist/libs/contracts/dist/events.js +10 -1
- package/dist/libs/contracts/dist/experiments/evaluator.js +1 -1
- package/dist/libs/contracts/dist/index.js +71 -1
- package/dist/libs/contracts/dist/install.js +2 -1
- package/dist/libs/contracts/dist/integrations/contracts.js +377 -1
- package/dist/libs/contracts/dist/integrations/index.js +18 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +228 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +159 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +3 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +210 -1
- package/dist/libs/contracts/dist/integrations/openbanking/models.js +242 -1
- package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +13 -1
- package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +52 -1
- package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +75 -1
- package/dist/libs/contracts/dist/integrations/providers/gmail.js +87 -1
- package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +66 -1
- package/dist/libs/contracts/dist/integrations/providers/index.js +11 -1
- package/dist/libs/contracts/dist/integrations/providers/mistral.js +68 -1
- package/dist/libs/contracts/dist/integrations/providers/postmark.js +68 -1
- package/dist/libs/contracts/dist/integrations/providers/powens.js +116 -1
- package/dist/libs/contracts/dist/integrations/providers/qdrant.js +73 -1
- package/dist/libs/contracts/dist/integrations/providers/registry.js +10 -1
- package/dist/libs/contracts/dist/integrations/providers/stripe.js +83 -1
- package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +61 -1
- package/dist/libs/contracts/dist/jsonschema.js +1 -1
- package/dist/libs/contracts/dist/knowledge/contracts.js +306 -1
- package/dist/libs/contracts/dist/knowledge/index.js +7 -1
- package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +34 -1
- package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +34 -1
- package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +38 -1
- package/dist/libs/contracts/dist/knowledge/spaces/index.js +6 -1
- package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +34 -1
- package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +37 -1
- package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +34 -1
- package/dist/libs/contracts/dist/llm/exporters.js +19 -1
- package/dist/libs/contracts/dist/llm/index.js +2 -1
- package/dist/libs/contracts/dist/llm/prompts.js +1 -1
- package/dist/libs/contracts/dist/onboarding-base.js +196 -1
- package/dist/libs/contracts/dist/openapi.js +1 -1
- package/dist/libs/contracts/dist/ownership.js +21 -1
- package/dist/libs/contracts/dist/presentations.js +1 -1
- package/dist/libs/contracts/dist/presentations.v2.js +11 -1
- package/dist/libs/contracts/dist/prompt.js +1 -1
- package/dist/libs/contracts/dist/promptRegistry.js +1 -1
- package/dist/libs/contracts/dist/regenerator/index.js +1 -1
- package/dist/libs/contracts/dist/regenerator/service.js +6 -1
- package/dist/libs/contracts/dist/registry.js +2 -1
- package/dist/libs/contracts/dist/resources.js +1 -1
- package/dist/libs/contracts/dist/schema/dist/EnumType.js +2 -1
- package/dist/libs/contracts/dist/schema/dist/FieldType.js +49 -1
- package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +236 -1
- package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +39 -1
- package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +1 -1
- package/dist/libs/contracts/dist/schema/dist/entity/index.js +2 -1
- package/dist/libs/contracts/dist/schema/dist/entity/types.js +1 -1
- package/dist/libs/contracts/dist/schema/dist/index.js +6 -1
- package/dist/libs/contracts/dist/server/graphql-pothos.js +6 -1
- package/dist/libs/contracts/dist/server/index.js +8 -1
- package/dist/libs/contracts/dist/server/mcp/createMcpServer.js +4 -1
- package/dist/libs/contracts/dist/server/mcp/registerPresentations.js +2 -1
- package/dist/libs/contracts/dist/server/mcp/registerPrompts.js +1 -1
- package/dist/libs/contracts/dist/server/mcp/registerResources.js +2 -1
- package/dist/libs/contracts/dist/server/mcp/registerTools.js +1 -1
- package/dist/libs/contracts/dist/server/provider-mcp.js +1 -1
- package/dist/libs/contracts/dist/server/rest-elysia.js +1 -1
- package/dist/libs/contracts/dist/server/rest-express.js +1 -1
- package/dist/libs/contracts/dist/server/rest-generic.js +1 -1
- package/dist/libs/contracts/dist/server/rest-next-app.js +1 -1
- package/dist/libs/contracts/dist/server/rest-next-pages.js +1 -1
- package/dist/libs/contracts/dist/spec.js +34 -1
- package/dist/libs/contracts/dist/telemetry/index.js +1 -1
- package/dist/libs/contracts/dist/telemetry/tracker.js +1 -1
- package/dist/libs/contracts/dist/tests/index.js +1 -1
- package/dist/libs/contracts/dist/tests/runner.js +2 -1
- package/dist/libs/contracts/dist/workflow/index.js +1 -1
- package/dist/libs/contracts/dist/workflow/runner.js +1 -1
- package/dist/libs/schema/dist/EnumType.js +56 -1
- package/dist/libs/schema/dist/FieldType.js +49 -1
- package/dist/libs/schema/dist/ScalarTypeEnum.js +236 -1
- package/dist/libs/schema/dist/SchemaModel.js +39 -1
- package/dist/libs/schema/dist/entity/defineEntity.js +236 -1
- package/dist/libs/schema/dist/entity/index.js +2 -1
- package/dist/libs/schema/dist/entity/types.js +1 -1
- package/dist/libs/schema/dist/index.js +6 -1
- package/dist/presentations/index.js +5 -1
- package/dist/run/index.js +9 -1
- package/dist/run/run.contracts.d.ts +175 -175
- package/dist/run/run.contracts.js +469 -1
- package/dist/run/run.entity.d.ts +56 -56
- package/dist/run/run.entity.js +205 -1
- package/dist/run/run.enum.d.ts +5 -5
- package/dist/run/run.enum.js +45 -1
- package/dist/run/run.event.d.ts +71 -71
- package/dist/run/run.event.js +389 -1
- package/dist/run/run.handler.js +82 -1
- package/dist/run/run.presentation.js +55 -1
- package/dist/run/run.schema.d.ts +99 -99
- package/dist/run/run.schema.js +339 -1
- package/dist/shared/index.js +5 -1
- package/dist/shared/mock-agents.js +93 -1
- package/dist/shared/mock-runs.js +117 -1
- package/dist/shared/mock-tools.js +180 -1
- package/dist/tool/index.js +9 -1
- package/dist/tool/tool.contracts.d.ts +101 -101
- package/dist/tool/tool.contracts.js +288 -1
- package/dist/tool/tool.entity.d.ts +24 -24
- package/dist/tool/tool.entity.js +105 -1
- package/dist/tool/tool.enum.d.ts +4 -4
- package/dist/tool/tool.enum.js +35 -1
- package/dist/tool/tool.event.d.ts +25 -25
- package/dist/tool/tool.event.js +145 -1
- package/dist/tool/tool.handler.d.ts +1 -1
- package/dist/tool/tool.handler.js +86 -1
- package/dist/tool/tool.presentation.js +55 -1
- package/dist/tool/tool.schema.d.ts +52 -52
- package/dist/tool/tool.schema.js +237 -1
- package/package.json +8 -8
|
@@ -1 +1,469 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { ScalarTypeEnum } from "../libs/schema/dist/ScalarTypeEnum.js";
|
|
2
|
+
import { defineSchemaModel } from "../libs/schema/dist/SchemaModel.js";
|
|
3
|
+
import "../libs/schema/dist/index.js";
|
|
4
|
+
import { defineCommand, defineQuery } from "../libs/contracts/dist/spec.js";
|
|
5
|
+
import { GranularityEnum, LogLevelEnum, RunStatusEnum } from "./run.enum.js";
|
|
6
|
+
import { RunInputModel, RunLogModel, RunModel, RunStepModel, RunSummaryModel, TimelineDataPointModel } from "./run.schema.js";
|
|
7
|
+
|
|
8
|
+
//#region src/run/run.contracts.ts
|
|
9
|
+
const OWNERS = ["agent-console-team"];
|
|
10
|
+
/**
|
|
11
|
+
* ExecuteAgentCommand - Starts a new agent run.
|
|
12
|
+
*/
|
|
13
|
+
const ExecuteAgentCommand = defineCommand({
|
|
14
|
+
meta: {
|
|
15
|
+
name: "agent.run.execute",
|
|
16
|
+
version: 1,
|
|
17
|
+
stability: "stable",
|
|
18
|
+
owners: [...OWNERS],
|
|
19
|
+
tags: ["run", "execute"],
|
|
20
|
+
description: "Starts a new agent run with the given input.",
|
|
21
|
+
goal: "Execute an AI agent with user input.",
|
|
22
|
+
context: "Called from chat interface or API."
|
|
23
|
+
},
|
|
24
|
+
io: {
|
|
25
|
+
input: defineSchemaModel({
|
|
26
|
+
name: "ExecuteAgentInput",
|
|
27
|
+
fields: {
|
|
28
|
+
agentId: {
|
|
29
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
30
|
+
isOptional: false
|
|
31
|
+
},
|
|
32
|
+
input: {
|
|
33
|
+
type: RunInputModel,
|
|
34
|
+
isOptional: false
|
|
35
|
+
},
|
|
36
|
+
sessionId: {
|
|
37
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
38
|
+
isOptional: true
|
|
39
|
+
},
|
|
40
|
+
metadata: {
|
|
41
|
+
type: ScalarTypeEnum.JSONObject(),
|
|
42
|
+
isOptional: true
|
|
43
|
+
},
|
|
44
|
+
stream: {
|
|
45
|
+
type: ScalarTypeEnum.Boolean(),
|
|
46
|
+
isOptional: true
|
|
47
|
+
},
|
|
48
|
+
maxIterations: {
|
|
49
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
50
|
+
isOptional: true
|
|
51
|
+
},
|
|
52
|
+
timeoutMs: {
|
|
53
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
54
|
+
isOptional: true
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}),
|
|
58
|
+
output: defineSchemaModel({
|
|
59
|
+
name: "ExecuteAgentOutput",
|
|
60
|
+
fields: {
|
|
61
|
+
runId: {
|
|
62
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
63
|
+
isOptional: false
|
|
64
|
+
},
|
|
65
|
+
status: {
|
|
66
|
+
type: RunStatusEnum,
|
|
67
|
+
isOptional: false
|
|
68
|
+
},
|
|
69
|
+
estimatedWaitMs: {
|
|
70
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
71
|
+
isOptional: true
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}),
|
|
75
|
+
errors: {
|
|
76
|
+
AGENT_NOT_FOUND: {
|
|
77
|
+
description: "The specified agent does not exist",
|
|
78
|
+
http: 404,
|
|
79
|
+
gqlCode: "AGENT_NOT_FOUND",
|
|
80
|
+
when: "Agent ID is invalid"
|
|
81
|
+
},
|
|
82
|
+
AGENT_NOT_ACTIVE: {
|
|
83
|
+
description: "The specified agent is not active",
|
|
84
|
+
http: 400,
|
|
85
|
+
gqlCode: "AGENT_NOT_ACTIVE",
|
|
86
|
+
when: "Agent is in draft/paused/archived state"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
policy: { auth: "user" },
|
|
91
|
+
sideEffects: {
|
|
92
|
+
emits: [{
|
|
93
|
+
name: "run.started",
|
|
94
|
+
version: 1,
|
|
95
|
+
when: "Run is queued",
|
|
96
|
+
payload: RunSummaryModel
|
|
97
|
+
}],
|
|
98
|
+
audit: ["run.started"]
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
/**
|
|
102
|
+
* CancelRunCommand - Cancels an in-progress run.
|
|
103
|
+
*/
|
|
104
|
+
const CancelRunCommand = defineCommand({
|
|
105
|
+
meta: {
|
|
106
|
+
name: "agent.run.cancel",
|
|
107
|
+
version: 1,
|
|
108
|
+
stability: "stable",
|
|
109
|
+
owners: [...OWNERS],
|
|
110
|
+
tags: ["run", "cancel"],
|
|
111
|
+
description: "Cancels an in-progress agent run.",
|
|
112
|
+
goal: "Stop a running agent execution.",
|
|
113
|
+
context: "Called when user wants to abort a long-running task."
|
|
114
|
+
},
|
|
115
|
+
io: {
|
|
116
|
+
input: defineSchemaModel({
|
|
117
|
+
name: "CancelRunInput",
|
|
118
|
+
fields: {
|
|
119
|
+
runId: {
|
|
120
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
121
|
+
isOptional: false
|
|
122
|
+
},
|
|
123
|
+
reason: {
|
|
124
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
125
|
+
isOptional: true
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}),
|
|
129
|
+
output: defineSchemaModel({
|
|
130
|
+
name: "CancelRunOutput",
|
|
131
|
+
fields: {
|
|
132
|
+
success: {
|
|
133
|
+
type: ScalarTypeEnum.Boolean(),
|
|
134
|
+
isOptional: false
|
|
135
|
+
},
|
|
136
|
+
status: {
|
|
137
|
+
type: RunStatusEnum,
|
|
138
|
+
isOptional: false
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}),
|
|
142
|
+
errors: {
|
|
143
|
+
RUN_NOT_FOUND: {
|
|
144
|
+
description: "The specified run does not exist",
|
|
145
|
+
http: 404,
|
|
146
|
+
gqlCode: "RUN_NOT_FOUND",
|
|
147
|
+
when: "Run ID is invalid"
|
|
148
|
+
},
|
|
149
|
+
RUN_NOT_CANCELLABLE: {
|
|
150
|
+
description: "The run cannot be cancelled",
|
|
151
|
+
http: 400,
|
|
152
|
+
gqlCode: "RUN_NOT_CANCELLABLE",
|
|
153
|
+
when: "Run is already completed/failed/cancelled"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
policy: { auth: "user" },
|
|
158
|
+
sideEffects: {
|
|
159
|
+
emits: [{
|
|
160
|
+
name: "run.cancelled",
|
|
161
|
+
version: 1,
|
|
162
|
+
when: "Run is cancelled",
|
|
163
|
+
payload: RunSummaryModel
|
|
164
|
+
}],
|
|
165
|
+
audit: ["run.cancelled"]
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
/**
|
|
169
|
+
* GetRunQuery - Retrieves a run by ID.
|
|
170
|
+
*/
|
|
171
|
+
const GetRunQuery = defineQuery({
|
|
172
|
+
meta: {
|
|
173
|
+
name: "agent.run.get",
|
|
174
|
+
version: 1,
|
|
175
|
+
stability: "stable",
|
|
176
|
+
owners: [...OWNERS],
|
|
177
|
+
tags: ["run", "get"],
|
|
178
|
+
description: "Retrieves a run by its ID with optional details.",
|
|
179
|
+
goal: "View detailed run information.",
|
|
180
|
+
context: "Run details page or monitoring."
|
|
181
|
+
},
|
|
182
|
+
io: {
|
|
183
|
+
input: defineSchemaModel({
|
|
184
|
+
name: "GetRunInput",
|
|
185
|
+
fields: {
|
|
186
|
+
runId: {
|
|
187
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
188
|
+
isOptional: false
|
|
189
|
+
},
|
|
190
|
+
includeSteps: {
|
|
191
|
+
type: ScalarTypeEnum.Boolean(),
|
|
192
|
+
isOptional: true
|
|
193
|
+
},
|
|
194
|
+
includeLogs: {
|
|
195
|
+
type: ScalarTypeEnum.Boolean(),
|
|
196
|
+
isOptional: true
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}),
|
|
200
|
+
output: RunModel,
|
|
201
|
+
errors: { RUN_NOT_FOUND: {
|
|
202
|
+
description: "The specified run does not exist",
|
|
203
|
+
http: 404,
|
|
204
|
+
gqlCode: "RUN_NOT_FOUND",
|
|
205
|
+
when: "Run ID is invalid"
|
|
206
|
+
} }
|
|
207
|
+
},
|
|
208
|
+
policy: { auth: "user" }
|
|
209
|
+
});
|
|
210
|
+
/**
|
|
211
|
+
* ListRunsQuery - Lists runs for an organization or agent.
|
|
212
|
+
*/
|
|
213
|
+
const ListRunsQuery = defineQuery({
|
|
214
|
+
meta: {
|
|
215
|
+
name: "agent.run.list",
|
|
216
|
+
version: 1,
|
|
217
|
+
stability: "stable",
|
|
218
|
+
owners: [...OWNERS],
|
|
219
|
+
tags: ["run", "list"],
|
|
220
|
+
description: "Lists runs with optional filtering.",
|
|
221
|
+
goal: "Browse and search run history.",
|
|
222
|
+
context: "Run history/dashboard view."
|
|
223
|
+
},
|
|
224
|
+
io: {
|
|
225
|
+
input: defineSchemaModel({
|
|
226
|
+
name: "ListRunsInput",
|
|
227
|
+
fields: {
|
|
228
|
+
organizationId: {
|
|
229
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
230
|
+
isOptional: true
|
|
231
|
+
},
|
|
232
|
+
agentId: {
|
|
233
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
234
|
+
isOptional: true
|
|
235
|
+
},
|
|
236
|
+
userId: {
|
|
237
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
238
|
+
isOptional: true
|
|
239
|
+
},
|
|
240
|
+
sessionId: {
|
|
241
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
242
|
+
isOptional: true
|
|
243
|
+
},
|
|
244
|
+
status: {
|
|
245
|
+
type: RunStatusEnum,
|
|
246
|
+
isOptional: true
|
|
247
|
+
},
|
|
248
|
+
startDate: {
|
|
249
|
+
type: ScalarTypeEnum.DateTime(),
|
|
250
|
+
isOptional: true
|
|
251
|
+
},
|
|
252
|
+
endDate: {
|
|
253
|
+
type: ScalarTypeEnum.DateTime(),
|
|
254
|
+
isOptional: true
|
|
255
|
+
},
|
|
256
|
+
limit: {
|
|
257
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
258
|
+
isOptional: true,
|
|
259
|
+
defaultValue: 20
|
|
260
|
+
},
|
|
261
|
+
offset: {
|
|
262
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
263
|
+
isOptional: true,
|
|
264
|
+
defaultValue: 0
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}),
|
|
268
|
+
output: defineSchemaModel({
|
|
269
|
+
name: "ListRunsOutput",
|
|
270
|
+
fields: {
|
|
271
|
+
items: {
|
|
272
|
+
type: RunSummaryModel,
|
|
273
|
+
isArray: true,
|
|
274
|
+
isOptional: false
|
|
275
|
+
},
|
|
276
|
+
total: {
|
|
277
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
278
|
+
isOptional: false
|
|
279
|
+
},
|
|
280
|
+
hasMore: {
|
|
281
|
+
type: ScalarTypeEnum.Boolean(),
|
|
282
|
+
isOptional: false
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
})
|
|
286
|
+
},
|
|
287
|
+
policy: { auth: "user" }
|
|
288
|
+
});
|
|
289
|
+
/**
|
|
290
|
+
* GetRunStepsQuery - Retrieves steps for a run.
|
|
291
|
+
*/
|
|
292
|
+
const GetRunStepsQuery = defineQuery({
|
|
293
|
+
meta: {
|
|
294
|
+
name: "agent.run.getSteps",
|
|
295
|
+
version: 1,
|
|
296
|
+
stability: "stable",
|
|
297
|
+
owners: [...OWNERS],
|
|
298
|
+
tags: ["run", "steps"],
|
|
299
|
+
description: "Retrieves all steps for a specific run.",
|
|
300
|
+
goal: "View step-by-step execution details.",
|
|
301
|
+
context: "Run details page - steps tab."
|
|
302
|
+
},
|
|
303
|
+
io: {
|
|
304
|
+
input: defineSchemaModel({
|
|
305
|
+
name: "GetRunStepsInput",
|
|
306
|
+
fields: { runId: {
|
|
307
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
308
|
+
isOptional: false
|
|
309
|
+
} }
|
|
310
|
+
}),
|
|
311
|
+
output: defineSchemaModel({
|
|
312
|
+
name: "GetRunStepsOutput",
|
|
313
|
+
fields: { steps: {
|
|
314
|
+
type: RunStepModel,
|
|
315
|
+
isArray: true,
|
|
316
|
+
isOptional: false
|
|
317
|
+
} }
|
|
318
|
+
})
|
|
319
|
+
},
|
|
320
|
+
policy: { auth: "user" }
|
|
321
|
+
});
|
|
322
|
+
/**
|
|
323
|
+
* GetRunLogsQuery - Retrieves logs for a run.
|
|
324
|
+
*/
|
|
325
|
+
const GetRunLogsQuery = defineQuery({
|
|
326
|
+
meta: {
|
|
327
|
+
name: "agent.run.getLogs",
|
|
328
|
+
version: 1,
|
|
329
|
+
stability: "stable",
|
|
330
|
+
owners: [...OWNERS],
|
|
331
|
+
tags: ["run", "logs"],
|
|
332
|
+
description: "Retrieves all logs for a specific run.",
|
|
333
|
+
goal: "Debug and audit run execution.",
|
|
334
|
+
context: "Run details page - logs tab."
|
|
335
|
+
},
|
|
336
|
+
io: {
|
|
337
|
+
input: defineSchemaModel({
|
|
338
|
+
name: "GetRunLogsInput",
|
|
339
|
+
fields: {
|
|
340
|
+
runId: {
|
|
341
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
342
|
+
isOptional: false
|
|
343
|
+
},
|
|
344
|
+
level: {
|
|
345
|
+
type: LogLevelEnum,
|
|
346
|
+
isOptional: true
|
|
347
|
+
},
|
|
348
|
+
stepId: {
|
|
349
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
350
|
+
isOptional: true
|
|
351
|
+
},
|
|
352
|
+
limit: {
|
|
353
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
354
|
+
isOptional: true,
|
|
355
|
+
defaultValue: 100
|
|
356
|
+
},
|
|
357
|
+
offset: {
|
|
358
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
359
|
+
isOptional: true,
|
|
360
|
+
defaultValue: 0
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}),
|
|
364
|
+
output: defineSchemaModel({
|
|
365
|
+
name: "GetRunLogsOutput",
|
|
366
|
+
fields: {
|
|
367
|
+
items: {
|
|
368
|
+
type: RunLogModel,
|
|
369
|
+
isArray: true,
|
|
370
|
+
isOptional: false
|
|
371
|
+
},
|
|
372
|
+
total: {
|
|
373
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
374
|
+
isOptional: false
|
|
375
|
+
},
|
|
376
|
+
hasMore: {
|
|
377
|
+
type: ScalarTypeEnum.Boolean(),
|
|
378
|
+
isOptional: false
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
})
|
|
382
|
+
},
|
|
383
|
+
policy: { auth: "user" }
|
|
384
|
+
});
|
|
385
|
+
/**
|
|
386
|
+
* GetRunMetricsQuery - Retrieves aggregated metrics for runs.
|
|
387
|
+
*/
|
|
388
|
+
const GetRunMetricsQuery = defineQuery({
|
|
389
|
+
meta: {
|
|
390
|
+
name: "agent.run.getMetrics",
|
|
391
|
+
version: 1,
|
|
392
|
+
stability: "stable",
|
|
393
|
+
owners: [...OWNERS],
|
|
394
|
+
tags: ["run", "metrics"],
|
|
395
|
+
description: "Retrieves aggregated metrics for runs within a time period.",
|
|
396
|
+
goal: "Monitor and analyze agent usage.",
|
|
397
|
+
context: "Analytics dashboard."
|
|
398
|
+
},
|
|
399
|
+
io: {
|
|
400
|
+
input: defineSchemaModel({
|
|
401
|
+
name: "GetRunMetricsInput",
|
|
402
|
+
fields: {
|
|
403
|
+
organizationId: {
|
|
404
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
405
|
+
isOptional: false
|
|
406
|
+
},
|
|
407
|
+
agentId: {
|
|
408
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
409
|
+
isOptional: true
|
|
410
|
+
},
|
|
411
|
+
startDate: {
|
|
412
|
+
type: ScalarTypeEnum.DateTime(),
|
|
413
|
+
isOptional: false
|
|
414
|
+
},
|
|
415
|
+
endDate: {
|
|
416
|
+
type: ScalarTypeEnum.DateTime(),
|
|
417
|
+
isOptional: false
|
|
418
|
+
},
|
|
419
|
+
granularity: {
|
|
420
|
+
type: GranularityEnum,
|
|
421
|
+
isOptional: true,
|
|
422
|
+
defaultValue: "day"
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
}),
|
|
426
|
+
output: defineSchemaModel({
|
|
427
|
+
name: "GetRunMetricsOutput",
|
|
428
|
+
fields: {
|
|
429
|
+
totalRuns: {
|
|
430
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
431
|
+
isOptional: false
|
|
432
|
+
},
|
|
433
|
+
completedRuns: {
|
|
434
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
435
|
+
isOptional: false
|
|
436
|
+
},
|
|
437
|
+
failedRuns: {
|
|
438
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
439
|
+
isOptional: false
|
|
440
|
+
},
|
|
441
|
+
totalTokens: {
|
|
442
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
443
|
+
isOptional: false
|
|
444
|
+
},
|
|
445
|
+
totalCostUsd: {
|
|
446
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
447
|
+
isOptional: false
|
|
448
|
+
},
|
|
449
|
+
averageDurationMs: {
|
|
450
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
451
|
+
isOptional: false
|
|
452
|
+
},
|
|
453
|
+
successRate: {
|
|
454
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
455
|
+
isOptional: false
|
|
456
|
+
},
|
|
457
|
+
timeline: {
|
|
458
|
+
type: TimelineDataPointModel,
|
|
459
|
+
isArray: true,
|
|
460
|
+
isOptional: false
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
})
|
|
464
|
+
},
|
|
465
|
+
policy: { auth: "user" }
|
|
466
|
+
});
|
|
467
|
+
|
|
468
|
+
//#endregion
|
|
469
|
+
export { CancelRunCommand, ExecuteAgentCommand, GetRunLogsQuery, GetRunMetricsQuery, GetRunQuery, GetRunStepsQuery, ListRunsQuery };
|
package/dist/run/run.entity.d.ts
CHANGED
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _lssm_lib_schema34 from "@lssm/lib.schema";
|
|
2
2
|
|
|
3
3
|
//#region src/run/run.entity.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Run status enum for entities.
|
|
6
6
|
*/
|
|
7
|
-
declare const RunStatusEntityEnum:
|
|
7
|
+
declare const RunStatusEntityEnum: _lssm_lib_schema34.EntityEnumDef;
|
|
8
8
|
/**
|
|
9
9
|
* Run step type enum for entities.
|
|
10
10
|
*/
|
|
11
|
-
declare const RunStepTypeEntityEnum:
|
|
11
|
+
declare const RunStepTypeEntityEnum: _lssm_lib_schema34.EntityEnumDef;
|
|
12
12
|
/**
|
|
13
13
|
* Log level enum for entities.
|
|
14
14
|
*/
|
|
15
|
-
declare const LogLevelEntityEnum:
|
|
15
|
+
declare const LogLevelEntityEnum: _lssm_lib_schema34.EntityEnumDef;
|
|
16
16
|
/**
|
|
17
17
|
* Run entity - Represents an agent execution.
|
|
18
18
|
*/
|
|
19
|
-
declare const RunEntity:
|
|
20
|
-
id:
|
|
21
|
-
organizationId:
|
|
22
|
-
agentId:
|
|
23
|
-
userId:
|
|
24
|
-
sessionId:
|
|
25
|
-
input:
|
|
26
|
-
output:
|
|
27
|
-
status:
|
|
28
|
-
errorMessage:
|
|
29
|
-
errorCode:
|
|
30
|
-
totalTokens:
|
|
31
|
-
promptTokens:
|
|
32
|
-
completionTokens:
|
|
33
|
-
totalIterations:
|
|
34
|
-
durationMs:
|
|
35
|
-
estimatedCostUsd:
|
|
36
|
-
queuedAt:
|
|
37
|
-
startedAt:
|
|
38
|
-
completedAt:
|
|
39
|
-
metadata:
|
|
40
|
-
agent:
|
|
41
|
-
steps:
|
|
42
|
-
logs:
|
|
19
|
+
declare const RunEntity: _lssm_lib_schema34.EntitySpec<{
|
|
20
|
+
id: _lssm_lib_schema34.EntityScalarField;
|
|
21
|
+
organizationId: _lssm_lib_schema34.EntityScalarField;
|
|
22
|
+
agentId: _lssm_lib_schema34.EntityScalarField;
|
|
23
|
+
userId: _lssm_lib_schema34.EntityScalarField;
|
|
24
|
+
sessionId: _lssm_lib_schema34.EntityScalarField;
|
|
25
|
+
input: _lssm_lib_schema34.EntityScalarField;
|
|
26
|
+
output: _lssm_lib_schema34.EntityScalarField;
|
|
27
|
+
status: _lssm_lib_schema34.EntityEnumField;
|
|
28
|
+
errorMessage: _lssm_lib_schema34.EntityScalarField;
|
|
29
|
+
errorCode: _lssm_lib_schema34.EntityScalarField;
|
|
30
|
+
totalTokens: _lssm_lib_schema34.EntityScalarField;
|
|
31
|
+
promptTokens: _lssm_lib_schema34.EntityScalarField;
|
|
32
|
+
completionTokens: _lssm_lib_schema34.EntityScalarField;
|
|
33
|
+
totalIterations: _lssm_lib_schema34.EntityScalarField;
|
|
34
|
+
durationMs: _lssm_lib_schema34.EntityScalarField;
|
|
35
|
+
estimatedCostUsd: _lssm_lib_schema34.EntityScalarField;
|
|
36
|
+
queuedAt: _lssm_lib_schema34.EntityScalarField;
|
|
37
|
+
startedAt: _lssm_lib_schema34.EntityScalarField;
|
|
38
|
+
completedAt: _lssm_lib_schema34.EntityScalarField;
|
|
39
|
+
metadata: _lssm_lib_schema34.EntityScalarField;
|
|
40
|
+
agent: _lssm_lib_schema34.EntityRelationField;
|
|
41
|
+
steps: _lssm_lib_schema34.EntityRelationField;
|
|
42
|
+
logs: _lssm_lib_schema34.EntityRelationField;
|
|
43
43
|
}>;
|
|
44
44
|
/**
|
|
45
45
|
* RunStep entity - Individual step in a run.
|
|
46
46
|
*/
|
|
47
|
-
declare const RunStepEntity:
|
|
48
|
-
id:
|
|
49
|
-
runId:
|
|
50
|
-
stepNumber:
|
|
51
|
-
type:
|
|
52
|
-
toolId:
|
|
53
|
-
toolName:
|
|
54
|
-
input:
|
|
55
|
-
output:
|
|
56
|
-
status:
|
|
57
|
-
errorMessage:
|
|
58
|
-
tokensUsed:
|
|
59
|
-
durationMs:
|
|
60
|
-
startedAt:
|
|
61
|
-
completedAt:
|
|
62
|
-
run:
|
|
47
|
+
declare const RunStepEntity: _lssm_lib_schema34.EntitySpec<{
|
|
48
|
+
id: _lssm_lib_schema34.EntityScalarField;
|
|
49
|
+
runId: _lssm_lib_schema34.EntityScalarField;
|
|
50
|
+
stepNumber: _lssm_lib_schema34.EntityScalarField;
|
|
51
|
+
type: _lssm_lib_schema34.EntityEnumField;
|
|
52
|
+
toolId: _lssm_lib_schema34.EntityScalarField;
|
|
53
|
+
toolName: _lssm_lib_schema34.EntityScalarField;
|
|
54
|
+
input: _lssm_lib_schema34.EntityScalarField;
|
|
55
|
+
output: _lssm_lib_schema34.EntityScalarField;
|
|
56
|
+
status: _lssm_lib_schema34.EntityEnumField;
|
|
57
|
+
errorMessage: _lssm_lib_schema34.EntityScalarField;
|
|
58
|
+
tokensUsed: _lssm_lib_schema34.EntityScalarField;
|
|
59
|
+
durationMs: _lssm_lib_schema34.EntityScalarField;
|
|
60
|
+
startedAt: _lssm_lib_schema34.EntityScalarField;
|
|
61
|
+
completedAt: _lssm_lib_schema34.EntityScalarField;
|
|
62
|
+
run: _lssm_lib_schema34.EntityRelationField;
|
|
63
63
|
}>;
|
|
64
64
|
/**
|
|
65
65
|
* RunLog entity - Log entry for a run.
|
|
66
66
|
*/
|
|
67
|
-
declare const RunLogEntity:
|
|
68
|
-
id:
|
|
69
|
-
runId:
|
|
70
|
-
stepId:
|
|
71
|
-
level:
|
|
72
|
-
message:
|
|
73
|
-
data:
|
|
74
|
-
source:
|
|
75
|
-
traceId:
|
|
76
|
-
spanId:
|
|
77
|
-
timestamp:
|
|
78
|
-
run:
|
|
67
|
+
declare const RunLogEntity: _lssm_lib_schema34.EntitySpec<{
|
|
68
|
+
id: _lssm_lib_schema34.EntityScalarField;
|
|
69
|
+
runId: _lssm_lib_schema34.EntityScalarField;
|
|
70
|
+
stepId: _lssm_lib_schema34.EntityScalarField;
|
|
71
|
+
level: _lssm_lib_schema34.EntityEnumField;
|
|
72
|
+
message: _lssm_lib_schema34.EntityScalarField;
|
|
73
|
+
data: _lssm_lib_schema34.EntityScalarField;
|
|
74
|
+
source: _lssm_lib_schema34.EntityScalarField;
|
|
75
|
+
traceId: _lssm_lib_schema34.EntityScalarField;
|
|
76
|
+
spanId: _lssm_lib_schema34.EntityScalarField;
|
|
77
|
+
timestamp: _lssm_lib_schema34.EntityScalarField;
|
|
78
|
+
run: _lssm_lib_schema34.EntityRelationField;
|
|
79
79
|
}>;
|
|
80
80
|
//#endregion
|
|
81
81
|
export { LogLevelEntityEnum, RunEntity, RunLogEntity, RunStatusEntityEnum, RunStepEntity, RunStepTypeEntityEnum };
|