@hexabot-ai/types 3.0.2-alpha.9 → 3.0.2-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -11,7 +11,7 @@ Shared zod-first runtime contracts for Hexabot API entity outputs.
11
11
  - `cms`: `ContentType*`, `Content*`, `Menu*`
12
12
  - `i18n`: `Language*`, `Translation*`
13
13
  - `setting`: `Setting*`, `Metadata*`
14
- - `user`: `UserProfile*`, `Model*`, `Permission*`, `Role*`, `Credential*`, `User*`
14
+ - `user`: `UserProfile*`, `Model*`, `Permission*`, `Role*`, `Credential*`, `McpToken*`, `User*`
15
15
  - `workflow`: `Workflow*`, `WorkflowVersion*`, `WorkflowRun*`, `MemoryDefinition*`, `MemoryRecord*`, `McpServer*`
16
16
  - `utils/test/dummy`: `Dummy*`
17
17
  - `attachment`: `Attachment*`
@@ -144,6 +144,31 @@ const schema = createWorkflowFullSchema({ parseDefinition });
144
144
  const workflow = schema.parse(data);
145
145
  ```
146
146
 
147
+ ## Workflow Transfer Bundles
148
+
149
+ Workflow import/export contracts are exposed as zod schemas and inferred types:
150
+
151
+ ```ts
152
+ import {
153
+ workflowExportBundleSchema,
154
+ workflowImportResultSchema,
155
+ workflowTransferResourceKindSchema,
156
+ type WorkflowExportBundleV1,
157
+ type WorkflowImportResult,
158
+ } from "@hexabot-ai/types";
159
+ ```
160
+
161
+ `workflowExportBundleSchema` validates the portable
162
+ `hexabot.workflow.bundle` YAML payload. Credential resources include metadata
163
+ only; secret `value` fields are intentionally rejected by the strict schema.
164
+ Resource arrays include workflow dependencies such as called workflows, memory
165
+ definitions, MCP servers, credentials, content types, label groups, and labels.
166
+ The root `workflow.exportId` and `resources.workflows` entries preserve
167
+ `call_workflow` references across imports. Newer resource arrays default to
168
+ empty lists so existing version 1 bundles remain importable.
169
+ Extension resource arrays may also be included directly under `resources`; custom
170
+ resource result `kind` values are validated with `workflowTransferResourceKindSchema`.
171
+
147
172
  ## Alias Compatibility
148
173
 
149
174
  Common ORM alias mappings from legacy class-transformer DTOs are preserved, including:
@@ -163,6 +188,8 @@ Unknown keys are stripped by default.
163
188
  - Legacy API enum/type paths can re-export from this package without value changes.
164
189
  - Schema parsing preserves nullable/optional normalization used by API entity outputs.
165
190
  - Mixed owner/triggeredBy contracts (`Subscriber | User`) are supported in workflow full contracts.
191
+ - Sensitive output parity is preserved for credentials and MCP tokens (`value` and token hashes are not part of output contracts).
192
+ - Workflow run contracts include `parentRun` for call-and-return workflow stacks.
166
193
  - Sensitive output parity is preserved for credentials (`value` is not part of output contracts).
167
194
 
168
195
  ## Breaking-Change Notes
@@ -5,7 +5,7 @@
5
5
  * Full terms: see LICENSE.md.
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.credentialStubSchema = exports.credentialSchema = exports.credentialFullSchema = exports.permissionStubSchema = exports.permissionSchema = exports.permissionFullSchema = exports.modelStubSchema = exports.modelSchema = exports.modelFullSchema = exports.roleStubSchema = exports.roleSchema = exports.roleFullSchema = exports.userStubSchema = exports.userSchema = exports.userFullSchema = exports.userProfileAssignedStubSchema = exports.userProfileAssignedSchema = exports.userProfileAssignedFullSchema = exports.userProfileStubSchema = exports.userProfileSchema = exports.userProfileFullSchema = exports.MethodToAction = exports.Action = void 0;
8
+ exports.mcpTokenStubSchema = exports.mcpTokenSchema = exports.mcpTokenFullSchema = exports.credentialStubSchema = exports.credentialSchema = exports.credentialFullSchema = exports.permissionStubSchema = exports.permissionSchema = exports.permissionFullSchema = exports.modelStubSchema = exports.modelSchema = exports.modelFullSchema = exports.roleStubSchema = exports.roleSchema = exports.roleFullSchema = exports.userStubSchema = exports.userSchema = exports.userFullSchema = exports.userProfileAssignedStubSchema = exports.userProfileAssignedSchema = exports.userProfileAssignedFullSchema = exports.userProfileStubSchema = exports.userProfileSchema = exports.userProfileFullSchema = exports.MethodToAction = exports.Action = void 0;
9
9
  var domain_1 = require("./domain");
10
10
  Object.defineProperty(exports, "Action", { enumerable: true, get: function () { return domain_1.Action; } });
11
11
  Object.defineProperty(exports, "MethodToAction", { enumerable: true, get: function () { return domain_1.MethodToAction; } });
@@ -37,3 +37,7 @@ var credential_1 = require("./credential");
37
37
  Object.defineProperty(exports, "credentialFullSchema", { enumerable: true, get: function () { return credential_1.credentialFullSchema; } });
38
38
  Object.defineProperty(exports, "credentialSchema", { enumerable: true, get: function () { return credential_1.credentialSchema; } });
39
39
  Object.defineProperty(exports, "credentialStubSchema", { enumerable: true, get: function () { return credential_1.credentialStubSchema; } });
40
+ var mcp_token_1 = require("./mcp-token");
41
+ Object.defineProperty(exports, "mcpTokenFullSchema", { enumerable: true, get: function () { return mcp_token_1.mcpTokenFullSchema; } });
42
+ Object.defineProperty(exports, "mcpTokenSchema", { enumerable: true, get: function () { return mcp_token_1.mcpTokenSchema; } });
43
+ Object.defineProperty(exports, "mcpTokenStubSchema", { enumerable: true, get: function () { return mcp_token_1.mcpTokenStubSchema; } });
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ /*
3
+ * Hexabot — Fair Core License (FCL-1.0-ALv2)
4
+ * Copyright (c) 2026 Hexastack.
5
+ * Full terms: see LICENSE.md.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.mcpTokenFullSchema = exports.mcpTokenSchema = exports.mcpTokenStubSchema = void 0;
9
+ const zod_1 = require("zod");
10
+ const aliases_1 = require("../shared/aliases");
11
+ const base_1 = require("../shared/base");
12
+ const preprocess_1 = require("../shared/preprocess");
13
+ const user_1 = require("./user");
14
+ const nullableDateSchema = (0, preprocess_1.preprocess)((value) => (value == null ? null : value), zod_1.z.coerce.date().nullable());
15
+ const mcpTokenAliasMap = {
16
+ ownerId: "owner",
17
+ };
18
+ const mcpTokenStubObjectSchema = base_1.baseStubSchema.extend({
19
+ name: zod_1.z.string(),
20
+ tokenPrefix: zod_1.z.string(),
21
+ expiresAt: nullableDateSchema,
22
+ lastUsedAt: nullableDateSchema,
23
+ revokedAt: nullableDateSchema,
24
+ });
25
+ exports.mcpTokenStubSchema = mcpTokenStubObjectSchema;
26
+ exports.mcpTokenSchema = (0, preprocess_1.preprocess)((value) => (0, aliases_1.withAliases)(value, mcpTokenAliasMap), mcpTokenStubObjectSchema.extend({
27
+ owner: (0, preprocess_1.preprocess)((value) => (value == null ? null : (0, aliases_1.asId)(value)), zod_1.z.string()),
28
+ }));
29
+ exports.mcpTokenFullSchema = mcpTokenStubObjectSchema.extend({
30
+ owner: (0, preprocess_1.preprocess)((value) => (value == null ? null : value), zod_1.z.lazy(() => user_1.userSchema).nullable()),
31
+ });
@@ -5,7 +5,7 @@
5
5
  * Full terms: see LICENSE.md.
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.mcpServerStubSchema = exports.mcpServerSchema = exports.mcpServerFullSchema = exports.memoryRecordStubSchema = exports.memoryRecordSchema = exports.memoryRecordFullSchema = exports.memoryDefinitionStubSchema = exports.memoryDefinitionSchema = exports.memoryDefinitionFullSchema = exports.workflowRunStubSchema = exports.workflowRunSchema = exports.workflowRunFullSchema = exports.resolveRunDurationMs = exports.workflowVersionStubSchema = exports.workflowVersionSchema = exports.workflowVersionFullSchema = exports.workflowStubSchema = exports.workflowSchema = exports.workflowFullSchema = exports.createWorkflowFullSchema = exports.WorkflowVersionAction = exports.WorkflowType = exports.MemoryScope = exports.McpServerTransport = exports.DirectionType = void 0;
8
+ exports.workflowTransferResourceKindSchema = exports.workflowImportResultSchema = exports.workflowImportResourceResultSchema = exports.workflowImportResourceActionSchema = exports.workflowExportBundleWorkflowDependencySchema = exports.workflowExportBundleV1Schema = exports.workflowExportBundleSchema = exports.workflowExportBundleMemoryDefinitionSchema = exports.workflowExportBundleMcpServerSchema = exports.workflowExportBundleLabelSchema = exports.workflowExportBundleLabelGroupSchema = exports.workflowExportBundleCredentialSchema = exports.workflowExportBundleContentTypeSchema = exports.WORKFLOW_TRANSFER_RESOURCE_KIND_PATTERN = exports.WORKFLOW_EXPORT_BUNDLE_KIND = exports.mcpServerStubSchema = exports.mcpServerSchema = exports.mcpServerFullSchema = exports.memoryRecordStubSchema = exports.memoryRecordSchema = exports.memoryRecordFullSchema = exports.memoryDefinitionStubSchema = exports.memoryDefinitionSchema = exports.memoryDefinitionFullSchema = exports.workflowRunStubSchema = exports.workflowRunSchema = exports.workflowRunFullSchema = exports.resolveRunDurationMs = exports.workflowVersionStubSchema = exports.workflowVersionSchema = exports.workflowVersionFullSchema = exports.workflowStubSchema = exports.workflowSchema = exports.workflowFullSchema = exports.createWorkflowFullSchema = exports.WorkflowVersionAction = exports.WorkflowType = exports.MemoryScope = exports.McpServerTransport = exports.DirectionType = void 0;
9
9
  var domain_1 = require("./domain");
10
10
  Object.defineProperty(exports, "DirectionType", { enumerable: true, get: function () { return domain_1.DirectionType; } });
11
11
  Object.defineProperty(exports, "McpServerTransport", { enumerable: true, get: function () { return domain_1.McpServerTransport; } });
@@ -38,3 +38,19 @@ var mcp_server_1 = require("./mcp-server");
38
38
  Object.defineProperty(exports, "mcpServerFullSchema", { enumerable: true, get: function () { return mcp_server_1.mcpServerFullSchema; } });
39
39
  Object.defineProperty(exports, "mcpServerSchema", { enumerable: true, get: function () { return mcp_server_1.mcpServerSchema; } });
40
40
  Object.defineProperty(exports, "mcpServerStubSchema", { enumerable: true, get: function () { return mcp_server_1.mcpServerStubSchema; } });
41
+ var workflow_transfer_1 = require("./workflow-transfer");
42
+ Object.defineProperty(exports, "WORKFLOW_EXPORT_BUNDLE_KIND", { enumerable: true, get: function () { return workflow_transfer_1.WORKFLOW_EXPORT_BUNDLE_KIND; } });
43
+ Object.defineProperty(exports, "WORKFLOW_TRANSFER_RESOURCE_KIND_PATTERN", { enumerable: true, get: function () { return workflow_transfer_1.WORKFLOW_TRANSFER_RESOURCE_KIND_PATTERN; } });
44
+ Object.defineProperty(exports, "workflowExportBundleContentTypeSchema", { enumerable: true, get: function () { return workflow_transfer_1.workflowExportBundleContentTypeSchema; } });
45
+ Object.defineProperty(exports, "workflowExportBundleCredentialSchema", { enumerable: true, get: function () { return workflow_transfer_1.workflowExportBundleCredentialSchema; } });
46
+ Object.defineProperty(exports, "workflowExportBundleLabelGroupSchema", { enumerable: true, get: function () { return workflow_transfer_1.workflowExportBundleLabelGroupSchema; } });
47
+ Object.defineProperty(exports, "workflowExportBundleLabelSchema", { enumerable: true, get: function () { return workflow_transfer_1.workflowExportBundleLabelSchema; } });
48
+ Object.defineProperty(exports, "workflowExportBundleMcpServerSchema", { enumerable: true, get: function () { return workflow_transfer_1.workflowExportBundleMcpServerSchema; } });
49
+ Object.defineProperty(exports, "workflowExportBundleMemoryDefinitionSchema", { enumerable: true, get: function () { return workflow_transfer_1.workflowExportBundleMemoryDefinitionSchema; } });
50
+ Object.defineProperty(exports, "workflowExportBundleSchema", { enumerable: true, get: function () { return workflow_transfer_1.workflowExportBundleSchema; } });
51
+ Object.defineProperty(exports, "workflowExportBundleV1Schema", { enumerable: true, get: function () { return workflow_transfer_1.workflowExportBundleV1Schema; } });
52
+ Object.defineProperty(exports, "workflowExportBundleWorkflowDependencySchema", { enumerable: true, get: function () { return workflow_transfer_1.workflowExportBundleWorkflowDependencySchema; } });
53
+ Object.defineProperty(exports, "workflowImportResourceActionSchema", { enumerable: true, get: function () { return workflow_transfer_1.workflowImportResourceActionSchema; } });
54
+ Object.defineProperty(exports, "workflowImportResourceResultSchema", { enumerable: true, get: function () { return workflow_transfer_1.workflowImportResourceResultSchema; } });
55
+ Object.defineProperty(exports, "workflowImportResultSchema", { enumerable: true, get: function () { return workflow_transfer_1.workflowImportResultSchema; } });
56
+ Object.defineProperty(exports, "workflowTransferResourceKindSchema", { enumerable: true, get: function () { return workflow_transfer_1.workflowTransferResourceKindSchema; } });
@@ -50,6 +50,7 @@ const workflowRunAliasMap = {
50
50
  workflowVersionId: "workflowVersion",
51
51
  triggeredById: "triggeredBy",
52
52
  threadId: "thread",
53
+ parentRunId: "parentRun",
53
54
  };
54
55
  const workflowRunStubObjectSchema = base_1.baseStubSchema.extend({
55
56
  status: workflowRunStatusSchema,
@@ -88,6 +89,7 @@ exports.workflowRunSchema = (0, preprocess_1.preprocess)((value) => (0, aliases_
88
89
  workflow: (0, preprocess_1.preprocess)((value) => (value == null ? null : (0, aliases_1.asId)(value)), zod_1.z.string()),
89
90
  workflowVersion: (0, preprocess_1.preprocess)((value) => (value == null ? null : (0, aliases_1.asId)(value)), zod_1.z.string().nullable()),
90
91
  triggeredBy: (0, preprocess_1.preprocess)((value) => (value == null ? null : (0, aliases_1.asId)(value)), zod_1.z.string().nullable()),
92
+ parentRun: (0, preprocess_1.preprocess)((value) => (value == null ? null : (0, aliases_1.asId)(value)), zod_1.z.string().nullable()),
91
93
  }));
92
94
  exports.workflowRunFullSchema = (0, preprocess_1.preprocess)((value) => withWorkflowRunDuration(value), workflowRunStubObjectSchema.extend({
93
95
  workflow: workflow_1.workflowSchema,
@@ -97,4 +99,8 @@ exports.workflowRunFullSchema = (0, preprocess_1.preprocess)((value) => withWork
97
99
  .optional(),
98
100
  triggeredBy: nullableUserOrSubscriberSchema,
99
101
  thread: thread_1.threadSchema.nullable().optional(),
102
+ parentRun: zod_1.z
103
+ .lazy(() => exports.workflowRunSchema)
104
+ .nullable()
105
+ .optional(),
100
106
  }));
@@ -0,0 +1,124 @@
1
+ "use strict";
2
+ /*
3
+ * Hexabot — Fair Core License (FCL-1.0-ALv2)
4
+ * Copyright (c) 2026 Hexastack.
5
+ * Full terms: see LICENSE.md.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.workflowImportResultSchema = exports.workflowImportResourceResultSchema = exports.workflowImportResourceActionSchema = exports.workflowExportBundleSchema = exports.workflowExportBundleV1Schema = exports.workflowExportBundleWorkflowDependencySchema = exports.workflowExportBundleLabelSchema = exports.workflowExportBundleLabelGroupSchema = exports.workflowExportBundleContentTypeSchema = exports.workflowExportBundleMcpServerSchema = exports.workflowExportBundleCredentialSchema = exports.workflowExportBundleMemoryDefinitionSchema = exports.workflowTransferResourceKindSchema = exports.WORKFLOW_TRANSFER_RESOURCE_KIND_PATTERN = exports.WORKFLOW_EXPORT_BUNDLE_KIND = void 0;
9
+ const zod_1 = require("zod");
10
+ const domain_1 = require("./domain");
11
+ const workflow_1 = require("./workflow");
12
+ exports.WORKFLOW_EXPORT_BUNDLE_KIND = "hexabot.workflow.bundle";
13
+ exports.WORKFLOW_TRANSFER_RESOURCE_KIND_PATTERN = /^[a-z][A-Za-z0-9]*(?:[._-][A-Za-z0-9]+)*$/;
14
+ exports.workflowTransferResourceKindSchema = zod_1.z
15
+ .string()
16
+ .min(1)
17
+ .regex(exports.WORKFLOW_TRANSFER_RESOURCE_KIND_PATTERN);
18
+ const workflowExportBundleLayoutSchema = zod_1.z.strictObject({
19
+ x: zod_1.z.coerce.number(),
20
+ y: zod_1.z.coerce.number(),
21
+ zoom: zod_1.z.coerce.number(),
22
+ direction: domain_1.directionTypeSchema,
23
+ });
24
+ const workflowExportBundleWorkflowSchema = zod_1.z.strictObject({
25
+ exportId: zod_1.z.string().min(1).optional(),
26
+ name: zod_1.z.string().min(1),
27
+ description: zod_1.z.string().nullable(),
28
+ type: domain_1.workflowTypeSchema,
29
+ schedule: zod_1.z.string().nullable(),
30
+ inputSchema: zod_1.z.any(),
31
+ layout: workflowExportBundleLayoutSchema,
32
+ });
33
+ const workflowExportBundleVersionSchema = zod_1.z.strictObject({
34
+ number: zod_1.z.coerce.number(),
35
+ checksum: zod_1.z.string(),
36
+ message: zod_1.z.string().nullable(),
37
+ exportedVersionId: zod_1.z.string().min(1),
38
+ });
39
+ exports.workflowExportBundleMemoryDefinitionSchema = zod_1.z.strictObject({
40
+ exportId: zod_1.z.string().min(1),
41
+ name: zod_1.z.string().min(1),
42
+ slug: zod_1.z.string().min(1),
43
+ scope: domain_1.memoryScopeSchema,
44
+ schema: zod_1.z.any(),
45
+ ttlSeconds: zod_1.z.coerce.number().nullable().optional(),
46
+ });
47
+ exports.workflowExportBundleCredentialSchema = zod_1.z.strictObject({
48
+ exportId: zod_1.z.string().min(1),
49
+ name: zod_1.z.string().min(1),
50
+ exportedOwnerId: zod_1.z.string().optional(),
51
+ });
52
+ exports.workflowExportBundleMcpServerSchema = zod_1.z.strictObject({
53
+ exportId: zod_1.z.string().min(1),
54
+ name: zod_1.z.string().min(1),
55
+ enabled: zod_1.z.coerce.boolean(),
56
+ transport: domain_1.mcpServerTransportSchema,
57
+ url: zod_1.z.string().nullable(),
58
+ command: zod_1.z.string().nullable(),
59
+ args: zod_1.z.array(zod_1.z.string()).nullable(),
60
+ cwd: zod_1.z.string().nullable(),
61
+ credentialExportId: zod_1.z.string().nullable().optional(),
62
+ });
63
+ exports.workflowExportBundleContentTypeSchema = zod_1.z.strictObject({
64
+ exportId: zod_1.z.string().min(1),
65
+ name: zod_1.z.string().min(1),
66
+ schema: zod_1.z.any(),
67
+ });
68
+ exports.workflowExportBundleLabelGroupSchema = zod_1.z.strictObject({
69
+ exportId: zod_1.z.string().min(1),
70
+ name: zod_1.z.string().min(1),
71
+ });
72
+ exports.workflowExportBundleLabelSchema = zod_1.z.strictObject({
73
+ exportId: zod_1.z.string().min(1),
74
+ title: zod_1.z.string().min(1),
75
+ name: zod_1.z.string().min(1),
76
+ description: zod_1.z.string().nullable(),
77
+ groupExportId: zod_1.z.string().nullable(),
78
+ });
79
+ exports.workflowExportBundleWorkflowDependencySchema = zod_1.z.strictObject({
80
+ exportId: zod_1.z.string().min(1),
81
+ workflow: workflowExportBundleWorkflowSchema.omit({ exportId: true }),
82
+ version: workflowExportBundleVersionSchema,
83
+ definitionYml: zod_1.z.string().min(1),
84
+ });
85
+ const workflowExportBundleResourcesSchema = zod_1.z
86
+ .object({
87
+ memoryDefinitions: zod_1.z.array(exports.workflowExportBundleMemoryDefinitionSchema),
88
+ mcpServers: zod_1.z.array(exports.workflowExportBundleMcpServerSchema),
89
+ credentials: zod_1.z.array(exports.workflowExportBundleCredentialSchema),
90
+ contentTypes: zod_1.z.array(exports.workflowExportBundleContentTypeSchema).default([]),
91
+ labelGroups: zod_1.z.array(exports.workflowExportBundleLabelGroupSchema).default([]),
92
+ labels: zod_1.z.array(exports.workflowExportBundleLabelSchema).default([]),
93
+ workflows: zod_1.z
94
+ .array(exports.workflowExportBundleWorkflowDependencySchema)
95
+ .default([]),
96
+ })
97
+ .catchall(zod_1.z.array(zod_1.z.unknown()));
98
+ exports.workflowExportBundleV1Schema = zod_1.z.strictObject({
99
+ kind: zod_1.z.literal(exports.WORKFLOW_EXPORT_BUNDLE_KIND),
100
+ schemaVersion: zod_1.z.literal(1),
101
+ exportedAt: zod_1.z.iso.datetime(),
102
+ workflow: workflowExportBundleWorkflowSchema,
103
+ version: workflowExportBundleVersionSchema,
104
+ definitionYml: zod_1.z.string().min(1),
105
+ resources: workflowExportBundleResourcesSchema,
106
+ });
107
+ exports.workflowExportBundleSchema = exports.workflowExportBundleV1Schema;
108
+ exports.workflowImportResourceActionSchema = zod_1.z.enum([
109
+ "created",
110
+ "reused",
111
+ "placeholder_created",
112
+ ]);
113
+ exports.workflowImportResourceResultSchema = zod_1.z.strictObject({
114
+ kind: exports.workflowTransferResourceKindSchema,
115
+ exportId: zod_1.z.string().min(1),
116
+ localId: zod_1.z.string().min(1),
117
+ name: zod_1.z.string().min(1),
118
+ action: exports.workflowImportResourceActionSchema,
119
+ });
120
+ exports.workflowImportResultSchema = zod_1.z.strictObject({
121
+ workflow: workflow_1.workflowSchema,
122
+ resources: zod_1.z.array(exports.workflowImportResourceResultSchema),
123
+ warnings: zod_1.z.array(zod_1.z.string()),
124
+ });
@@ -11,3 +11,4 @@ export { roleFullSchema, roleSchema, roleStubSchema, } from "./role";
11
11
  export { modelFullSchema, modelSchema, modelStubSchema, } from "./model";
12
12
  export { permissionFullSchema, permissionSchema, permissionStubSchema, } from "./permission";
13
13
  export { credentialFullSchema, credentialSchema, credentialStubSchema, } from "./credential";
14
+ export { mcpTokenFullSchema, mcpTokenSchema, mcpTokenStubSchema, } from "./mcp-token";
@@ -0,0 +1,28 @@
1
+ /*
2
+ * Hexabot — Fair Core License (FCL-1.0-ALv2)
3
+ * Copyright (c) 2026 Hexastack.
4
+ * Full terms: see LICENSE.md.
5
+ */
6
+ import { z } from "zod";
7
+ import { asId, withAliases } from "../shared/aliases";
8
+ import { baseStubSchema } from "../shared/base";
9
+ import { preprocess } from "../shared/preprocess";
10
+ import { userSchema } from "./user";
11
+ const nullableDateSchema = preprocess((value) => (value == null ? null : value), z.coerce.date().nullable());
12
+ const mcpTokenAliasMap = {
13
+ ownerId: "owner",
14
+ };
15
+ const mcpTokenStubObjectSchema = baseStubSchema.extend({
16
+ name: z.string(),
17
+ tokenPrefix: z.string(),
18
+ expiresAt: nullableDateSchema,
19
+ lastUsedAt: nullableDateSchema,
20
+ revokedAt: nullableDateSchema,
21
+ });
22
+ export const mcpTokenStubSchema = mcpTokenStubObjectSchema;
23
+ export const mcpTokenSchema = preprocess((value) => withAliases(value, mcpTokenAliasMap), mcpTokenStubObjectSchema.extend({
24
+ owner: preprocess((value) => (value == null ? null : asId(value)), z.string()),
25
+ }));
26
+ export const mcpTokenFullSchema = mcpTokenStubObjectSchema.extend({
27
+ owner: preprocess((value) => (value == null ? null : value), z.lazy(() => userSchema).nullable()),
28
+ });
@@ -10,3 +10,4 @@ export { resolveRunDurationMs, workflowRunFullSchema, workflowRunSchema, workflo
10
10
  export { memoryDefinitionFullSchema, memoryDefinitionSchema, memoryDefinitionStubSchema, } from "./memory-definition";
11
11
  export { memoryRecordFullSchema, memoryRecordSchema, memoryRecordStubSchema, } from "./memory-record";
12
12
  export { mcpServerFullSchema, mcpServerSchema, mcpServerStubSchema, } from "./mcp-server";
13
+ export { WORKFLOW_EXPORT_BUNDLE_KIND, WORKFLOW_TRANSFER_RESOURCE_KIND_PATTERN, workflowExportBundleContentTypeSchema, workflowExportBundleCredentialSchema, workflowExportBundleLabelGroupSchema, workflowExportBundleLabelSchema, workflowExportBundleMcpServerSchema, workflowExportBundleMemoryDefinitionSchema, workflowExportBundleSchema, workflowExportBundleV1Schema, workflowExportBundleWorkflowDependencySchema, workflowImportResourceActionSchema, workflowImportResourceResultSchema, workflowImportResultSchema, workflowTransferResourceKindSchema, } from "./workflow-transfer";
@@ -46,6 +46,7 @@ const workflowRunAliasMap = {
46
46
  workflowVersionId: "workflowVersion",
47
47
  triggeredById: "triggeredBy",
48
48
  threadId: "thread",
49
+ parentRunId: "parentRun",
49
50
  };
50
51
  const workflowRunStubObjectSchema = baseStubSchema.extend({
51
52
  status: workflowRunStatusSchema,
@@ -84,6 +85,7 @@ export const workflowRunSchema = preprocess((value) => withAliases(withWorkflowR
84
85
  workflow: preprocess((value) => (value == null ? null : asId(value)), z.string()),
85
86
  workflowVersion: preprocess((value) => (value == null ? null : asId(value)), z.string().nullable()),
86
87
  triggeredBy: preprocess((value) => (value == null ? null : asId(value)), z.string().nullable()),
88
+ parentRun: preprocess((value) => (value == null ? null : asId(value)), z.string().nullable()),
87
89
  }));
88
90
  export const workflowRunFullSchema = preprocess((value) => withWorkflowRunDuration(value), workflowRunStubObjectSchema.extend({
89
91
  workflow: workflowSchema,
@@ -93,4 +95,8 @@ export const workflowRunFullSchema = preprocess((value) => withWorkflowRunDurati
93
95
  .optional(),
94
96
  triggeredBy: nullableUserOrSubscriberSchema,
95
97
  thread: threadSchema.nullable().optional(),
98
+ parentRun: z
99
+ .lazy(() => workflowRunSchema)
100
+ .nullable()
101
+ .optional(),
96
102
  }));
@@ -0,0 +1,121 @@
1
+ /*
2
+ * Hexabot — Fair Core License (FCL-1.0-ALv2)
3
+ * Copyright (c) 2026 Hexastack.
4
+ * Full terms: see LICENSE.md.
5
+ */
6
+ import { z } from "zod";
7
+ import { directionTypeSchema, mcpServerTransportSchema, memoryScopeSchema, workflowTypeSchema, } from "./domain";
8
+ import { workflowSchema } from "./workflow";
9
+ export const WORKFLOW_EXPORT_BUNDLE_KIND = "hexabot.workflow.bundle";
10
+ export const WORKFLOW_TRANSFER_RESOURCE_KIND_PATTERN = /^[a-z][A-Za-z0-9]*(?:[._-][A-Za-z0-9]+)*$/;
11
+ export const workflowTransferResourceKindSchema = z
12
+ .string()
13
+ .min(1)
14
+ .regex(WORKFLOW_TRANSFER_RESOURCE_KIND_PATTERN);
15
+ const workflowExportBundleLayoutSchema = z.strictObject({
16
+ x: z.coerce.number(),
17
+ y: z.coerce.number(),
18
+ zoom: z.coerce.number(),
19
+ direction: directionTypeSchema,
20
+ });
21
+ const workflowExportBundleWorkflowSchema = z.strictObject({
22
+ exportId: z.string().min(1).optional(),
23
+ name: z.string().min(1),
24
+ description: z.string().nullable(),
25
+ type: workflowTypeSchema,
26
+ schedule: z.string().nullable(),
27
+ inputSchema: z.any(),
28
+ layout: workflowExportBundleLayoutSchema,
29
+ });
30
+ const workflowExportBundleVersionSchema = z.strictObject({
31
+ number: z.coerce.number(),
32
+ checksum: z.string(),
33
+ message: z.string().nullable(),
34
+ exportedVersionId: z.string().min(1),
35
+ });
36
+ export const workflowExportBundleMemoryDefinitionSchema = z.strictObject({
37
+ exportId: z.string().min(1),
38
+ name: z.string().min(1),
39
+ slug: z.string().min(1),
40
+ scope: memoryScopeSchema,
41
+ schema: z.any(),
42
+ ttlSeconds: z.coerce.number().nullable().optional(),
43
+ });
44
+ export const workflowExportBundleCredentialSchema = z.strictObject({
45
+ exportId: z.string().min(1),
46
+ name: z.string().min(1),
47
+ exportedOwnerId: z.string().optional(),
48
+ });
49
+ export const workflowExportBundleMcpServerSchema = z.strictObject({
50
+ exportId: z.string().min(1),
51
+ name: z.string().min(1),
52
+ enabled: z.coerce.boolean(),
53
+ transport: mcpServerTransportSchema,
54
+ url: z.string().nullable(),
55
+ command: z.string().nullable(),
56
+ args: z.array(z.string()).nullable(),
57
+ cwd: z.string().nullable(),
58
+ credentialExportId: z.string().nullable().optional(),
59
+ });
60
+ export const workflowExportBundleContentTypeSchema = z.strictObject({
61
+ exportId: z.string().min(1),
62
+ name: z.string().min(1),
63
+ schema: z.any(),
64
+ });
65
+ export const workflowExportBundleLabelGroupSchema = z.strictObject({
66
+ exportId: z.string().min(1),
67
+ name: z.string().min(1),
68
+ });
69
+ export const workflowExportBundleLabelSchema = z.strictObject({
70
+ exportId: z.string().min(1),
71
+ title: z.string().min(1),
72
+ name: z.string().min(1),
73
+ description: z.string().nullable(),
74
+ groupExportId: z.string().nullable(),
75
+ });
76
+ export const workflowExportBundleWorkflowDependencySchema = z.strictObject({
77
+ exportId: z.string().min(1),
78
+ workflow: workflowExportBundleWorkflowSchema.omit({ exportId: true }),
79
+ version: workflowExportBundleVersionSchema,
80
+ definitionYml: z.string().min(1),
81
+ });
82
+ const workflowExportBundleResourcesSchema = z
83
+ .object({
84
+ memoryDefinitions: z.array(workflowExportBundleMemoryDefinitionSchema),
85
+ mcpServers: z.array(workflowExportBundleMcpServerSchema),
86
+ credentials: z.array(workflowExportBundleCredentialSchema),
87
+ contentTypes: z.array(workflowExportBundleContentTypeSchema).default([]),
88
+ labelGroups: z.array(workflowExportBundleLabelGroupSchema).default([]),
89
+ labels: z.array(workflowExportBundleLabelSchema).default([]),
90
+ workflows: z
91
+ .array(workflowExportBundleWorkflowDependencySchema)
92
+ .default([]),
93
+ })
94
+ .catchall(z.array(z.unknown()));
95
+ export const workflowExportBundleV1Schema = z.strictObject({
96
+ kind: z.literal(WORKFLOW_EXPORT_BUNDLE_KIND),
97
+ schemaVersion: z.literal(1),
98
+ exportedAt: z.iso.datetime(),
99
+ workflow: workflowExportBundleWorkflowSchema,
100
+ version: workflowExportBundleVersionSchema,
101
+ definitionYml: z.string().min(1),
102
+ resources: workflowExportBundleResourcesSchema,
103
+ });
104
+ export const workflowExportBundleSchema = workflowExportBundleV1Schema;
105
+ export const workflowImportResourceActionSchema = z.enum([
106
+ "created",
107
+ "reused",
108
+ "placeholder_created",
109
+ ]);
110
+ export const workflowImportResourceResultSchema = z.strictObject({
111
+ kind: workflowTransferResourceKindSchema,
112
+ exportId: z.string().min(1),
113
+ localId: z.string().min(1),
114
+ name: z.string().min(1),
115
+ action: workflowImportResourceActionSchema,
116
+ });
117
+ export const workflowImportResultSchema = z.strictObject({
118
+ workflow: workflowSchema,
119
+ resources: z.array(workflowImportResourceResultSchema),
120
+ warnings: z.array(z.string()),
121
+ });
@@ -6,4 +6,5 @@ export { roleFullSchema, roleSchema, roleStubSchema, type Role, type RoleFull, t
6
6
  export { modelFullSchema, modelSchema, modelStubSchema, type Model, type ModelFull, type ModelStub, } from "./model";
7
7
  export { permissionFullSchema, permissionSchema, permissionStubSchema, type Permission, type PermissionFull, type PermissionStub, } from "./permission";
8
8
  export { credentialFullSchema, credentialSchema, credentialStubSchema, type Credential, type CredentialFull, type CredentialStub, } from "./credential";
9
+ export { mcpTokenFullSchema, mcpTokenSchema, mcpTokenStubSchema, type McpToken, type McpTokenFull, type McpTokenStub, } from "./mcp-token";
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/user/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,MAAM,EACN,cAAc,EACd,KAAK,uBAAuB,EAC5B,KAAK,eAAe,EACpB,KAAK,MAAM,EACX,KAAK,SAAS,GACf,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,eAAe,GACrB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,6BAA6B,EAC7B,yBAAyB,EACzB,6BAA6B,EAC7B,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,YAAY,GAClB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,cAAc,EACd,UAAU,EACV,cAAc,EACd,KAAK,IAAI,EACT,KAAK,QAAQ,EACb,KAAK,QAAQ,GACd,MAAM,QAAQ,CAAC;AAEhB,OAAO,EACL,cAAc,EACd,UAAU,EACV,cAAc,EACd,KAAK,IAAI,EACT,KAAK,QAAQ,EACb,KAAK,QAAQ,GACd,MAAM,QAAQ,CAAC;AAEhB,OAAO,EACL,eAAe,EACf,WAAW,EACX,eAAe,EACf,KAAK,KAAK,EACV,KAAK,SAAS,EACd,KAAK,SAAS,GACf,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/user/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,MAAM,EACN,cAAc,EACd,KAAK,uBAAuB,EAC5B,KAAK,eAAe,EACpB,KAAK,MAAM,EACX,KAAK,SAAS,GACf,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,eAAe,GACrB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,6BAA6B,EAC7B,yBAAyB,EACzB,6BAA6B,EAC7B,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,YAAY,GAClB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,cAAc,EACd,UAAU,EACV,cAAc,EACd,KAAK,IAAI,EACT,KAAK,QAAQ,EACb,KAAK,QAAQ,GACd,MAAM,QAAQ,CAAC;AAEhB,OAAO,EACL,cAAc,EACd,UAAU,EACV,cAAc,EACd,KAAK,IAAI,EACT,KAAK,QAAQ,EACb,KAAK,QAAQ,GACd,MAAM,QAAQ,CAAC;AAEhB,OAAO,EACL,eAAe,EACf,WAAW,EACX,eAAe,EACf,KAAK,KAAK,EACV,KAAK,SAAS,EACd,KAAK,SAAS,GACf,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,YAAY,GAClB,MAAM,aAAa,CAAC"}
@@ -0,0 +1,113 @@
1
+ import { z } from "zod";
2
+ export declare const mcpTokenStubSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ createdAt: z.ZodCoercedDate<unknown>;
5
+ updatedAt: z.ZodCoercedDate<unknown>;
6
+ name: z.ZodString;
7
+ tokenPrefix: z.ZodString;
8
+ expiresAt: z.ZodType<Date | null, unknown, z.core.$ZodTypeInternals<Date | null, unknown>>;
9
+ lastUsedAt: z.ZodType<Date | null, unknown, z.core.$ZodTypeInternals<Date | null, unknown>>;
10
+ revokedAt: z.ZodType<Date | null, unknown, z.core.$ZodTypeInternals<Date | null, unknown>>;
11
+ }, z.core.$strip>;
12
+ export declare const mcpTokenSchema: z.ZodType<{
13
+ id: string;
14
+ createdAt: Date;
15
+ updatedAt: Date;
16
+ name: string;
17
+ tokenPrefix: string;
18
+ expiresAt: Date | null;
19
+ lastUsedAt: Date | null;
20
+ revokedAt: Date | null;
21
+ owner: string;
22
+ }, unknown, z.core.$ZodTypeInternals<{
23
+ id: string;
24
+ createdAt: Date;
25
+ updatedAt: Date;
26
+ name: string;
27
+ tokenPrefix: string;
28
+ expiresAt: Date | null;
29
+ lastUsedAt: Date | null;
30
+ revokedAt: Date | null;
31
+ owner: string;
32
+ }, unknown>>;
33
+ export declare const mcpTokenFullSchema: z.ZodObject<{
34
+ id: z.ZodString;
35
+ createdAt: z.ZodCoercedDate<unknown>;
36
+ updatedAt: z.ZodCoercedDate<unknown>;
37
+ name: z.ZodString;
38
+ tokenPrefix: z.ZodString;
39
+ expiresAt: z.ZodType<Date | null, unknown, z.core.$ZodTypeInternals<Date | null, unknown>>;
40
+ lastUsedAt: z.ZodType<Date | null, unknown, z.core.$ZodTypeInternals<Date | null, unknown>>;
41
+ revokedAt: z.ZodType<Date | null, unknown, z.core.$ZodTypeInternals<Date | null, unknown>>;
42
+ owner: z.ZodType<{
43
+ id: string;
44
+ createdAt: Date;
45
+ updatedAt: Date;
46
+ firstName: string;
47
+ lastName: string;
48
+ language: string | null;
49
+ timezone: number;
50
+ locale: string | null;
51
+ gender: string | null;
52
+ country: string | null;
53
+ foreignId: string | null;
54
+ assignedAt: Date | null;
55
+ lastvisit: Date | null;
56
+ retainedFrom: Date | null;
57
+ channel: {
58
+ name: string | null;
59
+ data?: Record<string, any> | null | undefined;
60
+ };
61
+ username: string;
62
+ email: string;
63
+ sendEmail: boolean;
64
+ state: boolean;
65
+ resetCount: number;
66
+ resetToken: string | null;
67
+ labels: string[];
68
+ assignedTo: string | null;
69
+ roles: string[];
70
+ avatar: string | null;
71
+ provider?: {
72
+ strategy: "local";
73
+ sub?: string | undefined;
74
+ } | undefined;
75
+ } | null, unknown, z.core.$ZodTypeInternals<{
76
+ id: string;
77
+ createdAt: Date;
78
+ updatedAt: Date;
79
+ firstName: string;
80
+ lastName: string;
81
+ language: string | null;
82
+ timezone: number;
83
+ locale: string | null;
84
+ gender: string | null;
85
+ country: string | null;
86
+ foreignId: string | null;
87
+ assignedAt: Date | null;
88
+ lastvisit: Date | null;
89
+ retainedFrom: Date | null;
90
+ channel: {
91
+ name: string | null;
92
+ data?: Record<string, any> | null | undefined;
93
+ };
94
+ username: string;
95
+ email: string;
96
+ sendEmail: boolean;
97
+ state: boolean;
98
+ resetCount: number;
99
+ resetToken: string | null;
100
+ labels: string[];
101
+ assignedTo: string | null;
102
+ roles: string[];
103
+ avatar: string | null;
104
+ provider?: {
105
+ strategy: "local";
106
+ sub?: string | undefined;
107
+ } | undefined;
108
+ } | null, unknown>>;
109
+ }, z.core.$strip>;
110
+ export type McpTokenStub = z.infer<typeof mcpTokenStubSchema>;
111
+ export type McpToken = z.infer<typeof mcpTokenSchema>;
112
+ export type McpTokenFull = z.infer<typeof mcpTokenFullSchema>;
113
+ //# sourceMappingURL=mcp-token.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-token.d.ts","sourceRoot":"","sources":["../../../src/user/mcp-token.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAuBxB,eAAO,MAAM,kBAAkB;;;;;;;;;iBAA2B,CAAC;AAE3D,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;YAQ1B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAK7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
@@ -5,4 +5,5 @@ export { resolveRunDurationMs, workflowRunFullSchema, workflowRunSchema, workflo
5
5
  export { memoryDefinitionFullSchema, memoryDefinitionSchema, memoryDefinitionStubSchema, type MemoryDefinition, type MemoryDefinitionFull, type MemoryDefinitionStub, } from "./memory-definition";
6
6
  export { memoryRecordFullSchema, memoryRecordSchema, memoryRecordStubSchema, type MemoryRecord, type MemoryRecordFull, type MemoryRecordStub, } from "./memory-record";
7
7
  export { mcpServerFullSchema, mcpServerSchema, mcpServerStubSchema, type McpServer, type McpServerFull, type McpServerStub, } from "./mcp-server";
8
+ export { WORKFLOW_EXPORT_BUNDLE_KIND, WORKFLOW_TRANSFER_RESOURCE_KIND_PATTERN, workflowExportBundleContentTypeSchema, workflowExportBundleCredentialSchema, workflowExportBundleLabelGroupSchema, workflowExportBundleLabelSchema, workflowExportBundleMcpServerSchema, workflowExportBundleMemoryDefinitionSchema, workflowExportBundleSchema, workflowExportBundleV1Schema, workflowExportBundleWorkflowDependencySchema, workflowImportResourceActionSchema, workflowImportResourceResultSchema, workflowImportResultSchema, workflowTransferResourceKindSchema, type WorkflowExportBundle, type WorkflowExportBundleContentType, type WorkflowExportBundleCredential, type WorkflowExportBundleLabel, type WorkflowExportBundleLabelGroup, type WorkflowExportBundleMcpServer, type WorkflowExportBundleMemoryDefinition, type WorkflowExportBundleV1, type WorkflowExportBundleWorkflowDependency, type WorkflowImportResourceAction, type WorkflowImportResourceResult, type WorkflowImportResult, } from "./workflow-transfer";
8
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/workflow/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,YAAY,EACZ,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,KAAK,QAAQ,EACb,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EACjB,KAAK,YAAY,GAClB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,yBAAyB,EACzB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,eAAe,GACrB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,EACtB,0BAA0B,EAC1B,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,GAC1B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,sBAAsB,EACtB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,GACtB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,aAAa,GACnB,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/workflow/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,YAAY,EACZ,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,KAAK,QAAQ,EACb,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EACjB,KAAK,YAAY,GAClB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,yBAAyB,EACzB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,eAAe,GACrB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,EACtB,0BAA0B,EAC1B,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,GAC1B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,sBAAsB,EACtB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,GACtB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,aAAa,GACnB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,2BAA2B,EAC3B,uCAAuC,EACvC,qCAAqC,EACrC,oCAAoC,EACpC,oCAAoC,EACpC,+BAA+B,EAC/B,mCAAmC,EACnC,0CAA0C,EAC1C,0BAA0B,EAC1B,4BAA4B,EAC5B,4CAA4C,EAC5C,kCAAkC,EAClC,kCAAkC,EAClC,0BAA0B,EAC1B,kCAAkC,EAClC,KAAK,oBAAoB,EACzB,KAAK,+BAA+B,EACpC,KAAK,8BAA8B,EACnC,KAAK,yBAAyB,EAC9B,KAAK,8BAA8B,EACnC,KAAK,6BAA6B,EAClC,KAAK,oCAAoC,EACzC,KAAK,sBAAsB,EAC3B,KAAK,sCAAsC,EAC3C,KAAK,4BAA4B,EACjC,KAAK,4BAA4B,EACjC,KAAK,oBAAoB,GAC1B,MAAM,qBAAqB,CAAC"}
@@ -226,6 +226,7 @@ export declare const memoryRecordFullSchema: z.ZodObject<{
226
226
  workflow: string;
227
227
  workflowVersion: string | null;
228
228
  triggeredBy: string | null;
229
+ parentRun: string | null;
229
230
  }, unknown, z.core.$ZodTypeInternals<{
230
231
  id: string;
231
232
  createdAt: Date;
@@ -253,6 +254,7 @@ export declare const memoryRecordFullSchema: z.ZodObject<{
253
254
  workflow: string;
254
255
  workflowVersion: string | null;
255
256
  triggeredBy: string | null;
257
+ parentRun: string | null;
256
258
  }, unknown>>>>;
257
259
  thread: z.ZodOptional<z.ZodNullable<z.ZodType<{
258
260
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"memory-record.d.ts","sourceRoot":"","sources":["../../../src/workflow/memory-record.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAwBxB,eAAO,MAAM,sBAAsB;;;;;;;iBAA+B,CAAC;AAEnE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;YAwB9B,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
1
+ {"version":3,"file":"memory-record.d.ts","sourceRoot":"","sources":["../../../src/workflow/memory-record.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAwBxB,eAAO,MAAM,sBAAsB;;;;;;;iBAA+B,CAAC;AAEnE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;YAwB9B,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}