@lssm/example.agent-console 0.0.0-canary-20251223215909 → 0.0.0-canary-20251225044228
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 +33 -33
- package/.turbo/turbo-build.log +33 -33
- package/CHANGELOG.md +6 -6
- package/dist/agent/agent.entity.d.ts +36 -36
- package/dist/agent/agent.entity.d.ts.map +1 -1
- package/dist/agent/agent.enum.d.ts +4 -4
- package/dist/agent/agent.event.d.ts +30 -30
- package/dist/agent/agent.event.d.ts.map +1 -1
- package/dist/agent/agent.event.js +41 -12
- package/dist/agent/agent.event.js.map +1 -1
- package/dist/agent/agent.operation.d.ts +120 -154
- package/dist/agent/agent.operation.d.ts.map +1 -1
- package/dist/agent/agent.operation.js +12 -9
- package/dist/agent/agent.operation.js.map +1 -1
- package/dist/agent/agent.presentation.d.ts.map +1 -1
- package/dist/agent/agent.presentation.js +19 -6
- package/dist/agent/agent.presentation.js.map +1 -1
- package/dist/agent/agent.schema.d.ts +95 -95
- package/dist/agent.feature.js +76 -69
- package/dist/agent.feature.js.map +1 -1
- package/dist/run/run.entity.d.ts +56 -56
- package/dist/run/run.enum.d.ts +5 -5
- package/dist/run/run.event.d.ts +70 -70
- package/dist/run/run.event.d.ts.map +1 -1
- package/dist/run/run.event.js +69 -21
- package/dist/run/run.event.js.map +1 -1
- package/dist/run/run.operation.d.ts +182 -176
- package/dist/run/run.operation.d.ts.map +1 -1
- package/dist/run/run.operation.js +16 -10
- package/dist/run/run.operation.js.map +1 -1
- package/dist/run/run.presentation.d.ts.map +1 -1
- package/dist/run/run.presentation.js +13 -4
- package/dist/run/run.presentation.js.map +1 -1
- package/dist/run/run.schema.d.ts +99 -99
- package/dist/tool/tool.entity.d.ts +24 -24
- package/dist/tool/tool.enum.d.ts +4 -4
- package/dist/tool/tool.event.d.ts +24 -24
- package/dist/tool/tool.event.d.ts.map +1 -1
- package/dist/tool/tool.event.js +25 -9
- package/dist/tool/tool.event.js.map +1 -1
- package/dist/tool/tool.handler.d.ts.map +1 -1
- package/dist/tool/tool.operation.d.ts +108 -102
- package/dist/tool/tool.operation.d.ts.map +1 -1
- package/dist/tool/tool.operation.js +14 -8
- package/dist/tool/tool.operation.js.map +1 -1
- package/dist/tool/tool.presentation.d.ts.map +1 -1
- package/dist/tool/tool.presentation.js +13 -4
- package/dist/tool/tool.presentation.js.map +1 -1
- package/dist/tool/tool.schema.d.ts +52 -52
- package/dist/tool/tool.schema.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/agent/agent.event.ts +34 -12
- package/src/agent/agent.operation.ts +12 -9
- package/src/agent/agent.presentation.ts +16 -3
- package/src/agent.feature.ts +58 -56
- package/src/run/run.event.ts +58 -21
- package/src/run/run.operation.ts +16 -10
- package/src/run/run.presentation.ts +11 -2
- package/src/tool/tool.event.ts +27 -10
- package/src/tool/tool.operation.ts +14 -8
- package/src/tool/tool.presentation.ts +11 -2
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.operation.d.ts","names":[],"sources":["../../src/run/run.operation.ts"],"sourcesContent":[],"mappings":";;;;;;;cAiBa,2CAAmB,kCAAA;EAAnB,OAAA,EAAA;
|
|
1
|
+
{"version":3,"file":"run.operation.d.ts","names":[],"sources":["../../src/run/run.operation.ts"],"sourcesContent":[],"mappings":";;;;;;;cAiBa,2CAAmB,kCAAA;EAAnB,OAAA,EAAA;IAoEX,IAAA,EAAA,mBAAA,CAAA,SAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;;;;;;IApE8B,UAAA,EAAA,KAAA;;;;;;;;;;;;;;;;oBAAA;EAAA,CAAA;EAyEnB,SAAA,EAAA;IAwDX,IAAA,+BAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;CAxD2B,CAAA,iCAAA,CAAA;;UAzEG,mBAAA,CAAA;;;;;;;;;;;;;;EAyEH,SAAA,EAAA,MAAA;EA6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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA/CwB,mBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAoDb,wCAAgB,kCAAA;;UA0B3B,mBAAA,CAAA;;;;;;;cA1B2B,mBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+BhB,uCAAe,kCAAA;;UAwC1B,mBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;cAxC0B,mBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA6Cf,0CAAkB,kCAAA;;UA4D7B,mBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;UA5D6B,mBAAA,CAAA"}
|
|
@@ -4,13 +4,13 @@ import { ScalarTypeEnum, defineSchemaModel } from "@lssm/lib.schema";
|
|
|
4
4
|
import { defineCommand, defineQuery } from "@lssm/lib.contracts/operations";
|
|
5
5
|
|
|
6
6
|
//#region src/run/run.operation.ts
|
|
7
|
-
const OWNERS = ["agent-console-team"];
|
|
7
|
+
const OWNERS = ["@agent-console-team"];
|
|
8
8
|
/**
|
|
9
9
|
* ExecuteAgentCommand - Starts a new agent run.
|
|
10
10
|
*/
|
|
11
11
|
const ExecuteAgentCommand = defineCommand({
|
|
12
12
|
meta: {
|
|
13
|
-
|
|
13
|
+
key: "agent.run.execute",
|
|
14
14
|
version: 1,
|
|
15
15
|
stability: "stable",
|
|
16
16
|
owners: [...OWNERS],
|
|
@@ -88,8 +88,11 @@ const ExecuteAgentCommand = defineCommand({
|
|
|
88
88
|
policy: { auth: "user" },
|
|
89
89
|
sideEffects: {
|
|
90
90
|
emits: [{
|
|
91
|
-
|
|
91
|
+
key: "run.started",
|
|
92
92
|
version: 1,
|
|
93
|
+
stability: "stable",
|
|
94
|
+
owners: [...OWNERS],
|
|
95
|
+
tags: ["run", "started"],
|
|
93
96
|
when: "Run is queued",
|
|
94
97
|
payload: RunSummaryModel
|
|
95
98
|
}],
|
|
@@ -101,7 +104,7 @@ const ExecuteAgentCommand = defineCommand({
|
|
|
101
104
|
*/
|
|
102
105
|
const CancelRunCommand = defineCommand({
|
|
103
106
|
meta: {
|
|
104
|
-
|
|
107
|
+
key: "agent.run.cancel",
|
|
105
108
|
version: 1,
|
|
106
109
|
stability: "stable",
|
|
107
110
|
owners: [...OWNERS],
|
|
@@ -155,8 +158,11 @@ const CancelRunCommand = defineCommand({
|
|
|
155
158
|
policy: { auth: "user" },
|
|
156
159
|
sideEffects: {
|
|
157
160
|
emits: [{
|
|
158
|
-
|
|
161
|
+
key: "run.cancelled",
|
|
159
162
|
version: 1,
|
|
163
|
+
stability: "stable",
|
|
164
|
+
owners: [...OWNERS],
|
|
165
|
+
tags: ["run", "cancelled"],
|
|
160
166
|
when: "Run is cancelled",
|
|
161
167
|
payload: RunSummaryModel
|
|
162
168
|
}],
|
|
@@ -168,7 +174,7 @@ const CancelRunCommand = defineCommand({
|
|
|
168
174
|
*/
|
|
169
175
|
const GetRunQuery = defineQuery({
|
|
170
176
|
meta: {
|
|
171
|
-
|
|
177
|
+
key: "agent.run.get",
|
|
172
178
|
version: 1,
|
|
173
179
|
stability: "stable",
|
|
174
180
|
owners: [...OWNERS],
|
|
@@ -210,7 +216,7 @@ const GetRunQuery = defineQuery({
|
|
|
210
216
|
*/
|
|
211
217
|
const ListRunsQuery = defineQuery({
|
|
212
218
|
meta: {
|
|
213
|
-
|
|
219
|
+
key: "agent.run.list",
|
|
214
220
|
version: 1,
|
|
215
221
|
stability: "stable",
|
|
216
222
|
owners: [...OWNERS],
|
|
@@ -289,7 +295,7 @@ const ListRunsQuery = defineQuery({
|
|
|
289
295
|
*/
|
|
290
296
|
const GetRunStepsQuery = defineQuery({
|
|
291
297
|
meta: {
|
|
292
|
-
|
|
298
|
+
key: "agent.run.getSteps",
|
|
293
299
|
version: 1,
|
|
294
300
|
stability: "stable",
|
|
295
301
|
owners: [...OWNERS],
|
|
@@ -322,7 +328,7 @@ const GetRunStepsQuery = defineQuery({
|
|
|
322
328
|
*/
|
|
323
329
|
const GetRunLogsQuery = defineQuery({
|
|
324
330
|
meta: {
|
|
325
|
-
|
|
331
|
+
key: "agent.run.getLogs",
|
|
326
332
|
version: 1,
|
|
327
333
|
stability: "stable",
|
|
328
334
|
owners: [...OWNERS],
|
|
@@ -385,7 +391,7 @@ const GetRunLogsQuery = defineQuery({
|
|
|
385
391
|
*/
|
|
386
392
|
const GetRunMetricsQuery = defineQuery({
|
|
387
393
|
meta: {
|
|
388
|
-
|
|
394
|
+
key: "agent.run.getMetrics",
|
|
389
395
|
version: 1,
|
|
390
396
|
stability: "stable",
|
|
391
397
|
owners: [...OWNERS],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.operation.js","names":[],"sources":["../../src/run/run.operation.ts"],"sourcesContent":["import { defineCommand, defineQuery } from '@lssm/lib.contracts/operations';\nimport { defineSchemaModel, ScalarTypeEnum } from '@lssm/lib.schema';\nimport { GranularityEnum, LogLevelEnum, RunStatusEnum } from './run.enum';\nimport {\n RunInputModel,\n RunLogModel,\n RunModel,\n RunStepModel,\n RunSummaryModel,\n TimelineDataPointModel,\n} from './run.schema';\n\nconst OWNERS = ['agent-console-team'] as const;\n\n/**\n * ExecuteAgentCommand - Starts a new agent run.\n */\nexport const ExecuteAgentCommand = defineCommand({\n meta: {\n name: 'agent.run.execute',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['run', 'execute'],\n description: 'Starts a new agent run with the given input.',\n goal: 'Execute an AI agent with user input.',\n context: 'Called from chat interface or API.',\n },\n io: {\n input: defineSchemaModel({\n name: 'ExecuteAgentInput',\n fields: {\n agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n input: { type: RunInputModel, isOptional: false },\n sessionId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n metadata: { type: ScalarTypeEnum.JSONObject(), isOptional: true },\n stream: { type: ScalarTypeEnum.Boolean(), isOptional: true },\n maxIterations: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n },\n timeoutMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n },\n }),\n output: defineSchemaModel({\n name: 'ExecuteAgentOutput',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n status: { type: RunStatusEnum, isOptional: false },\n estimatedWaitMs: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n },\n },\n }),\n errors: {\n AGENT_NOT_FOUND: {\n description: 'The specified agent does not exist',\n http: 404,\n gqlCode: 'AGENT_NOT_FOUND',\n when: 'Agent ID is invalid',\n },\n AGENT_NOT_ACTIVE: {\n description: 'The specified agent is not active',\n http: 400,\n gqlCode: 'AGENT_NOT_ACTIVE',\n when: 'Agent is in draft/paused/archived state',\n },\n },\n },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n name: 'run.started',\n version: 1,\n when: 'Run is queued',\n payload: RunSummaryModel,\n },\n ],\n audit: ['run.started'],\n },\n});\n\n/**\n * CancelRunCommand - Cancels an in-progress run.\n */\nexport const CancelRunCommand = defineCommand({\n meta: {\n name: 'agent.run.cancel',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['run', 'cancel'],\n description: 'Cancels an in-progress agent run.',\n goal: 'Stop a running agent execution.',\n context: 'Called when user wants to abort a long-running task.',\n },\n io: {\n input: defineSchemaModel({\n name: 'CancelRunInput',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n reason: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n }),\n output: defineSchemaModel({\n name: 'CancelRunOutput',\n fields: {\n success: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n status: { type: RunStatusEnum, isOptional: false },\n },\n }),\n errors: {\n RUN_NOT_FOUND: {\n description: 'The specified run does not exist',\n http: 404,\n gqlCode: 'RUN_NOT_FOUND',\n when: 'Run ID is invalid',\n },\n RUN_NOT_CANCELLABLE: {\n description: 'The run cannot be cancelled',\n http: 400,\n gqlCode: 'RUN_NOT_CANCELLABLE',\n when: 'Run is already completed/failed/cancelled',\n },\n },\n },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n name: 'run.cancelled',\n version: 1,\n when: 'Run is cancelled',\n payload: RunSummaryModel,\n },\n ],\n audit: ['run.cancelled'],\n },\n});\n\n/**\n * GetRunQuery - Retrieves a run by ID.\n */\nexport const GetRunQuery = defineQuery({\n meta: {\n name: 'agent.run.get',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['run', 'get'],\n description: 'Retrieves a run by its ID with optional details.',\n goal: 'View detailed run information.',\n context: 'Run details page or monitoring.',\n },\n io: {\n input: defineSchemaModel({\n name: 'GetRunInput',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n includeSteps: { type: ScalarTypeEnum.Boolean(), isOptional: true },\n includeLogs: { type: ScalarTypeEnum.Boolean(), isOptional: true },\n },\n }),\n output: RunModel,\n errors: {\n RUN_NOT_FOUND: {\n description: 'The specified run does not exist',\n http: 404,\n gqlCode: 'RUN_NOT_FOUND',\n when: 'Run ID is invalid',\n },\n },\n },\n policy: { auth: 'user' },\n});\n\n/**\n * ListRunsQuery - Lists runs for an organization or agent.\n */\nexport const ListRunsQuery = defineQuery({\n meta: {\n name: 'agent.run.list',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['run', 'list'],\n description: 'Lists runs with optional filtering.',\n goal: 'Browse and search run history.',\n context: 'Run history/dashboard view.',\n },\n io: {\n input: defineSchemaModel({\n name: 'ListRunsInput',\n fields: {\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n userId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n sessionId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n status: { type: RunStatusEnum, isOptional: true },\n startDate: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n endDate: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n limit: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 20,\n },\n offset: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 0,\n },\n },\n }),\n output: defineSchemaModel({\n name: 'ListRunsOutput',\n fields: {\n items: { type: RunSummaryModel, isArray: true, isOptional: false },\n total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n hasMore: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n },\n }),\n },\n policy: { auth: 'user' },\n});\n\n/**\n * GetRunStepsQuery - Retrieves steps for a run.\n */\nexport const GetRunStepsQuery = defineQuery({\n meta: {\n name: 'agent.run.getSteps',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['run', 'steps'],\n description: 'Retrieves all steps for a specific run.',\n goal: 'View step-by-step execution details.',\n context: 'Run details page - steps tab.',\n },\n io: {\n input: defineSchemaModel({\n name: 'GetRunStepsInput',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n }),\n output: defineSchemaModel({\n name: 'GetRunStepsOutput',\n fields: {\n steps: { type: RunStepModel, isArray: true, isOptional: false },\n },\n }),\n },\n policy: { auth: 'user' },\n});\n\n/**\n * GetRunLogsQuery - Retrieves logs for a run.\n */\nexport const GetRunLogsQuery = defineQuery({\n meta: {\n name: 'agent.run.getLogs',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['run', 'logs'],\n description: 'Retrieves all logs for a specific run.',\n goal: 'Debug and audit run execution.',\n context: 'Run details page - logs tab.',\n },\n io: {\n input: defineSchemaModel({\n name: 'GetRunLogsInput',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n level: { type: LogLevelEnum, isOptional: true },\n stepId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n limit: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 100,\n },\n offset: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 0,\n },\n },\n }),\n output: defineSchemaModel({\n name: 'GetRunLogsOutput',\n fields: {\n items: { type: RunLogModel, isArray: true, isOptional: false },\n total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n hasMore: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n },\n }),\n },\n policy: { auth: 'user' },\n});\n\n/**\n * GetRunMetricsQuery - Retrieves aggregated metrics for runs.\n */\nexport const GetRunMetricsQuery = defineQuery({\n meta: {\n name: 'agent.run.getMetrics',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['run', 'metrics'],\n description: 'Retrieves aggregated metrics for runs within a time period.',\n goal: 'Monitor and analyze agent usage.',\n context: 'Analytics dashboard.',\n },\n io: {\n input: defineSchemaModel({\n name: 'GetRunMetricsInput',\n fields: {\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n startDate: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n endDate: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n granularity: {\n type: GranularityEnum,\n isOptional: true,\n defaultValue: 'day',\n },\n },\n }),\n output: defineSchemaModel({\n name: 'GetRunMetricsOutput',\n fields: {\n totalRuns: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n completedRuns: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: false,\n },\n failedRuns: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n totalTokens: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n totalCostUsd: {\n type: ScalarTypeEnum.Float_unsecure(),\n isOptional: false,\n },\n averageDurationMs: {\n type: ScalarTypeEnum.Float_unsecure(),\n isOptional: false,\n },\n successRate: {\n type: ScalarTypeEnum.Float_unsecure(),\n isOptional: false,\n },\n timeline: {\n type: TimelineDataPointModel,\n isArray: true,\n isOptional: false,\n },\n },\n }),\n },\n policy: { auth: 'user' },\n});\n"],"mappings":";;;;;;AAYA,MAAM,SAAS,CAAC,qBAAqB;;;;AAKrC,MAAa,sBAAsB,cAAc;CAC/C,MAAM;EACJ,MAAM;EACN,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM,CAAC,OAAO,UAAU;EACxB,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO,kBAAkB;GACvB,MAAM;GACN,QAAQ;IACN,SAAS;KAAE,MAAM,eAAe,iBAAiB;KAAE,YAAY;KAAO;IACtE,OAAO;KAAE,MAAM;KAAe,YAAY;KAAO;IACjD,WAAW;KAAE,MAAM,eAAe,iBAAiB;KAAE,YAAY;KAAM;IACvE,UAAU;KAAE,MAAM,eAAe,YAAY;KAAE,YAAY;KAAM;IACjE,QAAQ;KAAE,MAAM,eAAe,SAAS;KAAE,YAAY;KAAM;IAC5D,eAAe;KACb,MAAM,eAAe,cAAc;KACnC,YAAY;KACb;IACD,WAAW;KAAE,MAAM,eAAe,cAAc;KAAE,YAAY;KAAM;IACrE;GACF,CAAC;EACF,QAAQ,kBAAkB;GACxB,MAAM;GACN,QAAQ;IACN,OAAO;KAAE,MAAM,eAAe,iBAAiB;KAAE,YAAY;KAAO;IACpE,QAAQ;KAAE,MAAM;KAAe,YAAY;KAAO;IAClD,iBAAiB;KACf,MAAM,eAAe,cAAc;KACnC,YAAY;KACb;IACF;GACF,CAAC;EACF,QAAQ;GACN,iBAAiB;IACf,aAAa;IACb,MAAM;IACN,SAAS;IACT,MAAM;IACP;GACD,kBAAkB;IAChB,aAAa;IACb,MAAM;IACN,SAAS;IACT,MAAM;IACP;GACF;EACF;CACD,QAAQ,EAAE,MAAM,QAAQ;CACxB,aAAa;EACX,OAAO,CACL;GACE,MAAM;GACN,SAAS;GACT,MAAM;GACN,SAAS;GAC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;;AAKF,MAAa,qBAAqB,YAAY;CAC5C,MAAM;EACJ,MAAM;EACN,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM,CAAC,OAAO,UAAU;EACxB,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO,kBAAkB;GACvB,MAAM;GACN,QAAQ;IACN,gBAAgB;KACd,MAAM,eAAe,iBAAiB;KACtC,YAAY;KACb;IACD,SAAS;KAAE,MAAM,eAAe,iBAAiB;KAAE,YAAY;KAAM;IACrE,WAAW;KAAE,MAAM,eAAe,UAAU;KAAE,YAAY;KAAO;IACjE,SAAS;KAAE,MAAM,eAAe,UAAU;KAAE,YAAY;KAAO;IAC/D,aAAa;KACX,MAAM;KACN,YAAY;KACZ,cAAc;KACf;IACF;GACF,CAAC;EACF,QAAQ,kBAAkB;GACxB,MAAM;GACN,QAAQ;IACN,WAAW;KAAE,MAAM,eAAe,cAAc;KAAE,YAAY;KAAO;IACrE,eAAe;KACb,MAAM,eAAe,cAAc;KACnC,YAAY;KACb;IACD,YAAY;KAAE,MAAM,eAAe,cAAc;KAAE,YAAY;KAAO;IACtE,aAAa;KAAE,MAAM,eAAe,cAAc;KAAE,YAAY;KAAO;IACvE,cAAc;KACZ,MAAM,eAAe,gBAAgB;KACrC,YAAY;KACb;IACD,mBAAmB;KACjB,MAAM,eAAe,gBAAgB;KACrC,YAAY;KACb;IACD,aAAa;KACX,MAAM,eAAe,gBAAgB;KACrC,YAAY;KACb;IACD,UAAU;KACR,MAAM;KACN,SAAS;KACT,YAAY;KACb;IACF;GACF,CAAC;EACH;CACD,QAAQ,EAAE,MAAM,QAAQ;CACzB,CAAC"}
|
|
1
|
+
{"version":3,"file":"run.operation.js","names":[],"sources":["../../src/run/run.operation.ts"],"sourcesContent":["import { defineCommand, defineQuery } from '@lssm/lib.contracts/operations';\nimport { defineSchemaModel, ScalarTypeEnum } from '@lssm/lib.schema';\nimport { GranularityEnum, LogLevelEnum, RunStatusEnum } from './run.enum';\nimport {\n RunInputModel,\n RunLogModel,\n RunModel,\n RunStepModel,\n RunSummaryModel,\n TimelineDataPointModel,\n} from './run.schema';\n\nconst OWNERS = ['@agent-console-team'] as const;\n\n/**\n * ExecuteAgentCommand - Starts a new agent run.\n */\nexport const ExecuteAgentCommand = defineCommand({\n meta: {\n key: 'agent.run.execute',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['run', 'execute'],\n description: 'Starts a new agent run with the given input.',\n goal: 'Execute an AI agent with user input.',\n context: 'Called from chat interface or API.',\n },\n io: {\n input: defineSchemaModel({\n name: 'ExecuteAgentInput',\n fields: {\n agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n input: { type: RunInputModel, isOptional: false },\n sessionId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n metadata: { type: ScalarTypeEnum.JSONObject(), isOptional: true },\n stream: { type: ScalarTypeEnum.Boolean(), isOptional: true },\n maxIterations: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n },\n timeoutMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n },\n }),\n output: defineSchemaModel({\n name: 'ExecuteAgentOutput',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n status: { type: RunStatusEnum, isOptional: false },\n estimatedWaitMs: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n },\n },\n }),\n errors: {\n AGENT_NOT_FOUND: {\n description: 'The specified agent does not exist',\n http: 404,\n gqlCode: 'AGENT_NOT_FOUND',\n when: 'Agent ID is invalid',\n },\n AGENT_NOT_ACTIVE: {\n description: 'The specified agent is not active',\n http: 400,\n gqlCode: 'AGENT_NOT_ACTIVE',\n when: 'Agent is in draft/paused/archived state',\n },\n },\n },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n key: 'run.started',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['run', 'started'],\n when: 'Run is queued',\n payload: RunSummaryModel,\n },\n ],\n audit: ['run.started'],\n },\n});\n\n/**\n * CancelRunCommand - Cancels an in-progress run.\n */\nexport const CancelRunCommand = defineCommand({\n meta: {\n key: 'agent.run.cancel',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['run', 'cancel'],\n description: 'Cancels an in-progress agent run.',\n goal: 'Stop a running agent execution.',\n context: 'Called when user wants to abort a long-running task.',\n },\n io: {\n input: defineSchemaModel({\n name: 'CancelRunInput',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n reason: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n }),\n output: defineSchemaModel({\n name: 'CancelRunOutput',\n fields: {\n success: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n status: { type: RunStatusEnum, isOptional: false },\n },\n }),\n errors: {\n RUN_NOT_FOUND: {\n description: 'The specified run does not exist',\n http: 404,\n gqlCode: 'RUN_NOT_FOUND',\n when: 'Run ID is invalid',\n },\n RUN_NOT_CANCELLABLE: {\n description: 'The run cannot be cancelled',\n http: 400,\n gqlCode: 'RUN_NOT_CANCELLABLE',\n when: 'Run is already completed/failed/cancelled',\n },\n },\n },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n key: 'run.cancelled',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['run', 'cancelled'],\n when: 'Run is cancelled',\n payload: RunSummaryModel,\n },\n ],\n audit: ['run.cancelled'],\n },\n});\n\n/**\n * GetRunQuery - Retrieves a run by ID.\n */\nexport const GetRunQuery = defineQuery({\n meta: {\n key: 'agent.run.get',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['run', 'get'],\n description: 'Retrieves a run by its ID with optional details.',\n goal: 'View detailed run information.',\n context: 'Run details page or monitoring.',\n },\n io: {\n input: defineSchemaModel({\n name: 'GetRunInput',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n includeSteps: { type: ScalarTypeEnum.Boolean(), isOptional: true },\n includeLogs: { type: ScalarTypeEnum.Boolean(), isOptional: true },\n },\n }),\n output: RunModel,\n errors: {\n RUN_NOT_FOUND: {\n description: 'The specified run does not exist',\n http: 404,\n gqlCode: 'RUN_NOT_FOUND',\n when: 'Run ID is invalid',\n },\n },\n },\n policy: { auth: 'user' },\n});\n\n/**\n * ListRunsQuery - Lists runs for an organization or agent.\n */\nexport const ListRunsQuery = defineQuery({\n meta: {\n key: 'agent.run.list',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['run', 'list'],\n description: 'Lists runs with optional filtering.',\n goal: 'Browse and search run history.',\n context: 'Run history/dashboard view.',\n },\n io: {\n input: defineSchemaModel({\n name: 'ListRunsInput',\n fields: {\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n userId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n sessionId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n status: { type: RunStatusEnum, isOptional: true },\n startDate: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n endDate: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n limit: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 20,\n },\n offset: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 0,\n },\n },\n }),\n output: defineSchemaModel({\n name: 'ListRunsOutput',\n fields: {\n items: { type: RunSummaryModel, isArray: true, isOptional: false },\n total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n hasMore: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n },\n }),\n },\n policy: { auth: 'user' },\n});\n\n/**\n * GetRunStepsQuery - Retrieves steps for a run.\n */\nexport const GetRunStepsQuery = defineQuery({\n meta: {\n key: 'agent.run.getSteps',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['run', 'steps'],\n description: 'Retrieves all steps for a specific run.',\n goal: 'View step-by-step execution details.',\n context: 'Run details page - steps tab.',\n },\n io: {\n input: defineSchemaModel({\n name: 'GetRunStepsInput',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n }),\n output: defineSchemaModel({\n name: 'GetRunStepsOutput',\n fields: {\n steps: { type: RunStepModel, isArray: true, isOptional: false },\n },\n }),\n },\n policy: { auth: 'user' },\n});\n\n/**\n * GetRunLogsQuery - Retrieves logs for a run.\n */\nexport const GetRunLogsQuery = defineQuery({\n meta: {\n key: 'agent.run.getLogs',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['run', 'logs'],\n description: 'Retrieves all logs for a specific run.',\n goal: 'Debug and audit run execution.',\n context: 'Run details page - logs tab.',\n },\n io: {\n input: defineSchemaModel({\n name: 'GetRunLogsInput',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n level: { type: LogLevelEnum, isOptional: true },\n stepId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n limit: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 100,\n },\n offset: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 0,\n },\n },\n }),\n output: defineSchemaModel({\n name: 'GetRunLogsOutput',\n fields: {\n items: { type: RunLogModel, isArray: true, isOptional: false },\n total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n hasMore: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n },\n }),\n },\n policy: { auth: 'user' },\n});\n\n/**\n * GetRunMetricsQuery - Retrieves aggregated metrics for runs.\n */\nexport const GetRunMetricsQuery = defineQuery({\n meta: {\n key: 'agent.run.getMetrics',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['run', 'metrics'],\n description: 'Retrieves aggregated metrics for runs within a time period.',\n goal: 'Monitor and analyze agent usage.',\n context: 'Analytics dashboard.',\n },\n io: {\n input: defineSchemaModel({\n name: 'GetRunMetricsInput',\n fields: {\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n startDate: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n endDate: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n granularity: {\n type: GranularityEnum,\n isOptional: true,\n defaultValue: 'day',\n },\n },\n }),\n output: defineSchemaModel({\n name: 'GetRunMetricsOutput',\n fields: {\n totalRuns: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n completedRuns: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: false,\n },\n failedRuns: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n totalTokens: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n totalCostUsd: {\n type: ScalarTypeEnum.Float_unsecure(),\n isOptional: false,\n },\n averageDurationMs: {\n type: ScalarTypeEnum.Float_unsecure(),\n isOptional: false,\n },\n successRate: {\n type: ScalarTypeEnum.Float_unsecure(),\n isOptional: false,\n },\n timeline: {\n type: TimelineDataPointModel,\n isArray: true,\n isOptional: false,\n },\n },\n }),\n },\n policy: { auth: 'user' },\n});\n"],"mappings":";;;;;;AAYA,MAAM,SAAS,CAAC,sBAAsB;;;;AAKtC,MAAa,sBAAsB,cAAc;CAC/C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM,CAAC,OAAO,UAAU;EACxB,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO,kBAAkB;GACvB,MAAM;GACN,QAAQ;IACN,SAAS;KAAE,MAAM,eAAe,iBAAiB;KAAE,YAAY;KAAO;IACtE,OAAO;KAAE,MAAM;KAAe,YAAY;KAAO;IACjD,WAAW;KAAE,MAAM,eAAe,iBAAiB;KAAE,YAAY;KAAM;IACvE,UAAU;KAAE,MAAM,eAAe,YAAY;KAAE,YAAY;KAAM;I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;IAC/D,aAAa;KACX,MAAM;KACN,YAAY;KACZ,cAAc;KACf;IACF;GACF,CAAC;EACF,QAAQ,kBAAkB;GACxB,MAAM;GACN,QAAQ;IACN,WAAW;KAAE,MAAM,eAAe,cAAc;KAAE,YAAY;KAAO;IACrE,eAAe;KACb,MAAM,eAAe,cAAc;KACnC,YAAY;KACb;IACD,YAAY;KAAE,MAAM,eAAe,cAAc;KAAE,YAAY;KAAO;IACtE,aAAa;KAAE,MAAM,eAAe,cAAc;KAAE,YAAY;KAAO;IACvE,cAAc;KACZ,MAAM,eAAe,gBAAgB;KACrC,YAAY;KACb;IACD,mBAAmB;KACjB,MAAM,eAAe,gBAAgB;KACrC,YAAY;KACb;IACD,aAAa;KACX,MAAM,eAAe,gBAAgB;KACrC,YAAY;KACb;IACD,UAAU;KACR,MAAM;KACN,SAAS;KACT,YAAY;KACb;IACF;GACF,CAAC;EACH;CACD,QAAQ,EAAE,MAAM,QAAQ;CACzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.presentation.d.ts","names":[],"sources":["../../src/run/run.presentation.ts"],"sourcesContent":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"run.presentation.d.ts","names":[],"sources":["../../src/run/run.presentation.ts"],"sourcesContent":[],"mappings":";;;;;;AAOA;AA2Ba,cA3BA,mBA2BuB,EA3BF,gBA+CjC;;;;cApBY,uBAAuB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { RunSummaryModel } from "./run.schema.js";
|
|
2
|
+
import { StabilityEnum } from "@lssm/lib.contracts";
|
|
2
3
|
|
|
3
4
|
//#region src/run/run.presentation.ts
|
|
4
5
|
/**
|
|
@@ -6,16 +7,20 @@ import { RunSummaryModel } from "./run.schema.js";
|
|
|
6
7
|
*/
|
|
7
8
|
const RunListPresentation = {
|
|
8
9
|
meta: {
|
|
9
|
-
|
|
10
|
+
key: "agent-console.run.list",
|
|
10
11
|
version: 1,
|
|
12
|
+
title: "Run List",
|
|
11
13
|
description: "List view of agent runs with status, tokens, and duration info",
|
|
14
|
+
goal: "Provide an overview of agent execution history and performance.",
|
|
15
|
+
context: "Run history dashboard.",
|
|
12
16
|
domain: "agent-console",
|
|
13
17
|
owners: ["@agent-console-team"],
|
|
14
18
|
tags: [
|
|
15
19
|
"run",
|
|
16
20
|
"list",
|
|
17
21
|
"dashboard"
|
|
18
|
-
]
|
|
22
|
+
],
|
|
23
|
+
stability: StabilityEnum.Experimental
|
|
19
24
|
},
|
|
20
25
|
source: {
|
|
21
26
|
type: "component",
|
|
@@ -35,12 +40,16 @@ const RunListPresentation = {
|
|
|
35
40
|
*/
|
|
36
41
|
const RunDetailPresentation = {
|
|
37
42
|
meta: {
|
|
38
|
-
|
|
43
|
+
key: "agent-console.run.detail",
|
|
39
44
|
version: 1,
|
|
45
|
+
title: "Run Details",
|
|
40
46
|
description: "Detailed view of an agent run with steps, logs, and metrics",
|
|
47
|
+
goal: "Allow users to inspect and debug a specific agent run.",
|
|
48
|
+
context: "Detailed view of an agent run.",
|
|
41
49
|
domain: "agent-console",
|
|
42
50
|
owners: ["@agent-console-team"],
|
|
43
|
-
tags: ["run", "detail"]
|
|
51
|
+
tags: ["run", "detail"],
|
|
52
|
+
stability: StabilityEnum.Experimental
|
|
44
53
|
},
|
|
45
54
|
source: {
|
|
46
55
|
type: "component",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.presentation.js","names":["RunListPresentation: PresentationSpec","RunDetailPresentation: PresentationSpec"],"sources":["../../src/run/run.presentation.ts"],"sourcesContent":["import type { PresentationSpec } from '@lssm/lib.contracts';\nimport { RunSummaryModel } from './run.schema';\n\n/**\n * Presentation for displaying a list of agent runs.\n */\nexport const RunListPresentation: PresentationSpec = {\n meta: {\n
|
|
1
|
+
{"version":3,"file":"run.presentation.js","names":["RunListPresentation: PresentationSpec","RunDetailPresentation: PresentationSpec"],"sources":["../../src/run/run.presentation.ts"],"sourcesContent":["import type { PresentationSpec } from '@lssm/lib.contracts';\nimport { StabilityEnum } from '@lssm/lib.contracts';\nimport { RunSummaryModel } from './run.schema';\n\n/**\n * Presentation for displaying a list of agent runs.\n */\nexport const RunListPresentation: PresentationSpec = {\n meta: {\n key: 'agent-console.run.list',\n version: 1,\n title: 'Run List',\n description:\n 'List view of agent runs with status, tokens, and duration info',\n goal: 'Provide an overview of agent execution history and performance.',\n context: 'Run history dashboard.',\n domain: 'agent-console',\n owners: ['@agent-console-team'],\n tags: ['run', 'list', 'dashboard'],\n stability: StabilityEnum.Experimental,\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'RunListView',\n props: RunSummaryModel,\n },\n targets: ['react', 'markdown', 'application/json'],\n policy: { flags: ['agent-console.enabled'] },\n};\n\n/**\n * Presentation for run detail view.\n */\nexport const RunDetailPresentation: PresentationSpec = {\n meta: {\n key: 'agent-console.run.detail',\n version: 1,\n title: 'Run Details',\n description: 'Detailed view of an agent run with steps, logs, and metrics',\n goal: 'Allow users to inspect and debug a specific agent run.',\n context: 'Detailed view of an agent run.',\n domain: 'agent-console',\n owners: ['@agent-console-team'],\n tags: ['run', 'detail'],\n stability: StabilityEnum.Experimental,\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'RunDetailView',\n },\n targets: ['react', 'markdown'],\n policy: { flags: ['agent-console.enabled'] },\n};\n"],"mappings":";;;;;;;AAOA,MAAaA,sBAAwC;CACnD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,MAAM;EACN,SAAS;EACT,QAAQ;EACR,QAAQ,CAAC,sBAAsB;EAC/B,MAAM;GAAC;GAAO;GAAQ;GAAY;EAClC,WAAW,cAAc;EAC1B;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS;EAAC;EAAS;EAAY;EAAmB;CAClD,QAAQ,EAAE,OAAO,CAAC,wBAAwB,EAAE;CAC7C;;;;AAKD,MAAaC,wBAA0C;CACrD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,MAAM;EACN,SAAS;EACT,QAAQ;EACR,QAAQ,CAAC,sBAAsB;EAC/B,MAAM,CAAC,OAAO,SAAS;EACvB,WAAW,cAAc;EAC1B;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EAAE,OAAO,CAAC,wBAAwB,EAAE;CAC7C"}
|