@oomol-lab/open-flow 0.1.0-beta.77 → 0.1.0-beta.78

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 +2 -0
  2. package/dist/browser/{ContentIcon-VZQO8VZU.js → ContentIcon-CMn0c-kl.js} +93 -3
  3. package/dist/browser/{FlowCanvas-BNGDMaWr.js → FlowCanvas-BQGBcfoL.js} +1675 -591
  4. package/dist/browser/{createResourceDialog-BmtakfVg.js → createResourceDialog-DCGxfKFM.js} +3 -3
  5. package/dist/browser/{dialog-BcFBfRB1.js → dialog-WzR4CRFH.js} +11 -81
  6. package/dist/browser/{exportSvg-CG8hEUNk.js → exportSvg-CYwyYiuH.js} +2 -2
  7. package/dist/browser/{flowChanges-BGo_4Ypo.js → flowChanges-Bz4dbDN_.js} +1204 -387
  8. package/dist/browser/{flowWorkspace-BFHGev7s.js → flowWorkspace-BI6L6a4r.js} +557 -597
  9. package/dist/browser/licenses.md +1 -1
  10. package/dist/browser/preview.css +512 -462
  11. package/dist/browser/preview.js +8457 -6732
  12. package/dist/browser/{tooltip-BAWSUexx.js → tooltip-BDcVTNpu.js} +65 -2
  13. package/dist/browser/ui.css +5 -24
  14. package/dist/browser/workbench.css +512 -462
  15. package/dist/browser/workbench.d.ts +2 -3
  16. package/dist/browser/workbench.js +65 -690
  17. package/dist/browser/{workbenchSelect-CjK-xdm3.js → workbenchSelect-DtAd0zc4.js} +2 -2
  18. package/dist/command/index.js +25 -25
  19. package/dist/common/authoring.d.ts +3 -3
  20. package/dist/common/authoringExamples.d.ts +3 -3
  21. package/dist/common/authoringSchema.d.ts +14 -22
  22. package/dist/common/control-api-conformance.js +11 -18
  23. package/dist/common/control-api.d.ts +5 -1
  24. package/dist/common/control-api.js +11 -18
  25. package/dist/common/control-requests.d.ts +4 -3
  26. package/dist/common/control-requests.js +26 -37
  27. package/dist/common/flow-authoring.js +6 -14
  28. package/dist/common/flow-change.d.ts +1 -1
  29. package/dist/common/flow-change.js +6 -14
  30. package/dist/common/flow-encoding.js +5 -13
  31. package/dist/common/flow-semantics.js +15 -21
  32. package/dist/common/flow-state.d.ts +16 -39
  33. package/dist/common/flow-state.js +47 -105
  34. package/dist/common/mcp.d.ts +3 -3
  35. package/dist/common/mcp.js +11 -18
  36. package/dist/common/run-events.js +19 -9
  37. package/dist/common/runtime-contract.js +6 -12
  38. package/dist/common/runtime-nodejs-compat.js +11 -12
  39. package/dist/common/scheduler.d.ts +2 -1
  40. package/dist/common/scheduler.js +56 -50
  41. package/dist/common/state-conformance.d.ts +3 -3
  42. package/package.json +1 -1
  43. package/src/control/common/api.ts +20 -3
  44. package/src/control/common/authoring.ts +6 -5
  45. package/src/control/common/authoringExamples.ts +6 -5
  46. package/src/control/common/authoringSchema.ts +7 -7
  47. package/src/control/common/requests.ts +7 -1
  48. package/src/execution/common/events.ts +22 -10
  49. package/src/execution/common/node-execution.ts +1 -1
  50. package/src/execution/common/scheduler.ts +28 -14
  51. package/src/flow/common/change.ts +1 -1
  52. package/src/flow/common/changeSchema.ts +4 -4
  53. package/src/flow/common/errorHandling.ts +1 -1
  54. package/src/flow/common/semantics.ts +12 -6
  55. package/src/runtime/common/nodejsGuest.generated.json +11 -12
  56. package/src/runtime/common/runtime.ts +6 -7
  57. package/src/state/common/conformance.ts +16 -21
  58. package/src/state/common/state.ts +44 -72
@@ -6,7 +6,7 @@ import { limitDecisionTask } from '../../decision/common/decision.ts'
6
6
  import { assertHttpAuthBindings } from '../../http/common/authBindings.ts'
7
7
  import { isHttpHost, maxHttpHosts } from '../../http/common/hosts.ts'
8
8
  import { httpRequestExecutorSchema } from '../../http/common/httpRequest.ts'
9
- import { dedupeExecutorSchema } from '../../state/common/state.ts'
9
+ import { skipDuplicatesExecutorSchema } from '../../state/common/state.ts'
10
10
  import { checkJsonDepth } from './json.ts'
11
11
  import { retryConfigurationSchema } from './retry.ts'
12
12
  import { triggerScheduleSchema } from './triggerScheduleSchema.ts'
@@ -130,7 +130,7 @@ const managedFields = z.object({
130
130
  }),
131
131
  z.strictObject({ kind: z.literal('workflow'), flowId: text, revisionId: text }),
132
132
  httpRequestExecutorSchema,
133
- dedupeExecutorSchema,
133
+ skipDuplicatesExecutorSchema,
134
134
  ]),
135
135
  })
136
136
 
@@ -729,10 +729,10 @@ function checkModelVersion(content: RevisionContent): void {
729
729
  if (
730
730
  content.modelVersion < 13 &&
731
731
  Object.values(content.document.graph.nodes).some(
732
- (candidateNode) => candidateNode.kind === 'task' && 'executor' in candidateNode.task && candidateNode.task.executor.kind === 'dedupe',
732
+ (candidateNode) => candidateNode.kind === 'task' && 'executor' in candidateNode.task && candidateNode.task.executor.kind === 'skip-duplicates',
733
733
  )
734
734
  )
735
- throw new Error('Deduplication requires Flow model v13.')
735
+ throw new Error('Skip Duplicates requires Flow model v13.')
736
736
  if (
737
737
  content.modelVersion < 12 &&
738
738
  Object.values(content.document.graph.nodes).some(
@@ -26,7 +26,7 @@ export const nodeErrorSchema = {
26
26
  } as const
27
27
 
28
28
  export function supportsNodeErrorHandling(node: GraphNode): boolean {
29
- return supportsNodeRetry(node) || (node.kind === 'task' && 'executor' in node.task && node.task.executor.kind === 'dedupe')
29
+ return supportsNodeRetry(node) || (node.kind === 'task' && 'executor' in node.task && node.task.executor.kind === 'skip-duplicates')
30
30
  }
31
31
 
32
32
  export function nodeSystemOutputPorts(node: GraphNode): Readonly<Record<string, PortDefinition>> {
@@ -2,7 +2,7 @@ import { dequal } from 'dequal/lite'
2
2
  import { decisionTaskIssues } from '../../decision/common/decision.ts'
3
3
  import { httpRequestIssues, httpAuthHandles, httpRequestTask, httpRequestUrl } from '../../http/common/httpRequest.ts'
4
4
  import { openApiIssues, authHandles } from '../../openapi/common/openapi.ts'
5
- import { dedupeTask } from '../../state/common/state.ts'
5
+ import { skipDuplicatesTask } from '../../state/common/state.ts'
6
6
  import { isTriggerNode } from './change.ts'
7
7
  import { nodeWorkflowReferences } from './workflowReferences.ts'
8
8
  export { renderPrompt } from './promptTemplate.ts'
@@ -274,14 +274,14 @@ export async function validateFlow(revision: RevisionContent, engine: EngineCont
274
274
  })
275
275
  for (const message of openApiIssues(task))
276
276
  checked.diagnostics.push({ code: 'openapi.config-invalid', column: 0, line: 1, message, path: `/document/graph/nodes/${nodeId}/task/executor` })
277
- if (task.executor.kind === 'dedupe') {
278
- const expected = dedupeTask(task.executor)
277
+ if (task.executor.kind === 'skip-duplicates') {
278
+ const expected = skipDuplicatesTask(task.executor)
279
279
  if (
280
280
  !dequal(httpPortContracts(task.inputs), httpPortContracts(expected.inputs)) ||
281
281
  !dequal(httpPortContracts(task.outputs), httpPortContracts(expected.outputs))
282
282
  )
283
283
  checked.diagnostics.push({
284
- code: 'dedupe.ports-invalid',
284
+ code: 'skip-duplicates.ports-invalid',
285
285
  column: 0,
286
286
  line: 1,
287
287
  message: 'Deduplication ports must match the fixed contract.',
@@ -457,7 +457,9 @@ export async function prepareFlow(revision: RevisionContent, engineContract: str
457
457
  if (engine == null) return { kind: 'engine-unsupported' }
458
458
  if (
459
459
  !engine.flowState &&
460
- Object.values(revision.document.graph.nodes).some((node) => node.kind === 'task' && 'executor' in node.task && node.task.executor.kind === 'dedupe')
460
+ Object.values(revision.document.graph.nodes).some(
461
+ (node) => node.kind === 'task' && 'executor' in node.task && node.task.executor.kind === 'skip-duplicates',
462
+ )
461
463
  )
462
464
  return { kind: 'engine-unsupported' }
463
465
  if (
@@ -527,11 +529,15 @@ export async function prepareFlow(revision: RevisionContent, engineContract: str
527
529
 
528
530
  export function createRuntimeProgram(prepared: PreparedFlow, entryModuleId: string, engineDigest: string): RuntimeProgram | undefined {
529
531
  if (!Object.hasOwn(prepared.modules, entryModuleId)) return
532
+ const modules = new Set([entryModuleId])
533
+ for (const id of modules) {
534
+ for (const imported of prepared.modules[id]!.imports) modules.add(imported)
535
+ }
530
536
  return {
531
537
  engineContract: prepared.engineContract,
532
538
  engineDigest,
533
539
  entryModuleId,
534
- modules: prepared.modules,
540
+ modules: Object.fromEntries([...modules].map((id) => [id, prepared.modules[id]!])),
535
541
  }
536
542
  }
537
543