Skip to content
SurfaceDocs
FRGet started
DocsModel reference

ManagedModelFlowAuthoring · types

Interfaces, values and named contracts for ManagedModelFlowAuthoring.

The following types define named objects and their relationships. Tables include inherited properties. Schema-derived types refer to their validated structures; a TypeScript declaration does not replace the compiler’s semantic checks.

ManagedModelAuthorFlow

Closed author contract; advanced native Blueprints remain independent declarations.

export type ManagedModelAuthorFlow = Omit<z.infer<typeof managedModelAuthorFlowSchema>, 'steps'> & {
  readonly steps: readonly ManagedModelAuthorFlowNode[];
};

ManagedModelAuthorFlowNode

The author tree changes placement only; every control retains its exact native choices and budgets.

export type ManagedModelAuthorFlowNode =
  | z.infer<typeof managedModelAuthorTaskSchema>
  | Extract<FlowCompositionStep, { kind: 'wait' | 'delay' | 'subflow' }>
  | (Omit<Extract<FlowCompositionStep, { kind: 'sequence' }>, 'steps'> & {
      readonly steps: readonly ManagedModelAuthorFlowNode[];
    })
  | (Omit<Extract<FlowCompositionStep, { kind: 'choice' }>, 'branches'> & {
      readonly branches: readonly {
        readonly key: string;
        readonly ruleKey: string;
        readonly step: ManagedModelAuthorFlowNode;
      }[];
    })
  | (Omit<Extract<FlowCompositionStep, { kind: 'parallel' }>, 'branches'> & {
      readonly branches: readonly {
        readonly key: string;
        readonly step: ManagedModelAuthorFlowNode;
      }[];
    })
  | (Omit<Extract<FlowCompositionStep, { kind: 'collection' }>, 'stepKey'> & {
      readonly step: ManagedModelAuthorFlowNode;
    })
  | (Omit<Extract<FlowCompositionStep, { kind: 'iterate' }>, 'stepKey'> & {
      readonly step: ManagedModelAuthorFlowNode;
    });

ManagedModelFlowStepCatalogueEntry

A reusable entry is exactly one TaskAction and its admitted Fields, not a new handler registry.

Field Options / expected values Description
key string Required. Stable semantic identifier used by references; changing it changes identity.
action TaskActionDefinition Required. Defines action for this object. Observe the type, variants and bounds in the Options column.
inputFields readonly ManagedSurfaceFieldDefinition[] Required. Defines input Fields for this object. Observe the type, variants and bounds in the Options column.
effect "canonical-task" Required. Defines effect for this object. Observe the type, variants and bounds in the Options column.
authorization "canonical-flow-and-task-owners" Required. Defines authorization for this object. Observe the type, variants and bounds in the Options column.
retry "explicit-business-attempt" Required. Defines retry for this object. Observe the type, variants and bounds in the Options column.
providerEffects "not-declared" Required. Defines provider Effects for this object. Observe the type, variants and bounds in the Options column.
export interface ManagedModelFlowStepCatalogueEntry {
  readonly key: string;
  readonly action: TaskActionDefinition;
  readonly inputFields: readonly ManagedSurfaceFieldDefinition[];
  readonly effect: 'canonical-task';
  readonly authorization: 'canonical-flow-and-task-owners';
  readonly retry: 'explicit-business-attempt';
  readonly providerEffects: 'not-declared';
}

ManagedModelAuthorFlowMapping

Maps authored identities to inspectable generated declarations without adding artifact metadata.

Field Options / expected values Description
blueprintKey string Required. Stable key reference to the corresponding named declaration; the compiler checks existence and compatibility.
source string Required. Defines source for this object. Observe the type, variants and bounds in the Options column.
steps readonly { readonly key: string; readonly source: string; readonly workNodeKey: string | null; }[] Required. Composition steps in their declared organization.
export interface ManagedModelAuthorFlowMapping {
  readonly blueprintKey: string;
  readonly source: string;
  readonly steps: readonly {
    readonly key: string;
    readonly source: string;
    readonly workNodeKey: string | null;
  }[];
}

ManagedModelFlowAuthoringInspection

This is an inspection of a successful compile, not a publication, permission or execution result.

Field Options / expected values Description
contract "ModelFlowAuthoringInspection@1" Required. Exact discriminant of this contract variant. Match the literal value shown.
sourceHash string Required. Digest of the source used to produce the artifact.
artifactHash string Required. Artifact content digest that must match its provenance.
model { readonly id: string; readonly version: string; } Required. Defines model for this object. Observe the type, variants and bounds in the Options column.
catalogue { readonly hash: string; readonly entries: readonly ManagedModelFlowStepCatalogueEntry[]; } Required. Defines catalogue for this object. Observe the type, variants and bounds in the Options column.
mappings readonly ManagedModelAuthorFlowMapping[] Required. Defines mappings for this object. Observe the type, variants and bounds in the Options column.
blueprints readonly FlowBlueprint[] Required. Defines blueprints for this object. Observe the type, variants and bounds in the Options column.
export interface ManagedModelFlowAuthoringInspection {
  readonly contract: 'ModelFlowAuthoringInspection@1';
  readonly sourceHash: string;
  readonly artifactHash: string;
  readonly model: { readonly id: string; readonly version: string };
  readonly catalogue: {
    readonly hash: string;
    readonly entries: readonly ManagedModelFlowStepCatalogueEntry[];
  };
  readonly mappings: readonly ManagedModelAuthorFlowMapping[];
  readonly blueprints: readonly FlowBlueprint[];
}

All references

Applied examples : Prepare a quote

The Flow declares Client and Need inputs, an executable step and a bounded budget.

Configuration

Fragment placed in flowBlueprints[].composition. Properties and accepted values.

{
  "contract": "FlowComposition@1",
  "rootWorkNodeKey": "prepare-quote",
  "stateSurfaceDefinitionPath": "workspace/work/surface/preparation",
  "subflowLinkTypePath": null,
  "entryStepKey": "prepare",
  "inputs": [
    {
      "key": "client",
      "type": "surface-reference",
      "provenance": "caller",
      "minimum": 1,
      "maximum": 1
    },
    {
      "key": "need",
      "type": "text",
      "provenance": "caller",
      "minimum": 1,
      "maximum": 1
    }
  ],
  "contexts": [],
  "outputs": [],
  "steps": [
    {
      "key": "prepare",
      "kind": "task",
      "workNodeKey": "prepare",
      "actionKey": "prepare",
      "inputs": {},
      "outputs": [
        {
          "key": "proposal",
          "type": "result-reference",
          "provenance": "canonical",
          "minimum": 1,
          "maximum": 1,
          "result": "reference"
        }
      ],
      "reservedCostUnits": 1,
      "maximumAttempts": 1
    }
  ],
  "budgets": {
    "maximumDepth": 2,
    "maximumOccurrences": 20,
    "maximumConcurrency": 2,
    "maximumIterations": 3,
    "maximumDurationMilliseconds": 86400000,
    "maximumCostUnits": 100,
    "maximumStateBytes": 32000
  }
}

Variation and connection

Fragment placed in flowBlueprints[].composition.inputs. Properties and accepted values.

[
  {
    "key": "client",
    "type": "surface-reference",
    "provenance": "caller",
    "minimum": 1,
    "maximum": 1
  },
  {
    "key": "need",
    "type": "text",
    "provenance": "caller",
    "minimum": 1,
    "maximum": 1
  }
]

UI layout example

The illustrative layout below places this configuration in the Clients/Quotes app. Insert each fragment at the stated location, with Field, Query and Action references matching the Model declarations.

  1. Qualify need
  2. Prepare proposal
  3. Wait for decision
  4. Retain result
ILLUSTRATIVE LAYOUTClients / Quotes app
SurfaceClients / North StudioExample
ManagedModelFlowAuthoring · typesPrepare a quote
Clients
✓
Qualify needCompleted
✓
Prepare proposalCompleted
03
Wait for decisionDecision required
04
Retain resultUpcoming
Preparation is awaiting a decision

The proposal and its sources remain available while waiting.

Review proposal
Search for a concept, field or action.Esc