@lssm/example.agent-console 0.0.0-canary-20251220041653 → 0.0.0-canary-20251221114240

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/.turbo/turbo-build$colon$bundle.log +67 -64
  2. package/.turbo/turbo-build.log +59 -56
  3. package/CHANGELOG.md +6 -6
  4. package/dist/agent/agent.entity.d.ts +36 -36
  5. package/dist/agent/agent.enum.d.ts +4 -4
  6. package/dist/agent/agent.event.d.ts +31 -31
  7. package/dist/agent/agent.operation.d.ts +505 -0
  8. package/dist/agent/{agent.contracts.d.ts.map → agent.operation.d.ts.map} +1 -1
  9. package/dist/agent/{agent.contracts.js → agent.operation.js} +3 -3
  10. package/dist/agent/agent.operation.js.map +1 -0
  11. package/dist/agent/agent.schema.d.ts +95 -95
  12. package/dist/agent/index.d.ts +1 -1
  13. package/dist/agent/index.js +1 -1
  14. package/dist/index.d.ts +3 -3
  15. package/dist/index.js +3 -3
  16. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +6 -6
  17. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js.map +1 -1
  18. package/dist/libs/contracts/dist/index.js +3 -1
  19. package/dist/libs/contracts/dist/integrations/contracts.js +1 -1
  20. package/dist/libs/contracts/dist/integrations/contracts.js.map +1 -1
  21. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +1 -1
  22. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js.map +1 -1
  23. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +1 -1
  24. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js.map +1 -1
  25. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +1 -1
  26. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js.map +1 -1
  27. package/dist/libs/contracts/dist/knowledge/contracts.js +1 -1
  28. package/dist/libs/contracts/dist/knowledge/contracts.js.map +1 -1
  29. package/dist/libs/contracts/dist/llm/exporters.js.map +1 -1
  30. package/dist/libs/contracts/dist/onboarding-base.js +1 -1
  31. package/dist/libs/contracts/dist/onboarding-base.js.map +1 -1
  32. package/dist/libs/contracts/dist/{spec.js → operation.js} +2 -2
  33. package/dist/libs/contracts/dist/operation.js.map +1 -0
  34. package/dist/libs/contracts/dist/workspace-config/contractsrc-schema.js +98 -0
  35. package/dist/libs/contracts/dist/workspace-config/contractsrc-schema.js.map +1 -0
  36. package/dist/libs/contracts/dist/workspace-config/index.js +1 -0
  37. package/dist/run/index.d.ts +1 -1
  38. package/dist/run/index.js +1 -1
  39. package/dist/run/run.entity.d.ts +56 -56
  40. package/dist/run/run.enum.d.ts +5 -5
  41. package/dist/run/run.enum.d.ts.map +1 -1
  42. package/dist/run/run.event.d.ts +71 -71
  43. package/dist/run/run.event.d.ts.map +1 -1
  44. package/dist/run/run.operation.d.ts +714 -0
  45. package/dist/run/run.operation.d.ts.map +1 -0
  46. package/dist/run/{run.contracts.js → run.operation.js} +3 -3
  47. package/dist/run/run.operation.js.map +1 -0
  48. package/dist/run/run.schema.d.ts +99 -99
  49. package/dist/tool/index.d.ts +1 -1
  50. package/dist/tool/index.js +1 -1
  51. package/dist/tool/tool.entity.d.ts +24 -24
  52. package/dist/tool/tool.enum.d.ts +4 -4
  53. package/dist/tool/tool.event.d.ts +24 -24
  54. package/dist/tool/tool.operation.d.ts +405 -0
  55. package/dist/tool/{tool.contracts.d.ts.map → tool.operation.d.ts.map} +1 -1
  56. package/dist/tool/{tool.contracts.js → tool.operation.js} +3 -3
  57. package/dist/tool/tool.operation.js.map +1 -0
  58. package/package.json +14 -14
  59. package/src/agent/{agent.contracts.ts → agent.operation.ts} +1 -1
  60. package/src/agent/index.ts +1 -1
  61. package/src/run/index.ts +1 -1
  62. package/src/run/{run.contracts.ts → run.operation.ts} +4 -4
  63. package/src/tool/index.ts +1 -1
  64. package/src/tool/{tool.contracts.ts → tool.operation.ts} +2 -2
  65. package/tsconfig.tsbuildinfo +1 -1
  66. package/dist/agent/agent.contracts.d.ts +0 -505
  67. package/dist/agent/agent.contracts.js.map +0 -1
  68. package/dist/libs/contracts/dist/spec.js.map +0 -1
  69. package/dist/run/run.contracts.d.ts +0 -714
  70. package/dist/run/run.contracts.d.ts.map +0 -1
  71. package/dist/run/run.contracts.js.map +0 -1
  72. package/dist/tool/tool.contracts.d.ts +0 -405
  73. package/dist/tool/tool.contracts.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"run.contracts.js","names":["defineSchemaModel","ScalarTypeEnum"],"sources":["../../src/run/run.contracts.ts"],"sourcesContent":["import { defineCommand, defineQuery } from '@lssm/lib.contracts/spec';\nimport { defineSchemaModel, ScalarTypeEnum } from '@lssm/lib.schema';\nimport { RunStatusEnum, LogLevelEnum, GranularityEnum } from './run.enum';\nimport {\n RunInputModel,\n RunModel,\n RunSummaryModel,\n RunStepModel,\n RunLogModel,\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,cA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EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAOD,GAAkB;GACvB,MAAM;GACN,QAAQ;IACN,gBAAgB;KACd,MAAMC,GAAe,iBAAiB;KACtC,YAAY;KACb;IACD,SAAS;KAAE,MAAMA,GAAe,iBAAiB;KAAE,YAAY;KAAM;IACrE,WAAW;KAAE,MAAMA,GAAe,UAAU;KAAE,YAAY;KAAO;IACjE,SAAS;KAAE,MAAMA,GAAe,UAAU;KAAE,YAAY;KAAO;IAC/D,aAAa;KACX,MAAM;KACN,YAAY;KACZ,cAAc;KACf;IACF;GACF,CAAC;EACF,QAAQD,GAAkB;GACxB,MAAM;GACN,QAAQ;IACN,WAAW;KAAE,MAAMC,GAAe,cAAc;KAAE,YAAY;KAAO;IACrE,eAAe;KACb,MAAMA,GAAe,cAAc;KACnC,YAAY;KACb;IACD,YAAY;KAAE,MAAMA,GAAe,cAAc;KAAE,YAAY;KAAO;IACtE,aAAa;KAAE,MAAMA,GAAe,cAAc;KAAE,YAAY;KAAO;IACvE,cAAc;KACZ,MAAMA,GAAe,gBAAgB;KACrC,YAAY;KACb;IACD,mBAAmB;KACjB,MAAMA,GAAe,gBAAgB;KACrC,YAAY;KACb;IACD,aAAa;KACX,MAAMA,GAAe,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,405 +0,0 @@
1
- import * as _lssm_lib_contracts24 from "@lssm/lib.contracts";
2
- import * as _lssm_lib_schema507 from "@lssm/lib.schema";
3
-
4
- //#region src/tool/tool.contracts.d.ts
5
- /**
6
- * CreateToolCommand - Creates a new tool definition.
7
- */
8
- declare const CreateToolCommand: _lssm_lib_contracts24.ContractSpec<_lssm_lib_schema507.SchemaModel<{
9
- organizationId: {
10
- type: _lssm_lib_schema507.FieldType<string, string>;
11
- isOptional: false;
12
- };
13
- name: {
14
- type: _lssm_lib_schema507.FieldType<string, string>;
15
- isOptional: false;
16
- };
17
- slug: {
18
- type: _lssm_lib_schema507.FieldType<string, string>;
19
- isOptional: false;
20
- };
21
- description: {
22
- type: _lssm_lib_schema507.FieldType<string, string>;
23
- isOptional: false;
24
- };
25
- category: {
26
- type: _lssm_lib_schema507.EnumType<[string, string, string, string, string, string]>;
27
- isOptional: true;
28
- };
29
- parametersSchema: {
30
- type: _lssm_lib_schema507.FieldType<Record<string, unknown>, Record<string, unknown>>;
31
- isOptional: false;
32
- };
33
- outputSchema: {
34
- type: _lssm_lib_schema507.FieldType<Record<string, unknown>, Record<string, unknown>>;
35
- isOptional: true;
36
- };
37
- implementationType: {
38
- type: _lssm_lib_schema507.EnumType<[string, string, string]>;
39
- isOptional: false;
40
- };
41
- implementationConfig: {
42
- type: _lssm_lib_schema507.FieldType<Record<string, unknown>, Record<string, unknown>>;
43
- isOptional: false;
44
- };
45
- maxInvocationsPerMinute: {
46
- type: _lssm_lib_schema507.FieldType<number, number>;
47
- isOptional: true;
48
- };
49
- timeoutMs: {
50
- type: _lssm_lib_schema507.FieldType<number, number>;
51
- isOptional: true;
52
- };
53
- tags: {
54
- type: _lssm_lib_schema507.FieldType<string, string>;
55
- isArray: true;
56
- isOptional: true;
57
- };
58
- }>, _lssm_lib_schema507.SchemaModel<{
59
- id: {
60
- type: _lssm_lib_schema507.FieldType<string, string>;
61
- isOptional: false;
62
- };
63
- name: {
64
- type: _lssm_lib_schema507.FieldType<string, string>;
65
- isOptional: false;
66
- };
67
- slug: {
68
- type: _lssm_lib_schema507.FieldType<string, string>;
69
- isOptional: false;
70
- };
71
- status: {
72
- type: _lssm_lib_schema507.EnumType<[string, string, string, string]>;
73
- isOptional: false;
74
- };
75
- }>, {
76
- name: string;
77
- version: number;
78
- when: string;
79
- payload: _lssm_lib_schema507.SchemaModel<{
80
- id: {
81
- type: _lssm_lib_schema507.FieldType<string, string>;
82
- isOptional: false;
83
- };
84
- name: {
85
- type: _lssm_lib_schema507.FieldType<string, string>;
86
- isOptional: false;
87
- };
88
- slug: {
89
- type: _lssm_lib_schema507.FieldType<string, string>;
90
- isOptional: false;
91
- };
92
- description: {
93
- type: _lssm_lib_schema507.FieldType<string, string>;
94
- isOptional: false;
95
- };
96
- category: {
97
- type: _lssm_lib_schema507.EnumType<[string, string, string, string, string, string]>;
98
- isOptional: false;
99
- };
100
- status: {
101
- type: _lssm_lib_schema507.EnumType<[string, string, string, string]>;
102
- isOptional: false;
103
- };
104
- version: {
105
- type: _lssm_lib_schema507.FieldType<string, string>;
106
- isOptional: false;
107
- };
108
- createdAt: {
109
- type: _lssm_lib_schema507.FieldType<Date, string>;
110
- isOptional: false;
111
- };
112
- }>;
113
- }[]>;
114
- /**
115
- * UpdateToolCommand - Updates an existing tool.
116
- */
117
- declare const UpdateToolCommand: _lssm_lib_contracts24.ContractSpec<_lssm_lib_schema507.SchemaModel<{
118
- toolId: {
119
- type: _lssm_lib_schema507.FieldType<string, string>;
120
- isOptional: false;
121
- };
122
- name: {
123
- type: _lssm_lib_schema507.FieldType<string, string>;
124
- isOptional: true;
125
- };
126
- description: {
127
- type: _lssm_lib_schema507.FieldType<string, string>;
128
- isOptional: true;
129
- };
130
- status: {
131
- type: _lssm_lib_schema507.EnumType<[string, string, string, string]>;
132
- isOptional: true;
133
- };
134
- parametersSchema: {
135
- type: _lssm_lib_schema507.FieldType<Record<string, unknown>, Record<string, unknown>>;
136
- isOptional: true;
137
- };
138
- outputSchema: {
139
- type: _lssm_lib_schema507.FieldType<Record<string, unknown>, Record<string, unknown>>;
140
- isOptional: true;
141
- };
142
- implementationConfig: {
143
- type: _lssm_lib_schema507.FieldType<Record<string, unknown>, Record<string, unknown>>;
144
- isOptional: true;
145
- };
146
- maxInvocationsPerMinute: {
147
- type: _lssm_lib_schema507.FieldType<number, number>;
148
- isOptional: true;
149
- };
150
- timeoutMs: {
151
- type: _lssm_lib_schema507.FieldType<number, number>;
152
- isOptional: true;
153
- };
154
- tags: {
155
- type: _lssm_lib_schema507.FieldType<string, string>;
156
- isArray: true;
157
- isOptional: true;
158
- };
159
- }>, _lssm_lib_schema507.SchemaModel<{
160
- id: {
161
- type: _lssm_lib_schema507.FieldType<string, string>;
162
- isOptional: false;
163
- };
164
- name: {
165
- type: _lssm_lib_schema507.FieldType<string, string>;
166
- isOptional: false;
167
- };
168
- status: {
169
- type: _lssm_lib_schema507.EnumType<[string, string, string, string]>;
170
- isOptional: false;
171
- };
172
- updatedAt: {
173
- type: _lssm_lib_schema507.FieldType<Date, string>;
174
- isOptional: false;
175
- };
176
- }>, {
177
- name: string;
178
- version: number;
179
- when: string;
180
- payload: _lssm_lib_schema507.SchemaModel<{
181
- id: {
182
- type: _lssm_lib_schema507.FieldType<string, string>;
183
- isOptional: false;
184
- };
185
- name: {
186
- type: _lssm_lib_schema507.FieldType<string, string>;
187
- isOptional: false;
188
- };
189
- slug: {
190
- type: _lssm_lib_schema507.FieldType<string, string>;
191
- isOptional: false;
192
- };
193
- description: {
194
- type: _lssm_lib_schema507.FieldType<string, string>;
195
- isOptional: false;
196
- };
197
- category: {
198
- type: _lssm_lib_schema507.EnumType<[string, string, string, string, string, string]>;
199
- isOptional: false;
200
- };
201
- status: {
202
- type: _lssm_lib_schema507.EnumType<[string, string, string, string]>;
203
- isOptional: false;
204
- };
205
- version: {
206
- type: _lssm_lib_schema507.FieldType<string, string>;
207
- isOptional: false;
208
- };
209
- createdAt: {
210
- type: _lssm_lib_schema507.FieldType<Date, string>;
211
- isOptional: false;
212
- };
213
- }>;
214
- }[]>;
215
- /**
216
- * GetToolQuery - Retrieves a tool by ID.
217
- */
218
- declare const GetToolQuery: _lssm_lib_contracts24.ContractSpec<_lssm_lib_schema507.SchemaModel<{
219
- toolId: {
220
- type: _lssm_lib_schema507.FieldType<string, string>;
221
- isOptional: false;
222
- };
223
- }>, _lssm_lib_schema507.SchemaModel<{
224
- id: {
225
- type: _lssm_lib_schema507.FieldType<string, string>;
226
- isOptional: false;
227
- };
228
- organizationId: {
229
- type: _lssm_lib_schema507.FieldType<string, string>;
230
- isOptional: false;
231
- };
232
- name: {
233
- type: _lssm_lib_schema507.FieldType<string, string>;
234
- isOptional: false;
235
- };
236
- slug: {
237
- type: _lssm_lib_schema507.FieldType<string, string>;
238
- isOptional: false;
239
- };
240
- description: {
241
- type: _lssm_lib_schema507.FieldType<string, string>;
242
- isOptional: false;
243
- };
244
- category: {
245
- type: _lssm_lib_schema507.EnumType<[string, string, string, string, string, string]>;
246
- isOptional: false;
247
- };
248
- status: {
249
- type: _lssm_lib_schema507.EnumType<[string, string, string, string]>;
250
- isOptional: false;
251
- };
252
- parametersSchema: {
253
- type: _lssm_lib_schema507.FieldType<Record<string, unknown>, Record<string, unknown>>;
254
- isOptional: false;
255
- };
256
- outputSchema: {
257
- type: _lssm_lib_schema507.FieldType<Record<string, unknown>, Record<string, unknown>>;
258
- isOptional: true;
259
- };
260
- implementationType: {
261
- type: _lssm_lib_schema507.EnumType<[string, string, string]>;
262
- isOptional: false;
263
- };
264
- implementationConfig: {
265
- type: _lssm_lib_schema507.FieldType<Record<string, unknown>, Record<string, unknown>>;
266
- isOptional: false;
267
- };
268
- maxInvocationsPerMinute: {
269
- type: _lssm_lib_schema507.FieldType<number, number>;
270
- isOptional: true;
271
- };
272
- timeoutMs: {
273
- type: _lssm_lib_schema507.FieldType<number, number>;
274
- isOptional: false;
275
- defaultValue: number;
276
- };
277
- version: {
278
- type: _lssm_lib_schema507.FieldType<string, string>;
279
- isOptional: false;
280
- };
281
- tags: {
282
- type: _lssm_lib_schema507.FieldType<string, string>;
283
- isArray: true;
284
- isOptional: true;
285
- };
286
- createdAt: {
287
- type: _lssm_lib_schema507.FieldType<Date, string>;
288
- isOptional: false;
289
- };
290
- updatedAt: {
291
- type: _lssm_lib_schema507.FieldType<Date, string>;
292
- isOptional: false;
293
- };
294
- }>, undefined>;
295
- /**
296
- * ListToolsQuery - Lists tools for an organization.
297
- */
298
- declare const ListToolsQuery: _lssm_lib_contracts24.ContractSpec<_lssm_lib_schema507.SchemaModel<{
299
- organizationId: {
300
- type: _lssm_lib_schema507.FieldType<string, string>;
301
- isOptional: false;
302
- };
303
- category: {
304
- type: _lssm_lib_schema507.EnumType<[string, string, string, string, string, string]>;
305
- isOptional: true;
306
- };
307
- status: {
308
- type: _lssm_lib_schema507.EnumType<[string, string, string, string]>;
309
- isOptional: true;
310
- };
311
- search: {
312
- type: _lssm_lib_schema507.FieldType<string, string>;
313
- isOptional: true;
314
- };
315
- limit: {
316
- type: _lssm_lib_schema507.FieldType<number, number>;
317
- isOptional: true;
318
- defaultValue: number;
319
- };
320
- offset: {
321
- type: _lssm_lib_schema507.FieldType<number, number>;
322
- isOptional: true;
323
- defaultValue: number;
324
- };
325
- }>, _lssm_lib_schema507.SchemaModel<{
326
- items: {
327
- type: _lssm_lib_schema507.SchemaModel<{
328
- id: {
329
- type: _lssm_lib_schema507.FieldType<string, string>;
330
- isOptional: false;
331
- };
332
- name: {
333
- type: _lssm_lib_schema507.FieldType<string, string>;
334
- isOptional: false;
335
- };
336
- slug: {
337
- type: _lssm_lib_schema507.FieldType<string, string>;
338
- isOptional: false;
339
- };
340
- description: {
341
- type: _lssm_lib_schema507.FieldType<string, string>;
342
- isOptional: false;
343
- };
344
- category: {
345
- type: _lssm_lib_schema507.EnumType<[string, string, string, string, string, string]>;
346
- isOptional: false;
347
- };
348
- status: {
349
- type: _lssm_lib_schema507.EnumType<[string, string, string, string]>;
350
- isOptional: false;
351
- };
352
- version: {
353
- type: _lssm_lib_schema507.FieldType<string, string>;
354
- isOptional: false;
355
- };
356
- createdAt: {
357
- type: _lssm_lib_schema507.FieldType<Date, string>;
358
- isOptional: false;
359
- };
360
- }>;
361
- isArray: true;
362
- isOptional: false;
363
- };
364
- total: {
365
- type: _lssm_lib_schema507.FieldType<number, number>;
366
- isOptional: false;
367
- };
368
- hasMore: {
369
- type: _lssm_lib_schema507.FieldType<boolean, boolean>;
370
- isOptional: false;
371
- };
372
- }>, undefined>;
373
- /**
374
- * TestToolCommand - Tests a tool with sample input.
375
- */
376
- declare const TestToolCommand: _lssm_lib_contracts24.ContractSpec<_lssm_lib_schema507.SchemaModel<{
377
- toolId: {
378
- type: _lssm_lib_schema507.FieldType<string, string>;
379
- isOptional: false;
380
- };
381
- testInput: {
382
- type: _lssm_lib_schema507.FieldType<Record<string, unknown>, Record<string, unknown>>;
383
- isOptional: false;
384
- };
385
- }>, _lssm_lib_schema507.SchemaModel<{
386
- success: {
387
- type: _lssm_lib_schema507.FieldType<boolean, boolean>;
388
- isOptional: false;
389
- };
390
- output: {
391
- type: _lssm_lib_schema507.FieldType<Record<string, unknown>, Record<string, unknown>>;
392
- isOptional: true;
393
- };
394
- error: {
395
- type: _lssm_lib_schema507.FieldType<string, string>;
396
- isOptional: true;
397
- };
398
- durationMs: {
399
- type: _lssm_lib_schema507.FieldType<number, number>;
400
- isOptional: false;
401
- };
402
- }>, undefined>;
403
- //#endregion
404
- export { CreateToolCommand, GetToolQuery, ListToolsQuery, TestToolCommand, UpdateToolCommand };
405
- //# sourceMappingURL=tool.contracts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tool.contracts.js","names":["defineSchemaModel","ScalarTypeEnum"],"sources":["../../src/tool/tool.contracts.ts"],"sourcesContent":["import { defineCommand, defineQuery } from '@lssm/lib.contracts/spec';\nimport { defineSchemaModel, ScalarTypeEnum } from '@lssm/lib.schema';\nimport { ToolCategoryEnum, ToolStatusEnum } from './tool.enum';\nimport {\n ToolModel,\n ToolSummaryModel,\n CreateToolInputModel,\n UpdateToolInputModel,\n} from './tool.schema';\n\nconst OWNERS = ['agent-console-team'] as const;\n\n/**\n * CreateToolCommand - Creates a new tool definition.\n */\nexport const CreateToolCommand = defineCommand({\n meta: {\n name: 'agent.tool.create',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['tool', 'create'],\n description: 'Creates a new AI tool definition.',\n goal: 'Allow users to define new tools that agents can use.',\n context: 'Called from the tool builder UI when creating a new tool.',\n },\n io: {\n input: CreateToolInputModel,\n output: defineSchemaModel({\n name: 'CreateToolOutput',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n status: { type: ToolStatusEnum, isOptional: false },\n },\n }),\n errors: {\n SLUG_EXISTS: {\n description: 'A tool with this slug already exists in the organization',\n http: 409,\n gqlCode: 'SLUG_EXISTS',\n when: 'Slug is already taken',\n },\n },\n },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n name: 'tool.created',\n version: 1,\n when: 'Tool is successfully created',\n payload: ToolSummaryModel,\n },\n ],\n audit: ['tool.created'],\n },\n});\n\n/**\n * UpdateToolCommand - Updates an existing tool.\n */\nexport const UpdateToolCommand = defineCommand({\n meta: {\n name: 'agent.tool.update',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['tool', 'update'],\n description: 'Updates an existing AI tool definition.',\n goal: 'Allow users to modify tool settings and configuration.',\n context: 'Called from the tool settings UI.',\n },\n io: {\n input: UpdateToolInputModel,\n output: defineSchemaModel({\n name: 'UpdateToolOutput',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n status: { type: ToolStatusEnum, isOptional: false },\n updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n }),\n errors: {\n TOOL_NOT_FOUND: {\n description: 'The specified tool does not exist',\n http: 404,\n gqlCode: 'TOOL_NOT_FOUND',\n when: 'Tool ID is invalid',\n },\n },\n },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n name: 'tool.updated',\n version: 1,\n when: 'Tool is updated',\n payload: ToolSummaryModel,\n },\n ],\n audit: ['tool.updated'],\n },\n});\n\n/**\n * GetToolQuery - Retrieves a tool by ID.\n */\nexport const GetToolQuery = defineQuery({\n meta: {\n name: 'agent.tool.get',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['tool', 'get'],\n description: 'Retrieves a tool by its ID.',\n goal: 'View detailed tool configuration.',\n context: 'Called when viewing tool details or editing.',\n },\n io: {\n input: defineSchemaModel({\n name: 'GetToolInput',\n fields: {\n toolId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n }),\n output: ToolModel,\n errors: {\n TOOL_NOT_FOUND: {\n description: 'The specified tool does not exist',\n http: 404,\n gqlCode: 'TOOL_NOT_FOUND',\n when: 'Tool ID is invalid',\n },\n },\n },\n policy: { auth: 'user' },\n});\n\n/**\n * ListToolsQuery - Lists tools for an organization.\n */\nexport const ListToolsQuery = defineQuery({\n meta: {\n name: 'agent.tool.list',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['tool', 'list'],\n description: 'Lists tools for an organization with optional filtering.',\n goal: 'Browse and search available tools.',\n context: 'Tool list/dashboard view.',\n },\n io: {\n input: defineSchemaModel({\n name: 'ListToolsInput',\n fields: {\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n category: { type: ToolCategoryEnum, isOptional: true },\n status: { type: ToolStatusEnum, isOptional: true },\n search: { type: ScalarTypeEnum.String_unsecure(), 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: 'ListToolsOutput',\n fields: {\n items: { type: ToolSummaryModel, 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 * TestToolCommand - Tests a tool with sample input.\n */\nexport const TestToolCommand = defineCommand({\n meta: {\n name: 'agent.tool.test',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['tool', 'test'],\n description: 'Tests a tool with sample input to verify it works correctly.',\n goal: 'Validate tool configuration before deployment.',\n context: 'Tool builder UI - test panel.',\n },\n io: {\n input: defineSchemaModel({\n name: 'TestToolInput',\n fields: {\n toolId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n testInput: { type: ScalarTypeEnum.JSONObject(), isOptional: false },\n },\n }),\n output: defineSchemaModel({\n name: 'TestToolOutput',\n fields: {\n success: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n output: { type: ScalarTypeEnum.JSONObject(), isOptional: true },\n error: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n durationMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n },\n }),\n errors: {\n TOOL_NOT_FOUND: {\n description: 'The specified tool does not exist',\n http: 404,\n gqlCode: 'TOOL_NOT_FOUND',\n when: 'Tool ID is invalid',\n },\n TOOL_EXECUTION_ERROR: {\n description: 'Tool execution failed',\n http: 500,\n gqlCode: 'TOOL_EXECUTION_ERROR',\n when: 'Tool returns an error',\n },\n },\n },\n policy: { auth: 'user' },\n sideEffects: { audit: ['tool.tested'] },\n});\n"],"mappings":";;;;;;AAUA,MAAM,SAAS,CAAC,qBAAqB;;;;AAKrC,MAAa,oBAAoB,cAAc;CAC7C,MAAM;EACJ,MAAM;EACN,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM,CAAC,QAAQ,SAAS;EACxB,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQA,GAAkB;GACxB,MAAM;GACN,QAAQ;IACN,IAAI;KAAE,MAAMC,GAAe,iBAAiB;KAAE,YAAY;KAAO;IACjE,MAAM;KAAE,MAAMA,GAAe,gBAAgB;KAAE,YAAY;KAAO;IAClE,MAAM;KAAE,MAAMA,GAAe,iBAAiB;KAAE,YAAY;KAAO;IACnE,QAAQ;KAAE,MAAM;KAAgB,YAAY;KAAO;IACpD;GACF,C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