@treeseed/sdk 0.13.0-rc.87 → 0.13.0-rc.89
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/operator-contracts/canonical-command-tree.js +3 -2
- package/dist/operator-contracts/catalog/services/secret-commands.d.ts +2 -0
- package/dist/operator-contracts/catalog/services/secret-commands.js +31 -0
- package/dist/operator-contracts/catalog/services/secret-operations.js +1 -1
- package/dist/operator-contracts/control-plane-operation.js +3 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"completedAt":"2026-09-
|
|
1
|
+
{"completedAt":"2026-09-05T04:40:44.268Z"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { managedSecretCommands } from "./catalog/services/secret-commands.js";
|
|
1
2
|
import { hostProviderEnvironmentBranch, PROVIDER_ENVIRONMENT_COMMAND_BINDINGS, providerEnvironmentBranches } from "./catalog/provider-environment-commands.js";
|
|
2
3
|
const unavailable = (reason = "This capability is not enabled until its control-plane operation is accepted.") => ({
|
|
3
4
|
kind: "unavailable",
|
|
@@ -30,7 +31,6 @@ const operationBindings = {
|
|
|
30
31
|
"secrets status": local("local.secrets.status"),
|
|
31
32
|
"secrets unlock": local("local.secrets.unlock"),
|
|
32
33
|
"secrets lock": local("local.secrets.lock"),
|
|
33
|
-
"secrets rotate": local("local.secrets.rotate"),
|
|
34
34
|
"platform verify": local("local.platform.verify"),
|
|
35
35
|
"platform workset": local("local.platform.workset"),
|
|
36
36
|
"platform project create": local("local.platform.project.create"),
|
|
@@ -356,7 +356,8 @@ const commandTree = {
|
|
|
356
356
|
branch("auth", [authLogin(), leaf("logout", "mutation"), leaf("status")]),
|
|
357
357
|
branch("users", [userCreate()]),
|
|
358
358
|
branch("teams", [leaf("list"), { nodeType: "leaf", segment: "current", description: "Show the active team for this authenticated server session.", kind: "read", resultSchemaId: "treeseed.command.teams.current/v1", execution: unavailable() }, { nodeType: "leaf", segment: "use", description: "Select the active team for this authenticated server session.", kind: "mutation", arguments: [{ name: "team", description: "Team UUID or unambiguous slug.", required: true }], options: [planOption], authorization: { capability: "teams.read", confirmation: "never" }, resultSchemaId: "treeseed.command.teams.use/v1", execution: unavailable() }]),
|
|
359
|
-
branch("secrets", [leaf("list"), leaf("status"), leaf("unlock", "mutation", void 0, "credential"), leaf("lock", "mutation")
|
|
359
|
+
branch("secrets", [leaf("list"), leaf("status"), leaf("unlock", "mutation", void 0, "credential"), leaf("lock", "mutation")]),
|
|
360
|
+
managedSecretCommands,
|
|
360
361
|
branch("platform", [
|
|
361
362
|
{ nodeType: "leaf", segment: "verify", description: "Verify a declarative Platform repository without package checkouts or a control-plane API.", kind: "read", arguments: [{ name: "root", description: "Platform root; defaults to the current directory.", required: false }], options: [{ name: "--profile", description: "Composable profile to verify.", type: "string[]" }, { name: "--json", description: "Emit the stable command-result envelope.", type: "boolean" }], resultSchemaId: "treeseed.platform-verification/v1", execution: local("local.platform.verify") },
|
|
362
363
|
{ nodeType: "leaf", segment: "workset", description: "Plan or safely materialize exact primary source checkouts beneath packages/.", kind: "mutation", options: [planOption, { name: "--apply", description: "Apply the frozen workset plan.", type: "boolean" }, { name: "--yes", description: "Confirm the planned checkout mutations.", type: "boolean" }, { name: "--profile", description: "Composable source profile; repeat to union profiles.", type: "string[]" }, { name: "--project", description: "Explicit project slug; repeat to select projects.", type: "string[]" }, { name: "--exclude", description: "Project slug to exclude; repeat as needed.", type: "string[]" }, { name: "--json", description: "Emit the stable command-result envelope.", type: "boolean" }], authorization: { capability: "development.workset", confirmation: "never" }, resultSchemaId: "treeseed.platform-workset-result/v1", execution: local("local.platform.workset") },
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const managedSecretCommands = {
|
|
2
|
+
nodeType: "branch",
|
|
3
|
+
segment: "services",
|
|
4
|
+
description: "Team service credentials.",
|
|
5
|
+
children: [{
|
|
6
|
+
nodeType: "branch",
|
|
7
|
+
segment: "credentials",
|
|
8
|
+
description: "Manage credentials in core OpenBao.",
|
|
9
|
+
children: ["show", "put", "delete", "validate"].map((name) => ({
|
|
10
|
+
nodeType: "leaf",
|
|
11
|
+
segment: name,
|
|
12
|
+
description: `${name} an exact service credential profile.`,
|
|
13
|
+
kind: name === "show" ? "read" : "mutation",
|
|
14
|
+
arguments: [{ name: "connection", description: "Service connection ID.", required: true }, { name: "profile", description: "Credential profile ID.", required: true }],
|
|
15
|
+
options: [
|
|
16
|
+
{ name: "--team", description: "Authorized team ID.", type: "string" },
|
|
17
|
+
...name === "show" ? [] : [
|
|
18
|
+
{ name: "--plan", description: "Inspect the proposed operation without mutation or secret input.", type: "boolean" },
|
|
19
|
+
{ name: "--expected-version", description: "Exact current credential version; zero for first creation.", type: "number", required: true }
|
|
20
|
+
],
|
|
21
|
+
...name === "put" ? [{ name: "--stdin", description: "Read the credential field object as JSON from standard input.", type: "boolean" }] : []
|
|
22
|
+
],
|
|
23
|
+
authorization: { capability: name === "show" ? "secrets.read" : "secrets.write", confirmation: "never" },
|
|
24
|
+
resultSchemaId: `treeseed.services.credentials.${name}/v1`,
|
|
25
|
+
execution: { kind: "local", handlerId: `local.services.credentials.${name}` }
|
|
26
|
+
}))
|
|
27
|
+
}]
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
managedSecretCommands
|
|
31
|
+
};
|
|
@@ -28,7 +28,7 @@ function operation(name, method) {
|
|
|
28
28
|
oauthScopes: read ? ["treeseed:read"] : ["treeseed:projects:write"],
|
|
29
29
|
kind: read ? "read" : "mutation",
|
|
30
30
|
riskClass: read ? "ordinary" : "credential",
|
|
31
|
-
confirmation:
|
|
31
|
+
confirmation: "never",
|
|
32
32
|
surfaces: ["rest"],
|
|
33
33
|
cacheScope: "none",
|
|
34
34
|
pagination: "none",
|
|
@@ -56,8 +56,9 @@ function validateControlPlaneCatalog(catalog) {
|
|
|
56
56
|
diagnostics.push({ code: "upstream_binding_invalid", path: `${path}.upstream`, message: "Upstream bindings require an operation ID and exact SHA-256 contract digest." });
|
|
57
57
|
}
|
|
58
58
|
const elevatedRisk = operation.riskClass !== "ordinary";
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
const directCredential = operation.riskClass === "credential" && operation.confirmation === "never" && operation.authentication === "oauth" && operation.redactedPaths.includes("body.values");
|
|
60
|
+
if (!directCredential && elevatedRisk !== (operation.confirmation === "input_required")) {
|
|
61
|
+
diagnostics.push({ code: "confirmation_policy_invalid", path: `${path}.confirmation`, message: "Elevated-risk operations require input_required unless authenticated credential input is explicitly redacted; ordinary operations must not." });
|
|
61
62
|
}
|
|
62
63
|
if (operation.kind === "read" && (operation.idempotency.required || operation.concurrency.required || operation.receipt)) {
|
|
63
64
|
diagnostics.push({ code: "read_mutation_contract_invalid", path, message: "Read operations cannot require mutation idempotency, write concurrency, or mutation receipts." });
|