@treeseed/sdk 0.13.0-rc.32 → 0.13.0-rc.34
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.
|
@@ -12,6 +12,7 @@ const operationBindings = {
|
|
|
12
12
|
"auth login": protocol("protocol.oauth.device.login"),
|
|
13
13
|
"auth logout": protocol("protocol.oauth.revoke"),
|
|
14
14
|
"auth status": operation("accounts.current.show"),
|
|
15
|
+
"users create": protocol("protocol.accounts.create"),
|
|
15
16
|
"send": operation("communications.send", [field("path", "teamId", "context", "team", true), field("path", "channel", "argument", "channel", true), field("body", "message", "argument", "message", true), field("body", "projectId", "context", "project"), field("body", "recipients", "option", "to"), field("body", "topic", "option"), field("body", "waitSeconds", "option", "wait", false, "integer")]),
|
|
16
17
|
"secrets list": local("local.secrets.list"),
|
|
17
18
|
"secrets status": local("local.secrets.status"),
|
|
@@ -48,6 +49,7 @@ const operationBindings = {
|
|
|
48
49
|
"host recovery restore": local("local.host.recovery.restore"),
|
|
49
50
|
"host bootstrap status": local("local.host.bootstrap.status"),
|
|
50
51
|
"host bootstrap enroll": local("local.host.bootstrap.enroll"),
|
|
52
|
+
"host reset": local("local.host.reset"),
|
|
51
53
|
"agents list": operation("agents.list", [field("path", "projectId", "context", "project", true), ...page()]),
|
|
52
54
|
"agents show": operation("agents.show", [field("path", "projectId", "context", "project", true), field("path", "agentSlug", "argument", "agent", true)]),
|
|
53
55
|
"agents classes list": operation("agents.classes.list", [field("path", "projectId", "context", "project", true)]),
|
|
@@ -124,12 +126,32 @@ function configurationAdopt() {
|
|
|
124
126
|
value.options = [...value.options ?? [], { name: "--confirm", description: "Confirm replacement of the installed configuration identity.", type: "boolean" }];
|
|
125
127
|
return value;
|
|
126
128
|
}
|
|
129
|
+
function hostReset() {
|
|
130
|
+
const value = leaf("reset", "mutation", void 0, "irreversible");
|
|
131
|
+
if (value.nodeType !== "leaf") throw new Error("Host reset must be a leaf command.");
|
|
132
|
+
value.description = "Stop managed components, erase their state, and reconcile a fresh unseeded platform.";
|
|
133
|
+
value.options = [...value.options ?? [], { name: "--confirm", description: "Confirm deletion of all manager-owned component data and receipts.", type: "boolean" }];
|
|
134
|
+
return value;
|
|
135
|
+
}
|
|
136
|
+
function userCreate() {
|
|
137
|
+
const value = leaf("create", "mutation", void 0, "credential");
|
|
138
|
+
if (value.nodeType !== "leaf") throw new Error("User creation must be a leaf command.");
|
|
139
|
+
value.description = "Create a local TreeSeed user with a securely prompted password.";
|
|
140
|
+
value.options = [
|
|
141
|
+
...value.options ?? [],
|
|
142
|
+
{ name: "--email", description: "Email address for the new user.", type: "string" },
|
|
143
|
+
{ name: "--username", description: "Unique username for the new user.", type: "string" },
|
|
144
|
+
{ name: "--display-name", description: "Human-readable display name.", type: "string" }
|
|
145
|
+
];
|
|
146
|
+
return value;
|
|
147
|
+
}
|
|
127
148
|
const commandTree = {
|
|
128
149
|
schemaVersion: "treeseed.command-tree/v1",
|
|
129
150
|
executable: "trsd",
|
|
130
151
|
commands: [
|
|
131
152
|
{ nodeType: "leaf", segment: "send", description: "Send a message to project agents through a team discussion channel.", kind: "mutation", arguments: [{ name: "channel", description: "Team discussion channel.", required: true }, { name: "message", description: "Markdown message to send.", required: true }], options: [planOption, { name: "--team", description: "Team identity or slug.", type: "string" }, { name: "--project", description: "Default project for unqualified agent names.", type: "string" }, { name: "--to", description: "Agent target; use project/agent when names may be ambiguous.", type: "string[]" }, { name: "--topic", description: "Optional discussion topic.", type: "string" }, { name: "--wait", description: "Seconds to wait for durable responses.", type: "number", defaultValue: 0 }], authorization: { capability: "agents.execute", confirmation: "never" }, resultSchemaId: "treeseed.communication-send-receipt/v1", execution: unavailable() },
|
|
132
153
|
branch("auth", [leaf("login", "mutation", void 0, "credential"), leaf("logout", "mutation"), leaf("status")]),
|
|
154
|
+
branch("users", [userCreate()]),
|
|
133
155
|
branch("secrets", [leaf("list"), leaf("status"), leaf("unlock", "mutation", void 0, "credential"), leaf("lock", "mutation"), leaf("rotate", "mutation", void 0, "credential")]),
|
|
134
156
|
branch("host", [
|
|
135
157
|
leaf("status"),
|
|
@@ -147,7 +169,8 @@ const commandTree = {
|
|
|
147
169
|
branch("component", [leaf("list"), leaf("status", "read", "component"), leaf("enable", "mutation", "component", "authority"), leaf("disable", "mutation", "component", "destructive")]),
|
|
148
170
|
branch("aliases", [leaf("list")]),
|
|
149
171
|
branch("recovery", [leaf("status"), leaf("retry", "mutation", void 0, "authority"), leaf("restore", "mutation", "generation", "destructive")]),
|
|
150
|
-
branch("bootstrap", [leaf("status"), leaf("enroll", "mutation", void 0, "credential")])
|
|
172
|
+
branch("bootstrap", [leaf("status"), leaf("enroll", "mutation", void 0, "credential")]),
|
|
173
|
+
hostReset()
|
|
151
174
|
]),
|
|
152
175
|
branch("agents", [
|
|
153
176
|
leaf("list"),
|