teamclaws 2.0.6 → 2.0.7

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
@@ -5,6 +5,9 @@ with a TeamClaws workspace and stores the resulting Clawgate credential on that
5
5
  computer. The command-line client and its agent skills ship together in this
6
6
  package.
7
7
 
8
+ Pairing connects this computer to the workspace. It does not add a person as a
9
+ workspace user; user membership is a separate privilege.
10
+
8
11
  ## Requirements
9
12
 
10
13
  - Node.js 22 or newer
@@ -14,6 +17,12 @@ package.
14
17
 
15
18
  ## Installation
16
19
 
20
+ Check `node --version` first. If it is below 22, upgrade Node.js to version 22
21
+ or newer before installing. npm normally treats the package engine requirement
22
+ as a warning; `npm install -g teamclaws@latest --engine-strict` rejects an
23
+ unsupported Node.js version during installation. The CLI also refuses to run on
24
+ Node.js below 22.
25
+
17
26
  Install the published CLI:
18
27
 
19
28
  ```text
package/dist/constants.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export const PACKAGE_NAME = "teamclaws";
2
- export const PACKAGE_VERSION = "2.0.6";
2
+ export const PACKAGE_VERSION = "2.0.7";
3
3
  export const CLIENT_NAME = "teamclaws-cli";
4
4
  export const CONTRACT_VERSION = 1;
5
5
  export const OUTPUT_SCHEMA_VERSION = 1;
@@ -73,7 +73,9 @@ export class OsMachineKeyProvider {
73
73
  await assertPrivateDirectory(directory);
74
74
  return directory;
75
75
  }
76
- catch {
76
+ catch (error) {
77
+ if (error instanceof TeamClawsError)
78
+ throw error;
77
79
  throw keyUnavailable();
78
80
  }
79
81
  }
@@ -158,7 +160,9 @@ export class OsMachineKeyProvider {
158
160
  dsaEncoding: "ieee-p1363",
159
161
  }).toString("base64url");
160
162
  }
161
- catch {
163
+ catch (error) {
164
+ if (error instanceof TeamClawsError)
165
+ throw error;
162
166
  throw keyUnavailable();
163
167
  }
164
168
  }
@@ -167,9 +171,11 @@ async function assertPrivateDirectory(path) {
167
171
  const info = await lstat(path);
168
172
  if (!info.isDirectory() ||
169
173
  info.isSymbolicLink() ||
170
- info.uid !== process.getuid?.() ||
171
- (info.mode & 0o777) !== 0o700)
174
+ info.uid !== process.getuid?.())
172
175
  throw keyUnavailable();
176
+ const mode = info.mode & 0o777;
177
+ if (mode !== 0o700)
178
+ throw new TeamClawsError("machine_key_unavailable", `The machine-key directory ${JSON.stringify(path)} has mode ${mode.toString(8).padStart(4, "0")}; mode 0700 is required. Run chmod 700 '${path.replaceAll("'", "'\\''")}' and retry.`, { exitCode: 9 });
173
179
  }
174
180
  async function assertPrivateFile(path) {
175
181
  const info = await lstat(path);
package/dist/startup.js CHANGED
@@ -1,6 +1,13 @@
1
1
  import { parseArguments, run } from "./app.js";
2
2
  import { checkRelease, releaseNotice } from "./update.js";
3
+ import { TeamClawsError } from "./errors.js";
4
+ import { Output } from "./output.js";
3
5
  export async function runCli(args, dependencies = {}, signal, check = checkRelease) {
6
+ if (Number(process.versions.node.split(".")[0]) < 22) {
7
+ const error = new TeamClawsError("unsupported_runtime", `TeamClaws requires Node.js 22 or newer; this runtime is ${process.versions.node}. Upgrade Node.js, then run npm install -g teamclaws@latest.`, { exitCode: 9 });
8
+ new Output(args.includes("--json"), dependencies.io?.stdout, dependencies.io?.stderr).error(error);
9
+ return error.exitCode;
10
+ }
4
11
  // No persistent cache: every executable invocation checks before dispatch.
5
12
  let releaseCheck;
6
13
  try {
package/dist/storage.js CHANGED
@@ -118,6 +118,13 @@ export class CredentialStore {
118
118
  dirname(directory),
119
119
  directory,
120
120
  ]) {
121
+ const info = await lstat(path);
122
+ if (this.platform !== "win32" &&
123
+ info.isDirectory() &&
124
+ !info.isSymbolicLink() &&
125
+ info.uid === process.getuid?.() &&
126
+ (info.mode & 0o077) !== 0)
127
+ throw conversationStorageError(`Directory ${JSON.stringify(path)} has mode ${(info.mode & 0o777).toString(8).padStart(4, "0")}; mode 0700 is required. Run chmod 700 '${path.replaceAll("'", "'\\''")}' and retry. `);
121
128
  await this.assertPrivateDirectory(path);
122
129
  }
123
130
  }
@@ -150,7 +157,10 @@ export class CredentialStore {
150
157
  }
151
158
  return records.sort((a, b) => b.updated_at.localeCompare(a.updated_at));
152
159
  }
153
- catch {
160
+ catch (error) {
161
+ if (error instanceof TeamClawsError &&
162
+ error.code === "chat_reference_storage_failed")
163
+ throw error;
154
164
  throw conversationStorageError();
155
165
  }
156
166
  }
@@ -460,6 +470,6 @@ function parseConversationReference(value, credential) {
460
470
  updated_at: value.updated_at,
461
471
  };
462
472
  }
463
- function conversationStorageError() {
464
- return new TeamClawsError("chat_reference_storage_failed", "The local conversation references could not be read or saved safely. Retain any returned session/request identifiers; do not resend the message automatically.", { exitCode: 9 });
473
+ function conversationStorageError(detail = "") {
474
+ return new TeamClawsError("chat_reference_storage_failed", `${detail}The local conversation references could not be read or saved safely. Retain any returned session/request identifiers; do not resend the message automatically.`, { exitCode: 9 });
465
475
  }
package/dist/update.js CHANGED
@@ -143,7 +143,9 @@ export async function npmRunner(nodeExecutable = process.execPath, platform = pr
143
143
  return async (args, timeout, signal) => {
144
144
  const env = { ...process.env };
145
145
  for (const key of Object.keys(env)) {
146
- if (/^npm_config_/i.test(key) ||
146
+ if ((/^npm_config_/i.test(key) &&
147
+ !(args[0] === "prefix" &&
148
+ /^npm_config_(prefix|userconfig|globalconfig)$/i.test(key))) ||
147
149
  /^(NODE_OPTIONS|NODE_PATH)$/i.test(key))
148
150
  delete env[key];
149
151
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teamclaws",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
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",
@@ -16,6 +16,9 @@ pairing approval come next when they are connecting a workspace. If onboarding
16
16
  already explained the process, use a short transition into this step. Give the
17
17
  approval link with that context, never as an unexplained authorization request.
18
18
 
19
+ Pairing connects this computer to the workspace. It does not add a person as a
20
+ workspace user; user membership is a separate privilege.
21
+
19
22
  Use the official executable:
20
23
 
21
24
  ```text
@@ -37,6 +37,9 @@ or add another permission question for an already authorized step. Describe the
37
37
  separate server environment accurately; inspect an existing workspace before
38
38
  promising it is empty or that a particular isolation mechanism is configured.
39
39
 
40
+ Pairing connects this computer to the workspace. It does not add a person as a
41
+ workspace user; user membership is a separate privilege.
42
+
40
43
  ## Sign in
41
44
 
42
45
  Run `teamclaws auth status --json`. If signed in, confirm the returned account
@@ -122,6 +122,9 @@ and the selected access behavior before providing a working URL.
122
122
 
123
123
  ## Share work with other people
124
124
 
125
+ Pairing connects this computer to the workspace. It does not add a person as a
126
+ workspace user; user membership is a separate privilege.
127
+
125
128
  Distinguish inviting someone to a workspace from sharing a project's web
126
129
  address. Workspace collaboration depends on the supported TeamClaws sharing
127
130
  controls and the recipient's assigned access. A public app URL is available
@@ -11,6 +11,9 @@ For the full install-and-connect conversation, follow
11
11
  Use the official `teamclaws` executable. Do not implement pairing inside this
12
12
  skill.
13
13
 
14
+ Pairing connects this computer to the workspace. It does not add a person as a
15
+ workspace user; user membership is a separate privilege.
16
+
14
17
  ## Required boundary
15
18
 
16
19
  - If workspace discovery was performed through a model context protocol client,
@@ -20,6 +20,9 @@ carry that task through instead of restarting a generic onboarding conversation.
20
20
  Inspect the destination's instructions, available runtimes, resources, network
21
21
  access, and account permissions through the paired shell before choosing a setup.
22
22
 
23
+ Pairing connects this computer to the workspace. It does not add a person as a
24
+ workspace user; user membership is a separate privilege.
25
+
23
26
  ## Jobs, services, and external systems
24
27
 
25
28
  For a complete job, place its code and authorized inputs in a dedicated directory,