@camox/cli 0.17.0 → 0.17.3

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.
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import { c as verifySession } from "./api-r9caclu6.mjs";
3
+ export { verifySession };
@@ -9,9 +9,13 @@ function authHeaders(token) {
9
9
  "Content-Type": "application/json"
10
10
  };
11
11
  }
12
- function createRpcClient(token, apiUrl = CAMOX_API_URL, environmentName) {
13
- const headers = { Authorization: `Bearer ${token}` };
12
+ function createRpcClient(token, apiUrl = CAMOX_API_URL, environmentName, disableTelemetry) {
13
+ const headers = {
14
+ Authorization: `Bearer ${token}`,
15
+ "x-camox-client": "cli"
16
+ };
14
17
  if (environmentName) headers["x-environment-name"] = environmentName;
18
+ if (disableTelemetry) headers["x-camox-telemetry-disabled"] = "1";
15
19
  return createORPCClient(new RPCLink({
16
20
  url: `${apiUrl}/rpc`,
17
21
  headers
@@ -68,7 +72,7 @@ async function getProjectBySlug(token, slug, apiUrl) {
68
72
  return createRpcClient(token, apiUrl).projects.getBySlug({ slug });
69
73
  }
70
74
  async function callTool(params) {
71
- return await createRpcClient(params.token, params.apiUrl, params.environmentName).agent.callTool({
75
+ return await createRpcClient(params.token, params.apiUrl, params.environmentName, params.disableTelemetry).agent.callTool({
72
76
  projectId: params.projectId,
73
77
  name: params.name,
74
78
  arguments: params.args
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as getProjectBySlug, i as createProject, n as checkSlugAvailability, o as listOrganizations, r as createOrganization, s as setActiveOrganization, t as callTool } from "./api-Bgstxixw.mjs";
2
+ import { a as getProjectBySlug, i as createProject, n as checkSlugAvailability, o as listOrganizations, r as createOrganization, s as setActiveOrganization, t as callTool } from "./api-r9caclu6.mjs";
3
3
  import { object, or } from "@optique/core/constructs";
4
4
  import { message } from "@optique/core/message";
5
5
  import { defineProgram } from "@optique/core/program";
@@ -173,7 +173,7 @@ async function authenticateUser() {
173
173
  async function getOrAuthenticate() {
174
174
  const stored = readAuthToken();
175
175
  if (stored) {
176
- const { verifySession } = await import("./api-DoFRj7vC.mjs");
176
+ const { verifySession } = await import("./api-DYSlqn5b.mjs");
177
177
  if (await verifySession(stored.token)) {
178
178
  p.log.info(`Authenticated as ${stored.name}`);
179
179
  return stored;
@@ -238,7 +238,8 @@ const runtimeSchema = z.object({
238
238
  projectSlug: z.string().min(1),
239
239
  apiUrl: z.string().url(),
240
240
  authenticationUrl: z.string().url(),
241
- environmentName: z.string().min(1)
241
+ environmentName: z.string().min(1),
242
+ disableTelemetry: z.boolean().optional().default(false)
242
243
  });
243
244
  const SIDECAR = path.join("node_modules", ".camox", "runtime.json");
244
245
  var RuntimeNotFoundError = class extends Error {
@@ -351,7 +352,8 @@ async function dispatch(opts) {
351
352
  environmentName,
352
353
  projectId,
353
354
  name: opts.toolName,
354
- args: compact(opts.args)
355
+ args: compact(opts.args),
356
+ disableTelemetry: runtime.disableTelemetry
355
357
  });
356
358
  if (!response.ok) {
357
359
  printError(response.error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camox/cli",
3
- "version": "0.17.0",
3
+ "version": "0.17.3",
4
4
  "bin": {
5
5
  "camox": "./dist/index.mjs"
6
6
  },
@@ -26,7 +26,7 @@
26
26
  "@types/node": "^24.12.2",
27
27
  "@typescript/native-preview": "7.0.0-dev.20260412.1",
28
28
  "vite-plus": "latest",
29
- "@camox/api-contract": "0.17.0"
29
+ "@camox/api-contract": "0.17.3"
30
30
  },
31
31
  "nx": {
32
32
  "tags": [
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- import { c as verifySession } from "./api-Bgstxixw.mjs";
3
- export { verifySession };