@oomol-lab/open-flow 0.1.0-alpha.9 → 0.1.0-beta.2

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 (58) hide show
  1. package/README.md +5 -1
  2. package/dist/browser/createResourceDialog-BkZns-oZ.js +504 -0
  3. package/dist/browser/diagnostics-giPSzyMo.js +9346 -0
  4. package/dist/browser/{dist-DhsGR_K3.js → dist-3Mj8q8Pr.js} +27 -27
  5. package/dist/browser/{dist-n9WmBm5w.js → dist-BKuSVKCC.js} +1 -1
  6. package/dist/browser/{dist-DQVavPcf.js → dist-BMqL-qR5.js} +469 -903
  7. package/dist/browser/{dist-D5mdziGP.js → dist-BN4ZCyOB.js} +9 -9
  8. package/dist/browser/{dist-CVtP-E2c.js → dist-BpopSHwP.js} +1 -1
  9. package/dist/browser/{dist-B0Q2Mn0n.js → dist-CJpzJrLM.js} +191 -191
  10. package/dist/browser/{dist-DXgEYMFx.js → dist-CPuF50D9.js} +196 -196
  11. package/dist/browser/{dist-CUkceEvN.js → dist-CUSrALSX.js} +113 -113
  12. package/dist/browser/dist-CeSZ2xSM.js +444 -0
  13. package/dist/browser/{dist-Bc9TvHYl.js → dist-DUzA0Ukh.js} +20 -20
  14. package/dist/browser/{dist-DWzdGVm9.js → dist-DWADUsVB.js} +74 -74
  15. package/dist/browser/{esm-YIGXG-Js.js → esm-B_PbUobB.js} +13 -13
  16. package/dist/browser/flow-authoring-node.d.ts +4 -2
  17. package/dist/browser/flow-authoring.d.ts +2 -1
  18. package/dist/browser/flow-authoring.js +400 -100
  19. package/dist/browser/flow-change.d.ts +9 -4
  20. package/dist/browser/flow-change.js +49 -46
  21. package/dist/browser/{flowRunInputEditorStore-DXOyyY7o.js → flowRunInputEditorStore-BeyUSWpO.js} +1644 -908
  22. package/dist/browser/{flowWorkspace-D7-rBA1-.js → flowWorkspace-DAMLVMcF.js} +18416 -16444
  23. package/dist/browser/getPseudoElementBounds-ESJExRFX.js +7642 -0
  24. package/dist/browser/languages-DgJehE1g.js +62 -0
  25. package/dist/browser/lib-C5Ipyfps.js +7856 -0
  26. package/dist/browser/licenses.md +119 -1
  27. package/dist/browser/main-DmjVyuWr.js +76 -0
  28. package/dist/browser/{markdownContent-ColGUxHy.js → markdownContent-DdlIRN3_.js} +4811 -4795
  29. package/dist/browser/theme.css +63 -0
  30. package/dist/browser/theme.css.d.ts +1 -0
  31. package/dist/browser/typeScriptSession-mPCiA9sV.js +2579 -0
  32. package/dist/browser/workbench-contract.d.ts +2 -1
  33. package/dist/browser/workbench.css +1 -1
  34. package/dist/browser/workbench.d.ts +46 -1
  35. package/dist/browser/workbench.js +1132 -1474
  36. package/dist/browser/workbenchSelect-B2s1HV-Y.js +1374 -0
  37. package/dist/common/connector-action.d.ts +6 -0
  38. package/dist/common/connector-action.js +37 -29
  39. package/dist/common/control-api-conformance.js +80 -29
  40. package/dist/common/control-api-errors.d.ts +24 -0
  41. package/dist/common/control-api.d.ts +54 -7
  42. package/dist/common/control-api.js +226 -95
  43. package/dist/common/flow-encoding.d.ts +2 -2
  44. package/dist/common/flow-encoding.js +4 -1
  45. package/dist/common/flow-semantics.d.ts +3 -0
  46. package/dist/common/flow-semantics.js +939 -851
  47. package/dist/common/integration-trigger.d.ts +1 -0
  48. package/dist/common/licenses.md +1 -25
  49. package/dist/common/localization.d.ts +21 -0
  50. package/dist/common/localization.js +62 -0
  51. package/dist/common/provider-triggers.js +4 -1
  52. package/dist/common/scheduler.d.ts +5 -5
  53. package/dist/common/scheduler.js +250 -236
  54. package/package.json +10 -1
  55. package/dist/browser/addNodeOptions-DRndy4EK.js +0 -6910
  56. package/dist/browser/createLucideIcon-CqjqCezK.js +0 -5537
  57. package/dist/browser/createResourceDialog-A64dDFCG.js +0 -467
  58. package/dist/browser/field-CKGQHCIi.js +0 -312
@@ -48,6 +48,7 @@ export interface IntegrationReconcileContext {
48
48
  readonly config: Readonly<Record<string, JsonValue>>;
49
49
  readonly connector: ConnectorProxy;
50
50
  readonly endpointUrl: string;
51
+ readonly idempotencyKey: string;
51
52
  readonly now: Date;
52
53
  readonly signal?: AbortSignal;
53
54
  readonly state?: IntegrationStateContext;
@@ -1,27 +1,3 @@
1
1
  # Licenses
2
2
 
3
- The app bundles dependencies which contain the following licenses:
4
-
5
- ## dequal - 2.0.3 (MIT)
6
-
7
- The MIT License (MIT)
8
-
9
- Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
10
-
11
- Permission is hereby granted, free of charge, to any person obtaining a copy
12
- of this software and associated documentation files (the "Software"), to deal
13
- in the Software without restriction, including without limitation the rights
14
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
- copies of the Software, and to permit persons to whom the Software is
16
- furnished to do so, subject to the following conditions:
17
-
18
- The above copyright notice and this permission notice shall be included in
19
- all copies or substantial portions of the Software.
20
-
21
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27
- THE SOFTWARE.
3
+ The app does not bundle any dependencies with licenses.
@@ -0,0 +1,21 @@
1
+ export declare const uiLanguages: readonly ['en', 'zh-CN', 'zh-TW', 'ja', 'ko', 'ru', 'fr'];
2
+ export type UiLanguage = (typeof uiLanguages)[number];
3
+ export declare const defaultUiLanguage: UiLanguage;
4
+ /** Endonyms, shown in language pickers regardless of the current UI language. */
5
+ export declare const uiLanguageNames: Readonly<Record<UiLanguage, string>>;
6
+ export declare function isUiLanguage(value: unknown): value is UiLanguage;
7
+ /**
8
+ * BCP 47 aware resolution over candidates such as `navigator.languages`: an exact tag match
9
+ * (case-insensitive) wins; for zh an explicit script subtag beats the region (zh-Hant-* to zh-TW,
10
+ * zh-Hans-* to zh-CN), then zh-TW, zh-HK and zh-MO map to zh-TW and any other zh* to zh-CN; en, ja,
11
+ * ko, ru and fr also match on their primary subtag (fr-CA to fr, ja-JP to ja).
12
+ */
13
+ export declare function resolveUiLanguage(candidates: Iterable<string | null | undefined>, fallback?: UiLanguage): UiLanguage;
14
+ /** Languages written with CJK scripts: zh-CN, zh-TW, ja and ko. */
15
+ export declare function isCjkLanguage(language: string): boolean;
16
+ /**
17
+ * Lookup order for package-author locale files (`oo-locales/<lang>.json`), which only exist for en
18
+ * and zh-CN today. Traditional Chinese readers prefer Simplified Chinese over English; every other
19
+ * language falls back to English first. The chain never repeats a locale.
20
+ */
21
+ export declare function userLocaleFallbackChain(language: string): readonly string[];
@@ -0,0 +1,62 @@
1
+ //#region src/localization/common/languages.ts
2
+ var e = [
3
+ "en",
4
+ "zh-CN",
5
+ "zh-TW",
6
+ "ja",
7
+ "ko",
8
+ "ru",
9
+ "fr"
10
+ ], t = "en", n = {
11
+ en: "English",
12
+ "zh-CN": "简体中文",
13
+ "zh-TW": "繁體中文",
14
+ ja: "日本語",
15
+ ko: "한국어",
16
+ ru: "Русский",
17
+ fr: "Français"
18
+ }, r = new Map(e.map((e) => [e.toLowerCase(), e])), i = /* @__PURE__ */ new Set([
19
+ "hk",
20
+ "mo",
21
+ "tw"
22
+ ]), a = /* @__PURE__ */ new Set([
23
+ "zh-CN",
24
+ "zh-TW",
25
+ "ja",
26
+ "ko"
27
+ ]);
28
+ function o(e) {
29
+ return typeof e == "string" && r.get(e.toLowerCase()) == e;
30
+ }
31
+ function s(e, t = "en") {
32
+ for (let t of e) {
33
+ let e = t == null ? void 0 : u(t);
34
+ if (e != null) return e;
35
+ }
36
+ return t;
37
+ }
38
+ function c(e) {
39
+ let t = u(e);
40
+ return t != null && a.has(t);
41
+ }
42
+ function l(e) {
43
+ return e == "zh-TW" ? [
44
+ "zh-TW",
45
+ "zh-CN",
46
+ "en"
47
+ ] : e == "zh-CN" ? ["zh-CN", "en"] : e == "en" ? ["en", "zh-CN"] : [
48
+ e,
49
+ "en",
50
+ "zh-CN"
51
+ ];
52
+ }
53
+ function u(e) {
54
+ let t = e.trim().toLowerCase();
55
+ if (t.length == 0) return;
56
+ let n = r.get(t);
57
+ if (n != null) return n;
58
+ let a = t.split("-");
59
+ return a[0] == "zh" ? a.includes("hant") ? "zh-TW" : a.includes("hans") ? "zh-CN" : a.some((e) => i.has(e)) ? "zh-TW" : "zh-CN" : r.get(a[0]);
60
+ }
61
+ //#endregion
62
+ export { t as defaultUiLanguage, c as isCjkLanguage, o as isUiLanguage, s as resolveUiLanguage, n as uiLanguageNames, e as uiLanguages, l as userLocaleFallbackChain };
@@ -3923,7 +3923,10 @@ var ci = 300, H = "/v1/webhook_endpoints", li = { "Content-Type": "application/x
3923
3923
  let t = await U(e, "endpoint create", {
3924
3924
  body: fi(e.endpointUrl, n),
3925
3925
  endpoint: H,
3926
- headers: li,
3926
+ headers: {
3927
+ ...li,
3928
+ "Idempotency-Key": e.idempotencyKey
3929
+ },
3927
3930
  method: "POST"
3928
3931
  });
3929
3932
  W(t, "endpoint create");
@@ -1,5 +1,6 @@
1
1
  import type { ConnectorCapability, JsonValue } from '../browser/flow-change.js';
2
2
  import type { PreparedFlow } from './flow-semantics.js';
3
+ import * as Effect from 'effect/Effect';
3
4
  export type SchedulerEvent = {
4
5
  readonly flowId: string;
5
6
  readonly parentJobId?: string;
@@ -69,7 +70,6 @@ interface TaskInvocationBase {
69
70
  readonly jobId: string;
70
71
  readonly nodeId: string;
71
72
  readonly runId: string;
72
- readonly signal: AbortSignal;
73
73
  }
74
74
  export type TaskInvocation = TaskInvocationBase & ({
75
75
  readonly capabilities: readonly ConnectorCapability[];
@@ -86,15 +86,15 @@ export interface SchedulerFailure {
86
86
  readonly message: string;
87
87
  }
88
88
  export interface FlowRunOptions {
89
+ readonly bindingValues?: Readonly<Record<string, string>>;
89
90
  readonly createId: () => string;
90
- readonly emit?: (event: SchedulerEvent) => void | Promise<void>;
91
+ readonly emit?: (event: SchedulerEvent) => Effect.Effect<void, Error>;
91
92
  readonly flowId: string;
92
93
  readonly inputs?: Readonly<Record<string, Readonly<Record<string, JsonValue>>>>;
93
- readonly invokeTask: (invocation: TaskInvocation) => Promise<unknown>;
94
+ readonly invokeTask: (invocation: TaskInvocation) => Effect.Effect<unknown, Error>;
94
95
  readonly projectFailure?: (error: unknown) => SchedulerFailure;
95
96
  readonly runId: string;
96
- readonly signal?: AbortSignal;
97
97
  readonly trigger?: TriggerSeed;
98
98
  }
99
- export declare function runFlow(prepared: PreparedFlow, options: FlowRunOptions): Promise<FlowRunResult>;
99
+ export declare function runFlow(prepared: PreparedFlow, options: FlowRunOptions): Effect.Effect<FlowRunResult, Error>;
100
100
  export {};