@codetelemetry/connect 0.3.0 → 0.3.2
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 +1 -1
- package/dist/cli.js +1 -1
- package/dist/workspaces.d.ts +1 -1
- package/dist/workspaces.js +7 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ privacy, client setup and service removal.
|
|
|
13
13
|
|
|
14
14
|
## Organization projects
|
|
15
15
|
|
|
16
|
-
Use `npx -y @codetelemetry/connect@0.3.
|
|
16
|
+
Use `npx -y @codetelemetry/connect@0.3.2 join --organization-id tm_example --client codex --project .`
|
|
17
17
|
from the project you choose, or use `--client claude`. Approve the displayed existing
|
|
18
18
|
organization and follow the saved workspace's launch instructions. New connections
|
|
19
19
|
capture prompts and supported tool content; `--no-enrich` opts out on new setup.
|
package/dist/cli.js
CHANGED
|
@@ -463,7 +463,7 @@ export async function run(argv) {
|
|
|
463
463
|
result.previewSessions.forEach((session, i) => out(`${i + 1}. ${session.source} ${session.sessionId} · ${new Date(session.endMs).toISOString()} · ${session.events} events`));
|
|
464
464
|
if (result.remaining)
|
|
465
465
|
out(`${result.remaining} additional sessions remain; narrow --since for another preview.`);
|
|
466
|
-
out(`Import selected numbers: npx -y @codetelemetry/connect@0.3.
|
|
466
|
+
out(`Import selected numbers: npx -y @codetelemetry/connect@0.3.2 import --workspace ${flags.workspace} --select 1,2 --confirm`);
|
|
467
467
|
}
|
|
468
468
|
else
|
|
469
469
|
out(`Imported ${result.totals.sessions} sessions; ${result.remaining} remain. ${result.errors.slice(0, 3).join(" ")}`);
|
package/dist/workspaces.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { KeyScope } from "./connectivity.ts";
|
|
2
|
-
export declare const WORKSPACE_MCP_PACKAGE = "@codetelemetry/mcp@0.
|
|
2
|
+
export declare const WORKSPACE_MCP_PACKAGE = "@codetelemetry/mcp@0.7.0";
|
|
3
3
|
export declare const MAX_WORKSPACE_BYTES: number;
|
|
4
4
|
export declare const MAX_WORKSPACES = 64;
|
|
5
5
|
export type WorkspaceBinding = {
|
package/dist/workspaces.js
CHANGED
|
@@ -3,16 +3,19 @@ import os from "node:os";
|
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { createHash, randomBytes } from "node:crypto";
|
|
5
5
|
import { buildOtelSection } from "./codexConfig.js";
|
|
6
|
-
import { repositoryHookSource, quotedCommand, REPOSITORY_HOOK_FILE } from "./repositoryHook.js";
|
|
6
|
+
import { repositoryHookSource, quotedCommand, REPOSITORY_HOOK_FILE, REPOSITORY_HOOK_STATE_FILE } from "./repositoryHook.js";
|
|
7
7
|
import { looksLikeKey } from "./keys.js";
|
|
8
|
-
export const WORKSPACE_MCP_PACKAGE = "@codetelemetry/mcp@0.
|
|
8
|
+
export const WORKSPACE_MCP_PACKAGE = "@codetelemetry/mcp@0.7.0";
|
|
9
9
|
export const MAX_WORKSPACE_BYTES = 64 * 1024;
|
|
10
10
|
export const MAX_WORKSPACES = 64;
|
|
11
|
+
const isContextFile = (name) => /^[a-z][a-z0-9_-]{0,63}\.json$/.test(name) && name !== REPOSITORY_HOOK_STATE_FILE;
|
|
11
12
|
export function workspaceName(value) {
|
|
12
13
|
if (typeof value !== "string" ||
|
|
13
14
|
looksLikeKey(value) ||
|
|
14
15
|
!/^[a-z][a-z0-9_-]{0,63}$/.test(value))
|
|
15
16
|
throw new Error("Workspace name must be 1–64 lowercase letters, digits, underscores or hyphens, starting with a letter.");
|
|
17
|
+
if (`${value}.json` === REPOSITORY_HOOK_STATE_FILE)
|
|
18
|
+
throw new Error("Workspace name is reserved for repository-hook state.");
|
|
16
19
|
return value;
|
|
17
20
|
}
|
|
18
21
|
export function workspaceOrigin(value) {
|
|
@@ -334,7 +337,7 @@ export function saveWorkspace(context) {
|
|
|
334
337
|
fs.mkdirSync(workspaceHome(), { recursive: true, mode: 0o700 });
|
|
335
338
|
noLinks(workspaceHome());
|
|
336
339
|
if (!fs.existsSync(file) &&
|
|
337
|
-
workspaceEntries().filter(
|
|
340
|
+
workspaceEntries().filter(isContextFile)
|
|
338
341
|
.length >= MAX_WORKSPACES)
|
|
339
342
|
throw new Error("Workspace store is full; remove unused contexts before continuing.");
|
|
340
343
|
writeWorkspaceFile(file, checked);
|
|
@@ -350,7 +353,7 @@ export function listWorkspaces() {
|
|
|
350
353
|
const names = workspaceEntries();
|
|
351
354
|
if (names.length > MAX_WORKSPACES * 3)
|
|
352
355
|
throw new Error("Workspace store exceeds its entry bound.");
|
|
353
|
-
const files = names.filter(
|
|
356
|
+
const files = names.filter(isContextFile);
|
|
354
357
|
if (files.length > MAX_WORKSPACES)
|
|
355
358
|
throw new Error("Workspace store exceeds 64 contexts.");
|
|
356
359
|
return files
|