@loopstack/contracts 0.14.0

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 (159) hide show
  1. package/LICENSE +43 -0
  2. package/README.md +7 -0
  3. package/dist/enums/index.d.ts +3 -0
  4. package/dist/enums/index.d.ts.map +1 -0
  5. package/dist/enums/index.js +19 -0
  6. package/dist/enums/pipeline-state.d.ts +8 -0
  7. package/dist/enums/pipeline-state.d.ts.map +1 -0
  8. package/dist/enums/pipeline-state.js +12 -0
  9. package/dist/enums/user-type.enum.d.ts +4 -0
  10. package/dist/enums/user-type.enum.d.ts.map +1 -0
  11. package/dist/enums/user-type.enum.js +8 -0
  12. package/dist/enums/workflow-state.enum.d.ts +8 -0
  13. package/dist/enums/workflow-state.enum.d.ts.map +1 -0
  14. package/dist/enums/workflow-state.enum.js +12 -0
  15. package/dist/index.d.ts +4 -0
  16. package/dist/index.d.ts.map +1 -0
  17. package/dist/index.js +19 -0
  18. package/dist/schemas/assignment.schema.d.ts +3 -0
  19. package/dist/schemas/assignment.schema.d.ts.map +1 -0
  20. package/dist/schemas/assignment.schema.js +20 -0
  21. package/dist/schemas/block.schema.d.ts +2 -0
  22. package/dist/schemas/block.schema.d.ts.map +1 -0
  23. package/dist/schemas/block.schema.js +5 -0
  24. package/dist/schemas/document.schema.d.ts +826 -0
  25. package/dist/schemas/document.schema.d.ts.map +1 -0
  26. package/dist/schemas/document.schema.js +91 -0
  27. package/dist/schemas/index.d.ts +16 -0
  28. package/dist/schemas/index.d.ts.map +1 -0
  29. package/dist/schemas/index.js +32 -0
  30. package/dist/schemas/json-schema.schema.d.ts +2 -0
  31. package/dist/schemas/json-schema.schema.d.ts.map +1 -0
  32. package/dist/schemas/json-schema.schema.js +58 -0
  33. package/dist/schemas/main.schema.d.ts +1126 -0
  34. package/dist/schemas/main.schema.d.ts.map +1 -0
  35. package/dist/schemas/main.schema.js +17 -0
  36. package/dist/schemas/pipeline.schema.d.ts +932 -0
  37. package/dist/schemas/pipeline.schema.d.ts.map +1 -0
  38. package/dist/schemas/pipeline.schema.js +57 -0
  39. package/dist/schemas/startup.schema.d.ts +637 -0
  40. package/dist/schemas/startup.schema.d.ts.map +1 -0
  41. package/dist/schemas/startup.schema.js +78 -0
  42. package/dist/schemas/template-expression.schema.d.ts +2 -0
  43. package/dist/schemas/template-expression.schema.d.ts.map +1 -0
  44. package/dist/schemas/template-expression.schema.js +5 -0
  45. package/dist/schemas/tool-call.schema.d.ts +17 -0
  46. package/dist/schemas/tool-call.schema.d.ts.map +1 -0
  47. package/dist/schemas/tool-call.schema.js +11 -0
  48. package/dist/schemas/tool-config.schema.d.ts +178 -0
  49. package/dist/schemas/tool-config.schema.d.ts.map +1 -0
  50. package/dist/schemas/tool-config.schema.js +11 -0
  51. package/dist/schemas/transition-payload.schema.d.ts +17 -0
  52. package/dist/schemas/transition-payload.schema.d.ts.map +1 -0
  53. package/dist/schemas/transition-payload.schema.js +10 -0
  54. package/dist/schemas/ui-form-element.schema.d.ts +89 -0
  55. package/dist/schemas/ui-form-element.schema.d.ts.map +1 -0
  56. package/dist/schemas/ui-form-element.schema.js +38 -0
  57. package/dist/schemas/ui-form.schema.d.ts +300 -0
  58. package/dist/schemas/ui-form.schema.d.ts.map +1 -0
  59. package/dist/schemas/ui-form.schema.js +39 -0
  60. package/dist/schemas/ui-properties-schema.d.ts +2 -0
  61. package/dist/schemas/ui-properties-schema.d.ts.map +1 -0
  62. package/dist/schemas/ui-properties-schema.js +9 -0
  63. package/dist/schemas/workflow-transition.schema.d.ts +48 -0
  64. package/dist/schemas/workflow-transition.schema.d.ts.map +1 -0
  65. package/dist/schemas/workflow-transition.schema.js +17 -0
  66. package/dist/schemas/workflow.schema.d.ts +439 -0
  67. package/dist/schemas/workflow.schema.d.ts.map +1 -0
  68. package/dist/schemas/workflow.schema.js +19 -0
  69. package/dist/schemas/workspace.schema.d.ts +14 -0
  70. package/dist/schemas/workspace.schema.d.ts.map +1 -0
  71. package/dist/schemas/workspace.schema.js +10 -0
  72. package/dist/types/index.d.ts +2 -0
  73. package/dist/types/index.d.ts.map +1 -0
  74. package/dist/types/index.js +18 -0
  75. package/dist/types/interfaces/client-message.interface.d.ts +10 -0
  76. package/dist/types/interfaces/client-message.interface.d.ts.map +1 -0
  77. package/dist/types/interfaces/client-message.interface.js +2 -0
  78. package/dist/types/interfaces/document-item.interface.d.ts +25 -0
  79. package/dist/types/interfaces/document-item.interface.d.ts.map +1 -0
  80. package/dist/types/interfaces/document-item.interface.js +2 -0
  81. package/dist/types/interfaces/history-transition.interface.d.ts +5 -0
  82. package/dist/types/interfaces/history-transition.interface.d.ts.map +1 -0
  83. package/dist/types/interfaces/history-transition.interface.js +2 -0
  84. package/dist/types/interfaces/index.d.ts +9 -0
  85. package/dist/types/interfaces/index.d.ts.map +1 -0
  86. package/dist/types/interfaces/index.js +25 -0
  87. package/dist/types/interfaces/namespace-create.interface.d.ts +8 -0
  88. package/dist/types/interfaces/namespace-create.interface.d.ts.map +1 -0
  89. package/dist/types/interfaces/namespace-create.interface.js +2 -0
  90. package/dist/types/interfaces/pipeline-config.interface.d.ts +8 -0
  91. package/dist/types/interfaces/pipeline-config.interface.d.ts.map +1 -0
  92. package/dist/types/interfaces/pipeline-config.interface.js +2 -0
  93. package/dist/types/interfaces/transition-info.interface.d.ts +6 -0
  94. package/dist/types/interfaces/transition-info.interface.d.ts.map +1 -0
  95. package/dist/types/interfaces/transition-info.interface.js +2 -0
  96. package/dist/types/interfaces/transition-metadata.interface.d.ts +4 -0
  97. package/dist/types/interfaces/transition-metadata.interface.d.ts.map +1 -0
  98. package/dist/types/interfaces/transition-metadata.interface.js +2 -0
  99. package/dist/types/interfaces/transition-payload.interface.d.ts +2 -0
  100. package/dist/types/interfaces/transition-payload.interface.d.ts.map +1 -0
  101. package/dist/types/interfaces/transition-payload.interface.js +2 -0
  102. package/dist/types/interfaces/workflow.interface.d.ts +26 -0
  103. package/dist/types/interfaces/workflow.interface.d.ts.map +1 -0
  104. package/dist/types/interfaces/workflow.interface.js +2 -0
  105. package/dist/types/types/assignment.type.d.ts +4 -0
  106. package/dist/types/types/assignment.type.d.ts.map +1 -0
  107. package/dist/types/types/assignment.type.js +2 -0
  108. package/dist/types/types/document.type.d.ts +6 -0
  109. package/dist/types/types/document.type.d.ts.map +1 -0
  110. package/dist/types/types/document.type.js +2 -0
  111. package/dist/types/types/index.d.ts +17 -0
  112. package/dist/types/types/index.d.ts.map +1 -0
  113. package/dist/types/types/index.js +33 -0
  114. package/dist/types/types/json-schema-config.type.d.ts +4 -0
  115. package/dist/types/types/json-schema-config.type.d.ts.map +1 -0
  116. package/dist/types/types/json-schema-config.type.js +2 -0
  117. package/dist/types/types/main.type.d.ts +9 -0
  118. package/dist/types/types/main.type.d.ts.map +1 -0
  119. package/dist/types/types/main.type.js +2 -0
  120. package/dist/types/types/pipeline-state.type.d.ts +1 -0
  121. package/dist/types/types/pipeline-state.type.d.ts.map +1 -0
  122. package/dist/types/types/pipeline-state.type.js +2 -0
  123. package/dist/types/types/pipeline.type.d.ts +9 -0
  124. package/dist/types/types/pipeline.type.d.ts.map +1 -0
  125. package/dist/types/types/pipeline.type.js +2 -0
  126. package/dist/types/types/startup.type.d.ts +4 -0
  127. package/dist/types/types/startup.type.d.ts.map +1 -0
  128. package/dist/types/types/startup.type.js +2 -0
  129. package/dist/types/types/tool-call.type.d.ts +3 -0
  130. package/dist/types/types/tool-call.type.d.ts.map +1 -0
  131. package/dist/types/types/tool-call.type.js +2 -0
  132. package/dist/types/types/tool-config.type.d.ts +3 -0
  133. package/dist/types/types/tool-config.type.d.ts.map +1 -0
  134. package/dist/types/types/tool-config.type.js +2 -0
  135. package/dist/types/types/transition-payload.type.d.ts +3 -0
  136. package/dist/types/types/transition-payload.type.d.ts.map +1 -0
  137. package/dist/types/types/transition-payload.type.js +2 -0
  138. package/dist/types/types/ui-element.type.d.ts +3 -0
  139. package/dist/types/types/ui-element.type.d.ts.map +1 -0
  140. package/dist/types/types/ui-element.type.js +2 -0
  141. package/dist/types/types/ui-form.type.d.ts +6 -0
  142. package/dist/types/types/ui-form.type.d.ts.map +1 -0
  143. package/dist/types/types/ui-form.type.js +2 -0
  144. package/dist/types/types/ui-properties.type.d.ts +4 -0
  145. package/dist/types/types/ui-properties.type.d.ts.map +1 -0
  146. package/dist/types/types/ui-properties.type.js +2 -0
  147. package/dist/types/types/workflow-state.type.d.ts +1 -0
  148. package/dist/types/types/workflow-state.type.d.ts.map +1 -0
  149. package/dist/types/types/workflow-state.type.js +2 -0
  150. package/dist/types/types/workflow-transition.type.d.ts +3 -0
  151. package/dist/types/types/workflow-transition.type.d.ts.map +1 -0
  152. package/dist/types/types/workflow-transition.type.js +2 -0
  153. package/dist/types/types/workflow.type.d.ts +4 -0
  154. package/dist/types/types/workflow.type.d.ts.map +1 -0
  155. package/dist/types/types/workflow.type.js +2 -0
  156. package/dist/types/types/workspace.type.d.ts +3 -0
  157. package/dist/types/types/workspace.type.d.ts.map +1 -0
  158. package/dist/types/types/workspace.type.js +2 -0
  159. package/package.json +48 -0
package/LICENSE ADDED
@@ -0,0 +1,43 @@
1
+ Business Source License 1.1
2
+
3
+ Parameters
4
+ ----------
5
+ Licensor: Loopstack GmbH
6
+ Licensed Work: Loopstack Shared Module (the "Licensed Work")
7
+ Additional Use Grant: You may freely use, copy, modify, and distribute the Licensed Work
8
+ for both personal and commercial purposes, subject to the conditions below.
9
+ Change Date: Four years after the release date of each version.
10
+ Change License: Apache License, Version 2.0
11
+
12
+ Terms
13
+ -----
14
+ 1. License Grant
15
+ The Licensed Work is made available under the terms of this Business Source License (the "License").
16
+ You are granted the right to use, copy, modify, and distribute the Licensed Work for any
17
+ personal or commercial purpose, provided that:
18
+
19
+ - You do not provide the Licensed Work to third parties as a managed or hosted service
20
+ where the primary value of the service is the Licensed Work itself, or a substantial
21
+ substitute for it.
22
+ - You comply with attribution requirements by including this License file with any distribution.
23
+
24
+ 2. Change License
25
+ On the Change Date, each version of the Licensed Work will automatically be
26
+ made available under the Change License (Apache License 2.0).
27
+
28
+ 3. Contributions
29
+ Any contributions to the Licensed Work will be licensed under the terms of this License
30
+ until the Change Date, and under the Change License thereafter.
31
+
32
+ 4. Disclaimer
33
+ The Licensed Work is provided "as is," without warranty of any kind, express or implied.
34
+
35
+ Additional Terms
36
+ ----------------
37
+ - This License does not grant you any rights to use the Licensor's trademarks or brand.
38
+ - This License explicitly permits both personal and commercial use of the Licensed Work,
39
+ including incorporation into commercial products and services, subject to the restrictions
40
+ outlined in Section 1.
41
+
42
+ For details on the Apache License 2.0 (effective after the Change Date), see:
43
+ https://www.apache.org/licenses/LICENSE-2.0
package/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # Loopstack Contracts: Types and Schemas
2
+
3
+ This is a submodule of the **Loopstack** framework.
4
+
5
+ For full documentation, contribution guidelines, and to get started with Loopstack, please visit the main repository:
6
+
7
+ 👉 [github.com/loopstack-ai/loopstack](https://github.com/loopstack-ai/loopstack)
@@ -0,0 +1,3 @@
1
+ export * from './pipeline-state.js';
2
+ export * from './workflow-state.enum.js';
3
+ export * from './user-type.enum.js';
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/enums/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,0BAA0B,CAAA;AACxC,cAAc,qBAAqB,CAAA"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./pipeline-state.js"), exports);
18
+ __exportStar(require("./workflow-state.enum.js"), exports);
19
+ __exportStar(require("./user-type.enum.js"), exports);
@@ -0,0 +1,8 @@
1
+ export declare enum PipelineState {
2
+ Pending = "pending",
3
+ Running = "running",
4
+ Paused = "paused",
5
+ Completed = "completed",
6
+ Failed = "failed",
7
+ Canceled = "canceled"
8
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline-state.d.ts","sourceRoot":"","sources":["../../src/enums/pipeline-state.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa;IACvB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,QAAQ,aAAa;CACtB"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PipelineState = void 0;
4
+ var PipelineState;
5
+ (function (PipelineState) {
6
+ PipelineState["Pending"] = "pending";
7
+ PipelineState["Running"] = "running";
8
+ PipelineState["Paused"] = "paused";
9
+ PipelineState["Completed"] = "completed";
10
+ PipelineState["Failed"] = "failed";
11
+ PipelineState["Canceled"] = "canceled";
12
+ })(PipelineState || (exports.PipelineState = PipelineState = {}));
@@ -0,0 +1,4 @@
1
+ export declare enum UserTypeEnum {
2
+ Local = "local",
3
+ Cloud = "cloud"
4
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-type.enum.d.ts","sourceRoot":"","sources":["../../src/enums/user-type.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACtB,KAAK,UAAU;IACf,KAAK,UAAU;CAChB"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserTypeEnum = void 0;
4
+ var UserTypeEnum;
5
+ (function (UserTypeEnum) {
6
+ UserTypeEnum["Local"] = "local";
7
+ UserTypeEnum["Cloud"] = "cloud";
8
+ })(UserTypeEnum || (exports.UserTypeEnum = UserTypeEnum = {}));
@@ -0,0 +1,8 @@
1
+ export declare enum WorkflowState {
2
+ Pending = "pending",
3
+ Running = "running",
4
+ Waiting = "waiting",
5
+ Completed = "completed",
6
+ Failed = "failed",
7
+ Canceled = "canceled"
8
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-state.enum.d.ts","sourceRoot":"","sources":["../../src/enums/workflow-state.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa;IACvB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,QAAQ,aAAa;CACtB"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WorkflowState = void 0;
4
+ var WorkflowState;
5
+ (function (WorkflowState) {
6
+ WorkflowState["Pending"] = "pending";
7
+ WorkflowState["Running"] = "running";
8
+ WorkflowState["Waiting"] = "waiting";
9
+ WorkflowState["Completed"] = "completed";
10
+ WorkflowState["Failed"] = "failed";
11
+ WorkflowState["Canceled"] = "canceled";
12
+ })(WorkflowState || (exports.WorkflowState = WorkflowState = {}));
@@ -0,0 +1,4 @@
1
+ export * from './types';
2
+ export * from './enums';
3
+ export * from './schemas';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./types"), exports);
18
+ __exportStar(require("./enums"), exports);
19
+ __exportStar(require("./schemas"), exports);
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ export declare const AssignmentSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodNull, z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
3
+ export declare const AssignmentConfigSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodNull, z.ZodString, z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assignment.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/assignment.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,gBAAgB,+HAS5B,CAAC;AAEF,eAAO,MAAM,sBAAsB,4IAUlC,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AssignmentConfigSchema = exports.AssignmentSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const template_expression_schema_1 = require("./template-expression.schema");
6
+ exports.AssignmentSchema = zod_1.z.record(zod_1.z.string(), zod_1.z.union([
7
+ zod_1.z.null(), // ~ in YAML becomes null
8
+ zod_1.z.string(),
9
+ zod_1.z.number(),
10
+ zod_1.z.boolean(),
11
+ zod_1.z.record(zod_1.z.any()),
12
+ ]));
13
+ exports.AssignmentConfigSchema = zod_1.z.record(zod_1.z.string(), zod_1.z.union([
14
+ zod_1.z.null(), // ~ in YAML becomes null
15
+ template_expression_schema_1.TemplateExpression,
16
+ zod_1.z.string(),
17
+ zod_1.z.number(),
18
+ zod_1.z.boolean(),
19
+ zod_1.z.record(zod_1.z.any()),
20
+ ]));
@@ -0,0 +1,2 @@
1
+ import { z } from 'zod';
2
+ export declare const BlockSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"block.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/block.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,WAAW,gDAAe,CAAA"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BlockSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.BlockSchema = zod_1.z.object({});