@datalayer/core 1.1.66 → 1.2.12
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 +43 -20
- package/lib/api/constants.d.ts +1 -1
- package/lib/api/constants.js +1 -1
- package/lib/api/contents/attachments.js +3 -7
- package/lib/api/contents/datasets.d.ts +48 -0
- package/lib/api/contents/datasets.js +44 -7
- package/lib/api/contents/runtimeMounts.js +1 -1
- package/lib/api/contents/sandboxUid.d.ts +13 -45
- package/lib/api/contents/sandboxUid.js +14 -65
- package/lib/api/evals/client.d.ts +402 -0
- package/lib/api/evals/client.js +359 -0
- package/lib/api/evals/index.d.ts +10 -0
- package/lib/api/evals/index.js +18 -0
- package/lib/api/evals/request.d.ts +43 -0
- package/lib/api/evals/request.js +67 -0
- package/lib/api/evals/status.d.ts +27 -0
- package/lib/api/evals/status.js +122 -0
- package/lib/api/evals/types.d.ts +1335 -0
- package/lib/api/evals/types.js +5 -0
- package/lib/api/iam/authentication.js +6 -4
- package/lib/api/iam/connectedAgents.d.ts +29 -0
- package/lib/api/iam/connectedAgents.js +35 -0
- package/lib/api/iam/healthz.js +2 -2
- package/lib/api/iam/identityProviders.d.ts +76 -0
- package/lib/api/iam/identityProviders.js +187 -0
- package/lib/api/iam/index.d.ts +1 -0
- package/lib/api/iam/index.js +1 -0
- package/lib/api/iam/mcpPolicy.d.ts +102 -1
- package/lib/api/iam/mcpPolicy.js +38 -2
- package/lib/api/iam/oauth2.js +18 -12
- package/lib/api/iam/profile.d.ts +17 -1
- package/lib/api/iam/profile.js +27 -0
- package/lib/api/iam/scimTokens.d.ts +79 -0
- package/lib/api/iam/scimTokens.js +141 -0
- package/lib/api/iam/secrets.js +10 -23
- package/lib/api/iam/trials.d.ts +38 -0
- package/lib/api/iam/trials.js +66 -0
- package/lib/api/index.d.ts +4 -0
- package/lib/api/index.js +4 -0
- package/lib/api/mcp/observability.d.ts +34 -11
- package/lib/api/mcp/observability.js +97 -59
- package/lib/api/orchestration/client.d.ts +53 -0
- package/lib/api/orchestration/client.js +105 -0
- package/lib/api/orchestration/events.d.ts +88 -0
- package/lib/api/orchestration/events.js +245 -0
- package/lib/api/orchestration/generated.d.ts +693 -0
- package/lib/api/orchestration/generated.js +687 -0
- package/lib/api/orchestration/index.d.ts +30 -0
- package/lib/api/orchestration/index.js +34 -0
- package/lib/api/orchestration/lifecycle.d.ts +39 -0
- package/lib/api/orchestration/lifecycle.js +57 -0
- package/lib/api/orchestration/measures.d.ts +55 -0
- package/lib/api/orchestration/measures.js +99 -0
- package/lib/api/otel/dashboards.d.ts +56 -0
- package/lib/api/otel/dashboards.js +50 -0
- package/lib/api/otel/index.d.ts +1 -0
- package/lib/api/otel/index.js +1 -0
- package/lib/api/otel/metrics.d.ts +16 -0
- package/lib/api/otel/metrics.js +15 -0
- package/lib/api/scheduler/client.d.ts +32 -0
- package/lib/api/scheduler/client.js +42 -0
- package/lib/api/scheduler/index.d.ts +8 -0
- package/lib/api/scheduler/index.js +16 -0
- package/lib/api/scheduler/request.d.ts +28 -0
- package/lib/api/scheduler/request.js +50 -0
- package/lib/api/scheduler/types.d.ts +88 -0
- package/lib/api/scheduler/types.js +5 -0
- package/lib/api/spacer/comments.d.ts +97 -0
- package/lib/api/spacer/comments.js +45 -0
- package/lib/api/spacer/index.d.ts +9 -0
- package/lib/api/spacer/index.js +17 -0
- package/lib/api/spacer/notebooks.d.ts +33 -0
- package/lib/api/spacer/notebooks.js +39 -0
- package/lib/api/spacer/request.d.ts +25 -0
- package/lib/api/spacer/request.js +46 -0
- package/lib/api/spacer/spaces.d.ts +68 -0
- package/lib/api/spacer/spaces.js +45 -0
- package/lib/api/utils/validation.d.ts +4 -4
- package/lib/api/utils/validation.js +10 -7
- package/lib/client/auth/strategies.js +1 -1
- package/lib/client/constants.d.ts +1 -0
- package/lib/client/constants.js +1 -0
- package/lib/client/mixins/IAMMixin.js +2 -2
- package/lib/components/animation/AnimatedText.d.ts +1 -44
- package/lib/components/animation/AnimatedText.js +6 -122
- package/lib/components/anonymous/AnonymousKeyExpired.d.ts +56 -0
- package/lib/components/anonymous/AnonymousKeyExpired.js +96 -0
- package/lib/components/anonymous/AnonymousKeyTimer.d.ts +63 -0
- package/lib/components/anonymous/AnonymousKeyTimer.js +140 -0
- package/lib/components/anonymous/index.d.ts +7 -0
- package/lib/components/anonymous/index.js +15 -0
- package/lib/components/avatars/UserAvatar.d.ts +7 -1
- package/lib/components/avatars/UserAvatar.js +15 -1
- package/lib/components/billing/BillingEntitySelect.d.ts +6 -0
- package/lib/components/billing/BillingEntitySelect.js +49 -10
- package/lib/components/billing/eligibility.d.ts +22 -0
- package/lib/components/billing/eligibility.js +27 -0
- package/lib/components/billing/index.d.ts +1 -0
- package/lib/components/billing/index.js +1 -0
- package/lib/components/checkout/StripeCheckout.d.ts +1 -1
- package/lib/components/checkout/StripeCheckout.js +1 -1
- package/lib/components/collaboration/LiveEditorCollaborators.d.ts +5 -0
- package/lib/components/collaboration/LiveEditorCollaborators.js +3 -1
- package/lib/components/display/DatalayerBox.d.ts +2 -3
- package/lib/components/display/DatalayerBox.js +1 -1
- package/lib/components/display/NavLink.js +3 -2
- package/lib/components/display/VisuallyHidden.d.ts +1 -2
- package/lib/components/labels/StatusLabels.d.ts +2 -10
- package/lib/components/labels/StatusLabels.js +2 -26
- package/lib/components/principal/PrincipalAppearance.d.ts +21 -42
- package/lib/components/principal/PrincipalAppearance.js +232 -174
- package/lib/components/principal/PrincipalAvatar.d.ts +8 -1
- package/lib/components/principal/PrincipalAvatar.js +2 -2
- package/lib/components/principal/PrincipalDetailsOverlay.d.ts +8 -1
- package/lib/components/principal/PrincipalDetailsOverlay.js +2 -2
- package/lib/components/screencapture/Screencapture.js +46 -3
- package/lib/components/sharing/ShareAccessComponent.d.ts +45 -4
- package/lib/components/sharing/ShareAccessComponent.js +110 -78
- package/lib/components/sharing/SharingEditor.d.ts +5 -1
- package/lib/components/sharing/SharingEditor.js +9 -4
- package/lib/components/sharing/index.d.ts +1 -0
- package/lib/components/sharing/index.js +1 -0
- package/lib/components/sharing/sandboxSharing.d.ts +26 -0
- package/lib/components/sharing/sandboxSharing.js +47 -0
- package/lib/components/spaces/SpaceDetailsOverlay.d.ts +39 -0
- package/lib/components/spaces/SpaceDetailsOverlay.js +80 -0
- package/lib/components/spaces/SpaceDisplay.d.ts +38 -0
- package/lib/components/spaces/SpaceDisplay.js +92 -0
- package/lib/components/spaces/index.d.ts +4 -0
- package/lib/components/spaces/index.js +7 -0
- package/lib/components/spaces/spaceDisplayModel.d.ts +93 -0
- package/lib/components/spaces/spaceDisplayModel.js +170 -0
- package/lib/config/Configuration.d.ts +4 -4
- package/lib/config/Configuration.js +7 -7
- package/lib/config/index.d.ts +1 -0
- package/lib/config/index.js +1 -0
- package/lib/config/planes.d.ts +45 -0
- package/lib/config/planes.js +53 -0
- package/lib/hooks/cacheConverters.d.ts +0 -7
- package/lib/hooks/cacheConverters.js +0 -25
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/index.js +1 -0
- package/lib/hooks/useBackdrop.d.ts +4 -5
- package/lib/hooks/useBillingEntityStore.js +3 -0
- package/lib/hooks/useCache.d.ts +197 -44
- package/lib/hooks/useCache.js +1586 -494
- package/lib/hooks/useContents.d.ts +22 -1
- package/lib/hooks/useContents.js +90 -21
- package/lib/hooks/useMcp.d.ts +87 -1
- package/lib/hooks/useMcp.js +248 -13
- package/lib/hooks/useNavigate.d.ts +41 -3
- package/lib/hooks/useNavigate.js +116 -52
- package/lib/hooks/usePrincipalCacheStore.js +3 -0
- package/lib/hooks/usePrincipalStore.js +3 -0
- package/lib/hooks/useSpaceCacheStore.d.ts +50 -0
- package/lib/hooks/useSpaceCacheStore.js +85 -0
- package/lib/hooks/useWindowSize.js +1 -1
- package/lib/models/CreditsDTO.d.ts +6 -5
- package/lib/models/CreditsDTO.js +7 -5
- package/lib/models/IAMProvidersSpecs.d.ts +10 -5
- package/lib/models/IAMProvidersSpecs.js +0 -23
- package/lib/models/McpBinding.d.ts +6 -0
- package/lib/models/Organization.d.ts +69 -0
- package/lib/models/Organization.js +96 -0
- package/lib/models/Secret.d.ts +1 -2
- package/lib/models/Secret.js +2 -18
- package/lib/models/StartedBy.d.ts +34 -0
- package/lib/models/StartedBy.js +36 -0
- package/lib/models/Team.d.ts +2 -0
- package/lib/models/Team.js +2 -0
- package/lib/models/User.d.ts +4 -0
- package/lib/models/User.js +3 -0
- package/lib/models/UserSettings.d.ts +13 -0
- package/lib/models/UserSettings.js +9 -0
- package/lib/models/contents/__fixtures__/v1-contracts.json +158 -30
- package/lib/navigation/adapters/react-router.d.ts +1 -1
- package/lib/navigation/adapters/react-router.js +3 -0
- package/lib/navigation/components.js +2 -3
- package/lib/routes/publicPaths.js +4 -0
- package/lib/state/index.d.ts +1 -0
- package/lib/state/index.js +1 -0
- package/lib/state/sessionEnd.d.ts +55 -0
- package/lib/state/sessionEnd.js +162 -0
- package/lib/state/substates/CoreState.js +3 -16
- package/lib/state/substates/IAMState.d.ts +3 -3
- package/lib/state/substates/IAMState.js +7 -0
- package/lib/state/substates/LayoutState.js +12 -0
- package/lib/state/substates/NavigationState.d.ts +82 -0
- package/lib/state/substates/NavigationState.js +255 -0
- package/lib/state/substates/ProfileState.d.ts +1 -0
- package/lib/state/substates/ProfileState.js +1 -0
- package/lib/state/substates/index.d.ts +1 -0
- package/lib/state/substates/index.js +1 -0
- package/lib/utils/Lazy.d.ts +20 -0
- package/lib/utils/Lazy.js +32 -6
- package/lib/utils/Screencapture.d.ts +15 -0
- package/lib/utils/Screencapture.js +26 -20
- package/lib/utils/WithSuspense.d.ts +11 -1
- package/lib/utils/WithSuspense.js +11 -1
- package/lib/views/mcp/AdmittedClients.d.ts +44 -0
- package/lib/views/mcp/AdmittedClients.js +59 -0
- package/lib/views/mcp/ApprovalQueue.d.ts +66 -0
- package/lib/views/mcp/ApprovalQueue.js +95 -0
- package/lib/views/mcp/ConnectedAgents.js +38 -3
- package/lib/views/mcp/EnterpriseConsole.d.ts +1 -1
- package/lib/views/mcp/EnterpriseConsole.js +23 -1
- package/lib/views/mcp/IdentityProviders.d.ts +33 -0
- package/lib/views/mcp/IdentityProviders.js +299 -0
- package/lib/views/mcp/McpDashboard.js +90 -7
- package/lib/views/mcp/McpHome.js +1 -1
- package/lib/views/mcp/McpObservability.d.ts +30 -1
- package/lib/views/mcp/McpObservability.js +105 -19
- package/lib/views/mcp/NotebookRuns.d.ts +39 -0
- package/lib/views/mcp/NotebookRuns.js +44 -0
- package/lib/views/mcp/OrganizationPolicy.js +2 -1
- package/lib/views/mcp/PersonalPolicy.js +2 -1
- package/lib/views/mcp/PolicyForm.d.ts +17 -1
- package/lib/views/mcp/PolicyForm.js +25 -3
- package/lib/views/mcp/PolicyHistory.d.ts +13 -0
- package/lib/views/mcp/PolicyHistory.js +14 -1
- package/lib/views/mcp/RunDetail.d.ts +87 -0
- package/lib/views/mcp/RunDetail.js +186 -0
- package/lib/views/mcp/ScimProvisioning.d.ts +54 -0
- package/lib/views/mcp/ScimProvisioning.js +173 -0
- package/lib/views/mcp/TeamPolicies.js +66 -5
- package/lib/views/mcp/ToolAccess.d.ts +60 -0
- package/lib/views/mcp/ToolAccess.js +101 -0
- package/lib/views/mcp/TraceTimeline.d.ts +81 -0
- package/lib/views/mcp/TraceTimeline.js +132 -0
- package/lib/views/mcp/index.d.ts +5 -0
- package/lib/views/mcp/index.js +5 -0
- package/lib/views/otel/simpleAuthStore.js +3 -0
- package/lib/views/secrets/SecretEdit.js +3 -2
- package/lib/views/secrets/SecretNew.js +5 -1
- package/package.json +271 -264
- package/scripts/generate-mcp-types.py +16 -10
- package/scripts/generate-orchestration-types.py +920 -0
|
@@ -0,0 +1,693 @@
|
|
|
1
|
+
/** One milestone reached, reported by the endpoint or by the worker. */
|
|
2
|
+
export interface Acknowledgement {
|
|
3
|
+
kind: AcknowledgementKind;
|
|
4
|
+
executionId: string;
|
|
5
|
+
attemptId?: string | null;
|
|
6
|
+
command?: CommandName | null;
|
|
7
|
+
idempotencyKey?: string | null;
|
|
8
|
+
/** When it was reached. */
|
|
9
|
+
acknowledgedAt: string;
|
|
10
|
+
/** Set on 'checkpointed'; what a resume names. */
|
|
11
|
+
checkpointId?: string | null;
|
|
12
|
+
detail?: string | null;
|
|
13
|
+
}
|
|
14
|
+
/** The five milestones of section 6.3, in the order they are reached. */
|
|
15
|
+
export type AcknowledgementKind = 'received' | 'accepted' | 'started' | 'checkpointed' | 'completed';
|
|
16
|
+
/** What a caller must present to be let in. */
|
|
17
|
+
export interface AgentAuthentication {
|
|
18
|
+
/** bearer, oauth2 or none, as the agent card names them. */
|
|
19
|
+
schemes?: Array<string>;
|
|
20
|
+
audience?: string | null;
|
|
21
|
+
scopes?: Array<string>;
|
|
22
|
+
}
|
|
23
|
+
/** Which worker an execution is bound to, and how it is reached. */
|
|
24
|
+
export interface AgentBinding {
|
|
25
|
+
agentId: string;
|
|
26
|
+
capability: string;
|
|
27
|
+
protocol: AgentProtocol;
|
|
28
|
+
endpoint?: string | null;
|
|
29
|
+
sessionId?: string | null;
|
|
30
|
+
}
|
|
31
|
+
/** A descriptor written out as an A2A agent card, and what A2A cannot hold. */
|
|
32
|
+
export interface AgentCardMapping {
|
|
33
|
+
/** The agent card, as it is served. */
|
|
34
|
+
card: Record<string, unknown>;
|
|
35
|
+
gaps?: Array<MappingGap>;
|
|
36
|
+
}
|
|
37
|
+
/** One worker, described the same way whatever it speaks. */
|
|
38
|
+
export interface AgentDescriptor {
|
|
39
|
+
agentId: string;
|
|
40
|
+
name: string;
|
|
41
|
+
description?: string;
|
|
42
|
+
version?: string;
|
|
43
|
+
skills?: Array<AgentSkill>;
|
|
44
|
+
capabilities?: Array<string>;
|
|
45
|
+
endpoints?: Array<ProtocolEndpoint>;
|
|
46
|
+
inputContentTypes?: Array<string>;
|
|
47
|
+
outputContentTypes?: Array<string>;
|
|
48
|
+
supportedOperations?: Array<WorkerOperation>;
|
|
49
|
+
authentication?: AgentAuthentication;
|
|
50
|
+
dataClassifications?: Array<DataClassification>;
|
|
51
|
+
trustLevel?: TrustLevel;
|
|
52
|
+
runtime?: RuntimeRequirements;
|
|
53
|
+
cost?: CostHint;
|
|
54
|
+
latency?: LatencyHint;
|
|
55
|
+
availability?: Availability;
|
|
56
|
+
}
|
|
57
|
+
/** How the control plane speaks to a worker. */
|
|
58
|
+
export type AgentProtocol = 'a2a' | 'acp' | 'datalayer';
|
|
59
|
+
/** One thing a worker can do, in the shape an A2A agent card gives it. */
|
|
60
|
+
export interface AgentSkill {
|
|
61
|
+
id: string;
|
|
62
|
+
name: string;
|
|
63
|
+
description?: string;
|
|
64
|
+
tags?: Array<string>;
|
|
65
|
+
examples?: Array<string>;
|
|
66
|
+
}
|
|
67
|
+
/** Attach to an agent or a session that is already there. */
|
|
68
|
+
export interface AgentsAttach {
|
|
69
|
+
command?: 'agents.attach';
|
|
70
|
+
/** From the caller, for acceptance latency. */
|
|
71
|
+
issuedAt?: string | null;
|
|
72
|
+
/** The W3C context of the caller, so the tree is one trace. */
|
|
73
|
+
traceparent?: string | null;
|
|
74
|
+
idempotencyKey: string;
|
|
75
|
+
agentId: string;
|
|
76
|
+
protocol: AgentProtocol;
|
|
77
|
+
endpoint?: string | null;
|
|
78
|
+
/** An existing protocol session to load rather than open. */
|
|
79
|
+
sessionId?: string | null;
|
|
80
|
+
}
|
|
81
|
+
/** Provision or launch a worker. */
|
|
82
|
+
export interface AgentsCreate {
|
|
83
|
+
command?: 'agents.create';
|
|
84
|
+
/** From the caller, for acceptance latency. */
|
|
85
|
+
issuedAt?: string | null;
|
|
86
|
+
/** The W3C context of the caller, so the tree is one trace. */
|
|
87
|
+
traceparent?: string | null;
|
|
88
|
+
idempotencyKey: string;
|
|
89
|
+
/** The descriptor to bring up. */
|
|
90
|
+
agentId: string;
|
|
91
|
+
protocol: AgentProtocol;
|
|
92
|
+
runtime?: RuntimeRequirements;
|
|
93
|
+
/** The execution the worker is brought up for: its compute draws on that execution tree's credits (O1-07). */
|
|
94
|
+
executionId?: string | null;
|
|
95
|
+
}
|
|
96
|
+
/** Find workers matching capabilities and constraints. */
|
|
97
|
+
export interface AgentsDiscover {
|
|
98
|
+
command?: 'agents.discover';
|
|
99
|
+
/** From the caller, for acceptance latency. */
|
|
100
|
+
issuedAt?: string | null;
|
|
101
|
+
/** The W3C context of the caller, so the tree is one trace. */
|
|
102
|
+
traceparent?: string | null;
|
|
103
|
+
capabilities?: Array<string>;
|
|
104
|
+
protocols?: Array<AgentProtocol>;
|
|
105
|
+
/** Only workers supporting all of these are returned. */
|
|
106
|
+
operations?: Array<WorkerOperation>;
|
|
107
|
+
dataClassification?: DataClassification | null;
|
|
108
|
+
minimumTrustLevel?: TrustLevel | null;
|
|
109
|
+
region?: string | null;
|
|
110
|
+
limit?: number;
|
|
111
|
+
}
|
|
112
|
+
/** One registered output of an execution. */
|
|
113
|
+
export interface Artifact {
|
|
114
|
+
artifactId: string;
|
|
115
|
+
type: ArtifactType;
|
|
116
|
+
name: string;
|
|
117
|
+
/** datalayer:<kind>/<uid>@<version> once committed; absent while the artifact is only registered against the execution. */
|
|
118
|
+
reference?: string | null;
|
|
119
|
+
mediaType?: string | null;
|
|
120
|
+
sizeBytes?: number | null;
|
|
121
|
+
status?: ArtifactStatus;
|
|
122
|
+
/** The attempt whose commit made this the execution's result. A record carrying two provenances cannot say it any other way. */
|
|
123
|
+
committedBy?: string | null;
|
|
124
|
+
/** The artifact that won the commit, when this one lost it. */
|
|
125
|
+
supersededBy?: string | null;
|
|
126
|
+
provenance?: Array<ArtifactProvenance>;
|
|
127
|
+
summary?: string | null;
|
|
128
|
+
}
|
|
129
|
+
/** What one attempt's commit did to an execution's artifacts (O0-10). */
|
|
130
|
+
export interface ArtifactCommit {
|
|
131
|
+
executionId: string;
|
|
132
|
+
/** The attempt asking to commit. */
|
|
133
|
+
attemptId: string;
|
|
134
|
+
/** The attempt whose artifacts are the execution's result. */
|
|
135
|
+
winningAttemptId: string;
|
|
136
|
+
won: boolean;
|
|
137
|
+
artifacts?: Array<Artifact>;
|
|
138
|
+
}
|
|
139
|
+
/** Who produced this artifact, from what, and when. */
|
|
140
|
+
export interface ArtifactProvenance {
|
|
141
|
+
executionId: string;
|
|
142
|
+
attemptId: string;
|
|
143
|
+
agentId: string;
|
|
144
|
+
/** From the control plane's clock. */
|
|
145
|
+
producedAt: string;
|
|
146
|
+
/** The context URIs the attempt was given to produce it. */
|
|
147
|
+
sourceReferences?: Array<string>;
|
|
148
|
+
contentHash?: string | null;
|
|
149
|
+
traceId?: string | null;
|
|
150
|
+
}
|
|
151
|
+
/** Where an artifact stands against the commit rule of 19.8. */
|
|
152
|
+
export type ArtifactStatus = 'registered' | 'committed' | 'superseded';
|
|
153
|
+
/** What an artifact is, from the nine kinds of section 5.4. */
|
|
154
|
+
export type ArtifactType = 'notebook' | 'report' | 'dataset' | 'cell-output' | 'file' | 'evaluation' | 'execution-log' | 'sandbox-snapshot' | 'json';
|
|
155
|
+
/** One dispatch of an execution to a worker (section 6.4). */
|
|
156
|
+
export interface Attempt {
|
|
157
|
+
attemptId: string;
|
|
158
|
+
executionId: string;
|
|
159
|
+
/** 1 for the first dispatch, then upwards. */
|
|
160
|
+
number: number;
|
|
161
|
+
agentId: string;
|
|
162
|
+
protocol: AgentProtocol;
|
|
163
|
+
sessionId?: string | null;
|
|
164
|
+
/** The A2A task or ACP prompt this attempt became. */
|
|
165
|
+
protocolTaskId?: string | null;
|
|
166
|
+
/** The checkpoint this attempt resumes from, when executions.resume sent it: its delegation names the checkpoint to a worker that speaks the orchestration extension. */
|
|
167
|
+
resumedFrom?: string | null;
|
|
168
|
+
state?: ExecutionState;
|
|
169
|
+
startedAt?: string | null;
|
|
170
|
+
endedAt?: string | null;
|
|
171
|
+
leaseExpiresAt?: string | null;
|
|
172
|
+
error?: OrchestrationError | null;
|
|
173
|
+
/** What the attempt spent, as its worker reported it when the attempt ended. */
|
|
174
|
+
usage?: Usage | null;
|
|
175
|
+
}
|
|
176
|
+
/** How much of the worker there is. */
|
|
177
|
+
export interface Availability {
|
|
178
|
+
maxConcurrentExecutions?: number | null;
|
|
179
|
+
queueDepth?: number | null;
|
|
180
|
+
available?: boolean;
|
|
181
|
+
}
|
|
182
|
+
/** What the execution may spend. */
|
|
183
|
+
export interface Budget {
|
|
184
|
+
inputTokens?: number | null;
|
|
185
|
+
outputTokens?: number | null;
|
|
186
|
+
cost?: number | null;
|
|
187
|
+
currency?: string;
|
|
188
|
+
wallClockSeconds?: number | null;
|
|
189
|
+
/** Platform credits the tree's compute may consume, held by IAM in one reservation for the whole tree (O1-07). Set on the root: the tree's executions draw on it, and none sets its own. */
|
|
190
|
+
credits?: number | null;
|
|
191
|
+
/** How many executions the subtree below this one may create. */
|
|
192
|
+
executions?: number | null;
|
|
193
|
+
}
|
|
194
|
+
/** The executions `executions.cancel` stopped. */
|
|
195
|
+
export interface CancelAnswer {
|
|
196
|
+
acknowledgement: Acknowledgement;
|
|
197
|
+
cancelledExecutionIds?: Array<string>;
|
|
198
|
+
/** Whether the execution's workflow was told. Told is not accepted. */
|
|
199
|
+
delivered: boolean;
|
|
200
|
+
detail?: string | null;
|
|
201
|
+
execution: Execution;
|
|
202
|
+
success?: boolean;
|
|
203
|
+
}
|
|
204
|
+
/** The artifacts registered against an execution, and its children's. */
|
|
205
|
+
export interface CollectAnswer {
|
|
206
|
+
artifacts: Array<Artifact>;
|
|
207
|
+
/** Every attempt of the execution and of the children collected with it, each execution's in order: what a tree draws each node's spend and elapsed time from (O2-10). */
|
|
208
|
+
attempts?: Array<Attempt>;
|
|
209
|
+
children?: Array<Execution>;
|
|
210
|
+
execution: Execution;
|
|
211
|
+
success?: boolean;
|
|
212
|
+
}
|
|
213
|
+
/** What every command carries, whatever it asks for. */
|
|
214
|
+
export interface Command {
|
|
215
|
+
command: CommandName;
|
|
216
|
+
/** From the caller, for acceptance latency. */
|
|
217
|
+
issuedAt?: string | null;
|
|
218
|
+
/** The W3C context of the caller, so the tree is one trace. */
|
|
219
|
+
traceparent?: string | null;
|
|
220
|
+
}
|
|
221
|
+
/** A request to a worker, received: steer, pause, resume, checkpoint, terminate. */
|
|
222
|
+
export interface CommandAnswer {
|
|
223
|
+
acknowledgement: Acknowledgement;
|
|
224
|
+
/** Whether the execution's workflow was told. Told is not accepted. */
|
|
225
|
+
delivered: boolean;
|
|
226
|
+
detail?: string | null;
|
|
227
|
+
execution: Execution;
|
|
228
|
+
success?: boolean;
|
|
229
|
+
}
|
|
230
|
+
/** The twelve commands of section 6.2. */
|
|
231
|
+
export type CommandName = 'agents.discover' | 'agents.create' | 'agents.attach' | 'executions.delegate' | 'executions.steer' | 'executions.pause' | 'executions.resume' | 'executions.cancel' | 'executions.checkpoint' | 'executions.collect' | 'executions.terminate' | 'executions.subscribe';
|
|
232
|
+
/** Whether a worker may only read the reference, or also write it. */
|
|
233
|
+
export type ContextAccess = 'read-only' | 'writable';
|
|
234
|
+
/** What a context reference points at. */
|
|
235
|
+
export type ContextKind = 'notebook' | 'document' | 'cell' | 'dataset' | 'artifact' | 'sandbox' | 'snapshot' | 'file' | 'execution';
|
|
236
|
+
/** Everything one execution may reach, and for how long. */
|
|
237
|
+
export interface ContextManifest {
|
|
238
|
+
references?: Array<ContextReference>;
|
|
239
|
+
/** The IAM scope the per-execution credential is narrowed to. */
|
|
240
|
+
scope?: string | null;
|
|
241
|
+
/** Access ends here even if the execution has not. */
|
|
242
|
+
expiresAt?: string | null;
|
|
243
|
+
}
|
|
244
|
+
/** Whether the reference is frozen at a version, or the live document. */
|
|
245
|
+
export type ContextMaterialization = 'snapshot' | 'live';
|
|
246
|
+
/** One thing a worker is given, and what it may do with it. */
|
|
247
|
+
export interface ContextReference {
|
|
248
|
+
uri: string;
|
|
249
|
+
access?: ContextAccess;
|
|
250
|
+
required?: boolean;
|
|
251
|
+
materialization?: ContextMaterialization;
|
|
252
|
+
sharing?: ContextSharing;
|
|
253
|
+
description?: string | null;
|
|
254
|
+
}
|
|
255
|
+
/** Who else in the execution tree sees the reference. */
|
|
256
|
+
export type ContextSharing = 'private' | 'tree';
|
|
257
|
+
/** What the worker is expected to cost, for scheduling, never for billing. */
|
|
258
|
+
export interface CostHint {
|
|
259
|
+
currency?: string;
|
|
260
|
+
perExecution?: number | null;
|
|
261
|
+
perInputToken?: number | null;
|
|
262
|
+
perOutputToken?: number | null;
|
|
263
|
+
}
|
|
264
|
+
/** The sensitivity of the data an execution may touch. */
|
|
265
|
+
export type DataClassification = 'public' | 'internal' | 'confidential' | 'restricted';
|
|
266
|
+
/** The execution `executions.delegate` created, or found under its key. */
|
|
267
|
+
export interface DelegateAnswer {
|
|
268
|
+
acknowledgement: Acknowledgement;
|
|
269
|
+
detail?: string | null;
|
|
270
|
+
/** Whether the durable service took the execution. False leaves it created, and detail says why. */
|
|
271
|
+
dispatched: boolean;
|
|
272
|
+
execution: Execution;
|
|
273
|
+
success?: boolean;
|
|
274
|
+
}
|
|
275
|
+
/** The bounds a tree is created under, defaulted to 19.8's decision. */
|
|
276
|
+
export interface DelegationLimits {
|
|
277
|
+
maxDepth?: number;
|
|
278
|
+
maxChildrenPerParent?: number;
|
|
279
|
+
maxExecutionsPerTree?: number;
|
|
280
|
+
}
|
|
281
|
+
/** A descriptor read from a foreign document, and what was lost on the way. */
|
|
282
|
+
export interface DescriptorMapping {
|
|
283
|
+
source: DescriptorSource;
|
|
284
|
+
descriptor: AgentDescriptor;
|
|
285
|
+
gaps?: Array<MappingGap>;
|
|
286
|
+
}
|
|
287
|
+
/** Which document a descriptor was read from. */
|
|
288
|
+
export type DescriptorSource = 'a2a-agent-card' | 'acp-agent-entry' | 'datalayer-agentspec';
|
|
289
|
+
/** The workers `agents.discover` found. */
|
|
290
|
+
export interface DiscoverAnswer {
|
|
291
|
+
agents: Array<AgentDescriptor>;
|
|
292
|
+
success?: boolean;
|
|
293
|
+
}
|
|
294
|
+
/** Why an execution, an attempt or a command did not do what was asked. */
|
|
295
|
+
export type ErrorCode = 'worker_rejected' | 'worker_unreachable' | 'lease_expired' | 'unsupported_operation' | 'invalid_transition' | 'invalid_command' | 'conflict' | 'not_found' | 'permission_denied' | 'context_unavailable' | 'context_expired' | 'budget_exhausted' | 'deadline_exceeded' | 'depth_exceeded' | 'fan_out_exceeded' | 'approval_denied' | 'approval_timed_out' | 'internal';
|
|
296
|
+
/** One durable unit of delegated work. */
|
|
297
|
+
export interface Execution {
|
|
298
|
+
executionId: string;
|
|
299
|
+
parentExecutionId?: string | null;
|
|
300
|
+
rootExecutionId: string;
|
|
301
|
+
/** 0 at the root, checked against limits. */
|
|
302
|
+
depth?: number;
|
|
303
|
+
status?: ExecutionState;
|
|
304
|
+
statusMessage?: string | null;
|
|
305
|
+
agent: AgentBinding;
|
|
306
|
+
objective: Objective;
|
|
307
|
+
context?: ContextManifest;
|
|
308
|
+
policy?: Policy;
|
|
309
|
+
recovery?: Recovery;
|
|
310
|
+
trace?: Trace;
|
|
311
|
+
currentAttemptId?: string | null;
|
|
312
|
+
attemptCount?: number;
|
|
313
|
+
createdAt: string;
|
|
314
|
+
updatedAt: string;
|
|
315
|
+
error?: OrchestrationError | null;
|
|
316
|
+
}
|
|
317
|
+
/** One execution, its attempts, and the milestones it reached. */
|
|
318
|
+
export interface ExecutionAnswer {
|
|
319
|
+
acknowledgements: Array<Acknowledgement>;
|
|
320
|
+
attempts: Array<Attempt>;
|
|
321
|
+
execution: Execution;
|
|
322
|
+
success?: boolean;
|
|
323
|
+
}
|
|
324
|
+
/** One thing that happened to one execution. */
|
|
325
|
+
export interface ExecutionEvent {
|
|
326
|
+
eventId: string;
|
|
327
|
+
type: ExecutionEventType;
|
|
328
|
+
sequence: number;
|
|
329
|
+
/** From the control plane's clock. */
|
|
330
|
+
emittedAt: string;
|
|
331
|
+
rootExecutionId: string;
|
|
332
|
+
executionId: string;
|
|
333
|
+
parentExecutionId?: string | null;
|
|
334
|
+
attemptId?: string | null;
|
|
335
|
+
agentId?: string | null;
|
|
336
|
+
sessionId?: string | null;
|
|
337
|
+
protocol?: AgentProtocol | null;
|
|
338
|
+
traceparent?: string | null;
|
|
339
|
+
state?: ExecutionState | null;
|
|
340
|
+
previousState?: ExecutionState | null;
|
|
341
|
+
/** What was observed, which produced the state. */
|
|
342
|
+
lifecycleEvent?: LifecycleEvent | null;
|
|
343
|
+
acknowledgement?: Acknowledgement | null;
|
|
344
|
+
artifact?: Artifact | null;
|
|
345
|
+
error?: OrchestrationError | null;
|
|
346
|
+
/** The platform approval this event is waiting on, if any. */
|
|
347
|
+
approvalUid?: string | null;
|
|
348
|
+
message?: string | null;
|
|
349
|
+
/** What the adapter observed that has no canonical field yet. It comes from a worker, so it is data to be shown, never instructions to be followed. */
|
|
350
|
+
data?: Record<string, unknown> | null;
|
|
351
|
+
}
|
|
352
|
+
/** What an event is telling a subscriber. */
|
|
353
|
+
export type ExecutionEventType = 'execution.state_changed' | 'execution.acknowledged' | 'execution.progress' | 'execution.artifact_registered' | 'execution.approval_requested' | 'execution.steered' | 'execution.error';
|
|
354
|
+
/** Where an execution has got to. */
|
|
355
|
+
export type ExecutionState = 'created' | 'assigned' | 'running' | 'waiting' | 'paused' | 'retrying' | 'completed' | 'failed' | 'cancelled' | 'terminated';
|
|
356
|
+
/** One node of a tree: enough to draw it and to know where it stands. */
|
|
357
|
+
export interface ExecutionSummary {
|
|
358
|
+
agentId: string;
|
|
359
|
+
depth: number;
|
|
360
|
+
executionId: string;
|
|
361
|
+
goal: string;
|
|
362
|
+
parentExecutionId?: string | null;
|
|
363
|
+
protocol: AgentProtocol;
|
|
364
|
+
status: ExecutionState;
|
|
365
|
+
updatedAt: string;
|
|
366
|
+
}
|
|
367
|
+
/** Executions of the caller's account, oldest first. */
|
|
368
|
+
export interface ExecutionsAnswer {
|
|
369
|
+
executions: Array<Execution>;
|
|
370
|
+
success?: boolean;
|
|
371
|
+
}
|
|
372
|
+
/** Stop the work without deleting its history. */
|
|
373
|
+
export interface ExecutionsCancel {
|
|
374
|
+
command?: 'executions.cancel';
|
|
375
|
+
/** From the caller, for acceptance latency. */
|
|
376
|
+
issuedAt?: string | null;
|
|
377
|
+
/** The W3C context of the caller, so the tree is one trace. */
|
|
378
|
+
traceparent?: string | null;
|
|
379
|
+
idempotencyKey: string;
|
|
380
|
+
executionId: string;
|
|
381
|
+
reason?: string | null;
|
|
382
|
+
/** Cancel the executions below this one too. */
|
|
383
|
+
cascade?: boolean;
|
|
384
|
+
}
|
|
385
|
+
/** Persist recoverable state. */
|
|
386
|
+
export interface ExecutionsCheckpoint {
|
|
387
|
+
command?: 'executions.checkpoint';
|
|
388
|
+
/** From the caller, for acceptance latency. */
|
|
389
|
+
issuedAt?: string | null;
|
|
390
|
+
/** The W3C context of the caller, so the tree is one trace. */
|
|
391
|
+
traceparent?: string | null;
|
|
392
|
+
idempotencyKey: string;
|
|
393
|
+
executionId: string;
|
|
394
|
+
label?: string | null;
|
|
395
|
+
}
|
|
396
|
+
/** Retrieve the registered results and artifacts. */
|
|
397
|
+
export interface ExecutionsCollect {
|
|
398
|
+
command?: 'executions.collect';
|
|
399
|
+
/** From the caller, for acceptance latency. */
|
|
400
|
+
issuedAt?: string | null;
|
|
401
|
+
/** The W3C context of the caller, so the tree is one trace. */
|
|
402
|
+
traceparent?: string | null;
|
|
403
|
+
executionId: string;
|
|
404
|
+
includeChildren?: boolean;
|
|
405
|
+
artifactTypes?: Array<ArtifactType>;
|
|
406
|
+
}
|
|
407
|
+
/** Assign an objective and a context to a worker. */
|
|
408
|
+
export interface ExecutionsDelegate {
|
|
409
|
+
command?: 'executions.delegate';
|
|
410
|
+
/** From the caller, for acceptance latency. */
|
|
411
|
+
issuedAt?: string | null;
|
|
412
|
+
/** The W3C context of the caller, so the tree is one trace. */
|
|
413
|
+
traceparent?: string | null;
|
|
414
|
+
idempotencyKey: string;
|
|
415
|
+
parentExecutionId?: string | null;
|
|
416
|
+
/** A child's place under its parent, named by the parent; only a child has one. */
|
|
417
|
+
slot?: string | null;
|
|
418
|
+
agent: AgentBinding;
|
|
419
|
+
objective: Objective;
|
|
420
|
+
context?: ContextManifest;
|
|
421
|
+
policy?: Policy;
|
|
422
|
+
recovery?: Recovery;
|
|
423
|
+
trace?: Trace;
|
|
424
|
+
}
|
|
425
|
+
/** Request a recoverable pause. */
|
|
426
|
+
export interface ExecutionsPause {
|
|
427
|
+
command?: 'executions.pause';
|
|
428
|
+
/** From the caller, for acceptance latency. */
|
|
429
|
+
issuedAt?: string | null;
|
|
430
|
+
/** The W3C context of the caller, so the tree is one trace. */
|
|
431
|
+
traceparent?: string | null;
|
|
432
|
+
idempotencyKey: string;
|
|
433
|
+
executionId: string;
|
|
434
|
+
reason?: string | null;
|
|
435
|
+
}
|
|
436
|
+
/** Resume from the current state, or from a checkpoint. */
|
|
437
|
+
export interface ExecutionsResume {
|
|
438
|
+
command?: 'executions.resume';
|
|
439
|
+
/** From the caller, for acceptance latency. */
|
|
440
|
+
issuedAt?: string | null;
|
|
441
|
+
/** The W3C context of the caller, so the tree is one trace. */
|
|
442
|
+
traceparent?: string | null;
|
|
443
|
+
idempotencyKey: string;
|
|
444
|
+
executionId: string;
|
|
445
|
+
checkpointId?: string | null;
|
|
446
|
+
}
|
|
447
|
+
/** Add instructions, and possibly context, while the work is active. */
|
|
448
|
+
export interface ExecutionsSteer {
|
|
449
|
+
command?: 'executions.steer';
|
|
450
|
+
/** From the caller, for acceptance latency. */
|
|
451
|
+
issuedAt?: string | null;
|
|
452
|
+
/** The W3C context of the caller, so the tree is one trace. */
|
|
453
|
+
traceparent?: string | null;
|
|
454
|
+
idempotencyKey: string;
|
|
455
|
+
executionId: string;
|
|
456
|
+
instructions: string;
|
|
457
|
+
references?: Array<ContextReference>;
|
|
458
|
+
}
|
|
459
|
+
/** Stream canonical events and state changes. */
|
|
460
|
+
export interface ExecutionsSubscribe {
|
|
461
|
+
command?: 'executions.subscribe';
|
|
462
|
+
/** From the caller, for acceptance latency. */
|
|
463
|
+
issuedAt?: string | null;
|
|
464
|
+
/** The W3C context of the caller, so the tree is one trace. */
|
|
465
|
+
traceparent?: string | null;
|
|
466
|
+
executionId: string;
|
|
467
|
+
includeChildren?: boolean;
|
|
468
|
+
/** Replay from this event onwards, so a reconnect loses nothing. */
|
|
469
|
+
fromSequence?: number | null;
|
|
470
|
+
/** Only these lifecycle events; empty means every event. */
|
|
471
|
+
events?: Array<LifecycleEvent>;
|
|
472
|
+
}
|
|
473
|
+
/** Release the worker or session, where that is permitted. */
|
|
474
|
+
export interface ExecutionsTerminate {
|
|
475
|
+
command?: 'executions.terminate';
|
|
476
|
+
/** From the caller, for acceptance latency. */
|
|
477
|
+
issuedAt?: string | null;
|
|
478
|
+
/** The W3C context of the caller, so the tree is one trace. */
|
|
479
|
+
traceparent?: string | null;
|
|
480
|
+
idempotencyKey: string;
|
|
481
|
+
executionId: string;
|
|
482
|
+
releaseWorker?: boolean;
|
|
483
|
+
reason?: string | null;
|
|
484
|
+
}
|
|
485
|
+
/** How long the worker is expected to take, in milliseconds. */
|
|
486
|
+
export interface LatencyHint {
|
|
487
|
+
acceptanceP50Ms?: number | null;
|
|
488
|
+
completionP50Ms?: number | null;
|
|
489
|
+
completionP95Ms?: number | null;
|
|
490
|
+
}
|
|
491
|
+
/** What is observed or commanded, which may move an execution. */
|
|
492
|
+
export type LifecycleEvent = 'assign' | 'start' | 'wait' | 'pause' | 'resume' | 'retry' | 'complete' | 'fail' | 'cancel' | 'terminate';
|
|
493
|
+
/** A manifest held against what the platform actually has (O0-09). */
|
|
494
|
+
export interface ManifestResolution {
|
|
495
|
+
references?: Array<ReferenceResolution>;
|
|
496
|
+
usable?: boolean;
|
|
497
|
+
errors?: Array<OrchestrationError>;
|
|
498
|
+
}
|
|
499
|
+
/** One thing a mapping could not carry, and why (O0-08). */
|
|
500
|
+
export interface MappingGap {
|
|
501
|
+
field: string;
|
|
502
|
+
reason: string;
|
|
503
|
+
}
|
|
504
|
+
/** A command that changes something, and so must be safe to deliver twice. */
|
|
505
|
+
export interface MutatingCommand {
|
|
506
|
+
command: CommandName;
|
|
507
|
+
/** From the caller, for acceptance latency. */
|
|
508
|
+
issuedAt?: string | null;
|
|
509
|
+
/** The W3C context of the caller, so the tree is one trace. */
|
|
510
|
+
traceparent?: string | null;
|
|
511
|
+
idempotencyKey: string;
|
|
512
|
+
}
|
|
513
|
+
/** What the worker is being asked for, and how it will be judged. */
|
|
514
|
+
export interface Objective {
|
|
515
|
+
goal: string;
|
|
516
|
+
acceptanceCriteria?: Array<string>;
|
|
517
|
+
/** Steering that applies from the start, not added later. */
|
|
518
|
+
instructions?: string | null;
|
|
519
|
+
}
|
|
520
|
+
/** One failure, as it is reported and stored. */
|
|
521
|
+
export interface OrchestrationError {
|
|
522
|
+
code: ErrorCode;
|
|
523
|
+
message: string;
|
|
524
|
+
retryable?: boolean;
|
|
525
|
+
/** Which adapter, worker or service reported it. */
|
|
526
|
+
source?: string | null;
|
|
527
|
+
details?: Record<string, unknown> | null;
|
|
528
|
+
}
|
|
529
|
+
/** What the worker may reach beyond its context manifest. */
|
|
530
|
+
export interface Permissions {
|
|
531
|
+
tools?: Array<string> | null;
|
|
532
|
+
agents?: Array<string> | null;
|
|
533
|
+
sandboxes?: boolean;
|
|
534
|
+
network?: boolean;
|
|
535
|
+
}
|
|
536
|
+
/** Everything that constrains an execution rather than describing it. */
|
|
537
|
+
export interface Policy {
|
|
538
|
+
/** Absolute, and never extended by a child. */
|
|
539
|
+
deadline?: string | null;
|
|
540
|
+
budget?: Budget;
|
|
541
|
+
permissions?: Permissions;
|
|
542
|
+
dataClassification?: DataClassification | null;
|
|
543
|
+
limits?: DelegationLimits;
|
|
544
|
+
/** Whether a person must accept the result before it commits. */
|
|
545
|
+
approvalRequired?: boolean;
|
|
546
|
+
}
|
|
547
|
+
/** One way to reach a worker: a protocol and where it answers. */
|
|
548
|
+
export interface ProtocolEndpoint {
|
|
549
|
+
protocol: AgentProtocol;
|
|
550
|
+
/** Absent for a worker the control plane launches itself. */
|
|
551
|
+
url?: string | null;
|
|
552
|
+
/** How the protocol is carried, as the source names it: stdio, websocket or http for ACP, a binding such as JSONRPC for A2A. */
|
|
553
|
+
transport?: string | null;
|
|
554
|
+
/** The version of the protocol this endpoint speaks, not of the agent. Both A2A interfaces and ACP agents declare one. */
|
|
555
|
+
protocolVersion?: string | null;
|
|
556
|
+
}
|
|
557
|
+
/** A command that changes nothing, and so needs no idempotency key. */
|
|
558
|
+
export interface ReadCommand {
|
|
559
|
+
command: CommandName;
|
|
560
|
+
/** From the caller, for acceptance latency. */
|
|
561
|
+
issuedAt?: string | null;
|
|
562
|
+
/** The W3C context of the caller, so the tree is one trace. */
|
|
563
|
+
traceparent?: string | null;
|
|
564
|
+
}
|
|
565
|
+
/** What has to be true for this execution to be recoverable. */
|
|
566
|
+
export interface Recovery {
|
|
567
|
+
retryPolicy?: RetryPolicy;
|
|
568
|
+
checkpointRequired?: boolean;
|
|
569
|
+
}
|
|
570
|
+
/** What one reference turned out to be, as the resolver reports it. */
|
|
571
|
+
export interface ReferenceResolution {
|
|
572
|
+
uri: string;
|
|
573
|
+
status: ReferenceStatus;
|
|
574
|
+
/** The version served, which a live reference outgrows. */
|
|
575
|
+
resolvedVersion?: string | null;
|
|
576
|
+
contentHash?: string | null;
|
|
577
|
+
mediaType?: string | null;
|
|
578
|
+
sizeBytes?: number | null;
|
|
579
|
+
resolvedAt?: string | null;
|
|
580
|
+
/** Why it is not resolved, from the service that refused. */
|
|
581
|
+
error?: OrchestrationError | null;
|
|
582
|
+
}
|
|
583
|
+
/** What a resolver found when it looked one reference up (O0-09). */
|
|
584
|
+
export type ReferenceStatus = 'resolved' | 'denied' | 'missing' | 'unavailable';
|
|
585
|
+
/** An execution's live report (O1-15): the artifact naming its document. */
|
|
586
|
+
export interface ReportAnswer {
|
|
587
|
+
artifact: Artifact;
|
|
588
|
+
execution: Execution;
|
|
589
|
+
success?: boolean;
|
|
590
|
+
}
|
|
591
|
+
/** How a failed attempt is tried again: 19.8's two retries, backing off. */
|
|
592
|
+
export interface RetryPolicy {
|
|
593
|
+
maxRetries?: number;
|
|
594
|
+
initialBackoffSeconds?: number;
|
|
595
|
+
backoffMultiplier?: number;
|
|
596
|
+
maxBackoffSeconds?: number;
|
|
597
|
+
}
|
|
598
|
+
/** What the worker needs to run, when the control plane provisions it. */
|
|
599
|
+
export interface RuntimeRequirements {
|
|
600
|
+
cpu?: number | null;
|
|
601
|
+
gpu?: number | null;
|
|
602
|
+
memoryMb?: number | null;
|
|
603
|
+
region?: string | null;
|
|
604
|
+
/** A Datalayer runtime environment name, when it runs on one. */
|
|
605
|
+
environment?: string | null;
|
|
606
|
+
}
|
|
607
|
+
/** The W3C context that makes one tree one trace (section 10, O0-11). */
|
|
608
|
+
export interface Trace {
|
|
609
|
+
traceparent?: string | null;
|
|
610
|
+
tracestate?: string | null;
|
|
611
|
+
}
|
|
612
|
+
/** The tree an execution is in, as it was announced. */
|
|
613
|
+
export interface TreeAnswer {
|
|
614
|
+
success?: boolean;
|
|
615
|
+
tree: TreeSummary;
|
|
616
|
+
}
|
|
617
|
+
/** A tree of executions at a glance, as the user channel carries it (O1-09). */
|
|
618
|
+
export interface TreeSummary {
|
|
619
|
+
/** Executions by status. */
|
|
620
|
+
counts: Record<string, number>;
|
|
621
|
+
executions: Array<ExecutionSummary>;
|
|
622
|
+
rootExecutionId: string;
|
|
623
|
+
/** Whether every execution of the tree has ended. */
|
|
624
|
+
terminal: boolean;
|
|
625
|
+
}
|
|
626
|
+
/** How much of what a worker says may be believed. */
|
|
627
|
+
export type TrustLevel = 'untrusted' | 'verified' | 'internal';
|
|
628
|
+
/** What one attempt spent, as its worker reported it (O2-10). */
|
|
629
|
+
export interface Usage {
|
|
630
|
+
inputTokens?: number | null;
|
|
631
|
+
outputTokens?: number | null;
|
|
632
|
+
cost?: number | null;
|
|
633
|
+
currency?: string;
|
|
634
|
+
}
|
|
635
|
+
/** A worker an execution can be bound to, created or attached. */
|
|
636
|
+
export interface Worker {
|
|
637
|
+
agentId: string;
|
|
638
|
+
endpoint?: string | null;
|
|
639
|
+
protocol: AgentProtocol;
|
|
640
|
+
sessionId?: string | null;
|
|
641
|
+
/** What the adapter of this protocol can ask the worker for. */
|
|
642
|
+
supportedOperations?: Array<WorkerOperation>;
|
|
643
|
+
/** The durable run bringing a created worker's compute up. */
|
|
644
|
+
workflowUid?: string | null;
|
|
645
|
+
}
|
|
646
|
+
/** The worker `agents.create` or `agents.attach` produced. */
|
|
647
|
+
export interface WorkerAnswer {
|
|
648
|
+
detail?: string | null;
|
|
649
|
+
success?: boolean;
|
|
650
|
+
worker: Worker;
|
|
651
|
+
}
|
|
652
|
+
/** A lifecycle operation a worker supports, named as section 6.2 names it. */
|
|
653
|
+
export type WorkerOperation = 'delegate' | 'steer' | 'pause' | 'resume' | 'cancel' | 'checkpoint' | 'collect' | 'terminate' | 'subscribe';
|
|
654
|
+
/** The lifecycle of section 6.1: what a state accepts, and where it leads. */
|
|
655
|
+
export interface OrchestrationLifecycle {
|
|
656
|
+
readonly initial: ExecutionState;
|
|
657
|
+
readonly states: readonly ExecutionState[];
|
|
658
|
+
readonly terminal: readonly ExecutionState[];
|
|
659
|
+
readonly events: readonly LifecycleEvent[];
|
|
660
|
+
readonly transitions: Readonly<Record<ExecutionState, Readonly<LifecycleMoves>>>;
|
|
661
|
+
}
|
|
662
|
+
/** Where one state goes, for the events it accepts. */
|
|
663
|
+
export type LifecycleMoves = Partial<Record<LifecycleEvent, ExecutionState>>;
|
|
664
|
+
export declare const ORCHESTRATION_LIFECYCLE: OrchestrationLifecycle;
|
|
665
|
+
/** One of the twelve commands, and whether it needs an idempotency key. */
|
|
666
|
+
export interface OrchestrationCommand {
|
|
667
|
+
readonly name: CommandName;
|
|
668
|
+
readonly mutating: boolean;
|
|
669
|
+
}
|
|
670
|
+
export declare const ORCHESTRATION_COMMANDS: readonly OrchestrationCommand[];
|
|
671
|
+
/** The five milestones of section 6.3, in the order they are reached. */
|
|
672
|
+
export declare const ORCHESTRATION_ACKNOWLEDGEMENT_ORDER: readonly AcknowledgementKind[];
|
|
673
|
+
/** The default limits of 19.8, read from the models' own defaults. */
|
|
674
|
+
export interface OrchestrationLimits {
|
|
675
|
+
readonly delegation: DelegationLimits;
|
|
676
|
+
readonly retry: RetryPolicy;
|
|
677
|
+
}
|
|
678
|
+
export declare const ORCHESTRATION_LIMITS: OrchestrationLimits;
|
|
679
|
+
/** What each model declares, for the fixture checks of O0-01. */
|
|
680
|
+
export interface OrchestrationModelFields {
|
|
681
|
+
readonly required: readonly string[];
|
|
682
|
+
readonly optional: readonly string[];
|
|
683
|
+
/** The model each nested property holds, by property name. */
|
|
684
|
+
readonly refs: Readonly<Record<string, string>>;
|
|
685
|
+
}
|
|
686
|
+
export declare const ORCHESTRATION_FIELDS: Record<string, OrchestrationModelFields>;
|
|
687
|
+
/** One operation of the control plane: its name, method and path. */
|
|
688
|
+
export interface OrchestrationOperation {
|
|
689
|
+
readonly operation: string;
|
|
690
|
+
readonly method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
691
|
+
readonly path: string;
|
|
692
|
+
}
|
|
693
|
+
export declare const ORCHESTRATION_API: readonly OrchestrationOperation[];
|