From 250bc72209c53eb2279daa8da1c6c581eface546 Mon Sep 17 00:00:00 2001
From: Rex Raphael
Date: Fri, 20 Nov 2026 13:23:02 -0600
Subject: [PATCH 1/5] fix(dashboard): make cache tags reach the screens they're
meant to refresh
A write or a live event only refreshes a screen when it names a tag some
query carries. Many named nothing, so pages stayed stale until a reload,
including the placement panel saying no Cloud was assigned after one was.
Server declarations:
- Live events used single-word tags ("EnvironmentCloud", "Sync",
"CanaryReport", "NotificationList", "AgentTask", ...), which match only
a query carrying exactly that word, and none did. They now name the
item and list tags the reads carry.
- Agent task, request and release report events carry separate event
types, so upserting them never touched what REST reads hold. They
invalidate the REST tags instead.
- cloud_capacity.updated used {cloud_id}; frames are decoded to camelCase
before tags resolve, so it never resolved.
- Cluster writes and two DELETE routes named types the reads don't use
(CloudClusterPage, Source, BitbucketWorkspace).
Generated client: regenerated with a forge build carrying two generator
fixes (pointer-slice envelopes lost their list tags; stream entities kept
their bare name when only the REST document renamed them). That brings
Profile[], CloudprofilesTarget[], Sync[], Pool[], Server[], Zone[],
Report[], Request[] and ReleaseReport[] to life, and live Target, Source
and Deployment events now land on the records the pages read. Forge now
keeps stream routes out of the operation manifest, so their paths live in
client/streams.ts.
Dashboard:
- cache-contract.test.ts fails on any write or live event invalidating a
tag no read carries, with the remaining gaps listed and explained.
- The release report listener plumbing is gone; the list refetches from
its tag.
- Hand-written deployment tags derive the typename from the generated
contract.
- The placement panel reads the environment's Cloud fresh when it opens,
and says when the Cloud has no usable targets rather than claiming none
is assigned.
Needs the forge release carrying the generator fixes: CI's FORGE_CLI pin
(v1.14.1) generates a different client, so `forge client check` fails
until the pin moves.
Verified: dashboard typecheck, lint and all 2213 tests pass; go build,
vet and tests for realtime, discovery and cloudinfra pass; the specs were
dumped from an API built from this branch with the same 452 operations as
before.
---
apps/dashboard/specs/loomplane.asyncapi.json | 116 +++--
apps/dashboard/specs/loomplane.openapi.json | 107 ++---
.../src/client/cache-contract.test.ts | 106 +++++
apps/dashboard/src/client/canary.ts | 12 +-
apps/dashboard/src/client/failed-cleanup.ts | 3 +-
.../src/client/forge/authsome/rest.ts | 16 +-
.../src/client/forge/loomplane/README.md | 4 +-
.../src/client/forge/loomplane/entities.ts | 21 +-
.../src/client/forge/loomplane/hooks.ts | 3 -
.../loomplane/hooks/useAgentTasksStream.ts | 4 -
.../loomplane/hooks/useRealtimeEvents.ts | 4 -
.../forge/loomplane/hooks/useRealtimeWs.ts | 4 -
.../src/client/forge/loomplane/ops.ts | 286 +++++++------
.../forge/loomplane/ops/agentReports.list.ts | 4 +-
.../forge/loomplane/ops/agentRequests.list.ts | 4 +-
.../forge/loomplane/ops/agentTasks.stream.ts | 8 -
.../loomplane/ops/aiModelDeployments.list.ts | 1 +
.../forge/loomplane/ops/aiSettings.get.ts | 4 +-
.../loomplane/ops/aiSettings.setBudget.ts | 1 +
.../loomplane/ops/bitbucket.disconnect.ts | 4 +-
.../loomplane/ops/catalogEndpoints.list.ts | 4 +-
.../loomplane/ops/cloudClusters.preview.ts | 2 +-
.../ops/cloudClusters.refreshCapacity.ts | 2 +-
.../ops/cloudClusters.retirementPreview.ts | 2 +-
.../forge/loomplane/ops/cloudPools.list.ts | 4 +-
.../forge/loomplane/ops/cloudServers.list.ts | 4 +-
.../forge/loomplane/ops/cloudSyncs.list.ts | 4 +-
.../forge/loomplane/ops/cloudTargets.list.ts | 4 +-
.../client/forge/loomplane/ops/clouds.list.ts | 4 +-
.../loomplane/ops/clusterOperations.apply.ts | 2 +-
.../loomplane/ops/clusterOperations.cancel.ts | 2 +-
.../loomplane/ops/clusterOperations.retry.ts | 2 +-
.../forge/loomplane/ops/dnsZones.list.ts | 4 +-
.../loomplane/ops/domainRegistrations.list.ts | 4 +-
.../loomplane/ops/domainRoutes.history.ts | 4 +-
.../forge/loomplane/ops/domainRoutes.list.ts | 4 +-
.../forge/loomplane/ops/domains.overview.ts | 3 +-
.../loomplane/ops/environmentClouds.get.ts | 1 +
.../ops/infrastructureOperations.list.ts | 4 +-
.../ops/organizationCloudSyncs.list.ts | 4 +-
.../ops/organizationCloudTargets.list.ts | 4 +-
.../loomplane/ops/organizationClouds.list.ts | 4 +-
.../loomplane/ops/providerResources.list.ts | 1 +
.../forge/loomplane/ops/realtime.events.ts | 8 -
.../client/forge/loomplane/ops/realtime.ws.ts | 8 -
.../loomplane/ops/releaseReports.list.ts | 4 +-
.../forge/loomplane/ops/sources.delete.ts | 4 +-
.../src/client/forge/loomplane/rest.ts | 327 ++++++---------
.../src/client/forge/loomplane/sse.ts | 396 +++++++++---------
.../client/forge/loomplane/stream-bindings.ts | 148 +++----
.../src/client/forge/loomplane/websocket.ts | 2 +-
apps/dashboard/src/client/streams.test.ts | 20 +
apps/dashboard/src/client/streams.ts | 19 +
apps/dashboard/src/client/tags.ts | 14 +
.../src/components/deployment-targets.tsx | 23 +-
.../src/components/release-reports-card.tsx | 8 +-
apps/dashboard/src/lib/agent-stream.ts | 7 +-
apps/dashboard/src/lib/realtime.test.ts | 55 +--
apps/dashboard/src/lib/realtime.ts | 29 +-
apps/dashboard/src/lib/release-reports.ts | 28 --
apps/dashboard/src/pages/release-report.tsx | 2 -
extensions/cloudinfra/clusters.go | 9 +-
extensions/discovery/bitbucket.go | 2 +-
extensions/discovery/routes.go | 2 +-
extensions/realtime/routes.go | 18 +-
65 files changed, 998 insertions(+), 920 deletions(-)
create mode 100644 apps/dashboard/src/client/cache-contract.test.ts
delete mode 100644 apps/dashboard/src/client/forge/loomplane/hooks/useAgentTasksStream.ts
delete mode 100644 apps/dashboard/src/client/forge/loomplane/hooks/useRealtimeEvents.ts
delete mode 100644 apps/dashboard/src/client/forge/loomplane/hooks/useRealtimeWs.ts
delete mode 100644 apps/dashboard/src/client/forge/loomplane/ops/agentTasks.stream.ts
delete mode 100644 apps/dashboard/src/client/forge/loomplane/ops/realtime.events.ts
delete mode 100644 apps/dashboard/src/client/forge/loomplane/ops/realtime.ws.ts
create mode 100644 apps/dashboard/src/client/streams.test.ts
create mode 100644 apps/dashboard/src/client/streams.ts
create mode 100644 apps/dashboard/src/client/tags.ts
diff --git a/apps/dashboard/specs/loomplane.asyncapi.json b/apps/dashboard/specs/loomplane.asyncapi.json
index c15a8ec7a..d471fc122 100644
--- a/apps/dashboard/specs/loomplane.asyncapi.json
+++ b/apps/dashboard/specs/loomplane.asyncapi.json
@@ -639,7 +639,7 @@
"entityType": "CanaryVerdict",
"intent": "upsert",
"invalidates": [
- "CanaryReport"
+ "CanaryVerdict[]"
],
"message": "canary_verdict.updated",
"type": "github.com/xraph/loomplane/internal/deployments.CanaryVerdict"
@@ -648,7 +648,7 @@
"entityType": "CanaryVerdict",
"intent": "evict",
"invalidates": [
- "CanaryReport"
+ "CanaryVerdict[]"
],
"message": "canary_verdict.deleted",
"type": "github.com/xraph/loomplane/internal/deployments.CanaryVerdict"
@@ -720,7 +720,7 @@
"entityType": "CloudSyncEvent",
"intent": "patch",
"invalidates": [
- "Sync",
+ "Sync:{id}",
"Sync[]",
"EnvironmentCloud"
],
@@ -731,16 +731,13 @@
"entityType": "ClusterChange",
"intent": "patch",
"invalidates": [
- "CloudCluster",
- "CloudClusterPage",
- "CloudClusterOperation",
- "CloudClusterOperationPage",
- "Target",
- "Target[]",
- "Connection",
+ "CloudCluster:{resourceId}",
+ "CloudCluster[]",
+ "CloudClusterOperation:{operationId}",
+ "CloudClusterOperation[]",
+ "CloudprofilesTarget[]",
"Connection[]",
- "Profile",
- "Profile[]"
+ "Profile:{cloudId}"
],
"message": "cloud_cluster.updated",
"type": "github.com/xraph/loomplane/internal/cloudinfra.ClusterChange"
@@ -749,8 +746,8 @@
"entityType": "CapacityChange",
"intent": "patch",
"invalidates": [
- "CapacityPolicyView:{cloud_id}",
- "CapacityUsage:{cloud_id}",
+ "CapacityPolicyView:{cloudId}",
+ "CapacityUsage:{cloudId}",
"Expansion[]"
],
"message": "cloud_capacity.updated",
@@ -760,7 +757,7 @@
"entityType": "NotificationCreated",
"intent": "upsert",
"invalidates": [
- "NotificationList"
+ "Notification[]"
],
"message": "notification.created",
"type": "github.com/xraph/loomplane/internal/notifications.NotificationCreated"
@@ -776,19 +773,18 @@
},
{
"entityType": "TaskEvent",
- "intent": "upsert",
+ "intent": "patch",
"invalidates": [
- "AgentTask",
- "AgentTask[]"
+ "Task:{id}"
],
"message": "agent_task.updated",
"type": "github.com/xraph/loomplane/internal/agentruns.TaskEvent"
},
{
"entityType": "TaskEvent",
- "intent": "evict",
+ "intent": "patch",
"invalidates": [
- "TaskEvent[]"
+ "Task:{id}"
],
"message": "agent_task.deleted",
"type": "github.com/xraph/loomplane/internal/agentruns.TaskEvent"
@@ -797,8 +793,7 @@
"entityType": "Report",
"intent": "upsert",
"invalidates": [
- "AgentReport",
- "AgentReport[]"
+ "Report[]"
],
"message": "agent_report.updated",
"type": "github.com/xraph/loomplane/internal/agentreports.Report"
@@ -814,28 +809,29 @@
},
{
"entityType": "RequestEvent",
- "intent": "upsert",
+ "intent": "patch",
"invalidates": [
- "AgentRequest",
- "AgentRequest[]"
+ "Request:{id}",
+ "Request[]"
],
"message": "agent_request.updated",
"type": "github.com/xraph/loomplane/internal/agentrequests.RequestEvent"
},
{
"entityType": "RequestEvent",
- "intent": "evict",
+ "intent": "patch",
"invalidates": [
- "RequestEvent[]"
+ "Request:{id}",
+ "Request[]"
],
"message": "agent_request.deleted",
"type": "github.com/xraph/loomplane/internal/agentrequests.RequestEvent"
},
{
"entityType": "ReleaseReportEvent",
- "intent": "upsert",
+ "intent": "patch",
"invalidates": [
- "ReleaseReport",
+ "ReleaseReport:{id}",
"ReleaseReport[]"
],
"message": "release_report.updated",
@@ -843,9 +839,9 @@
},
{
"entityType": "ReleaseReportEvent",
- "intent": "evict",
+ "intent": "patch",
"invalidates": [
- "ReleaseReport",
+ "ReleaseReport:{id}",
"ReleaseReport[]"
],
"message": "release_report.deleted",
@@ -1073,7 +1069,7 @@
"entityType": "CanaryVerdict",
"intent": "upsert",
"invalidates": [
- "CanaryReport"
+ "CanaryVerdict[]"
],
"message": "canary_verdict.updated",
"type": "github.com/xraph/loomplane/internal/deployments.CanaryVerdict"
@@ -1082,7 +1078,7 @@
"entityType": "CanaryVerdict",
"intent": "evict",
"invalidates": [
- "CanaryReport"
+ "CanaryVerdict[]"
],
"message": "canary_verdict.deleted",
"type": "github.com/xraph/loomplane/internal/deployments.CanaryVerdict"
@@ -1154,7 +1150,7 @@
"entityType": "CloudSyncEvent",
"intent": "patch",
"invalidates": [
- "Sync",
+ "Sync:{id}",
"Sync[]",
"EnvironmentCloud"
],
@@ -1165,16 +1161,13 @@
"entityType": "ClusterChange",
"intent": "patch",
"invalidates": [
- "CloudCluster",
- "CloudClusterPage",
- "CloudClusterOperation",
- "CloudClusterOperationPage",
- "Target",
- "Target[]",
- "Connection",
+ "CloudCluster:{resourceId}",
+ "CloudCluster[]",
+ "CloudClusterOperation:{operationId}",
+ "CloudClusterOperation[]",
+ "CloudprofilesTarget[]",
"Connection[]",
- "Profile",
- "Profile[]"
+ "Profile:{cloudId}"
],
"message": "cloud_cluster.updated",
"type": "github.com/xraph/loomplane/internal/cloudinfra.ClusterChange"
@@ -1183,8 +1176,8 @@
"entityType": "CapacityChange",
"intent": "patch",
"invalidates": [
- "CapacityPolicyView:{cloud_id}",
- "CapacityUsage:{cloud_id}",
+ "CapacityPolicyView:{cloudId}",
+ "CapacityUsage:{cloudId}",
"Expansion[]"
],
"message": "cloud_capacity.updated",
@@ -1194,7 +1187,7 @@
"entityType": "NotificationCreated",
"intent": "upsert",
"invalidates": [
- "NotificationList"
+ "Notification[]"
],
"message": "notification.created",
"type": "github.com/xraph/loomplane/internal/notifications.NotificationCreated"
@@ -1210,19 +1203,18 @@
},
{
"entityType": "TaskEvent",
- "intent": "upsert",
+ "intent": "patch",
"invalidates": [
- "AgentTask",
- "AgentTask[]"
+ "Task:{id}"
],
"message": "agent_task.updated",
"type": "github.com/xraph/loomplane/internal/agentruns.TaskEvent"
},
{
"entityType": "TaskEvent",
- "intent": "evict",
+ "intent": "patch",
"invalidates": [
- "TaskEvent[]"
+ "Task:{id}"
],
"message": "agent_task.deleted",
"type": "github.com/xraph/loomplane/internal/agentruns.TaskEvent"
@@ -1231,8 +1223,7 @@
"entityType": "Report",
"intent": "upsert",
"invalidates": [
- "AgentReport",
- "AgentReport[]"
+ "Report[]"
],
"message": "agent_report.updated",
"type": "github.com/xraph/loomplane/internal/agentreports.Report"
@@ -1248,28 +1239,29 @@
},
{
"entityType": "RequestEvent",
- "intent": "upsert",
+ "intent": "patch",
"invalidates": [
- "AgentRequest",
- "AgentRequest[]"
+ "Request:{id}",
+ "Request[]"
],
"message": "agent_request.updated",
"type": "github.com/xraph/loomplane/internal/agentrequests.RequestEvent"
},
{
"entityType": "RequestEvent",
- "intent": "evict",
+ "intent": "patch",
"invalidates": [
- "RequestEvent[]"
+ "Request:{id}",
+ "Request[]"
],
"message": "agent_request.deleted",
"type": "github.com/xraph/loomplane/internal/agentrequests.RequestEvent"
},
{
"entityType": "ReleaseReportEvent",
- "intent": "upsert",
+ "intent": "patch",
"invalidates": [
- "ReleaseReport",
+ "ReleaseReport:{id}",
"ReleaseReport[]"
],
"message": "release_report.updated",
@@ -1277,9 +1269,9 @@
},
{
"entityType": "ReleaseReportEvent",
- "intent": "evict",
+ "intent": "patch",
"invalidates": [
- "ReleaseReport",
+ "ReleaseReport:{id}",
"ReleaseReport[]"
],
"message": "release_report.deleted",
diff --git a/apps/dashboard/specs/loomplane.openapi.json b/apps/dashboard/specs/loomplane.openapi.json
index 502f18e14..689d81353 100644
--- a/apps/dashboard/specs/loomplane.openapi.json
+++ b/apps/dashboard/specs/loomplane.openapi.json
@@ -820,10 +820,6 @@
},
"/api/v1/agent/tasks/{id}/stream": {
"get": {
- "tags": [
- "Agent"
- ],
- "summary": "Follow a task's events as they happen",
"description": "Each agent.event carries one event, with its seq as the SSE id. Reconnect with Last-Event-ID (or after) set to the last seq you have, and the stream picks up at the next one. agent.end is the last frame: the task's final status.",
"operationId": "agentTasks.stream",
"parameters": [
@@ -846,9 +842,21 @@
],
"responses": {
"200": {
- "description": "Success"
+ "description": "Event stream",
+ "content": {
+ "text/event-stream": {
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
}
- }
+ },
+ "summary": "Follow a task's events as they happen",
+ "tags": [
+ "Agent"
+ ],
+ "x-forge-protocol": "sse"
}
},
"/api/v1/agent/watcher": {
@@ -1638,7 +1646,7 @@
],
"x-forge-entity": {
"idField": "id",
- "type": "BitbucketWorkspace"
+ "type": "BitbucketWorkspaceView"
}
}
},
@@ -2648,11 +2656,10 @@
"Cloud clusters"
],
"x-forge-invalidates": [
- "CloudCluster",
- "CloudClusterOperation",
- "CloudClusterPage",
- "CloudClusterOperationPage",
- "RuntimeAttachmentPage"
+ "CloudCluster[]",
+ "CloudClusterOperation[]",
+ "CloudCluster:{res.resourceId}",
+ "RuntimeAttachmentPage:{res.resourceId}"
]
}
},
@@ -2716,11 +2723,10 @@
"Cloud clusters"
],
"x-forge-invalidates": [
- "CloudCluster",
- "CloudClusterOperation",
- "CloudClusterPage",
- "CloudClusterOperationPage",
- "RuntimeAttachmentPage"
+ "CloudCluster[]",
+ "CloudClusterOperation[]",
+ "CloudCluster:{res.resourceId}",
+ "RuntimeAttachmentPage:{res.resourceId}"
]
}
},
@@ -2784,11 +2790,10 @@
"Cloud clusters"
],
"x-forge-invalidates": [
- "CloudCluster",
- "CloudClusterOperation",
- "CloudClusterPage",
- "CloudClusterOperationPage",
- "RuntimeAttachmentPage"
+ "CloudCluster[]",
+ "CloudClusterOperation[]",
+ "CloudCluster:{res.resourceId}",
+ "RuntimeAttachmentPage:{res.resourceId}"
]
}
},
@@ -3009,11 +3014,8 @@
"Cloud clusters"
],
"x-forge-invalidates": [
- "CloudCluster",
- "CloudClusterOperation",
- "CloudClusterPage",
- "CloudClusterOperationPage",
- "RuntimeAttachmentPage"
+ "CloudCluster[]",
+ "CloudClusterOperation[]"
]
}
},
@@ -3327,11 +3329,10 @@
"Cloud clusters"
],
"x-forge-invalidates": [
- "CloudCluster",
- "CloudClusterOperation",
- "CloudClusterPage",
- "CloudClusterOperationPage",
- "RuntimeAttachmentPage"
+ "CloudCluster[]",
+ "CloudClusterOperation[]",
+ "CloudCluster:{res.resourceId}",
+ "RuntimeAttachmentPage:{res.resourceId}"
]
}
},
@@ -3406,11 +3407,10 @@
"Cloud clusters"
],
"x-forge-invalidates": [
- "CloudCluster",
- "CloudClusterOperation",
- "CloudClusterPage",
- "CloudClusterOperationPage",
- "RuntimeAttachmentPage"
+ "CloudCluster[]",
+ "CloudClusterOperation[]",
+ "CloudCluster:{res.resourceId}",
+ "RuntimeAttachmentPage:{res.resourceId}"
]
}
},
@@ -13019,7 +13019,7 @@
],
"x-forge-entity": {
"idField": "id",
- "type": "Source"
+ "type": "DiscoverySource"
}
},
"patch": {
@@ -18146,9 +18146,6 @@
},
"/api/v1/realtime/events": {
"get": {
- "tags": [
- "Realtime"
- ],
"operationId": "realtime.events",
"parameters": [
{
@@ -18182,9 +18179,20 @@
],
"responses": {
"200": {
- "description": "Success"
+ "description": "Event stream",
+ "content": {
+ "text/event-stream": {
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
}
- }
+ },
+ "tags": [
+ "Realtime"
+ ],
+ "x-forge-protocol": "sse"
}
},
"/api/v1/realtime/snapshot": {
@@ -18240,9 +18248,6 @@
},
"/api/v1/realtime/ws": {
"get": {
- "tags": [
- "Realtime"
- ],
"operationId": "realtime.ws",
"parameters": [
{
@@ -18275,10 +18280,14 @@
}
],
"responses": {
- "200": {
- "description": "Success"
+ "101": {
+ "description": "Switching Protocols"
}
- }
+ },
+ "tags": [
+ "Realtime"
+ ],
+ "x-forge-protocol": "websocket"
}
},
"/api/v1/release-reports/{id}": {
diff --git a/apps/dashboard/src/client/cache-contract.test.ts b/apps/dashboard/src/client/cache-contract.test.ts
new file mode 100644
index 000000000..d775a3aac
--- /dev/null
+++ b/apps/dashboard/src/client/cache-contract.test.ts
@@ -0,0 +1,106 @@
+// The generated cache contract only refreshes a screen when a write or a live
+// event names a tag some query carries. A tag nothing carries is silent: the
+// write lands, and the page stays stale until a reload. This test fails on
+// every such tag, so a route declaring one is caught in review rather than by
+// someone wondering why the page didn't update.
+//
+// Matching is exact, as it is in @forge-go/client-core: `Order` reaches only
+// a query carrying `Order`, never `Order:7` or `Order[]`.
+import { describe, expect, it } from "vitest"
+
+import { entities } from "@/client/forge/loomplane/entities"
+import { ops } from "@/client/forge/loomplane/ops"
+import { streams } from "@/client/forge/loomplane/stream-bindings"
+
+type Op = {
+ method: string
+ rootType?: string
+ provides: readonly string[]
+ invalidates: readonly string[]
+}
+type Row = { idField?: string; fields?: Record }
+
+const all = Object.entries(ops as unknown as Record)
+const table = entities as unknown as Record
+const reads = all.filter(([, op]) => op.method === "GET")
+
+/** shape turns a tag template into what it matches: `Order:{id}` → `Order:*`. */
+const shape = (tag: string) => tag.replace(/\{[^}]+\}/g, "*")
+
+// What a read carries: its declared tags, and an item tag for every entity its
+// response can hold, since a settled query also carries the keys it normalized.
+const carried = new Set()
+const reach = (type: string, seen: Set) => {
+ if (seen.has(type)) return
+ seen.add(type)
+ const row = table[type]
+ if (!row) return
+ if (row.idField) carried.add(`${type}:*`)
+ for (const next of Object.values(row.fields ?? {})) reach(next, seen)
+}
+for (const [, op] of reads) {
+ for (const tag of op.provides) carried.add(shape(tag))
+ if (op.rootType) reach(op.rootType, new Set())
+}
+
+// Tags known to reach nothing today, each with why. Shrink this list; never
+// grow it without a reason a reviewer would accept.
+const known: Record = {
+ EnvironmentCloud:
+ "the environment Cloud read has no identity; it goes when Clouds stop being per environment",
+ "Watch[]": "release watches are only read one at a time, by deployment",
+ "Collection[]":
+ "build output collections are delivered to the log view, not listed",
+ "Preview[]": "previews are immutable and never listed",
+ "Task[]": "agent tasks are only read one at a time",
+ "EntryDetail[]": "model registry entries are only read one at a time",
+ "CapacityPolicyView[]": "a capacity policy is read per Cloud",
+ "CapacityUsage[]": "capacity usage is read per Cloud",
+ "ClusterCapacity[]": "cluster capacity is read per cluster",
+ ManagedRegistryView: "the managed registry read has no identity",
+ "ProviderResourceSync[]": "resource syncs are never listed",
+ "GitLabConnectionView[]":
+ "GitLab connections are read inside the GitLab status",
+ "GitLabHostView[]": "GitLab hosts are read inside the GitLab status",
+ "NativeRetentionPolicy[]":
+ "carried by the hand-written read in client/native-retention-policies.ts",
+ "TLSRenewalAuthority[]": "renewal authorities are never listed",
+ "Host[]": "platform hosts are listed as HostView",
+ "RouteSummary[]": "gateway routes are read inside the gateway",
+ "GroupVerificationResult[]": "verification results are never listed",
+ "MemberPrerequisite[]": "prerequisites are never listed",
+ "FleetOperation[]": "fleet operations are read one at a time",
+ "ProviderResource[]": "the provider resource list has no envelope yet",
+ "PushDevice[]": "push devices are never listed",
+ "RetentionPolicy[]":
+ "carried by the hand-written read in client/retention-policies.ts",
+}
+
+function dead(tags: readonly string[]): string[] {
+ return tags.map(shape).filter((tag) => !carried.has(tag) && !known[tag])
+}
+
+describe("cache contract", () => {
+ it("every write invalidates only tags some read carries", () => {
+ const misses = all
+ .filter(([, op]) => op.method !== "GET")
+ .flatMap(([name, op]) =>
+ dead(op.invalidates).map((tag) => `${name}: ${tag}`)
+ )
+ expect(misses).toEqual([])
+ })
+
+ it("every live event invalidates only tags some read carries", () => {
+ const misses = streams.flatMap((b) =>
+ b.kind === "entity"
+ ? dead(b.invalidates ?? []).map((tag) => `${b.message}: ${tag}`)
+ : []
+ )
+ expect([...new Set(misses)]).toEqual([])
+ })
+
+ it("every known gap is still a gap", () => {
+ // A fixed gap left on the list would hide its own regression.
+ expect(Object.keys(known).filter((tag) => carried.has(tag))).toEqual([])
+ })
+})
diff --git a/apps/dashboard/src/client/canary.ts b/apps/dashboard/src/client/canary.ts
index c108b2fe6..3da26fe53 100644
--- a/apps/dashboard/src/client/canary.ts
+++ b/apps/dashboard/src/client/canary.ts
@@ -2,13 +2,13 @@ import { query } from "@forge-go/client-core"
import { op_deployments_canary } from "@/client/forge/loomplane/ops/deployments.canary"
import type { CanaryReport } from "@/client/forge/loomplane/types"
+import { deploymentLists } from "@/client/tags"
-// The generated route provides only verdict entities, but the stream
-// invalidates the CanaryReport tag when a verdict lands, and a status change
-// with no new verdict (a rollback that couldn't finish, the next weight, a
-// promotion) arrives as deployment.updated. Providing both tags keeps the
-// report current on either event.
-const provides = ["CanaryReport", "Deployment[]"]
+// The generated route provides the verdicts, which a canary_verdict event
+// reaches. A status change with no new verdict (a rollback that couldn't
+// finish, the next weight, a promotion) arrives as deployment.updated, which
+// invalidates the deployment lists, so the report carries that tag too.
+const provides = [deploymentLists]
export const useDeploymentsCanary = query({
...op_deployments_canary,
provides: [...op_deployments_canary.provides, ...provides],
diff --git a/apps/dashboard/src/client/failed-cleanup.ts b/apps/dashboard/src/client/failed-cleanup.ts
index 6a17bbde5..8d5833f48 100644
--- a/apps/dashboard/src/client/failed-cleanup.ts
+++ b/apps/dashboard/src/client/failed-cleanup.ts
@@ -8,12 +8,13 @@ import type {
CleanupReview,
FailedCleanup,
} from "@/client/forge/loomplane/types"
+import { deploymentItem, deploymentLists } from "@/client/tags"
export type { CleanupReview } from "@/client/forge/loomplane/types"
// An absent cleanup still depends on its next acceptance. The operation is
// keyed by deployment rather than by a serving resource entity.
const provides = ["FailedCleanup:{id}"]
-const invalidates = [...provides, "Deployment:{id}", "Deployment[]"]
+const invalidates = [...provides, deploymentItem, deploymentLists]
export const useFailedCleanup = query({
...op_deployments_cleanup,
provides,
diff --git a/apps/dashboard/src/client/forge/authsome/rest.ts b/apps/dashboard/src/client/forge/authsome/rest.ts
index d9a25544f..856cf291a 100644
--- a/apps/dashboard/src/client/forge/authsome/rest.ts
+++ b/apps/dashboard/src/client/forge/authsome/rest.ts
@@ -49,8 +49,8 @@ export class RESTClient extends Client {
public readonly checkOrgSlug = async (appId?: string, slug?: string, options?: { signal?: AbortSignal; retry?: { maxAttempts?: number } }): Promise => {
let __path = `/authsome/v1/orgs/check-slug`;
const queryParams: Record = {};
- queryParams['app_id'] = appId;
- queryParams['slug'] = slug;
+ queryParams["app_id"] = appId;
+ queryParams["slug"] = slug;
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
__path += '?' + queryString;
@@ -165,10 +165,10 @@ export class RESTClient extends Client {
let __path = `/authsome/v1/orgs/${encodeURIComponent(String(orgId))}/invitations`;
const queryParams: Record = {};
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
if (cursor !== undefined) {
- queryParams['cursor'] = cursor;
+ queryParams["cursor"] = cursor;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -193,10 +193,10 @@ export class RESTClient extends Client {
let __path = `/authsome/v1/orgs/${encodeURIComponent(String(orgId))}/members`;
const queryParams: Record = {};
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
if (cursor !== undefined) {
- queryParams['cursor'] = cursor;
+ queryParams["cursor"] = cursor;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -221,10 +221,10 @@ export class RESTClient extends Client {
let __path = `/authsome/v1/orgs`;
const queryParams: Record = {};
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
if (cursor !== undefined) {
- queryParams['cursor'] = cursor;
+ queryParams["cursor"] = cursor;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
diff --git a/apps/dashboard/src/client/forge/loomplane/README.md b/apps/dashboard/src/client/forge/loomplane/README.md
index 4e5893b56..47e18d77f 100644
--- a/apps/dashboard/src/client/forge/loomplane/README.md
+++ b/apps/dashboard/src/client/forge/loomplane/README.md
@@ -53,8 +53,8 @@ This API supports the following authentication methods:
## API Overview
-- **Total Endpoints**: 455
-- **REST Endpoints**: 452
+- **Total Endpoints**: 452
+- **REST Endpoints**: 449
- **WebSocket Endpoints**: 1
- **SSE Endpoints**: 2
diff --git a/apps/dashboard/src/client/forge/loomplane/entities.ts b/apps/dashboard/src/client/forge/loomplane/entities.ts
index 4a508d17e..1e776bb8d 100644
--- a/apps/dashboard/src/client/forge/loomplane/entities.ts
+++ b/apps/dashboard/src/client/forge/loomplane/entities.ts
@@ -13,7 +13,6 @@ export const entities = {
'Binding': { idField: 'id' },
'BindingList': { fields: { 'bindings': 'Binding' } },
'BitbucketStatus': { fields: { 'workspaces': 'BitbucketWorkspaceView' } },
- 'BitbucketWorkspace': { idField: 'id' },
'BitbucketWorkspaceView': { idField: 'id' },
'CLIOrganization': { idField: 'id' },
'CLIOrganizationList': { fields: { 'organizations': 'CLIOrganization' } },
@@ -30,6 +29,8 @@ export const entities = {
'CloudLocation': { idField: 'id' },
'CloudLocationList': { fields: { 'locations': 'CloudLocation' } },
'CloudSyncEvent': { idField: 'id' },
+ 'CloudSyncList': { fields: { 'syncs': 'Sync' } },
+ 'CloudTargetList': { fields: { 'targets': 'CloudprofilesTarget' } },
'CloudinfraRoute': { idField: 'id' },
'CloudprofilesTarget': { idField: 'id' },
'ClusterCapacity': { idField: 'resourceId' },
@@ -52,10 +53,14 @@ export const entities = {
'DeploymentsDeployment': { idField: 'id' },
'DiscoverySource': { idField: 'id' },
'DomainDetail': { fields: { 'domain': 'ZoneOverview', 'parent': 'ZoneOverview', 'proofZone': 'ZoneOverview', 'registration': 'Registration', 'subdomains': 'ZoneOverview' } },
- 'DomainOverview': { fields: { 'zones': 'ZoneOverview' } },
+ 'DomainOperationList': { fields: { 'operations': 'RouteOperation' } },
+ 'DomainOverview': { fields: { 'registrations': 'Registration', 'zones': 'ZoneOverview' } },
+ 'DomainRouteList': { fields: { 'routes': 'CloudinfraRoute' } },
+ 'EndpointList': { fields: { 'endpoints': 'CatalogconnectEndpoint' } },
'EntryDetail': { idField: 'id' },
'EntrySummary': { idField: 'id' },
'Environment': { idField: 'id' },
+ 'EnvironmentCloud': { fields: { 'assignment': 'Assignment' } },
'EnvironmentList': { fields: { 'environments': 'Environment' } },
'EventPage': { fields: { 'items': 'FleetEvent' } },
'Expansion': { idField: 'id' },
@@ -88,6 +93,7 @@ export const entities = {
'ManagedRegistryView': { fields: { 'backups': 'ManagedRegistryBackup' } },
'ManifestDraft': { idField: 'projectId' },
'MemberPrerequisite': { idField: 'id' },
+ 'ModelDeploymentList': { fields: { 'models': 'ModelsStatus' } },
'ModelsStatus': { fields: { 'entry': 'EntrySummary' } },
'MoveAll': { fields: { 'host': 'Host' } },
'NativeInventory': { fields: { 'points': 'NativePoint', 'source': 'NativeSource' } },
@@ -108,6 +114,7 @@ export const entities = {
'NotificationCreated': { idField: 'id' },
'NotificationList': { fields: { 'items': 'Notification' } },
'Operation': { idField: 'id' },
+ 'OperationList': { fields: { 'operations': 'Operation' } },
'OperationResult': { fields: { 'instance': 'Instance', 'operation': 'FleetOperation' } },
'OrgInvitation': { idField: 'id' },
'OrgInvitationList': { fields: { 'invitations': 'OrgInvitation' } },
@@ -116,10 +123,12 @@ export const entities = {
'PendingNodeJoinToken': { idField: 'id' },
'Plan': { idField: 'id', fields: { 'actions': 'Action' } },
'PlanList': { fields: { 'plans': 'Plan' } },
+ 'PlanningCloudList': { fields: { 'clouds': 'Profile' } },
'PlanningTenantList': { fields: { 'tenants': 'FabriqloomTenant' } },
'Policy': { idField: 'id' },
'PolicyList': { fields: { 'policies': 'Policy' } },
'Pool': { idField: 'id' },
+ 'PoolList': { fields: { 'pools': 'Pool' } },
'Preview': { idField: 'id', fields: { 'after': 'CloudprofilesTarget', 'afterAssignment': 'Assignment', 'before': 'CloudprofilesTarget', 'beforeAssignment': 'Assignment' } },
'Profile': { idField: 'id' },
'Project': { idField: 'id' },
@@ -129,6 +138,7 @@ export const entities = {
'ProjectZoneList': { fields: { 'zones': 'ProjectZone' } },
'ProviderKey': { idField: 'id' },
'ProviderResource': { idField: 'id' },
+ 'ProviderResourceList': { fields: { 'resources': 'ProviderResource', 'syncs': 'ProviderResourceSync' } },
'ProviderResourceSync': { idField: 'id' },
'ProviderZoneList': { fields: { 'zones': 'DNSZone' } },
'PushDevice': { idField: 'id' },
@@ -137,12 +147,16 @@ export const entities = {
'Region': { idField: 'id' },
'RegionList': { fields: { 'regions': 'Region' } },
'Registration': { idField: 'id' },
+ 'RegistrationList': { fields: { 'registrations': 'Registration' } },
'RegistryList': { fields: { 'entries': 'EntrySummary' } },
'ReleaseReport': { idField: 'id' },
'ReleaseReportEvent': { idField: 'id' },
+ 'ReleaseReportList': { fields: { 'reports': 'ReleaseReport' } },
'Report': { idField: 'id' },
+ 'ReportList': { fields: { 'reports': 'Report' } },
'Request': { idField: 'id' },
'RequestEvent': { idField: 'id' },
+ 'RequestList': { fields: { 'requests': 'Request' } },
'Resolution': { fields: { 'variables': 'ResolvedVariable' } },
'ResolvedVariable': { fields: { 'overrides': 'Variable', 'variable': 'Variable' } },
'Restore': { idField: 'id' },
@@ -159,6 +173,7 @@ export const entities = {
'ScalingPool': { fields: { 'pool': 'Pool' } },
'Sent': { fields: { 'conversation': 'Conversation', 'task': 'Task' } },
'Server': { idField: 'id' },
+ 'ServerList': { fields: { 'servers': 'Server' } },
'Source': { idField: 'id' },
'SourceList': { fields: { 'sources': 'DiscoverySource' } },
'SourceState': { fields: { 'latest': 'Analysis', 'shown': 'Analysis', 'source': 'DiscoverySource' } },
@@ -174,10 +189,12 @@ export const entities = {
'TemplateRelease': { idField: 'id' },
'Variable': { idField: 'id' },
'VariableList': { fields: { 'variables': 'Variable' } },
+ 'View': { fields: { 'providerKeys': 'ProviderKey' } },
'Watch': { idField: 'id' },
'WebhookEndpoint': { idField: 'id' },
'WebhookEndpointList': { fields: { 'items': 'WebhookEndpoint' } },
'WebhookEndpointSecret': { fields: { 'endpoint': 'WebhookEndpoint' } },
'Zone': { idField: 'id', fields: { 'providerZone': 'DNSZone' } },
+ 'ZoneList': { fields: { 'zones': 'Zone' } },
'ZoneOverview': { fields: { 'zone': 'Zone' } },
} as const satisfies Record;
diff --git a/apps/dashboard/src/client/forge/loomplane/hooks.ts b/apps/dashboard/src/client/forge/loomplane/hooks.ts
index 2f2bf76fc..2eae3dd2d 100644
--- a/apps/dashboard/src/client/forge/loomplane/hooks.ts
+++ b/apps/dashboard/src/client/forge/loomplane/hooks.ts
@@ -33,7 +33,6 @@ export const useAgentRequestsProvideSecret = mutation(ops['age
export const useAgentStatusGet = query(ops['agentStatus.get']);
export const useAgentTasksGet = query(ops['agentTasks.get']);
export const useAgentTasksCancel = mutation(ops['agentTasks.cancel']);
-export const useAgentTasksStream = query(ops['agentTasks.stream']);
export const useAgentWatcherGet = query(ops['agentWatcher.get']);
export const useAiModelDeploymentsList = query(ops['aiModelDeployments.list']);
export const useAiModelsInspect = mutation(ops['aiModels.inspect']);
@@ -427,9 +426,7 @@ export const usePushDevicesCreate = mutation(ops['push.d
export const usePushDevicesUpdate = mutation(ops['push.devices.update']);
export const usePushDevicesDelete = mutation(ops['push.devices.delete']);
export const usePushDevicesTest = mutation(ops['push.devices.test']);
-export const useRealtimeEvents = query(ops['realtime.events']);
export const useRealtimeSnapshot = query(ops['realtime.snapshot']);
-export const useRealtimeWs = query(ops['realtime.ws']);
export const useReleaseReportsGet = query(ops['releaseReports.get']);
export const useReleaseReportsCancel = mutation(ops['releaseReports.cancel']);
export const useServiceRetirementsGet = query(ops['serviceRetirements.get']);
diff --git a/apps/dashboard/src/client/forge/loomplane/hooks/useAgentTasksStream.ts b/apps/dashboard/src/client/forge/loomplane/hooks/useAgentTasksStream.ts
deleted file mode 100644
index 5aa2152b2..000000000
--- a/apps/dashboard/src/client/forge/loomplane/hooks/useAgentTasksStream.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import { query } from '@forge-go/client-core';
-import { op_agentTasks_stream } from '../ops/agentTasks.stream';
-
-export const useAgentTasksStream = /*#__PURE__*/ query(op_agentTasks_stream);
diff --git a/apps/dashboard/src/client/forge/loomplane/hooks/useRealtimeEvents.ts b/apps/dashboard/src/client/forge/loomplane/hooks/useRealtimeEvents.ts
deleted file mode 100644
index 1231c09d8..000000000
--- a/apps/dashboard/src/client/forge/loomplane/hooks/useRealtimeEvents.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import { query } from '@forge-go/client-core';
-import { op_realtime_events } from '../ops/realtime.events';
-
-export const useRealtimeEvents = /*#__PURE__*/ query(op_realtime_events);
diff --git a/apps/dashboard/src/client/forge/loomplane/hooks/useRealtimeWs.ts b/apps/dashboard/src/client/forge/loomplane/hooks/useRealtimeWs.ts
deleted file mode 100644
index 2ebd02d88..000000000
--- a/apps/dashboard/src/client/forge/loomplane/hooks/useRealtimeWs.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import { query } from '@forge-go/client-core';
-import { op_realtime_ws } from '../ops/realtime.ws';
-
-export const useRealtimeWs = /*#__PURE__*/ query(op_realtime_ws);
diff --git a/apps/dashboard/src/client/forge/loomplane/ops.ts b/apps/dashboard/src/client/forge/loomplane/ops.ts
index 69d6d599e..feab7ad95 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops.ts
@@ -156,7 +156,9 @@ export const ops = {
'agentReports.list': {
method: 'GET',
path: '/api/v1/agent/reports',
- provides: [],
+ entity: 'Report',
+ rootType: 'ReportList',
+ provides: ['Report:{id}', 'Report[]'],
invalidates: [],
responseCodec: CODECS['ReportList'],
},
@@ -182,7 +184,9 @@ export const ops = {
'agentRequests.list': {
method: 'GET',
path: '/api/v1/agent/requests',
- provides: [],
+ entity: 'Request',
+ rootType: 'RequestList',
+ provides: ['Request:{id}', 'Request[]'],
invalidates: [],
responseCodec: CODECS['RequestList'],
},
@@ -259,12 +263,6 @@ export const ops = {
invalidates: ['Task[]'],
responseCodec: CODECS['Task'],
},
- 'agentTasks.stream': {
- method: 'GET',
- path: '/api/v1/agent/tasks/{id}/stream',
- provides: [],
- invalidates: [],
- },
'agentWatcher.get': {
method: 'GET',
path: '/api/v1/agent/watcher',
@@ -275,6 +273,7 @@ export const ops = {
'aiModelDeployments.list': {
method: 'GET',
path: '/api/v1/ai/models/deployments',
+ rootType: 'ModelDeploymentList',
provides: [],
invalidates: [],
responseCodec: CODECS['ModelDeploymentList'],
@@ -317,7 +316,9 @@ export const ops = {
'aiSettings.get': {
method: 'GET',
path: '/api/v1/ai/settings',
- provides: [],
+ entity: 'ProviderKey',
+ rootType: 'View',
+ provides: ['ProviderKey:{id}', 'ProviderKey[]'],
invalidates: [],
responseCodec: CODECS['View'],
},
@@ -347,6 +348,7 @@ export const ops = {
'aiSettings.setBudget': {
method: 'PUT',
path: '/api/v1/ai/settings/budget',
+ rootType: 'View',
provides: [],
invalidates: [],
bodyCodec: CODECS['WorkspaceBudgetInputBody'],
@@ -472,14 +474,16 @@ export const ops = {
'bitbucket.disconnect': {
method: 'DELETE',
path: '/api/v1/bitbucket/workspaces/{id}',
- entity: 'BitbucketWorkspace',
+ entity: 'BitbucketWorkspaceView',
provides: [],
- invalidates: ['BitbucketWorkspace[]'],
+ invalidates: ['BitbucketWorkspaceView[]'],
},
'catalogEndpoints.list': {
method: 'GET',
path: '/api/v1/catalog/endpoints',
- provides: [],
+ entity: 'CatalogconnectEndpoint',
+ rootType: 'EndpointList',
+ provides: ['CatalogconnectEndpoint:{id}', 'CatalogconnectEndpoint[]'],
invalidates: [],
responseCodec: CODECS['EndpointList'],
},
@@ -535,7 +539,9 @@ export const ops = {
'organizationClouds.list': {
method: 'GET',
path: '/api/v1/clouds',
- provides: [],
+ entity: 'Profile',
+ rootType: 'PlanningCloudList',
+ provides: ['Profile:{id}', 'Profile[]'],
invalidates: [],
responseCodec: CODECS['PlanningCloudList'],
},
@@ -581,7 +587,9 @@ export const ops = {
'organizationCloudSyncs.list': {
method: 'GET',
path: '/api/v1/clouds/syncs',
- provides: [],
+ entity: 'Sync',
+ rootType: 'CloudSyncList',
+ provides: ['Sync:{id}', 'Sync[]'],
invalidates: [],
responseCodec: CODECS['CloudSyncList'],
},
@@ -718,7 +726,7 @@ export const ops = {
entity: 'CloudClusterOperation',
rootType: 'CloudClusterOperation',
provides: ['CloudClusterOperation:{id}'],
- invalidates: ['CloudCluster', 'CloudClusterOperation', 'CloudClusterOperationPage', 'CloudClusterOperation[]', 'CloudClusterPage', 'RuntimeAttachmentPage'],
+ invalidates: ['CloudCluster:{res.resourceId}', 'CloudClusterOperation[]', 'CloudCluster[]', 'RuntimeAttachmentPage:{res.resourceId}'],
bodyCodec: CODECS['ApplyInputBody'],
responseCodec: CODECS['CloudClusterOperation'],
},
@@ -728,7 +736,7 @@ export const ops = {
entity: 'CloudClusterOperation',
rootType: 'CloudClusterOperation',
provides: ['CloudClusterOperation:{id}'],
- invalidates: ['CloudCluster', 'CloudClusterOperation', 'CloudClusterOperationPage', 'CloudClusterOperation[]', 'CloudClusterPage', 'RuntimeAttachmentPage'],
+ invalidates: ['CloudCluster:{res.resourceId}', 'CloudClusterOperation[]', 'CloudCluster[]', 'RuntimeAttachmentPage:{res.resourceId}'],
responseCodec: CODECS['CloudClusterOperation'],
},
'clusterOperations.retry': {
@@ -737,7 +745,7 @@ export const ops = {
entity: 'CloudClusterOperation',
rootType: 'CloudClusterOperation',
provides: ['CloudClusterOperation:{id}'],
- invalidates: ['CloudCluster', 'CloudClusterOperation', 'CloudClusterOperationPage', 'CloudClusterOperation[]', 'CloudClusterPage', 'RuntimeAttachmentPage'],
+ invalidates: ['CloudCluster:{res.resourceId}', 'CloudClusterOperation[]', 'CloudCluster[]', 'RuntimeAttachmentPage:{res.resourceId}'],
responseCodec: CODECS['CloudClusterOperation'],
},
'cloudClusters.options': {
@@ -764,7 +772,7 @@ export const ops = {
entity: 'CloudClusterOperation',
rootType: 'CloudClusterOperation',
provides: ['CloudClusterOperation:{id}'],
- invalidates: ['CloudCluster', 'CloudClusterOperation', 'CloudClusterOperationPage', 'CloudClusterOperation[]', 'CloudClusterPage', 'RuntimeAttachmentPage'],
+ invalidates: ['CloudClusterOperation[]', 'CloudCluster[]'],
bodyCodec: CODECS['ClusterInputBody'],
responseCodec: CODECS['CloudClusterOperation'],
},
@@ -801,14 +809,14 @@ export const ops = {
entity: 'ClusterCapacity',
rootType: 'ClusterCapacity',
provides: ['ClusterCapacity:{resourceId}'],
- invalidates: ['CloudCluster', 'CloudClusterOperation', 'CloudClusterOperationPage', 'CloudClusterPage', 'ClusterCapacity[]', 'RuntimeAttachmentPage'],
+ invalidates: ['CloudCluster:{res.resourceId}', 'CloudClusterOperation[]', 'CloudCluster[]', 'ClusterCapacity[]', 'RuntimeAttachmentPage:{res.resourceId}'],
responseCodec: CODECS['ClusterCapacity'],
},
'cloudClusters.retirementPreview': {
method: 'POST',
path: '/api/v1/clouds/{cloudId}/clusters/{clusterId}/retirement/preview',
provides: [],
- invalidates: ['CloudCluster', 'CloudClusterOperation', 'CloudClusterOperationPage', 'CloudClusterPage', 'RuntimeAttachmentPage'],
+ invalidates: ['CloudCluster:{res.resourceId}', 'CloudClusterOperation[]', 'CloudCluster[]', 'RuntimeAttachmentPage:{res.resourceId}'],
bodyCodec: CODECS['ClusterRetirementPreviewInputBody'],
responseCodec: CODECS['ClusterRetirementReview'],
},
@@ -844,7 +852,9 @@ export const ops = {
'infrastructureOperations.list': {
method: 'GET',
path: '/api/v1/clouds/{cloudId}/infrastructure-operations',
- provides: [],
+ entity: 'Operation',
+ rootType: 'OperationList',
+ provides: ['Operation:{id}', 'Operation[]'],
invalidates: [],
responseCodec: CODECS['OperationList'],
},
@@ -987,7 +997,9 @@ export const ops = {
'cloudPools.list': {
method: 'GET',
path: '/api/v1/clouds/{cloudId}/pools',
- provides: [],
+ entity: 'Pool',
+ rootType: 'PoolList',
+ provides: ['Pool:{id}', 'Pool[]'],
invalidates: [],
responseCodec: CODECS['PoolList'],
},
@@ -1052,7 +1064,9 @@ export const ops = {
'cloudServers.list': {
method: 'GET',
path: '/api/v1/clouds/{cloudId}/servers',
- provides: [],
+ entity: 'Server',
+ rootType: 'ServerList',
+ provides: ['Server:{id}', 'Server[]'],
invalidates: [],
responseCodec: CODECS['ServerList'],
},
@@ -1102,7 +1116,9 @@ export const ops = {
'organizationCloudTargets.list': {
method: 'GET',
path: '/api/v1/clouds/{cloudId}/targets',
- provides: [],
+ entity: 'CloudprofilesTarget',
+ rootType: 'CloudTargetList',
+ provides: ['CloudprofilesTarget:{id}', 'CloudprofilesTarget[]'],
invalidates: [],
responseCodec: CODECS['CloudTargetList'],
},
@@ -1451,7 +1467,9 @@ export const ops = {
'dnsZones.list': {
method: 'GET',
path: '/api/v1/dns-zones',
- provides: [],
+ entity: 'Zone',
+ rootType: 'ZoneList',
+ provides: ['Zone:{id}', 'Zone[]'],
invalidates: [],
responseCodec: CODECS['ZoneList'],
},
@@ -1543,7 +1561,9 @@ export const ops = {
'domainRegistrations.list': {
method: 'GET',
path: '/api/v1/domain-registrations',
- provides: [],
+ entity: 'Registration',
+ rootType: 'RegistrationList',
+ provides: ['Registration:{id}', 'Registration[]'],
invalidates: [],
responseCodec: CODECS['RegistrationList'],
},
@@ -1589,8 +1609,9 @@ export const ops = {
'domains.overview': {
method: 'GET',
path: '/api/v1/domains',
+ entity: 'Registration',
rootType: 'DomainOverview',
- provides: [],
+ provides: ['Registration:{id}', 'Registration[]'],
invalidates: [],
responseCodec: CODECS['DomainOverview'],
},
@@ -2440,7 +2461,9 @@ export const ops = {
'cloudSyncs.list': {
method: 'GET',
path: '/api/v1/projects/{id}/cloud-syncs',
- provides: [],
+ entity: 'Sync',
+ rootType: 'CloudSyncList',
+ provides: ['Sync:{id}', 'Sync[]'],
invalidates: [],
responseCodec: CODECS['CloudSyncList'],
},
@@ -2494,7 +2517,9 @@ export const ops = {
'clouds.list': {
method: 'GET',
path: '/api/v1/projects/{id}/clouds',
- provides: [],
+ entity: 'Profile',
+ rootType: 'PlanningCloudList',
+ provides: ['Profile:{id}', 'Profile[]'],
invalidates: [],
responseCodec: CODECS['PlanningCloudList'],
},
@@ -2564,7 +2589,9 @@ export const ops = {
'cloudTargets.list': {
method: 'GET',
path: '/api/v1/projects/{id}/clouds/{cloudId}/targets',
- provides: [],
+ entity: 'CloudprofilesTarget',
+ rootType: 'CloudTargetList',
+ provides: ['CloudprofilesTarget:{id}', 'CloudprofilesTarget[]'],
invalidates: [],
responseCodec: CODECS['CloudTargetList'],
},
@@ -2682,6 +2709,7 @@ export const ops = {
'environmentClouds.get': {
method: 'GET',
path: '/api/v1/projects/{id}/environments/{environmentId}/cloud',
+ rootType: 'EnvironmentCloud',
provides: [],
invalidates: [],
responseCodec: CODECS['EnvironmentCloud'],
@@ -2908,7 +2936,9 @@ export const ops = {
'releaseReports.list': {
method: 'GET',
path: '/api/v1/projects/{id}/release-reports',
- provides: [],
+ entity: 'ReleaseReport',
+ rootType: 'ReleaseReportList',
+ provides: ['ReleaseReport:{id}', 'ReleaseReport[]'],
invalidates: [],
responseCodec: CODECS['ReleaseReportList'],
},
@@ -3001,9 +3031,9 @@ export const ops = {
'sources.delete': {
method: 'DELETE',
path: '/api/v1/projects/{id}/sources/{alias}',
- entity: 'Source',
+ entity: 'DiscoverySource',
provides: [],
- invalidates: ['Source[]'],
+ invalidates: ['DiscoverySource[]'],
},
'projects.setTeam': {
method: 'PUT',
@@ -3054,7 +3084,9 @@ export const ops = {
'domainRoutes.list': {
method: 'GET',
path: '/api/v1/projects/{projectId}/domain-routes',
- provides: [],
+ entity: 'CloudinfraRoute',
+ rootType: 'DomainRouteList',
+ provides: ['CloudinfraRoute:{id}', 'CloudinfraRoute[]'],
invalidates: [],
responseCodec: CODECS['DomainRouteList'],
},
@@ -3102,7 +3134,9 @@ export const ops = {
'domainRoutes.history': {
method: 'GET',
path: '/api/v1/projects/{projectId}/domain-routes/{routeId}/operations',
- provides: [],
+ entity: 'RouteOperation',
+ rootType: 'DomainOperationList',
+ provides: ['RouteOperation:{id}', 'RouteOperation[]'],
invalidates: [],
responseCodec: CODECS['DomainOperationList'],
},
@@ -3536,6 +3570,7 @@ export const ops = {
'providerResources.list': {
method: 'GET',
path: '/api/v1/provider-resources',
+ rootType: 'ProviderResourceList',
provides: [],
invalidates: [],
responseCodec: CODECS['ProviderResourceList'],
@@ -3613,12 +3648,6 @@ export const ops = {
invalidates: [],
responseCodec: CODECS['TestPushResult'],
},
- 'realtime.events': {
- method: 'GET',
- path: '/api/v1/realtime/events',
- provides: [],
- invalidates: [],
- },
'realtime.snapshot': {
method: 'GET',
path: '/api/v1/realtime/snapshot',
@@ -3626,12 +3655,6 @@ export const ops = {
invalidates: [],
responseCodec: CODECS['Snapshot'],
},
- 'realtime.ws': {
- method: 'GET',
- path: '/api/v1/realtime/ws',
- provides: [],
- invalidates: [],
- },
'releaseReports.get': {
method: 'GET',
path: '/api/v1/release-reports/{id}',
@@ -3935,7 +3958,6 @@ export const entities = {
'Binding': { idField: 'id' },
'BindingList': { fields: { 'bindings': 'Binding' } },
'BitbucketStatus': { fields: { 'workspaces': 'BitbucketWorkspaceView' } },
- 'BitbucketWorkspace': { idField: 'id' },
'BitbucketWorkspaceView': { idField: 'id' },
'CLIOrganization': { idField: 'id' },
'CLIOrganizationList': { fields: { 'organizations': 'CLIOrganization' } },
@@ -3952,6 +3974,8 @@ export const entities = {
'CloudLocation': { idField: 'id' },
'CloudLocationList': { fields: { 'locations': 'CloudLocation' } },
'CloudSyncEvent': { idField: 'id' },
+ 'CloudSyncList': { fields: { 'syncs': 'Sync' } },
+ 'CloudTargetList': { fields: { 'targets': 'CloudprofilesTarget' } },
'CloudinfraRoute': { idField: 'id' },
'CloudprofilesTarget': { idField: 'id' },
'ClusterCapacity': { idField: 'resourceId' },
@@ -3974,10 +3998,14 @@ export const entities = {
'DeploymentsDeployment': { idField: 'id' },
'DiscoverySource': { idField: 'id' },
'DomainDetail': { fields: { 'domain': 'ZoneOverview', 'parent': 'ZoneOverview', 'proofZone': 'ZoneOverview', 'registration': 'Registration', 'subdomains': 'ZoneOverview' } },
- 'DomainOverview': { fields: { 'zones': 'ZoneOverview' } },
+ 'DomainOperationList': { fields: { 'operations': 'RouteOperation' } },
+ 'DomainOverview': { fields: { 'registrations': 'Registration', 'zones': 'ZoneOverview' } },
+ 'DomainRouteList': { fields: { 'routes': 'CloudinfraRoute' } },
+ 'EndpointList': { fields: { 'endpoints': 'CatalogconnectEndpoint' } },
'EntryDetail': { idField: 'id' },
'EntrySummary': { idField: 'id' },
'Environment': { idField: 'id' },
+ 'EnvironmentCloud': { fields: { 'assignment': 'Assignment' } },
'EnvironmentList': { fields: { 'environments': 'Environment' } },
'EventPage': { fields: { 'items': 'FleetEvent' } },
'Expansion': { idField: 'id' },
@@ -4010,6 +4038,7 @@ export const entities = {
'ManagedRegistryView': { fields: { 'backups': 'ManagedRegistryBackup' } },
'ManifestDraft': { idField: 'projectId' },
'MemberPrerequisite': { idField: 'id' },
+ 'ModelDeploymentList': { fields: { 'models': 'ModelsStatus' } },
'ModelsStatus': { fields: { 'entry': 'EntrySummary' } },
'MoveAll': { fields: { 'host': 'Host' } },
'NativeInventory': { fields: { 'points': 'NativePoint', 'source': 'NativeSource' } },
@@ -4030,6 +4059,7 @@ export const entities = {
'NotificationCreated': { idField: 'id' },
'NotificationList': { fields: { 'items': 'Notification' } },
'Operation': { idField: 'id' },
+ 'OperationList': { fields: { 'operations': 'Operation' } },
'OperationResult': { fields: { 'instance': 'Instance', 'operation': 'FleetOperation' } },
'OrgInvitation': { idField: 'id' },
'OrgInvitationList': { fields: { 'invitations': 'OrgInvitation' } },
@@ -4038,10 +4068,12 @@ export const entities = {
'PendingNodeJoinToken': { idField: 'id' },
'Plan': { idField: 'id', fields: { 'actions': 'Action' } },
'PlanList': { fields: { 'plans': 'Plan' } },
+ 'PlanningCloudList': { fields: { 'clouds': 'Profile' } },
'PlanningTenantList': { fields: { 'tenants': 'FabriqloomTenant' } },
'Policy': { idField: 'id' },
'PolicyList': { fields: { 'policies': 'Policy' } },
'Pool': { idField: 'id' },
+ 'PoolList': { fields: { 'pools': 'Pool' } },
'Preview': { idField: 'id', fields: { 'after': 'CloudprofilesTarget', 'afterAssignment': 'Assignment', 'before': 'CloudprofilesTarget', 'beforeAssignment': 'Assignment' } },
'Profile': { idField: 'id' },
'Project': { idField: 'id' },
@@ -4051,6 +4083,7 @@ export const entities = {
'ProjectZoneList': { fields: { 'zones': 'ProjectZone' } },
'ProviderKey': { idField: 'id' },
'ProviderResource': { idField: 'id' },
+ 'ProviderResourceList': { fields: { 'resources': 'ProviderResource', 'syncs': 'ProviderResourceSync' } },
'ProviderResourceSync': { idField: 'id' },
'ProviderZoneList': { fields: { 'zones': 'DNSZone' } },
'PushDevice': { idField: 'id' },
@@ -4059,12 +4092,16 @@ export const entities = {
'Region': { idField: 'id' },
'RegionList': { fields: { 'regions': 'Region' } },
'Registration': { idField: 'id' },
+ 'RegistrationList': { fields: { 'registrations': 'Registration' } },
'RegistryList': { fields: { 'entries': 'EntrySummary' } },
'ReleaseReport': { idField: 'id' },
'ReleaseReportEvent': { idField: 'id' },
+ 'ReleaseReportList': { fields: { 'reports': 'ReleaseReport' } },
'Report': { idField: 'id' },
+ 'ReportList': { fields: { 'reports': 'Report' } },
'Request': { idField: 'id' },
'RequestEvent': { idField: 'id' },
+ 'RequestList': { fields: { 'requests': 'Request' } },
'Resolution': { fields: { 'variables': 'ResolvedVariable' } },
'ResolvedVariable': { fields: { 'overrides': 'Variable', 'variable': 'Variable' } },
'Restore': { idField: 'id' },
@@ -4081,6 +4118,7 @@ export const entities = {
'ScalingPool': { fields: { 'pool': 'Pool' } },
'Sent': { fields: { 'conversation': 'Conversation', 'task': 'Task' } },
'Server': { idField: 'id' },
+ 'ServerList': { fields: { 'servers': 'Server' } },
'Source': { idField: 'id' },
'SourceList': { fields: { 'sources': 'DiscoverySource' } },
'SourceState': { fields: { 'latest': 'Analysis', 'shown': 'Analysis', 'source': 'DiscoverySource' } },
@@ -4096,11 +4134,13 @@ export const entities = {
'TemplateRelease': { idField: 'id' },
'Variable': { idField: 'id' },
'VariableList': { fields: { 'variables': 'Variable' } },
+ 'View': { fields: { 'providerKeys': 'ProviderKey' } },
'Watch': { idField: 'id' },
'WebhookEndpoint': { idField: 'id' },
'WebhookEndpointList': { fields: { 'items': 'WebhookEndpoint' } },
'WebhookEndpointSecret': { fields: { 'endpoint': 'WebhookEndpoint' } },
'Zone': { idField: 'id', fields: { 'providerZone': 'DNSZone' } },
+ 'ZoneList': { fields: { 'zones': 'Zone' } },
'ZoneOverview': { fields: { 'zone': 'Zone' } },
} as const satisfies Record;
@@ -4145,19 +4185,19 @@ export const streams = [
kind: 'entity',
channel: '/api/v1/realtime/events',
message: 'source.updated',
- entity: 'Source',
+ entity: 'DiscoverySource',
intent: 'upsert',
- invalidates: ['Source[]'],
- decode: (payload: unknown) => decode(payload, CODECS['Source']),
+ invalidates: ['DiscoverySource[]'],
+ decode: (payload: unknown) => decode(payload, CODECS['DiscoverySource']),
},
{
kind: 'entity',
channel: '/api/v1/realtime/events',
message: 'source.deleted',
- entity: 'Source',
+ entity: 'DiscoverySource',
intent: 'evict',
- invalidates: ['Source[]'],
- decode: (payload: unknown) => decode(payload, CODECS['Source']),
+ invalidates: ['DiscoverySource[]'],
+ decode: (payload: unknown) => decode(payload, CODECS['DiscoverySource']),
},
{
kind: 'entity',
@@ -4253,19 +4293,19 @@ export const streams = [
kind: 'entity',
channel: '/api/v1/realtime/events',
message: 'deployment.updated',
- entity: 'Deployment',
+ entity: 'DeploymentsDeployment',
intent: 'upsert',
- invalidates: ['Deployment[]', 'Instance[]'],
- decode: (payload: unknown) => decode(payload, CODECS['Deployment']),
+ invalidates: ['DeploymentsDeployment[]', 'Instance[]'],
+ decode: (payload: unknown) => decode(payload, CODECS['DeploymentsDeployment']),
},
{
kind: 'entity',
channel: '/api/v1/realtime/events',
message: 'deployment.deleted',
- entity: 'Deployment',
+ entity: 'DeploymentsDeployment',
intent: 'evict',
- invalidates: ['Deployment[]'],
- decode: (payload: unknown) => decode(payload, CODECS['Deployment']),
+ invalidates: ['DeploymentsDeployment[]'],
+ decode: (payload: unknown) => decode(payload, CODECS['DeploymentsDeployment']),
},
{
kind: 'entity',
@@ -4273,7 +4313,7 @@ export const streams = [
message: 'canary_verdict.updated',
entity: 'CanaryVerdict',
intent: 'upsert',
- invalidates: ['CanaryReport'],
+ invalidates: ['CanaryVerdict[]'],
decode: (payload: unknown) => decode(payload, CODECS['CanaryVerdict']),
},
{
@@ -4282,7 +4322,7 @@ export const streams = [
message: 'canary_verdict.deleted',
entity: 'CanaryVerdict',
intent: 'evict',
- invalidates: ['CanaryReport'],
+ invalidates: ['CanaryVerdict[]'],
decode: (payload: unknown) => decode(payload, CODECS['CanaryVerdict']),
},
{
@@ -4325,19 +4365,19 @@ export const streams = [
kind: 'entity',
channel: '/api/v1/realtime/events',
message: 'cloud_target.updated',
- entity: 'Target',
+ entity: 'CloudprofilesTarget',
intent: 'upsert',
- invalidates: ['Target[]'],
- decode: (payload: unknown) => decode(payload, CODECS['Target']),
+ invalidates: ['CloudprofilesTarget[]'],
+ decode: (payload: unknown) => decode(payload, CODECS['CloudprofilesTarget']),
},
{
kind: 'entity',
channel: '/api/v1/realtime/events',
message: 'cloud_target.deleted',
- entity: 'Target',
+ entity: 'CloudprofilesTarget',
intent: 'evict',
- invalidates: ['Target[]'],
- decode: (payload: unknown) => decode(payload, CODECS['Target']),
+ invalidates: ['CloudprofilesTarget[]'],
+ decode: (payload: unknown) => decode(payload, CODECS['CloudprofilesTarget']),
},
{
kind: 'entity',
@@ -4354,7 +4394,7 @@ export const streams = [
message: 'cloud_sync.updated',
entity: 'CloudSyncEvent',
intent: 'patch',
- invalidates: ['Sync', 'Sync[]', 'EnvironmentCloud'],
+ invalidates: ['Sync:{id}', 'Sync[]', 'EnvironmentCloud'],
decode: (payload: unknown) => decode(payload, CODECS['CloudSyncEvent']),
},
{
@@ -4363,7 +4403,7 @@ export const streams = [
message: 'cloud_cluster.updated',
entity: 'ClusterChange',
intent: 'patch',
- invalidates: ['CloudCluster', 'CloudClusterPage', 'CloudClusterOperation', 'CloudClusterOperationPage', 'Target', 'Target[]', 'Connection', 'Connection[]', 'Profile', 'Profile[]'],
+ invalidates: ['CloudCluster:{resourceId}', 'CloudCluster[]', 'CloudClusterOperation:{operationId}', 'CloudClusterOperation[]', 'CloudprofilesTarget[]', 'Connection[]', 'Profile:{cloudId}'],
decode: (payload: unknown) => decode(payload, CODECS['ClusterChange']),
},
{
@@ -4372,7 +4412,7 @@ export const streams = [
message: 'cloud_capacity.updated',
entity: 'CapacityChange',
intent: 'patch',
- invalidates: ['CapacityPolicyView:{cloud_id}', 'CapacityUsage:{cloud_id}', 'Expansion[]'],
+ invalidates: ['CapacityPolicyView:{cloudId}', 'CapacityUsage:{cloudId}', 'Expansion[]'],
decode: (payload: unknown) => decode(payload, CODECS['CapacityChange']),
},
{
@@ -4381,7 +4421,7 @@ export const streams = [
message: 'notification.created',
entity: 'NotificationCreated',
intent: 'upsert',
- invalidates: ['NotificationList'],
+ invalidates: ['Notification[]'],
decode: (payload: unknown) => decode(payload, CODECS['NotificationCreated']),
},
{
@@ -4398,8 +4438,8 @@ export const streams = [
channel: '/api/v1/realtime/events',
message: 'agent_task.updated',
entity: 'TaskEvent',
- intent: 'upsert',
- invalidates: ['AgentTask', 'AgentTask[]'],
+ intent: 'patch',
+ invalidates: ['Task:{id}'],
decode: (payload: unknown) => decode(payload, CODECS['TaskEvent']),
},
{
@@ -4407,8 +4447,8 @@ export const streams = [
channel: '/api/v1/realtime/events',
message: 'agent_task.deleted',
entity: 'TaskEvent',
- intent: 'evict',
- invalidates: ['TaskEvent[]'],
+ intent: 'patch',
+ invalidates: ['Task:{id}'],
decode: (payload: unknown) => decode(payload, CODECS['TaskEvent']),
},
{
@@ -4417,7 +4457,7 @@ export const streams = [
message: 'agent_report.updated',
entity: 'Report',
intent: 'upsert',
- invalidates: ['AgentReport', 'AgentReport[]'],
+ invalidates: ['Report[]'],
decode: (payload: unknown) => decode(payload, CODECS['Report']),
},
{
@@ -4434,8 +4474,8 @@ export const streams = [
channel: '/api/v1/realtime/events',
message: 'agent_request.updated',
entity: 'RequestEvent',
- intent: 'upsert',
- invalidates: ['AgentRequest', 'AgentRequest[]'],
+ intent: 'patch',
+ invalidates: ['Request:{id}', 'Request[]'],
decode: (payload: unknown) => decode(payload, CODECS['RequestEvent']),
},
{
@@ -4443,8 +4483,8 @@ export const streams = [
channel: '/api/v1/realtime/events',
message: 'agent_request.deleted',
entity: 'RequestEvent',
- intent: 'evict',
- invalidates: ['RequestEvent[]'],
+ intent: 'patch',
+ invalidates: ['Request:{id}', 'Request[]'],
decode: (payload: unknown) => decode(payload, CODECS['RequestEvent']),
},
{
@@ -4452,8 +4492,8 @@ export const streams = [
channel: '/api/v1/realtime/events',
message: 'release_report.updated',
entity: 'ReleaseReportEvent',
- intent: 'upsert',
- invalidates: ['ReleaseReport', 'ReleaseReport[]'],
+ intent: 'patch',
+ invalidates: ['ReleaseReport:{id}', 'ReleaseReport[]'],
decode: (payload: unknown) => decode(payload, CODECS['ReleaseReportEvent']),
},
{
@@ -4461,8 +4501,8 @@ export const streams = [
channel: '/api/v1/realtime/events',
message: 'release_report.deleted',
entity: 'ReleaseReportEvent',
- intent: 'evict',
- invalidates: ['ReleaseReport', 'ReleaseReport[]'],
+ intent: 'patch',
+ invalidates: ['ReleaseReport:{id}', 'ReleaseReport[]'],
decode: (payload: unknown) => decode(payload, CODECS['ReleaseReportEvent']),
},
{
@@ -4523,19 +4563,19 @@ export const streams = [
kind: 'entity',
channel: '/api/v1/realtime/ws',
message: 'source.updated',
- entity: 'Source',
+ entity: 'DiscoverySource',
intent: 'upsert',
- invalidates: ['Source[]'],
- decode: (payload: unknown) => decode(payload, CODECS['Source']),
+ invalidates: ['DiscoverySource[]'],
+ decode: (payload: unknown) => decode(payload, CODECS['DiscoverySource']),
},
{
kind: 'entity',
channel: '/api/v1/realtime/ws',
message: 'source.deleted',
- entity: 'Source',
+ entity: 'DiscoverySource',
intent: 'evict',
- invalidates: ['Source[]'],
- decode: (payload: unknown) => decode(payload, CODECS['Source']),
+ invalidates: ['DiscoverySource[]'],
+ decode: (payload: unknown) => decode(payload, CODECS['DiscoverySource']),
},
{
kind: 'entity',
@@ -4631,19 +4671,19 @@ export const streams = [
kind: 'entity',
channel: '/api/v1/realtime/ws',
message: 'deployment.updated',
- entity: 'Deployment',
+ entity: 'DeploymentsDeployment',
intent: 'upsert',
- invalidates: ['Deployment[]', 'Instance[]'],
- decode: (payload: unknown) => decode(payload, CODECS['Deployment']),
+ invalidates: ['DeploymentsDeployment[]', 'Instance[]'],
+ decode: (payload: unknown) => decode(payload, CODECS['DeploymentsDeployment']),
},
{
kind: 'entity',
channel: '/api/v1/realtime/ws',
message: 'deployment.deleted',
- entity: 'Deployment',
+ entity: 'DeploymentsDeployment',
intent: 'evict',
- invalidates: ['Deployment[]'],
- decode: (payload: unknown) => decode(payload, CODECS['Deployment']),
+ invalidates: ['DeploymentsDeployment[]'],
+ decode: (payload: unknown) => decode(payload, CODECS['DeploymentsDeployment']),
},
{
kind: 'entity',
@@ -4651,7 +4691,7 @@ export const streams = [
message: 'canary_verdict.updated',
entity: 'CanaryVerdict',
intent: 'upsert',
- invalidates: ['CanaryReport'],
+ invalidates: ['CanaryVerdict[]'],
decode: (payload: unknown) => decode(payload, CODECS['CanaryVerdict']),
},
{
@@ -4660,7 +4700,7 @@ export const streams = [
message: 'canary_verdict.deleted',
entity: 'CanaryVerdict',
intent: 'evict',
- invalidates: ['CanaryReport'],
+ invalidates: ['CanaryVerdict[]'],
decode: (payload: unknown) => decode(payload, CODECS['CanaryVerdict']),
},
{
@@ -4703,19 +4743,19 @@ export const streams = [
kind: 'entity',
channel: '/api/v1/realtime/ws',
message: 'cloud_target.updated',
- entity: 'Target',
+ entity: 'CloudprofilesTarget',
intent: 'upsert',
- invalidates: ['Target[]'],
- decode: (payload: unknown) => decode(payload, CODECS['Target']),
+ invalidates: ['CloudprofilesTarget[]'],
+ decode: (payload: unknown) => decode(payload, CODECS['CloudprofilesTarget']),
},
{
kind: 'entity',
channel: '/api/v1/realtime/ws',
message: 'cloud_target.deleted',
- entity: 'Target',
+ entity: 'CloudprofilesTarget',
intent: 'evict',
- invalidates: ['Target[]'],
- decode: (payload: unknown) => decode(payload, CODECS['Target']),
+ invalidates: ['CloudprofilesTarget[]'],
+ decode: (payload: unknown) => decode(payload, CODECS['CloudprofilesTarget']),
},
{
kind: 'entity',
@@ -4732,7 +4772,7 @@ export const streams = [
message: 'cloud_sync.updated',
entity: 'CloudSyncEvent',
intent: 'patch',
- invalidates: ['Sync', 'Sync[]', 'EnvironmentCloud'],
+ invalidates: ['Sync:{id}', 'Sync[]', 'EnvironmentCloud'],
decode: (payload: unknown) => decode(payload, CODECS['CloudSyncEvent']),
},
{
@@ -4741,7 +4781,7 @@ export const streams = [
message: 'cloud_cluster.updated',
entity: 'ClusterChange',
intent: 'patch',
- invalidates: ['CloudCluster', 'CloudClusterPage', 'CloudClusterOperation', 'CloudClusterOperationPage', 'Target', 'Target[]', 'Connection', 'Connection[]', 'Profile', 'Profile[]'],
+ invalidates: ['CloudCluster:{resourceId}', 'CloudCluster[]', 'CloudClusterOperation:{operationId}', 'CloudClusterOperation[]', 'CloudprofilesTarget[]', 'Connection[]', 'Profile:{cloudId}'],
decode: (payload: unknown) => decode(payload, CODECS['ClusterChange']),
},
{
@@ -4750,7 +4790,7 @@ export const streams = [
message: 'cloud_capacity.updated',
entity: 'CapacityChange',
intent: 'patch',
- invalidates: ['CapacityPolicyView:{cloud_id}', 'CapacityUsage:{cloud_id}', 'Expansion[]'],
+ invalidates: ['CapacityPolicyView:{cloudId}', 'CapacityUsage:{cloudId}', 'Expansion[]'],
decode: (payload: unknown) => decode(payload, CODECS['CapacityChange']),
},
{
@@ -4759,7 +4799,7 @@ export const streams = [
message: 'notification.created',
entity: 'NotificationCreated',
intent: 'upsert',
- invalidates: ['NotificationList'],
+ invalidates: ['Notification[]'],
decode: (payload: unknown) => decode(payload, CODECS['NotificationCreated']),
},
{
@@ -4776,8 +4816,8 @@ export const streams = [
channel: '/api/v1/realtime/ws',
message: 'agent_task.updated',
entity: 'TaskEvent',
- intent: 'upsert',
- invalidates: ['AgentTask', 'AgentTask[]'],
+ intent: 'patch',
+ invalidates: ['Task:{id}'],
decode: (payload: unknown) => decode(payload, CODECS['TaskEvent']),
},
{
@@ -4785,8 +4825,8 @@ export const streams = [
channel: '/api/v1/realtime/ws',
message: 'agent_task.deleted',
entity: 'TaskEvent',
- intent: 'evict',
- invalidates: ['TaskEvent[]'],
+ intent: 'patch',
+ invalidates: ['Task:{id}'],
decode: (payload: unknown) => decode(payload, CODECS['TaskEvent']),
},
{
@@ -4795,7 +4835,7 @@ export const streams = [
message: 'agent_report.updated',
entity: 'Report',
intent: 'upsert',
- invalidates: ['AgentReport', 'AgentReport[]'],
+ invalidates: ['Report[]'],
decode: (payload: unknown) => decode(payload, CODECS['Report']),
},
{
@@ -4812,8 +4852,8 @@ export const streams = [
channel: '/api/v1/realtime/ws',
message: 'agent_request.updated',
entity: 'RequestEvent',
- intent: 'upsert',
- invalidates: ['AgentRequest', 'AgentRequest[]'],
+ intent: 'patch',
+ invalidates: ['Request:{id}', 'Request[]'],
decode: (payload: unknown) => decode(payload, CODECS['RequestEvent']),
},
{
@@ -4821,8 +4861,8 @@ export const streams = [
channel: '/api/v1/realtime/ws',
message: 'agent_request.deleted',
entity: 'RequestEvent',
- intent: 'evict',
- invalidates: ['RequestEvent[]'],
+ intent: 'patch',
+ invalidates: ['Request:{id}', 'Request[]'],
decode: (payload: unknown) => decode(payload, CODECS['RequestEvent']),
},
{
@@ -4830,8 +4870,8 @@ export const streams = [
channel: '/api/v1/realtime/ws',
message: 'release_report.updated',
entity: 'ReleaseReportEvent',
- intent: 'upsert',
- invalidates: ['ReleaseReport', 'ReleaseReport[]'],
+ intent: 'patch',
+ invalidates: ['ReleaseReport:{id}', 'ReleaseReport[]'],
decode: (payload: unknown) => decode(payload, CODECS['ReleaseReportEvent']),
},
{
@@ -4839,8 +4879,8 @@ export const streams = [
channel: '/api/v1/realtime/ws',
message: 'release_report.deleted',
entity: 'ReleaseReportEvent',
- intent: 'evict',
- invalidates: ['ReleaseReport', 'ReleaseReport[]'],
+ intent: 'patch',
+ invalidates: ['ReleaseReport:{id}', 'ReleaseReport[]'],
decode: (payload: unknown) => decode(payload, CODECS['ReleaseReportEvent']),
},
{
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/agentReports.list.ts b/apps/dashboard/src/client/forge/loomplane/ops/agentReports.list.ts
index b43fc2af4..536a6d175 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/agentReports.list.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/agentReports.list.ts
@@ -4,7 +4,9 @@ import { codec_ReportList } from '../codecs/ReportList';
export const op_agentReports_list = {
method: 'GET',
path: '/api/v1/agent/reports',
- provides: [],
+ entity: 'Report',
+ rootType: 'ReportList',
+ provides: ['Report:{id}', 'Report[]'],
invalidates: [],
responseCodec: codec_ReportList,
} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/agentRequests.list.ts b/apps/dashboard/src/client/forge/loomplane/ops/agentRequests.list.ts
index abefc617b..2f3d0be10 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/agentRequests.list.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/agentRequests.list.ts
@@ -4,7 +4,9 @@ import { codec_RequestList } from '../codecs/RequestList';
export const op_agentRequests_list = {
method: 'GET',
path: '/api/v1/agent/requests',
- provides: [],
+ entity: 'Request',
+ rootType: 'RequestList',
+ provides: ['Request:{id}', 'Request[]'],
invalidates: [],
responseCodec: codec_RequestList,
} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/agentTasks.stream.ts b/apps/dashboard/src/client/forge/loomplane/ops/agentTasks.stream.ts
deleted file mode 100644
index 74e6ed139..000000000
--- a/apps/dashboard/src/client/forge/loomplane/ops/agentTasks.stream.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import type { OperationMeta } from '../ops';
-
-export const op_agentTasks_stream = {
- method: 'GET',
- path: '/api/v1/agent/tasks/{id}/stream',
- provides: [],
- invalidates: [],
-} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/aiModelDeployments.list.ts b/apps/dashboard/src/client/forge/loomplane/ops/aiModelDeployments.list.ts
index dd1286474..ea0c080cb 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/aiModelDeployments.list.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/aiModelDeployments.list.ts
@@ -4,6 +4,7 @@ import { codec_ModelDeploymentList } from '../codecs/ModelDeploymentList';
export const op_aiModelDeployments_list = {
method: 'GET',
path: '/api/v1/ai/models/deployments',
+ rootType: 'ModelDeploymentList',
provides: [],
invalidates: [],
responseCodec: codec_ModelDeploymentList,
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/aiSettings.get.ts b/apps/dashboard/src/client/forge/loomplane/ops/aiSettings.get.ts
index 3db62af07..86a442694 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/aiSettings.get.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/aiSettings.get.ts
@@ -4,7 +4,9 @@ import { codec_View } from '../codecs/View';
export const op_aiSettings_get = {
method: 'GET',
path: '/api/v1/ai/settings',
- provides: [],
+ entity: 'ProviderKey',
+ rootType: 'View',
+ provides: ['ProviderKey:{id}', 'ProviderKey[]'],
invalidates: [],
responseCodec: codec_View,
} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/aiSettings.setBudget.ts b/apps/dashboard/src/client/forge/loomplane/ops/aiSettings.setBudget.ts
index bffd19705..1daad4875 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/aiSettings.setBudget.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/aiSettings.setBudget.ts
@@ -5,6 +5,7 @@ import { codec_WorkspaceBudgetInputBody } from '../codecs/WorkspaceBudgetInputBo
export const op_aiSettings_setBudget = {
method: 'PUT',
path: '/api/v1/ai/settings/budget',
+ rootType: 'View',
provides: [],
invalidates: [],
bodyCodec: codec_WorkspaceBudgetInputBody,
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/bitbucket.disconnect.ts b/apps/dashboard/src/client/forge/loomplane/ops/bitbucket.disconnect.ts
index 466bd9a30..730b4df05 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/bitbucket.disconnect.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/bitbucket.disconnect.ts
@@ -3,7 +3,7 @@ import type { OperationMeta } from '../ops';
export const op_bitbucket_disconnect = {
method: 'DELETE',
path: '/api/v1/bitbucket/workspaces/{id}',
- entity: 'BitbucketWorkspace',
+ entity: 'BitbucketWorkspaceView',
provides: [],
- invalidates: ['BitbucketWorkspace[]'],
+ invalidates: ['BitbucketWorkspaceView[]'],
} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/catalogEndpoints.list.ts b/apps/dashboard/src/client/forge/loomplane/ops/catalogEndpoints.list.ts
index 43297661c..2dd2528b9 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/catalogEndpoints.list.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/catalogEndpoints.list.ts
@@ -4,7 +4,9 @@ import { codec_EndpointList } from '../codecs/EndpointList';
export const op_catalogEndpoints_list = {
method: 'GET',
path: '/api/v1/catalog/endpoints',
- provides: [],
+ entity: 'CatalogconnectEndpoint',
+ rootType: 'EndpointList',
+ provides: ['CatalogconnectEndpoint:{id}', 'CatalogconnectEndpoint[]'],
invalidates: [],
responseCodec: codec_EndpointList,
} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/cloudClusters.preview.ts b/apps/dashboard/src/client/forge/loomplane/ops/cloudClusters.preview.ts
index 67142d464..272e92fb7 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/cloudClusters.preview.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/cloudClusters.preview.ts
@@ -8,7 +8,7 @@ export const op_cloudClusters_preview = {
entity: 'CloudClusterOperation',
rootType: 'CloudClusterOperation',
provides: ['CloudClusterOperation:{id}'],
- invalidates: ['CloudCluster', 'CloudClusterOperation', 'CloudClusterOperationPage', 'CloudClusterOperation[]', 'CloudClusterPage', 'RuntimeAttachmentPage'],
+ invalidates: ['CloudClusterOperation[]', 'CloudCluster[]'],
bodyCodec: codec_ClusterInputBody,
responseCodec: codec_CloudClusterOperation,
} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/cloudClusters.refreshCapacity.ts b/apps/dashboard/src/client/forge/loomplane/ops/cloudClusters.refreshCapacity.ts
index f1bded4d3..1a74e0ddc 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/cloudClusters.refreshCapacity.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/cloudClusters.refreshCapacity.ts
@@ -7,6 +7,6 @@ export const op_cloudClusters_refreshCapacity = {
entity: 'ClusterCapacity',
rootType: 'ClusterCapacity',
provides: ['ClusterCapacity:{resourceId}'],
- invalidates: ['CloudCluster', 'CloudClusterOperation', 'CloudClusterOperationPage', 'CloudClusterPage', 'ClusterCapacity[]', 'RuntimeAttachmentPage'],
+ invalidates: ['CloudCluster:{res.resourceId}', 'CloudClusterOperation[]', 'CloudCluster[]', 'ClusterCapacity[]', 'RuntimeAttachmentPage:{res.resourceId}'],
responseCodec: codec_ClusterCapacity,
} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/cloudClusters.retirementPreview.ts b/apps/dashboard/src/client/forge/loomplane/ops/cloudClusters.retirementPreview.ts
index 756523d29..7c3e2f606 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/cloudClusters.retirementPreview.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/cloudClusters.retirementPreview.ts
@@ -6,7 +6,7 @@ export const op_cloudClusters_retirementPreview = {
method: 'POST',
path: '/api/v1/clouds/{cloudId}/clusters/{clusterId}/retirement/preview',
provides: [],
- invalidates: ['CloudCluster', 'CloudClusterOperation', 'CloudClusterOperationPage', 'CloudClusterPage', 'RuntimeAttachmentPage'],
+ invalidates: ['CloudCluster:{res.resourceId}', 'CloudClusterOperation[]', 'CloudCluster[]', 'RuntimeAttachmentPage:{res.resourceId}'],
bodyCodec: codec_ClusterRetirementPreviewInputBody,
responseCodec: codec_ClusterRetirementReview,
} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/cloudPools.list.ts b/apps/dashboard/src/client/forge/loomplane/ops/cloudPools.list.ts
index f2c9cec64..9f48eee53 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/cloudPools.list.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/cloudPools.list.ts
@@ -4,7 +4,9 @@ import { codec_PoolList } from '../codecs/PoolList';
export const op_cloudPools_list = {
method: 'GET',
path: '/api/v1/clouds/{cloudId}/pools',
- provides: [],
+ entity: 'Pool',
+ rootType: 'PoolList',
+ provides: ['Pool:{id}', 'Pool[]'],
invalidates: [],
responseCodec: codec_PoolList,
} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/cloudServers.list.ts b/apps/dashboard/src/client/forge/loomplane/ops/cloudServers.list.ts
index f86cd8b77..37b81ba59 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/cloudServers.list.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/cloudServers.list.ts
@@ -4,7 +4,9 @@ import { codec_ServerList } from '../codecs/ServerList';
export const op_cloudServers_list = {
method: 'GET',
path: '/api/v1/clouds/{cloudId}/servers',
- provides: [],
+ entity: 'Server',
+ rootType: 'ServerList',
+ provides: ['Server:{id}', 'Server[]'],
invalidates: [],
responseCodec: codec_ServerList,
} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/cloudSyncs.list.ts b/apps/dashboard/src/client/forge/loomplane/ops/cloudSyncs.list.ts
index 6bc1d5e35..56ee01cf6 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/cloudSyncs.list.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/cloudSyncs.list.ts
@@ -4,7 +4,9 @@ import { codec_CloudSyncList } from '../codecs/CloudSyncList';
export const op_cloudSyncs_list = {
method: 'GET',
path: '/api/v1/projects/{id}/cloud-syncs',
- provides: [],
+ entity: 'Sync',
+ rootType: 'CloudSyncList',
+ provides: ['Sync:{id}', 'Sync[]'],
invalidates: [],
responseCodec: codec_CloudSyncList,
} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/cloudTargets.list.ts b/apps/dashboard/src/client/forge/loomplane/ops/cloudTargets.list.ts
index 21bdf5f3c..5471d7c64 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/cloudTargets.list.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/cloudTargets.list.ts
@@ -4,7 +4,9 @@ import { codec_CloudTargetList } from '../codecs/CloudTargetList';
export const op_cloudTargets_list = {
method: 'GET',
path: '/api/v1/projects/{id}/clouds/{cloudId}/targets',
- provides: [],
+ entity: 'CloudprofilesTarget',
+ rootType: 'CloudTargetList',
+ provides: ['CloudprofilesTarget:{id}', 'CloudprofilesTarget[]'],
invalidates: [],
responseCodec: codec_CloudTargetList,
} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/clouds.list.ts b/apps/dashboard/src/client/forge/loomplane/ops/clouds.list.ts
index 70d28be35..9bf632686 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/clouds.list.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/clouds.list.ts
@@ -4,7 +4,9 @@ import { codec_PlanningCloudList } from '../codecs/PlanningCloudList';
export const op_clouds_list = {
method: 'GET',
path: '/api/v1/projects/{id}/clouds',
- provides: [],
+ entity: 'Profile',
+ rootType: 'PlanningCloudList',
+ provides: ['Profile:{id}', 'Profile[]'],
invalidates: [],
responseCodec: codec_PlanningCloudList,
} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/clusterOperations.apply.ts b/apps/dashboard/src/client/forge/loomplane/ops/clusterOperations.apply.ts
index b25dc0acc..1f0d280e6 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/clusterOperations.apply.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/clusterOperations.apply.ts
@@ -8,7 +8,7 @@ export const op_clusterOperations_apply = {
entity: 'CloudClusterOperation',
rootType: 'CloudClusterOperation',
provides: ['CloudClusterOperation:{id}'],
- invalidates: ['CloudCluster', 'CloudClusterOperation', 'CloudClusterOperationPage', 'CloudClusterOperation[]', 'CloudClusterPage', 'RuntimeAttachmentPage'],
+ invalidates: ['CloudCluster:{res.resourceId}', 'CloudClusterOperation[]', 'CloudCluster[]', 'RuntimeAttachmentPage:{res.resourceId}'],
bodyCodec: codec_ApplyInputBody,
responseCodec: codec_CloudClusterOperation,
} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/clusterOperations.cancel.ts b/apps/dashboard/src/client/forge/loomplane/ops/clusterOperations.cancel.ts
index de7a4fcd2..bcbb31a48 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/clusterOperations.cancel.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/clusterOperations.cancel.ts
@@ -7,6 +7,6 @@ export const op_clusterOperations_cancel = {
entity: 'CloudClusterOperation',
rootType: 'CloudClusterOperation',
provides: ['CloudClusterOperation:{id}'],
- invalidates: ['CloudCluster', 'CloudClusterOperation', 'CloudClusterOperationPage', 'CloudClusterOperation[]', 'CloudClusterPage', 'RuntimeAttachmentPage'],
+ invalidates: ['CloudCluster:{res.resourceId}', 'CloudClusterOperation[]', 'CloudCluster[]', 'RuntimeAttachmentPage:{res.resourceId}'],
responseCodec: codec_CloudClusterOperation,
} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/clusterOperations.retry.ts b/apps/dashboard/src/client/forge/loomplane/ops/clusterOperations.retry.ts
index 141e6dc39..6f5744997 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/clusterOperations.retry.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/clusterOperations.retry.ts
@@ -7,6 +7,6 @@ export const op_clusterOperations_retry = {
entity: 'CloudClusterOperation',
rootType: 'CloudClusterOperation',
provides: ['CloudClusterOperation:{id}'],
- invalidates: ['CloudCluster', 'CloudClusterOperation', 'CloudClusterOperationPage', 'CloudClusterOperation[]', 'CloudClusterPage', 'RuntimeAttachmentPage'],
+ invalidates: ['CloudCluster:{res.resourceId}', 'CloudClusterOperation[]', 'CloudCluster[]', 'RuntimeAttachmentPage:{res.resourceId}'],
responseCodec: codec_CloudClusterOperation,
} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/dnsZones.list.ts b/apps/dashboard/src/client/forge/loomplane/ops/dnsZones.list.ts
index 847e6350f..14e688d8f 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/dnsZones.list.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/dnsZones.list.ts
@@ -4,7 +4,9 @@ import { codec_ZoneList } from '../codecs/ZoneList';
export const op_dnsZones_list = {
method: 'GET',
path: '/api/v1/dns-zones',
- provides: [],
+ entity: 'Zone',
+ rootType: 'ZoneList',
+ provides: ['Zone:{id}', 'Zone[]'],
invalidates: [],
responseCodec: codec_ZoneList,
} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/domainRegistrations.list.ts b/apps/dashboard/src/client/forge/loomplane/ops/domainRegistrations.list.ts
index d251cfd10..541be6b04 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/domainRegistrations.list.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/domainRegistrations.list.ts
@@ -4,7 +4,9 @@ import { codec_RegistrationList } from '../codecs/RegistrationList';
export const op_domainRegistrations_list = {
method: 'GET',
path: '/api/v1/domain-registrations',
- provides: [],
+ entity: 'Registration',
+ rootType: 'RegistrationList',
+ provides: ['Registration:{id}', 'Registration[]'],
invalidates: [],
responseCodec: codec_RegistrationList,
} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/domainRoutes.history.ts b/apps/dashboard/src/client/forge/loomplane/ops/domainRoutes.history.ts
index bfc7f71e2..24efbda50 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/domainRoutes.history.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/domainRoutes.history.ts
@@ -4,7 +4,9 @@ import { codec_DomainOperationList } from '../codecs/DomainOperationList';
export const op_domainRoutes_history = {
method: 'GET',
path: '/api/v1/projects/{projectId}/domain-routes/{routeId}/operations',
- provides: [],
+ entity: 'RouteOperation',
+ rootType: 'DomainOperationList',
+ provides: ['RouteOperation:{id}', 'RouteOperation[]'],
invalidates: [],
responseCodec: codec_DomainOperationList,
} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/domainRoutes.list.ts b/apps/dashboard/src/client/forge/loomplane/ops/domainRoutes.list.ts
index b68f9345c..6ec3285ec 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/domainRoutes.list.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/domainRoutes.list.ts
@@ -4,7 +4,9 @@ import { codec_DomainRouteList } from '../codecs/DomainRouteList';
export const op_domainRoutes_list = {
method: 'GET',
path: '/api/v1/projects/{projectId}/domain-routes',
- provides: [],
+ entity: 'CloudinfraRoute',
+ rootType: 'DomainRouteList',
+ provides: ['CloudinfraRoute:{id}', 'CloudinfraRoute[]'],
invalidates: [],
responseCodec: codec_DomainRouteList,
} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/domains.overview.ts b/apps/dashboard/src/client/forge/loomplane/ops/domains.overview.ts
index 4009eac32..f9ffd3838 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/domains.overview.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/domains.overview.ts
@@ -4,8 +4,9 @@ import { codec_DomainOverview } from '../codecs/DomainOverview';
export const op_domains_overview = {
method: 'GET',
path: '/api/v1/domains',
+ entity: 'Registration',
rootType: 'DomainOverview',
- provides: [],
+ provides: ['Registration:{id}', 'Registration[]'],
invalidates: [],
responseCodec: codec_DomainOverview,
} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/environmentClouds.get.ts b/apps/dashboard/src/client/forge/loomplane/ops/environmentClouds.get.ts
index 7ca3812a8..ca01dadfe 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/environmentClouds.get.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/environmentClouds.get.ts
@@ -4,6 +4,7 @@ import { codec_EnvironmentCloud } from '../codecs/EnvironmentCloud';
export const op_environmentClouds_get = {
method: 'GET',
path: '/api/v1/projects/{id}/environments/{environmentId}/cloud',
+ rootType: 'EnvironmentCloud',
provides: [],
invalidates: [],
responseCodec: codec_EnvironmentCloud,
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/infrastructureOperations.list.ts b/apps/dashboard/src/client/forge/loomplane/ops/infrastructureOperations.list.ts
index f1e2734a9..929a04b37 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/infrastructureOperations.list.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/infrastructureOperations.list.ts
@@ -4,7 +4,9 @@ import { codec_OperationList } from '../codecs/OperationList';
export const op_infrastructureOperations_list = {
method: 'GET',
path: '/api/v1/clouds/{cloudId}/infrastructure-operations',
- provides: [],
+ entity: 'Operation',
+ rootType: 'OperationList',
+ provides: ['Operation:{id}', 'Operation[]'],
invalidates: [],
responseCodec: codec_OperationList,
} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/organizationCloudSyncs.list.ts b/apps/dashboard/src/client/forge/loomplane/ops/organizationCloudSyncs.list.ts
index f081a136d..47f6a2dcf 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/organizationCloudSyncs.list.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/organizationCloudSyncs.list.ts
@@ -4,7 +4,9 @@ import { codec_CloudSyncList } from '../codecs/CloudSyncList';
export const op_organizationCloudSyncs_list = {
method: 'GET',
path: '/api/v1/clouds/syncs',
- provides: [],
+ entity: 'Sync',
+ rootType: 'CloudSyncList',
+ provides: ['Sync:{id}', 'Sync[]'],
invalidates: [],
responseCodec: codec_CloudSyncList,
} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/organizationCloudTargets.list.ts b/apps/dashboard/src/client/forge/loomplane/ops/organizationCloudTargets.list.ts
index 20a49a1f6..a0c217eac 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/organizationCloudTargets.list.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/organizationCloudTargets.list.ts
@@ -4,7 +4,9 @@ import { codec_CloudTargetList } from '../codecs/CloudTargetList';
export const op_organizationCloudTargets_list = {
method: 'GET',
path: '/api/v1/clouds/{cloudId}/targets',
- provides: [],
+ entity: 'CloudprofilesTarget',
+ rootType: 'CloudTargetList',
+ provides: ['CloudprofilesTarget:{id}', 'CloudprofilesTarget[]'],
invalidates: [],
responseCodec: codec_CloudTargetList,
} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/organizationClouds.list.ts b/apps/dashboard/src/client/forge/loomplane/ops/organizationClouds.list.ts
index bd59cfdb3..f1d854e1f 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/organizationClouds.list.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/organizationClouds.list.ts
@@ -4,7 +4,9 @@ import { codec_PlanningCloudList } from '../codecs/PlanningCloudList';
export const op_organizationClouds_list = {
method: 'GET',
path: '/api/v1/clouds',
- provides: [],
+ entity: 'Profile',
+ rootType: 'PlanningCloudList',
+ provides: ['Profile:{id}', 'Profile[]'],
invalidates: [],
responseCodec: codec_PlanningCloudList,
} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/providerResources.list.ts b/apps/dashboard/src/client/forge/loomplane/ops/providerResources.list.ts
index a242b2fbb..d463a5c5b 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/providerResources.list.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/providerResources.list.ts
@@ -4,6 +4,7 @@ import { codec_ProviderResourceList } from '../codecs/ProviderResourceList';
export const op_providerResources_list = {
method: 'GET',
path: '/api/v1/provider-resources',
+ rootType: 'ProviderResourceList',
provides: [],
invalidates: [],
responseCodec: codec_ProviderResourceList,
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/realtime.events.ts b/apps/dashboard/src/client/forge/loomplane/ops/realtime.events.ts
deleted file mode 100644
index 1ae953baf..000000000
--- a/apps/dashboard/src/client/forge/loomplane/ops/realtime.events.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import type { OperationMeta } from '../ops';
-
-export const op_realtime_events = {
- method: 'GET',
- path: '/api/v1/realtime/events',
- provides: [],
- invalidates: [],
-} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/realtime.ws.ts b/apps/dashboard/src/client/forge/loomplane/ops/realtime.ws.ts
deleted file mode 100644
index 5c72db6fb..000000000
--- a/apps/dashboard/src/client/forge/loomplane/ops/realtime.ws.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import type { OperationMeta } from '../ops';
-
-export const op_realtime_ws = {
- method: 'GET',
- path: '/api/v1/realtime/ws',
- provides: [],
- invalidates: [],
-} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/releaseReports.list.ts b/apps/dashboard/src/client/forge/loomplane/ops/releaseReports.list.ts
index deb33cba6..a61274ea3 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/releaseReports.list.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/releaseReports.list.ts
@@ -4,7 +4,9 @@ import { codec_ReleaseReportList } from '../codecs/ReleaseReportList';
export const op_releaseReports_list = {
method: 'GET',
path: '/api/v1/projects/{id}/release-reports',
- provides: [],
+ entity: 'ReleaseReport',
+ rootType: 'ReleaseReportList',
+ provides: ['ReleaseReport:{id}', 'ReleaseReport[]'],
invalidates: [],
responseCodec: codec_ReleaseReportList,
} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/sources.delete.ts b/apps/dashboard/src/client/forge/loomplane/ops/sources.delete.ts
index 2cc560b29..cb99729ac 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/sources.delete.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/sources.delete.ts
@@ -3,7 +3,7 @@ import type { OperationMeta } from '../ops';
export const op_sources_delete = {
method: 'DELETE',
path: '/api/v1/projects/{id}/sources/{alias}',
- entity: 'Source',
+ entity: 'DiscoverySource',
provides: [],
- invalidates: ['Source[]'],
+ invalidates: ['DiscoverySource[]'],
} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/rest.ts b/apps/dashboard/src/client/forge/loomplane/rest.ts
index 38c1af900..bb7a6d492 100644
--- a/apps/dashboard/src/client/forge/loomplane/rest.ts
+++ b/apps/dashboard/src/client/forge/loomplane/rest.ts
@@ -34,7 +34,7 @@ export class RESTClient extends Client {
let __path = `/api/v1/activity`;
const queryParams: Record = {};
if (days !== undefined) {
- queryParams['days'] = days;
+ queryParams["days"] = days;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -98,10 +98,10 @@ export class RESTClient extends Client {
let __path = `/api/v1/agent/conversations/${encodeURIComponent(String(id))}`;
const queryParams: Record = {};
if (before !== undefined) {
- queryParams['before'] = before;
+ queryParams["before"] = before;
}
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -126,16 +126,16 @@ export class RESTClient extends Client {
let __path = `/api/v1/agent/conversations`;
const queryParams: Record = {};
if (projectId !== undefined) {
- queryParams['project_id'] = projectId;
+ queryParams["project_id"] = projectId;
}
if (everyone !== undefined) {
- queryParams['everyone'] = everyone;
+ queryParams["everyone"] = everyone;
}
if (before !== undefined) {
- queryParams['before'] = before;
+ queryParams["before"] = before;
}
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -255,13 +255,13 @@ export class RESTClient extends Client {
let __path = `/api/v1/agent/reports`;
const queryParams: Record = {};
if (status !== undefined) {
- queryParams['status'] = status;
+ queryParams["status"] = status;
}
if (projectId !== undefined) {
- queryParams['project_id'] = projectId;
+ queryParams["project_id"] = projectId;
}
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -359,16 +359,16 @@ export class RESTClient extends Client {
let __path = `/api/v1/agent/requests`;
const queryParams: Record = {};
if (status !== undefined) {
- queryParams['status'] = status;
+ queryParams["status"] = status;
}
if (projectId !== undefined) {
- queryParams['project_id'] = projectId;
+ queryParams["project_id"] = projectId;
}
if (forParam !== undefined) {
- queryParams['for'] = forParam;
+ queryParams["for"] = forParam;
}
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -459,31 +459,6 @@ export class RESTClient extends Client {
return this.request(config);
},
- /**
- * Follow a task's events as they happen
- * Each agent.event carries one event, with its seq as the SSE id. Reconnect with Last-Event-ID (or after) set to the last seq you have, and the stream picks up at the next one. agent.end is the last frame: the task's final status.
- */
- stream: async (id: string, after?: number | undefined, options?: { signal?: AbortSignal; retry?: { maxAttempts?: number } }): Promise => {
- let __path = `/api/v1/agent/tasks/${encodeURIComponent(String(id))}/stream`;
- const queryParams: Record = {};
- if (after !== undefined) {
- queryParams['after'] = after;
- }
- const queryString = new URLSearchParams(queryParams).toString();
- if (queryString) {
- __path += '?' + queryString;
- }
- const config: RequestConfig = {
- method: 'GET',
- url: __path,
- signal: options?.signal,
- retry: options?.retry,
- allowEmptyBody: true,
- };
-
- await this.request(config);
- },
-
};
public readonly agentWatcher = {
@@ -667,7 +642,7 @@ export class RESTClient extends Client {
card: async (id?: string, options?: { signal?: AbortSignal; retry?: { maxAttempts?: number } }): Promise => {
let __path = `/api/v1/ai/models/registry/card`;
const queryParams: Record = {};
- queryParams['id'] = id;
+ queryParams["id"] = id;
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
__path += '?' + queryString;
@@ -708,7 +683,7 @@ export class RESTClient extends Client {
entry: async (id?: string, options?: { signal?: AbortSignal; retry?: { maxAttempts?: number } }): Promise => {
let __path = `/api/v1/ai/models/registry/entry`;
const queryParams: Record = {};
- queryParams['id'] = id;
+ queryParams["id"] = id;
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
__path += '?' + queryString;
@@ -767,13 +742,13 @@ export class RESTClient extends Client {
registry: async (q?: string, task?: string, size?: string, license?: string, commercial?: boolean, fits?: boolean, tested?: boolean, options?: { signal?: AbortSignal; retry?: { maxAttempts?: number } }): Promise => {
let __path = `/api/v1/ai/models/registry`;
const queryParams: Record = {};
- queryParams['q'] = q;
- queryParams['task'] = task;
- queryParams['size'] = size;
- queryParams['license'] = license;
- queryParams['commercial'] = commercial;
- queryParams['fits'] = fits;
- queryParams['tested'] = tested;
+ queryParams["q"] = q;
+ queryParams["task"] = task;
+ queryParams["size"] = size;
+ queryParams["license"] = license;
+ queryParams["commercial"] = commercial;
+ queryParams["fits"] = fits;
+ queryParams["tested"] = tested;
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
__path += '?' + queryString;
@@ -1061,7 +1036,7 @@ export class RESTClient extends Client {
let __path = `/api/v1/api-keys/${encodeURIComponent(String(id))}`;
const queryParams: Record = {};
if (compromised !== undefined) {
- queryParams['compromised'] = compromised;
+ queryParams["compromised"] = compromised;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -1123,7 +1098,7 @@ export class RESTClient extends Client {
list: async (id: string, environment?: string, options?: { signal?: AbortSignal; retry?: { maxAttempts?: number } }): Promise => {
let __path = `/api/v1/projects/${encodeURIComponent(String(id))}/bindings`;
const queryParams: Record = {};
- queryParams['environment'] = environment;
+ queryParams["environment"] = environment;
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
__path += '?' + queryString;
@@ -1603,13 +1578,13 @@ export class RESTClient extends Client {
let __path = `/api/v1/clouds/${encodeURIComponent(String(cloudId))}/clusters/${encodeURIComponent(String(clusterId))}/attachments`;
const queryParams: Record = {};
if (cursor !== undefined) {
- queryParams['cursor'] = cursor;
+ queryParams["cursor"] = cursor;
}
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
if (region !== undefined) {
- queryParams['region'] = region;
+ queryParams["region"] = region;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -1633,13 +1608,13 @@ export class RESTClient extends Client {
let __path = `/api/v1/clouds/${encodeURIComponent(String(cloudId))}/clusters/${encodeURIComponent(String(clusterId))}/capacity`;
const queryParams: Record = {};
if (cursor !== undefined) {
- queryParams['cursor'] = cursor;
+ queryParams["cursor"] = cursor;
}
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
if (region !== undefined) {
- queryParams['region'] = region;
+ queryParams["region"] = region;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -1663,13 +1638,13 @@ export class RESTClient extends Client {
let __path = `/api/v1/clouds/${encodeURIComponent(String(cloudId))}/clusters/${encodeURIComponent(String(clusterId))}`;
const queryParams: Record = {};
if (cursor !== undefined) {
- queryParams['cursor'] = cursor;
+ queryParams["cursor"] = cursor;
}
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
if (region !== undefined) {
- queryParams['region'] = region;
+ queryParams["region"] = region;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -1693,13 +1668,13 @@ export class RESTClient extends Client {
let __path = `/api/v1/clouds/${encodeURIComponent(String(cloudId))}/clusters`;
const queryParams: Record = {};
if (cursor !== undefined) {
- queryParams['cursor'] = cursor;
+ queryParams["cursor"] = cursor;
}
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
if (region !== undefined) {
- queryParams['region'] = region;
+ queryParams["region"] = region;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -1723,13 +1698,13 @@ export class RESTClient extends Client {
let __path = `/api/v1/clouds/${encodeURIComponent(String(cloudId))}/cluster-options/${encodeURIComponent(String(connectionId))}`;
const queryParams: Record = {};
if (cursor !== undefined) {
- queryParams['cursor'] = cursor;
+ queryParams["cursor"] = cursor;
}
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
if (region !== undefined) {
- queryParams['region'] = region;
+ queryParams["region"] = region;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -2252,13 +2227,13 @@ export class RESTClient extends Client {
let __path = `/api/v1/projects/${encodeURIComponent(String(id))}/cloud-syncs`;
const queryParams: Record = {};
if (before !== undefined) {
- queryParams['before'] = before;
+ queryParams["before"] = before;
}
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
if (cloud !== undefined) {
- queryParams['cloud'] = cloud;
+ queryParams["cloud"] = cloud;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -2559,13 +2534,13 @@ export class RESTClient extends Client {
let __path = `/api/v1/clouds/${encodeURIComponent(String(cloudId))}/cluster-operations/${encodeURIComponent(String(operationId))}`;
const queryParams: Record = {};
if (cursor !== undefined) {
- queryParams['cursor'] = cursor;
+ queryParams["cursor"] = cursor;
}
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
if (region !== undefined) {
- queryParams['region'] = region;
+ queryParams["region"] = region;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -2589,13 +2564,13 @@ export class RESTClient extends Client {
let __path = `/api/v1/clouds/${encodeURIComponent(String(cloudId))}/cluster-operations`;
const queryParams: Record = {};
if (cursor !== undefined) {
- queryParams['cursor'] = cursor;
+ queryParams["cursor"] = cursor;
}
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
if (region !== undefined) {
- queryParams['region'] = region;
+ queryParams["region"] = region;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -2656,13 +2631,13 @@ export class RESTClient extends Client {
let __path = `/api/v1/connections/${encodeURIComponent(String(connectionId))}/clusters`;
const queryParams: Record = {};
if (cursor !== undefined) {
- queryParams['cursor'] = cursor;
+ queryParams["cursor"] = cursor;
}
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
if (region !== undefined) {
- queryParams['region'] = region;
+ queryParams["region"] = region;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -3228,10 +3203,10 @@ export class RESTClient extends Client {
let __path = `/api/v1/projects/${encodeURIComponent(String(id))}/deployments`;
const queryParams: Record = {};
if (before !== undefined) {
- queryParams['before'] = before;
+ queryParams["before"] = before;
}
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -3254,10 +3229,10 @@ export class RESTClient extends Client {
let __path = `/api/v1/deployments/${encodeURIComponent(String(id))}/logs`;
const queryParams: Record = {};
if (cursor !== undefined) {
- queryParams['cursor'] = cursor;
+ queryParams["cursor"] = cursor;
}
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -3335,7 +3310,7 @@ export class RESTClient extends Client {
discover: async (connectionId?: string, options?: { signal?: AbortSignal; retry?: { maxAttempts?: number } }): Promise => {
let __path = `/api/v1/dns-zones/discover`;
const queryParams: Record = {};
- queryParams['connection_id'] = connectionId;
+ queryParams["connection_id"] = connectionId;
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
__path += '?' + queryString;
@@ -3569,7 +3544,7 @@ export class RESTClient extends Client {
extensions: async (connectionId?: string, options?: { signal?: AbortSignal; retry?: { maxAttempts?: number } }): Promise => {
let __path = `/api/v1/domain-registration/extensions`;
const queryParams: Record = {};
- queryParams['connection_id'] = connectionId;
+ queryParams["connection_id"] = connectionId;
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
__path += '?' + queryString;
@@ -3591,8 +3566,8 @@ export class RESTClient extends Client {
search: async (connectionId?: string, q?: string, options?: { signal?: AbortSignal; retry?: { maxAttempts?: number } }): Promise => {
let __path = `/api/v1/domain-registration/search`;
const queryParams: Record = {};
- queryParams['connection_id'] = connectionId;
- queryParams['q'] = q;
+ queryParams["connection_id"] = connectionId;
+ queryParams["q"] = q;
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
__path += '?' + queryString;
@@ -4073,7 +4048,7 @@ export class RESTClient extends Client {
let __path = `/api/v1/projects/${encodeURIComponent(String(id))}/environments/${encodeURIComponent(String(envId))}`;
const queryParams: Record = {};
if (keep !== undefined) {
- queryParams['keep'] = keep;
+ queryParams["keep"] = keep;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -4260,10 +4235,10 @@ export class RESTClient extends Client {
let __path = `/api/v1/projects/${encodeURIComponent(String(projectId))}/fleet/instances/${encodeURIComponent(String(id))}/events`;
const queryParams: Record = {};
if (after !== undefined) {
- queryParams['after'] = after;
+ queryParams["after"] = after;
}
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -4340,16 +4315,16 @@ export class RESTClient extends Client {
let __path = `/api/v1/projects/${encodeURIComponent(String(projectId))}/fleet/instances`;
const queryParams: Record = {};
if (after !== undefined) {
- queryParams['after'] = after;
+ queryParams["after"] = after;
}
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
if (status !== undefined) {
- queryParams['status'] = status;
+ queryParams["status"] = status;
}
if (externalRef !== undefined) {
- queryParams['external_ref'] = externalRef;
+ queryParams["external_ref"] = externalRef;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -4395,10 +4370,10 @@ export class RESTClient extends Client {
let __path = `/api/v1/projects/${encodeURIComponent(String(projectId))}/fleet/instances/${encodeURIComponent(String(id))}/metrics`;
const queryParams: Record = {};
if (start !== undefined) {
- queryParams['start'] = start;
+ queryParams["start"] = start;
}
if (end !== undefined) {
- queryParams['end'] = end;
+ queryParams["end"] = end;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -4709,13 +4684,13 @@ export class RESTClient extends Client {
let __path = `/api/v1/gpu-targets`;
const queryParams: Record = {};
if (minMemoryGib !== undefined) {
- queryParams['min_memory_gib'] = minMemoryGib;
+ queryParams["min_memory_gib"] = minMemoryGib;
}
if (count !== undefined) {
- queryParams['count'] = count;
+ queryParams["count"] = count;
}
if (kind !== undefined) {
- queryParams['kind'] = kind;
+ queryParams["kind"] = kind;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -5071,16 +5046,16 @@ export class RESTClient extends Client {
let __path = `/api/v1/projects/${encodeURIComponent(String(id))}/native-recovery-copies`;
const queryParams: Record = {};
if (environmentId !== undefined) {
- queryParams['environment_id'] = environmentId;
+ queryParams["environment_id"] = environmentId;
}
if (before !== undefined) {
- queryParams['before'] = before;
+ queryParams["before"] = before;
}
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
if (resource !== undefined) {
- queryParams['resource'] = resource;
+ queryParams["resource"] = resource;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -5155,10 +5130,10 @@ export class RESTClient extends Client {
let __path = `/api/v1/native-recovery-retirements/${encodeURIComponent(String(id))}/history`;
const queryParams: Record = {};
if (before !== undefined) {
- queryParams['before'] = before;
+ queryParams["before"] = before;
}
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -5181,16 +5156,16 @@ export class RESTClient extends Client {
let __path = `/api/v1/native-recovery-sources/${encodeURIComponent(String(id))}/retirements`;
const queryParams: Record = {};
if (environmentId !== undefined) {
- queryParams['environment_id'] = environmentId;
+ queryParams["environment_id"] = environmentId;
}
if (before !== undefined) {
- queryParams['before'] = before;
+ queryParams["before"] = before;
}
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
if (resource !== undefined) {
- queryParams['resource'] = resource;
+ queryParams["resource"] = resource;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -5231,16 +5206,16 @@ export class RESTClient extends Client {
let __path = `/api/v1/native-recovery-sources/${encodeURIComponent(String(id))}`;
const queryParams: Record = {};
if (environmentId !== undefined) {
- queryParams['environment_id'] = environmentId;
+ queryParams["environment_id"] = environmentId;
}
if (before !== undefined) {
- queryParams['before'] = before;
+ queryParams["before"] = before;
}
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
if (resource !== undefined) {
- queryParams['resource'] = resource;
+ queryParams["resource"] = resource;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -5263,16 +5238,16 @@ export class RESTClient extends Client {
let __path = `/api/v1/projects/${encodeURIComponent(String(id))}/native-recovery-sources`;
const queryParams: Record = {};
if (environmentId !== undefined) {
- queryParams['environment_id'] = environmentId;
+ queryParams["environment_id"] = environmentId;
}
if (before !== undefined) {
- queryParams['before'] = before;
+ queryParams["before"] = before;
}
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
if (resource !== undefined) {
- queryParams['resource'] = resource;
+ queryParams["resource"] = resource;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -5309,8 +5284,8 @@ export class RESTClient extends Client {
previewRetention: async (id: string, olderThanDays?: number, keepLast?: number, options?: { signal?: AbortSignal; retry?: { maxAttempts?: number } }): Promise => {
let __path = `/api/v1/native-recovery-sources/${encodeURIComponent(String(id))}/retention-preview`;
const queryParams: Record = {};
- queryParams['older_than_days'] = olderThanDays;
- queryParams['keep_last'] = keepLast;
+ queryParams["older_than_days"] = olderThanDays;
+ queryParams["keep_last"] = keepLast;
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
__path += '?' + queryString;
@@ -5365,10 +5340,10 @@ export class RESTClient extends Client {
let __path = `/api/v1/native-recovery-sources/${encodeURIComponent(String(id))}/retention-policy/history`;
const queryParams: Record = {};
if (before !== undefined) {
- queryParams['before'] = before;
+ queryParams["before"] = before;
}
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -6021,13 +5996,13 @@ export class RESTClient extends Client {
let __path = `/api/v1/clouds/syncs`;
const queryParams: Record = {};
if (before !== undefined) {
- queryParams['before'] = before;
+ queryParams["before"] = before;
}
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
if (cloud !== undefined) {
- queryParams['cloud'] = cloud;
+ queryParams["cloud"] = cloud;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -6471,13 +6446,13 @@ export class RESTClient extends Client {
let __path = `/api/v1/projects/${encodeURIComponent(String(id))}/plans`;
const queryParams: Record = {};
if (environment !== undefined) {
- queryParams['environment'] = environment;
+ queryParams["environment"] = environment;
}
if (before !== undefined) {
- queryParams['before'] = before;
+ queryParams["before"] = before;
}
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -6556,7 +6531,7 @@ export class RESTClient extends Client {
let __path = `/api/v1/platform/agent/flags`;
const queryParams: Record = {};
if (status !== undefined) {
- queryParams['status'] = status;
+ queryParams["status"] = status;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -7443,54 +7418,22 @@ export class RESTClient extends Client {
};
public readonly realtime = {
- /**
- */
- events: async (orgId?: string | undefined, projectIds?: string | undefined, deploymentIds?: string | undefined, cursor?: string | undefined, options?: { signal?: AbortSignal; retry?: { maxAttempts?: number } }): Promise => {
- let __path = `/api/v1/realtime/events`;
- const queryParams: Record = {};
- if (orgId !== undefined) {
- queryParams['org_id'] = orgId;
- }
- if (projectIds !== undefined) {
- queryParams['project_ids'] = projectIds;
- }
- if (deploymentIds !== undefined) {
- queryParams['deployment_ids'] = deploymentIds;
- }
- if (cursor !== undefined) {
- queryParams['cursor'] = cursor;
- }
- const queryString = new URLSearchParams(queryParams).toString();
- if (queryString) {
- __path += '?' + queryString;
- }
- const config: RequestConfig = {
- method: 'GET',
- url: __path,
- signal: options?.signal,
- retry: options?.retry,
- allowEmptyBody: true,
- };
-
- await this.request(config);
- },
-
/**
*/
snapshot: async (orgId?: string | undefined, projectIds?: string | undefined, deploymentIds?: string | undefined, cursor?: string | undefined, options?: { signal?: AbortSignal; retry?: { maxAttempts?: number } }): Promise => {
let __path = `/api/v1/realtime/snapshot`;
const queryParams: Record = {};
if (orgId !== undefined) {
- queryParams['org_id'] = orgId;
+ queryParams["org_id"] = orgId;
}
if (projectIds !== undefined) {
- queryParams['project_ids'] = projectIds;
+ queryParams["project_ids"] = projectIds;
}
if (deploymentIds !== undefined) {
- queryParams['deployment_ids'] = deploymentIds;
+ queryParams["deployment_ids"] = deploymentIds;
}
if (cursor !== undefined) {
- queryParams['cursor'] = cursor;
+ queryParams["cursor"] = cursor;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -7507,38 +7450,6 @@ export class RESTClient extends Client {
return this.request(config);
},
- /**
- */
- ws: async (orgId?: string | undefined, projectIds?: string | undefined, deploymentIds?: string | undefined, cursor?: string | undefined, options?: { signal?: AbortSignal; retry?: { maxAttempts?: number } }): Promise => {
- let __path = `/api/v1/realtime/ws`;
- const queryParams: Record = {};
- if (orgId !== undefined) {
- queryParams['org_id'] = orgId;
- }
- if (projectIds !== undefined) {
- queryParams['project_ids'] = projectIds;
- }
- if (deploymentIds !== undefined) {
- queryParams['deployment_ids'] = deploymentIds;
- }
- if (cursor !== undefined) {
- queryParams['cursor'] = cursor;
- }
- const queryString = new URLSearchParams(queryParams).toString();
- if (queryString) {
- __path += '?' + queryString;
- }
- const config: RequestConfig = {
- method: 'GET',
- url: __path,
- signal: options?.signal,
- retry: options?.retry,
- allowEmptyBody: true,
- };
-
- await this.request(config);
- },
-
};
public readonly registries = {
@@ -7621,7 +7532,7 @@ export class RESTClient extends Client {
let __path = `/api/v1/projects/${encodeURIComponent(String(id))}/release-reports`;
const queryParams: Record = {};
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -7732,10 +7643,10 @@ export class RESTClient extends Client {
let __path = `/api/v1/service-backups/${encodeURIComponent(String(id))}/retention-policy/history`;
const queryParams: Record = {};
if (before !== undefined) {
- queryParams['before'] = before;
+ queryParams["before"] = before;
}
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -7797,7 +7708,7 @@ export class RESTClient extends Client {
let __path = `/api/v1/projects/${encodeURIComponent(String(id))}/environments/${encodeURIComponent(String(environment))}/rollback-target`;
const queryParams: Record = {};
if (deploymentId !== undefined) {
- queryParams['deployment_id'] = deploymentId;
+ queryParams["deployment_id"] = deploymentId;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -7869,8 +7780,8 @@ export class RESTClient extends Client {
previewRetention: async (id: string, olderThanDays?: number, keepLast?: number, options?: { signal?: AbortSignal; retry?: { maxAttempts?: number } }): Promise => {
let __path = `/api/v1/service-backups/${encodeURIComponent(String(id))}/retention-preview`;
const queryParams: Record = {};
- queryParams['older_than_days'] = olderThanDays;
- queryParams['keep_last'] = keepLast;
+ queryParams["older_than_days"] = olderThanDays;
+ queryParams["keep_last"] = keepLast;
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
__path += '?' + queryString;
@@ -8007,10 +7918,10 @@ export class RESTClient extends Client {
let __path = `/api/v1/service-backup-retirements/${encodeURIComponent(String(id))}/history`;
const queryParams: Record = {};
if (before !== undefined) {
- queryParams['before'] = before;
+ queryParams["before"] = before;
}
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -8033,13 +7944,13 @@ export class RESTClient extends Client {
let __path = `/api/v1/projects/${encodeURIComponent(String(id))}/service-backup-retirements`;
const queryParams: Record = {};
if (backupId !== undefined) {
- queryParams['backup_id'] = backupId;
+ queryParams["backup_id"] = backupId;
}
if (before !== undefined) {
- queryParams['before'] = before;
+ queryParams["before"] = before;
}
if (limit !== undefined) {
- queryParams['limit'] = limit;
+ queryParams["limit"] = limit;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -8395,7 +8306,7 @@ export class RESTClient extends Client {
let __path = `/api/v1/usage/traffic`;
const queryParams: Record = {};
if (range !== undefined) {
- queryParams['range'] = range;
+ queryParams["range"] = range;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
@@ -8471,9 +8382,9 @@ export class RESTClient extends Client {
resolve: async (id: string, environment?: string, service?: string | undefined, options?: { signal?: AbortSignal; retry?: { maxAttempts?: number } }): Promise => {
let __path = `/api/v1/projects/${encodeURIComponent(String(id))}/variables/resolved`;
const queryParams: Record = {};
- queryParams['environment'] = environment;
+ queryParams["environment"] = environment;
if (service !== undefined) {
- queryParams['service'] = service;
+ queryParams["service"] = service;
}
const queryString = new URLSearchParams(queryParams).toString();
if (queryString) {
diff --git a/apps/dashboard/src/client/forge/loomplane/sse.ts b/apps/dashboard/src/client/forge/loomplane/sse.ts
index 47560596e..498efed2f 100644
--- a/apps/dashboard/src/client/forge/loomplane/sse.ts
+++ b/apps/dashboard/src/client/forge/loomplane/sse.ts
@@ -117,7 +117,7 @@ export class AgentTasksStreamSSEClient extends EventEmitter {
return new Promise((resolve, reject) => {
this.setState(ConnectionState.CONNECTING);
- let url = this.config.baseURL + '/api/v1/agent/tasks/:id/stream';
+ let url = this.config.baseURL + "/api/v1/agent/tasks/:id/stream";
// In browser, add auth as query params since EventSource doesn't support custom headers
if (isBrowser) {
@@ -182,37 +182,37 @@ export class AgentTasksStreamSSEClient extends EventEmitter {
reject(error);
};
- this.eventSource.addEventListener('agent.end', (event: MessageEvent) => {
+ this.eventSource.addEventListener("agent.end", (event: MessageEvent) => {
try {
const data: types.RealtimeAgentEnd = decode(JSON.parse(event.data), "RealtimeAgentEnd");
- this.emit('agent.end', data);
+ this.emit("agent.end", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('agent.event', (event: MessageEvent) => {
+ this.eventSource.addEventListener("agent.event", (event: MessageEvent) => {
try {
const data: types.RealtimeAgentEvent = decode(JSON.parse(event.data), "RealtimeAgentEvent");
- this.emit('agent.event', data);
+ this.emit("agent.event", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('forge.resumed', (event: MessageEvent) => {
+ this.eventSource.addEventListener("forge.resumed", (event: MessageEvent) => {
try {
const data: unknown = JSON.parse(event.data);
- this.emit('forge.resumed', data);
+ this.emit("forge.resumed", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('forge.gap', (event: MessageEvent) => {
+ this.eventSource.addEventListener("forge.gap", (event: MessageEvent) => {
try {
const data: unknown = JSON.parse(event.data);
- this.emit('forge.gap', data);
+ this.emit("forge.gap", data);
} catch (error) {
this.emit('error', error);
}
@@ -235,7 +235,7 @@ export class AgentTasksStreamSSEClient extends EventEmitter {
* @param handler - Function to call when agent.end event is received
*/
onAgentEnd(handler: (data: types.RealtimeAgentEnd) => void): void {
- this.on('agent.end', handler);
+ this.on("agent.end", handler);
}
/**
@@ -243,7 +243,7 @@ export class AgentTasksStreamSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offAgentEnd(handler: (data: types.RealtimeAgentEnd) => void): void {
- this.off('agent.end', handler);
+ this.off("agent.end", handler);
}
/**
@@ -251,7 +251,7 @@ export class AgentTasksStreamSSEClient extends EventEmitter {
* @param handler - Function to call when agent.event event is received
*/
onAgentEvent(handler: (data: types.RealtimeAgentEvent) => void): void {
- this.on('agent.event', handler);
+ this.on("agent.event", handler);
}
/**
@@ -259,7 +259,7 @@ export class AgentTasksStreamSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offAgentEvent(handler: (data: types.RealtimeAgentEvent) => void): void {
- this.off('agent.event', handler);
+ this.off("agent.event", handler);
}
/**
@@ -347,7 +347,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
return new Promise((resolve, reject) => {
this.setState(ConnectionState.CONNECTING);
- let url = this.config.baseURL + '/api/v1/realtime/events';
+ let url = this.config.baseURL + "/api/v1/realtime/events";
// In browser, add auth as query params since EventSource doesn't support custom headers
if (isBrowser) {
@@ -412,415 +412,415 @@ export class RealtimeEventsSSEClient extends EventEmitter {
reject(error);
};
- this.eventSource.addEventListener('agent_report.deleted', (event: MessageEvent) => {
+ this.eventSource.addEventListener("agent_report.deleted", (event: MessageEvent) => {
try {
const data: types.Report = decode(JSON.parse(event.data), "Report");
- this.emit('agent_report.deleted', data);
+ this.emit("agent_report.deleted", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('agent_report.updated', (event: MessageEvent) => {
+ this.eventSource.addEventListener("agent_report.updated", (event: MessageEvent) => {
try {
const data: types.Report = decode(JSON.parse(event.data), "Report");
- this.emit('agent_report.updated', data);
+ this.emit("agent_report.updated", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('agent_request.deleted', (event: MessageEvent) => {
+ this.eventSource.addEventListener("agent_request.deleted", (event: MessageEvent) => {
try {
const data: types.RequestEvent = decode(JSON.parse(event.data), "RequestEvent");
- this.emit('agent_request.deleted', data);
+ this.emit("agent_request.deleted", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('agent_request.updated', (event: MessageEvent) => {
+ this.eventSource.addEventListener("agent_request.updated", (event: MessageEvent) => {
try {
const data: types.RequestEvent = decode(JSON.parse(event.data), "RequestEvent");
- this.emit('agent_request.updated', data);
+ this.emit("agent_request.updated", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('agent_task.deleted', (event: MessageEvent) => {
+ this.eventSource.addEventListener("agent_task.deleted", (event: MessageEvent) => {
try {
const data: types.TaskEvent = decode(JSON.parse(event.data), "TaskEvent");
- this.emit('agent_task.deleted', data);
+ this.emit("agent_task.deleted", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('agent_task.updated', (event: MessageEvent) => {
+ this.eventSource.addEventListener("agent_task.updated", (event: MessageEvent) => {
try {
const data: types.TaskEvent = decode(JSON.parse(event.data), "TaskEvent");
- this.emit('agent_task.updated', data);
+ this.emit("agent_task.updated", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('analysis.deleted', (event: MessageEvent) => {
+ this.eventSource.addEventListener("analysis.deleted", (event: MessageEvent) => {
try {
const data: types.Analysis = decode(JSON.parse(event.data), "Analysis");
- this.emit('analysis.deleted', data);
+ this.emit("analysis.deleted", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('analysis.updated', (event: MessageEvent) => {
+ this.eventSource.addEventListener("analysis.updated", (event: MessageEvent) => {
try {
const data: types.Analysis = decode(JSON.parse(event.data), "Analysis");
- this.emit('analysis.updated', data);
+ this.emit("analysis.updated", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('binding.deleted', (event: MessageEvent) => {
+ this.eventSource.addEventListener("binding.deleted", (event: MessageEvent) => {
try {
const data: types.Binding = decode(JSON.parse(event.data), "Binding");
- this.emit('binding.deleted', data);
+ this.emit("binding.deleted", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('binding.updated', (event: MessageEvent) => {
+ this.eventSource.addEventListener("binding.updated", (event: MessageEvent) => {
try {
const data: types.Binding = decode(JSON.parse(event.data), "Binding");
- this.emit('binding.updated', data);
+ this.emit("binding.updated", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('build.collection', (event: MessageEvent) => {
+ this.eventSource.addEventListener("build.collection", (event: MessageEvent) => {
try {
const data: types.Collection = decode(JSON.parse(event.data), "Collection");
- this.emit('build.collection', data);
+ this.emit("build.collection", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('build.log', (event: MessageEvent) => {
+ this.eventSource.addEventListener("build.log", (event: MessageEvent) => {
try {
const data: types.Log = decode(JSON.parse(event.data), "Log");
- this.emit('build.log', data);
+ this.emit("build.log", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('canary_verdict.deleted', (event: MessageEvent) => {
+ this.eventSource.addEventListener("canary_verdict.deleted", (event: MessageEvent) => {
try {
const data: types.CanaryVerdict = decode(JSON.parse(event.data), "CanaryVerdict");
- this.emit('canary_verdict.deleted', data);
+ this.emit("canary_verdict.deleted", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('canary_verdict.updated', (event: MessageEvent) => {
+ this.eventSource.addEventListener("canary_verdict.updated", (event: MessageEvent) => {
try {
const data: types.CanaryVerdict = decode(JSON.parse(event.data), "CanaryVerdict");
- this.emit('canary_verdict.updated', data);
+ this.emit("canary_verdict.updated", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('cloud.deleted', (event: MessageEvent) => {
+ this.eventSource.addEventListener("cloud.deleted", (event: MessageEvent) => {
try {
const data: types.Profile = decode(JSON.parse(event.data), "Profile");
- this.emit('cloud.deleted', data);
+ this.emit("cloud.deleted", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('cloud.updated', (event: MessageEvent) => {
+ this.eventSource.addEventListener("cloud.updated", (event: MessageEvent) => {
try {
const data: types.Profile = decode(JSON.parse(event.data), "Profile");
- this.emit('cloud.updated', data);
+ this.emit("cloud.updated", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('cloud_capacity.updated', (event: MessageEvent) => {
+ this.eventSource.addEventListener("cloud_capacity.updated", (event: MessageEvent) => {
try {
const data: types.CapacityChange = decode(JSON.parse(event.data), "CapacityChange");
- this.emit('cloud_capacity.updated', data);
+ this.emit("cloud_capacity.updated", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('cloud_cluster.updated', (event: MessageEvent) => {
+ this.eventSource.addEventListener("cloud_cluster.updated", (event: MessageEvent) => {
try {
const data: types.ClusterChange = decode(JSON.parse(event.data), "ClusterChange");
- this.emit('cloud_cluster.updated', data);
+ this.emit("cloud_cluster.updated", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('cloud_sync.updated', (event: MessageEvent) => {
+ this.eventSource.addEventListener("cloud_sync.updated", (event: MessageEvent) => {
try {
const data: types.CloudSyncEvent = decode(JSON.parse(event.data), "CloudSyncEvent");
- this.emit('cloud_sync.updated', data);
+ this.emit("cloud_sync.updated", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('cloud_target.deleted', (event: MessageEvent) => {
+ this.eventSource.addEventListener("cloud_target.deleted", (event: MessageEvent) => {
try {
const data: types.Target = decode(JSON.parse(event.data), "Target");
- this.emit('cloud_target.deleted', data);
+ this.emit("cloud_target.deleted", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('cloud_target.updated', (event: MessageEvent) => {
+ this.eventSource.addEventListener("cloud_target.updated", (event: MessageEvent) => {
try {
const data: types.Target = decode(JSON.parse(event.data), "Target");
- this.emit('cloud_target.updated', data);
+ this.emit("cloud_target.updated", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('connection.deleted', (event: MessageEvent) => {
+ this.eventSource.addEventListener("connection.deleted", (event: MessageEvent) => {
try {
const data: types.Connection = decode(JSON.parse(event.data), "Connection");
- this.emit('connection.deleted', data);
+ this.emit("connection.deleted", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('connection.updated', (event: MessageEvent) => {
+ this.eventSource.addEventListener("connection.updated", (event: MessageEvent) => {
try {
const data: types.Connection = decode(JSON.parse(event.data), "Connection");
- this.emit('connection.updated', data);
+ this.emit("connection.updated", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('deployment.deleted', (event: MessageEvent) => {
+ this.eventSource.addEventListener("deployment.deleted", (event: MessageEvent) => {
try {
const data: types.Deployment = decode(JSON.parse(event.data), "Deployment");
- this.emit('deployment.deleted', data);
+ this.emit("deployment.deleted", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('deployment.updated', (event: MessageEvent) => {
+ this.eventSource.addEventListener("deployment.updated", (event: MessageEvent) => {
try {
const data: types.Deployment = decode(JSON.parse(event.data), "Deployment");
- this.emit('deployment.updated', data);
+ this.emit("deployment.updated", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('environment.deleted', (event: MessageEvent) => {
+ this.eventSource.addEventListener("environment.deleted", (event: MessageEvent) => {
try {
const data: types.Environment = decode(JSON.parse(event.data), "Environment");
- this.emit('environment.deleted', data);
+ this.emit("environment.deleted", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('environment.updated', (event: MessageEvent) => {
+ this.eventSource.addEventListener("environment.updated", (event: MessageEvent) => {
try {
const data: types.Environment = decode(JSON.parse(event.data), "Environment");
- this.emit('environment.updated', data);
+ this.emit("environment.updated", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('environment_cloud.updated', (event: MessageEvent) => {
+ this.eventSource.addEventListener("environment_cloud.updated", (event: MessageEvent) => {
try {
const data: types.EnvironmentCloudEvent = decode(JSON.parse(event.data), "EnvironmentCloudEvent");
- this.emit('environment_cloud.updated', data);
+ this.emit("environment_cloud.updated", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('forge.gap', (event: MessageEvent) => {
+ this.eventSource.addEventListener("forge.gap", (event: MessageEvent) => {
try {
const data: types.RealtimeForgeGap = decode(JSON.parse(event.data), "RealtimeForgeGap");
- this.emit('forge.gap', data);
+ this.emit("forge.gap", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('forge.resumed', (event: MessageEvent) => {
+ this.eventSource.addEventListener("forge.resumed", (event: MessageEvent) => {
try {
const data: types.RealtimeForgeResumed = decode(JSON.parse(event.data), "RealtimeForgeResumed");
- this.emit('forge.resumed', data);
+ this.emit("forge.resumed", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('manifest.deleted', (event: MessageEvent) => {
+ this.eventSource.addEventListener("manifest.deleted", (event: MessageEvent) => {
try {
const data: types.Revision = decode(JSON.parse(event.data), "Revision");
- this.emit('manifest.deleted', data);
+ this.emit("manifest.deleted", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('manifest.updated', (event: MessageEvent) => {
+ this.eventSource.addEventListener("manifest.updated", (event: MessageEvent) => {
try {
const data: types.Revision = decode(JSON.parse(event.data), "Revision");
- this.emit('manifest.updated', data);
+ this.emit("manifest.updated", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('node.updated', (event: MessageEvent) => {
+ this.eventSource.addEventListener("node.updated", (event: MessageEvent) => {
try {
const data: types.Node = decode(JSON.parse(event.data), "Node");
- this.emit('node.updated', data);
+ this.emit("node.updated", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('notification.created', (event: MessageEvent) => {
+ this.eventSource.addEventListener("notification.created", (event: MessageEvent) => {
try {
const data: types.NotificationCreated = decode(JSON.parse(event.data), "NotificationCreated");
- this.emit('notification.created', data);
+ this.emit("notification.created", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('plan.deleted', (event: MessageEvent) => {
+ this.eventSource.addEventListener("plan.deleted", (event: MessageEvent) => {
try {
const data: types.Plan = decode(JSON.parse(event.data), "Plan");
- this.emit('plan.deleted', data);
+ this.emit("plan.deleted", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('plan.updated', (event: MessageEvent) => {
+ this.eventSource.addEventListener("plan.updated", (event: MessageEvent) => {
try {
const data: types.Plan = decode(JSON.parse(event.data), "Plan");
- this.emit('plan.updated', data);
+ this.emit("plan.updated", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('project.deleted', (event: MessageEvent) => {
+ this.eventSource.addEventListener("project.deleted", (event: MessageEvent) => {
try {
const data: types.Project = decode(JSON.parse(event.data), "Project");
- this.emit('project.deleted', data);
+ this.emit("project.deleted", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('project.updated', (event: MessageEvent) => {
+ this.eventSource.addEventListener("project.updated", (event: MessageEvent) => {
try {
const data: types.Project = decode(JSON.parse(event.data), "Project");
- this.emit('project.updated', data);
+ this.emit("project.updated", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('realtime.snapshot', (event: MessageEvent) => {
+ this.eventSource.addEventListener("realtime.snapshot", (event: MessageEvent) => {
try {
const data: types.RealtimeRealtimeSnapshot = decode(JSON.parse(event.data), "RealtimeRealtimeSnapshot");
- this.emit('realtime.snapshot', data);
+ this.emit("realtime.snapshot", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('realtime.status', (event: MessageEvent) => {
+ this.eventSource.addEventListener("realtime.status", (event: MessageEvent) => {
try {
const data: types.RealtimeRealtimeStatus = decode(JSON.parse(event.data), "RealtimeRealtimeStatus");
- this.emit('realtime.status', data);
+ this.emit("realtime.status", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('release_report.deleted', (event: MessageEvent) => {
+ this.eventSource.addEventListener("release_report.deleted", (event: MessageEvent) => {
try {
const data: types.ReleaseReportEvent = decode(JSON.parse(event.data), "ReleaseReportEvent");
- this.emit('release_report.deleted', data);
+ this.emit("release_report.deleted", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('release_report.updated', (event: MessageEvent) => {
+ this.eventSource.addEventListener("release_report.updated", (event: MessageEvent) => {
try {
const data: types.ReleaseReportEvent = decode(JSON.parse(event.data), "ReleaseReportEvent");
- this.emit('release_report.updated', data);
+ this.emit("release_report.updated", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('release_watch.deleted', (event: MessageEvent) => {
+ this.eventSource.addEventListener("release_watch.deleted", (event: MessageEvent) => {
try {
const data: types.Watch = decode(JSON.parse(event.data), "Watch");
- this.emit('release_watch.deleted', data);
+ this.emit("release_watch.deleted", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('release_watch.updated', (event: MessageEvent) => {
+ this.eventSource.addEventListener("release_watch.updated", (event: MessageEvent) => {
try {
const data: types.Watch = decode(JSON.parse(event.data), "Watch");
- this.emit('release_watch.updated', data);
+ this.emit("release_watch.updated", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('source.deleted', (event: MessageEvent) => {
+ this.eventSource.addEventListener("source.deleted", (event: MessageEvent) => {
try {
const data: types.Source = decode(JSON.parse(event.data), "Source");
- this.emit('source.deleted', data);
+ this.emit("source.deleted", data);
} catch (error) {
this.emit('error', error);
}
});
- this.eventSource.addEventListener('source.updated', (event: MessageEvent) => {
+ this.eventSource.addEventListener("source.updated", (event: MessageEvent) => {
try {
const data: types.Source = decode(JSON.parse(event.data), "Source");
- this.emit('source.updated', data);
+ this.emit("source.updated", data);
} catch (error) {
this.emit('error', error);
}
@@ -843,7 +843,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when agent_report.deleted event is received
*/
onAgentReportDeleted(handler: (data: types.Report) => void): void {
- this.on('agent_report.deleted', handler);
+ this.on("agent_report.deleted", handler);
}
/**
@@ -851,7 +851,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offAgentReportDeleted(handler: (data: types.Report) => void): void {
- this.off('agent_report.deleted', handler);
+ this.off("agent_report.deleted", handler);
}
/**
@@ -859,7 +859,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when agent_report.updated event is received
*/
onAgentReportUpdated(handler: (data: types.Report) => void): void {
- this.on('agent_report.updated', handler);
+ this.on("agent_report.updated", handler);
}
/**
@@ -867,7 +867,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offAgentReportUpdated(handler: (data: types.Report) => void): void {
- this.off('agent_report.updated', handler);
+ this.off("agent_report.updated", handler);
}
/**
@@ -875,7 +875,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when agent_request.deleted event is received
*/
onAgentRequestDeleted(handler: (data: types.RequestEvent) => void): void {
- this.on('agent_request.deleted', handler);
+ this.on("agent_request.deleted", handler);
}
/**
@@ -883,7 +883,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offAgentRequestDeleted(handler: (data: types.RequestEvent) => void): void {
- this.off('agent_request.deleted', handler);
+ this.off("agent_request.deleted", handler);
}
/**
@@ -891,7 +891,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when agent_request.updated event is received
*/
onAgentRequestUpdated(handler: (data: types.RequestEvent) => void): void {
- this.on('agent_request.updated', handler);
+ this.on("agent_request.updated", handler);
}
/**
@@ -899,7 +899,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offAgentRequestUpdated(handler: (data: types.RequestEvent) => void): void {
- this.off('agent_request.updated', handler);
+ this.off("agent_request.updated", handler);
}
/**
@@ -907,7 +907,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when agent_task.deleted event is received
*/
onAgentTaskDeleted(handler: (data: types.TaskEvent) => void): void {
- this.on('agent_task.deleted', handler);
+ this.on("agent_task.deleted", handler);
}
/**
@@ -915,7 +915,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offAgentTaskDeleted(handler: (data: types.TaskEvent) => void): void {
- this.off('agent_task.deleted', handler);
+ this.off("agent_task.deleted", handler);
}
/**
@@ -923,7 +923,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when agent_task.updated event is received
*/
onAgentTaskUpdated(handler: (data: types.TaskEvent) => void): void {
- this.on('agent_task.updated', handler);
+ this.on("agent_task.updated", handler);
}
/**
@@ -931,7 +931,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offAgentTaskUpdated(handler: (data: types.TaskEvent) => void): void {
- this.off('agent_task.updated', handler);
+ this.off("agent_task.updated", handler);
}
/**
@@ -939,7 +939,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when analysis.deleted event is received
*/
onAnalysisDeleted(handler: (data: types.Analysis) => void): void {
- this.on('analysis.deleted', handler);
+ this.on("analysis.deleted", handler);
}
/**
@@ -947,7 +947,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offAnalysisDeleted(handler: (data: types.Analysis) => void): void {
- this.off('analysis.deleted', handler);
+ this.off("analysis.deleted", handler);
}
/**
@@ -955,7 +955,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when analysis.updated event is received
*/
onAnalysisUpdated(handler: (data: types.Analysis) => void): void {
- this.on('analysis.updated', handler);
+ this.on("analysis.updated", handler);
}
/**
@@ -963,7 +963,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offAnalysisUpdated(handler: (data: types.Analysis) => void): void {
- this.off('analysis.updated', handler);
+ this.off("analysis.updated", handler);
}
/**
@@ -971,7 +971,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when binding.deleted event is received
*/
onBindingDeleted(handler: (data: types.Binding) => void): void {
- this.on('binding.deleted', handler);
+ this.on("binding.deleted", handler);
}
/**
@@ -979,7 +979,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offBindingDeleted(handler: (data: types.Binding) => void): void {
- this.off('binding.deleted', handler);
+ this.off("binding.deleted", handler);
}
/**
@@ -987,7 +987,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when binding.updated event is received
*/
onBindingUpdated(handler: (data: types.Binding) => void): void {
- this.on('binding.updated', handler);
+ this.on("binding.updated", handler);
}
/**
@@ -995,7 +995,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offBindingUpdated(handler: (data: types.Binding) => void): void {
- this.off('binding.updated', handler);
+ this.off("binding.updated", handler);
}
/**
@@ -1003,7 +1003,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when build.collection event is received
*/
onBuildCollection(handler: (data: types.Collection) => void): void {
- this.on('build.collection', handler);
+ this.on("build.collection", handler);
}
/**
@@ -1011,7 +1011,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offBuildCollection(handler: (data: types.Collection) => void): void {
- this.off('build.collection', handler);
+ this.off("build.collection", handler);
}
/**
@@ -1019,7 +1019,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when build.log event is received
*/
onBuildLog(handler: (data: types.Log) => void): void {
- this.on('build.log', handler);
+ this.on("build.log", handler);
}
/**
@@ -1027,7 +1027,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offBuildLog(handler: (data: types.Log) => void): void {
- this.off('build.log', handler);
+ this.off("build.log", handler);
}
/**
@@ -1035,7 +1035,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when canary_verdict.deleted event is received
*/
onCanaryVerdictDeleted(handler: (data: types.CanaryVerdict) => void): void {
- this.on('canary_verdict.deleted', handler);
+ this.on("canary_verdict.deleted", handler);
}
/**
@@ -1043,7 +1043,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offCanaryVerdictDeleted(handler: (data: types.CanaryVerdict) => void): void {
- this.off('canary_verdict.deleted', handler);
+ this.off("canary_verdict.deleted", handler);
}
/**
@@ -1051,7 +1051,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when canary_verdict.updated event is received
*/
onCanaryVerdictUpdated(handler: (data: types.CanaryVerdict) => void): void {
- this.on('canary_verdict.updated', handler);
+ this.on("canary_verdict.updated", handler);
}
/**
@@ -1059,7 +1059,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offCanaryVerdictUpdated(handler: (data: types.CanaryVerdict) => void): void {
- this.off('canary_verdict.updated', handler);
+ this.off("canary_verdict.updated", handler);
}
/**
@@ -1067,7 +1067,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when cloud.deleted event is received
*/
onCloudDeleted(handler: (data: types.Profile) => void): void {
- this.on('cloud.deleted', handler);
+ this.on("cloud.deleted", handler);
}
/**
@@ -1075,7 +1075,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offCloudDeleted(handler: (data: types.Profile) => void): void {
- this.off('cloud.deleted', handler);
+ this.off("cloud.deleted", handler);
}
/**
@@ -1083,7 +1083,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when cloud.updated event is received
*/
onCloudUpdated(handler: (data: types.Profile) => void): void {
- this.on('cloud.updated', handler);
+ this.on("cloud.updated", handler);
}
/**
@@ -1091,7 +1091,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offCloudUpdated(handler: (data: types.Profile) => void): void {
- this.off('cloud.updated', handler);
+ this.off("cloud.updated", handler);
}
/**
@@ -1099,7 +1099,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when cloud_capacity.updated event is received
*/
onCloudCapacityUpdated(handler: (data: types.CapacityChange) => void): void {
- this.on('cloud_capacity.updated', handler);
+ this.on("cloud_capacity.updated", handler);
}
/**
@@ -1107,7 +1107,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offCloudCapacityUpdated(handler: (data: types.CapacityChange) => void): void {
- this.off('cloud_capacity.updated', handler);
+ this.off("cloud_capacity.updated", handler);
}
/**
@@ -1115,7 +1115,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when cloud_cluster.updated event is received
*/
onCloudClusterUpdated(handler: (data: types.ClusterChange) => void): void {
- this.on('cloud_cluster.updated', handler);
+ this.on("cloud_cluster.updated", handler);
}
/**
@@ -1123,7 +1123,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offCloudClusterUpdated(handler: (data: types.ClusterChange) => void): void {
- this.off('cloud_cluster.updated', handler);
+ this.off("cloud_cluster.updated", handler);
}
/**
@@ -1131,7 +1131,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when cloud_sync.updated event is received
*/
onCloudSyncUpdated(handler: (data: types.CloudSyncEvent) => void): void {
- this.on('cloud_sync.updated', handler);
+ this.on("cloud_sync.updated", handler);
}
/**
@@ -1139,7 +1139,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offCloudSyncUpdated(handler: (data: types.CloudSyncEvent) => void): void {
- this.off('cloud_sync.updated', handler);
+ this.off("cloud_sync.updated", handler);
}
/**
@@ -1147,7 +1147,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when cloud_target.deleted event is received
*/
onCloudTargetDeleted(handler: (data: types.Target) => void): void {
- this.on('cloud_target.deleted', handler);
+ this.on("cloud_target.deleted", handler);
}
/**
@@ -1155,7 +1155,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offCloudTargetDeleted(handler: (data: types.Target) => void): void {
- this.off('cloud_target.deleted', handler);
+ this.off("cloud_target.deleted", handler);
}
/**
@@ -1163,7 +1163,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when cloud_target.updated event is received
*/
onCloudTargetUpdated(handler: (data: types.Target) => void): void {
- this.on('cloud_target.updated', handler);
+ this.on("cloud_target.updated", handler);
}
/**
@@ -1171,7 +1171,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offCloudTargetUpdated(handler: (data: types.Target) => void): void {
- this.off('cloud_target.updated', handler);
+ this.off("cloud_target.updated", handler);
}
/**
@@ -1179,7 +1179,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when connection.deleted event is received
*/
onConnectionDeleted(handler: (data: types.Connection) => void): void {
- this.on('connection.deleted', handler);
+ this.on("connection.deleted", handler);
}
/**
@@ -1187,7 +1187,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offConnectionDeleted(handler: (data: types.Connection) => void): void {
- this.off('connection.deleted', handler);
+ this.off("connection.deleted", handler);
}
/**
@@ -1195,7 +1195,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when connection.updated event is received
*/
onConnectionUpdated(handler: (data: types.Connection) => void): void {
- this.on('connection.updated', handler);
+ this.on("connection.updated", handler);
}
/**
@@ -1203,7 +1203,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offConnectionUpdated(handler: (data: types.Connection) => void): void {
- this.off('connection.updated', handler);
+ this.off("connection.updated", handler);
}
/**
@@ -1211,7 +1211,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when deployment.deleted event is received
*/
onDeploymentDeleted(handler: (data: types.Deployment) => void): void {
- this.on('deployment.deleted', handler);
+ this.on("deployment.deleted", handler);
}
/**
@@ -1219,7 +1219,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offDeploymentDeleted(handler: (data: types.Deployment) => void): void {
- this.off('deployment.deleted', handler);
+ this.off("deployment.deleted", handler);
}
/**
@@ -1227,7 +1227,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when deployment.updated event is received
*/
onDeploymentUpdated(handler: (data: types.Deployment) => void): void {
- this.on('deployment.updated', handler);
+ this.on("deployment.updated", handler);
}
/**
@@ -1235,7 +1235,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offDeploymentUpdated(handler: (data: types.Deployment) => void): void {
- this.off('deployment.updated', handler);
+ this.off("deployment.updated", handler);
}
/**
@@ -1243,7 +1243,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when environment.deleted event is received
*/
onEnvironmentDeleted(handler: (data: types.Environment) => void): void {
- this.on('environment.deleted', handler);
+ this.on("environment.deleted", handler);
}
/**
@@ -1251,7 +1251,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offEnvironmentDeleted(handler: (data: types.Environment) => void): void {
- this.off('environment.deleted', handler);
+ this.off("environment.deleted", handler);
}
/**
@@ -1259,7 +1259,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when environment.updated event is received
*/
onEnvironmentUpdated(handler: (data: types.Environment) => void): void {
- this.on('environment.updated', handler);
+ this.on("environment.updated", handler);
}
/**
@@ -1267,7 +1267,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offEnvironmentUpdated(handler: (data: types.Environment) => void): void {
- this.off('environment.updated', handler);
+ this.off("environment.updated", handler);
}
/**
@@ -1275,7 +1275,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when environment_cloud.updated event is received
*/
onEnvironmentCloudUpdated(handler: (data: types.EnvironmentCloudEvent) => void): void {
- this.on('environment_cloud.updated', handler);
+ this.on("environment_cloud.updated", handler);
}
/**
@@ -1283,7 +1283,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offEnvironmentCloudUpdated(handler: (data: types.EnvironmentCloudEvent) => void): void {
- this.off('environment_cloud.updated', handler);
+ this.off("environment_cloud.updated", handler);
}
/**
@@ -1291,7 +1291,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when forge.gap event is received
*/
onForgeGap(handler: (data: types.RealtimeForgeGap) => void): void {
- this.on('forge.gap', handler);
+ this.on("forge.gap", handler);
}
/**
@@ -1299,7 +1299,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offForgeGap(handler: (data: types.RealtimeForgeGap) => void): void {
- this.off('forge.gap', handler);
+ this.off("forge.gap", handler);
}
/**
@@ -1307,7 +1307,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when forge.resumed event is received
*/
onForgeResumed(handler: (data: types.RealtimeForgeResumed) => void): void {
- this.on('forge.resumed', handler);
+ this.on("forge.resumed", handler);
}
/**
@@ -1315,7 +1315,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offForgeResumed(handler: (data: types.RealtimeForgeResumed) => void): void {
- this.off('forge.resumed', handler);
+ this.off("forge.resumed", handler);
}
/**
@@ -1323,7 +1323,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when manifest.deleted event is received
*/
onManifestDeleted(handler: (data: types.Revision) => void): void {
- this.on('manifest.deleted', handler);
+ this.on("manifest.deleted", handler);
}
/**
@@ -1331,7 +1331,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offManifestDeleted(handler: (data: types.Revision) => void): void {
- this.off('manifest.deleted', handler);
+ this.off("manifest.deleted", handler);
}
/**
@@ -1339,7 +1339,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when manifest.updated event is received
*/
onManifestUpdated(handler: (data: types.Revision) => void): void {
- this.on('manifest.updated', handler);
+ this.on("manifest.updated", handler);
}
/**
@@ -1347,7 +1347,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offManifestUpdated(handler: (data: types.Revision) => void): void {
- this.off('manifest.updated', handler);
+ this.off("manifest.updated", handler);
}
/**
@@ -1355,7 +1355,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when node.updated event is received
*/
onNodeUpdated(handler: (data: types.Node) => void): void {
- this.on('node.updated', handler);
+ this.on("node.updated", handler);
}
/**
@@ -1363,7 +1363,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offNodeUpdated(handler: (data: types.Node) => void): void {
- this.off('node.updated', handler);
+ this.off("node.updated", handler);
}
/**
@@ -1371,7 +1371,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when notification.created event is received
*/
onNotificationCreated(handler: (data: types.NotificationCreated) => void): void {
- this.on('notification.created', handler);
+ this.on("notification.created", handler);
}
/**
@@ -1379,7 +1379,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offNotificationCreated(handler: (data: types.NotificationCreated) => void): void {
- this.off('notification.created', handler);
+ this.off("notification.created", handler);
}
/**
@@ -1387,7 +1387,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when plan.deleted event is received
*/
onPlanDeleted(handler: (data: types.Plan) => void): void {
- this.on('plan.deleted', handler);
+ this.on("plan.deleted", handler);
}
/**
@@ -1395,7 +1395,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offPlanDeleted(handler: (data: types.Plan) => void): void {
- this.off('plan.deleted', handler);
+ this.off("plan.deleted", handler);
}
/**
@@ -1403,7 +1403,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when plan.updated event is received
*/
onPlanUpdated(handler: (data: types.Plan) => void): void {
- this.on('plan.updated', handler);
+ this.on("plan.updated", handler);
}
/**
@@ -1411,7 +1411,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offPlanUpdated(handler: (data: types.Plan) => void): void {
- this.off('plan.updated', handler);
+ this.off("plan.updated", handler);
}
/**
@@ -1419,7 +1419,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when project.deleted event is received
*/
onProjectDeleted(handler: (data: types.Project) => void): void {
- this.on('project.deleted', handler);
+ this.on("project.deleted", handler);
}
/**
@@ -1427,7 +1427,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offProjectDeleted(handler: (data: types.Project) => void): void {
- this.off('project.deleted', handler);
+ this.off("project.deleted", handler);
}
/**
@@ -1435,7 +1435,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when project.updated event is received
*/
onProjectUpdated(handler: (data: types.Project) => void): void {
- this.on('project.updated', handler);
+ this.on("project.updated", handler);
}
/**
@@ -1443,7 +1443,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offProjectUpdated(handler: (data: types.Project) => void): void {
- this.off('project.updated', handler);
+ this.off("project.updated", handler);
}
/**
@@ -1451,7 +1451,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when realtime.snapshot event is received
*/
onRealtimeSnapshot(handler: (data: types.RealtimeRealtimeSnapshot) => void): void {
- this.on('realtime.snapshot', handler);
+ this.on("realtime.snapshot", handler);
}
/**
@@ -1459,7 +1459,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offRealtimeSnapshot(handler: (data: types.RealtimeRealtimeSnapshot) => void): void {
- this.off('realtime.snapshot', handler);
+ this.off("realtime.snapshot", handler);
}
/**
@@ -1467,7 +1467,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when realtime.status event is received
*/
onRealtimeStatus(handler: (data: types.RealtimeRealtimeStatus) => void): void {
- this.on('realtime.status', handler);
+ this.on("realtime.status", handler);
}
/**
@@ -1475,7 +1475,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offRealtimeStatus(handler: (data: types.RealtimeRealtimeStatus) => void): void {
- this.off('realtime.status', handler);
+ this.off("realtime.status", handler);
}
/**
@@ -1483,7 +1483,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when release_report.deleted event is received
*/
onReleaseReportDeleted(handler: (data: types.ReleaseReportEvent) => void): void {
- this.on('release_report.deleted', handler);
+ this.on("release_report.deleted", handler);
}
/**
@@ -1491,7 +1491,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offReleaseReportDeleted(handler: (data: types.ReleaseReportEvent) => void): void {
- this.off('release_report.deleted', handler);
+ this.off("release_report.deleted", handler);
}
/**
@@ -1499,7 +1499,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when release_report.updated event is received
*/
onReleaseReportUpdated(handler: (data: types.ReleaseReportEvent) => void): void {
- this.on('release_report.updated', handler);
+ this.on("release_report.updated", handler);
}
/**
@@ -1507,7 +1507,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offReleaseReportUpdated(handler: (data: types.ReleaseReportEvent) => void): void {
- this.off('release_report.updated', handler);
+ this.off("release_report.updated", handler);
}
/**
@@ -1515,7 +1515,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when release_watch.deleted event is received
*/
onReleaseWatchDeleted(handler: (data: types.Watch) => void): void {
- this.on('release_watch.deleted', handler);
+ this.on("release_watch.deleted", handler);
}
/**
@@ -1523,7 +1523,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offReleaseWatchDeleted(handler: (data: types.Watch) => void): void {
- this.off('release_watch.deleted', handler);
+ this.off("release_watch.deleted", handler);
}
/**
@@ -1531,7 +1531,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when release_watch.updated event is received
*/
onReleaseWatchUpdated(handler: (data: types.Watch) => void): void {
- this.on('release_watch.updated', handler);
+ this.on("release_watch.updated", handler);
}
/**
@@ -1539,7 +1539,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offReleaseWatchUpdated(handler: (data: types.Watch) => void): void {
- this.off('release_watch.updated', handler);
+ this.off("release_watch.updated", handler);
}
/**
@@ -1547,7 +1547,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when source.deleted event is received
*/
onSourceDeleted(handler: (data: types.Source) => void): void {
- this.on('source.deleted', handler);
+ this.on("source.deleted", handler);
}
/**
@@ -1555,7 +1555,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offSourceDeleted(handler: (data: types.Source) => void): void {
- this.off('source.deleted', handler);
+ this.off("source.deleted", handler);
}
/**
@@ -1563,7 +1563,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - Function to call when source.updated event is received
*/
onSourceUpdated(handler: (data: types.Source) => void): void {
- this.on('source.updated', handler);
+ this.on("source.updated", handler);
}
/**
@@ -1571,7 +1571,7 @@ export class RealtimeEventsSSEClient extends EventEmitter {
* @param handler - The handler to remove
*/
offSourceUpdated(handler: (data: types.Source) => void): void {
- this.off('source.updated', handler);
+ this.off("source.updated", handler);
}
/**
diff --git a/apps/dashboard/src/client/forge/loomplane/stream-bindings.ts b/apps/dashboard/src/client/forge/loomplane/stream-bindings.ts
index 3006b35a8..63eb0b638 100644
--- a/apps/dashboard/src/client/forge/loomplane/stream-bindings.ts
+++ b/apps/dashboard/src/client/forge/loomplane/stream-bindings.ts
@@ -41,19 +41,19 @@ export const streams = [
kind: 'entity',
channel: '/api/v1/realtime/events',
message: 'source.updated',
- entity: 'Source',
+ entity: 'DiscoverySource',
intent: 'upsert',
- invalidates: ['Source[]'],
- decode: (payload: unknown) => decode(payload, CODECS['Source']),
+ invalidates: ['DiscoverySource[]'],
+ decode: (payload: unknown) => decode(payload, CODECS['DiscoverySource']),
},
{
kind: 'entity',
channel: '/api/v1/realtime/events',
message: 'source.deleted',
- entity: 'Source',
+ entity: 'DiscoverySource',
intent: 'evict',
- invalidates: ['Source[]'],
- decode: (payload: unknown) => decode(payload, CODECS['Source']),
+ invalidates: ['DiscoverySource[]'],
+ decode: (payload: unknown) => decode(payload, CODECS['DiscoverySource']),
},
{
kind: 'entity',
@@ -149,19 +149,19 @@ export const streams = [
kind: 'entity',
channel: '/api/v1/realtime/events',
message: 'deployment.updated',
- entity: 'Deployment',
+ entity: 'DeploymentsDeployment',
intent: 'upsert',
- invalidates: ['Deployment[]', 'Instance[]'],
- decode: (payload: unknown) => decode(payload, CODECS['Deployment']),
+ invalidates: ['DeploymentsDeployment[]', 'Instance[]'],
+ decode: (payload: unknown) => decode(payload, CODECS['DeploymentsDeployment']),
},
{
kind: 'entity',
channel: '/api/v1/realtime/events',
message: 'deployment.deleted',
- entity: 'Deployment',
+ entity: 'DeploymentsDeployment',
intent: 'evict',
- invalidates: ['Deployment[]'],
- decode: (payload: unknown) => decode(payload, CODECS['Deployment']),
+ invalidates: ['DeploymentsDeployment[]'],
+ decode: (payload: unknown) => decode(payload, CODECS['DeploymentsDeployment']),
},
{
kind: 'entity',
@@ -169,7 +169,7 @@ export const streams = [
message: 'canary_verdict.updated',
entity: 'CanaryVerdict',
intent: 'upsert',
- invalidates: ['CanaryReport'],
+ invalidates: ['CanaryVerdict[]'],
decode: (payload: unknown) => decode(payload, CODECS['CanaryVerdict']),
},
{
@@ -178,7 +178,7 @@ export const streams = [
message: 'canary_verdict.deleted',
entity: 'CanaryVerdict',
intent: 'evict',
- invalidates: ['CanaryReport'],
+ invalidates: ['CanaryVerdict[]'],
decode: (payload: unknown) => decode(payload, CODECS['CanaryVerdict']),
},
{
@@ -221,19 +221,19 @@ export const streams = [
kind: 'entity',
channel: '/api/v1/realtime/events',
message: 'cloud_target.updated',
- entity: 'Target',
+ entity: 'CloudprofilesTarget',
intent: 'upsert',
- invalidates: ['Target[]'],
- decode: (payload: unknown) => decode(payload, CODECS['Target']),
+ invalidates: ['CloudprofilesTarget[]'],
+ decode: (payload: unknown) => decode(payload, CODECS['CloudprofilesTarget']),
},
{
kind: 'entity',
channel: '/api/v1/realtime/events',
message: 'cloud_target.deleted',
- entity: 'Target',
+ entity: 'CloudprofilesTarget',
intent: 'evict',
- invalidates: ['Target[]'],
- decode: (payload: unknown) => decode(payload, CODECS['Target']),
+ invalidates: ['CloudprofilesTarget[]'],
+ decode: (payload: unknown) => decode(payload, CODECS['CloudprofilesTarget']),
},
{
kind: 'entity',
@@ -250,7 +250,7 @@ export const streams = [
message: 'cloud_sync.updated',
entity: 'CloudSyncEvent',
intent: 'patch',
- invalidates: ['Sync', 'Sync[]', 'EnvironmentCloud'],
+ invalidates: ['Sync:{id}', 'Sync[]', 'EnvironmentCloud'],
decode: (payload: unknown) => decode(payload, CODECS['CloudSyncEvent']),
},
{
@@ -259,7 +259,7 @@ export const streams = [
message: 'cloud_cluster.updated',
entity: 'ClusterChange',
intent: 'patch',
- invalidates: ['CloudCluster', 'CloudClusterPage', 'CloudClusterOperation', 'CloudClusterOperationPage', 'Target', 'Target[]', 'Connection', 'Connection[]', 'Profile', 'Profile[]'],
+ invalidates: ['CloudCluster:{resourceId}', 'CloudCluster[]', 'CloudClusterOperation:{operationId}', 'CloudClusterOperation[]', 'CloudprofilesTarget[]', 'Connection[]', 'Profile:{cloudId}'],
decode: (payload: unknown) => decode(payload, CODECS['ClusterChange']),
},
{
@@ -268,7 +268,7 @@ export const streams = [
message: 'cloud_capacity.updated',
entity: 'CapacityChange',
intent: 'patch',
- invalidates: ['CapacityPolicyView:{cloud_id}', 'CapacityUsage:{cloud_id}', 'Expansion[]'],
+ invalidates: ['CapacityPolicyView:{cloudId}', 'CapacityUsage:{cloudId}', 'Expansion[]'],
decode: (payload: unknown) => decode(payload, CODECS['CapacityChange']),
},
{
@@ -277,7 +277,7 @@ export const streams = [
message: 'notification.created',
entity: 'NotificationCreated',
intent: 'upsert',
- invalidates: ['NotificationList'],
+ invalidates: ['Notification[]'],
decode: (payload: unknown) => decode(payload, CODECS['NotificationCreated']),
},
{
@@ -294,8 +294,8 @@ export const streams = [
channel: '/api/v1/realtime/events',
message: 'agent_task.updated',
entity: 'TaskEvent',
- intent: 'upsert',
- invalidates: ['AgentTask', 'AgentTask[]'],
+ intent: 'patch',
+ invalidates: ['Task:{id}'],
decode: (payload: unknown) => decode(payload, CODECS['TaskEvent']),
},
{
@@ -303,8 +303,8 @@ export const streams = [
channel: '/api/v1/realtime/events',
message: 'agent_task.deleted',
entity: 'TaskEvent',
- intent: 'evict',
- invalidates: ['TaskEvent[]'],
+ intent: 'patch',
+ invalidates: ['Task:{id}'],
decode: (payload: unknown) => decode(payload, CODECS['TaskEvent']),
},
{
@@ -313,7 +313,7 @@ export const streams = [
message: 'agent_report.updated',
entity: 'Report',
intent: 'upsert',
- invalidates: ['AgentReport', 'AgentReport[]'],
+ invalidates: ['Report[]'],
decode: (payload: unknown) => decode(payload, CODECS['Report']),
},
{
@@ -330,8 +330,8 @@ export const streams = [
channel: '/api/v1/realtime/events',
message: 'agent_request.updated',
entity: 'RequestEvent',
- intent: 'upsert',
- invalidates: ['AgentRequest', 'AgentRequest[]'],
+ intent: 'patch',
+ invalidates: ['Request:{id}', 'Request[]'],
decode: (payload: unknown) => decode(payload, CODECS['RequestEvent']),
},
{
@@ -339,8 +339,8 @@ export const streams = [
channel: '/api/v1/realtime/events',
message: 'agent_request.deleted',
entity: 'RequestEvent',
- intent: 'evict',
- invalidates: ['RequestEvent[]'],
+ intent: 'patch',
+ invalidates: ['Request:{id}', 'Request[]'],
decode: (payload: unknown) => decode(payload, CODECS['RequestEvent']),
},
{
@@ -348,8 +348,8 @@ export const streams = [
channel: '/api/v1/realtime/events',
message: 'release_report.updated',
entity: 'ReleaseReportEvent',
- intent: 'upsert',
- invalidates: ['ReleaseReport', 'ReleaseReport[]'],
+ intent: 'patch',
+ invalidates: ['ReleaseReport:{id}', 'ReleaseReport[]'],
decode: (payload: unknown) => decode(payload, CODECS['ReleaseReportEvent']),
},
{
@@ -357,8 +357,8 @@ export const streams = [
channel: '/api/v1/realtime/events',
message: 'release_report.deleted',
entity: 'ReleaseReportEvent',
- intent: 'evict',
- invalidates: ['ReleaseReport', 'ReleaseReport[]'],
+ intent: 'patch',
+ invalidates: ['ReleaseReport:{id}', 'ReleaseReport[]'],
decode: (payload: unknown) => decode(payload, CODECS['ReleaseReportEvent']),
},
{
@@ -419,19 +419,19 @@ export const streams = [
kind: 'entity',
channel: '/api/v1/realtime/ws',
message: 'source.updated',
- entity: 'Source',
+ entity: 'DiscoverySource',
intent: 'upsert',
- invalidates: ['Source[]'],
- decode: (payload: unknown) => decode(payload, CODECS['Source']),
+ invalidates: ['DiscoverySource[]'],
+ decode: (payload: unknown) => decode(payload, CODECS['DiscoverySource']),
},
{
kind: 'entity',
channel: '/api/v1/realtime/ws',
message: 'source.deleted',
- entity: 'Source',
+ entity: 'DiscoverySource',
intent: 'evict',
- invalidates: ['Source[]'],
- decode: (payload: unknown) => decode(payload, CODECS['Source']),
+ invalidates: ['DiscoverySource[]'],
+ decode: (payload: unknown) => decode(payload, CODECS['DiscoverySource']),
},
{
kind: 'entity',
@@ -527,19 +527,19 @@ export const streams = [
kind: 'entity',
channel: '/api/v1/realtime/ws',
message: 'deployment.updated',
- entity: 'Deployment',
+ entity: 'DeploymentsDeployment',
intent: 'upsert',
- invalidates: ['Deployment[]', 'Instance[]'],
- decode: (payload: unknown) => decode(payload, CODECS['Deployment']),
+ invalidates: ['DeploymentsDeployment[]', 'Instance[]'],
+ decode: (payload: unknown) => decode(payload, CODECS['DeploymentsDeployment']),
},
{
kind: 'entity',
channel: '/api/v1/realtime/ws',
message: 'deployment.deleted',
- entity: 'Deployment',
+ entity: 'DeploymentsDeployment',
intent: 'evict',
- invalidates: ['Deployment[]'],
- decode: (payload: unknown) => decode(payload, CODECS['Deployment']),
+ invalidates: ['DeploymentsDeployment[]'],
+ decode: (payload: unknown) => decode(payload, CODECS['DeploymentsDeployment']),
},
{
kind: 'entity',
@@ -547,7 +547,7 @@ export const streams = [
message: 'canary_verdict.updated',
entity: 'CanaryVerdict',
intent: 'upsert',
- invalidates: ['CanaryReport'],
+ invalidates: ['CanaryVerdict[]'],
decode: (payload: unknown) => decode(payload, CODECS['CanaryVerdict']),
},
{
@@ -556,7 +556,7 @@ export const streams = [
message: 'canary_verdict.deleted',
entity: 'CanaryVerdict',
intent: 'evict',
- invalidates: ['CanaryReport'],
+ invalidates: ['CanaryVerdict[]'],
decode: (payload: unknown) => decode(payload, CODECS['CanaryVerdict']),
},
{
@@ -599,19 +599,19 @@ export const streams = [
kind: 'entity',
channel: '/api/v1/realtime/ws',
message: 'cloud_target.updated',
- entity: 'Target',
+ entity: 'CloudprofilesTarget',
intent: 'upsert',
- invalidates: ['Target[]'],
- decode: (payload: unknown) => decode(payload, CODECS['Target']),
+ invalidates: ['CloudprofilesTarget[]'],
+ decode: (payload: unknown) => decode(payload, CODECS['CloudprofilesTarget']),
},
{
kind: 'entity',
channel: '/api/v1/realtime/ws',
message: 'cloud_target.deleted',
- entity: 'Target',
+ entity: 'CloudprofilesTarget',
intent: 'evict',
- invalidates: ['Target[]'],
- decode: (payload: unknown) => decode(payload, CODECS['Target']),
+ invalidates: ['CloudprofilesTarget[]'],
+ decode: (payload: unknown) => decode(payload, CODECS['CloudprofilesTarget']),
},
{
kind: 'entity',
@@ -628,7 +628,7 @@ export const streams = [
message: 'cloud_sync.updated',
entity: 'CloudSyncEvent',
intent: 'patch',
- invalidates: ['Sync', 'Sync[]', 'EnvironmentCloud'],
+ invalidates: ['Sync:{id}', 'Sync[]', 'EnvironmentCloud'],
decode: (payload: unknown) => decode(payload, CODECS['CloudSyncEvent']),
},
{
@@ -637,7 +637,7 @@ export const streams = [
message: 'cloud_cluster.updated',
entity: 'ClusterChange',
intent: 'patch',
- invalidates: ['CloudCluster', 'CloudClusterPage', 'CloudClusterOperation', 'CloudClusterOperationPage', 'Target', 'Target[]', 'Connection', 'Connection[]', 'Profile', 'Profile[]'],
+ invalidates: ['CloudCluster:{resourceId}', 'CloudCluster[]', 'CloudClusterOperation:{operationId}', 'CloudClusterOperation[]', 'CloudprofilesTarget[]', 'Connection[]', 'Profile:{cloudId}'],
decode: (payload: unknown) => decode(payload, CODECS['ClusterChange']),
},
{
@@ -646,7 +646,7 @@ export const streams = [
message: 'cloud_capacity.updated',
entity: 'CapacityChange',
intent: 'patch',
- invalidates: ['CapacityPolicyView:{cloud_id}', 'CapacityUsage:{cloud_id}', 'Expansion[]'],
+ invalidates: ['CapacityPolicyView:{cloudId}', 'CapacityUsage:{cloudId}', 'Expansion[]'],
decode: (payload: unknown) => decode(payload, CODECS['CapacityChange']),
},
{
@@ -655,7 +655,7 @@ export const streams = [
message: 'notification.created',
entity: 'NotificationCreated',
intent: 'upsert',
- invalidates: ['NotificationList'],
+ invalidates: ['Notification[]'],
decode: (payload: unknown) => decode(payload, CODECS['NotificationCreated']),
},
{
@@ -672,8 +672,8 @@ export const streams = [
channel: '/api/v1/realtime/ws',
message: 'agent_task.updated',
entity: 'TaskEvent',
- intent: 'upsert',
- invalidates: ['AgentTask', 'AgentTask[]'],
+ intent: 'patch',
+ invalidates: ['Task:{id}'],
decode: (payload: unknown) => decode(payload, CODECS['TaskEvent']),
},
{
@@ -681,8 +681,8 @@ export const streams = [
channel: '/api/v1/realtime/ws',
message: 'agent_task.deleted',
entity: 'TaskEvent',
- intent: 'evict',
- invalidates: ['TaskEvent[]'],
+ intent: 'patch',
+ invalidates: ['Task:{id}'],
decode: (payload: unknown) => decode(payload, CODECS['TaskEvent']),
},
{
@@ -691,7 +691,7 @@ export const streams = [
message: 'agent_report.updated',
entity: 'Report',
intent: 'upsert',
- invalidates: ['AgentReport', 'AgentReport[]'],
+ invalidates: ['Report[]'],
decode: (payload: unknown) => decode(payload, CODECS['Report']),
},
{
@@ -708,8 +708,8 @@ export const streams = [
channel: '/api/v1/realtime/ws',
message: 'agent_request.updated',
entity: 'RequestEvent',
- intent: 'upsert',
- invalidates: ['AgentRequest', 'AgentRequest[]'],
+ intent: 'patch',
+ invalidates: ['Request:{id}', 'Request[]'],
decode: (payload: unknown) => decode(payload, CODECS['RequestEvent']),
},
{
@@ -717,8 +717,8 @@ export const streams = [
channel: '/api/v1/realtime/ws',
message: 'agent_request.deleted',
entity: 'RequestEvent',
- intent: 'evict',
- invalidates: ['RequestEvent[]'],
+ intent: 'patch',
+ invalidates: ['Request:{id}', 'Request[]'],
decode: (payload: unknown) => decode(payload, CODECS['RequestEvent']),
},
{
@@ -726,8 +726,8 @@ export const streams = [
channel: '/api/v1/realtime/ws',
message: 'release_report.updated',
entity: 'ReleaseReportEvent',
- intent: 'upsert',
- invalidates: ['ReleaseReport', 'ReleaseReport[]'],
+ intent: 'patch',
+ invalidates: ['ReleaseReport:{id}', 'ReleaseReport[]'],
decode: (payload: unknown) => decode(payload, CODECS['ReleaseReportEvent']),
},
{
@@ -735,8 +735,8 @@ export const streams = [
channel: '/api/v1/realtime/ws',
message: 'release_report.deleted',
entity: 'ReleaseReportEvent',
- intent: 'evict',
- invalidates: ['ReleaseReport', 'ReleaseReport[]'],
+ intent: 'patch',
+ invalidates: ['ReleaseReport:{id}', 'ReleaseReport[]'],
decode: (payload: unknown) => decode(payload, CODECS['ReleaseReportEvent']),
},
{
diff --git a/apps/dashboard/src/client/forge/loomplane/websocket.ts b/apps/dashboard/src/client/forge/loomplane/websocket.ts
index fa9b0a708..da1a57cc1 100644
--- a/apps/dashboard/src/client/forge/loomplane/websocket.ts
+++ b/apps/dashboard/src/client/forge/loomplane/websocket.ts
@@ -137,7 +137,7 @@ export class RealtimeWsReceiveWSClient extends EventEmitter {
this.setState(ConnectionState.CONNECTING);
this.closed = false;
- const wsURL = this.config.baseURL.replace(/^http/, 'ws') + '/api/v1/realtime/ws';
+ const wsURL = this.config.baseURL.replace(/^http/, 'ws') + "/api/v1/realtime/ws";
// Setup connection timeout
this.connectionTimeoutId = setTimeout(() => {
diff --git a/apps/dashboard/src/client/streams.test.ts b/apps/dashboard/src/client/streams.test.ts
new file mode 100644
index 000000000..696cb0219
--- /dev/null
+++ b/apps/dashboard/src/client/streams.test.ts
@@ -0,0 +1,20 @@
+import { describe, expect, it } from "vitest"
+
+import { streams } from "@/client/forge/loomplane/stream-bindings"
+import { agentTaskStream, REALTIME_EVENTS, REALTIME_WS } from "@/client/streams"
+import spec from "../../specs/loomplane.openapi.json?raw"
+
+const openapi = JSON.parse(spec) as { paths: Record }
+
+describe("stream paths", () => {
+ it("are the channels the generated bindings listen on", () => {
+ const channels = new Set(streams.map((b) => b.channel))
+ expect(channels).toContain(REALTIME_WS)
+ expect(channels).toContain(REALTIME_EVENTS)
+ })
+
+ it("name the agent task stream the API serves", () => {
+ expect(openapi.paths).toHaveProperty(["/api/v1/agent/tasks/{id}/stream"])
+ expect(agentTaskStream("t/1")).toBe("/api/v1/agent/tasks/t%2F1/stream")
+ })
+})
diff --git a/apps/dashboard/src/client/streams.ts b/apps/dashboard/src/client/streams.ts
new file mode 100644
index 000000000..ec56c6307
--- /dev/null
+++ b/apps/dashboard/src/client/streams.ts
@@ -0,0 +1,19 @@
+/**
+ * The stream endpoints the dashboard opens itself. Forge keeps WebSocket and
+ * SSE routes out of the REST operation manifest, so their paths live here,
+ * and streams.test.ts checks each one against the generated specs.
+ *
+ * Hand-written, and outside forge/ on purpose: `forge client check` reports
+ * any file under forge/ it didn't write.
+ */
+
+/** The organization's live channel over WebSocket. */
+export const REALTIME_WS = "/api/v1/realtime/ws"
+
+/** The same channel over Server-Sent Events, the WebSocket's fallback. */
+export const REALTIME_EVENTS = "/api/v1/realtime/events"
+
+/** agentTaskStream is the SSE path that follows one agent task's events. */
+export function agentTaskStream(taskId: string): string {
+ return `/api/v1/agent/tasks/${encodeURIComponent(taskId)}/stream`
+}
diff --git a/apps/dashboard/src/client/tags.ts b/apps/dashboard/src/client/tags.ts
new file mode 100644
index 000000000..4b35e6afe
--- /dev/null
+++ b/apps/dashboard/src/client/tags.ts
@@ -0,0 +1,14 @@
+// Cache tags the hand-written bindings add to generated ones. Each typename
+// comes from the generated contract rather than being spelled out, because
+// the server names a type after its package when two share a name: a
+// deployment is `DeploymentsDeployment`, and the day that changes these
+// follow it instead of silently matching nothing.
+import { op_deployments_get } from "@/client/forge/loomplane/ops/deployments.get"
+
+const deployment = op_deployments_get.entity
+
+/** Every deployment list; a deployment.updated event invalidates it. */
+export const deploymentLists = `${deployment}[]`
+
+/** One deployment, by the `{id}` path parameter. */
+export const deploymentItem = `${deployment}:{id}`
diff --git a/apps/dashboard/src/components/deployment-targets.tsx b/apps/dashboard/src/components/deployment-targets.tsx
index 0a68d1c02..1673db968 100644
--- a/apps/dashboard/src/components/deployment-targets.tsx
+++ b/apps/dashboard/src/components/deployment-targets.tsx
@@ -176,13 +176,18 @@ function placedManifest(
export function usePlacementContext(projectId: string, environmentId?: string) {
const providers = useQuery(useProvidersList)
const connections = useQuery(useConnectionsList)
- const cloud = useQuery(useEnvironmentCloudsGet, {
- path: { id: projectId, environmentId: environmentId ?? "" },
- })
+ // The assignment changes on the Clouds page, not here, and its read has no
+ // cache identity, so read it fresh each time a placement panel opens.
+ const cloud = useQuery(
+ useEnvironmentCloudsGet,
+ { path: { id: projectId, environmentId: environmentId ?? "" } },
+ { staleTime: 0 }
+ )
return {
providers,
catalog: providers.data?.providers ?? [],
connections: connections.data?.connections ?? [],
+ cloudAssigned: !!cloud.data?.assignment,
cloudTargets: (cloud.data?.assignment?.targets ?? []).filter(
(t): t is Target => !!t
),
@@ -317,7 +322,7 @@ function PlacementForm({
onPendingChange?: (pending: boolean) => void
}) {
const environmentId = environments.find((e) => e.name === environment)?.id
- const { providers, cloudTargets } = usePlacementContext(
+ const { providers, cloudTargets, cloudAssigned } = usePlacementContext(
projectId,
environmentId
)
@@ -356,6 +361,7 @@ function PlacementForm({
environments={environments}
catalog={providers.data.providers}
cloudTargets={cloudTargets}
+ cloudAssigned={cloudAssigned}
mode={mode}
pending={pending}
onUse={onUse}
@@ -380,6 +386,7 @@ function PlacementChoices({
environments,
catalog,
cloudTargets,
+ cloudAssigned,
mode,
pending,
onUse,
@@ -396,6 +403,7 @@ function PlacementChoices({
environments: Environment[]
catalog: Provider[]
cloudTargets: Target[]
+ cloudAssigned: boolean
mode: "pending" | "save"
pending?: PendingPlacement
onUse?: (change: PendingPlacement) => void
@@ -715,14 +723,15 @@ function PlacementChoices({
)}
{row.section === "services" && cloudTargets.length === 0 && (
- No Cloud is assigned to {environment}, so no Cloud targets are
- listed.{" "}
+ {cloudAssigned
+ ? `The Cloud ${environment} uses has no targets this project may use yet.`
+ : `No Cloud is assigned to ${environment}, so no Cloud targets are listed.`}{" "}
- Assign a Cloud
+ {cloudAssigned ? "Add a target" : "Assign a Cloud"}
)}
diff --git a/apps/dashboard/src/components/release-reports-card.tsx b/apps/dashboard/src/components/release-reports-card.tsx
index 306e0176a..9147b7bfb 100644
--- a/apps/dashboard/src/components/release-reports-card.tsx
+++ b/apps/dashboard/src/components/release-reports-card.tsx
@@ -9,12 +9,7 @@ import { QueryError } from "@/components/query-error"
import { StatusPill, type Tone } from "@/components/runs"
import { Skeleton } from "@/components/ui/skeleton"
import { useAgent, useFeatures } from "@/lib/features"
-import {
- stateLabel,
- stateTone,
- useReleaseReportEvents,
- type StateTone,
-} from "@/lib/release-reports"
+import { stateLabel, stateTone, type StateTone } from "@/lib/release-reports"
import { ago } from "@/lib/relative-time"
import { Link } from "@/lib/router"
import { useNow } from "@/lib/use-runs"
@@ -36,7 +31,6 @@ export function ReleaseReportsCard({ projectId }: { projectId: string }) {
}
function Reports({ projectId }: { projectId: string }) {
- useReleaseReportEvents()
const now = useNow(30_000)
const list = useQuery(useReleaseReportsList, {
path: { id: projectId },
diff --git a/apps/dashboard/src/lib/agent-stream.ts b/apps/dashboard/src/lib/agent-stream.ts
index 1ec2af40c..463bb82dc 100644
--- a/apps/dashboard/src/lib/agent-stream.ts
+++ b/apps/dashboard/src/lib/agent-stream.ts
@@ -5,8 +5,8 @@
// the history left off (useChat's resume).
import type { ChatTransport } from "ai"
-import { op_agentTasks_stream } from "@/client/forge/loomplane/ops/agentTasks.stream"
import type { Sent } from "@/client/forge/loomplane/types"
+import { agentTaskStream } from "@/client/streams"
import {
type AgentChunk,
type AgentEvent,
@@ -230,10 +230,7 @@ export class AgentChatTransport implements ChatTransport {
return
}
- const path = op_agentTasks_stream.path.replace(
- "{id}",
- encodeURIComponent(turn.taskId)
- )
+ const path = agentTaskStream(turn.taskId)
const url = new URL(path, window.location.origin)
url.searchParams.set("after", String(last))
source = new EventSource(url, { withCredentials: true })
diff --git a/apps/dashboard/src/lib/realtime.test.ts b/apps/dashboard/src/lib/realtime.test.ts
index e922b60d2..0f9dc75f2 100644
--- a/apps/dashboard/src/lib/realtime.test.ts
+++ b/apps/dashboard/src/lib/realtime.test.ts
@@ -8,6 +8,7 @@ import {
useProjectsList,
useProjectsGraph,
useDeploymentsForPlan,
+ useReleaseReportsList,
} from "@/client/forge/loomplane/hooks"
import { LoomplaneRealtime } from "@/lib/realtime"
@@ -104,10 +105,16 @@ it("refreshes the graph projection when analysis completes", async () => {
live.stop()
})
-it("tells the release report listeners when a report changes", () => {
+it("refetches the release report list when a report changes", async () => {
+ let reads = 0
const cache = new QueryCache({
entities,
- transport: { execute: async () => ({}) },
+ transport: {
+ execute: async () => {
+ reads++
+ return { reports: [] }
+ },
+ },
})
const connection = new Connection()
const live = new LoomplaneRealtime({
@@ -116,40 +123,24 @@ it("tells the release report listeners when a report changes", () => {
connect: () => connection,
})
live.start()
- const changed = vi.fn()
- const stop = live.onReleaseReport(changed)
- const report = {
- id: "rrep_1",
- org_id: "org_one",
- project_id: "proj_one",
- state: "reviewing",
- }
+ const list = useReleaseReportsList(
+ { path: { id: "proj_one" } },
+ { client: cache }
+ )
+ await list.fetch()
+ const release = list.subscribe(() => {})
connection.message({
event: "release_report.updated",
cursor: "org_one:1",
- data: report,
- })
- expect(changed).toHaveBeenCalledTimes(1)
- // Another workspace's event never reaches the page.
- connection.message({
- event: "release_report.updated",
- cursor: "org_one:2",
- data: { ...report, org_id: "org_two" },
- })
- expect(changed).toHaveBeenCalledTimes(1)
- connection.message({
- event: "release_report.deleted",
- cursor: "org_one:3",
- data: report,
- })
- expect(changed).toHaveBeenCalledTimes(2)
- stop()
- connection.message({
- event: "release_report.updated",
- cursor: "org_one:4",
- data: report,
+ data: {
+ id: "rrep_1",
+ org_id: "org_one",
+ project_id: "proj_one",
+ state: "reviewing",
+ },
})
- expect(changed).toHaveBeenCalledTimes(2)
+ await vi.waitFor(() => expect(reads).toBe(2))
+ release()
live.stop()
})
diff --git a/apps/dashboard/src/lib/realtime.ts b/apps/dashboard/src/lib/realtime.ts
index 90d4799fd..bbbaa9b7f 100644
--- a/apps/dashboard/src/lib/realtime.ts
+++ b/apps/dashboard/src/lib/realtime.ts
@@ -15,12 +15,11 @@ import {
useInfrastructureGet as infrastructureQuery,
} from "@/client/forge/loomplane/hooks"
import { op_deployments_forPlan } from "@/client/forge/loomplane/ops/deployments.forPlan"
-import { op_realtime_events } from "@/client/forge/loomplane/ops/realtime.events"
-import { op_realtime_ws } from "@/client/forge/loomplane/ops/realtime.ws"
import { streams } from "@/client/forge/loomplane/stream-bindings"
import type { Collection, Log, Snapshot } from "@/client/forge/loomplane/types"
import { RealtimeWsReceiveWSClient } from "@/client/forge/loomplane/websocket"
import { statusOf } from "@/client/errors"
+import { REALTIME_EVENTS, REALTIME_WS } from "@/client/streams"
import type { LiveState } from "@/lib/realtime-state"
type Scope = { orgId: string; deploymentIds: string[]; cursor: string }
@@ -30,7 +29,7 @@ type Options = {
orgId: string
connect?: (mode: "ws" | "sse", scope: Scope) => StreamConnection
}
-const channel = op_realtime_ws.path
+const channel = REALTIME_WS
const bindings: readonly StreamBinding[] = streams.filter(
(b) => b.channel === channel
)
@@ -61,7 +60,7 @@ function connectNative(mode: "ws" | "sse", scope: Scope): StreamConnection {
close: () => client.close(true),
}
}
- const url = new URL(op_realtime_events.path, window.location.origin)
+ const url = new URL(REALTIME_EVENTS, window.location.origin)
url.searchParams.set("org_id", scope.orgId)
if (scope.deploymentIds.length)
url.searchParams.set("deployment_ids", scope.deploymentIds.join(","))
@@ -83,7 +82,7 @@ function connectNative(mode: "ws" | "sse", scope: Scope): StreamConnection {
},
{
events: [
- ...channelMessages(streams, op_realtime_events.path),
+ ...channelMessages(streams, REALTIME_EVENTS),
"realtime.snapshot",
"realtime.status",
],
@@ -109,7 +108,6 @@ export class LoomplaneRealtime {
}
private listeners = new Set<() => void>()
private frames = new Set<(event: string, data: Log | Collection) => void>()
- private reportListeners = new Set<() => void>()
private stopped = true
private generation = 0
private syncingGeneration = -1
@@ -124,23 +122,6 @@ export class LoomplaneRealtime {
this.frames.add(fn)
return () => this.frames.delete(fn)
}
- /**
- * onReleaseReport calls fn when a release report changes or goes. The
- * report list reads through a query that tags nothing, so the entity
- * binding can't refresh it; the page refetches on this instead. A
- * snapshot after a reconnect calls it too, for what was missed.
- */
- onReleaseReport = (fn: () => void) => {
- this.reportListeners.add(fn)
- return () => this.reportListeners.delete(fn)
- }
- private reportChanged(event: string | undefined) {
- if (
- event === "release_report.updated" ||
- event === "release_report.deleted"
- )
- this.reportListeners.forEach((fn) => fn())
- }
private update(patch: Partial) {
this.snapshot = { ...this.snapshot, ...patch }
this.listeners.forEach((fn) => fn())
@@ -325,7 +306,6 @@ export class LoomplaneRealtime {
return
if (cursor) this.cursor = cursor
this.output(frame.event ?? "", frame.data)
- this.reportChanged(frame.event)
this.refreshDeploymentLookup(frame.event, frame.data)
if (
frame.event === "analysis.updated" ||
@@ -369,7 +349,6 @@ export class LoomplaneRealtime {
if (record.orgId !== this.options.orgId) continue
this.refreshDeploymentLookup(record.event, record.data)
this.output(record.event, record.data)
- this.reportChanged(record.event)
const frame = { event: record.event, data: record.data, channel }
if (deliver) deliver(frame)
else {
diff --git a/apps/dashboard/src/lib/release-reports.ts b/apps/dashboard/src/lib/release-reports.ts
index c475be210..5fb3e94ea 100644
--- a/apps/dashboard/src/lib/release-reports.ts
+++ b/apps/dashboard/src/lib/release-reports.ts
@@ -1,15 +1,7 @@
// What a release readiness report says, in words people read. The gates and
// their details come from the server as they are: Loomplane computes them,
// so the page shows them and adds nothing of its own.
-import { useEffect } from "react"
-
-import {
- useReleaseReportsGet,
- useReleaseReportsList,
-} from "@/client/forge/loomplane/hooks"
import type { ReleaseReport } from "@/client/forge/loomplane/types"
-import { useInvalidate } from "@/client/hooks"
-import { useRealtime } from "@/lib/realtime-provider"
/** The seven gates, with the same words as GateNames in internal/releaseprep. */
export const gateNames: Record = {
@@ -95,23 +87,3 @@ export function mayCancelReport(
(r.requestedBy === who.userId && who.can("agent:use"))
)
}
-
-/**
- * useReleaseReportEvents refetches the release report list and the open
- * report when the server says a report changed. The list read tags nothing,
- * so the realtime entity binding can't reach it.
- */
-export function useReleaseReportEvents(): void {
- const realtime = useRealtime()
- const invalidate = useInvalidate()
- useEffect(() => {
- if (!realtime) return
- const stop = realtime.onReleaseReport(() => {
- invalidate(useReleaseReportsList)
- invalidate(useReleaseReportsGet)
- })
- return () => {
- stop()
- }
- }, [realtime, invalidate])
-}
diff --git a/apps/dashboard/src/pages/release-report.tsx b/apps/dashboard/src/pages/release-report.tsx
index 16d56608c..29a390c38 100644
--- a/apps/dashboard/src/pages/release-report.tsx
+++ b/apps/dashboard/src/pages/release-report.tsx
@@ -54,7 +54,6 @@ import {
mayCancelReport,
stateLabel,
stateTone,
- useReleaseReportEvents,
type StateTone,
} from "@/lib/release-reports"
import { ago } from "@/lib/relative-time"
@@ -102,7 +101,6 @@ function AgentOff() {
}
function Loaded({ id }: { id: string }) {
- useReleaseReportEvents()
const report = useQuery(useReleaseReportsGet, { path: { id } })
// Without a live connection the report still catches up while it's active.
useRefetchWhile(
diff --git a/extensions/cloudinfra/clusters.go b/extensions/cloudinfra/clusters.go
index 7af9e7df0..00cda7ca8 100644
--- a/extensions/cloudinfra/clusters.go
+++ b/extensions/cloudinfra/clusters.go
@@ -133,7 +133,14 @@ func (e *Extension) clusterRoutes(r forge.Router, guard identity.Guard) error {
opts = append(opts, forge.WithRequestSchema(rt.request))
}
if rt.method == http.MethodPost {
- opts = append(opts, forge.WithInvalidates("CloudCluster", "CloudClusterOperation", "CloudClusterPage", "CloudClusterOperationPage", "RuntimeAttachmentPage"))
+ // Every write changes what the cluster and operation lists show.
+ // A write about an existing cluster names it in its response; a
+ // preview of a new one has no resource yet.
+ tags := []string{"CloudCluster[]", "CloudClusterOperation[]"}
+ if rt.name != "cloudClusters.preview" {
+ tags = append(tags, "CloudCluster:{res.resourceId}", "RuntimeAttachmentPage:{res.resourceId}")
+ }
+ opts = append(opts, forge.WithInvalidates(tags...))
}
var err error
if rt.method == http.MethodGet {
diff --git a/extensions/discovery/bitbucket.go b/extensions/discovery/bitbucket.go
index 9edb3416a..2885f8755 100644
--- a/extensions/discovery/bitbucket.go
+++ b/extensions/discovery/bitbucket.go
@@ -59,7 +59,7 @@ func (e *Extension) bitbucketRoutes(r forge.Router, guard identity.Guard) error
forge.WithName("bitbucket.disconnect"),
forge.WithSummary("Disconnect a workspace. The consumer stays approved on Bitbucket."),
forge.WithNoContentResponse(),
- forge.WithEntity(forge.EntityDef{Type: "BitbucketWorkspace", IDField: "id"}),
+ forge.WithEntity(forge.EntityDef{Type: "BitbucketWorkspaceView", IDField: "id"}),
); err != nil {
return err
}
diff --git a/extensions/discovery/routes.go b/extensions/discovery/routes.go
index 6676c5f5d..f3bb486f9 100644
--- a/extensions/discovery/routes.go
+++ b/extensions/discovery/routes.go
@@ -113,7 +113,7 @@ func (e *Extension) sourceRoutes(r forge.Router, guard identity.Guard) error {
forge.WithName("sources.delete"),
forge.WithSummary("Detach a source. Its alias stays taken, so old plans keep their meaning."),
forge.WithNoContentResponse(),
- forge.WithEntity(forge.EntityDef{Type: "Source", IDField: "id"}),
+ forge.WithEntity(forge.EntityDef{Type: "DiscoverySource", IDField: "id"}),
)
}
diff --git a/extensions/realtime/routes.go b/extensions/realtime/routes.go
index beed55490..d89401321 100644
--- a/extensions/realtime/routes.go
+++ b/extensions/realtime/routes.go
@@ -53,20 +53,20 @@ func streamBindings() forge.RouteOption {
forge.Emits[planning.Binding]("binding.updated").As(forge.StreamUpsert).Invalidates("Binding[]", "Instance[]"), forge.Emits[planning.Binding]("binding.deleted"),
forge.Emits[connections.Connection]("connection.updated").As(forge.StreamUpsert), forge.Emits[connections.Connection]("connection.deleted"),
forge.Emits[deployments.Deployment]("deployment.updated").As(forge.StreamUpsert).Invalidates("Deployment[]", "Instance[]"), forge.Emits[deployments.Deployment]("deployment.deleted"),
- forge.Emits[deployments.CanaryVerdict]("canary_verdict.updated").As(forge.StreamUpsert).Invalidates("CanaryReport"), forge.Emits[deployments.CanaryVerdict]("canary_verdict.deleted").Invalidates("CanaryReport"),
+ forge.Emits[deployments.CanaryVerdict]("canary_verdict.updated").As(forge.StreamUpsert), forge.Emits[deployments.CanaryVerdict]("canary_verdict.deleted"),
forge.Emits[releasewatch.Watch]("release_watch.updated").As(forge.StreamUpsert), forge.Emits[releasewatch.Watch]("release_watch.deleted"),
forge.Emits[cloudprofiles.Profile]("cloud.updated").As(forge.StreamUpsert), forge.Emits[cloudprofiles.Profile]("cloud.deleted"),
forge.Emits[cloudprofiles.Target]("cloud_target.updated").As(forge.StreamUpsert), forge.Emits[cloudprofiles.Target]("cloud_target.deleted"),
forge.Emits[cloudprofiles.EnvironmentCloudEvent]("environment_cloud.updated").Invalidates("EnvironmentCloud"),
- forge.Emits[cloudprofiles.CloudSyncEvent]("cloud_sync.updated").Invalidates("Sync", "Sync[]", "EnvironmentCloud"),
- forge.Emits[cloudinfra.ClusterChange]("cloud_cluster.updated").Invalidates("CloudCluster", "CloudClusterPage", "CloudClusterOperation", "CloudClusterOperationPage", "Target", "Target[]", "Connection", "Connection[]", "Profile", "Profile[]"),
- forge.Emits[cloudinfra.CapacityChange]("cloud_capacity.updated").Invalidates("CapacityPolicyView:{cloud_id}", "CapacityUsage:{cloud_id}", "Expansion[]"),
- forge.Emits[notifications.NotificationCreated]("notification.created").Invalidates("NotificationList"),
+ forge.Emits[cloudprofiles.CloudSyncEvent]("cloud_sync.updated").Invalidates("Sync:{id}", "Sync[]", "EnvironmentCloud"),
+ forge.Emits[cloudinfra.ClusterChange]("cloud_cluster.updated").Invalidates("CloudCluster:{resourceId}", "CloudCluster[]", "CloudClusterOperation:{operationId}", "CloudClusterOperation[]", "CloudprofilesTarget[]", "Connection[]", "Profile:{cloudId}"),
+ forge.Emits[cloudinfra.CapacityChange]("cloud_capacity.updated").Invalidates("CapacityPolicyView:{cloudId}", "CapacityUsage:{cloudId}", "Expansion[]"),
+ forge.Emits[notifications.NotificationCreated]("notification.created").Invalidates("Notification[]"),
forge.Emits[nodes.Node]("node.updated").As(forge.StreamUpsert),
- forge.Emits[agentruns.TaskEvent]("agent_task.updated").As(forge.StreamUpsert).Invalidates("AgentTask", "AgentTask[]"), forge.Emits[agentruns.TaskEvent]("agent_task.deleted"),
- forge.Emits[agentreports.Report]("agent_report.updated").As(forge.StreamUpsert).Invalidates("AgentReport", "AgentReport[]"), forge.Emits[agentreports.Report]("agent_report.deleted"),
- forge.Emits[agentrequests.RequestEvent]("agent_request.updated").As(forge.StreamUpsert).Invalidates("AgentRequest", "AgentRequest[]"), forge.Emits[agentrequests.RequestEvent]("agent_request.deleted"),
- forge.Emits[releaseprep.ReleaseReportEvent]("release_report.updated").As(forge.StreamUpsert).Invalidates("ReleaseReport", "ReleaseReport[]"), forge.Emits[releaseprep.ReleaseReportEvent]("release_report.deleted").Invalidates("ReleaseReport", "ReleaseReport[]"),
+ forge.Emits[agentruns.TaskEvent]("agent_task.updated").As(forge.StreamPatch).Invalidates("Task:{id}"), forge.Emits[agentruns.TaskEvent]("agent_task.deleted").As(forge.StreamPatch).Invalidates("Task:{id}"),
+ forge.Emits[agentreports.Report]("agent_report.updated").As(forge.StreamUpsert), forge.Emits[agentreports.Report]("agent_report.deleted"),
+ forge.Emits[agentrequests.RequestEvent]("agent_request.updated").As(forge.StreamPatch).Invalidates("Request:{id}", "Request[]"), forge.Emits[agentrequests.RequestEvent]("agent_request.deleted").As(forge.StreamPatch).Invalidates("Request:{id}", "Request[]"),
+ forge.Emits[releaseprep.ReleaseReportEvent]("release_report.updated").As(forge.StreamPatch).Invalidates("ReleaseReport:{id}", "ReleaseReport[]"), forge.Emits[releaseprep.ReleaseReportEvent]("release_report.deleted").As(forge.StreamPatch).Invalidates("ReleaseReport:{id}", "ReleaseReport[]"),
forge.Emits[store.Log]("build.log").As(forge.StreamUpsert), forge.Emits[store.Collection]("build.collection").As(forge.StreamUpsert),
)
}
From 78a067b676e3dce2623798f9ec8b0f76720c49d9 Mon Sep 17 00:00:00 2001
From: Rex Raphael
Date: Fri, 20 Nov 2026 16:28:54 -0600
Subject: [PATCH 2/5] feat(clouds): Clouds belong to projects, not environments
A Cloud was org-owned and a project's grant to it ignored environments, but
each environment still had to be assigned one Cloud before any service could
name a target, and cloud_target resolved only inside that assignment. The
deploy screen's "No Cloud is assigned to production" was that model showing
through.
Now each project has one default Cloud, every environment of the project
resolves through it, and environments differ only where loomplane.yaml says.
Model and storage (migration project_default_cloud):
- The default is a flag on the project's grant, unique per project among live
grants. A project's first grant becomes its default; revoking a grant ends
its default however the revocation is written. Backfill picks the Cloud
most of a project's environments used, without moving any revision.
- loomplane_cloud_assignments is dropped. The capacity, workload-scope and
admission functions stop joining it and stop comparing assignment_revision;
the grant revision they already pin covers a default switch, since the
switch advances both grants. Placements and capacity intents keep the
assignment_revision field so stored records hash as they were approved.
- A target can't be deleted while its Cloud is a project's default or a
serving binding pins it; a Cloud can't be deleted in either case either
(its grants used to vanish with it).
- project_cloud.updated replaces environment_cloud.updated, readable with the
same permission.
Behaviour:
- Changing the default is a reviewed Cloud change (project_default) covering
every environment of the project. The review pins both grants, and the new
default at the revision the apply gives it, so the sync's own runs aren't
refused as stale.
- Shared changes (a target edit, a default placement switch) reach every
environment of projects whose default the Cloud is, plus any environment
running a service placed on it.
- API: GET/POST /projects/:id/default-cloud[/preview] replace the
environment cloud routes. loomctl: clouds default, clouds make-default.
Dashboard:
- The project's Clouds tab has no environment picker: one card per granted
Cloud, the default first and open, "Make default" on the others, targets
and where each service runs inside. Placing a service there applies to
every environment and clears the placement an environment set for it.
- The deploy drawer lists the default Cloud's targets under its name, and
links to the Clouds tab when there's no Cloud or no target, instead of the
dead end.
- Polling that stood in for missing cache tags is gone.
Docs and the agent's docs bundle describe the project default Cloud.
Review notes:
- internal/currentauthority records the new migration in its reviewed source
lists (project and Fleet). The migration calls loomplane_append_event and
adds a column to a Fleet-read table; it redefines neither the guarded
functions nor any column Fleet reads.
- applySyncUpgrade replays three historical migrations onto a current
database; their pool function body now names a dropped table, so the
helper restores every function the replay changed to its current
definition.
Verified: go build/vet and the full Go unit suite pass; golangci-lint clean
on the change; database/migrations integration suite passes; integration
tests matching Cloud, Shared, Pool, Capacity, Managed, Cleanup, Location,
Tags, Usage, Default, Native, Placement, Server, Cluster, Fleet, Node,
Model, Azure, Domain and Route pass (after the fixes in this commit, the
affected ones re-run); dashboard typecheck, lint and all 2213 tests pass;
the client regenerates without a diff from an API built from this commit.
---
apps/dashboard/specs/loomplane.asyncapi.json | 160 ++---
apps/dashboard/specs/loomplane.openapi.json | 379 ++++++-----
.../src/client/cache-contract.test.ts | 2 -
.../src/client/forge/loomplane/codecs.ts | 24 +-
.../forge/loomplane/codecs/Assignment.ts | 5 -
.../forge/loomplane/codecs/CapacityIntent.ts | 2 +-
.../forge/loomplane/codecs/ChangeInput.ts | 2 +-
.../forge/loomplane/codecs/ChangeInputBody.ts | 2 +-
.../forge/loomplane/codecs/CloudPlacement.ts | 2 +-
.../forge/loomplane/codecs/DefaultCloud.ts | 4 +
.../loomplane/codecs/DefaultCloudInputBody.ts | 3 +
.../loomplane/codecs/EnvironmentCloud.ts | 4 -
.../loomplane/codecs/EnvironmentCloudEvent.ts | 3 -
.../codecs/EnvironmentCloudInputBody.ts | 3 -
.../loomplane/codecs/EnvironmentUsage.ts | 2 +-
.../client/forge/loomplane/codecs/Preview.ts | 4 +-
...ent.targets.ts => ProjectCloud.targets.ts} | 2 +-
.../forge/loomplane/codecs/ProjectCloud.ts | 5 +
.../loomplane/codecs/ProjectCloudEvent.ts | 3 +
.../forge/loomplane/codecs/ProjectGrant.ts | 2 +-
.../src/client/forge/loomplane/entities.ts | 6 +-
.../src/client/forge/loomplane/hooks.ts | 6 +-
.../loomplane/hooks/useDefaultCloudGet.ts | 5 +
.../loomplane/hooks/useDefaultCloudPreview.ts | 5 +
.../hooks/useEnvironmentCloudsGet.ts | 5 -
.../hooks/useEnvironmentCloudsPreview.ts | 5 -
.../src/client/forge/loomplane/ops.ts | 63 +-
.../forge/loomplane/ops/defaultCloud.get.ts | 12 +
...uds.preview.ts => defaultCloud.preview.ts} | 8 +-
.../loomplane/ops/environmentClouds.get.ts | 11 -
.../src/client/forge/loomplane/rest.ts | 74 +--
.../src/client/forge/loomplane/sse.ts | 50 +-
.../client/forge/loomplane/stream-bindings.ts | 20 +-
.../src/client/forge/loomplane/types.ts | 71 +--
.../components/cloud-detail/environments.tsx | 25 +-
.../src/components/cloud-detail/projects.tsx | 7 +-
.../cloud-targets/change-review.tsx | 143 +++--
.../cloud-targets/service-adoption.tsx | 68 +-
.../components/cloud-targets/sync-history.tsx | 28 +-
.../components/cloud-targets/workspace.tsx | 587 ++++++------------
.../src/components/deploy-dialog.tsx | 5 +-
apps/dashboard/src/components/deploy.tsx | 5 +-
.../src/components/deployment-targets.tsx | 90 ++-
apps/dashboard/src/lib/cloud-tags.test.ts | 19 +-
apps/dashboard/src/lib/cloud-targets.test.ts | 103 ++-
apps/dashboard/src/lib/cloud-targets.ts | 77 ++-
.../dashboard/src/pages/cloud-detail.test.tsx | 6 +-
apps/dashboard/src/pages/cloud-detail.tsx | 2 +-
apps/dashboard/src/pages/clouds.test.tsx | 197 +++---
apps/dashboard/src/pages/clouds.tsx | 17 +-
.../src/pages/project-detail.page.test.tsx | 2 +-
apps/dashboard/src/pages/project-detail.tsx | 8 +-
apps/docs/content/docs/ai/models.mdx | 2 +-
.../docs/clouds/adopting-and-moving.mdx | 8 +-
.../content/docs/clouds/cloud-targets.mdx | 29 +-
apps/docs/content/docs/reference/loomctl.mdx | 2 +-
.../content/docs/reference/loomplane-yaml.mdx | 2 +-
.../20261228000100_project_default_cloud.go | 542 ++++++++++++++++
.../migrations/project_default_cloud_test.go | 101 +++
extensions/planning/clouds.go | 46 +-
extensions/realtime/filter_test.go | 2 +-
extensions/realtime/handlers.go | 2 +-
extensions/realtime/routes.go | 6 +-
internal/agentknowledge/docs.json | 14 +-
internal/cloudinfra/cluster_reconcile_test.go | 8 +-
internal/cloudprofiles/change.go | 79 +--
internal/cloudprofiles/events.go | 13 +-
internal/cloudprofiles/grants.go | 62 +-
internal/cloudprofiles/model.go | 35 +-
internal/cloudprofiles/pgstore.go | 119 ++--
internal/cloudprofiles/service.go | 16 +-
internal/cloudprofiles/service_test.go | 4 +-
internal/cloudprofiles/sync_store.go | 80 ++-
internal/cloudprofiles/usage.go | 29 +-
internal/ctl/clouds.go | 22 +-
internal/ctl/clouds_test.go | 16 +-
.../currentauthority/fleet_schema_test.go | 3 +-
.../testdata/project_schema_sources.json | 3 +-
internal/deployments/cloud_targets.go | 19 +-
internal/deployments/cloud_targets_test.go | 15 +-
internal/deployments/platform_test.go | 6 +-
.../route_runtime_integration_test.go | 8 +-
internal/models/server_first.go | 12 +-
internal/models/server_first_test.go | 14 +-
internal/planning/capacity_intent.go | 31 +-
internal/planning/capacity_intent_test.go | 9 +-
internal/planning/cloud_default_switch.go | 4 +-
.../planning/cloud_default_switch_test.go | 12 +-
internal/planning/cloud_locations_test.go | 4 +-
.../planning/cloud_platform_owned_test.go | 28 +-
internal/planning/cloud_servers_test.go | 6 +-
internal/planning/cloud_sync.go | 107 ++--
internal/planning/cloud_sync_plan.go | 10 +-
internal/planning/cloud_sync_plan_test.go | 6 +-
internal/planning/cloud_sync_revert.go | 13 +-
internal/planning/cloud_sync_revert_test.go | 10 +-
internal/planning/cloud_sync_routes.go | 4 +-
internal/planning/cloud_tags_test.go | 6 +-
internal/planning/cloud_targets.go | 52 +-
.../planning/cloud_targets_service_test.go | 8 +-
internal/planning/cloud_targets_test.go | 26 +-
internal/planning/composition_test.go | 2 +-
internal/planning/dbgateway.go | 2 +-
internal/planning/dbgateway_test.go | 12 +-
internal/planning/location_evidence.go | 6 +-
internal/planning/location_migration.go | 2 +-
internal/planning/location_placement_test.go | 22 +-
internal/planning/location_requirements.go | 2 +-
internal/planning/planner_test.go | 2 +-
internal/planning/platform.go | 12 +-
internal/planning/platform_targets_test.go | 4 +-
internal/planning/server_pools_test.go | 2 +-
internal/planning/service.go | 9 +-
internal/planning/service_test.go | 12 +-
internal/publicplan/plan.go | 22 +-
pkg/client/clouds.go | 92 +--
pkg/client/clouds_test.go | 10 +-
tests/integration/azure_test.go | 15 +-
tests/integration/capacity_planning_test.go | 4 +-
tests/integration/cloud_acceptance_test.go | 4 +-
tests/integration/cloud_api_test.go | 98 ++-
.../integration/cloud_default_switch_test.go | 21 +-
tests/integration/cloud_flow_test.go | 14 +-
.../cloud_location_placement_test.go | 12 +-
tests/integration/cloud_metadata_test.go | 4 +-
tests/integration/cloud_profiles_test.go | 49 +-
tests/integration/cloud_sync_test.go | 129 +++-
tests/integration/cloud_tags_test.go | 22 +-
tests/integration/cloud_usage_test.go | 39 +-
.../cloudsql_partial_revert_test.go | 8 +-
.../cluster_workload_planning_test.go | 2 +-
.../deployment_capacity_wait_test.go | 2 +-
tests/integration/fleet_scope_guards_test.go | 12 +-
.../managed_cleanup_effects_test.go | 2 +-
.../managed_cleanup_issuer_test.go | 4 +-
.../managed_cleanup_targets_test.go | 18 +-
...naged_cluster_maintenance_recovery_test.go | 4 +-
.../managed_cluster_service_recovery_test.go | 4 +-
.../managed_clusters_store_test.go | 6 +-
.../managed_lifecycle_cleanup_fixture_test.go | 4 +-
.../managed_workload_installed_test.go | 3 +-
tests/integration/nodes_test.go | 7 +-
.../integration/server_admission_lock_test.go | 15 +-
tests/integration/server_pool_sizing_test.go | 7 +-
tests/integration/server_pools_test.go | 11 +-
.../integration/shared_cloud_combined_test.go | 7 +-
.../shared_cloud_live_acceptance_test.go | 8 +-
.../shared_cloud_recovery_fixture_test.go | 9 +-
tests/integration/shared_clouds_test.go | 119 ++--
.../shared_sync_acceptance_test.go | 35 ++
.../shared_sync_compensation_test.go | 2 +-
.../pre_allocation_pool_functions.sql | 3 +-
152 files changed, 2893 insertions(+), 2021 deletions(-)
delete mode 100644 apps/dashboard/src/client/forge/loomplane/codecs/Assignment.ts
create mode 100644 apps/dashboard/src/client/forge/loomplane/codecs/DefaultCloud.ts
create mode 100644 apps/dashboard/src/client/forge/loomplane/codecs/DefaultCloudInputBody.ts
delete mode 100644 apps/dashboard/src/client/forge/loomplane/codecs/EnvironmentCloud.ts
delete mode 100644 apps/dashboard/src/client/forge/loomplane/codecs/EnvironmentCloudEvent.ts
delete mode 100644 apps/dashboard/src/client/forge/loomplane/codecs/EnvironmentCloudInputBody.ts
rename apps/dashboard/src/client/forge/loomplane/codecs/{Assignment.targets.ts => ProjectCloud.targets.ts} (51%)
create mode 100644 apps/dashboard/src/client/forge/loomplane/codecs/ProjectCloud.ts
create mode 100644 apps/dashboard/src/client/forge/loomplane/codecs/ProjectCloudEvent.ts
create mode 100644 apps/dashboard/src/client/forge/loomplane/hooks/useDefaultCloudGet.ts
create mode 100644 apps/dashboard/src/client/forge/loomplane/hooks/useDefaultCloudPreview.ts
delete mode 100644 apps/dashboard/src/client/forge/loomplane/hooks/useEnvironmentCloudsGet.ts
delete mode 100644 apps/dashboard/src/client/forge/loomplane/hooks/useEnvironmentCloudsPreview.ts
create mode 100644 apps/dashboard/src/client/forge/loomplane/ops/defaultCloud.get.ts
rename apps/dashboard/src/client/forge/loomplane/ops/{environmentClouds.preview.ts => defaultCloud.preview.ts} (52%)
delete mode 100644 apps/dashboard/src/client/forge/loomplane/ops/environmentClouds.get.ts
create mode 100644 database/migrations/20261228000100_project_default_cloud.go
create mode 100644 database/migrations/project_default_cloud_test.go
diff --git a/apps/dashboard/specs/loomplane.asyncapi.json b/apps/dashboard/specs/loomplane.asyncapi.json
index d471fc122..6abcef7fb 100644
--- a/apps/dashboard/specs/loomplane.asyncapi.json
+++ b/apps/dashboard/specs/loomplane.asyncapi.json
@@ -293,15 +293,6 @@
"title": "environment.updated event",
"summary": "SSE event: environment.updated"
},
- "environment_cloud.updated": {
- "payload": {
- "$ref": "#/components/schemas/EnvironmentCloudEvent"
- },
- "contentType": "text/event-stream",
- "name": "environment_cloud.updated",
- "title": "environment_cloud.updated event",
- "summary": "SSE event: environment_cloud.updated"
- },
"forge.gap": {
"payload": {
"$ref": "#/components/schemas/RealtimeForgeGap"
@@ -392,6 +383,15 @@
"title": "project.updated event",
"summary": "SSE event: project.updated"
},
+ "project_cloud.updated": {
+ "payload": {
+ "$ref": "#/components/schemas/ProjectCloudEvent"
+ },
+ "contentType": "text/event-stream",
+ "name": "project_cloud.updated",
+ "title": "project_cloud.updated event",
+ "summary": "SSE event: project_cloud.updated"
+ },
"realtime.snapshot": {
"payload": {
"$ref": "#/components/schemas/RealtimeRealtimeSnapshot"
@@ -708,13 +708,13 @@
"type": "github.com/xraph/loomplane/internal/cloudprofiles.Target"
},
{
- "entityType": "EnvironmentCloudEvent",
+ "entityType": "ProjectCloudEvent",
"intent": "patch",
"invalidates": [
- "EnvironmentCloud"
+ "DefaultCloud:{projectId}"
],
- "message": "environment_cloud.updated",
- "type": "github.com/xraph/loomplane/internal/cloudprofiles.EnvironmentCloudEvent"
+ "message": "project_cloud.updated",
+ "type": "github.com/xraph/loomplane/internal/cloudprofiles.ProjectCloudEvent"
},
{
"entityType": "CloudSyncEvent",
@@ -722,7 +722,7 @@
"invalidates": [
"Sync:{id}",
"Sync[]",
- "EnvironmentCloud"
+ "DefaultCloud:{projectId}"
],
"message": "cloud_sync.updated",
"type": "github.com/xraph/loomplane/internal/cloudprofiles.CloudSyncEvent"
@@ -1138,13 +1138,13 @@
"type": "github.com/xraph/loomplane/internal/cloudprofiles.Target"
},
{
- "entityType": "EnvironmentCloudEvent",
+ "entityType": "ProjectCloudEvent",
"intent": "patch",
"invalidates": [
- "EnvironmentCloud"
+ "DefaultCloud:{projectId}"
],
- "message": "environment_cloud.updated",
- "type": "github.com/xraph/loomplane/internal/cloudprofiles.EnvironmentCloudEvent"
+ "message": "project_cloud.updated",
+ "type": "github.com/xraph/loomplane/internal/cloudprofiles.ProjectCloudEvent"
},
{
"entityType": "CloudSyncEvent",
@@ -1152,7 +1152,7 @@
"invalidates": [
"Sync:{id}",
"Sync[]",
- "EnvironmentCloud"
+ "DefaultCloud:{projectId}"
],
"message": "cloud_sync.updated",
"type": "github.com/xraph/loomplane/internal/cloudprofiles.CloudSyncEvent"
@@ -1415,9 +1415,6 @@
{
"$ref": "#/channels/api-v1-realtime-events/messages/environment.updated"
},
- {
- "$ref": "#/channels/api-v1-realtime-events/messages/environment_cloud.updated"
- },
{
"$ref": "#/channels/api-v1-realtime-events/messages/forge.gap"
},
@@ -1448,6 +1445,9 @@
{
"$ref": "#/channels/api-v1-realtime-events/messages/project.updated"
},
+ {
+ "$ref": "#/channels/api-v1-realtime-events/messages/project_cloud.updated"
+ },
{
"$ref": "#/channels/api-v1-realtime-events/messages/realtime.snapshot"
},
@@ -1895,16 +1895,12 @@
"template",
"template_hash",
"commit_sha",
- "assignment_revision",
"cloud_revision",
"target_revision",
"grant_revision",
"target_name"
],
"properties": {
- "assignment_revision": {
- "type": "integer"
- },
"cloud_revision": {
"type": "integer"
},
@@ -2096,7 +2092,6 @@
"account_identity",
"cloud_id",
"cloud_revision",
- "assignment_revision",
"target_id",
"target_revision",
"target_name",
@@ -2110,9 +2105,6 @@
"allocation": {
"type": "string"
},
- "assignment_revision": {
- "type": "integer"
- },
"cloud_id": {
"type": "string"
},
@@ -5988,34 +5980,6 @@
}
}
},
- "EnvironmentCloudEvent": {
- "type": "object",
- "required": [
- "org_id",
- "project_id",
- "environment_id",
- "cloud_id",
- "revision"
- ],
- "properties": {
- "cloud_id": {
- "type": "string",
- "nullable": true
- },
- "environment_id": {
- "type": "string"
- },
- "org_id": {
- "type": "string"
- },
- "project_id": {
- "type": "string"
- },
- "revision": {
- "type": "integer"
- }
- }
- },
"RealtimeForgeGap": {
"type": "object",
"required": [
@@ -6470,6 +6434,26 @@
}
}
},
+ "ProjectCloudEvent": {
+ "type": "object",
+ "required": [
+ "org_id",
+ "project_id",
+ "cloud_id"
+ ],
+ "properties": {
+ "cloud_id": {
+ "type": "string",
+ "nullable": true
+ },
+ "org_id": {
+ "type": "string"
+ },
+ "project_id": {
+ "type": "string"
+ }
+ }
+ },
"RealtimeRealtimeSnapshot": {
"type": "object",
"required": [
@@ -9011,40 +8995,6 @@
"title": "environment.updated event",
"summary": "SSE event: environment.updated"
},
- "api-v1-realtime-eventsenvironment_cloud.updated": {
- "payload": {
- "type": "object",
- "required": [
- "org_id",
- "project_id",
- "environment_id",
- "cloud_id",
- "revision"
- ],
- "properties": {
- "cloud_id": {
- "type": "string",
- "nullable": true
- },
- "environment_id": {
- "type": "string"
- },
- "org_id": {
- "type": "string"
- },
- "project_id": {
- "type": "string"
- },
- "revision": {
- "type": "integer"
- }
- }
- },
- "contentType": "text/event-stream",
- "name": "environment_cloud.updated",
- "title": "environment_cloud.updated event",
- "summary": "SSE event: environment_cloud.updated"
- },
"api-v1-realtime-eventsforge.gap": {
"payload": {
"type": "object",
@@ -9861,6 +9811,32 @@
"title": "project.updated event",
"summary": "SSE event: project.updated"
},
+ "api-v1-realtime-eventsproject_cloud.updated": {
+ "payload": {
+ "type": "object",
+ "required": [
+ "org_id",
+ "project_id",
+ "cloud_id"
+ ],
+ "properties": {
+ "cloud_id": {
+ "type": "string",
+ "nullable": true
+ },
+ "org_id": {
+ "type": "string"
+ },
+ "project_id": {
+ "type": "string"
+ }
+ }
+ },
+ "contentType": "text/event-stream",
+ "name": "project_cloud.updated",
+ "title": "project_cloud.updated event",
+ "summary": "SSE event: project_cloud.updated"
+ },
"api-v1-realtime-eventsrealtime.snapshot": {
"payload": {
"type": "object",
diff --git a/apps/dashboard/specs/loomplane.openapi.json b/apps/dashboard/specs/loomplane.openapi.json
index 689d81353..707671339 100644
--- a/apps/dashboard/specs/loomplane.openapi.json
+++ b/apps/dashboard/specs/loomplane.openapi.json
@@ -11304,6 +11304,81 @@
}
}
},
+ "/api/v1/projects/{id}/default-cloud": {
+ "get": {
+ "tags": [
+ "Clouds"
+ ],
+ "summary": "defaultCloud.get",
+ "operationId": "defaultCloud.get",
+ "parameters": [
+ {
+ "name": "id",
+ "in": "path",
+ "description": "Path parameter: id",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Result",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/DefaultCloud"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/projects/{id}/default-cloud/preview": {
+ "post": {
+ "tags": [
+ "Clouds"
+ ],
+ "summary": "defaultCloud.preview",
+ "operationId": "defaultCloud.preview",
+ "parameters": [
+ {
+ "name": "id",
+ "in": "path",
+ "description": "Path parameter: id",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "description": "Request body",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/DefaultCloudInputBody"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "Result",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Preview"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/api/v1/projects/{id}/deletion": {
"get": {
"tags": [
@@ -11503,99 +11578,6 @@
}
}
},
- "/api/v1/projects/{id}/environments/{environmentId}/cloud": {
- "get": {
- "tags": [
- "Clouds"
- ],
- "summary": "environmentClouds.get",
- "operationId": "environmentClouds.get",
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "description": "Path parameter: id",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "environmentId",
- "in": "path",
- "description": "Path parameter: environmentId",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Result",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/EnvironmentCloud"
- }
- }
- }
- }
- }
- }
- },
- "/api/v1/projects/{id}/environments/{environmentId}/cloud/preview": {
- "post": {
- "tags": [
- "Clouds"
- ],
- "summary": "environmentClouds.preview",
- "operationId": "environmentClouds.preview",
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "description": "Path parameter: id",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "environmentId",
- "in": "path",
- "description": "Path parameter: environmentId",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "requestBody": {
- "description": "Request body",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/EnvironmentCloudInputBody"
- }
- }
- },
- "required": true
- },
- "responses": {
- "200": {
- "description": "Result",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Preview"
- }
- }
- }
- }
- }
- }
- },
"/api/v1/projects/{id}/environments/{environmentId}/provider-environments/retry": {
"post": {
"tags": [
@@ -20407,51 +20389,6 @@
}
}
},
- "Assignment": {
- "type": "object",
- "required": [
- "grant_revision",
- "cloud_revision",
- "org_id",
- "project_id",
- "environment_id",
- "cloud_id",
- "revision",
- "targets"
- ],
- "properties": {
- "cloud_id": {
- "type": "string"
- },
- "cloud_revision": {
- "type": "integer"
- },
- "default_placement": {
- "$ref": "#/components/schemas/DefaultPlacement"
- },
- "environment_id": {
- "type": "string"
- },
- "grant_revision": {
- "type": "integer"
- },
- "org_id": {
- "type": "string"
- },
- "project_id": {
- "type": "string"
- },
- "revision": {
- "type": "integer"
- },
- "targets": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/CloudprofilesTarget"
- }
- }
- }
- },
"AttachDefaults": {
"type": "object",
"required": [
@@ -21607,16 +21544,12 @@
"template",
"template_hash",
"commit_sha",
- "assignment_revision",
"cloud_revision",
"target_revision",
"grant_revision",
"target_name"
],
"properties": {
- "assignment_revision": {
- "type": "integer"
- },
"cloud_revision": {
"type": "integer"
},
@@ -22217,12 +22150,12 @@
"default": {
"type": "boolean"
},
- "environment_id": {
- "type": "string"
- },
"pool_id": {
"type": "string"
},
+ "project_default": {
+ "type": "boolean"
+ },
"provider": {
"type": "string"
},
@@ -22256,12 +22189,12 @@
"default": {
"type": "boolean"
},
- "environment_id": {
- "type": "string"
- },
"pool_id": {
"type": "string"
},
+ "project_default": {
+ "type": "boolean"
+ },
"provider": {
"type": "string"
},
@@ -23048,7 +22981,6 @@
"account_identity",
"cloud_id",
"cloud_revision",
- "assignment_revision",
"target_id",
"target_revision",
"target_name",
@@ -23062,9 +22994,6 @@
"allocation": {
"type": "string"
},
- "assignment_revision": {
- "type": "integer"
- },
"cloud_id": {
"type": "string"
},
@@ -25891,6 +25820,52 @@
}
}
},
+ "DefaultCloud": {
+ "type": "object",
+ "required": [
+ "project_id",
+ "cloud",
+ "revision"
+ ],
+ "properties": {
+ "cloud": {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/ProjectCloud"
+ },
+ {
+ "type": "object",
+ "nullable": true,
+ "enum": [
+ null
+ ]
+ }
+ ]
+ },
+ "project_id": {
+ "type": "string",
+ "x-forge-id": true
+ },
+ "revision": {
+ "type": "integer"
+ }
+ }
+ },
+ "DefaultCloudInputBody": {
+ "type": "object",
+ "required": [
+ "cloud_id",
+ "revision"
+ ],
+ "properties": {
+ "cloud_id": {
+ "type": "string"
+ },
+ "revision": {
+ "type": "integer"
+ }
+ }
+ },
"DefaultPlacement": {
"type": "object",
"required": [
@@ -27673,47 +27648,6 @@
}
}
},
- "EnvironmentCloud": {
- "type": "object",
- "required": [
- "assignment",
- "revision"
- ],
- "properties": {
- "assignment": {
- "oneOf": [
- {
- "$ref": "#/components/schemas/Assignment"
- },
- {
- "type": "object",
- "nullable": true,
- "enum": [
- null
- ]
- }
- ]
- },
- "revision": {
- "type": "integer"
- }
- }
- },
- "EnvironmentCloudInputBody": {
- "type": "object",
- "required": [
- "cloud_id",
- "revision"
- ],
- "properties": {
- "cloud_id": {
- "type": "string"
- },
- "revision": {
- "type": "integer"
- }
- }
- },
"EnvironmentConnections": {
"type": "object",
"required": [
@@ -27752,11 +27686,11 @@
"project_name",
"environment_id",
"environment_name",
- "assigned",
+ "default",
"placements"
],
"properties": {
- "assigned": {
+ "default": {
"type": "boolean"
},
"environment_id": {
@@ -35538,8 +35472,8 @@
"after": {
"$ref": "#/components/schemas/CloudprofilesTarget"
},
- "after_assignment": {
- "$ref": "#/components/schemas/Assignment"
+ "after_cloud": {
+ "$ref": "#/components/schemas/ProjectCloud"
},
"after_default": {
"$ref": "#/components/schemas/DefaultPlacement"
@@ -35547,8 +35481,8 @@
"before": {
"$ref": "#/components/schemas/CloudprofilesTarget"
},
- "before_assignment": {
- "$ref": "#/components/schemas/Assignment"
+ "before_cloud": {
+ "$ref": "#/components/schemas/ProjectCloud"
},
"before_default": {
"$ref": "#/components/schemas/DefaultPlacement"
@@ -35754,6 +35688,47 @@
}
}
},
+ "ProjectCloud": {
+ "type": "object",
+ "required": [
+ "grant_revision",
+ "cloud_revision",
+ "org_id",
+ "project_id",
+ "cloud_id",
+ "default",
+ "targets"
+ ],
+ "properties": {
+ "cloud_id": {
+ "type": "string"
+ },
+ "cloud_revision": {
+ "type": "integer"
+ },
+ "default": {
+ "type": "boolean"
+ },
+ "default_placement": {
+ "$ref": "#/components/schemas/DefaultPlacement"
+ },
+ "grant_revision": {
+ "type": "integer"
+ },
+ "org_id": {
+ "type": "string"
+ },
+ "project_id": {
+ "type": "string"
+ },
+ "targets": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/CloudprofilesTarget"
+ }
+ }
+ }
+ },
"ProjectDomain": {
"type": "object",
"required": [
@@ -35813,12 +35788,16 @@
"project_id",
"target_ids",
"revision",
- "revoked"
+ "revoked",
+ "default"
],
"properties": {
"cloud_id": {
"type": "string"
},
+ "default": {
+ "type": "boolean"
+ },
"org_id": {
"type": "string"
},
diff --git a/apps/dashboard/src/client/cache-contract.test.ts b/apps/dashboard/src/client/cache-contract.test.ts
index d775a3aac..7f7c66bae 100644
--- a/apps/dashboard/src/client/cache-contract.test.ts
+++ b/apps/dashboard/src/client/cache-contract.test.ts
@@ -46,8 +46,6 @@ for (const [, op] of reads) {
// Tags known to reach nothing today, each with why. Shrink this list; never
// grow it without a reason a reviewer would accept.
const known: Record = {
- EnvironmentCloud:
- "the environment Cloud read has no identity; it goes when Clouds stop being per environment",
"Watch[]": "release watches are only read one at a time, by deployment",
"Collection[]":
"build output collections are delivered to the log view, not listed",
diff --git a/apps/dashboard/src/client/forge/loomplane/codecs.ts b/apps/dashboard/src/client/forge/loomplane/codecs.ts
index a8ea7db12..f84a3180a 100644
--- a/apps/dashboard/src/client/forge/loomplane/codecs.ts
+++ b/apps/dashboard/src/client/forge/loomplane/codecs.ts
@@ -64,8 +64,6 @@ export const CODECS: Record = {
"ApplyInputBody": {"kind": "object", "fields": {"review": {"ts": "review"}}, "required": ["review"]},
"ApproveExpansionInputBody": {"kind": "object", "fields": {"expected_revision": {"ts": "expectedRevision"}}, "required": ["expected_revision"]},
"ArtifactChoice": {"kind": "object", "fields": {"from": {"ts": "from"}, "reason": {"ts": "reason"}, "reference": {"ts": "reference"}, "reused": {"ts": "reused"}, "revision": {"ts": "revision"}, "service": {"ts": "service"}}, "required": ["reused", "service"]},
- "Assignment": {"kind": "object", "fields": {"cloud_id": {"ts": "cloudId"}, "cloud_revision": {"ts": "cloudRevision"}, "default_placement": {"ts": "defaultPlacement", "codec": () => CODECS["DefaultPlacement"]}, "environment_id": {"ts": "environmentId"}, "grant_revision": {"ts": "grantRevision"}, "org_id": {"ts": "orgId"}, "project_id": {"ts": "projectId"}, "revision": {"ts": "revision"}, "targets": {"ts": "targets", "codec": () => CODECS["Assignment.targets"]}}, "required": ["cloud_id", "cloud_revision", "environment_id", "grant_revision", "org_id", "project_id", "revision", "targets"]},
- "Assignment.targets": {"kind": "array", "items": () => CODECS["CloudprofilesTarget"]},
"AttachDefaults": {"kind": "object", "fields": {"blocked_path_prefixes": {"ts": "blockedPathPrefixes", "codec": () => CODECS["AttachDefaults.blocked_path_prefixes"]}, "cloud_id": {"ts": "cloudId"}, "environment_id": {"ts": "environmentId"}, "port": {"ts": "port"}, "service": {"ts": "service"}}, "required": ["blocked_path_prefixes", "environment_id", "port", "service"]},
"AttachDefaults.blocked_path_prefixes": {"kind": "array"},
"AttachmentInput": {"kind": "object", "fields": {"adopt_namespace": {"ts": "adoptNamespace"}, "cloud_revision": {"ts": "cloudRevision"}, "endpoint_fingerprint": {"ts": "endpointFingerprint"}, "grant_revision": {"ts": "grantRevision"}, "namespace": {"ts": "namespace"}, "namespace_uid": {"ts": "namespaceUid"}, "prerequisites": {"ts": "prerequisites", "codec": () => CODECS["AttachmentPrerequisites"]}, "project_id": {"ts": "projectId"}, "resource_revision": {"ts": "resourceRevision"}, "runtime_access": {"ts": "runtimeAccess", "codec": () => CODECS["RuntimeAccessProfile"]}, "service_account_name": {"ts": "serviceAccountName"}, "target_slug": {"ts": "targetSlug"}, "trust_fingerprint": {"ts": "trustFingerprint"}}, "required": ["adopt_namespace", "cloud_revision", "endpoint_fingerprint", "grant_revision", "namespace", "prerequisites", "project_id", "resource_revision", "service_account_name", "target_slug", "trust_fingerprint"]},
@@ -124,7 +122,7 @@ export const CODECS: Record = {
"CapacityBudget": {"kind": "object", "fields": {"horizon_seconds": {"ts": "horizonSeconds"}, "max_horizon_micro_usd": {"ts": "maxHorizonMicroUsd"}, "max_hourly_micro_usd": {"ts": "maxHourlyMicroUsd"}}, "required": ["horizon_seconds", "max_horizon_micro_usd", "max_hourly_micro_usd"]},
"CapacityChange": {"kind": "object", "fields": {"cloud_id": {"ts": "cloudId"}, "entity_id": {"ts": "entityId"}, "kind": {"ts": "kind"}, "org_id": {"ts": "orgId"}, "revision": {"ts": "revision"}, "status": {"ts": "status"}}, "required": ["cloud_id", "entity_id", "kind", "org_id", "revision"]},
"CapacityDemand": {"kind": "object", "fields": {"architecture": {"ts": "architecture"}, "cloud_id": {"ts": "cloudId"}, "environment_id": {"ts": "environmentId"}, "intent_hash": {"ts": "intentHash"}, "local_data": {"ts": "localData"}, "org_id": {"ts": "orgId"}, "plan_id": {"ts": "planId"}, "policy_revision": {"ts": "policyRevision"}, "pool_id": {"ts": "poolId"}, "project_id": {"ts": "projectId"}, "resources": {"ts": "resources", "codec": () => CODECS["ResourceVector"]}, "service": {"ts": "service"}, "sticky_server_id": {"ts": "stickyServerId"}, "target_id": {"ts": "targetId"}}, "required": ["architecture", "cloud_id", "environment_id", "intent_hash", "local_data", "org_id", "plan_id", "policy_revision", "pool_id", "project_id", "resources", "service", "sticky_server_id", "target_id"]},
- "CapacityIntent": {"kind": "object", "fields": {"assignment_revision": {"ts": "assignmentRevision"}, "cloud_revision": {"ts": "cloudRevision"}, "commit_sha": {"ts": "commitSha"}, "demand": {"ts": "demand", "codec": () => CODECS["CapacityDemand"]}, "grant_revision": {"ts": "grantRevision"}, "target_name": {"ts": "targetName"}, "target_revision": {"ts": "targetRevision"}, "template": {"ts": "template", "codec": () => CODECS["PoolExpansionPolicy"]}, "template_hash": {"ts": "templateHash"}}, "required": ["assignment_revision", "cloud_revision", "commit_sha", "demand", "grant_revision", "target_name", "target_revision", "template", "template_hash"]},
+ "CapacityIntent": {"kind": "object", "fields": {"cloud_revision": {"ts": "cloudRevision"}, "commit_sha": {"ts": "commitSha"}, "demand": {"ts": "demand", "codec": () => CODECS["CapacityDemand"]}, "grant_revision": {"ts": "grantRevision"}, "target_name": {"ts": "targetName"}, "target_revision": {"ts": "targetRevision"}, "template": {"ts": "template", "codec": () => CODECS["PoolExpansionPolicy"]}, "template_hash": {"ts": "templateHash"}}, "required": ["cloud_revision", "commit_sha", "demand", "grant_revision", "target_name", "target_revision", "template", "template_hash"]},
"CapacityObservation": {"kind": "object", "fields": {"checked_at": {"ts": "checkedAt"}, "cpu_millis": {"ts": "cpuMillis"}, "free_storage_bytes": {"ts": "freeStorageBytes"}, "memory_bytes": {"ts": "memoryBytes"}, "storage_bytes": {"ts": "storageBytes"}}, "required": ["checked_at"]},
"CapacityPolicy": {"kind": "object", "fields": {"budget": {"ts": "budget", "codec": () => CODECS["CapacityBudget"]}, "cloud_id": {"ts": "cloudId"}, "enabled": {"ts": "enabled"}, "frontend_limits": {"ts": "frontendLimits", "codec": () => CODECS["CapacityPolicy.frontend_limits"]}, "gpu_limits": {"ts": "gpuLimits", "codec": () => CODECS["CapacityPolicy.gpu_limits"]}, "limits": {"ts": "limits", "codec": () => CODECS["ResourceVector"]}, "org_id": {"ts": "orgId"}, "pools": {"ts": "pools", "codec": () => CODECS["CapacityPolicy.pools"]}, "require_expansion_approval": {"ts": "requireExpansionApproval"}, "revision": {"ts": "revision"}}, "required": ["cloud_id", "enabled", "frontend_limits", "limits", "org_id", "pools", "require_expansion_approval", "revision"]},
"CapacityPolicy.frontend_limits": {"kind": "array", "items": () => CODECS["FrontendLimit"]},
@@ -157,8 +155,8 @@ export const CODECS: Record = {
"CertificateView": {"kind": "object", "fields": {"days_left": {"ts": "daysLeft"}, "expires_at": {"ts": "expiresAt"}, "rotation": {"ts": "rotation"}, "warning": {"ts": "warning"}}, "required": ["rotation", "warning"]},
"ChallengeCredentialInputBody": {"kind": "object", "fields": {"connection_id": {"ts": "connectionId"}, "revision": {"ts": "revision"}}, "required": ["connection_id", "revision"]},
"Change": {"kind": "object", "fields": {"field": {"ts": "field"}, "from": {"ts": "from"}, "to": {"ts": "to"}}, "required": ["field", "from", "to"]},
- "ChangeInput": {"kind": "object", "fields": {"cloud_id": {"ts": "cloudId"}, "connection_id": {"ts": "connectionId"}, "default": {"ts": "default"}, "environment_id": {"ts": "environmentId"}, "pool_id": {"ts": "poolId"}, "provider": {"ts": "provider"}, "region": {"ts": "region"}, "revision": {"ts": "revision"}, "runtime": {"ts": "runtime"}, "target_id": {"ts": "targetId"}}, "required": ["cloud_id", "revision"]},
- "ChangeInputBody": {"kind": "object", "fields": {"cloud_id": {"ts": "cloudId"}, "connection_id": {"ts": "connectionId"}, "default": {"ts": "default"}, "environment_id": {"ts": "environmentId"}, "pool_id": {"ts": "poolId"}, "provider": {"ts": "provider"}, "region": {"ts": "region"}, "revision": {"ts": "revision"}, "runtime": {"ts": "runtime"}, "target_id": {"ts": "targetId"}}, "required": ["cloud_id", "revision"]},
+ "ChangeInput": {"kind": "object", "fields": {"cloud_id": {"ts": "cloudId"}, "connection_id": {"ts": "connectionId"}, "default": {"ts": "default"}, "pool_id": {"ts": "poolId"}, "project_default": {"ts": "projectDefault"}, "provider": {"ts": "provider"}, "region": {"ts": "region"}, "revision": {"ts": "revision"}, "runtime": {"ts": "runtime"}, "target_id": {"ts": "targetId"}}, "required": ["cloud_id", "revision"]},
+ "ChangeInputBody": {"kind": "object", "fields": {"cloud_id": {"ts": "cloudId"}, "connection_id": {"ts": "connectionId"}, "default": {"ts": "default"}, "pool_id": {"ts": "poolId"}, "project_default": {"ts": "projectDefault"}, "provider": {"ts": "provider"}, "region": {"ts": "region"}, "revision": {"ts": "revision"}, "runtime": {"ts": "runtime"}, "target_id": {"ts": "targetId"}}, "required": ["cloud_id", "revision"]},
"ChangedService": {"kind": "object", "fields": {"action_id": {"ts": "actionId"}, "canary": {"ts": "canary"}, "last_canary": {"ts": "lastCanary"}, "name": {"ts": "name"}, "op": {"ts": "op"}, "provider": {"ts": "provider"}}, "required": ["action_id", "canary", "last_canary", "name", "op", "provider"]},
"CheckInputBody": {"kind": "object", "fields": {"dependency": {"ts": "dependency"}, "dsn": {"ts": "dsn"}, "engine": {"ts": "engine"}, "kind": {"ts": "kind"}, "target": {"ts": "target"}}, "required": ["dependency", "dsn", "engine", "kind", "target"]},
"CheckResult": {"kind": "object", "fields": {"missing": {"ts": "missing", "codec": () => CODECS["CheckResult.missing"]}, "notes": {"ts": "notes", "codec": () => CODECS["CheckResult.notes"]}, "ok": {"ts": "ok"}, "problems": {"ts": "problems", "codec": () => CODECS["CheckResult.problems"]}, "version": {"ts": "version"}}, "required": ["ok"]},
@@ -206,7 +204,7 @@ export const CODECS: Record = {
"CloudLocationDeleteInputBody": {"kind": "object", "fields": {"cloud_revision": {"ts": "cloudRevision"}, "revision": {"ts": "revision"}}, "required": ["cloud_revision", "revision"]},
"CloudLocationList": {"kind": "object", "fields": {"locations": {"ts": "locations", "codec": () => CODECS["CloudLocationList.locations"]}}, "required": ["locations"]},
"CloudLocationList.locations": {"kind": "array", "items": () => CODECS["CloudLocation"]},
- "CloudPlacement": {"kind": "object", "fields": {"account_identity": {"ts": "accountIdentity"}, "allocation": {"ts": "allocation"}, "assignment_revision": {"ts": "assignmentRevision"}, "cloud_id": {"ts": "cloudId"}, "cloud_revision": {"ts": "cloudRevision"}, "connection_generation": {"ts": "connectionGeneration"}, "connection_id": {"ts": "connectionId"}, "cpu_millis": {"ts": "cpuMillis"}, "default": {"ts": "default"}, "gpu_kind": {"ts": "gpuKind"}, "gpus": {"ts": "gpus"}, "grant_revision": {"ts": "grantRevision"}, "memory_bytes": {"ts": "memoryBytes"}, "pool_id": {"ts": "poolId"}, "pool_revision": {"ts": "poolRevision"}, "provider": {"ts": "provider"}, "region": {"ts": "region"}, "region_source": {"ts": "regionSource"}, "server_id": {"ts": "serverId"}, "server_revision": {"ts": "serverRevision"}, "target_id": {"ts": "targetId"}, "target_name": {"ts": "targetName"}, "target_revision": {"ts": "targetRevision"}}, "required": ["account_identity", "assignment_revision", "cloud_id", "cloud_revision", "connection_id", "provider", "target_id", "target_name", "target_revision"]},
+ "CloudPlacement": {"kind": "object", "fields": {"account_identity": {"ts": "accountIdentity"}, "allocation": {"ts": "allocation"}, "cloud_id": {"ts": "cloudId"}, "cloud_revision": {"ts": "cloudRevision"}, "connection_generation": {"ts": "connectionGeneration"}, "connection_id": {"ts": "connectionId"}, "cpu_millis": {"ts": "cpuMillis"}, "default": {"ts": "default"}, "gpu_kind": {"ts": "gpuKind"}, "gpus": {"ts": "gpus"}, "grant_revision": {"ts": "grantRevision"}, "memory_bytes": {"ts": "memoryBytes"}, "pool_id": {"ts": "poolId"}, "pool_revision": {"ts": "poolRevision"}, "provider": {"ts": "provider"}, "region": {"ts": "region"}, "region_source": {"ts": "regionSource"}, "server_id": {"ts": "serverId"}, "server_revision": {"ts": "serverRevision"}, "target_id": {"ts": "targetId"}, "target_name": {"ts": "targetName"}, "target_revision": {"ts": "targetRevision"}}, "required": ["account_identity", "cloud_id", "cloud_revision", "connection_id", "provider", "target_id", "target_name", "target_revision"]},
"CloudProjectGrantInputBody": {"kind": "object", "fields": {"target_ids": {"ts": "targetIds", "codec": () => CODECS["CloudProjectGrantInputBody.target_ids"]}}, "required": ["target_ids"]},
"CloudProjectGrantInputBody.target_ids": {"kind": "array"},
"CloudProjectGrantList": {"kind": "object", "fields": {"grants": {"ts": "grants", "codec": () => CODECS["CloudProjectGrantList.grants"]}}, "required": ["grants"]},
@@ -362,6 +360,8 @@ export const CODECS: Record = {
"DbgatewayRouteStatus": {"kind": "object", "fields": {"backend_conns": {"ts": "backendConns"}, "id": {"ts": "id"}, "max_connections": {"ts": "maxConnections"}, "pin_rate": {"ts": "pinRate"}, "reachable": {"ts": "reachable"}, "reported": {"ts": "reported"}, "resource": {"ts": "resource"}, "state": {"ts": "state"}}, "required": ["backend_conns", "id", "max_connections", "pin_rate", "reachable", "reported", "resource", "state"]},
"DecideInputBody": {"kind": "object", "fields": {"note": {"ts": "note"}, "revision": {"ts": "revision"}}},
"DeclineInputBody": {"kind": "object", "fields": {"reason": {"ts": "reason"}}},
+ "DefaultCloud": {"kind": "object", "fields": {"cloud": {"ts": "cloud", "codec": () => CODECS["ProjectCloud"]}, "project_id": {"ts": "projectId"}, "revision": {"ts": "revision"}}, "required": ["cloud", "project_id", "revision"]},
+ "DefaultCloudInputBody": {"kind": "object", "fields": {"cloud_id": {"ts": "cloudId"}, "revision": {"ts": "revision"}}, "required": ["cloud_id", "revision"]},
"DefaultPlacement": {"kind": "object", "fields": {"connection_id": {"ts": "connectionId"}, "provider": {"ts": "provider"}, "region": {"ts": "region"}}, "required": ["connection_id", "provider", "region"]},
"Defaults": {"kind": "object", "fields": {"cloud_tags": {"ts": "cloudTags", "codec": () => CODECS["Defaults.cloud_tags"]}, "provider": {"ts": "provider"}, "region": {"ts": "region"}}},
"Defaults.cloud_tags": {"kind": "array"},
@@ -465,14 +465,11 @@ export const CODECS: Record = {
"EnvironmentChange": {"kind": "object", "fields": {"compensation_message": {"ts": "compensationMessage"}, "compensation_mode": {"ts": "compensationMode"}, "deployment_id": {"ts": "deploymentId"}, "environment": {"ts": "environment"}, "environment_id": {"ts": "environmentId"}, "error": {"ts": "error"}, "external_routing": {"ts": "externalRouting"}, "plan_id": {"ts": "planId"}, "project_id": {"ts": "projectId"}, "routes": {"ts": "routes", "codec": () => CODECS["EnvironmentChange.routes"]}, "routing_evidence": {"ts": "routingEvidence"}, "routing_status": {"ts": "routingStatus"}, "services": {"ts": "services", "codec": () => CODECS["EnvironmentChange.services"]}, "status": {"ts": "status"}, "summary": {"ts": "summary", "codec": () => CODECS["PlanSummary"]}}, "required": ["environment", "environment_id", "external_routing", "services", "status", "summary"]},
"EnvironmentChange.routes": {"kind": "array", "items": () => CODECS["SyncRoute"]},
"EnvironmentChange.services": {"kind": "array"},
- "EnvironmentCloud": {"kind": "object", "fields": {"assignment": {"ts": "assignment", "codec": () => CODECS["Assignment"]}, "revision": {"ts": "revision"}}, "required": ["assignment", "revision"]},
- "EnvironmentCloudEvent": {"kind": "object", "fields": {"cloud_id": {"ts": "cloudId"}, "environment_id": {"ts": "environmentId"}, "org_id": {"ts": "orgId"}, "project_id": {"ts": "projectId"}, "revision": {"ts": "revision"}}, "required": ["cloud_id", "environment_id", "org_id", "project_id", "revision"]},
- "EnvironmentCloudInputBody": {"kind": "object", "fields": {"cloud_id": {"ts": "cloudId"}, "revision": {"ts": "revision"}}, "required": ["cloud_id", "revision"]},
"EnvironmentConnections": {"kind": "object", "fields": {"connections": {"ts": "connections", "codec": () => CODECS["EnvironmentConnections.connections"]}, "environment": {"ts": "environment"}}, "required": ["connections", "environment"]},
"EnvironmentConnections.connections": {"kind": "record"},
"EnvironmentList": {"kind": "object", "fields": {"environments": {"ts": "environments", "codec": () => CODECS["EnvironmentList.environments"]}}, "required": ["environments"]},
"EnvironmentList.environments": {"kind": "array", "items": () => CODECS["Environment"]},
- "EnvironmentUsage": {"kind": "object", "fields": {"assigned": {"ts": "assigned"}, "environment_id": {"ts": "environmentId"}, "environment_name": {"ts": "environmentName"}, "placements": {"ts": "placements", "codec": () => CODECS["EnvironmentUsage.placements"]}, "project_id": {"ts": "projectId"}, "project_name": {"ts": "projectName"}}, "required": ["assigned", "environment_id", "environment_name", "placements", "project_id", "project_name"]},
+ "EnvironmentUsage": {"kind": "object", "fields": {"default": {"ts": "default"}, "environment_id": {"ts": "environmentId"}, "environment_name": {"ts": "environmentName"}, "placements": {"ts": "placements", "codec": () => CODECS["EnvironmentUsage.placements"]}, "project_id": {"ts": "projectId"}, "project_name": {"ts": "projectName"}}, "required": ["default", "environment_id", "environment_name", "placements", "project_id", "project_name"]},
"EnvironmentUsage.placements": {"kind": "array", "items": () => CODECS["PlacementUsage"]},
"Event": {"kind": "object", "fields": {"at": {"ts": "at"}, "data": {"ts": "data"}, "kind": {"ts": "kind"}, "seq": {"ts": "seq"}, "task_id": {"ts": "taskId"}}, "required": ["at", "data", "kind", "seq", "task_id"]},
"EventAcceptance": {"kind": "object", "fields": {"attempts": {"ts": "attempts"}, "error_code": {"ts": "errorCode"}, "event_id": {"ts": "eventId"}, "state": {"ts": "state"}}, "required": ["attempts", "event_id", "state"]},
@@ -880,7 +877,7 @@ export const CODECS: Record = {
"Preferences": {"kind": "object", "fields": {"agent_email": {"ts": "agentEmail"}, "deployment_email": {"ts": "deploymentEmail"}, "mail_enabled": {"ts": "mailEnabled"}}, "required": ["agent_email", "deployment_email", "mail_enabled"]},
"PrepareInputBody": {"kind": "object", "fields": {"from": {"ts": "from"}, "replace": {"ts": "replace"}, "scope": {"ts": "scope", "codec": () => CODECS["PrepareInputBody.scope"]}, "to": {"ts": "to"}}},
"PrepareInputBody.scope": {"kind": "array"},
- "Preview": {"kind": "object", "fields": {"after": {"ts": "after", "codec": () => CODECS["CloudprofilesTarget"]}, "after_assignment": {"ts": "afterAssignment", "codec": () => CODECS["Assignment"]}, "after_default": {"ts": "afterDefault", "codec": () => CODECS["DefaultPlacement"]}, "before": {"ts": "before", "codec": () => CODECS["CloudprofilesTarget"]}, "before_assignment": {"ts": "beforeAssignment", "codec": () => CODECS["Assignment"]}, "before_default": {"ts": "beforeDefault", "codec": () => CODECS["DefaultPlacement"]}, "blockers": {"ts": "blockers", "codec": () => CODECS["Preview.blockers"]}, "created_at": {"ts": "createdAt"}, "environments": {"ts": "environments", "codec": () => CODECS["Preview.environments"]}, "id": {"ts": "id"}, "input": {"ts": "input", "codec": () => CODECS["ChangeInput"]}, "org_id": {"ts": "orgId"}, "project_id": {"ts": "projectId"}, "reverts": {"ts": "reverts"}, "revision": {"ts": "revision"}}, "required": ["blockers", "created_at", "environments", "id", "input", "org_id", "project_id", "revision"]},
+ "Preview": {"kind": "object", "fields": {"after": {"ts": "after", "codec": () => CODECS["CloudprofilesTarget"]}, "after_cloud": {"ts": "afterCloud", "codec": () => CODECS["ProjectCloud"]}, "after_default": {"ts": "afterDefault", "codec": () => CODECS["DefaultPlacement"]}, "before": {"ts": "before", "codec": () => CODECS["CloudprofilesTarget"]}, "before_cloud": {"ts": "beforeCloud", "codec": () => CODECS["ProjectCloud"]}, "before_default": {"ts": "beforeDefault", "codec": () => CODECS["DefaultPlacement"]}, "blockers": {"ts": "blockers", "codec": () => CODECS["Preview.blockers"]}, "created_at": {"ts": "createdAt"}, "environments": {"ts": "environments", "codec": () => CODECS["Preview.environments"]}, "id": {"ts": "id"}, "input": {"ts": "input", "codec": () => CODECS["ChangeInput"]}, "org_id": {"ts": "orgId"}, "project_id": {"ts": "projectId"}, "reverts": {"ts": "reverts"}, "revision": {"ts": "revision"}}, "required": ["blockers", "created_at", "environments", "id", "input", "org_id", "project_id", "revision"]},
"Preview.blockers": {"kind": "array"},
"Preview.environments": {"kind": "array", "items": () => CODECS["EnvironmentChange"]},
"Problem": {"kind": "object", "fields": {"code": {"ts": "code"}, "message": {"ts": "message"}}, "required": ["code", "message"]},
@@ -888,11 +885,14 @@ export const CODECS: Record = {
"Project": {"kind": "object", "fields": {"autonomous_promotion": {"ts": "autonomousPromotion"}, "color": {"ts": "color"}, "created_at": {"ts": "createdAt"}, "created_by": {"ts": "createdBy"}, "deployment_mode": {"ts": "deploymentMode"}, "description": {"ts": "description"}, "exclusions": {"ts": "exclusions", "codec": () => CODECS["Project.exclusions"]}, "icon": {"ts": "icon"}, "id": {"ts": "id"}, "kind": {"ts": "kind"}, "min_staging_soak_seconds": {"ts": "minStagingSoakSeconds"}, "name": {"ts": "name"}, "org_id": {"ts": "orgId"}, "repositories": {"ts": "repositories", "codec": () => CODECS["Project.repositories"]}, "responsible_team_id": {"ts": "responsibleTeamId"}, "slug": {"ts": "slug"}, "status": {"ts": "status"}, "updated_at": {"ts": "updatedAt"}}, "required": ["autonomous_promotion", "color", "created_at", "created_by", "deployment_mode", "description", "exclusions", "icon", "id", "kind", "min_staging_soak_seconds", "name", "org_id", "repositories", "responsible_team_id", "slug", "status", "updated_at"]},
"Project.exclusions": {"kind": "array", "items": () => CODECS["Exclusion"]},
"Project.repositories": {"kind": "array"},
+ "ProjectCloud": {"kind": "object", "fields": {"cloud_id": {"ts": "cloudId"}, "cloud_revision": {"ts": "cloudRevision"}, "default": {"ts": "default"}, "default_placement": {"ts": "defaultPlacement", "codec": () => CODECS["DefaultPlacement"]}, "grant_revision": {"ts": "grantRevision"}, "org_id": {"ts": "orgId"}, "project_id": {"ts": "projectId"}, "targets": {"ts": "targets", "codec": () => CODECS["ProjectCloud.targets"]}}, "required": ["cloud_id", "cloud_revision", "default", "grant_revision", "org_id", "project_id", "targets"]},
+ "ProjectCloud.targets": {"kind": "array", "items": () => CODECS["CloudprofilesTarget"]},
+ "ProjectCloudEvent": {"kind": "object", "fields": {"cloud_id": {"ts": "cloudId"}, "org_id": {"ts": "orgId"}, "project_id": {"ts": "projectId"}}, "required": ["cloud_id", "org_id", "project_id"]},
"ProjectDomain": {"kind": "object", "fields": {"hostnames": {"ts": "hostnames", "codec": () => CODECS["ProjectDomain.hostnames"]}, "mode": {"ts": "mode"}, "name": {"ts": "name"}, "provider": {"ts": "provider"}, "verified": {"ts": "verified"}, "wildcards": {"ts": "wildcards"}, "zone_id": {"ts": "zoneId"}}, "required": ["hostnames", "mode", "name", "verified", "wildcards", "zone_id"]},
"ProjectDomain.hostnames": {"kind": "array", "items": () => CODECS["HostnameUse"]},
"ProjectDomainList": {"kind": "object", "fields": {"domains": {"ts": "domains", "codec": () => CODECS["ProjectDomainList.domains"]}}, "required": ["domains"]},
"ProjectDomainList.domains": {"kind": "array", "items": () => CODECS["ProjectDomain"]},
- "ProjectGrant": {"kind": "object", "fields": {"cloud_id": {"ts": "cloudId"}, "org_id": {"ts": "orgId"}, "project_id": {"ts": "projectId"}, "revision": {"ts": "revision"}, "revoked": {"ts": "revoked"}, "target_ids": {"ts": "targetIds", "codec": () => CODECS["ProjectGrant.target_ids"]}}, "required": ["cloud_id", "org_id", "project_id", "revision", "revoked", "target_ids"]},
+ "ProjectGrant": {"kind": "object", "fields": {"cloud_id": {"ts": "cloudId"}, "default": {"ts": "default"}, "org_id": {"ts": "orgId"}, "project_id": {"ts": "projectId"}, "revision": {"ts": "revision"}, "revoked": {"ts": "revoked"}, "target_ids": {"ts": "targetIds", "codec": () => CODECS["ProjectGrant.target_ids"]}}, "required": ["cloud_id", "default", "org_id", "project_id", "revision", "revoked", "target_ids"]},
"ProjectGrant.target_ids": {"kind": "array"},
"ProjectList": {"kind": "object", "fields": {"projects": {"ts": "projects", "codec": () => CODECS["ProjectList.projects"]}}, "required": ["projects"]},
"ProjectList.projects": {"kind": "array", "items": () => CODECS["Project"]},
diff --git a/apps/dashboard/src/client/forge/loomplane/codecs/Assignment.ts b/apps/dashboard/src/client/forge/loomplane/codecs/Assignment.ts
deleted file mode 100644
index c23673e11..000000000
--- a/apps/dashboard/src/client/forge/loomplane/codecs/Assignment.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import type { Codec } from '../codec-runtime';
-import { codec_Assignment_targets } from './Assignment.targets';
-import { codec_DefaultPlacement } from './DefaultPlacement';
-
-export const codec_Assignment: Codec = {"kind": "object", "fields": {"cloud_id": {"ts": "cloudId"}, "cloud_revision": {"ts": "cloudRevision"}, "default_placement": {"ts": "defaultPlacement", "codec": () => codec_DefaultPlacement}, "environment_id": {"ts": "environmentId"}, "grant_revision": {"ts": "grantRevision"}, "org_id": {"ts": "orgId"}, "project_id": {"ts": "projectId"}, "revision": {"ts": "revision"}, "targets": {"ts": "targets", "codec": () => codec_Assignment_targets}}, "required": ["cloud_id", "cloud_revision", "environment_id", "grant_revision", "org_id", "project_id", "revision", "targets"]};
diff --git a/apps/dashboard/src/client/forge/loomplane/codecs/CapacityIntent.ts b/apps/dashboard/src/client/forge/loomplane/codecs/CapacityIntent.ts
index 97e8230e8..dcd77f90f 100644
--- a/apps/dashboard/src/client/forge/loomplane/codecs/CapacityIntent.ts
+++ b/apps/dashboard/src/client/forge/loomplane/codecs/CapacityIntent.ts
@@ -2,4 +2,4 @@ import type { Codec } from '../codec-runtime';
import { codec_CapacityDemand } from './CapacityDemand';
import { codec_PoolExpansionPolicy } from './PoolExpansionPolicy';
-export const codec_CapacityIntent: Codec = {"kind": "object", "fields": {"assignment_revision": {"ts": "assignmentRevision"}, "cloud_revision": {"ts": "cloudRevision"}, "commit_sha": {"ts": "commitSha"}, "demand": {"ts": "demand", "codec": () => codec_CapacityDemand}, "grant_revision": {"ts": "grantRevision"}, "target_name": {"ts": "targetName"}, "target_revision": {"ts": "targetRevision"}, "template": {"ts": "template", "codec": () => codec_PoolExpansionPolicy}, "template_hash": {"ts": "templateHash"}}, "required": ["assignment_revision", "cloud_revision", "commit_sha", "demand", "grant_revision", "target_name", "target_revision", "template", "template_hash"]};
+export const codec_CapacityIntent: Codec = {"kind": "object", "fields": {"cloud_revision": {"ts": "cloudRevision"}, "commit_sha": {"ts": "commitSha"}, "demand": {"ts": "demand", "codec": () => codec_CapacityDemand}, "grant_revision": {"ts": "grantRevision"}, "target_name": {"ts": "targetName"}, "target_revision": {"ts": "targetRevision"}, "template": {"ts": "template", "codec": () => codec_PoolExpansionPolicy}, "template_hash": {"ts": "templateHash"}}, "required": ["cloud_revision", "commit_sha", "demand", "grant_revision", "target_name", "target_revision", "template", "template_hash"]};
diff --git a/apps/dashboard/src/client/forge/loomplane/codecs/ChangeInput.ts b/apps/dashboard/src/client/forge/loomplane/codecs/ChangeInput.ts
index f450af34f..00d745920 100644
--- a/apps/dashboard/src/client/forge/loomplane/codecs/ChangeInput.ts
+++ b/apps/dashboard/src/client/forge/loomplane/codecs/ChangeInput.ts
@@ -1,3 +1,3 @@
import type { Codec } from '../codec-runtime';
-export const codec_ChangeInput: Codec = {"kind": "object", "fields": {"cloud_id": {"ts": "cloudId"}, "connection_id": {"ts": "connectionId"}, "default": {"ts": "default"}, "environment_id": {"ts": "environmentId"}, "pool_id": {"ts": "poolId"}, "provider": {"ts": "provider"}, "region": {"ts": "region"}, "revision": {"ts": "revision"}, "runtime": {"ts": "runtime"}, "target_id": {"ts": "targetId"}}, "required": ["cloud_id", "revision"]};
+export const codec_ChangeInput: Codec = {"kind": "object", "fields": {"cloud_id": {"ts": "cloudId"}, "connection_id": {"ts": "connectionId"}, "default": {"ts": "default"}, "pool_id": {"ts": "poolId"}, "project_default": {"ts": "projectDefault"}, "provider": {"ts": "provider"}, "region": {"ts": "region"}, "revision": {"ts": "revision"}, "runtime": {"ts": "runtime"}, "target_id": {"ts": "targetId"}}, "required": ["cloud_id", "revision"]};
diff --git a/apps/dashboard/src/client/forge/loomplane/codecs/ChangeInputBody.ts b/apps/dashboard/src/client/forge/loomplane/codecs/ChangeInputBody.ts
index 3d359ede6..d579e4ae5 100644
--- a/apps/dashboard/src/client/forge/loomplane/codecs/ChangeInputBody.ts
+++ b/apps/dashboard/src/client/forge/loomplane/codecs/ChangeInputBody.ts
@@ -1,3 +1,3 @@
import type { Codec } from '../codec-runtime';
-export const codec_ChangeInputBody: Codec = {"kind": "object", "fields": {"cloud_id": {"ts": "cloudId"}, "connection_id": {"ts": "connectionId"}, "default": {"ts": "default"}, "environment_id": {"ts": "environmentId"}, "pool_id": {"ts": "poolId"}, "provider": {"ts": "provider"}, "region": {"ts": "region"}, "revision": {"ts": "revision"}, "runtime": {"ts": "runtime"}, "target_id": {"ts": "targetId"}}, "required": ["cloud_id", "revision"]};
+export const codec_ChangeInputBody: Codec = {"kind": "object", "fields": {"cloud_id": {"ts": "cloudId"}, "connection_id": {"ts": "connectionId"}, "default": {"ts": "default"}, "pool_id": {"ts": "poolId"}, "project_default": {"ts": "projectDefault"}, "provider": {"ts": "provider"}, "region": {"ts": "region"}, "revision": {"ts": "revision"}, "runtime": {"ts": "runtime"}, "target_id": {"ts": "targetId"}}, "required": ["cloud_id", "revision"]};
diff --git a/apps/dashboard/src/client/forge/loomplane/codecs/CloudPlacement.ts b/apps/dashboard/src/client/forge/loomplane/codecs/CloudPlacement.ts
index 0706ff219..2f6875803 100644
--- a/apps/dashboard/src/client/forge/loomplane/codecs/CloudPlacement.ts
+++ b/apps/dashboard/src/client/forge/loomplane/codecs/CloudPlacement.ts
@@ -1,3 +1,3 @@
import type { Codec } from '../codec-runtime';
-export const codec_CloudPlacement: Codec = {"kind": "object", "fields": {"account_identity": {"ts": "accountIdentity"}, "allocation": {"ts": "allocation"}, "assignment_revision": {"ts": "assignmentRevision"}, "cloud_id": {"ts": "cloudId"}, "cloud_revision": {"ts": "cloudRevision"}, "connection_generation": {"ts": "connectionGeneration"}, "connection_id": {"ts": "connectionId"}, "cpu_millis": {"ts": "cpuMillis"}, "default": {"ts": "default"}, "gpu_kind": {"ts": "gpuKind"}, "gpus": {"ts": "gpus"}, "grant_revision": {"ts": "grantRevision"}, "memory_bytes": {"ts": "memoryBytes"}, "pool_id": {"ts": "poolId"}, "pool_revision": {"ts": "poolRevision"}, "provider": {"ts": "provider"}, "region": {"ts": "region"}, "region_source": {"ts": "regionSource"}, "server_id": {"ts": "serverId"}, "server_revision": {"ts": "serverRevision"}, "target_id": {"ts": "targetId"}, "target_name": {"ts": "targetName"}, "target_revision": {"ts": "targetRevision"}}, "required": ["account_identity", "assignment_revision", "cloud_id", "cloud_revision", "connection_id", "provider", "target_id", "target_name", "target_revision"]};
+export const codec_CloudPlacement: Codec = {"kind": "object", "fields": {"account_identity": {"ts": "accountIdentity"}, "allocation": {"ts": "allocation"}, "cloud_id": {"ts": "cloudId"}, "cloud_revision": {"ts": "cloudRevision"}, "connection_generation": {"ts": "connectionGeneration"}, "connection_id": {"ts": "connectionId"}, "cpu_millis": {"ts": "cpuMillis"}, "default": {"ts": "default"}, "gpu_kind": {"ts": "gpuKind"}, "gpus": {"ts": "gpus"}, "grant_revision": {"ts": "grantRevision"}, "memory_bytes": {"ts": "memoryBytes"}, "pool_id": {"ts": "poolId"}, "pool_revision": {"ts": "poolRevision"}, "provider": {"ts": "provider"}, "region": {"ts": "region"}, "region_source": {"ts": "regionSource"}, "server_id": {"ts": "serverId"}, "server_revision": {"ts": "serverRevision"}, "target_id": {"ts": "targetId"}, "target_name": {"ts": "targetName"}, "target_revision": {"ts": "targetRevision"}}, "required": ["account_identity", "cloud_id", "cloud_revision", "connection_id", "provider", "target_id", "target_name", "target_revision"]};
diff --git a/apps/dashboard/src/client/forge/loomplane/codecs/DefaultCloud.ts b/apps/dashboard/src/client/forge/loomplane/codecs/DefaultCloud.ts
new file mode 100644
index 000000000..4280dcdd1
--- /dev/null
+++ b/apps/dashboard/src/client/forge/loomplane/codecs/DefaultCloud.ts
@@ -0,0 +1,4 @@
+import type { Codec } from '../codec-runtime';
+import { codec_ProjectCloud } from './ProjectCloud';
+
+export const codec_DefaultCloud: Codec = {"kind": "object", "fields": {"cloud": {"ts": "cloud", "codec": () => codec_ProjectCloud}, "project_id": {"ts": "projectId"}, "revision": {"ts": "revision"}}, "required": ["cloud", "project_id", "revision"]};
diff --git a/apps/dashboard/src/client/forge/loomplane/codecs/DefaultCloudInputBody.ts b/apps/dashboard/src/client/forge/loomplane/codecs/DefaultCloudInputBody.ts
new file mode 100644
index 000000000..412cb88c1
--- /dev/null
+++ b/apps/dashboard/src/client/forge/loomplane/codecs/DefaultCloudInputBody.ts
@@ -0,0 +1,3 @@
+import type { Codec } from '../codec-runtime';
+
+export const codec_DefaultCloudInputBody: Codec = {"kind": "object", "fields": {"cloud_id": {"ts": "cloudId"}, "revision": {"ts": "revision"}}, "required": ["cloud_id", "revision"]};
diff --git a/apps/dashboard/src/client/forge/loomplane/codecs/EnvironmentCloud.ts b/apps/dashboard/src/client/forge/loomplane/codecs/EnvironmentCloud.ts
deleted file mode 100644
index 94b95c9eb..000000000
--- a/apps/dashboard/src/client/forge/loomplane/codecs/EnvironmentCloud.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import type { Codec } from '../codec-runtime';
-import { codec_Assignment } from './Assignment';
-
-export const codec_EnvironmentCloud: Codec = {"kind": "object", "fields": {"assignment": {"ts": "assignment", "codec": () => codec_Assignment}, "revision": {"ts": "revision"}}, "required": ["assignment", "revision"]};
diff --git a/apps/dashboard/src/client/forge/loomplane/codecs/EnvironmentCloudEvent.ts b/apps/dashboard/src/client/forge/loomplane/codecs/EnvironmentCloudEvent.ts
deleted file mode 100644
index 14e0b24c5..000000000
--- a/apps/dashboard/src/client/forge/loomplane/codecs/EnvironmentCloudEvent.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import type { Codec } from '../codec-runtime';
-
-export const codec_EnvironmentCloudEvent: Codec = {"kind": "object", "fields": {"cloud_id": {"ts": "cloudId"}, "environment_id": {"ts": "environmentId"}, "org_id": {"ts": "orgId"}, "project_id": {"ts": "projectId"}, "revision": {"ts": "revision"}}, "required": ["cloud_id", "environment_id", "org_id", "project_id", "revision"]};
diff --git a/apps/dashboard/src/client/forge/loomplane/codecs/EnvironmentCloudInputBody.ts b/apps/dashboard/src/client/forge/loomplane/codecs/EnvironmentCloudInputBody.ts
deleted file mode 100644
index 8fe22028e..000000000
--- a/apps/dashboard/src/client/forge/loomplane/codecs/EnvironmentCloudInputBody.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import type { Codec } from '../codec-runtime';
-
-export const codec_EnvironmentCloudInputBody: Codec = {"kind": "object", "fields": {"cloud_id": {"ts": "cloudId"}, "revision": {"ts": "revision"}}, "required": ["cloud_id", "revision"]};
diff --git a/apps/dashboard/src/client/forge/loomplane/codecs/EnvironmentUsage.ts b/apps/dashboard/src/client/forge/loomplane/codecs/EnvironmentUsage.ts
index 1d97c4454..b9727ef1b 100644
--- a/apps/dashboard/src/client/forge/loomplane/codecs/EnvironmentUsage.ts
+++ b/apps/dashboard/src/client/forge/loomplane/codecs/EnvironmentUsage.ts
@@ -1,4 +1,4 @@
import type { Codec } from '../codec-runtime';
import { codec_EnvironmentUsage_placements } from './EnvironmentUsage.placements';
-export const codec_EnvironmentUsage: Codec = {"kind": "object", "fields": {"assigned": {"ts": "assigned"}, "environment_id": {"ts": "environmentId"}, "environment_name": {"ts": "environmentName"}, "placements": {"ts": "placements", "codec": () => codec_EnvironmentUsage_placements}, "project_id": {"ts": "projectId"}, "project_name": {"ts": "projectName"}}, "required": ["assigned", "environment_id", "environment_name", "placements", "project_id", "project_name"]};
+export const codec_EnvironmentUsage: Codec = {"kind": "object", "fields": {"default": {"ts": "default"}, "environment_id": {"ts": "environmentId"}, "environment_name": {"ts": "environmentName"}, "placements": {"ts": "placements", "codec": () => codec_EnvironmentUsage_placements}, "project_id": {"ts": "projectId"}, "project_name": {"ts": "projectName"}}, "required": ["default", "environment_id", "environment_name", "placements", "project_id", "project_name"]};
diff --git a/apps/dashboard/src/client/forge/loomplane/codecs/Preview.ts b/apps/dashboard/src/client/forge/loomplane/codecs/Preview.ts
index 1022f6cda..c01c85f41 100644
--- a/apps/dashboard/src/client/forge/loomplane/codecs/Preview.ts
+++ b/apps/dashboard/src/client/forge/loomplane/codecs/Preview.ts
@@ -1,9 +1,9 @@
import type { Codec } from '../codec-runtime';
-import { codec_Assignment } from './Assignment';
import { codec_ChangeInput } from './ChangeInput';
import { codec_CloudprofilesTarget } from './CloudprofilesTarget';
import { codec_DefaultPlacement } from './DefaultPlacement';
import { codec_Preview_blockers } from './Preview.blockers';
import { codec_Preview_environments } from './Preview.environments';
+import { codec_ProjectCloud } from './ProjectCloud';
-export const codec_Preview: Codec = {"kind": "object", "fields": {"after": {"ts": "after", "codec": () => codec_CloudprofilesTarget}, "after_assignment": {"ts": "afterAssignment", "codec": () => codec_Assignment}, "after_default": {"ts": "afterDefault", "codec": () => codec_DefaultPlacement}, "before": {"ts": "before", "codec": () => codec_CloudprofilesTarget}, "before_assignment": {"ts": "beforeAssignment", "codec": () => codec_Assignment}, "before_default": {"ts": "beforeDefault", "codec": () => codec_DefaultPlacement}, "blockers": {"ts": "blockers", "codec": () => codec_Preview_blockers}, "created_at": {"ts": "createdAt"}, "environments": {"ts": "environments", "codec": () => codec_Preview_environments}, "id": {"ts": "id"}, "input": {"ts": "input", "codec": () => codec_ChangeInput}, "org_id": {"ts": "orgId"}, "project_id": {"ts": "projectId"}, "reverts": {"ts": "reverts"}, "revision": {"ts": "revision"}}, "required": ["blockers", "created_at", "environments", "id", "input", "org_id", "project_id", "revision"]};
+export const codec_Preview: Codec = {"kind": "object", "fields": {"after": {"ts": "after", "codec": () => codec_CloudprofilesTarget}, "after_cloud": {"ts": "afterCloud", "codec": () => codec_ProjectCloud}, "after_default": {"ts": "afterDefault", "codec": () => codec_DefaultPlacement}, "before": {"ts": "before", "codec": () => codec_CloudprofilesTarget}, "before_cloud": {"ts": "beforeCloud", "codec": () => codec_ProjectCloud}, "before_default": {"ts": "beforeDefault", "codec": () => codec_DefaultPlacement}, "blockers": {"ts": "blockers", "codec": () => codec_Preview_blockers}, "created_at": {"ts": "createdAt"}, "environments": {"ts": "environments", "codec": () => codec_Preview_environments}, "id": {"ts": "id"}, "input": {"ts": "input", "codec": () => codec_ChangeInput}, "org_id": {"ts": "orgId"}, "project_id": {"ts": "projectId"}, "reverts": {"ts": "reverts"}, "revision": {"ts": "revision"}}, "required": ["blockers", "created_at", "environments", "id", "input", "org_id", "project_id", "revision"]};
diff --git a/apps/dashboard/src/client/forge/loomplane/codecs/Assignment.targets.ts b/apps/dashboard/src/client/forge/loomplane/codecs/ProjectCloud.targets.ts
similarity index 51%
rename from apps/dashboard/src/client/forge/loomplane/codecs/Assignment.targets.ts
rename to apps/dashboard/src/client/forge/loomplane/codecs/ProjectCloud.targets.ts
index 6eb2d42a6..71f8514f7 100644
--- a/apps/dashboard/src/client/forge/loomplane/codecs/Assignment.targets.ts
+++ b/apps/dashboard/src/client/forge/loomplane/codecs/ProjectCloud.targets.ts
@@ -1,4 +1,4 @@
import type { Codec } from '../codec-runtime';
import { codec_CloudprofilesTarget } from './CloudprofilesTarget';
-export const codec_Assignment_targets: Codec = {"kind": "array", "items": () => codec_CloudprofilesTarget};
+export const codec_ProjectCloud_targets: Codec = {"kind": "array", "items": () => codec_CloudprofilesTarget};
diff --git a/apps/dashboard/src/client/forge/loomplane/codecs/ProjectCloud.ts b/apps/dashboard/src/client/forge/loomplane/codecs/ProjectCloud.ts
new file mode 100644
index 000000000..e3cc06210
--- /dev/null
+++ b/apps/dashboard/src/client/forge/loomplane/codecs/ProjectCloud.ts
@@ -0,0 +1,5 @@
+import type { Codec } from '../codec-runtime';
+import { codec_DefaultPlacement } from './DefaultPlacement';
+import { codec_ProjectCloud_targets } from './ProjectCloud.targets';
+
+export const codec_ProjectCloud: Codec = {"kind": "object", "fields": {"cloud_id": {"ts": "cloudId"}, "cloud_revision": {"ts": "cloudRevision"}, "default": {"ts": "default"}, "default_placement": {"ts": "defaultPlacement", "codec": () => codec_DefaultPlacement}, "grant_revision": {"ts": "grantRevision"}, "org_id": {"ts": "orgId"}, "project_id": {"ts": "projectId"}, "targets": {"ts": "targets", "codec": () => codec_ProjectCloud_targets}}, "required": ["cloud_id", "cloud_revision", "default", "grant_revision", "org_id", "project_id", "targets"]};
diff --git a/apps/dashboard/src/client/forge/loomplane/codecs/ProjectCloudEvent.ts b/apps/dashboard/src/client/forge/loomplane/codecs/ProjectCloudEvent.ts
new file mode 100644
index 000000000..f8a168e4c
--- /dev/null
+++ b/apps/dashboard/src/client/forge/loomplane/codecs/ProjectCloudEvent.ts
@@ -0,0 +1,3 @@
+import type { Codec } from '../codec-runtime';
+
+export const codec_ProjectCloudEvent: Codec = {"kind": "object", "fields": {"cloud_id": {"ts": "cloudId"}, "org_id": {"ts": "orgId"}, "project_id": {"ts": "projectId"}}, "required": ["cloud_id", "org_id", "project_id"]};
diff --git a/apps/dashboard/src/client/forge/loomplane/codecs/ProjectGrant.ts b/apps/dashboard/src/client/forge/loomplane/codecs/ProjectGrant.ts
index f28edd1d6..033991fc9 100644
--- a/apps/dashboard/src/client/forge/loomplane/codecs/ProjectGrant.ts
+++ b/apps/dashboard/src/client/forge/loomplane/codecs/ProjectGrant.ts
@@ -1,4 +1,4 @@
import type { Codec } from '../codec-runtime';
import { codec_ProjectGrant_target_ids } from './ProjectGrant.target_ids';
-export const codec_ProjectGrant: Codec = {"kind": "object", "fields": {"cloud_id": {"ts": "cloudId"}, "org_id": {"ts": "orgId"}, "project_id": {"ts": "projectId"}, "revision": {"ts": "revision"}, "revoked": {"ts": "revoked"}, "target_ids": {"ts": "targetIds", "codec": () => codec_ProjectGrant_target_ids}}, "required": ["cloud_id", "org_id", "project_id", "revision", "revoked", "target_ids"]};
+export const codec_ProjectGrant: Codec = {"kind": "object", "fields": {"cloud_id": {"ts": "cloudId"}, "default": {"ts": "default"}, "org_id": {"ts": "orgId"}, "project_id": {"ts": "projectId"}, "revision": {"ts": "revision"}, "revoked": {"ts": "revoked"}, "target_ids": {"ts": "targetIds", "codec": () => codec_ProjectGrant_target_ids}}, "required": ["cloud_id", "default", "org_id", "project_id", "revision", "revoked", "target_ids"]};
diff --git a/apps/dashboard/src/client/forge/loomplane/entities.ts b/apps/dashboard/src/client/forge/loomplane/entities.ts
index 1e776bb8d..8afe7422d 100644
--- a/apps/dashboard/src/client/forge/loomplane/entities.ts
+++ b/apps/dashboard/src/client/forge/loomplane/entities.ts
@@ -7,7 +7,6 @@ export const entities = {
'Analysis': { idField: 'id' },
'AnalysisGraph': { idField: 'id' },
'AnalysisList': { fields: { 'analyses': 'Analysis' } },
- 'Assignment': { fields: { 'targets': 'CloudprofilesTarget' } },
'Backup': { idField: 'id' },
'BackupList': { fields: { 'backups': 'Backup' } },
'Binding': { idField: 'id' },
@@ -45,6 +44,7 @@ export const entities = {
'ConversationList': { fields: { 'conversations': 'Conversation' } },
'CreatedKey': { fields: { 'key': 'APIKey' } },
'DNSZone': { idField: 'id' },
+ 'DefaultCloud': { idField: 'projectId', fields: { 'cloud': 'ProjectCloud' } },
'Delivery': { idField: 'id' },
'DeliveryList': { fields: { 'items': 'Delivery' } },
'DeployPreview': { fields: { 'entry': 'EntrySummary', 'server': 'Operation' } },
@@ -60,7 +60,6 @@ export const entities = {
'EntryDetail': { idField: 'id' },
'EntrySummary': { idField: 'id' },
'Environment': { idField: 'id' },
- 'EnvironmentCloud': { fields: { 'assignment': 'Assignment' } },
'EnvironmentList': { fields: { 'environments': 'Environment' } },
'EventPage': { fields: { 'items': 'FleetEvent' } },
'Expansion': { idField: 'id' },
@@ -129,9 +128,10 @@ export const entities = {
'PolicyList': { fields: { 'policies': 'Policy' } },
'Pool': { idField: 'id' },
'PoolList': { fields: { 'pools': 'Pool' } },
- 'Preview': { idField: 'id', fields: { 'after': 'CloudprofilesTarget', 'afterAssignment': 'Assignment', 'before': 'CloudprofilesTarget', 'beforeAssignment': 'Assignment' } },
+ 'Preview': { idField: 'id', fields: { 'after': 'CloudprofilesTarget', 'afterCloud': 'ProjectCloud', 'before': 'CloudprofilesTarget', 'beforeCloud': 'ProjectCloud' } },
'Profile': { idField: 'id' },
'Project': { idField: 'id' },
+ 'ProjectCloud': { fields: { 'targets': 'CloudprofilesTarget' } },
'ProjectList': { fields: { 'projects': 'Project' } },
'ProjectView': { idField: 'projectId', fields: { 'sources': 'SourceState' } },
'ProjectZone': { idField: 'id' },
diff --git a/apps/dashboard/src/client/forge/loomplane/hooks.ts b/apps/dashboard/src/client/forge/loomplane/hooks.ts
index 2eae3dd2d..e86dd40a4 100644
--- a/apps/dashboard/src/client/forge/loomplane/hooks.ts
+++ b/apps/dashboard/src/client/forge/loomplane/hooks.ts
@@ -10,7 +10,7 @@
import { query, mutation } from '@forge-go/client-core';
import { ops } from './ops';
-import type { APIKey, APIKeyList, ActivitySummary, AgentView, AgentsettingsStatus, AgentwatchStatus, Analysis, AnalysisGraph, AnalysisList, Backup, BackupList, Binding, BindingList, BitbucketRepositoryList, BitbucketStatus, BitbucketWorkspaceView, Board, CLIOrganizationList, CanaryReport, CapacityPolicyView, CapacityUsage, Card, CatalogKindList, CatalogconnectEndpoint, CloudCluster, CloudClusterOperation, CloudClusterOperationPage, CloudClusterPage, CloudLocation, CloudLocationList, CloudProjectGrantList, CloudSyncList, CloudTargetList, CloudinfraRoute, CloudinfraRouteStatus, CloudprofilesTarget, ClusterCapacity, ClusterOptions, ClusterPage, CompromisedRevoke, ConnectedRepositoryList, Connection, ConnectionList, ConnectionsCloudList, ConsumerKey, Conversation, ConversationList, Coverage, DeletionPreview, DeliveryList, DeployedList, DeploymentList, DeploymentsDeployment, DiscoverySource, DiscoverySummary, DomainDetail, DomainOfferList, DomainOperationList, DomainOverview, DomainRouteList, EdgeState, EndpointList, EntryDetail, Environment, EnvironmentCloud, EnvironmentConnections, EnvironmentList, EventPage, Expansion, ExpansionList, FabriqKeyList, FabriqloomStatus, FabriqloomTenant, FailedCleanup, Flag, FlagList, Fleet, FleetOperation, GPUInventory, GPUTargetList, GatewayList, GitHubInstallation, GitHubStatus, GitLabConnectionView, GitLabHostView, GitLabRepositoryList, GitLabStatus, GroupVerificationResult, History, Host, HostList, IdentitySession, InfrastructureStatus, Instance, InstancePage, JoinTokenList, KeylessSetup, LocationPolicy, LogPage, ManagedRegistryView, ManifestDraft, MemberPrerequisite, MetricSummary, ModelDeploymentList, ModelsStatus, NativeInventory, NativePITRWindow, NativeRecoveryCopies, NativeRecoverySources, NativeRestore, NativeRetentionPolicy, NativeRetentionPolicyState, NativeRetirement, NativeRetirementPage, Node, NodeAdoptionList, NodeList, NodeWorkloadList, NotificationList, OctopusStatus, Operation, OperationList, OrgInvitationList, OrgMemberList, Plan, PlanList, PlanningCloudList, PlanningTenantList, PlatformcloudTenantList, Policy, PolicyList, Pool, PoolList, Preferences, Preview, Profile, Project, ProjectDomainList, ProjectList, ProjectPermissions, ProjectView, ProjectZoneList, ProviderEnvironmentList, ProviderKey, ProviderList, ProviderResource, ProviderResourceList, ProviderResourceSync, ProviderZoneList, PublicConfig, PushConfig, PushDevice, Rebuild, RebuildList, Region, RegionList, Registration, RegistrationExtensionList, RegistrationList, RegistryList, ReleaseEvidence, ReleaseReport, ReleaseReportList, Report, ReportList, Request, RequestList, Resolution, Restore, RestoreList, RetentionPolicy, RetentionPolicyHistory, RetentionPolicyState, RetentionPreview, Retirement, RetirementHistory, RetirementPage, Revision, RevisionList, RollbackTarget, RouteOperation, RouteSummary, RuntimeAttachmentPage, Server, ServerList, ServerOptions, ServerUsage, SettingsView, SetupStatus, SignInAppList, Snapshot, Soak, SourceList, SpendReport, StorageVolumeList, Sync, TLSRenewalAuthority, Task, Team, TeamList, TemplateRelease, TrafficReport, TwoStep, Usage, Variable, VariableList, View, Watch, WebhookEndpointList, WorkspaceView, Zone, ZoneList } from './types';
+import type { APIKey, APIKeyList, ActivitySummary, AgentView, AgentsettingsStatus, AgentwatchStatus, Analysis, AnalysisGraph, AnalysisList, Backup, BackupList, Binding, BindingList, BitbucketRepositoryList, BitbucketStatus, BitbucketWorkspaceView, Board, CLIOrganizationList, CanaryReport, CapacityPolicyView, CapacityUsage, Card, CatalogKindList, CatalogconnectEndpoint, CloudCluster, CloudClusterOperation, CloudClusterOperationPage, CloudClusterPage, CloudLocation, CloudLocationList, CloudProjectGrantList, CloudSyncList, CloudTargetList, CloudinfraRoute, CloudinfraRouteStatus, CloudprofilesTarget, ClusterCapacity, ClusterOptions, ClusterPage, CompromisedRevoke, ConnectedRepositoryList, Connection, ConnectionList, ConnectionsCloudList, ConsumerKey, Conversation, ConversationList, Coverage, DefaultCloud, DeletionPreview, DeliveryList, DeployedList, DeploymentList, DeploymentsDeployment, DiscoverySource, DiscoverySummary, DomainDetail, DomainOfferList, DomainOperationList, DomainOverview, DomainRouteList, EdgeState, EndpointList, EntryDetail, Environment, EnvironmentConnections, EnvironmentList, EventPage, Expansion, ExpansionList, FabriqKeyList, FabriqloomStatus, FabriqloomTenant, FailedCleanup, Flag, FlagList, Fleet, FleetOperation, GPUInventory, GPUTargetList, GatewayList, GitHubInstallation, GitHubStatus, GitLabConnectionView, GitLabHostView, GitLabRepositoryList, GitLabStatus, GroupVerificationResult, History, Host, HostList, IdentitySession, InfrastructureStatus, Instance, InstancePage, JoinTokenList, KeylessSetup, LocationPolicy, LogPage, ManagedRegistryView, ManifestDraft, MemberPrerequisite, MetricSummary, ModelDeploymentList, ModelsStatus, NativeInventory, NativePITRWindow, NativeRecoveryCopies, NativeRecoverySources, NativeRestore, NativeRetentionPolicy, NativeRetentionPolicyState, NativeRetirement, NativeRetirementPage, Node, NodeAdoptionList, NodeList, NodeWorkloadList, NotificationList, OctopusStatus, Operation, OperationList, OrgInvitationList, OrgMemberList, Plan, PlanList, PlanningCloudList, PlanningTenantList, PlatformcloudTenantList, Policy, PolicyList, Pool, PoolList, Preferences, Preview, Profile, Project, ProjectDomainList, ProjectList, ProjectPermissions, ProjectView, ProjectZoneList, ProviderEnvironmentList, ProviderKey, ProviderList, ProviderResource, ProviderResourceList, ProviderResourceSync, ProviderZoneList, PublicConfig, PushConfig, PushDevice, Rebuild, RebuildList, Region, RegionList, Registration, RegistrationExtensionList, RegistrationList, RegistryList, ReleaseEvidence, ReleaseReport, ReleaseReportList, Report, ReportList, Request, RequestList, Resolution, Restore, RestoreList, RetentionPolicy, RetentionPolicyHistory, RetentionPolicyState, RetentionPreview, Retirement, RetirementHistory, RetirementPage, Revision, RevisionList, RollbackTarget, RouteOperation, RouteSummary, RuntimeAttachmentPage, Server, ServerList, ServerOptions, ServerUsage, SettingsView, SetupStatus, SignInAppList, Snapshot, Soak, SourceList, SpendReport, StorageVolumeList, Sync, TLSRenewalAuthority, Task, Team, TeamList, TemplateRelease, TrafficReport, TwoStep, Usage, Variable, VariableList, View, Watch, WebhookEndpointList, WorkspaceView, Zone, ZoneList } from './types';
export const useAccountTwoStepGet = query(ops['account.twoStep.get']);
export const useActivityGet = query(ops['activity.get']);
@@ -312,13 +312,13 @@ export const useCloudsUsage = query(ops['clouds.usage']);
export const useDbGatewaysList = query(ops['dbGateways.list']);
export const useDbGatewaysPauseRoute = mutation(ops['dbGateways.pauseRoute']);
export const useDbGatewaysResumeRoute = mutation(ops['dbGateways.resumeRoute']);
+export const useDefaultCloudGet = query(ops['defaultCloud.get']);
+export const useDefaultCloudPreview = mutation(ops['defaultCloud.preview']);
export const useProjectsDeletion = query(ops['projects.deletion']);
export const useDeploymentsList = query(ops['deployments.list']);
export const useEnvironmentsList = query(ops['environments.list']);
export const useEnvironmentsCreate = mutation(ops['environments.create']);
export const useEnvironmentsDelete = mutation(ops['environments.delete']);
-export const useEnvironmentCloudsGet = query(ops['environmentClouds.get']);
-export const useEnvironmentCloudsPreview = mutation(ops['environmentClouds.preview']);
export const useProviderEnvironmentsRetry = mutation(ops['providerEnvironments.retry']);
export const useEnvironmentConnectionsGet = query(ops['environmentConnections.get']);
export const useEnvironmentConnectionsChoose = mutation(ops['environmentConnections.choose']);
diff --git a/apps/dashboard/src/client/forge/loomplane/hooks/useDefaultCloudGet.ts b/apps/dashboard/src/client/forge/loomplane/hooks/useDefaultCloudGet.ts
new file mode 100644
index 000000000..7986d3c30
--- /dev/null
+++ b/apps/dashboard/src/client/forge/loomplane/hooks/useDefaultCloudGet.ts
@@ -0,0 +1,5 @@
+import { query } from '@forge-go/client-core';
+import { op_defaultCloud_get } from '../ops/defaultCloud.get';
+import type { DefaultCloud } from '../types';
+
+export const useDefaultCloudGet = /*#__PURE__*/ query(op_defaultCloud_get);
diff --git a/apps/dashboard/src/client/forge/loomplane/hooks/useDefaultCloudPreview.ts b/apps/dashboard/src/client/forge/loomplane/hooks/useDefaultCloudPreview.ts
new file mode 100644
index 000000000..3e7900147
--- /dev/null
+++ b/apps/dashboard/src/client/forge/loomplane/hooks/useDefaultCloudPreview.ts
@@ -0,0 +1,5 @@
+import { mutation } from '@forge-go/client-core';
+import { op_defaultCloud_preview } from '../ops/defaultCloud.preview';
+import type { Preview } from '../types';
+
+export const useDefaultCloudPreview = /*#__PURE__*/ mutation(op_defaultCloud_preview);
diff --git a/apps/dashboard/src/client/forge/loomplane/hooks/useEnvironmentCloudsGet.ts b/apps/dashboard/src/client/forge/loomplane/hooks/useEnvironmentCloudsGet.ts
deleted file mode 100644
index da804e6e9..000000000
--- a/apps/dashboard/src/client/forge/loomplane/hooks/useEnvironmentCloudsGet.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { query } from '@forge-go/client-core';
-import { op_environmentClouds_get } from '../ops/environmentClouds.get';
-import type { EnvironmentCloud } from '../types';
-
-export const useEnvironmentCloudsGet = /*#__PURE__*/ query(op_environmentClouds_get);
diff --git a/apps/dashboard/src/client/forge/loomplane/hooks/useEnvironmentCloudsPreview.ts b/apps/dashboard/src/client/forge/loomplane/hooks/useEnvironmentCloudsPreview.ts
deleted file mode 100644
index 85a9ba6db..000000000
--- a/apps/dashboard/src/client/forge/loomplane/hooks/useEnvironmentCloudsPreview.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { mutation } from '@forge-go/client-core';
-import { op_environmentClouds_preview } from '../ops/environmentClouds.preview';
-import type { Preview } from '../types';
-
-export const useEnvironmentCloudsPreview = /*#__PURE__*/ mutation(op_environmentClouds_preview);
diff --git a/apps/dashboard/src/client/forge/loomplane/ops.ts b/apps/dashboard/src/client/forge/loomplane/ops.ts
index feab7ad95..f1bbac32f 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops.ts
@@ -2664,6 +2664,25 @@ export const ops = {
invalidates: ['RouteSummary[]'],
responseCodec: CODECS['RouteSummary'],
},
+ 'defaultCloud.get': {
+ method: 'GET',
+ path: '/api/v1/projects/{id}/default-cloud',
+ entity: 'DefaultCloud',
+ rootType: 'DefaultCloud',
+ provides: ['DefaultCloud:{projectId}'],
+ invalidates: [],
+ responseCodec: CODECS['DefaultCloud'],
+ },
+ 'defaultCloud.preview': {
+ method: 'POST',
+ path: '/api/v1/projects/{id}/default-cloud/preview',
+ entity: 'Preview',
+ rootType: 'Preview',
+ provides: ['Preview:{id}'],
+ invalidates: ['Preview[]'],
+ bodyCodec: CODECS['DefaultCloudInputBody'],
+ responseCodec: CODECS['Preview'],
+ },
'projects.deletion': {
method: 'GET',
path: '/api/v1/projects/{id}/deletion',
@@ -2706,24 +2725,6 @@ export const ops = {
provides: [],
invalidates: ['Environment[]'],
},
- 'environmentClouds.get': {
- method: 'GET',
- path: '/api/v1/projects/{id}/environments/{environmentId}/cloud',
- rootType: 'EnvironmentCloud',
- provides: [],
- invalidates: [],
- responseCodec: CODECS['EnvironmentCloud'],
- },
- 'environmentClouds.preview': {
- method: 'POST',
- path: '/api/v1/projects/{id}/environments/{environmentId}/cloud/preview',
- entity: 'Preview',
- rootType: 'Preview',
- provides: ['Preview:{id}'],
- invalidates: ['Preview[]'],
- bodyCodec: CODECS['EnvironmentCloudInputBody'],
- responseCodec: CODECS['Preview'],
- },
'providerEnvironments.retry': {
method: 'POST',
path: '/api/v1/projects/{id}/environments/{environmentId}/provider-environments/retry',
@@ -3952,7 +3953,6 @@ export const entities = {
'Analysis': { idField: 'id' },
'AnalysisGraph': { idField: 'id' },
'AnalysisList': { fields: { 'analyses': 'Analysis' } },
- 'Assignment': { fields: { 'targets': 'CloudprofilesTarget' } },
'Backup': { idField: 'id' },
'BackupList': { fields: { 'backups': 'Backup' } },
'Binding': { idField: 'id' },
@@ -3990,6 +3990,7 @@ export const entities = {
'ConversationList': { fields: { 'conversations': 'Conversation' } },
'CreatedKey': { fields: { 'key': 'APIKey' } },
'DNSZone': { idField: 'id' },
+ 'DefaultCloud': { idField: 'projectId', fields: { 'cloud': 'ProjectCloud' } },
'Delivery': { idField: 'id' },
'DeliveryList': { fields: { 'items': 'Delivery' } },
'DeployPreview': { fields: { 'entry': 'EntrySummary', 'server': 'Operation' } },
@@ -4005,7 +4006,6 @@ export const entities = {
'EntryDetail': { idField: 'id' },
'EntrySummary': { idField: 'id' },
'Environment': { idField: 'id' },
- 'EnvironmentCloud': { fields: { 'assignment': 'Assignment' } },
'EnvironmentList': { fields: { 'environments': 'Environment' } },
'EventPage': { fields: { 'items': 'FleetEvent' } },
'Expansion': { idField: 'id' },
@@ -4074,9 +4074,10 @@ export const entities = {
'PolicyList': { fields: { 'policies': 'Policy' } },
'Pool': { idField: 'id' },
'PoolList': { fields: { 'pools': 'Pool' } },
- 'Preview': { idField: 'id', fields: { 'after': 'CloudprofilesTarget', 'afterAssignment': 'Assignment', 'before': 'CloudprofilesTarget', 'beforeAssignment': 'Assignment' } },
+ 'Preview': { idField: 'id', fields: { 'after': 'CloudprofilesTarget', 'afterCloud': 'ProjectCloud', 'before': 'CloudprofilesTarget', 'beforeCloud': 'ProjectCloud' } },
'Profile': { idField: 'id' },
'Project': { idField: 'id' },
+ 'ProjectCloud': { fields: { 'targets': 'CloudprofilesTarget' } },
'ProjectList': { fields: { 'projects': 'Project' } },
'ProjectView': { idField: 'projectId', fields: { 'sources': 'SourceState' } },
'ProjectZone': { idField: 'id' },
@@ -4382,11 +4383,11 @@ export const streams = [
{
kind: 'entity',
channel: '/api/v1/realtime/events',
- message: 'environment_cloud.updated',
- entity: 'EnvironmentCloudEvent',
+ message: 'project_cloud.updated',
+ entity: 'ProjectCloudEvent',
intent: 'patch',
- invalidates: ['EnvironmentCloud'],
- decode: (payload: unknown) => decode(payload, CODECS['EnvironmentCloudEvent']),
+ invalidates: ['DefaultCloud:{projectId}'],
+ decode: (payload: unknown) => decode(payload, CODECS['ProjectCloudEvent']),
},
{
kind: 'entity',
@@ -4394,7 +4395,7 @@ export const streams = [
message: 'cloud_sync.updated',
entity: 'CloudSyncEvent',
intent: 'patch',
- invalidates: ['Sync:{id}', 'Sync[]', 'EnvironmentCloud'],
+ invalidates: ['Sync:{id}', 'Sync[]', 'DefaultCloud:{projectId}'],
decode: (payload: unknown) => decode(payload, CODECS['CloudSyncEvent']),
},
{
@@ -4760,11 +4761,11 @@ export const streams = [
{
kind: 'entity',
channel: '/api/v1/realtime/ws',
- message: 'environment_cloud.updated',
- entity: 'EnvironmentCloudEvent',
+ message: 'project_cloud.updated',
+ entity: 'ProjectCloudEvent',
intent: 'patch',
- invalidates: ['EnvironmentCloud'],
- decode: (payload: unknown) => decode(payload, CODECS['EnvironmentCloudEvent']),
+ invalidates: ['DefaultCloud:{projectId}'],
+ decode: (payload: unknown) => decode(payload, CODECS['ProjectCloudEvent']),
},
{
kind: 'entity',
@@ -4772,7 +4773,7 @@ export const streams = [
message: 'cloud_sync.updated',
entity: 'CloudSyncEvent',
intent: 'patch',
- invalidates: ['Sync:{id}', 'Sync[]', 'EnvironmentCloud'],
+ invalidates: ['Sync:{id}', 'Sync[]', 'DefaultCloud:{projectId}'],
decode: (payload: unknown) => decode(payload, CODECS['CloudSyncEvent']),
},
{
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/defaultCloud.get.ts b/apps/dashboard/src/client/forge/loomplane/ops/defaultCloud.get.ts
new file mode 100644
index 000000000..b8059c25d
--- /dev/null
+++ b/apps/dashboard/src/client/forge/loomplane/ops/defaultCloud.get.ts
@@ -0,0 +1,12 @@
+import type { OperationMeta } from '../ops';
+import { codec_DefaultCloud } from '../codecs/DefaultCloud';
+
+export const op_defaultCloud_get = {
+ method: 'GET',
+ path: '/api/v1/projects/{id}/default-cloud',
+ entity: 'DefaultCloud',
+ rootType: 'DefaultCloud',
+ provides: ['DefaultCloud:{projectId}'],
+ invalidates: [],
+ responseCodec: codec_DefaultCloud,
+} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/environmentClouds.preview.ts b/apps/dashboard/src/client/forge/loomplane/ops/defaultCloud.preview.ts
similarity index 52%
rename from apps/dashboard/src/client/forge/loomplane/ops/environmentClouds.preview.ts
rename to apps/dashboard/src/client/forge/loomplane/ops/defaultCloud.preview.ts
index c23933235..405ad1475 100644
--- a/apps/dashboard/src/client/forge/loomplane/ops/environmentClouds.preview.ts
+++ b/apps/dashboard/src/client/forge/loomplane/ops/defaultCloud.preview.ts
@@ -1,14 +1,14 @@
import type { OperationMeta } from '../ops';
-import { codec_EnvironmentCloudInputBody } from '../codecs/EnvironmentCloudInputBody';
+import { codec_DefaultCloudInputBody } from '../codecs/DefaultCloudInputBody';
import { codec_Preview } from '../codecs/Preview';
-export const op_environmentClouds_preview = {
+export const op_defaultCloud_preview = {
method: 'POST',
- path: '/api/v1/projects/{id}/environments/{environmentId}/cloud/preview',
+ path: '/api/v1/projects/{id}/default-cloud/preview',
entity: 'Preview',
rootType: 'Preview',
provides: ['Preview:{id}'],
invalidates: ['Preview[]'],
- bodyCodec: codec_EnvironmentCloudInputBody,
+ bodyCodec: codec_DefaultCloudInputBody,
responseCodec: codec_Preview,
} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/ops/environmentClouds.get.ts b/apps/dashboard/src/client/forge/loomplane/ops/environmentClouds.get.ts
deleted file mode 100644
index ca01dadfe..000000000
--- a/apps/dashboard/src/client/forge/loomplane/ops/environmentClouds.get.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import type { OperationMeta } from '../ops';
-import { codec_EnvironmentCloud } from '../codecs/EnvironmentCloud';
-
-export const op_environmentClouds_get = {
- method: 'GET',
- path: '/api/v1/projects/{id}/environments/{environmentId}/cloud',
- rootType: 'EnvironmentCloud',
- provides: [],
- invalidates: [],
- responseCodec: codec_EnvironmentCloud,
-} as const satisfies OperationMeta;
diff --git a/apps/dashboard/src/client/forge/loomplane/rest.ts b/apps/dashboard/src/client/forge/loomplane/rest.ts
index bb7a6d492..0f8c5caab 100644
--- a/apps/dashboard/src/client/forge/loomplane/rest.ts
+++ b/apps/dashboard/src/client/forge/loomplane/rest.ts
@@ -3015,6 +3015,43 @@ export class RESTClient extends Client {
};
+ public readonly defaultCloud = {
+ /**
+ * defaultCloud.get
+ */
+ get: async (id: string, options?: { signal?: AbortSignal; retry?: { maxAttempts?: number } }): Promise => {
+ let __path = `/api/v1/projects/${encodeURIComponent(String(id))}/default-cloud`;
+ const config: RequestConfig = {
+ method: 'GET',
+ url: __path,
+ signal: options?.signal,
+ retry: options?.retry,
+ responseCodec: CODECS["DefaultCloud"],
+ };
+
+ return this.request(config);
+ },
+
+ /**
+ * defaultCloud.preview
+ */
+ preview: async (id: string, body: types.DefaultCloudInputBody, options?: { signal?: AbortSignal; retry?: { maxAttempts?: number } }): Promise => {
+ let __path = `/api/v1/projects/${encodeURIComponent(String(id))}/default-cloud/preview`;
+ const config: RequestConfig = {
+ method: 'POST',
+ url: __path,
+ body,
+ bodyCodec: CODECS["DefaultCloudInputBody"],
+ signal: options?.signal,
+ retry: options?.retry,
+ responseCodec: CODECS["Preview"],
+ };
+
+ return this.request(config);
+ },
+
+ };
+
public readonly deployed = {
/**
* The commit of each of the project's repositories deployed in the environment; one with nothing deployed there isn't listed, and a plan can't hold it
@@ -3948,43 +3985,6 @@ export class RESTClient extends Client {
};
- public readonly environmentClouds = {
- /**
- * environmentClouds.get
- */
- get: async (id: string, environmentId: string, options?: { signal?: AbortSignal; retry?: { maxAttempts?: number } }): Promise => {
- let __path = `/api/v1/projects/${encodeURIComponent(String(id))}/environments/${encodeURIComponent(String(environmentId))}/cloud`;
- const config: RequestConfig = {
- method: 'GET',
- url: __path,
- signal: options?.signal,
- retry: options?.retry,
- responseCodec: CODECS["EnvironmentCloud"],
- };
-
- return this.request(config);
- },
-
- /**
- * environmentClouds.preview
- */
- preview: async (id: string, environmentId: string, body: types.EnvironmentCloudInputBody, options?: { signal?: AbortSignal; retry?: { maxAttempts?: number } }): Promise => {
- let __path = `/api/v1/projects/${encodeURIComponent(String(id))}/environments/${encodeURIComponent(String(environmentId))}/cloud/preview`;
- const config: RequestConfig = {
- method: 'POST',
- url: __path,
- body,
- bodyCodec: CODECS["EnvironmentCloudInputBody"],
- signal: options?.signal,
- retry: options?.retry,
- responseCodec: CODECS["Preview"],
- };
-
- return this.request(config);
- },
-
- };
-
public readonly environmentConnections = {
/**
* Choose the connection the environment deploys to a cloud with, or clear the choice
diff --git a/apps/dashboard/src/client/forge/loomplane/sse.ts b/apps/dashboard/src/client/forge/loomplane/sse.ts
index 498efed2f..6e3d98025 100644
--- a/apps/dashboard/src/client/forge/loomplane/sse.ts
+++ b/apps/dashboard/src/client/forge/loomplane/sse.ts
@@ -655,15 +655,6 @@ export class RealtimeEventsSSEClient extends EventEmitter {
}
});
- this.eventSource.addEventListener("environment_cloud.updated", (event: MessageEvent) => {
- try {
- const data: types.EnvironmentCloudEvent = decode(JSON.parse(event.data), "EnvironmentCloudEvent");
- this.emit("environment_cloud.updated", data);
- } catch (error) {
- this.emit('error', error);
- }
- });
-
this.eventSource.addEventListener("forge.gap", (event: MessageEvent) => {
try {
const data: types.RealtimeForgeGap = decode(JSON.parse(event.data), "RealtimeForgeGap");
@@ -754,6 +745,15 @@ export class RealtimeEventsSSEClient extends EventEmitter {
}
});
+ this.eventSource.addEventListener("project_cloud.updated", (event: MessageEvent) => {
+ try {
+ const data: types.ProjectCloudEvent = decode(JSON.parse(event.data), "ProjectCloudEvent");
+ this.emit("project_cloud.updated", data);
+ } catch (error) {
+ this.emit('error', error);
+ }
+ });
+
this.eventSource.addEventListener("realtime.snapshot", (event: MessageEvent) => {
try {
const data: types.RealtimeRealtimeSnapshot = decode(JSON.parse(event.data), "RealtimeRealtimeSnapshot");
@@ -1270,22 +1270,6 @@ export class RealtimeEventsSSEClient extends EventEmitter {
this.off("environment.updated", handler);
}
- /**
- * Register a handler for environment_cloud.updated events.
- * @param handler - Function to call when environment_cloud.updated event is received
- */
- onEnvironmentCloudUpdated(handler: (data: types.EnvironmentCloudEvent) => void): void {
- this.on("environment_cloud.updated", handler);
- }
-
- /**
- * Remove a handler for environment_cloud.updated events.
- * @param handler - The handler to remove
- */
- offEnvironmentCloudUpdated(handler: (data: types.EnvironmentCloudEvent) => void): void {
- this.off("environment_cloud.updated", handler);
- }
-
/**
* Register a handler for forge.gap events.
* @param handler - Function to call when forge.gap event is received
@@ -1446,6 +1430,22 @@ export class RealtimeEventsSSEClient extends EventEmitter {
this.off("project.updated", handler);
}
+ /**
+ * Register a handler for project_cloud.updated events.
+ * @param handler - Function to call when project_cloud.updated event is received
+ */
+ onProjectCloudUpdated(handler: (data: types.ProjectCloudEvent) => void): void {
+ this.on("project_cloud.updated", handler);
+ }
+
+ /**
+ * Remove a handler for project_cloud.updated events.
+ * @param handler - The handler to remove
+ */
+ offProjectCloudUpdated(handler: (data: types.ProjectCloudEvent) => void): void {
+ this.off("project_cloud.updated", handler);
+ }
+
/**
* Register a handler for realtime.snapshot events.
* @param handler - Function to call when realtime.snapshot event is received
diff --git a/apps/dashboard/src/client/forge/loomplane/stream-bindings.ts b/apps/dashboard/src/client/forge/loomplane/stream-bindings.ts
index 63eb0b638..d002ca3ba 100644
--- a/apps/dashboard/src/client/forge/loomplane/stream-bindings.ts
+++ b/apps/dashboard/src/client/forge/loomplane/stream-bindings.ts
@@ -238,11 +238,11 @@ export const streams = [
{
kind: 'entity',
channel: '/api/v1/realtime/events',
- message: 'environment_cloud.updated',
- entity: 'EnvironmentCloudEvent',
+ message: 'project_cloud.updated',
+ entity: 'ProjectCloudEvent',
intent: 'patch',
- invalidates: ['EnvironmentCloud'],
- decode: (payload: unknown) => decode(payload, CODECS['EnvironmentCloudEvent']),
+ invalidates: ['DefaultCloud:{projectId}'],
+ decode: (payload: unknown) => decode(payload, CODECS['ProjectCloudEvent']),
},
{
kind: 'entity',
@@ -250,7 +250,7 @@ export const streams = [
message: 'cloud_sync.updated',
entity: 'CloudSyncEvent',
intent: 'patch',
- invalidates: ['Sync:{id}', 'Sync[]', 'EnvironmentCloud'],
+ invalidates: ['Sync:{id}', 'Sync[]', 'DefaultCloud:{projectId}'],
decode: (payload: unknown) => decode(payload, CODECS['CloudSyncEvent']),
},
{
@@ -616,11 +616,11 @@ export const streams = [
{
kind: 'entity',
channel: '/api/v1/realtime/ws',
- message: 'environment_cloud.updated',
- entity: 'EnvironmentCloudEvent',
+ message: 'project_cloud.updated',
+ entity: 'ProjectCloudEvent',
intent: 'patch',
- invalidates: ['EnvironmentCloud'],
- decode: (payload: unknown) => decode(payload, CODECS['EnvironmentCloudEvent']),
+ invalidates: ['DefaultCloud:{projectId}'],
+ decode: (payload: unknown) => decode(payload, CODECS['ProjectCloudEvent']),
},
{
kind: 'entity',
@@ -628,7 +628,7 @@ export const streams = [
message: 'cloud_sync.updated',
entity: 'CloudSyncEvent',
intent: 'patch',
- invalidates: ['Sync:{id}', 'Sync[]', 'EnvironmentCloud'],
+ invalidates: ['Sync:{id}', 'Sync[]', 'DefaultCloud:{projectId}'],
decode: (payload: unknown) => decode(payload, CODECS['CloudSyncEvent']),
},
{
diff --git a/apps/dashboard/src/client/forge/loomplane/types.ts b/apps/dashboard/src/client/forge/loomplane/types.ts
index b157795f9..5365140fd 100644
--- a/apps/dashboard/src/client/forge/loomplane/types.ts
+++ b/apps/dashboard/src/client/forge/loomplane/types.ts
@@ -296,18 +296,6 @@ export interface ArtifactChoice {
service: string;
}
-export interface Assignment {
- cloudId: string;
- cloudRevision: number;
- defaultPlacement?: DefaultPlacement;
- environmentId: string;
- grantRevision: number;
- orgId: string;
- projectId: string;
- revision: number;
- targets: CloudprofilesTarget[];
-}
-
export interface AttachDefaults {
blockedPathPrefixes: string[];
cloudId?: string;
@@ -648,7 +636,6 @@ export interface CapacityDemand {
}
export interface CapacityIntent {
- assignmentRevision: number;
cloudRevision: number;
commitSha: string;
demand: CapacityDemand;
@@ -821,8 +808,8 @@ export interface ChangeInput {
cloudId: string;
connectionId?: string;
default?: boolean;
- environmentId?: string;
poolId?: string;
+ projectDefault?: boolean;
provider?: string;
region?: string;
revision: number;
@@ -834,8 +821,8 @@ export interface ChangeInputBody {
cloudId: string;
connectionId?: string;
default?: boolean;
- environmentId?: string;
poolId?: string;
+ projectDefault?: boolean;
provider?: string;
region?: string;
revision: number;
@@ -1053,7 +1040,6 @@ export interface CloudLocationList {
export interface CloudPlacement {
accountIdentity: string;
allocation?: string;
- assignmentRevision: number;
cloudId: string;
cloudRevision: number;
connectionGeneration?: number;
@@ -1889,6 +1875,17 @@ export interface DeclineInputBody {
reason?: string;
}
+export interface DefaultCloud {
+ cloud: ProjectCloud | null;
+ projectId: string;
+ revision: number;
+}
+
+export interface DefaultCloudInputBody {
+ cloudId: string;
+ revision: number;
+}
+
export interface DefaultPlacement {
connectionId: string;
provider: string;
@@ -2405,24 +2402,6 @@ export interface EnvironmentChange {
summary: PlanSummary;
}
-export interface EnvironmentCloud {
- assignment: Assignment | null;
- revision: number;
-}
-
-export interface EnvironmentCloudEvent {
- cloudId: string | null;
- environmentId: string;
- orgId: string;
- projectId: string;
- revision: number;
-}
-
-export interface EnvironmentCloudInputBody {
- cloudId: string;
- revision: number;
-}
-
export interface EnvironmentConnections {
connections: Record;
environment: string;
@@ -2433,7 +2412,7 @@ export interface EnvironmentList {
}
export interface EnvironmentUsage {
- assigned: boolean;
+ default: boolean;
environmentId: string;
environmentName: string;
placements: PlacementUsage[];
@@ -4620,10 +4599,10 @@ export interface PrepareInputBody {
export interface Preview {
after?: CloudprofilesTarget;
- afterAssignment?: Assignment;
+ afterCloud?: ProjectCloud;
afterDefault?: DefaultPlacement;
before?: CloudprofilesTarget;
- beforeAssignment?: Assignment;
+ beforeCloud?: ProjectCloud;
beforeDefault?: DefaultPlacement;
blockers: string[];
createdAt: string;
@@ -4674,6 +4653,23 @@ export interface Project {
updatedAt: string;
}
+export interface ProjectCloud {
+ cloudId: string;
+ cloudRevision: number;
+ default: boolean;
+ defaultPlacement?: DefaultPlacement;
+ grantRevision: number;
+ orgId: string;
+ projectId: string;
+ targets: CloudprofilesTarget[];
+}
+
+export interface ProjectCloudEvent {
+ cloudId: string | null;
+ orgId: string;
+ projectId: string;
+}
+
export interface ProjectDomain {
hostnames: HostnameUse[];
mode: string;
@@ -4690,6 +4686,7 @@ export interface ProjectDomainList {
export interface ProjectGrant {
cloudId: string;
+ default: boolean;
orgId: string;
projectId: string;
revision: number;
diff --git a/apps/dashboard/src/components/cloud-detail/environments.tsx b/apps/dashboard/src/components/cloud-detail/environments.tsx
index da5d7ea37..1794c4dd1 100644
--- a/apps/dashboard/src/components/cloud-detail/environments.tsx
+++ b/apps/dashboard/src/components/cloud-detail/environments.tsx
@@ -46,14 +46,14 @@ export function envState(
return { label: "Change failed", tone: "failed" }
return { label: syncLabel(change.status), tone: "flight" }
}
- if (!env.assigned) return { label: "Left, services remain", tone: "waiting" }
+ if (!env.default) return { label: "Services placed here", tone: "waiting" }
return { label: "In sync", tone: "live" }
}
/**
- * EnvironmentsOnCloud lists the environments that use the Cloud. An
- * environment belongs to its project, so each row opens the project's Cloud
- * tab, where it takes or leaves the Cloud and chooses targets.
+ * EnvironmentsOnCloud lists the environments that use the Cloud: every
+ * environment of a project whose default it is, and any environment still
+ * running services placed on it. Each row opens its project's Clouds tab.
*/
export function EnvironmentsOnCloud({
usage,
@@ -68,14 +68,14 @@ export function EnvironmentsOnCloud({
projects: Project[]
}) {
const envs = usage.data?.environments ?? []
- const assigned = envs.filter((e) => e.assigned)
+ const onDefault = envs.filter((e) => e.default)
const projectOf = (id: string) => projects.find((p) => p.id === id)
return (
{usage.status === "error" ? (
{grants && grants.length === 0
- ? "Give a project access first, then choose this Cloud from that project's Cloud tab."
- : "Choose this Cloud for an environment from its project's Cloud tab. Its services then run on this Cloud's targets."}
+ ? "Give a project access. A project's first Cloud becomes its default, and all its environments use it."
+ : "Make this a project's default Cloud from that project's Clouds tab. All its environments then use it."}
) : (
}
>
diff --git a/apps/dashboard/src/components/cloud-detail/projects.tsx b/apps/dashboard/src/components/cloud-detail/projects.tsx
index 76083497e..acd138e96 100644
--- a/apps/dashboard/src/components/cloud-detail/projects.tsx
+++ b/apps/dashboard/src/components/cloud-detail/projects.tsx
@@ -136,7 +136,7 @@ export function Projects({
const style = p ? projectStyle(p) : null
const allowed = targets.filter((t) => g.targetIds.includes(t.id))
const envs = (usage?.environments ?? []).filter(
- (e) => e.projectId === g.projectId && e.assigned
+ (e) => e.projectId === g.projectId && e.default
)
return (
@@ -165,6 +165,7 @@ export function Projects({
)
}
+ meta={g.default ? "Default Cloud" : undefined}
/>
{g.targetIds.length === 0 ? (
@@ -187,7 +188,9 @@ export function Projects({
"…"
) : envs.length === 0 ? (
- None chose this Cloud yet
+ {g.default
+ ? "No environments yet"
+ : "Not its default Cloud"}
) : (
envs.map((e) => {
diff --git a/apps/dashboard/src/components/cloud-targets/change-review.tsx b/apps/dashboard/src/components/cloud-targets/change-review.tsx
index 94c7dd536..05b1a570b 100644
--- a/apps/dashboard/src/components/cloud-targets/change-review.tsx
+++ b/apps/dashboard/src/components/cloud-targets/change-review.tsx
@@ -2,7 +2,11 @@ import { CloudLoading } from "./infrastructure-ui"
import { Alert, AlertDescription } from "@/components/ui/alert"
import { useEffect, useRef, useState } from "react"
import * as api from "@/client/forge/loomplane/hooks"
-import type { ChangeInputBody, Preview } from "@/client/forge/loomplane/types"
+import type {
+ ChangeInputBody,
+ Preview,
+ Target,
+} from "@/client/forge/loomplane/types"
import { useMutation, useQuery } from "@/client/hooks"
import { messageOf, statusOf } from "@/client/errors"
import { Button } from "@/components/ui/button"
@@ -17,8 +21,11 @@ import {
import { EnvironmentProgress } from "./organization-activity"
import { useOrganization } from "@/lib/organization"
-type AssignmentIntent = {
- environmentId: string
+/**
+ * DefaultCloudIntent makes cloudId the project's default Cloud, or with ""
+ * leaves the project without one. revision is the current default's.
+ */
+type DefaultCloudIntent = {
cloudId: string
revision: number
}
@@ -27,7 +34,7 @@ type ReviewProps = {
projectId: string
title: string
change?: ChangeInputBody
- assignment?: AssignmentIntent
+ defaultCloud?: DefaultCloudIntent
revert?: string
onClose: () => void
onApplied: () => void
@@ -38,7 +45,7 @@ export function ChangeReview(props: ReviewProps) {
key={JSON.stringify([
props.projectId,
props.change,
- props.assignment,
+ props.defaultCloud,
props.revert,
])}
{...props}
@@ -49,7 +56,7 @@ function ReviewContent({
projectId,
title,
change,
- assignment,
+ defaultCloud,
revert,
onClose,
onApplied,
@@ -58,7 +65,7 @@ function ReviewContent({
const accountName = (id: string) =>
accounts.data?.connections.find((c) => c.id === id)?.name ?? id
const previewChange = useMutation(api.useCloudChangesPreview)
- const previewAssignment = useMutation(api.useEnvironmentCloudsPreview)
+ const previewDefaultCloud = useMutation(api.useDefaultCloudPreview)
const previewRevert = useMutation(api.useCloudSyncsPreviewRevert)
const apply = useMutation(api.useCloudChangesApply)
const previewOrgChange = useMutation(api.useOrganizationCloudChangesPreview)
@@ -73,27 +80,24 @@ function ReviewContent({
const [loading, setLoading] = useState(true)
const [version, setVersion] = useState(0)
const [latestChange, setLatestChange] = useState(change)
- const [latestAssignment, setLatestAssignment] = useState(assignment)
+ const [latestDefault, setLatestDefault] = useState(defaultCloud)
const idempotency = useRef(crypto.randomUUID())
const intent = JSON.stringify({
projectId,
latestChange,
- latestAssignment,
+ latestDefault,
revert,
})
useEffect(() => {
let current = true
const load = revert
? previewRevert.mutateAsync({ path: { id: projectId, syncId: revert } })
- : latestAssignment
- ? previewAssignment.mutateAsync({
- path: {
- id: projectId,
- environmentId: latestAssignment!.environmentId,
- },
+ : latestDefault
+ ? previewDefaultCloud.mutateAsync({
+ path: { id: projectId },
body: {
- cloudId: latestAssignment!.cloudId,
- revision: latestAssignment!.revision,
+ cloudId: latestDefault.cloudId,
+ revision: latestDefault.revision,
},
})
: org
@@ -152,13 +156,11 @@ function ReviewContent({
})
).refetch()
setLatestChange({ ...change, revision: current.revision })
- } else if (assignment) {
+ } else if (defaultCloud) {
const current = await api
- .useEnvironmentCloudsGet({
- path: { id: projectId, environmentId: assignment.environmentId },
- })
+ .useDefaultCloudGet({ path: { id: projectId } })
.refetch()
- setLatestAssignment({ ...assignment, revision: current.revision })
+ setLatestDefault({ ...defaultCloud, revision: current.revision })
}
setVersion((v) => v + 1)
} catch (err) {
@@ -241,10 +243,11 @@ function ReviewContent({
{preview.after.region ? ` / ${preview.after.region}` : ""}
|
)}
- {(assignment ||
- preview.beforeAssignment ||
- preview.afterAssignment) && (
-
+ {(defaultCloud || preview.beforeCloud || preview.afterCloud) && (
+
)}
{(preview.blockers ?? []).map((blocker, i) => (
@@ -330,7 +333,12 @@ function ReviewContent({
)
}
-function AssignmentPreview({
+/**
+ * DefaultCloudPreview shows a project default change: which Cloud every
+ * environment resolves through before and after, and what each target
+ * name a service may use points at on either side.
+ */
+function DefaultCloudPreview({
preview,
accountName,
}: {
@@ -342,53 +350,56 @@ function AssignmentPreview({
})
const name = (id: string) =>
clouds.data?.clouds?.find((cloud) => cloud?.id === id)?.name ?? id
- const before = preview.beforeAssignment
- const after = preview.afterAssignment
+ const before = preview.beforeCloud
+ const after = preview.afterCloud
+ const where = (t: Target) =>
+ `${t.provider} / ${accountName(t.connectionId)}${t.region ? ` / ${t.region}` : ""}`
const targetNames = [
...new Set([
...(before?.targets ?? []).map((t) => t.name),
...(after?.targets ?? []).map((t) => t.name),
]),
- ]
+ ].sort()
return (
-
-
- Current Cloud:{" "}
- {before
- ? `${name(before.cloudId)} (revision ${before.cloudRevision})`
- : "Direct placement"}
-
+
- Desired Cloud:{" "}
- {after
- ? `${name(after.cloudId)} (revision ${after.cloudRevision})`
- : preview.input.cloudId
- ? name(preview.input.cloudId)
- : "Direct placement"}
+ Every environment moves from{" "}
+
+ {before ? name(before.cloudId) : "no default Cloud"}
+ {" "}
+ to{" "}
+
+ {after
+ ? name(after.cloudId)
+ : preview.input.cloudId
+ ? name(preview.input.cloudId)
+ : "no default Cloud"}
+
+ .
- {targetNames.map((slug) => {
- const current = before?.targets.find((target) => target.name === slug)
- const desired = after?.targets.find((target) => target.name === slug)
- return (
-
-
{slug}
-
- Current:{" "}
- {current
- ? `${current.provider} / ${accountName(current.connectionId)}${current.region ? ` / ${current.region}` : ""}`
- : "Not assigned"}
-
-
- Desired:{" "}
- {desired
- ? `${desired.provider} / ${accountName(desired.connectionId)}${desired.region ? ` / ${desired.region}` : ""}`
- : !after && preview.input.cloudId
- ? "Unavailable until blockers are resolved"
- : "Target removed from this environment"}
-
-
- )
- })}
+ {targetNames.length > 0 && (
+
+ {targetNames.map((slug) => {
+ const current = before?.targets.find((t) => t.name === slug)
+ const desired = after?.targets.find((t) => t.name === slug)
+ return (
+
+ {slug}
+
+ {current ? where(current) : "Not in the current Cloud"}
+ {" → "}
+ {desired
+ ? where(desired)
+ : "Not in the new Cloud: services that name it stop planning"}
+
+
+ )
+ })}
+
+ )}
)
}
diff --git a/apps/dashboard/src/components/cloud-targets/service-adoption.tsx b/apps/dashboard/src/components/cloud-targets/service-adoption.tsx
index ae042ee56..287bc6f85 100644
--- a/apps/dashboard/src/components/cloud-targets/service-adoption.tsx
+++ b/apps/dashboard/src/components/cloud-targets/service-adoption.tsx
@@ -9,7 +9,7 @@ import {
} from "@/components/ui/select"
import { useState } from "react"
import * as api from "@/client/forge/loomplane/hooks"
-import type { Environment, Target } from "@/client/forge/loomplane/types"
+import type { DefaultPlacement, Target } from "@/client/forge/loomplane/types"
import { useInvalidate, useMutation, useQuery } from "@/client/hooks"
import { messageOf, statusOf } from "@/client/errors"
import { Button } from "@/components/ui/button"
@@ -74,32 +74,32 @@ function TagOutcome({ targets, tags }: { targets: Target[]; tags: string[] }) {
)
}
+/**
+ * ServiceAdoption puts each service on one of the default Cloud's targets, in
+ * every environment. An environment can still override a service from the
+ * deploy screen; those overrides are listed here and cleared by a change.
+ */
export function ServiceAdoption({
projectId,
- environment,
- environments,
targets,
+ fallback,
onSaved,
}: {
projectId: string
- environment: Environment
- environments: Environment[]
targets: Target[]
- onSaved: () => Promise
+ /** fallback is the default Cloud's default placement, when it has one. */
+ fallback?: DefaultPlacement | null
+ onSaved?: () => void
}) {
const manifest = useQuery(api.useManifestsCurrent, {
path: { id: projectId },
})
- const assignment = useQuery(api.useEnvironmentCloudsGet, {
- path: { id: projectId, environmentId: environment.id },
- })
const connections = useQuery(api.useConnectionsList)
const save = useMutation(api.useManifestsSave)
const invalidate = useInvalidate()
const { can } = useOrganization()
const [choices, setChoices] = useState>({})
const [modes, setModes] = useState>({})
- const fallback = assignment.data?.assignment?.defaultPlacement
const fallbackAccount = (connections.data?.connections ?? []).find(
(c) => c.id === fallback?.connectionId
)
@@ -112,8 +112,6 @@ export function ServiceAdoption({
reviewing && manifest.data?.manifest
? adoptServiceTarget(
manifest.data.manifest,
- environments,
- environment.name,
reviewing,
choices[reviewing]
)
@@ -130,7 +128,7 @@ export function ServiceAdoption({
invalidate(api.useManifestsCurrent)
setReviewing(null)
setChoices({})
- await onSaved()
+ onSaved?.()
} catch (err) {
setError(messageOf(err, "The service target wasn't saved."))
if (statusOf(err) === 409) {
@@ -158,9 +156,7 @@ export function ServiceAdoption({
return Loading service placement...
return (
-
- Services in {environment.name}
-
+ Services
{!services.length ? (
+ >
)
+ .filter(([, o]) =>
+ [
+ "provider",
+ "target",
+ "cloud_target",
+ "cloudTarget",
+ "cloud_tags",
+ "cloudTags",
+ ].some((k) => o?.[k] !== undefined)
+ )
+ .map(([env]) => env)
const mode: Mode =
modes[name] ?? (settings.cloudTags ? "tags" : "name")
const choice = choices[name]
@@ -198,6 +211,8 @@ export function ServiceAdoption({
{name}
{current}
+ {overridden.length > 0 &&
+ ` · ${overridden.join(", ")} ${overridden.length === 1 ? "sets its own" : "set their own"}`}
- Review service edit
+ Review
{mode === "tags" && (
@@ -309,10 +324,8 @@ export function ServiceAdoption({
: `Assign ${reviewing} to ${pending}`}
- Save this manifest edit for {environment.name}. Your running
- service stays on its applied account until the next reviewed
- deployment or Cloud sync. Other environments keep their
- effective placement.
+ Every environment runs {reviewing} there from its next
+ deployment. What runs now stays where it is until then.
{typeof pending === "object" && (
@@ -322,12 +335,15 @@ export function ServiceAdoption({
className="max-h-64 overflow-auto rounded-lg bg-muted p-3 text-xs"
aria-label="Manifest adoption preview"
>
- {JSON.stringify(next, null, 2)}
+ {JSON.stringify(
+ { [reviewing]: next.services?.[reviewing] },
+ null,
+ 2
+ )}
- Revision {manifest.data.revision}. Conflicting direct placement
- and inherited defaults are removed from this service; other
- entries retain their provider and region.
+ Saves loomplane.yaml revision {manifest.data.revision + 1}. Any
+ placement an environment set for {reviewing} is cleared.
{error && (
diff --git a/apps/dashboard/src/components/cloud-targets/sync-history.tsx b/apps/dashboard/src/components/cloud-targets/sync-history.tsx
index ed69bd3c1..2f74fe9db 100644
--- a/apps/dashboard/src/components/cloud-targets/sync-history.tsx
+++ b/apps/dashboard/src/components/cloud-targets/sync-history.tsx
@@ -5,7 +5,7 @@ import { Field as FormField, FieldLabel } from "@/components/ui/field"
import { useEffect, useState } from "react"
import * as api from "@/client/forge/loomplane/hooks"
import type { Sync } from "@/client/forge/loomplane/types"
-import { useMutation, useQuery } from "@/client/hooks"
+import { useMutation, useQuery, useRefetchWhile } from "@/client/hooks"
import { messageOf } from "@/client/errors"
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
@@ -23,7 +23,8 @@ export function SyncHistory({
onChanged,
}: {
projectId: string
- environmentId: string
+ /** environmentId narrows the list to one environment; omit it for all. */
+ environmentId?: string
refresh: number
onChanged: () => Promise
}) {
@@ -50,7 +51,8 @@ function SyncList({
onChanged,
}: {
projectId: string
- environmentId: string
+ /** environmentId narrows the list to one environment; omit it for all. */
+ environmentId?: string
refresh: number
onChanged: () => Promise
}) {
@@ -72,18 +74,12 @@ function SyncList({
const rows = all.filter(
(s): s is Sync =>
!!s &&
- (s.environments ?? []).some((e) => e.environmentId === environmentId)
+ (!environmentId ||
+ (s.environments ?? []).some((e) => e.environmentId === environmentId))
)
const moving = all.some((s) => s && activeSync(s))
- useEffect(() => {
- const timer = window.setInterval(
- () => {
- void refetchSyncs().catch(() => undefined)
- },
- moving ? 3000 : 15000
- )
- return () => window.clearInterval(timer)
- }, [moving, refetchSyncs])
+ // cloud_sync.updated refreshes the list; poll only while it's down.
+ useRefetchWhile(moving, refetchSyncs, 3000)
return (
Sync history
@@ -97,8 +93,10 @@ function SyncList({
Loading sync history...
) : !rows.length ? (
) : (
diff --git a/apps/dashboard/src/components/cloud-targets/workspace.tsx b/apps/dashboard/src/components/cloud-targets/workspace.tsx
index 21ad8cc0f..3d941080c 100644
--- a/apps/dashboard/src/components/cloud-targets/workspace.tsx
+++ b/apps/dashboard/src/components/cloud-targets/workspace.tsx
@@ -1,24 +1,14 @@
-import { CloudSelect as Select } from "@/components/cloud-targets/cloud-select"
import { Card } from "@/components/ui/card"
import { Item, ItemGroup } from "@/components/ui/item"
-import {
- CloudLoading,
- listItemClass,
-} from "@/components/cloud-targets/infrastructure-ui"
+import { listItemClass } from "@/components/cloud-targets/infrastructure-ui"
import { Alert, AlertDescription } from "@/components/ui/alert"
-import {
- SelectTrigger,
- SelectValue,
- SelectContent,
- SelectItem,
-} from "@/components/ui/select"
import { Field as FormField, FieldLabel } from "@/components/ui/field"
-import { type ReactNode, useEffect, useState } from "react"
-import { PlusIcon } from "lucide-react"
+import { type ReactNode, useState } from "react"
+import { ChevronRightIcon, PlusIcon } from "lucide-react"
import * as api from "@/client/forge/loomplane/hooks"
import type {
Connection,
- Environment,
+ DefaultPlacement,
Profile,
Target,
} from "@/client/forge/loomplane/types"
@@ -50,6 +40,7 @@ import { CloudGlyph } from "@/components/cloud-glyph"
import { CloudsIcon } from "@/components/icons"
import { cloudLabel } from "@/lib/clouds"
import { cn } from "@/lib/utils"
+import { StatusPill } from "@/components/runs"
import { AccountSummary, cloudOf } from "./target-mix"
import { TargetEditor } from "./target-editor"
@@ -82,297 +73,224 @@ export function EmptyClouds({
)
}
+/**
+ * CloudWorkspace is a project's Clouds: every Cloud granted to it, with the
+ * default first. Every environment deploys through the default Cloud, so
+ * nothing here is per environment; an environment differs only where
+ * loomplane.yaml, or the deploy screen, says so.
+ */
export function CloudWorkspace({
projectId,
- environment: wanted,
cloudId,
}: {
projectId: string
- /** The environment to open on by name, such as one a Cloud's page links to. */
- environment?: string
/** The Cloud to open on, such as the one a Cloud's own page is about. */
cloudId?: string
-}) {
- const environments = useQuery(api.useEnvironmentsList, {
- path: { id: projectId },
- })
- const { session } = useOrganization()
- const preference = `loomplane.clouds.environment.${session.orgId}.${projectId}`
- // A pick made here wins over the linked environment, which wins over the
- // last one picked on this device.
- const [chosen, setChosen] = useState("")
- const [stored] = useState(() => window.localStorage.getItem(preference) ?? "")
- const list = environments.data?.environments ?? []
- const environment =
- list.find((e) => e.id === chosen) ??
- list.find((e) => e.name === wanted) ??
- list.find((e) => e.id === stored) ??
- list[0]
- return environments.status === "error" ? (
-
- ) : !environments.data ? (
-
- ) : !environment ? (
-
- ) : (
-
-
- Environment
- {
- setChosen(e ?? "")
- window.localStorage.setItem(preference, e ?? "")
- }}
- >
-
-
-
-
- {environments.data.environments.map((e) => (
-
- {e.name}
-
- ))}
-
-
-
-
- }
- />
- )
-}
-function EnvironmentWorkspace({
- projectId,
- cloudId,
- environment,
- environments,
- scopeControls,
-}: {
- projectId: string
- cloudId?: string
- environment: Environment
- environments: Environment[]
- scopeControls: ReactNode
}) {
const { can } = useOrganization()
const manage = can("cloud_account:manage")
- const deploy = manage && can("deployment:approve")
+ const review = manage && can("deployment:approve")
const profiles = useQuery(api.useCloudsList, { path: { id: projectId } })
- const assignment = useQuery(api.useEnvironmentCloudsGet, {
- path: { id: projectId, environmentId: environment.id },
- })
- const { refetch: refetchAssignment } = assignment
- const { refetch: refetchProfiles } = profiles
- const [chosen, setChosen] = useState(cloudId ?? "")
+ const current = useQuery(api.useDefaultCloudGet, { path: { id: projectId } })
+ const [open, setOpen] = useState(cloudId)
const [editing, setEditing] = useState(null)
- const [assigning, setAssigning] = useState(false)
- const [unassign, setUnassign] = useState(false)
- const [refresh, setRefresh] = useState(0)
- const list = (profiles.data?.clouds ?? []).filter((p): p is Profile => !!p)
- const profile =
- list.find((p) => p.id === chosen) ??
- list.find((p) => p.id === assignment.data?.assignment?.cloudId) ??
- list[0]
- const reload = async () => {
- await Promise.allSettled([refetchProfiles(), refetchAssignment()])
- setRefresh((n) => n + 1)
- }
- // Lists have no generated cache tags. Bounded reads also cover reconnects and
- // changes made in another tab while retaining the server's persisted status.
- useEffect(() => {
- const timer = window.setInterval(() => {
- void refetchProfiles().catch(() => undefined)
- void refetchAssignment().catch(() => undefined)
- }, 15000)
- return () => window.clearInterval(timer)
- }, [refetchProfiles, refetchAssignment])
+ const [making, setMaking] = useState(null)
+ if (profiles.status === "error" || current.status === "error")
+ return (
+
+ Promise.allSettled([profiles.refetch(), current.refetch()])
+ }
+ />
+ )
+ if (!profiles.data || !current.data) return
+ const defaultId = current.data.cloud?.cloudId
+ const list = (profiles.data.clouds ?? [])
+ .filter((p): p is Profile => !!p)
+ .sort((a, b) =>
+ a.id === defaultId
+ ? -1
+ : b.id === defaultId
+ ? 1
+ : a.name.localeCompare(b.name)
+ )
+ const expanded = open ?? defaultId ?? list[0]?.id
return (
- <>
- {(profiles.status === "error" ||
- assignment.status === "error" ||
- !profiles.data ||
- !assignment.data) && (
-
- )}
- {profiles.status === "error" || assignment.status === "error" ? (
-
- ) : !profiles.data || !assignment.data ? (
-
+
+
+ {!list.length ? (
+
+ {manage && (
+ setEditing("new")}>
+ New Cloud
+
+ )}
+
) : (
- <>
-
- {scopeControls}
-
-
- Cloud
- setChosen(e ?? "")}
- >
-
-
-
-
- {!profile && No Clouds }
- {list.map((p) => (
-
- {p.name}
-
- ))}
-
-
-
-
- {manage && (
- <>
- setEditing("new")}
- >
-
- New Cloud
-
- {profile && (
- setEditing(profile)}
- >
- Manage Cloud
-
- )}
- >
- )}
-
- {environment.name} currently uses{" "}
- {list.find((p) => p.id === assignment.data?.assignment?.cloudId)
- ?.name ??
- (assignment.data.assignment
- ? assignment.data.assignment.cloudId
- : "direct service placement")}
- .
- {profile &&
- assignment.data.assignment?.cloudId !== profile.id && (
- <>
- {" "}
- {
- setUnassign(false)
- setAssigning(true)
- }}
- >
- Review assignment
-
- >
- )}
- {assignment.data.assignment && (
- {
- setUnassign(true)
- setAssigning(true)
- }}
- >
- Review unassignment
-
- )}
-
-
- {!profile ? (
-
- {manage && (
- setEditing("new")}>
- New Cloud
-
- )}
-
- ) : (
-
+ {!defaultId && (
+
+
+ This project has no default Cloud, so services can't name a
+ target yet. Make one of these its default.
+
+
+ )}
+ {list.map((profile) => (
+
- )}
- {assigning && (
- setAssigning(false)}
- onApplied={() => {
- setAssigning(false)
- void reload()
- }}
+ isDefault={profile.id === defaultId}
+ fallback={
+ profile.id === defaultId
+ ? current.data?.cloud?.defaultPlacement
+ : undefined
+ }
+ expanded={profile.id === expanded}
+ onToggle={() =>
+ setOpen(profile.id === expanded ? "" : profile.id)
+ }
+ onMakeDefault={review ? () => setMaking(profile.id) : undefined}
+ onManage={manage ? () => setEditing(profile) : undefined}
/>
- )}
-
- >
+ ))}
+
+ )}
+ {making !== null && (
+ setMaking(null)}
+ onApplied={() => setMaking(null)}
+ />
)}
+ {}}
+ />
{editing && (
setEditing(null)}
onSaved={(id) => {
- setChosen(id)
+ if (id) setOpen(id)
setEditing(null)
- void reload()
}}
/>
)}
- >
+
+ )
+}
+
+/**
+ * CloudCard is one Cloud granted to the project: a one-line summary that
+ * opens to its targets, and for the default Cloud, where each service runs.
+ */
+function CloudCard({
+ projectId,
+ profile,
+ isDefault,
+ fallback,
+ expanded,
+ onToggle,
+ onMakeDefault,
+ onManage,
+}: {
+ projectId: string
+ profile: Profile
+ isDefault: boolean
+ fallback?: DefaultPlacement | null
+ expanded: boolean
+ onToggle: () => void
+ onMakeDefault?: () => void
+ onManage?: () => void
+}) {
+ const targets = useQuery(api.useCloudTargetsList, {
+ path: { id: projectId, cloudId: profile.id },
+ })
+ const count = (targets.data?.targets ?? []).filter(Boolean).length
+ return (
+
+
+
+
+
+ {profile.name}
+
+ {isDefault && Default }
+
+ {targets.data
+ ? `${count} ${count === 1 ? "target" : "targets"}`
+ : ""}
+ {profile.defaultPlacement ? " · default placement" : ""}
+
+
+
+ {!isDefault && onMakeDefault && (
+
+ Make default
+
+ )}
+ {onManage && (
+
+ Manage
+
+ )}
+
+
+ {expanded && (
+
+
+ {isDefault && (
+ !!t
+ )}
+ fallback={fallback}
+ />
+ )}
+
+ )}
+
)
}
+
export function CloudForm({
projectId,
profile,
@@ -425,8 +343,8 @@ export function CloudForm({
{profile ? "Manage Cloud" : "New Cloud"}
{profile
- ? "Rename this Cloud or delete it after removing its assignments and references."
- : "Create a named set of deployment targets for this project."}
+ ? "Rename this Cloud, or delete it once no project uses it."
+ : "A named set of deployment targets. A project's first Cloud becomes its default."}
@@ -471,26 +389,15 @@ export function CloudForm({
function Targets({
projectId,
profile,
- environment,
- environments,
- assigned,
- refresh,
- reload,
}: {
projectId: string
profile: Profile
- environment: Environment
- environments: Environment[]
- assigned: boolean
- refresh: number
- reload: () => Promise
}) {
const { can } = useOrganization()
const manage = can("cloud_account:manage")
const targets = useQuery(api.useCloudTargetsList, {
path: { id: projectId, cloudId: profile.id },
})
- const { refetch: refetchTargets } = targets
const connections = useQuery(api.useConnectionsList)
const [query, setQuery] = useState("")
const [editing, setEditing] = useState(null)
@@ -501,13 +408,6 @@ function Targets({
.toLowerCase()
.includes(query.toLowerCase())
)
- useEffect(() => {
- void refetchTargets().catch(() => undefined)
- const timer = window.setInterval(() => {
- void refetchTargets().catch(() => undefined)
- }, 15000)
- return () => window.clearInterval(timer)
- }, [refresh, refetchTargets])
return (
@@ -533,7 +433,7 @@ function Targets({
error={targets.error ?? connections.error}
fallback="Targets couldn't be loaded."
retry={() =>
- Promise.allSettled([refetchTargets(), connections.refetch()])
+ Promise.allSettled([targets.refetch(), connections.refetch()])
}
/>
) : !targets.data || !connections.data ? (
@@ -568,22 +468,6 @@ function Targets({
onEdit={setEditing}
/>
)}
- {assigned && (
-
- )}
- {assigned && (
-
- )}
{editing && (
setEditing(null)}
- onSaved={() => {
- setEditing(null)
- void refetchTargets()
- void reload()
- }}
- />
- )}
-
- )
-}
-
-function AppliedPlacement({
- projectId,
- environment,
- refresh,
-}: {
- projectId: string
- environment: Environment
- refresh: number
-}) {
- const bindings = useQuery(api.useBindingsList, {
- path: { id: projectId },
- query: { environment: environment.name },
- })
- const { refetch: refetchBindings } = bindings
- const accounts = useQuery(api.useConnectionsList)
- useEffect(() => {
- void refetchBindings().catch(() => undefined)
- const timer = window.setInterval(() => {
- void refetchBindings().catch(() => undefined)
- }, 5000)
- return () => window.clearInterval(timer)
- }, [refresh, refetchBindings])
- if (bindings.status === "error")
- return (
-
- )
- if (!bindings.data)
- return Loading applied accounts...
- const services = bindings.data.bindings.filter((b) => b.subject === "service")
- return (
-
-
- Applied accounts in {environment.name}
-
- {!services.length ? (
- setEditing(null)}
/>
- ) : (
-
- {services.map((b) => (
-
-
{b.name}
-
- {b.provider} ·{" "}
- {accounts.data?.connections.find((c) => c.id === b.connectionId)
- ?.name ?? b.connectionId}{" "}
- · {b.commitSha?.slice(0, 8)}
-
- {b.url && (
-
- Open service
-
- )}
-
- ))}
-
)}
)
diff --git a/apps/dashboard/src/components/deploy-dialog.tsx b/apps/dashboard/src/components/deploy-dialog.tsx
index 8e7a40663..9cf17b837 100644
--- a/apps/dashboard/src/components/deploy-dialog.tsx
+++ b/apps/dashboard/src/components/deploy-dialog.tsx
@@ -408,10 +408,7 @@ function DeployScreen({
query: { environment },
})
const scope = useDeploymentScope(project.id, environment)
- const ctx = usePlacementContext(
- project.id,
- environments.find((e) => e.name === environment)?.id
- )
+ const ctx = usePlacementContext(project.id)
const manifest = current.data?.manifest
const graph = view.data?.graph
const rows =
diff --git a/apps/dashboard/src/components/deploy.tsx b/apps/dashboard/src/components/deploy.tsx
index fd46f2249..39426d4f1 100644
--- a/apps/dashboard/src/components/deploy.tsx
+++ b/apps/dashboard/src/components/deploy.tsx
@@ -343,10 +343,7 @@ function WhereServicesRun({ project }: { project: Project }) {
const environment = list.some((e) => e.name === picked)
? picked
: (list[0]?.name ?? "")
- const ctx = usePlacementContext(
- project.id,
- list.find((e) => e.name === environment)?.id
- )
+ const ctx = usePlacementContext(project.id)
const manifest = current.data?.manifest
const rows =
manifest && view.data?.graph
diff --git a/apps/dashboard/src/components/deployment-targets.tsx b/apps/dashboard/src/components/deployment-targets.tsx
index 1673db968..a420687ee 100644
--- a/apps/dashboard/src/components/deployment-targets.tsx
+++ b/apps/dashboard/src/components/deployment-targets.tsx
@@ -7,8 +7,9 @@ import { toast } from "sonner"
import { messageOf } from "@/client/errors"
import {
+ useCloudsList,
useConnectionsList,
- useEnvironmentCloudsGet,
+ useDefaultCloudGet,
useEnvironmentConnectionsChoose,
useEnvironmentConnectionsGet,
useManifestsCurrent,
@@ -147,8 +148,8 @@ export function usePlacementSave(projectId: string) {
}
}
-// placedManifest applies one edit in memory. A Cloud target choice rewrites
-// the service across environments first, as adopting one on its own does.
+// placedManifest applies one edit in memory. A Cloud target choice made here
+// is for this environment only; the others keep where they run.
function placedManifest(
m: Manifest,
environments: Environment[],
@@ -157,13 +158,10 @@ function placedManifest(
const choice = cloudChoice(e.changes)
if (!choice || e.row.section !== "services")
return applyPlacement(m, e.row, e.environment, e.changes)
- const adopted = adoptServiceTarget(
- m,
+ const adopted = adoptServiceTarget(m, e.row.name, choice, {
+ environment: e.environment,
environments,
- e.environment,
- e.row.name,
- choice
- )
+ })
const rest = { ...e.changes }
for (const key of cloudOwnedFields) delete rest[key]
return applyPlacement(adopted, e.row, e.environment, rest)
@@ -171,24 +169,25 @@ function placedManifest(
/**
* usePlacementContext loads what a "Runs on" cell names: the provider
- * catalog, the environment's Cloud targets and the organization's accounts.
+ * catalog, the project's default Cloud and its targets, and the
+ * organization's accounts. Every environment shares the default Cloud.
*/
-export function usePlacementContext(projectId: string, environmentId?: string) {
+export function usePlacementContext(projectId: string) {
const providers = useQuery(useProvidersList)
const connections = useQuery(useConnectionsList)
- // The assignment changes on the Clouds page, not here, and its read has no
- // cache identity, so read it fresh each time a placement panel opens.
- const cloud = useQuery(
- useEnvironmentCloudsGet,
- { path: { id: projectId, environmentId: environmentId ?? "" } },
- { staleTime: 0 }
- )
+ const cloud = useQuery(useDefaultCloudGet, { path: { id: projectId } })
+ const clouds = useQuery(useCloudsList, { path: { id: projectId } })
+ const id = cloud.data?.cloud?.cloudId
return {
providers,
catalog: providers.data?.providers ?? [],
connections: connections.data?.connections ?? [],
- cloudAssigned: !!cloud.data?.assignment,
- cloudTargets: (cloud.data?.assignment?.targets ?? []).filter(
+ /** cloudName names the default Cloud; undefined when there is none. */
+ cloudName: id
+ ? (clouds.data?.clouds?.find((c) => c?.id === id)?.name ??
+ "Default Cloud")
+ : undefined,
+ cloudTargets: (cloud.data?.cloud?.targets ?? []).filter(
(t): t is Target => !!t
),
}
@@ -321,11 +320,7 @@ function PlacementForm({
onClose: () => void
onPendingChange?: (pending: boolean) => void
}) {
- const environmentId = environments.find((e) => e.name === environment)?.id
- const { providers, cloudTargets, cloudAssigned } = usePlacementContext(
- projectId,
- environmentId
- )
+ const { providers, cloudTargets, cloudName } = usePlacementContext(projectId)
return (
<>
@@ -357,11 +352,10 @@ function PlacementForm({
revision={revision}
row={row}
environment={environment}
- environmentId={environmentId}
environments={environments}
catalog={providers.data.providers}
cloudTargets={cloudTargets}
- cloudAssigned={cloudAssigned}
+ cloudName={cloudName}
mode={mode}
pending={pending}
onUse={onUse}
@@ -382,11 +376,10 @@ function PlacementChoices({
revision,
row,
environment,
- environmentId,
environments,
catalog,
cloudTargets,
- cloudAssigned,
+ cloudName,
mode,
pending,
onUse,
@@ -399,11 +392,10 @@ function PlacementChoices({
revision: number
row: PlacementRow
environment: string
- environmentId?: string
environments: Environment[]
catalog: Provider[]
cloudTargets: Target[]
- cloudAssigned: boolean
+ cloudName?: string
mode: "pending" | "save"
pending?: PendingPlacement
onUse?: (change: PendingPlacement) => void
@@ -411,7 +403,7 @@ function PlacementChoices({
onClose: () => void
onPendingChange?: (pending: boolean) => void
}) {
- const { can, session } = useOrganization()
+ const { can } = useOrganization()
const placement = usePlacementSave(projectId)
const connections = useQuery(useConnectionsList)
const settings = placementSettings(manifest, row, environment)
@@ -509,17 +501,11 @@ function PlacementChoices({
onPendingChange?.(false)
}
}
- const manageCloud = () => {
- window.localStorage.setItem(
- `loomplane.clouds.project.${session.orgId}`,
- projectId
- )
- if (environmentId)
- window.localStorage.setItem(
- `loomplane.clouds.environment.${session.orgId}.${projectId}`,
- environmentId
- )
- }
+ const projectClouds = {
+ to: "/projects/$id",
+ params: { id: projectId },
+ search: { tab: "cloud" },
+ } as const
return (