@oomol-lab/open-flow 0.1.0-beta.68 → 0.1.0-beta.69

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 (67) hide show
  1. package/dist/browser/{ContentIcon-Sx9bywU-.js → ContentIcon-CsECY5id.js} +14 -7
  2. package/dist/browser/{FlowCanvas-CXpaeurx.js → FlowCanvas-C5X22xQ7.js} +18 -18
  3. package/dist/browser/{createResourceDialog-BKmimKA_.js → createResourceDialog-Di5BBrQv.js} +2 -2
  4. package/dist/browser/{dialog-ZmfcwuMS.js → dialog-Bjo-r9B0.js} +85 -8
  5. package/dist/browser/event-sources.d.ts +4 -2
  6. package/dist/browser/{exportSvg-D4CqCcx2.js → exportSvg-Cj6Spxx-.js} +2 -2
  7. package/dist/browser/flow-authoring-node.d.ts +3 -1
  8. package/dist/browser/flow-authoring.js +68 -7
  9. package/dist/browser/flow-change-schema.d.ts +3 -1
  10. package/dist/browser/flow-change.d.ts +17 -2
  11. package/dist/browser/flow-change.js +82 -9
  12. package/dist/browser/{flowChanges-B5tZMcGr.js → flowChanges-Dp-rcEJ6.js} +737 -1180
  13. package/dist/browser/{flowWorkspace-zFBFtZPo.js → flowWorkspace-CB1QACku.js} +440 -70
  14. package/dist/browser/preview.css +49 -41
  15. package/dist/browser/preview.js +2229 -2359
  16. package/dist/browser/{typeScriptSession-D0bjYDeg.js → typeScriptSession-B0hC-C8y.js} +1 -1
  17. package/dist/browser/ui.css +8 -0
  18. package/dist/browser/workbench.css +53 -41
  19. package/dist/browser/workbench.js +74 -32
  20. package/dist/browser/{workbenchSelect-CChdgugI.js → workbenchSelect-C3hxUcYm.js} +1 -1
  21. package/dist/command/index.js +55 -51
  22. package/dist/common/authoring.d.ts +20 -0
  23. package/dist/common/authoringSchema.d.ts +243 -0
  24. package/dist/common/connector-proxy.d.ts +4 -0
  25. package/dist/common/control-api-conformance.js +147 -33
  26. package/dist/common/control-api.d.ts +14 -7
  27. package/dist/common/control-api.js +130 -15
  28. package/dist/common/control-requests.d.ts +32 -19
  29. package/dist/common/control-requests.js +2854 -152
  30. package/dist/common/decision.js +27 -3
  31. package/dist/common/engine-contract.d.ts +2 -2
  32. package/dist/common/event-source-definition.d.ts +34 -16
  33. package/dist/common/event-source.d.ts +63 -5
  34. package/dist/common/event-source.js +5744 -261
  35. package/dist/common/event-sources.d.ts +99 -6
  36. package/dist/common/flow-encoding.js +49 -10
  37. package/dist/common/flow-errorHandling.d.ts +36 -0
  38. package/dist/common/flow-graph.d.ts +4 -2
  39. package/dist/common/flow-retry.d.ts +19 -0
  40. package/dist/common/flow-semantics.js +94 -10
  41. package/dist/common/{fr-Du5gv3kM.js → fr-CNTSedYU.js} +259 -18
  42. package/dist/common/integration-trigger.d.ts +1 -1
  43. package/dist/common/integration-trigger.js +27 -3
  44. package/dist/common/{ja-D2wyPdTF.js → ja-CxQBHr2J.js} +259 -18
  45. package/dist/common/{ko-Cuu2AOaC.js → ko-D1Exiv1h.js} +259 -18
  46. package/dist/common/mcp.d.ts +30 -0
  47. package/dist/common/mcp.js +132 -17
  48. package/dist/common/openapi.js +27 -3
  49. package/dist/common/poll-trigger.js +27 -3
  50. package/dist/common/provider-triggers.d.ts +0 -2
  51. package/dist/common/provider-triggers.js +358 -155
  52. package/dist/common/{ru-BjI_JSsx.js → ru-BzLZv0B7.js} +259 -18
  53. package/dist/common/run-events.d.ts +2 -0
  54. package/dist/common/run-events.js +4 -2
  55. package/dist/common/runtime-contract.d.ts +1 -0
  56. package/dist/common/runtime-contract.js +4 -4
  57. package/dist/common/scheduler.d.ts +13 -2
  58. package/dist/common/scheduler.js +288 -98
  59. package/dist/common/webhook-trigger.js +27 -3
  60. package/dist/common/workflow.js +27 -3
  61. package/dist/common/{zh-CN-CnnXkzLh.js → zh-CN-Dg_xSGde.js} +259 -18
  62. package/dist/common/{zh-TW-CJnR2dgF.js → zh-TW-oxuLwsV0.js} +259 -18
  63. package/dist/index.d.ts +1 -0
  64. package/package.json +1 -1
  65. package/dist/common/event-source-feishu.d.ts +0 -3
  66. package/dist/common/feishu-events.d.ts +0 -19
  67. package/dist/common/feishu-subscriptions.d.ts +0 -6
@@ -6571,6 +6571,18 @@ function preprocess(fn, schema) {
6571
6571
  });
6572
6572
  }
6573
6573
  //#endregion
6574
+ //#region src/flow/common/retry.ts
6575
+ var nodeRetryLimits = {
6576
+ maxRetries: 5,
6577
+ minIntervalMs: 1e3,
6578
+ maxIntervalMs: 6e4,
6579
+ intervalStepMs: 1e3
6580
+ };
6581
+ var retryConfigurationSchema = strictObject({
6582
+ maxRetries: number().int().min(0).max(nodeRetryLimits.maxRetries),
6583
+ intervalMs: number().int().min(nodeRetryLimits.minIntervalMs).max(nodeRetryLimits.maxIntervalMs).multipleOf(nodeRetryLimits.intervalStepMs)
6584
+ });
6585
+ //#endregion
6574
6586
  //#region src/flow/common/triggerScheduleSchema.ts
6575
6587
  var triggerScheduleSchema = array(union([object({
6576
6588
  type: literal("cron"),
@@ -6616,6 +6628,7 @@ var source = union([object({
6616
6628
  kind: literal("node"),
6617
6629
  nodeId: text,
6618
6630
  output: text,
6631
+ system: literal(true).optional(),
6619
6632
  field: text.optional()
6620
6633
  }), object({
6621
6634
  kind: literal("binding"),
@@ -6874,7 +6887,9 @@ var base = {
6874
6887
  name: text.optional(),
6875
6888
  description: text.optional(),
6876
6889
  icon: text.optional(),
6877
- timeoutMs: number().optional()
6890
+ timeoutMs: number().optional(),
6891
+ retry: retryConfigurationSchema.optional(),
6892
+ onError: _enum(["stop", "error"]).optional()
6878
6893
  };
6879
6894
  var node = union([
6880
6895
  strictObject({
@@ -6995,7 +7010,8 @@ object({
6995
7010
  literal(5),
6996
7011
  literal(6),
6997
7012
  literal(7),
6998
- literal(8)
7013
+ literal(8),
7014
+ literal(9)
6999
7015
  ]),
7000
7016
  document,
7001
7017
  modules: record$1(text, module)
@@ -7056,6 +7072,13 @@ var shapes = {
7056
7072
  },
7057
7073
  "graph.node.delete": at,
7058
7074
  "graph.node.field.set": union([
7075
+ object({
7076
+ ...at,
7077
+ kind: literal("graph.node.field.set"),
7078
+ field: literal("retry"),
7079
+ before: retryConfigurationSchema.optional(),
7080
+ value: retryConfigurationSchema.optional()
7081
+ }),
7059
7082
  object({
7060
7083
  ...at,
7061
7084
  kind: literal("graph.node.field.set"),
@@ -7069,7 +7092,8 @@ var shapes = {
7069
7092
  field: _enum([
7070
7093
  "description",
7071
7094
  "icon",
7072
- "name"
7095
+ "name",
7096
+ "onError"
7073
7097
  ]),
7074
7098
  before: text.optional(),
7075
7099
  value: text.optional()
@@ -4,6 +4,6 @@ export interface EngineContract {
4
4
  readonly platformModule: string;
5
5
  readonly platformSource: string;
6
6
  }
7
- export declare const currentEngineContract = "open-flow-engine/v5";
8
- export declare const nodejsEngineContract = "open-flow-engine/v5/nodejs-compat-v1";
7
+ export declare const currentEngineContract = "open-flow-engine/v6";
8
+ export declare const nodejsEngineContract = "open-flow-engine/v6/nodejs-compat-v1";
9
9
  export declare function findEngineContract(contract: string): EngineContract | undefined;
@@ -7,33 +7,51 @@ export interface SourceConfiguration {
7
7
  readonly state: Readonly<Record<string, JsonValue>>;
8
8
  }
9
9
  export interface SourceEvent {
10
+ readonly ordering?: {
11
+ readonly key: string;
12
+ readonly version: number;
13
+ };
10
14
  readonly id: string;
11
15
  readonly type: string;
12
16
  readonly payload: Readonly<Record<string, JsonValue>>;
17
+ readonly matches: readonly string[];
13
18
  }
14
19
  export interface SourceSubscription {
15
20
  readonly key: string;
16
21
  readonly config: Readonly<Record<string, JsonValue>>;
17
22
  }
18
- export interface EventSourceDefinition<Create, Update, View> {
23
+ export interface EventSourceDefinition {
19
24
  readonly kind: string;
20
25
  readonly provider: string;
26
+ readonly triggerId: string;
21
27
  readonly maximumBodyBytes: number;
22
- readonly initialize: (input: Create, accountId: string | undefined) => SourceConfiguration;
23
- readonly update: (source: SourceConfiguration, input: Update) => SourceConfiguration;
24
- readonly view: (source: SourceConfiguration) => View;
25
- readonly ready: (source: SourceConfiguration) => boolean;
26
- readonly receive: (source: SourceConfiguration, bytes: Uint8Array, headers: Headers, now: number) => Promise<{
27
- readonly response: Response;
28
- readonly state: SourceConfiguration['state'];
29
- } | {
30
- readonly event: SourceEvent;
31
- }>;
32
- readonly matches: (config: Readonly<Record<string, JsonValue>>, event: SourceEvent) => boolean;
33
- readonly resources: {
34
- readonly triggerId: string;
35
- readonly requests: (source: SourceConfiguration, provider: string, config: Readonly<Record<string, JsonValue>>) => readonly SourceSubscription[];
36
- };
28
+ readonly applicationIngress: boolean;
29
+ readonly managed: boolean;
37
30
  }
31
+ export type SourceOperation = {
32
+ readonly action: 'initialize';
33
+ readonly input: Readonly<Record<string, JsonValue>>;
34
+ } | {
35
+ readonly action: 'update';
36
+ readonly source: SourceConfiguration;
37
+ readonly input: Readonly<Record<string, JsonValue>>;
38
+ } | {
39
+ readonly action: 'inspect';
40
+ readonly source: SourceConfiguration;
41
+ } | {
42
+ readonly action: 'prepare';
43
+ readonly source: SourceConfiguration;
44
+ readonly config: Readonly<Record<string, JsonValue>>;
45
+ readonly endpointUrl?: string;
46
+ } | {
47
+ readonly action: 'receive';
48
+ readonly source: SourceConfiguration;
49
+ readonly headers: Readonly<Record<string, string>>;
50
+ readonly rawBody: string;
51
+ readonly consumers: readonly {
52
+ readonly id: string;
53
+ readonly config: Readonly<Record<string, JsonValue>>;
54
+ }[];
55
+ };
38
56
  export declare class SourceIdentityError extends Error {
39
57
  }
@@ -1,6 +1,64 @@
1
- import { feishuApplication } from './event-source-feishu.js';
2
- export type { EventSourceDefinition, SourceConfiguration, SourceEvent, SourceSubscription } from './event-source-definition.js';
1
+ import type { EventSourceDefinition, SourceConfiguration } from './event-source-definition.js';
2
+ import { z } from 'zod';
3
+ import { eventSourceViewSchema } from './event-sources.js';
4
+ export type { EventSourceDefinition, SourceConfiguration, SourceEvent, SourceSubscription, SourceOperation } from './event-source-definition.js';
3
5
  export { SourceIdentityError } from './event-source-definition.js';
4
- export { feishuApplication } from './event-source-feishu.js';
5
- declare const definitions: readonly (typeof feishuApplication)[];
6
- export declare function eventSourceDefinition(kind: string): (typeof definitions)[number];
6
+ export declare function eventSourceDefinition(kind: string): EventSourceDefinition;
7
+ export declare const sourceConfigurationSchema: z.ZodObject<{
8
+ identity: z.ZodString;
9
+ eventTypes: z.ZodArray<z.ZodString>;
10
+ config: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
11
+ secrets: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
12
+ state: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
13
+ }, z.core.$strip>;
14
+ export declare function sourceReady(source: SourceConfiguration, now?: number): boolean;
15
+ export declare function sourceView(source: SourceConfiguration, now?: number): z.infer<typeof eventSourceViewSchema>;
16
+ export declare const sourceResultSchema: z.ZodObject<{
17
+ source: z.ZodObject<{
18
+ identity: z.ZodString;
19
+ eventTypes: z.ZodArray<z.ZodString>;
20
+ config: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
21
+ secrets: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
22
+ state: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
23
+ }, z.core.$strip>;
24
+ }, z.core.$strip>;
25
+ export declare const preparedSourceSchema: z.ZodObject<{
26
+ source: z.ZodObject<{
27
+ identity: z.ZodString;
28
+ eventTypes: z.ZodArray<z.ZodString>;
29
+ config: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
30
+ secrets: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
31
+ state: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
32
+ }, z.core.$strip>;
33
+ subscriptions: z.ZodArray<z.ZodObject<{
34
+ key: z.ZodString;
35
+ config: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
36
+ }, z.core.$strip>>;
37
+ }, z.core.$strip>;
38
+ export declare const sourceReceiptSchema: z.ZodObject<{
39
+ source: z.ZodOptional<z.ZodObject<{
40
+ identity: z.ZodString;
41
+ eventTypes: z.ZodArray<z.ZodString>;
42
+ config: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
43
+ secrets: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
44
+ state: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
45
+ }, z.core.$strip>>;
46
+ response: z.ZodOptional<z.ZodObject<{
47
+ status: z.ZodNumber;
48
+ body: z.ZodString;
49
+ headers: z.ZodRecord<z.ZodString, z.ZodString>;
50
+ }, z.core.$strip>>;
51
+ event: z.ZodOptional<z.ZodObject<{
52
+ id: z.ZodString;
53
+ type: z.ZodString;
54
+ payload: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
55
+ matches: z.ZodArray<z.ZodString>;
56
+ ordering: z.ZodOptional<z.ZodObject<{
57
+ key: z.ZodString;
58
+ version: z.ZodNumber;
59
+ }, z.core.$strip>>;
60
+ }, z.core.$strip>>;
61
+ }, z.core.$strip>;
62
+ export type SourceResult = z.infer<typeof sourceResultSchema>;
63
+ export type PreparedSource = z.infer<typeof preparedSourceSchema>;
64
+ export type SourceReceipt = z.infer<typeof sourceReceiptSchema>;