@treeseed/sdk 0.13.0-rc.35 → 0.13.0-rc.37

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.
@@ -151,14 +151,24 @@ function hostReset() {
151
151
  return value;
152
152
  }
153
153
  function userCreate() {
154
- const value = leaf("create", "mutation", void 0, "credential");
154
+ const value = leaf("create", "mutation");
155
155
  if (value.nodeType !== "leaf") throw new Error("User creation must be a leaf command.");
156
156
  value.description = "Create a local TreeSeed user with a securely prompted password.";
157
157
  value.options = [
158
158
  ...value.options ?? [],
159
159
  { name: "--email", description: "Email address for the new user.", type: "string" },
160
160
  { name: "--username", description: "Unique username for the new user.", type: "string" },
161
- { name: "--display-name", description: "Human-readable display name.", type: "string" }
161
+ { name: "--display-name", description: "Human-readable display name.", type: "string" },
162
+ { name: "--timeout", description: "Maximum seconds to wait for registration.", type: "number" }
163
+ ];
164
+ return value;
165
+ }
166
+ function authLogin() {
167
+ const value = leaf("login", "mutation");
168
+ if (value.nodeType !== "leaf") throw new Error("Authentication login must be a leaf command.");
169
+ value.options = [
170
+ ...value.options ?? [],
171
+ { name: "--timeout", description: "Maximum seconds to wait for device authorization.", type: "number" }
162
172
  ];
163
173
  return value;
164
174
  }
@@ -183,7 +193,7 @@ const commandTree = {
183
193
  executable: "trsd",
184
194
  commands: [
185
195
  { 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() },
186
- branch("auth", [leaf("login", "mutation", void 0, "credential"), leaf("logout", "mutation"), leaf("status")]),
196
+ branch("auth", [authLogin(), leaf("logout", "mutation"), leaf("status")]),
187
197
  branch("users", [userCreate()]),
188
198
  branch("secrets", [leaf("list"), leaf("status"), leaf("unlock", "mutation", void 0, "credential"), leaf("lock", "mutation"), leaf("rotate", "mutation", void 0, "credential")]),
189
199
  branch("host", [
@@ -115,7 +115,7 @@ const CONTROL_PLANE_OPERATIONS = {
115
115
  surfaces: ["rest", "cli", "mcp_tool"],
116
116
  cacheScope: "principal",
117
117
  pagination: "cursor"
118
- }, { path: empty, query: z.object({ teamId: z.string().min(1).optional(), limit: z.number().int().positive().max(200).optional(), cursor: z.string().min(1).optional() }).strict(), body: none, output: payload }),
118
+ }, { path: empty, query: z.object({ teamId: z.string().min(1).optional(), limit: z.coerce.number().int().positive().max(200).optional(), cursor: z.string().min(1).optional() }).strict(), body: none, output: payload }),
119
119
  show: resource("projects.show", "GET", "/v1/projects/{projectId}", { projectId: z.string().min(1) }, { capability: "projects.read", surfaces: ["rest", "cli", "mcp_tool", "mcp_resource"] }),
120
120
  create: resource("projects.create", "POST", "/v1/teams/{teamId}/projects", { teamId: z.string().min(1) }, { capability: "projects.write", surfaces: ["rest", "cli", "mcp_tool"] }),
121
121
  update: resource("projects.update", "PUT", "/v1/projects/{projectId}", { projectId: z.string().min(1) }, { capability: "projects.write", surfaces: ["rest", "cli", "mcp_tool"], concurrency: true }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@treeseed/sdk",
3
- "version": "0.13.0-rc.35",
3
+ "version": "0.13.0-rc.37",
4
4
  "description": "Portable TreeSeed contracts, standards, and typed remote control-plane clients.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {