teamclaws 2.0.11 → 2.0.12

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/README.md CHANGED
@@ -91,7 +91,7 @@ Existing event names and schema version remain unchanged. The
91
91
  `login_browser_required` event provides the safe `url`, a `label` of
92
92
  `Sign in to TeamClaws`, and `account_guidance`. Display these immediately while
93
93
  login keeps running. Signed-out `auth_status` includes the non-executing
94
- `login_command: "teamclaws login --json"`; status never starts device authorization.
94
+ `login_command: "teamclaws login <email> --json"`; status never starts device authorization.
95
95
 
96
96
  When approval is pending, `pairing_browser_required` supplies the safe approval
97
97
  URL and public `user_code`. Automatic pairing emits no browser approval event.
@@ -192,7 +192,6 @@ a crash after that claim may consume it before it is displayed.
192
192
  ## Commands
193
193
 
194
194
  ```text
195
- npx teamclaws login
196
195
  npx teamclaws login <email>
197
196
  npx teamclaws auth status
198
197
  npx teamclaws logout
@@ -213,7 +212,8 @@ newline-delimited JSON event stream intended for automation.
213
212
 
214
213
  Pairing (including explicit targets), server listing, pair status, chat, and shell
215
214
  require a saved TeamClaws CLI authorization and its local machine key. Run
216
- `teamclaws login` first. Login uses the browser approval to bind a new key to
215
+ `teamclaws login <email>` first. Email is required; agents must ask for the user's TeamClaws email if it has not
216
+ been provided before starting login. Login uses the browser approval to bind a new key to
217
217
  your TeamClaws account; the CLI discards the temporary OAuth tokens. Later
218
218
  commands sign fresh proofs without repeating browser approval. Missing or
219
219
  revoked authorization exits with code 3 in both human and JSON modes. Help,
package/dist/app.js CHANGED
@@ -279,7 +279,7 @@ export function parseArguments(arguments_) {
279
279
  return { action: "update", json };
280
280
  if (args[0] === "login") {
281
281
  if (args.length === 1)
282
- return { action: "login", json };
282
+ throw new TeamClawsError("invalid_command", "Ask the user for their TeamClaws email address, then run teamclaws login <email>.", { exitCode: 2 });
283
283
  if (args.length === 2 && !args[1].startsWith("-")) {
284
284
  return { action: "login", json, email: args[1] };
285
285
  }
@@ -552,5 +552,5 @@ function usageError() {
552
552
  });
553
553
  }
554
554
  export function helpText() {
555
- return `TeamClaws ${PACKAGE_VERSION}\n\nUsage:\n teamclaws update [--json]\n teamclaws shell <target> --command <text> [--json]\n teamclaws users add <target> <email> --role <user|staff|superuser> [--sudo] [--json]\n teamclaws users list <target> [--json]\n teamclaws login [email] [--json]\n teamclaws auth status [--json]\n teamclaws logout [--revoke] [--json]\n teamclaws servers list [--json]\n teamclaws servers update <server-id> [--name <text>] [--description <text>] [--json]\n teamclaws pair status <server-identifier-or-canonical-workspace-address> [--json]\n teamclaws pair [server-identifier-or-canonical-workspace-address] [--no-open] [--json]\n teamclaws chat list <target> [--json]\n teamclaws chat history <target> [--json]\n teamclaws chat messages <target> --chat-id <uuid> [--after-message-id <n>] [--json]\n teamclaws chat capabilities <target> [--json]\n teamclaws chat start <target> --message <text> [selection options] [--json]\n teamclaws chat send <target> --session-id <uuid> --message <text> [--json]\n teamclaws chat watch <target> --session-id <uuid> --request-id <uuid> [resume cursors] [--json]\n\nPair status performs one bounded direct verification and stops. Pairing grants the standard host-issued credential. Chat commands use that credential directly against the selected workspace.\n`;
555
+ return `TeamClaws ${PACKAGE_VERSION}\n\nUsage:\n teamclaws update [--json]\n teamclaws shell <target> --command <text> [--json]\n teamclaws users add <target> <email> --role <user|staff|superuser> [--sudo] [--json]\n teamclaws users list <target> [--json]\n teamclaws login <email> [--json]\n teamclaws auth status [--json]\n teamclaws logout [--revoke] [--json]\n teamclaws servers list [--json]\n teamclaws servers update <server-id> [--name <text>] [--description <text>] [--json]\n teamclaws pair status <server-identifier-or-canonical-workspace-address> [--json]\n teamclaws pair [server-identifier-or-canonical-workspace-address] [--no-open] [--json]\n teamclaws chat list <target> [--json]\n teamclaws chat history <target> [--json]\n teamclaws chat messages <target> --chat-id <uuid> [--after-message-id <n>] [--json]\n teamclaws chat capabilities <target> [--json]\n teamclaws chat start <target> --message <text> [selection options] [--json]\n teamclaws chat send <target> --session-id <uuid> --message <text> [--json]\n teamclaws chat watch <target> --session-id <uuid> --request-id <uuid> [resume cursors] [--json]\n\nPair status performs one bounded direct verification and stops. Pairing grants the standard host-issued credential. Chat commands use that credential directly against the selected workspace.\n`;
556
556
  }
package/dist/auth.js CHANGED
@@ -27,7 +27,7 @@ export class AuthService {
27
27
  options.machineKeys ?? new OsMachineKeyProvider(this.store.root);
28
28
  }
29
29
  async login(email, signal) {
30
- const boundEmail = email === undefined ? undefined : parseLoginEmail(email);
30
+ const boundEmail = parseLoginEmail(email);
31
31
  const machineKey = await this.machineKeys.create();
32
32
  const pending = await this.startDevice(boundEmail, machineKey, signal);
33
33
  this.output.loginBrowser(pending.verification_uri_complete);
@@ -96,8 +96,7 @@ export class AuthService {
96
96
  scope: "basic",
97
97
  machine_jwk: JSON.stringify(machineKey.public_jwk),
98
98
  });
99
- if (email)
100
- form.set("email", email);
99
+ form.set("email", email);
101
100
  const response = await requestJson(this.fetcher, OAUTH_DEVICE_AUTHORIZATION_URL, {
102
101
  method: "POST",
103
102
  form,
@@ -165,7 +164,7 @@ export class AuthService {
165
164
  ...(signal ? { signal } : {}),
166
165
  });
167
166
  if (response.status === 401) {
168
- throw new TeamClawsError("invalid_authentication", "The TeamClaws CLI authorization is inactive. Run `teamclaws login` to authorize this computer again.", {
167
+ throw new TeamClawsError("invalid_authentication", "The TeamClaws CLI authorization is inactive. Run `teamclaws login <email>` to authorize this computer again.", {
169
168
  exitCode: 3,
170
169
  });
171
170
  }
@@ -273,7 +272,7 @@ function oauthError(status, body) {
273
272
  code = error === "invalid_grant" ? "invalid_authentication" : error;
274
273
  }
275
274
  const message = error === "invalid_grant"
276
- ? "The TeamClaws login is no longer valid. Run `teamclaws login` to authenticate."
275
+ ? "The TeamClaws login is no longer valid. Run `teamclaws login <email>` to authenticate."
277
276
  : "TeamClaws rejected the login request.";
278
277
  return new TeamClawsError(code, message, {
279
278
  retryable: status >= 500,
package/dist/broker.js CHANGED
@@ -23,7 +23,7 @@ export class BrokerClient {
23
23
  ...(signal ? { signal } : {}),
24
24
  });
25
25
  if (response.status === 401) {
26
- throw new TeamClawsError("invalid_authentication", "The TeamClaws CLI authorization is inactive. Run `teamclaws login` to authorize this computer again.", {
26
+ throw new TeamClawsError("invalid_authentication", "The TeamClaws CLI authorization is inactive. Run `teamclaws login <email>` to authorize this computer again.", {
27
27
  exitCode: 3,
28
28
  });
29
29
  }
package/dist/constants.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export const PACKAGE_NAME = "teamclaws";
2
- export const PACKAGE_VERSION = "2.0.11";
2
+ export const PACKAGE_VERSION = "2.0.12";
3
3
  export const CLIENT_NAME = "teamclaws-cli";
4
4
  export const CONTRACT_VERSION = 1;
5
5
  export const OUTPUT_SCHEMA_VERSION = 1;
package/dist/output.js CHANGED
@@ -59,7 +59,7 @@ export class Output {
59
59
  status,
60
60
  };
61
61
  if (status === "signed_out")
62
- event.login_command = "teamclaws login --json";
62
+ event.login_command = "teamclaws login <email> --json";
63
63
  if (user)
64
64
  event.user = user;
65
65
  if (expiresAt)
@@ -68,7 +68,7 @@ export class Output {
68
68
  if (!this.json) {
69
69
  this.stdout.write(status === "signed_in" && user
70
70
  ? `Signed in as ${user.display_name} (${user.email}).\n`
71
- : "Not signed in to TeamClaws. Run `teamclaws login` to sign in.\n");
71
+ : "Not signed in to TeamClaws. Run `teamclaws login <email>` to sign in.\n");
72
72
  }
73
73
  }
74
74
  logoutComplete(remoteConfirmed) {
@@ -19,7 +19,7 @@ export class TargetAuthorization {
19
19
  async requireGrant() {
20
20
  const grant = await this.store.readAuthorization();
21
21
  if (!grant)
22
- throw new TeamClawsError("login_required", "Approve this CLI at TeamClaws with `teamclaws login` before using a workspace.", { exitCode: 3 });
22
+ throw new TeamClawsError("login_required", "Approve this CLI at TeamClaws with `teamclaws login <email>` before using a workspace.", { exitCode: 3 });
23
23
  return grant;
24
24
  }
25
25
  async accountHeadersFor(method, url) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teamclaws",
3
- "version": "2.0.11",
3
+ "version": "2.0.12",
4
4
  "description": "Official TeamClaws command-line client and agent skills",
5
5
  "license": "PolyForm-Shield-1.0.0",
6
6
  "homepage": "https://teamclaws.com",
@@ -135,7 +135,7 @@ invent a new idempotency key to hide uncertainty about whether a turn exists.
135
135
  ## Failure handling
136
136
 
137
137
  - `login_required` or `invalid_authentication` (exit 3): tell the user to run
138
- `teamclaws login` and stop; retain the existing workspace pairing.
138
+ `teamclaws login <email>` and stop; retain the existing workspace pairing.
139
139
  - `re_pair_required`: direct the user to TCChat Pair & Transfer.
140
140
  - `selection_unavailable`: use the advertised recommendation unless the user
141
141
  asks for another valid selection.
@@ -23,7 +23,6 @@ workspace user; user membership is a separate privilege.
23
23
  Use the official executable:
24
24
 
25
25
  ```text
26
- npx teamclaws login --json
27
26
  npx teamclaws login owner@example.com --json
28
27
  npx teamclaws auth status --json
29
28
  npx teamclaws logout --json
@@ -41,8 +40,11 @@ wakeup that preserves the process; report a limitation if neither is possible.
41
40
  Confirm the returned account after `login_complete` and exit 0, then immediately
42
41
  resume the authorized onboarding or pairing task. Denial, expiry, cancellation,
43
42
  and failure end the attempt; report the result without automatically restarting.
44
- Start without an email unless the user supplies one. Optional email is a bind
45
- sent to TeamClaws, not identity asserted by this process. Never transfer a
43
+ An email address is required. If the user has not provided their TeamClaws email,
44
+ ask for it and wait for their answer before starting login. Do not guess it from
45
+ their AI assistant account or invent an address. Pass the supplied email to
46
+ `teamclaws login <email> --json`. The email binds approval to that account; it is
47
+ not identity asserted by this process. Never transfer a
46
48
  model or harness token into this process. The client stores an authorization ID
47
49
  and protected local signing key; temporary OAuth tokens are discarded.
48
50
 
@@ -46,8 +46,9 @@ workspace user; user membership is a separate privilege.
46
46
 
47
47
  Run `teamclaws auth status --json`. If signed in, confirm the returned account
48
48
  and continue without another login. If signed out, follow
49
- [teamclaws-login](../teamclaws-login/SKILL.md): start `teamclaws login --json`
50
- without an email unless the user explicitly supplied one. Immediately show the
49
+ [teamclaws-login](../teamclaws-login/SKILL.md): ask for the user's TeamClaws email
50
+ if they have not provided it, wait for their answer, then start
51
+ `teamclaws login <email> --json` with that address. Immediately show the
51
52
  returned `login_browser_required.url` as **Sign in to TeamClaws** in chat and
52
53
  explain:
53
54