@opentabs-dev/opentabs-plugin-temporal-cloud 0.0.85

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 (49) hide show
  1. package/README.md +53 -0
  2. package/dist/adapter.iife.js +15747 -0
  3. package/dist/adapter.iife.js.map +7 -0
  4. package/dist/index.d.ts +14 -0
  5. package/dist/index.d.ts.map +1 -0
  6. package/dist/index.js +34 -0
  7. package/dist/index.js.map +1 -0
  8. package/dist/temporal-api.d.ts +5 -0
  9. package/dist/temporal-api.d.ts.map +1 -0
  10. package/dist/temporal-api.js +87 -0
  11. package/dist/temporal-api.js.map +1 -0
  12. package/dist/tools/count-workflows.d.ts +8 -0
  13. package/dist/tools/count-workflows.d.ts.map +1 -0
  14. package/dist/tools/count-workflows.js +30 -0
  15. package/dist/tools/count-workflows.js.map +1 -0
  16. package/dist/tools/get-schedule.d.ts +25 -0
  17. package/dist/tools/get-schedule.d.ts.map +1 -0
  18. package/dist/tools/get-schedule.js +23 -0
  19. package/dist/tools/get-schedule.js.map +1 -0
  20. package/dist/tools/get-settings.d.ts +15 -0
  21. package/dist/tools/get-settings.d.ts.map +1 -0
  22. package/dist/tools/get-settings.js +42 -0
  23. package/dist/tools/get-settings.js.map +1 -0
  24. package/dist/tools/get-task-queue.d.ts +15 -0
  25. package/dist/tools/get-task-queue.d.ts.map +1 -0
  26. package/dist/tools/get-task-queue.js +31 -0
  27. package/dist/tools/get-task-queue.js.map +1 -0
  28. package/dist/tools/get-workflow-history.d.ts +18 -0
  29. package/dist/tools/get-workflow-history.d.ts.map +1 -0
  30. package/dist/tools/get-workflow-history.js +38 -0
  31. package/dist/tools/get-workflow-history.js.map +1 -0
  32. package/dist/tools/get-workflow.d.ts +27 -0
  33. package/dist/tools/get-workflow.d.ts.map +1 -0
  34. package/dist/tools/get-workflow.js +24 -0
  35. package/dist/tools/get-workflow.js.map +1 -0
  36. package/dist/tools/list-schedules.d.ts +19 -0
  37. package/dist/tools/list-schedules.d.ts.map +1 -0
  38. package/dist/tools/list-schedules.js +33 -0
  39. package/dist/tools/list-schedules.js.map +1 -0
  40. package/dist/tools/list-workflows.d.ts +26 -0
  41. package/dist/tools/list-workflows.d.ts.map +1 -0
  42. package/dist/tools/list-workflows.js +38 -0
  43. package/dist/tools/list-workflows.js.map +1 -0
  44. package/dist/tools/schemas.d.ts +290 -0
  45. package/dist/tools/schemas.d.ts.map +1 -0
  46. package/dist/tools/schemas.js +234 -0
  47. package/dist/tools/schemas.js.map +1 -0
  48. package/dist/tools.json +790 -0
  49. package/package.json +56 -0
@@ -0,0 +1,38 @@
1
+ import { defineTool } from '@opentabs-dev/plugin-sdk';
2
+ import { z } from 'zod';
3
+ import { api, resolveNamespace } from '../temporal-api.js';
4
+ import { namespaceParam, workflowExecutionSchema, mapWorkflowExecution } from './schemas.js';
5
+ export const listWorkflows = defineTool({
6
+ name: 'list_workflows',
7
+ displayName: 'List Workflows',
8
+ description: 'List workflow executions in a namespace. Supports Temporal visibility query syntax for filtering (e.g., WorkflowType="MyWorkflow", ExecutionStatus="Running"). Defaults to the namespace in the current browser tab if not specified.',
9
+ summary: 'List workflow executions with optional filtering',
10
+ icon: 'list',
11
+ group: 'Workflows',
12
+ input: z.object({
13
+ namespace: namespaceParam,
14
+ query: z
15
+ .string()
16
+ .optional()
17
+ .describe('Temporal visibility query filter (e.g., WorkflowType="MyWorkflow" AND ExecutionStatus="Running")'),
18
+ page_size: z.number().int().min(1).max(200).optional().describe('Results per page (default 100, max 200)'),
19
+ next_page_token: z.string().optional().describe('Pagination token from a previous response'),
20
+ }),
21
+ output: z.object({
22
+ workflows: z.array(workflowExecutionSchema).describe('Workflow executions'),
23
+ next_page_token: z.string().describe('Token for next page (empty if no more results)'),
24
+ }),
25
+ handle: async (params) => {
26
+ const ns = resolveNamespace(params.namespace);
27
+ const data = await api(ns, `/namespaces/${ns}/workflows`, {
28
+ query: params.query,
29
+ maximumPageSize: params.page_size ?? 100,
30
+ nextPageToken: params.next_page_token,
31
+ });
32
+ return {
33
+ workflows: (data.executions ?? []).map(mapWorkflowExecution),
34
+ next_page_token: data.nextPageToken ?? '',
35
+ };
36
+ },
37
+ });
38
+ //# sourceMappingURL=list-workflows.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-workflows.js","sourceRoot":"","sources":["../../src/tools/list-workflows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,oBAAoB,EAA6B,MAAM,cAAc,CAAC;AAExH,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CAAC;IACtC,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EACT,uOAAuO;IACzO,OAAO,EAAE,kDAAkD;IAC3D,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,WAAW;IAClB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,SAAS,EAAE,cAAc;QACzB,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,kGAAkG,CAAC;QAC/G,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC;QAC1G,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2CAA2C,CAAC;KAC7F,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC,QAAQ,CAAC,qBAAqB,CAAC;QAC3E,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gDAAgD,CAAC;KACvF,CAAC;IACF,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACrB,MAAM,EAAE,GAAG,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAC9C,MAAM,IAAI,GAAG,MAAM,GAAG,CAGnB,EAAE,EAAE,eAAe,EAAE,YAAY,EAAE;YACpC,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,eAAe,EAAE,MAAM,CAAC,SAAS,IAAI,GAAG;YACxC,aAAa,EAAE,MAAM,CAAC,eAAe;SACtC,CAAC,CAAC;QAEH,OAAO;YACL,SAAS,EAAE,CAAC,IAAI,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,oBAAoB,CAAC;YAC5D,eAAe,EAAE,IAAI,CAAC,aAAa,IAAI,EAAE;SAC1C,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,290 @@
1
+ import { z } from 'zod';
2
+ export declare const namespaceParam: z.ZodOptional<z.ZodString>;
3
+ export declare const workflowExecutionSchema: z.ZodObject<{
4
+ workflow_id: z.ZodString;
5
+ run_id: z.ZodString;
6
+ type: z.ZodString;
7
+ status: z.ZodString;
8
+ task_queue: z.ZodString;
9
+ start_time: z.ZodString;
10
+ execution_time: z.ZodString;
11
+ close_time: z.ZodString;
12
+ history_length: z.ZodString;
13
+ memo: z.ZodRecord<z.ZodString, z.ZodString>;
14
+ parent_workflow_id: z.ZodString;
15
+ parent_run_id: z.ZodString;
16
+ root_workflow_id: z.ZodString;
17
+ root_run_id: z.ZodString;
18
+ }, z.core.$strip>;
19
+ export interface RawWorkflowExecution {
20
+ execution?: {
21
+ workflowId?: string;
22
+ runId?: string;
23
+ };
24
+ type?: {
25
+ name?: string;
26
+ };
27
+ status?: string;
28
+ taskQueue?: string;
29
+ startTime?: string;
30
+ executionTime?: string;
31
+ closeTime?: string;
32
+ historyLength?: string;
33
+ memo?: {
34
+ fields?: Record<string, {
35
+ data?: string;
36
+ }>;
37
+ };
38
+ parentExecution?: {
39
+ workflowId?: string;
40
+ runId?: string;
41
+ };
42
+ rootExecution?: {
43
+ workflowId?: string;
44
+ runId?: string;
45
+ };
46
+ searchAttributes?: {
47
+ indexedFields?: Record<string, unknown>;
48
+ };
49
+ }
50
+ export declare const mapWorkflowExecution: (w: RawWorkflowExecution) => {
51
+ workflow_id: string;
52
+ run_id: string;
53
+ type: string;
54
+ status: string;
55
+ task_queue: string;
56
+ start_time: string;
57
+ execution_time: string;
58
+ close_time: string;
59
+ history_length: string;
60
+ memo: Record<string, string>;
61
+ parent_workflow_id: string;
62
+ parent_run_id: string;
63
+ root_workflow_id: string;
64
+ root_run_id: string;
65
+ };
66
+ export declare const workflowDetailSchema: z.ZodObject<{
67
+ workflow_id: z.ZodString;
68
+ run_id: z.ZodString;
69
+ type: z.ZodString;
70
+ status: z.ZodString;
71
+ task_queue: z.ZodString;
72
+ start_time: z.ZodString;
73
+ execution_time: z.ZodString;
74
+ close_time: z.ZodString;
75
+ history_length: z.ZodString;
76
+ history_size_bytes: z.ZodString;
77
+ state_transition_count: z.ZodString;
78
+ first_run_id: z.ZodString;
79
+ execution_timeout: z.ZodString;
80
+ run_timeout: z.ZodString;
81
+ task_timeout: z.ZodString;
82
+ memo: z.ZodRecord<z.ZodString, z.ZodString>;
83
+ search_attributes: z.ZodRecord<z.ZodString, z.ZodString>;
84
+ parent_workflow_id: z.ZodString;
85
+ parent_run_id: z.ZodString;
86
+ }, z.core.$strip>;
87
+ export interface RawWorkflowDetail {
88
+ workflowExecutionInfo?: RawWorkflowExecution & {
89
+ historySizeBytes?: string;
90
+ stateTransitionCount?: string;
91
+ firstRunId?: string;
92
+ searchAttributes?: {
93
+ indexedFields?: Record<string, {
94
+ data?: string;
95
+ metadata?: {
96
+ type?: string;
97
+ };
98
+ }>;
99
+ };
100
+ };
101
+ executionConfig?: {
102
+ taskQueue?: {
103
+ name?: string;
104
+ };
105
+ workflowExecutionTimeout?: string;
106
+ workflowRunTimeout?: string;
107
+ defaultWorkflowTaskTimeout?: string;
108
+ };
109
+ }
110
+ export declare const mapWorkflowDetail: (d: RawWorkflowDetail) => {
111
+ workflow_id: string;
112
+ run_id: string;
113
+ type: string;
114
+ status: string;
115
+ task_queue: string;
116
+ start_time: string;
117
+ execution_time: string;
118
+ close_time: string;
119
+ history_length: string;
120
+ history_size_bytes: string;
121
+ state_transition_count: string;
122
+ first_run_id: string;
123
+ execution_timeout: string;
124
+ run_timeout: string;
125
+ task_timeout: string;
126
+ memo: Record<string, string>;
127
+ search_attributes: Record<string, string>;
128
+ parent_workflow_id: string;
129
+ parent_run_id: string;
130
+ };
131
+ export declare const historyEventSchema: z.ZodObject<{
132
+ event_id: z.ZodString;
133
+ event_type: z.ZodString;
134
+ event_time: z.ZodString;
135
+ attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
136
+ }, z.core.$strip>;
137
+ export interface RawHistoryEvent {
138
+ eventId?: string;
139
+ eventType?: string;
140
+ eventTime?: string;
141
+ [key: string]: unknown;
142
+ }
143
+ export declare const mapHistoryEvent: (e: RawHistoryEvent) => {
144
+ event_id: string;
145
+ event_type: string;
146
+ event_time: string;
147
+ attributes: Record<string, unknown>;
148
+ };
149
+ export declare const scheduleSchema: z.ZodObject<{
150
+ schedule_id: z.ZodString;
151
+ workflow_type: z.ZodString;
152
+ task_queue: z.ZodString;
153
+ spec_summary: z.ZodString;
154
+ overlap_policy: z.ZodString;
155
+ state: z.ZodString;
156
+ recent_actions_count: z.ZodNumber;
157
+ next_action_times: z.ZodArray<z.ZodString>;
158
+ }, z.core.$strip>;
159
+ interface ScheduleSpec {
160
+ interval?: Array<{
161
+ interval?: string;
162
+ phase?: string;
163
+ }>;
164
+ calendar?: Array<{
165
+ dayOfWeek?: string;
166
+ hour?: string;
167
+ minute?: string;
168
+ }>;
169
+ cronExpressions?: string[];
170
+ }
171
+ export interface RawScheduleListEntry {
172
+ scheduleId?: string;
173
+ info?: {
174
+ spec?: ScheduleSpec;
175
+ workflowType?: {
176
+ name?: string;
177
+ };
178
+ recentActions?: Array<unknown>;
179
+ futureActionTimes?: string[];
180
+ };
181
+ }
182
+ export declare const mapScheduleListEntry: (s: RawScheduleListEntry) => {
183
+ schedule_id: string;
184
+ workflow_type: string;
185
+ task_queue: string;
186
+ spec_summary: string;
187
+ overlap_policy: string;
188
+ state: string;
189
+ recent_actions_count: number;
190
+ next_action_times: string[];
191
+ };
192
+ export declare const scheduleDetailSchema: z.ZodObject<{
193
+ schedule_id: z.ZodString;
194
+ workflow_type: z.ZodString;
195
+ workflow_id: z.ZodString;
196
+ task_queue: z.ZodString;
197
+ spec_summary: z.ZodString;
198
+ overlap_policy: z.ZodString;
199
+ catchup_window: z.ZodString;
200
+ paused: z.ZodBoolean;
201
+ notes: z.ZodString;
202
+ action_count: z.ZodString;
203
+ recent_actions: z.ZodArray<z.ZodObject<{
204
+ schedule_time: z.ZodString;
205
+ actual_time: z.ZodString;
206
+ workflow_id: z.ZodString;
207
+ run_id: z.ZodString;
208
+ status: z.ZodString;
209
+ }, z.core.$strip>>;
210
+ next_action_times: z.ZodArray<z.ZodString>;
211
+ }, z.core.$strip>;
212
+ export interface RawScheduleDetail {
213
+ schedule?: {
214
+ spec?: ScheduleSpec;
215
+ action?: {
216
+ startWorkflow?: {
217
+ workflowId?: string;
218
+ workflowType?: {
219
+ name?: string;
220
+ };
221
+ taskQueue?: {
222
+ name?: string;
223
+ };
224
+ };
225
+ };
226
+ policies?: {
227
+ overlapPolicy?: string;
228
+ catchupWindow?: string;
229
+ };
230
+ state?: {
231
+ paused?: boolean;
232
+ notes?: string;
233
+ };
234
+ };
235
+ info?: {
236
+ actionCount?: string;
237
+ recentActions?: Array<{
238
+ scheduleTime?: string;
239
+ actualTime?: string;
240
+ startWorkflowResult?: {
241
+ workflowId?: string;
242
+ runId?: string;
243
+ };
244
+ startWorkflowStatus?: string;
245
+ }>;
246
+ futureActionTimes?: string[];
247
+ };
248
+ }
249
+ export declare const mapScheduleDetail: (d: RawScheduleDetail, scheduleId: string) => {
250
+ schedule_id: string;
251
+ workflow_type: string;
252
+ workflow_id: string;
253
+ task_queue: string;
254
+ spec_summary: string;
255
+ overlap_policy: string;
256
+ catchup_window: string;
257
+ paused: boolean;
258
+ notes: string;
259
+ action_count: string;
260
+ recent_actions: {
261
+ schedule_time: string;
262
+ actual_time: string;
263
+ workflow_id: string;
264
+ run_id: string;
265
+ status: string;
266
+ }[];
267
+ next_action_times: string[];
268
+ };
269
+ export declare const taskQueuePollerSchema: z.ZodObject<{
270
+ identity: z.ZodString;
271
+ last_access_time: z.ZodString;
272
+ rate_per_second: z.ZodNumber;
273
+ worker_version_capabilities_build_id: z.ZodString;
274
+ }, z.core.$strip>;
275
+ export interface RawPoller {
276
+ identity?: string;
277
+ lastAccessTime?: string;
278
+ ratePerSecond?: number;
279
+ workerVersionCapabilities?: {
280
+ buildId?: string;
281
+ };
282
+ }
283
+ export declare const mapPoller: (p: RawPoller) => {
284
+ identity: string;
285
+ last_access_time: string;
286
+ rate_per_second: number;
287
+ worker_version_capabilities_build_id: string;
288
+ };
289
+ export {};
290
+ //# sourceMappingURL=schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/tools/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,cAAc,4BAKxB,CAAC;AAIJ,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;iBAelC,CAAC;AAEH,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACpD,IAAI,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA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O,MAAM,iBAAiB,GAAI,GAAG,iBAAiB,EAAE,YAAY,MAAM;;;;;;;;;;;;;;;;;;;CAmBxE,CAAC;AAIH,eAAO,MAAM,qBAAqB;;;;;iBAKhC,CAAC;AAEH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yBAAyB,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAClD;AAED,eAAO,MAAM,SAAS,GAAI,GAAG,SAAS;;;;;CAKpC,CAAC"}
@@ -0,0 +1,234 @@
1
+ import { z } from 'zod';
2
+ // --- Shared Parameters ---
3
+ export const namespaceParam = z
4
+ .string()
5
+ .optional()
6
+ .describe('Temporal namespace (e.g., "prod-us-west-2.abc123"). Defaults to the namespace in the current browser tab.');
7
+ // --- Workflow Execution ---
8
+ export const workflowExecutionSchema = z.object({
9
+ workflow_id: z.string().describe('Workflow ID'),
10
+ run_id: z.string().describe('Run ID for this execution'),
11
+ type: z.string().describe('Workflow type name'),
12
+ status: z.string().describe('Execution status (e.g., WORKFLOW_EXECUTION_STATUS_RUNNING)'),
13
+ task_queue: z.string().describe('Task queue name'),
14
+ start_time: z.string().describe('ISO 8601 start timestamp'),
15
+ execution_time: z.string().describe('ISO 8601 execution timestamp'),
16
+ close_time: z.string().describe('ISO 8601 close timestamp (empty if running)'),
17
+ history_length: z.string().describe('Number of events in history'),
18
+ memo: z.record(z.string(), z.string()).describe('Memo fields (key-value pairs)'),
19
+ parent_workflow_id: z.string().describe('Parent workflow ID (empty if none)'),
20
+ parent_run_id: z.string().describe('Parent run ID (empty if none)'),
21
+ root_workflow_id: z.string().describe('Root workflow ID'),
22
+ root_run_id: z.string().describe('Root run ID'),
23
+ });
24
+ const decodeMemo = (memo) => {
25
+ if (!memo?.fields)
26
+ return {};
27
+ const result = {};
28
+ for (const [key, val] of Object.entries(memo.fields)) {
29
+ if (val?.data) {
30
+ try {
31
+ result[key] = atob(val.data);
32
+ }
33
+ catch {
34
+ result[key] = val.data;
35
+ }
36
+ }
37
+ }
38
+ return result;
39
+ };
40
+ export const mapWorkflowExecution = (w) => ({
41
+ workflow_id: w.execution?.workflowId ?? '',
42
+ run_id: w.execution?.runId ?? '',
43
+ type: w.type?.name ?? '',
44
+ status: w.status ?? '',
45
+ task_queue: w.taskQueue ?? '',
46
+ start_time: w.startTime ?? '',
47
+ execution_time: w.executionTime ?? '',
48
+ close_time: w.closeTime ?? '',
49
+ history_length: w.historyLength ?? '0',
50
+ memo: decodeMemo(w.memo),
51
+ parent_workflow_id: w.parentExecution?.workflowId ?? '',
52
+ parent_run_id: w.parentExecution?.runId ?? '',
53
+ root_workflow_id: w.rootExecution?.workflowId ?? '',
54
+ root_run_id: w.rootExecution?.runId ?? '',
55
+ });
56
+ // --- Workflow Detail ---
57
+ export const workflowDetailSchema = z.object({
58
+ workflow_id: z.string().describe('Workflow ID'),
59
+ run_id: z.string().describe('Run ID'),
60
+ type: z.string().describe('Workflow type name'),
61
+ status: z.string().describe('Execution status'),
62
+ task_queue: z.string().describe('Task queue name'),
63
+ start_time: z.string().describe('ISO 8601 start timestamp'),
64
+ execution_time: z.string().describe('ISO 8601 execution timestamp'),
65
+ close_time: z.string().describe('ISO 8601 close timestamp (empty if running)'),
66
+ history_length: z.string().describe('Number of events in history'),
67
+ history_size_bytes: z.string().describe('History size in bytes'),
68
+ state_transition_count: z.string().describe('Number of state transitions'),
69
+ first_run_id: z.string().describe('First run ID in the chain'),
70
+ execution_timeout: z.string().describe('Workflow execution timeout'),
71
+ run_timeout: z.string().describe('Workflow run timeout'),
72
+ task_timeout: z.string().describe('Workflow task timeout'),
73
+ memo: z.record(z.string(), z.string()).describe('Memo fields'),
74
+ search_attributes: z.record(z.string(), z.string()).describe('Search attributes (decoded)'),
75
+ parent_workflow_id: z.string().describe('Parent workflow ID (empty if none)'),
76
+ parent_run_id: z.string().describe('Parent run ID (empty if none)'),
77
+ });
78
+ const decodeSearchAttributes = (attrs) => {
79
+ if (!attrs)
80
+ return {};
81
+ const result = {};
82
+ for (const [key, val] of Object.entries(attrs)) {
83
+ if (val?.data) {
84
+ try {
85
+ result[key] = atob(val.data);
86
+ }
87
+ catch {
88
+ result[key] = val.data;
89
+ }
90
+ }
91
+ }
92
+ return result;
93
+ };
94
+ export const mapWorkflowDetail = (d) => ({
95
+ workflow_id: d.workflowExecutionInfo?.execution?.workflowId ?? '',
96
+ run_id: d.workflowExecutionInfo?.execution?.runId ?? '',
97
+ type: d.workflowExecutionInfo?.type?.name ?? '',
98
+ status: d.workflowExecutionInfo?.status ?? '',
99
+ task_queue: d.workflowExecutionInfo?.taskQueue ?? '',
100
+ start_time: d.workflowExecutionInfo?.startTime ?? '',
101
+ execution_time: d.workflowExecutionInfo?.executionTime ?? '',
102
+ close_time: d.workflowExecutionInfo?.closeTime ?? '',
103
+ history_length: d.workflowExecutionInfo?.historyLength ?? '0',
104
+ history_size_bytes: d.workflowExecutionInfo?.historySizeBytes ?? '0',
105
+ state_transition_count: d.workflowExecutionInfo?.stateTransitionCount ?? '0',
106
+ first_run_id: d.workflowExecutionInfo?.firstRunId ?? '',
107
+ execution_timeout: d.executionConfig?.workflowExecutionTimeout ?? '0s',
108
+ run_timeout: d.executionConfig?.workflowRunTimeout ?? '0s',
109
+ task_timeout: d.executionConfig?.defaultWorkflowTaskTimeout ?? '10s',
110
+ memo: decodeMemo(d.workflowExecutionInfo?.memo),
111
+ search_attributes: decodeSearchAttributes(d.workflowExecutionInfo?.searchAttributes?.indexedFields),
112
+ parent_workflow_id: d.workflowExecutionInfo?.parentExecution?.workflowId ?? '',
113
+ parent_run_id: d.workflowExecutionInfo?.parentExecution?.runId ?? '',
114
+ });
115
+ // --- History Event ---
116
+ export const historyEventSchema = z.object({
117
+ event_id: z.string().describe('Event ID (sequential number)'),
118
+ event_type: z.string().describe('Event type (e.g., EVENT_TYPE_WORKFLOW_EXECUTION_STARTED)'),
119
+ event_time: z.string().describe('ISO 8601 timestamp'),
120
+ attributes: z.record(z.string(), z.unknown()).describe('Event-specific attributes'),
121
+ });
122
+ const KNOWN_NON_ATTRIBUTE_KEYS = new Set([
123
+ 'eventId',
124
+ 'eventType',
125
+ 'eventTime',
126
+ 'version',
127
+ 'taskId',
128
+ 'workerMayIgnore',
129
+ 'links',
130
+ ]);
131
+ export const mapHistoryEvent = (e) => {
132
+ const attributes = {};
133
+ for (const [key, val] of Object.entries(e)) {
134
+ if (!KNOWN_NON_ATTRIBUTE_KEYS.has(key) && key.endsWith('Attributes') && val) {
135
+ Object.assign(attributes, val);
136
+ }
137
+ }
138
+ return {
139
+ event_id: e.eventId ?? '',
140
+ event_type: e.eventType ?? '',
141
+ event_time: e.eventTime ?? '',
142
+ attributes,
143
+ };
144
+ };
145
+ // --- Schedule ---
146
+ export const scheduleSchema = z.object({
147
+ schedule_id: z.string().describe('Schedule ID'),
148
+ workflow_type: z.string().describe('Workflow type that this schedule starts'),
149
+ task_queue: z.string().describe('Task queue for scheduled workflows'),
150
+ spec_summary: z.string().describe('Human-readable schedule spec (interval or cron)'),
151
+ overlap_policy: z.string().describe('Overlap policy'),
152
+ state: z.string().describe('Schedule state (active/paused)'),
153
+ recent_actions_count: z.number().int().describe('Number of recent actions'),
154
+ next_action_times: z.array(z.string()).describe('Next scheduled action times (ISO 8601)'),
155
+ });
156
+ const formatSpec = (spec) => {
157
+ if (!spec)
158
+ return '';
159
+ if (spec.cronExpressions?.length)
160
+ return spec.cronExpressions.join(', ');
161
+ if (spec.interval?.length) {
162
+ return spec.interval.map((i) => `every ${i.interval ?? '?'}`).join(', ');
163
+ }
164
+ if (spec.calendar?.length)
165
+ return 'calendar-based';
166
+ return '';
167
+ };
168
+ export const mapScheduleListEntry = (s) => ({
169
+ schedule_id: s.scheduleId ?? '',
170
+ workflow_type: s.info?.workflowType?.name ?? '',
171
+ task_queue: '',
172
+ spec_summary: formatSpec(s.info?.spec),
173
+ overlap_policy: '',
174
+ state: 'active',
175
+ recent_actions_count: s.info?.recentActions?.length ?? 0,
176
+ next_action_times: s.info?.futureActionTimes ?? [],
177
+ });
178
+ // --- Schedule Detail ---
179
+ export const scheduleDetailSchema = z.object({
180
+ schedule_id: z.string().describe('Schedule ID'),
181
+ workflow_type: z.string().describe('Workflow type that this schedule starts'),
182
+ workflow_id: z.string().describe('Workflow ID pattern'),
183
+ task_queue: z.string().describe('Task queue for scheduled workflows'),
184
+ spec_summary: z.string().describe('Human-readable schedule spec'),
185
+ overlap_policy: z.string().describe('Overlap policy'),
186
+ catchup_window: z.string().describe('Catchup window duration'),
187
+ paused: z.boolean().describe('Whether the schedule is paused'),
188
+ notes: z.string().describe('Schedule notes'),
189
+ action_count: z.string().describe('Total number of actions taken'),
190
+ recent_actions: z
191
+ .array(z.object({
192
+ schedule_time: z.string().describe('Scheduled time (ISO 8601)'),
193
+ actual_time: z.string().describe('Actual execution time (ISO 8601)'),
194
+ workflow_id: z.string().describe('Resulting workflow ID'),
195
+ run_id: z.string().describe('Resulting run ID'),
196
+ status: z.string().describe('Workflow execution status'),
197
+ }))
198
+ .describe('Recent schedule actions'),
199
+ next_action_times: z.array(z.string()).describe('Next scheduled action times (ISO 8601)'),
200
+ });
201
+ export const mapScheduleDetail = (d, scheduleId) => ({
202
+ schedule_id: scheduleId,
203
+ workflow_type: d.schedule?.action?.startWorkflow?.workflowType?.name ?? '',
204
+ workflow_id: d.schedule?.action?.startWorkflow?.workflowId ?? '',
205
+ task_queue: d.schedule?.action?.startWorkflow?.taskQueue?.name ?? '',
206
+ spec_summary: formatSpec(d.schedule?.spec),
207
+ overlap_policy: d.schedule?.policies?.overlapPolicy ?? '',
208
+ catchup_window: d.schedule?.policies?.catchupWindow ?? '',
209
+ paused: d.schedule?.state?.paused ?? false,
210
+ notes: d.schedule?.state?.notes ?? '',
211
+ action_count: d.info?.actionCount ?? '0',
212
+ recent_actions: (d.info?.recentActions ?? []).map(a => ({
213
+ schedule_time: a.scheduleTime ?? '',
214
+ actual_time: a.actualTime ?? '',
215
+ workflow_id: a.startWorkflowResult?.workflowId ?? '',
216
+ run_id: a.startWorkflowResult?.runId ?? '',
217
+ status: a.startWorkflowStatus ?? '',
218
+ })),
219
+ next_action_times: d.info?.futureActionTimes ?? [],
220
+ });
221
+ // --- Task Queue ---
222
+ export const taskQueuePollerSchema = z.object({
223
+ identity: z.string().describe('Worker identity'),
224
+ last_access_time: z.string().describe('Last poll time (ISO 8601)'),
225
+ rate_per_second: z.number().describe('Worker rate per second'),
226
+ worker_version_capabilities_build_id: z.string().describe('Worker build ID'),
227
+ });
228
+ export const mapPoller = (p) => ({
229
+ identity: p.identity ?? '',
230
+ last_access_time: p.lastAccessTime ?? '',
231
+ rate_per_second: p.ratePerSecond ?? 0,
232
+ worker_version_capabilities_build_id: p.workerVersionCapabilities?.buildId ?? '',
233
+ });
234
+ //# sourceMappingURL=schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/tools/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,4BAA4B;AAE5B,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC;KAC5B,MAAM,EAAE;KACR,QAAQ,EAAE;KACV,QAAQ,CACP,2GAA2G,CAC5G,CAAC;AAEJ,6BAA6B;AAE7B,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC;IAC/C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC;IACxD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oBAAoB,CAAC;IAC/C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,4DAA4D,CA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