@treeseed/sdk 0.13.0-rc.71 → 0.13.0-rc.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.treeseed-build-complete.json +1 -1
- package/dist/deployment/hosted-topology.d.ts +666 -26
- package/dist/deployment/hosted-topology.js +63 -14
- package/dist/operator-contracts/canonical-command-tree.js +10 -0
- package/dist/operator-contracts/catalog/hosted-topology-operations.d.ts +214 -0
- package/dist/operator-contracts/catalog/hosted-topology-operations.js +77 -0
- package/dist/operator-contracts/control-plane-operations.d.ts +216 -0
- package/dist/operator-contracts/control-plane-operations.js +3 -4
- package/dist/secrets-capability/service-provider-contracts.js +10 -9
- package/package.json +1 -1
|
@@ -1,5 +1,221 @@
|
|
|
1
1
|
import type { ControlPlaneOperationDescriptor } from './control-plane-operation.js';
|
|
2
2
|
export declare const CONTROL_PLANE_OPERATIONS: {
|
|
3
|
+
readonly infrastructure: {
|
|
4
|
+
readonly topology: {
|
|
5
|
+
readonly plan: import("./control-plane-operation.js").ControlPlaneOperationBinding<{
|
|
6
|
+
teamId: string;
|
|
7
|
+
}, {}, {
|
|
8
|
+
declaration: {
|
|
9
|
+
schemaVersion: "treeseed.hosted-topology/v1";
|
|
10
|
+
resources: {
|
|
11
|
+
id: string;
|
|
12
|
+
kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
|
|
13
|
+
provider: "cloudflare" | "railway";
|
|
14
|
+
adoption: {
|
|
15
|
+
mode: "adopt-or-create";
|
|
16
|
+
replacement: "forbidden";
|
|
17
|
+
externalIdInput?: string | undefined;
|
|
18
|
+
};
|
|
19
|
+
dependsOn?: string[] | undefined;
|
|
20
|
+
parameters?: Record<string, {
|
|
21
|
+
input: string;
|
|
22
|
+
} | {
|
|
23
|
+
artifact: string;
|
|
24
|
+
} | {
|
|
25
|
+
resourceOutput: {
|
|
26
|
+
resourceId: string;
|
|
27
|
+
output: string;
|
|
28
|
+
};
|
|
29
|
+
} | {
|
|
30
|
+
literal: string | number | boolean;
|
|
31
|
+
}> | undefined;
|
|
32
|
+
}[];
|
|
33
|
+
id: string;
|
|
34
|
+
platform: {
|
|
35
|
+
repository: "treeseed-ai/platform";
|
|
36
|
+
commit: string;
|
|
37
|
+
};
|
|
38
|
+
mutation: "approval-required";
|
|
39
|
+
environment: "production" | "staging";
|
|
40
|
+
artifacts: Record<string, {
|
|
41
|
+
digest: string;
|
|
42
|
+
source: string;
|
|
43
|
+
}>;
|
|
44
|
+
providerConnections: Partial<Record<"cloudflare" | "railway", {
|
|
45
|
+
connectionRef: string;
|
|
46
|
+
}>>;
|
|
47
|
+
};
|
|
48
|
+
}, {
|
|
49
|
+
schemaVersion: "treeseed.hosted-topology-plan/v1";
|
|
50
|
+
blockers: {
|
|
51
|
+
code: "connection-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
|
|
52
|
+
message: string;
|
|
53
|
+
resourceId?: string | undefined;
|
|
54
|
+
}[];
|
|
55
|
+
planDigest: string;
|
|
56
|
+
actions: {
|
|
57
|
+
action: "noop" | "create" | "adopt" | "update";
|
|
58
|
+
resourceId: string;
|
|
59
|
+
kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
|
|
60
|
+
provider: "cloudflare" | "railway";
|
|
61
|
+
providerResourceId: string | null;
|
|
62
|
+
desiredResource: {
|
|
63
|
+
id: string;
|
|
64
|
+
kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
|
|
65
|
+
provider: "cloudflare" | "railway";
|
|
66
|
+
adoption: {
|
|
67
|
+
mode: "adopt-or-create";
|
|
68
|
+
replacement: "forbidden";
|
|
69
|
+
externalIdInput?: string | undefined;
|
|
70
|
+
};
|
|
71
|
+
dependsOn?: string[] | undefined;
|
|
72
|
+
parameters?: Record<string, {
|
|
73
|
+
input: string;
|
|
74
|
+
} | {
|
|
75
|
+
artifact: string;
|
|
76
|
+
} | {
|
|
77
|
+
resourceOutput: {
|
|
78
|
+
resourceId: string;
|
|
79
|
+
output: string;
|
|
80
|
+
};
|
|
81
|
+
} | {
|
|
82
|
+
literal: string | number | boolean;
|
|
83
|
+
}> | undefined;
|
|
84
|
+
};
|
|
85
|
+
desiredDigest: string;
|
|
86
|
+
previousDigest: string | null;
|
|
87
|
+
}[];
|
|
88
|
+
environment: "production" | "staging";
|
|
89
|
+
executable: false;
|
|
90
|
+
planId: string;
|
|
91
|
+
declarationDigest: string;
|
|
92
|
+
topologyId: string;
|
|
93
|
+
platformCommit: string;
|
|
94
|
+
approvalRequired: boolean;
|
|
95
|
+
}>;
|
|
96
|
+
readonly apply: import("./control-plane-operation.js").ControlPlaneOperationBinding<{
|
|
97
|
+
teamId: string;
|
|
98
|
+
}, {}, {
|
|
99
|
+
approval: {
|
|
100
|
+
schemaVersion: "treeseed.hosted-topology-approval/v1";
|
|
101
|
+
planDigest: string;
|
|
102
|
+
environment: "production" | "staging";
|
|
103
|
+
decision: "approved";
|
|
104
|
+
approvedBy: string;
|
|
105
|
+
approvedAt: string;
|
|
106
|
+
};
|
|
107
|
+
plan: {
|
|
108
|
+
schemaVersion: "treeseed.hosted-topology-plan/v1";
|
|
109
|
+
blockers: {
|
|
110
|
+
code: "connection-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
|
|
111
|
+
message: string;
|
|
112
|
+
resourceId?: string | undefined;
|
|
113
|
+
}[];
|
|
114
|
+
planDigest: string;
|
|
115
|
+
actions: {
|
|
116
|
+
action: "noop" | "create" | "adopt" | "update";
|
|
117
|
+
resourceId: string;
|
|
118
|
+
kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
|
|
119
|
+
provider: "cloudflare" | "railway";
|
|
120
|
+
providerResourceId: string | null;
|
|
121
|
+
desiredResource: {
|
|
122
|
+
id: string;
|
|
123
|
+
kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
|
|
124
|
+
provider: "cloudflare" | "railway";
|
|
125
|
+
adoption: {
|
|
126
|
+
mode: "adopt-or-create";
|
|
127
|
+
replacement: "forbidden";
|
|
128
|
+
externalIdInput?: string | undefined;
|
|
129
|
+
};
|
|
130
|
+
dependsOn?: string[] | undefined;
|
|
131
|
+
parameters?: Record<string, {
|
|
132
|
+
input: string;
|
|
133
|
+
} | {
|
|
134
|
+
artifact: string;
|
|
135
|
+
} | {
|
|
136
|
+
resourceOutput: {
|
|
137
|
+
resourceId: string;
|
|
138
|
+
output: string;
|
|
139
|
+
};
|
|
140
|
+
} | {
|
|
141
|
+
literal: string | number | boolean;
|
|
142
|
+
}> | undefined;
|
|
143
|
+
};
|
|
144
|
+
desiredDigest: string;
|
|
145
|
+
previousDigest: string | null;
|
|
146
|
+
}[];
|
|
147
|
+
environment: "production" | "staging";
|
|
148
|
+
executable: false;
|
|
149
|
+
planId: string;
|
|
150
|
+
declarationDigest: string;
|
|
151
|
+
topologyId: string;
|
|
152
|
+
platformCommit: string;
|
|
153
|
+
approvalRequired: boolean;
|
|
154
|
+
};
|
|
155
|
+
}, Record<string, unknown>>;
|
|
156
|
+
readonly status: import("./control-plane-operation.js").ControlPlaneOperationBinding<{
|
|
157
|
+
teamId: string;
|
|
158
|
+
}, {}, undefined, {
|
|
159
|
+
operation: Record<string, unknown> | null;
|
|
160
|
+
receipt: {
|
|
161
|
+
schemaVersion: "treeseed.hosted-topology-receipt/v1";
|
|
162
|
+
resources: {
|
|
163
|
+
state: "missing" | "degraded" | "healthy";
|
|
164
|
+
resourceId: string;
|
|
165
|
+
kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
|
|
166
|
+
provider: "cloudflare" | "railway";
|
|
167
|
+
providerResourceId: string | null;
|
|
168
|
+
managedBy: "external" | "treeseed" | null;
|
|
169
|
+
observedDigest: string | null;
|
|
170
|
+
observedAt: string;
|
|
171
|
+
}[];
|
|
172
|
+
planDigest: string;
|
|
173
|
+
state: "known-good";
|
|
174
|
+
environment: "production" | "staging";
|
|
175
|
+
completedAt: string;
|
|
176
|
+
receiptId: string;
|
|
177
|
+
declarationDigest: string;
|
|
178
|
+
topologyId: string;
|
|
179
|
+
platformCommit: string;
|
|
180
|
+
previousResources: {
|
|
181
|
+
state: "missing" | "degraded" | "healthy";
|
|
182
|
+
resourceId: string;
|
|
183
|
+
kind: "admin-application" | "dns-record" | "tls-policy" | "api-proxy" | "control-plane-api" | "postgresql" | "operations-runner" | "treedx-service";
|
|
184
|
+
provider: "cloudflare" | "railway";
|
|
185
|
+
providerResourceId: string | null;
|
|
186
|
+
managedBy: "external" | "treeseed" | null;
|
|
187
|
+
observedDigest: string | null;
|
|
188
|
+
observedAt: string;
|
|
189
|
+
}[];
|
|
190
|
+
} | null;
|
|
191
|
+
}>;
|
|
192
|
+
readonly rollback: import("./control-plane-operation.js").ControlPlaneOperationBinding<{
|
|
193
|
+
teamId: string;
|
|
194
|
+
}, {}, {
|
|
195
|
+
rollback: {
|
|
196
|
+
schemaVersion: "treeseed.hosted-topology-rollback/v1";
|
|
197
|
+
environment: "production" | "staging";
|
|
198
|
+
operations: {
|
|
199
|
+
action: "noop" | "restore" | "delete-created";
|
|
200
|
+
resourceId: string;
|
|
201
|
+
providerResourceId: string;
|
|
202
|
+
targetDigest: string | null;
|
|
203
|
+
}[];
|
|
204
|
+
rollbackId: string;
|
|
205
|
+
sourceReceiptId: string;
|
|
206
|
+
rollbackDigest: string;
|
|
207
|
+
};
|
|
208
|
+
approval: {
|
|
209
|
+
schemaVersion: "treeseed.hosted-topology-rollback-approval/v1";
|
|
210
|
+
environment: "production" | "staging";
|
|
211
|
+
decision: "approved";
|
|
212
|
+
approvedBy: string;
|
|
213
|
+
approvedAt: string;
|
|
214
|
+
rollbackDigest: string;
|
|
215
|
+
};
|
|
216
|
+
}, Record<string, unknown>>;
|
|
217
|
+
};
|
|
218
|
+
};
|
|
3
219
|
readonly capabilities: {
|
|
4
220
|
list: import("./control-plane-operation.js").ControlPlaneOperationBinding<{}, {
|
|
5
221
|
status?: "revoked" | "active" | "deprecated" | undefined;
|
|
@@ -7,11 +7,9 @@ import { TREEAI_CONTROL_PLANE_OPERATIONS } from "./catalog/treeai-operations.js"
|
|
|
7
7
|
import { capabilityOntologyOperations } from "./catalog/capability-ontology-operations.js";
|
|
8
8
|
import { knowledgeShareOperations } from "./catalog/knowledge-share-operations.js";
|
|
9
9
|
import { PROVIDER_ENVIRONMENT_OPERATIONS } from "./catalog/provider-environment-operations.js";
|
|
10
|
+
import { HOSTED_TOPOLOGY_OPERATIONS } from "./catalog/hosted-topology-operations.js";
|
|
10
11
|
import { buildControlPlaneCatalog, flattenControlPlaneOperations } from "./catalog/control-plane-catalog.js";
|
|
11
|
-
const empty = z.object({}).strict();
|
|
12
|
-
const none = z.undefined();
|
|
13
|
-
const record = z.record(z.unknown());
|
|
14
|
-
const payload = record;
|
|
12
|
+
const empty = z.object({}).strict(), none = z.undefined(), record = z.record(z.unknown()), payload = record;
|
|
15
13
|
function read(operationId, path, capability, surfaces = ["rest"]) {
|
|
16
14
|
return define({
|
|
17
15
|
operationId,
|
|
@@ -102,6 +100,7 @@ function resource(operationId, method, path, pathShape, options = { capability:
|
|
|
102
100
|
}, { path: z.object(pathShape).strict(), query: kind === "read" ? record : empty, body: kind === "read" ? none : record, output: payload });
|
|
103
101
|
}
|
|
104
102
|
const CONTROL_PLANE_OPERATIONS = {
|
|
103
|
+
infrastructure: { topology: HOSTED_TOPOLOGY_OPERATIONS },
|
|
105
104
|
capabilities: capabilityOntologyOperations(),
|
|
106
105
|
inbox: inboxOperations(),
|
|
107
106
|
treeai: TREEAI_CONTROL_PLANE_OPERATIONS,
|
|
@@ -117,14 +117,14 @@ const SERVICE_PROVIDER_CATALOG = [
|
|
|
117
117
|
knowledgePageIds: ["provider.cloudflare"],
|
|
118
118
|
connectionFields: [field("accountId", "Account ID", "The non-secret Cloudflare account identifier.")],
|
|
119
119
|
capabilities: [
|
|
120
|
-
{ type: "frontend-hosting", label: "Frontend hosting", description: "
|
|
121
|
-
{ type: "dns-management", label: "DNS management", description: "
|
|
120
|
+
{ type: "frontend-hosting", label: "Frontend hosting", description: "Pages and Workers application hosting.", credentialProfileIds: ["cloudflare-runtime"], status: "available" },
|
|
121
|
+
{ type: "dns-management", label: "DNS management", description: "Scoped DNS record management.", credentialProfileIds: ["cloudflare-dns"], status: "available" },
|
|
122
122
|
{ type: "object-storage", label: "Object storage", description: "R2-backed immutable publication and private artifact storage.", credentialProfileIds: ["cloudflare-storage"], status: "available" }
|
|
123
123
|
],
|
|
124
124
|
credentialProfiles: [
|
|
125
|
-
{ id: "cloudflare-runtime", label: "Pages and Workers token", description: "A token limited to application deployment resources.", capabilities: ["frontend-hosting"], fields: [field("apiToken", "API token", "Encrypted in this browser and used only for authorized frontend operations.", true, true)], permissions: ["Account: Workers Scripts Edit", "Account: Pages Edit"], sharing: "capability-scoped", unattendedCompatible:
|
|
126
|
-
{ id: "cloudflare-dns", label: "DNS token", description: "A token restricted to selected zones.", capabilities: ["dns-management"], fields: [field("apiToken", "DNS API token", "Encrypted separately from deployment authority.", true, true)], permissions: ["Zone: DNS Edit for only the managed zones"], sharing: "capability-scoped", unattendedCompatible:
|
|
127
|
-
{ id: "cloudflare-storage", label: "Storage token", description: "A token limited to R2 resources.", capabilities: ["object-storage"], fields: [field("apiToken", "Storage API token", "Encrypted separately from runtime and DNS authority.", true, true)], permissions: ["Account: Workers R2 Storage Edit"], sharing: "capability-scoped", unattendedCompatible:
|
|
125
|
+
{ id: "cloudflare-runtime", label: "Pages and Workers token", description: "A token limited to application deployment resources.", capabilities: ["frontend-hosting"], fields: [field("apiToken", "API token", "Encrypted in this browser and used only for authorized frontend operations.", true, true)], permissions: ["Account: Workers Scripts Edit", "Account: Pages Edit"], sharing: "capability-scoped", unattendedCompatible: true, authoritySchemes: ["environment-reference", "external-vault", "workload-identity"], knowledgePageIds: ["provider.cloudflare", "services.credentials", "vault.rotation"] },
|
|
126
|
+
{ id: "cloudflare-dns", label: "DNS token", description: "A token restricted to selected zones.", capabilities: ["dns-management"], fields: [field("apiToken", "DNS API token", "Encrypted separately from deployment authority.", true, true)], permissions: ["Zone: DNS Edit for only the managed zones"], sharing: "capability-scoped", unattendedCompatible: true, authoritySchemes: ["environment-reference", "external-vault", "workload-identity"], knowledgePageIds: ["provider.cloudflare", "services.credentials", "vault.rotation"] },
|
|
127
|
+
{ id: "cloudflare-storage", label: "Storage token", description: "A token limited to R2 resources.", capabilities: ["object-storage"], fields: [field("apiToken", "Storage API token", "Encrypted separately from runtime and DNS authority.", true, true)], permissions: ["Account: Workers R2 Storage Edit"], sharing: "capability-scoped", unattendedCompatible: true, authoritySchemes: ["environment-reference", "external-vault", "workload-identity"], knowledgePageIds: ["provider.cloudflare", "services.credentials", "vault.rotation"] }
|
|
128
128
|
]
|
|
129
129
|
},
|
|
130
130
|
{
|
|
@@ -136,10 +136,10 @@ const SERVICE_PROVIDER_CATALOG = [
|
|
|
136
136
|
knowledgePageIds: ["provider.railway"],
|
|
137
137
|
connectionFields: [field("workspaceId", "Workspace ID", "The non-secret Railway workspace identifier.")],
|
|
138
138
|
capabilities: [
|
|
139
|
-
{ type: "backend-hosting", label: "Backend hosting", description: "
|
|
140
|
-
{ type: "database-hosting", label: "Database hosting", description: "
|
|
139
|
+
{ type: "backend-hosting", label: "Backend hosting", description: "API and backend service hosting.", credentialProfileIds: ["railway-workspace"], status: "available" },
|
|
140
|
+
{ type: "database-hosting", label: "Database hosting", description: "Managed database placement.", credentialProfileIds: ["railway-workspace"], status: "available" },
|
|
141
141
|
{ type: "capacity-runtime-hosting", label: "Capacity runtime hosting", description: "Future capacity provider placement.", credentialProfileIds: ["railway-workspace"], status: "planned" },
|
|
142
|
-
{ type: "private-knowledge-index-hosting", label: "Private knowledge hosting", description: "
|
|
142
|
+
{ type: "private-knowledge-index-hosting", label: "Private knowledge hosting", description: "Private TreeDX knowledge-plane placement.", credentialProfileIds: ["railway-workspace"], status: "available" }
|
|
143
143
|
],
|
|
144
144
|
credentialProfiles: [{
|
|
145
145
|
id: "railway-workspace",
|
|
@@ -149,7 +149,8 @@ const SERVICE_PROVIDER_CATALOG = [
|
|
|
149
149
|
fields: [field("apiToken", "Workspace token", "Encrypted in this browser. TreeSeed will request explicit authorization before interactive use.", true, true)],
|
|
150
150
|
permissions: ["Workspace access required by the selected operations"],
|
|
151
151
|
sharing: "provider-shared",
|
|
152
|
-
unattendedCompatible:
|
|
152
|
+
unattendedCompatible: true,
|
|
153
|
+
authoritySchemes: ["environment-reference", "external-vault", "workload-identity"],
|
|
153
154
|
knowledgePageIds: ["provider.railway", "services.credentials", "vault.rotation"]
|
|
154
155
|
}]
|
|
155
156
|
},
|