Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions claude-code/bundle/capture.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ function sqlStr(value) {
return value.replace(/\\/g, "\\\\").replace(/'/g, "''").replace(/\0/g, "").replace(/[\x01-\x08\x0b\x0c\x0e-\x1f\x7f]/g, "");
}

// dist/src/utils/client-header.js
var DEEPLAKE_CLIENT_HEADER = "X-Deeplake-Client";
function deeplakeClientValue() {
return `hivemind/${"0.6.48"}`;
}
function deeplakeClientHeader() {
return { [DEEPLAKE_CLIENT_HEADER]: deeplakeClientValue() };
}

// dist/src/deeplake-api.js
var log2 = (msg) => log("sdk", msg);
function summarizeSql(sql, maxLen = 220) {
Expand Down Expand Up @@ -187,7 +196,8 @@ var DeeplakeApi = class {
headers: {
Authorization: `Bearer ${this.token}`,
"Content-Type": "application/json",
"X-Activeloop-Org-Id": this.orgId
"X-Activeloop-Org-Id": this.orgId,
...deeplakeClientHeader()
},
signal,
body: JSON.stringify({ query: sql })
Expand Down Expand Up @@ -339,7 +349,8 @@ var DeeplakeApi = class {
const resp = await fetch(`${this.apiUrl}/workspaces/${this.workspaceId}/tables`, {
headers: {
Authorization: `Bearer ${this.token}`,
"X-Activeloop-Org-Id": this.orgId
"X-Activeloop-Org-Id": this.orgId,
...deeplakeClientHeader()
}
});
if (resp.ok) {
Expand Down
30 changes: 23 additions & 7 deletions claude-code/bundle/commands/auth-login.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ import { readFileSync, writeFileSync, existsSync, mkdirSync, unlinkSync } from "
import { join } from "node:path";
import { homedir } from "node:os";
import { execSync } from "node:child_process";

// dist/src/utils/client-header.js
var DEEPLAKE_CLIENT_HEADER = "X-Deeplake-Client";
function deeplakeClientValue() {
return `hivemind/${"0.6.48"}`;
}
function deeplakeClientHeader() {
return { [DEEPLAKE_CLIENT_HEADER]: deeplakeClientValue() };
}

// dist/src/commands/auth.js
var CONFIG_DIR = join(homedir(), ".deeplake");
var CREDS_PATH = join(CONFIG_DIR, "credentials.json");
var DEFAULT_API_URL = "https://api.deeplake.ai";
Expand Down Expand Up @@ -32,7 +43,8 @@ function deleteCredentials() {
async function apiGet(path, token, apiUrl, orgId) {
const headers = {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json"
"Content-Type": "application/json",
...deeplakeClientHeader()
};
if (orgId)
headers["X-Activeloop-Org-Id"] = orgId;
Expand All @@ -44,7 +56,8 @@ async function apiGet(path, token, apiUrl, orgId) {
async function apiPost(path, body, token, apiUrl, orgId) {
const headers = {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json"
"Content-Type": "application/json",
...deeplakeClientHeader()
};
if (orgId)
headers["X-Activeloop-Org-Id"] = orgId;
Expand All @@ -56,7 +69,8 @@ async function apiPost(path, body, token, apiUrl, orgId) {
async function apiDelete(path, token, apiUrl, orgId) {
const headers = {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json"
"Content-Type": "application/json",
...deeplakeClientHeader()
};
if (orgId)
headers["X-Activeloop-Org-Id"] = orgId;
Expand All @@ -67,7 +81,7 @@ async function apiDelete(path, token, apiUrl, orgId) {
async function requestDeviceCode(apiUrl = DEFAULT_API_URL) {
const resp = await fetch(`${apiUrl}/auth/device/code`, {
method: "POST",
headers: { "Content-Type": "application/json" }
headers: { "Content-Type": "application/json", ...deeplakeClientHeader() }
});
if (!resp.ok)
throw new Error(`Device flow unavailable: HTTP ${resp.status}`);
Expand All @@ -76,7 +90,7 @@ async function requestDeviceCode(apiUrl = DEFAULT_API_URL) {
async function pollForToken(deviceCode, apiUrl = DEFAULT_API_URL) {
const resp = await fetch(`${apiUrl}/auth/device/token`, {
method: "POST",
headers: { "Content-Type": "application/json" },
headers: { "Content-Type": "application/json", ...deeplakeClientHeader() },
body: JSON.stringify({ device_code: deviceCode })
});
if (resp.ok)
Expand Down Expand Up @@ -368,7 +382,8 @@ var DeeplakeApi = class {
headers: {
Authorization: `Bearer ${this.token}`,
"Content-Type": "application/json",
"X-Activeloop-Org-Id": this.orgId
"X-Activeloop-Org-Id": this.orgId,
...deeplakeClientHeader()
},
signal,
body: JSON.stringify({ query: sql })
Expand Down Expand Up @@ -520,7 +535,8 @@ var DeeplakeApi = class {
const resp = await fetch(`${this.apiUrl}/workspaces/${this.workspaceId}/tables`, {
headers: {
Authorization: `Bearer ${this.token}`,
"X-Activeloop-Org-Id": this.orgId
"X-Activeloop-Org-Id": this.orgId,
...deeplakeClientHeader()
}
});
if (resp.ok) {
Expand Down
15 changes: 13 additions & 2 deletions claude-code/bundle/pre-tool-use.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,15 @@ function sqlLike(value) {
return sqlStr(value).replace(/%/g, "\\%").replace(/_/g, "\\_");
}

// dist/src/utils/client-header.js
var DEEPLAKE_CLIENT_HEADER = "X-Deeplake-Client";
function deeplakeClientValue() {
return `hivemind/${"0.6.48"}`;
}
function deeplakeClientHeader() {
return { [DEEPLAKE_CLIENT_HEADER]: deeplakeClientValue() };
}

// dist/src/deeplake-api.js
var log2 = (msg) => log("sdk", msg);
function summarizeSql(sql, maxLen = 220) {
Expand Down Expand Up @@ -193,7 +202,8 @@ var DeeplakeApi = class {
headers: {
Authorization: `Bearer ${this.token}`,
"Content-Type": "application/json",
"X-Activeloop-Org-Id": this.orgId
"X-Activeloop-Org-Id": this.orgId,
...deeplakeClientHeader()
},
signal,
body: JSON.stringify({ query: sql })
Expand Down Expand Up @@ -345,7 +355,8 @@ var DeeplakeApi = class {
const resp = await fetch(`${this.apiUrl}/workspaces/${this.workspaceId}/tables`, {
headers: {
Authorization: `Bearer ${this.token}`,
"X-Activeloop-Org-Id": this.orgId
"X-Activeloop-Org-Id": this.orgId,
...deeplakeClientHeader()
}
});
if (resp.ok) {
Expand Down
17 changes: 15 additions & 2 deletions claude-code/bundle/session-start-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ import { readFileSync, writeFileSync, existsSync, mkdirSync, unlinkSync } from "
import { join } from "node:path";
import { homedir } from "node:os";
import { execSync } from "node:child_process";

// dist/src/utils/client-header.js
var DEEPLAKE_CLIENT_HEADER = "X-Deeplake-Client";
function deeplakeClientValue() {
return `hivemind/${"0.6.48"}`;
}
function deeplakeClientHeader() {
return { [DEEPLAKE_CLIENT_HEADER]: deeplakeClientValue() };
}

// dist/src/commands/auth.js
var CONFIG_DIR = join(homedir(), ".deeplake");
var CREDS_PATH = join(CONFIG_DIR, "credentials.json");
function loadCredentials() {
Expand Down Expand Up @@ -198,7 +209,8 @@ var DeeplakeApi = class {
headers: {
Authorization: `Bearer ${this.token}`,
"Content-Type": "application/json",
"X-Activeloop-Org-Id": this.orgId
"X-Activeloop-Org-Id": this.orgId,
...deeplakeClientHeader()
},
signal,
body: JSON.stringify({ query: sql })
Expand Down Expand Up @@ -350,7 +362,8 @@ var DeeplakeApi = class {
const resp = await fetch(`${this.apiUrl}/workspaces/${this.workspaceId}/tables`, {
headers: {
Authorization: `Bearer ${this.token}`,
"X-Activeloop-Org-Id": this.orgId
"X-Activeloop-Org-Id": this.orgId,
...deeplakeClientHeader()
}
});
if (resp.ok) {
Expand Down
17 changes: 15 additions & 2 deletions claude-code/bundle/session-start.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ import { readFileSync, writeFileSync, existsSync, mkdirSync, unlinkSync } from "
import { join } from "node:path";
import { homedir } from "node:os";
import { execSync } from "node:child_process";

// dist/src/utils/client-header.js
var DEEPLAKE_CLIENT_HEADER = "X-Deeplake-Client";
function deeplakeClientValue() {
return `hivemind/${"0.6.48"}`;
}
function deeplakeClientHeader() {
return { [DEEPLAKE_CLIENT_HEADER]: deeplakeClientValue() };
}

// dist/src/commands/auth.js
var CONFIG_DIR = join(homedir(), ".deeplake");
var CREDS_PATH = join(CONFIG_DIR, "credentials.json");
function loadCredentials() {
Expand Down Expand Up @@ -198,7 +209,8 @@ var DeeplakeApi = class {
headers: {
Authorization: `Bearer ${this.token}`,
"Content-Type": "application/json",
"X-Activeloop-Org-Id": this.orgId
"X-Activeloop-Org-Id": this.orgId,
...deeplakeClientHeader()
},
signal,
body: JSON.stringify({ query: sql })
Expand Down Expand Up @@ -350,7 +362,8 @@ var DeeplakeApi = class {
const resp = await fetch(`${this.apiUrl}/workspaces/${this.workspaceId}/tables`, {
headers: {
Authorization: `Bearer ${this.token}`,
"X-Activeloop-Org-Id": this.orgId
"X-Activeloop-Org-Id": this.orgId,
...deeplakeClientHeader()
}
});
if (resp.ok) {
Expand Down
15 changes: 13 additions & 2 deletions claude-code/bundle/shell/deeplake-shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -66779,6 +66779,15 @@ function sqlLike(value) {
return sqlStr(value).replace(/%/g, "\\%").replace(/_/g, "\\_");
}

// dist/src/utils/client-header.js
var DEEPLAKE_CLIENT_HEADER = "X-Deeplake-Client";
function deeplakeClientValue() {
return `hivemind/${"0.6.48"}`;
}
function deeplakeClientHeader() {
return { [DEEPLAKE_CLIENT_HEADER]: deeplakeClientValue() };
}

// dist/src/deeplake-api.js
var log2 = (msg) => log("sdk", msg);
function summarizeSql(sql, maxLen = 220) {
Expand Down Expand Up @@ -66890,7 +66899,8 @@ var DeeplakeApi = class {
headers: {
Authorization: `Bearer ${this.token}`,
"Content-Type": "application/json",
"X-Activeloop-Org-Id": this.orgId
"X-Activeloop-Org-Id": this.orgId,
...deeplakeClientHeader()
},
signal,
body: JSON.stringify({ query: sql })
Expand Down Expand Up @@ -67042,7 +67052,8 @@ var DeeplakeApi = class {
const resp = await fetch(`${this.apiUrl}/workspaces/${this.workspaceId}/tables`, {
headers: {
Authorization: `Bearer ${this.token}`,
"X-Activeloop-Org-Id": this.orgId
"X-Activeloop-Org-Id": this.orgId,
...deeplakeClientHeader()
}
});
if (resp.ok) {
Expand Down
12 changes: 11 additions & 1 deletion claude-code/bundle/wiki-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ function log(tag, msg) {
`);
}

// dist/src/utils/client-header.js
var DEEPLAKE_CLIENT_HEADER = "X-Deeplake-Client";
function deeplakeClientValue() {
return `hivemind/${"0.6.48"}`;
}
function deeplakeClientHeader() {
return { [DEEPLAKE_CLIENT_HEADER]: deeplakeClientValue() };
}

// dist/src/hooks/summary-state.js
import { readFileSync, writeFileSync, writeSync, mkdirSync, renameSync, existsSync, unlinkSync, openSync, closeSync } from "node:fs";
import { homedir as homedir2 } from "node:os";
Expand Down Expand Up @@ -154,7 +163,8 @@ async function query(sql, retries = 4) {
headers: {
Authorization: `Bearer ${cfg.token}`,
"Content-Type": "application/json",
"X-Activeloop-Org-Id": cfg.orgId
"X-Activeloop-Org-Id": cfg.orgId,
...deeplakeClientHeader()
},
body: JSON.stringify({ query: sql })
});
Expand Down
15 changes: 13 additions & 2 deletions codex/bundle/capture.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ function sqlStr(value) {
return value.replace(/\\/g, "\\\\").replace(/'/g, "''").replace(/\0/g, "").replace(/[\x01-\x08\x0b\x0c\x0e-\x1f\x7f]/g, "");
}

// dist/src/utils/client-header.js
var DEEPLAKE_CLIENT_HEADER = "X-Deeplake-Client";
function deeplakeClientValue() {
return `hivemind/${"0.6.48"}`;
}
function deeplakeClientHeader() {
return { [DEEPLAKE_CLIENT_HEADER]: deeplakeClientValue() };
}

// dist/src/deeplake-api.js
var log2 = (msg) => log("sdk", msg);
function summarizeSql(sql, maxLen = 220) {
Expand Down Expand Up @@ -187,7 +196,8 @@ var DeeplakeApi = class {
headers: {
Authorization: `Bearer ${this.token}`,
"Content-Type": "application/json",
"X-Activeloop-Org-Id": this.orgId
"X-Activeloop-Org-Id": this.orgId,
...deeplakeClientHeader()
},
signal,
body: JSON.stringify({ query: sql })
Expand Down Expand Up @@ -339,7 +349,8 @@ var DeeplakeApi = class {
const resp = await fetch(`${this.apiUrl}/workspaces/${this.workspaceId}/tables`, {
headers: {
Authorization: `Bearer ${this.token}`,
"X-Activeloop-Org-Id": this.orgId
"X-Activeloop-Org-Id": this.orgId,
...deeplakeClientHeader()
}
});
if (resp.ok) {
Expand Down
Loading
Loading