teamclaws 2.0.19 → 2.0.20
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 +3 -0
- package/dist/constants.js +1 -1
- package/dist/storage.js +15 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -243,6 +243,9 @@ a short-lived target proof for that bound pairing, performs at most one direct
|
|
|
243
243
|
workspace verification with a five-second timeout, reports the result, and
|
|
244
244
|
stops. It never starts pairing or loads external-chat resources.
|
|
245
245
|
|
|
246
|
+
Legacy saved pairings for other workspaces do not require the selected workspace
|
|
247
|
+
to be paired again.
|
|
248
|
+
|
|
246
249
|
After pairing, `chat start`, `chat send`, and `chat watch` use the protected
|
|
247
250
|
workspace credential directly against that exact workspace. They verify the
|
|
248
251
|
authoritative versioned handoff, resolve the workspace capability catalog, and
|
package/dist/constants.js
CHANGED
package/dist/storage.js
CHANGED
|
@@ -6,7 +6,7 @@ import { basename, dirname, join } from "node:path";
|
|
|
6
6
|
import { promisify } from "node:util";
|
|
7
7
|
import { TeamClawsError } from "./errors.js";
|
|
8
8
|
import { parseDurableAuthorization, } from "./target-authorization.js";
|
|
9
|
-
import { isObject, requireHttpsUrl, requireInteger, normalizeUuid, parseLoginCredential, parseStatusWorkspaceCredential, parseWorkspaceCredential, } from "./validation.js";
|
|
9
|
+
import { canonicalWorkspaceOrigin, isObject, requireHttpsUrl, requireInteger, normalizeUuid, parseLoginCredential, parseStatusWorkspaceCredential, parseWorkspaceCredential, } from "./validation.js";
|
|
10
10
|
const execFile = promisify(execFileCallback);
|
|
11
11
|
const SYSTEM_SID = "S-1-5-18";
|
|
12
12
|
const MAX_WORKSPACE_CREDENTIAL_FILES = 256;
|
|
@@ -86,7 +86,20 @@ export class CredentialStore {
|
|
|
86
86
|
for (const name of names.sort()) {
|
|
87
87
|
if (!UUID_CREDENTIAL_NAME.test(name))
|
|
88
88
|
continue;
|
|
89
|
-
const
|
|
89
|
+
const serverId = name.slice(0, -5);
|
|
90
|
+
const value = await this.readJsonIfPresent(this.workspacePath(serverId));
|
|
91
|
+
if (isObject(value) && value.version === 1) {
|
|
92
|
+
try {
|
|
93
|
+
if (canonicalWorkspaceOrigin(value.origin) !== origin)
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
catch {
|
|
97
|
+
// Preserve the legacy error below when its origin cannot be identified.
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
const credential = value === undefined
|
|
101
|
+
? undefined
|
|
102
|
+
: parseStatusWorkspaceCredential(value, serverId);
|
|
90
103
|
if (credential?.origin === origin)
|
|
91
104
|
matches.push(credential);
|
|
92
105
|
}
|