@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.
- package/README.md +2 -0
- package/dist/browser/{ContentIcon-VZQO8VZU.js → ContentIcon-CMn0c-kl.js} +93 -3
- package/dist/browser/{FlowCanvas-BNGDMaWr.js → FlowCanvas-BQGBcfoL.js} +1675 -591
- package/dist/browser/{createResourceDialog-BmtakfVg.js → createResourceDialog-DCGxfKFM.js} +3 -3
- package/dist/browser/{dialog-BcFBfRB1.js → dialog-WzR4CRFH.js} +11 -81
- package/dist/browser/{exportSvg-CG8hEUNk.js → exportSvg-CYwyYiuH.js} +2 -2
- package/dist/browser/{flowChanges-BGo_4Ypo.js → flowChanges-Bz4dbDN_.js} +1204 -387
- package/dist/browser/{flowWorkspace-BFHGev7s.js → flowWorkspace-BI6L6a4r.js} +557 -597
- package/dist/browser/licenses.md +1 -1
- package/dist/browser/preview.css +512 -462
- package/dist/browser/preview.js +8457 -6732
- package/dist/browser/{tooltip-BAWSUexx.js → tooltip-BDcVTNpu.js} +65 -2
- package/dist/browser/ui.css +5 -24
- package/dist/browser/workbench.css +512 -462
- package/dist/browser/workbench.d.ts +2 -3
- package/dist/browser/workbench.js +65 -690
- package/dist/browser/{workbenchSelect-CjK-xdm3.js → workbenchSelect-DtAd0zc4.js} +2 -2
- package/dist/command/index.js +25 -25
- package/dist/common/authoring.d.ts +3 -3
- package/dist/common/authoringExamples.d.ts +3 -3
- package/dist/common/authoringSchema.d.ts +14 -22
- package/dist/common/control-api-conformance.js +11 -18
- package/dist/common/control-api.d.ts +5 -1
- package/dist/common/control-api.js +11 -18
- package/dist/common/control-requests.d.ts +4 -3
- package/dist/common/control-requests.js +26 -37
- package/dist/common/flow-authoring.js +6 -14
- package/dist/common/flow-change.d.ts +1 -1
- package/dist/common/flow-change.js +6 -14
- package/dist/common/flow-encoding.js +5 -13
- package/dist/common/flow-semantics.js +15 -21
- package/dist/common/flow-state.d.ts +16 -39
- package/dist/common/flow-state.js +47 -105
- package/dist/common/mcp.d.ts +3 -3
- package/dist/common/mcp.js +11 -18
- package/dist/common/run-events.js +19 -9
- package/dist/common/runtime-contract.js +6 -12
- package/dist/common/runtime-nodejs-compat.js +11 -12
- package/dist/common/scheduler.d.ts +2 -1
- package/dist/common/scheduler.js +56 -50
- package/dist/common/state-conformance.d.ts +3 -3
- package/package.json +1 -1
- package/src/control/common/api.ts +20 -3
- package/src/control/common/authoring.ts +6 -5
- package/src/control/common/authoringExamples.ts +6 -5
- package/src/control/common/authoringSchema.ts +7 -7
- package/src/control/common/requests.ts +7 -1
- package/src/execution/common/events.ts +22 -10
- package/src/execution/common/node-execution.ts +1 -1
- package/src/execution/common/scheduler.ts +28 -14
- package/src/flow/common/change.ts +1 -1
- package/src/flow/common/changeSchema.ts +4 -4
- package/src/flow/common/errorHandling.ts +1 -1
- package/src/flow/common/semantics.ts +12 -6
- package/src/runtime/common/nodejsGuest.generated.json +11 -12
- package/src/runtime/common/runtime.ts +6 -7
- package/src/state/common/conformance.ts +16 -21
- 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 {
|
|
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
|
-
|
|
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 === '
|
|
732
|
+
(candidateNode) => candidateNode.kind === 'task' && 'executor' in candidateNode.task && candidateNode.task.executor.kind === 'skip-duplicates',
|
|
733
733
|
)
|
|
734
734
|
)
|
|
735
|
-
throw new Error('
|
|
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 === '
|
|
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 {
|
|
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 === '
|
|
278
|
-
const expected =
|
|
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: '
|
|
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(
|
|
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
|
|