ConnectorService.PlanScan
Have the planner resolve an immutable partition plan. Copy the authorization, output prefix, budget and options from the run’s execution input. The server can stream progress before the final completed plan reference. The response example shows that final event.
ConnectorService · Connector runtime API for provider implementers. The platform calls the provider runtime using its authenticated workload transport.
POST /prokrust.connector.v1.ConnectorService/PlanScan
This RPC uses a response stream. The example shows one message. Use a streaming Connect client for the sequence.
Request fields
| JSON field | Type | Meaning |
|---|---|---|
expected | ConnectionIdentity | Full identity of the connection the caller resolved. The runtime compares it to its own identity before serving the request. |
runUid | string | UID of the run in the authorized execution input. |
planningAttemptId | string | Exact planning attempt ID already reserved for the run. |
executionInput | ArtifactRef | Reference to the trusted execution input that authorizes the attempt. |
selector | Selector | Versioned source selector frozen in the execution input. |
acceptedConsistency | list of Consistency | Consistency guarantees the platform permits. The selected view must satisfy an offered guarantee. |
budget | Budget | Budget allocated to this planning attempt. |
output | OutputScope | Exact store and prefix reserved for this attempt’s marker and plan. |
targetPartitionBytes | uint64 (explicit presence) | Preferred partition size in bytes, if supplied in the execution input. |
desiredParallelism | uint32 (explicit presence) | Preferred number of parallel tasks, if supplied in the execution input. |
projectedSourceFields | list of string | Source fields selected by the platform. Preserve the frozen projection. |
requiredSourceView | SourceView (explicit presence) | Pinned view to reproduce when supplied. Omit to resolve the current source. |
Example request
{
"expected": {
"installationNamespaceUid": "00000000-0000-4000-8000-000000000001",
"workspaceNamespaceUid": "00000000-0000-4000-8000-000000000002",
"connection": {
"apiVersion": "sources.prokrust.ai/v1beta1",
"kind": "SyntheticConnection",
"namespace": "analytics",
"name": "fixture",
"uid": "00000000-0000-4000-8000-000000000003"
},
"providerId": "prokrust.ai/synthetic",
"providerMajor": 1,
"configDigest": "sha256:b0d4913f313bf0e18b6ec2d81d84ff748bdd415a26cb32243978b22b248567bc"
},
"runUid": "00000000-0000-4000-8000-000000000008",
"planningAttemptId": "plan-1",
"executionInput": {
"store": {
"apiVersion": "platform.prokrust.ai/v1beta1",
"kind": "ArtifactStore",
"namespace": "analytics",
"name": "default",
"uid": "00000000-0000-4000-8000-000000000004"
},
"key": "control/run/input.json",
"version": "1",
"sha256": "a638227fbba3d845cff4a30bc887df733fdfa1b34c5bbe80aabde918ebceb89e",
"sizeBytes": "1024"
},
"selector": {
"schemaVersion": "v1",
"canonicalJson": "eyJkYXRhc2V0IjoiZXZlbnRzIn0="
},
"acceptedConsistency": [
"CONSISTENCY_ATOMIC_SOURCE_SNAPSHOT"
],
"budget": {
"deadline": "2026-03-10T12:02:00Z",
"maxSourceBytes": "1048576",
"maxStagedBytes": "1048576"
},
"output": {
"store": {
"apiVersion": "platform.prokrust.ai/v1beta1",
"kind": "ArtifactStore",
"namespace": "analytics",
"name": "default",
"uid": "00000000-0000-4000-8000-000000000004"
},
"prefix": "staging/run/plan/"
}
}
Response fields
| JSON field | Type | Meaning |
|---|---|---|
progress | Progress (one of event) | Intermediate progress. The plan becomes available through the completion event. |
completedPlan | ArtifactRef (one of event) | Reference to the completed immutable plan. A successful stream ends with this event. |
Example response message
{
"completedPlan": {
"store": {
"apiVersion": "platform.prokrust.ai/v1beta1",
"kind": "ArtifactStore",
"namespace": "analytics",
"name": "default",
"uid": "00000000-0000-4000-8000-000000000004"
},
"key": "staging/run/plan/plan.json",
"version": "1",
"sha256": "6100655cb2d718d6f2eebc44209024234a78d8ee49f33e9e64c93c63be7ae1f2",
"sizeBytes": "2048"
}
}