@openapi-flow/core 0.3.1 → 0.3.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.
- package/README.md +3 -1
- package/dist/schemas/native-node-planning-record-schema.d.ts +4 -0
- package/dist/schemas/native-node-planning-record-schema.js +2 -1
- package/dist/schemas/workflow-connection-planning-schema.d.ts +4 -0
- package/dist/schemas/workflow-connection-planning-schema.js +2 -1
- package/dist/schemas/workflow-draft-edit-plan-schema.d.ts +1 -1
- package/dist/types/native-node-planning.d.ts +3 -2
- package/dist/types/workflow-connection-planning.d.ts +4 -3
- package/dist/workflow/connections/describe-workflow-connection-planning.js +5 -3
- package/dist/workflow/planning/describe-native-node-planning.js +4 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Zod `^4.6.5` is a required peer, shared with the host rather than installed as a separately pinned runtime copy. Development tests use 4.6.5; the strict installed-consumer check also uses the host's 4.6.7. This preserves the public schema type boundary without casts or dependency overrides.
|
|
4
4
|
|
|
5
|
-
Version **0.3.
|
|
5
|
+
Version **0.3.2**. Canonical draft, clarification and runtime-input APIs described below are included in this release. Ajv 8.20.0 does not correctly validate a declared `properties.__proto__`; generated validation may reject valid data or omit that property's constraints. This previously accepted limitation remains unchanged, without renaming data or skipping its failing regression. See the [release record](https://github.com/carefreelife98/openapi-flow/blob/main/docs/releases/0.3.2.md).
|
|
6
|
+
|
|
7
|
+
Native and fixed-material connection planning accept the optional, existing `WorkflowEntryPointContract` as `entrypoint`. Core validates and snapshots this owner-provided start alongside the other inputs; it does not infer one when absent, add a selectable trigger or let model output modify it.
|
|
6
8
|
|
|
7
9
|
Connection planning accepts explicit current `deferredApiInputIds` derived with `collectDeferredApiInputSlots`. Missing inputs remain absent and require canonical template preflight before execution; supplied values and the full DAG are still validated. See [input deferral](https://github.com/carefreelife98/openapi-flow/blob/main/docs/deferred-connection-planning.md).
|
|
8
10
|
|
|
@@ -4,6 +4,10 @@ export declare const nativeNodePlanningOptionsSchema: z.ZodObject<{
|
|
|
4
4
|
planId: z.ZodString;
|
|
5
5
|
scenario: z.ZodString;
|
|
6
6
|
allowRuntimeParameters: z.ZodOptional<z.ZodBoolean>;
|
|
7
|
+
entrypoint: z.ZodOptional<z.ZodObject<{
|
|
8
|
+
kind: z.ZodString;
|
|
9
|
+
description: z.ZodString;
|
|
10
|
+
}, z.core.$strict>>;
|
|
7
11
|
}, z.core.$strict>;
|
|
8
12
|
export declare const nativePlanningProposalSchema: z.ZodObject<{
|
|
9
13
|
nativeNodes: z.ZodArray<z.ZodObject<{
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { planningEvidenceTextSchema } from './planning-evidence-schema.js';
|
|
2
|
+
import { planningEvidenceTextSchema, workflowEntryPointContractSchema, } from './planning-evidence-schema.js';
|
|
3
3
|
import { workflowDraftNativeNodeSchema } from './workflow-draft-schema.js';
|
|
4
4
|
export const nativeNodePlanningOptionsSchema = z.strictObject({
|
|
5
5
|
planId: planningEvidenceTextSchema,
|
|
6
6
|
scenario: planningEvidenceTextSchema,
|
|
7
7
|
allowRuntimeParameters: z.boolean().optional(),
|
|
8
|
+
entrypoint: workflowEntryPointContractSchema.optional(),
|
|
8
9
|
});
|
|
9
10
|
export const nativePlanningProposalSchema = z.strictObject({
|
|
10
11
|
nativeNodes: z.array(workflowDraftNativeNodeSchema),
|
|
@@ -4,6 +4,10 @@ import type { WorkflowPlanningSourceEvidence } from '../types/workflow-planning-
|
|
|
4
4
|
import type { WorkflowPlanNodeContract } from '../types/workflow-plan.js';
|
|
5
5
|
export declare const workflowConnectionIdentitySchema: z.ZodObject<{
|
|
6
6
|
scenario: z.ZodString;
|
|
7
|
+
entrypoint: z.ZodOptional<z.ZodObject<{
|
|
8
|
+
kind: z.ZodString;
|
|
9
|
+
description: z.ZodString;
|
|
10
|
+
}, z.core.$strict>>;
|
|
7
11
|
}, z.core.$strict>;
|
|
8
12
|
export declare const workflowConnectionProposalSchema: z.ZodObject<{
|
|
9
13
|
edges: z.ZodArray<z.ZodObject<{
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { planningEvidenceTextSchema } from './planning-evidence-schema.js';
|
|
2
|
+
import { planningEvidenceTextSchema, workflowEntryPointContractSchema, } from './planning-evidence-schema.js';
|
|
3
3
|
import { workflowDraftNativeNodeSchema, workflowDraftEdgeSchema, } from './workflow-draft-schema.js';
|
|
4
4
|
import { workflowReviewGapSchema, workflowBlockedCallSchema, } from './workflow-planning-material-schema.js';
|
|
5
5
|
export const workflowConnectionIdentitySchema = z.strictObject({
|
|
6
6
|
scenario: planningEvidenceTextSchema,
|
|
7
|
+
entrypoint: workflowEntryPointContractSchema.optional(),
|
|
7
8
|
});
|
|
8
9
|
export const workflowConnectionProposalSchema = z.strictObject({
|
|
9
10
|
edges: z.array(workflowDraftEdgeSchema),
|
|
@@ -21,13 +21,13 @@ export declare const workflowDraftEditPlanSchema: z.ZodObject<{
|
|
|
21
21
|
decision: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
22
22
|
newNodeId: z.ZodOptional<z.ZodString>;
|
|
23
23
|
stages: z.ZodArray<z.ZodEnum<{
|
|
24
|
+
clarification: "clarification";
|
|
24
25
|
"api-bindings": "api-bindings";
|
|
25
26
|
"api-arguments": "api-arguments";
|
|
26
27
|
"native-parameters": "native-parameters";
|
|
27
28
|
requirements: "requirements";
|
|
28
29
|
connections: "connections";
|
|
29
30
|
"resolve-contracts": "resolve-contracts";
|
|
30
|
-
clarification: "clarification";
|
|
31
31
|
}>>;
|
|
32
32
|
}, z.core.$strict>>;
|
|
33
33
|
}, z.core.$strict>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ApiBindingMaterial } from './api-bindings.js';
|
|
2
|
+
import type { WorkflowPlanningContext } from './planning-evidence.js';
|
|
2
3
|
import type { z } from 'zod';
|
|
3
4
|
import type { JsonValueObject } from './api-arguments.js';
|
|
4
5
|
import type { JsonObject } from './openapi.js';
|
|
@@ -8,7 +9,7 @@ import type { NativeInstanceDependencyPlan, NativeNodeConfigurationDependencies
|
|
|
8
9
|
import type { WorkflowNativeMaterialSources, MissingWorkflowNativeMaterialRequirement, ResolveNativeMaterialSnapshotInput } from './native-material-snapshot.js';
|
|
9
10
|
import type { WorkflowReviewGap } from './reviewable-workflow.js';
|
|
10
11
|
import type { PlannedNativeNode, WorkflowCapability, WorkflowPlanGap, WorkflowPlanNodeContract, NativeRuntimeParameterSelection } from './workflow-plan.js';
|
|
11
|
-
export interface NativeNodePlanningInput {
|
|
12
|
+
export interface NativeNodePlanningInput extends Pick<WorkflowPlanningContext, 'entrypoint'> {
|
|
12
13
|
planId: string;
|
|
13
14
|
scenario: string;
|
|
14
15
|
capabilities?: WorkflowCapability[];
|
|
@@ -38,7 +39,7 @@ export interface NativePlanningApiMaterial {
|
|
|
38
39
|
operation: ApiBindingMaterial['operation']['operation'];
|
|
39
40
|
effective: ApiBindingMaterial['operation']['effective'];
|
|
40
41
|
}
|
|
41
|
-
export interface NativeNodePlanningContext {
|
|
42
|
+
export interface NativeNodePlanningContext extends Pick<WorkflowPlanningContext, 'entrypoint'> {
|
|
42
43
|
scenario: string;
|
|
43
44
|
apiMaterials: NativePlanningApiMaterial[];
|
|
44
45
|
preparedNativeNodes: PreparedNativeNodeMaterial[];
|
|
@@ -4,6 +4,7 @@ import type { PreparedNativeNodeMaterial } from './native-node-planning.js';
|
|
|
4
4
|
import type { WorkflowPlanningSourceEvidence } from './workflow-planning-materials.js';
|
|
5
5
|
import type { WorkflowApiInputDeferral } from './workflow-api-input-readiness.js';
|
|
6
6
|
import type { DeferredApiInputSlot } from './deferred-api-inputs.js';
|
|
7
|
+
import type { WorkflowPlanningContext } from './planning-evidence.js';
|
|
7
8
|
export interface WorkflowConnectionMaterialInput extends WorkflowApiInputDeferral {
|
|
8
9
|
materials?: ReviewableWorkflowApiMaterial[];
|
|
9
10
|
capabilities?: WorkflowCapability[];
|
|
@@ -11,7 +12,7 @@ export interface WorkflowConnectionMaterialInput extends WorkflowApiInputDeferra
|
|
|
11
12
|
gaps?: WorkflowReviewGap[];
|
|
12
13
|
edges?: WorkflowPlanEdge[];
|
|
13
14
|
}
|
|
14
|
-
export interface WorkflowConnectionPlanningInput extends WorkflowConnectionMaterialInput {
|
|
15
|
+
export interface WorkflowConnectionPlanningInput extends WorkflowConnectionMaterialInput, Pick<WorkflowPlanningContext, 'entrypoint'> {
|
|
15
16
|
scenario: string;
|
|
16
17
|
}
|
|
17
18
|
export interface WorkflowConnectionMaterials extends WorkflowApiInputDeferral {
|
|
@@ -33,7 +34,7 @@ export interface WorkflowNativeParameterReadiness {
|
|
|
33
34
|
/** Explicit runtime ownership, not missing plan-time values or unresolved graph gaps. */
|
|
34
35
|
executionInputPointers: string[];
|
|
35
36
|
}
|
|
36
|
-
export interface WorkflowConnectionPlanningContext {
|
|
37
|
+
export interface WorkflowConnectionPlanningContext extends Pick<WorkflowPlanningContext, 'entrypoint'> {
|
|
37
38
|
scenario: string;
|
|
38
39
|
nodes: WorkflowPlanNodeContract[];
|
|
39
40
|
nativeNodes?: PreparedNativeNodeMaterial[];
|
|
@@ -45,7 +46,7 @@ export interface WorkflowConnectionPlanningContext {
|
|
|
45
46
|
/** Code-derived missing values, never missing API capabilities or generated literals. */
|
|
46
47
|
deferredApiInputs?: DeferredApiInputSlot[];
|
|
47
48
|
}
|
|
48
|
-
export interface WorkflowConnectionPlanningSnapshot extends WorkflowConnectionMaterials {
|
|
49
|
+
export interface WorkflowConnectionPlanningSnapshot extends WorkflowConnectionMaterials, Pick<WorkflowPlanningContext, 'entrypoint'> {
|
|
49
50
|
scenario: string;
|
|
50
51
|
}
|
|
51
52
|
export interface WorkflowConnectionPlanningDescription {
|
|
@@ -8,9 +8,11 @@ import { createNativePlanningCapabilityMaterial } from '../planning/create-nativ
|
|
|
8
8
|
import { prepareWorkflowConnectionMaterials } from './prepare-workflow-connection-materials.js';
|
|
9
9
|
/** Capture declared data before awaiting the model; never clone opaque callbacks or forward audit metadata. */
|
|
10
10
|
export function describeWorkflowConnectionPlanning(input) {
|
|
11
|
-
const
|
|
11
|
+
const identity = workflowConnectionIdentitySchema.parse({
|
|
12
12
|
scenario: input.scenario,
|
|
13
|
+
...(input.entrypoint === undefined ? {} : { entrypoint: input.entrypoint }),
|
|
13
14
|
});
|
|
15
|
+
const { scenario } = identity;
|
|
14
16
|
for (const field of [
|
|
15
17
|
'materials',
|
|
16
18
|
'capabilities',
|
|
@@ -37,7 +39,7 @@ export function describeWorkflowConnectionPlanning(input) {
|
|
|
37
39
|
edges: structuredClone((input.edges === undefined ? [] : input.edges).map((edge) => workflowDraftEdgeSchema.parse(edge))),
|
|
38
40
|
});
|
|
39
41
|
const context = {
|
|
40
|
-
|
|
42
|
+
...structuredClone(identity),
|
|
41
43
|
nodes: structuredClone(prepared.contracts),
|
|
42
44
|
...(prepared.nativeNodes.length
|
|
43
45
|
? {
|
|
@@ -71,7 +73,7 @@ export function describeWorkflowConnectionPlanning(input) {
|
|
|
71
73
|
: { deferredApiInputs: structuredClone(prepared.deferredApiInputs) }),
|
|
72
74
|
};
|
|
73
75
|
return {
|
|
74
|
-
input: { ...prepared,
|
|
76
|
+
input: { ...prepared, ...identity },
|
|
75
77
|
context,
|
|
76
78
|
sources: structuredClone({
|
|
77
79
|
materials,
|
|
@@ -10,6 +10,7 @@ export function describeNativeNodePlanning(input) {
|
|
|
10
10
|
planId: input.planId,
|
|
11
11
|
scenario: input.scenario,
|
|
12
12
|
allowRuntimeParameters: input.allowRuntimeParameters,
|
|
13
|
+
...(input.entrypoint === undefined ? {} : { entrypoint: input.entrypoint }),
|
|
13
14
|
});
|
|
14
15
|
const { capabilities, apiMaterials, preparedNativeNodes: prepared, } = captureWorkflowPlanningMaterials(input);
|
|
15
16
|
const apiIds = apiMaterials.map((material) => material.callId);
|
|
@@ -28,6 +29,9 @@ export function describeNativeNodePlanning(input) {
|
|
|
28
29
|
planningCapabilities,
|
|
29
30
|
context: {
|
|
30
31
|
scenario: options.scenario,
|
|
32
|
+
...(options.entrypoint === undefined
|
|
33
|
+
? {}
|
|
34
|
+
: { entrypoint: structuredClone(options.entrypoint) }),
|
|
31
35
|
apiMaterials: apiMaterials.map(({ callId, operation, purpose }) => ({
|
|
32
36
|
callId,
|
|
33
37
|
...(purpose === undefined ? {} : { purpose }),
|