@deeplake/hivemind 0.7.44 → 0.7.46
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/.claude-plugin/marketplace.json +3 -3
- package/.claude-plugin/plugin.json +1 -1
- package/bundle/cli.js +3116 -208
- package/codex/bundle/capture.js +43 -0
- package/codex/bundle/commands/auth-login.js +43 -0
- package/codex/bundle/graph-pull-worker.js +1185 -0
- package/codex/bundle/pre-tool-use.js +43 -0
- package/codex/bundle/session-start-setup.js +43 -0
- package/codex/bundle/session-start.js +70 -4
- package/codex/bundle/shell/deeplake-shell.js +577 -25
- package/codex/bundle/skillify-worker.js +30 -3
- package/codex/bundle/stop.js +97 -50
- package/cursor/bundle/capture.js +97 -50
- package/cursor/bundle/commands/auth-login.js +43 -0
- package/cursor/bundle/graph-pull-worker.js +1185 -0
- package/cursor/bundle/pre-tool-use.js +43 -0
- package/cursor/bundle/session-end.js +49 -44
- package/cursor/bundle/session-start.js +66 -0
- package/cursor/bundle/shell/deeplake-shell.js +577 -25
- package/cursor/bundle/skillify-worker.js +30 -3
- package/hermes/bundle/capture.js +97 -50
- package/hermes/bundle/commands/auth-login.js +43 -0
- package/hermes/bundle/graph-pull-worker.js +1185 -0
- package/hermes/bundle/pre-tool-use.js +43 -0
- package/hermes/bundle/session-end.js +49 -44
- package/hermes/bundle/session-start.js +66 -0
- package/hermes/bundle/shell/deeplake-shell.js +577 -25
- package/hermes/bundle/skillify-worker.js +30 -3
- package/mcp/bundle/server.js +43 -0
- package/openclaw/dist/chunks/{config-XEK4MJJS.js → config-O5PDJQ7Y.js} +1 -0
- package/openclaw/dist/index.js +47 -2
- package/openclaw/dist/skillify-worker.js +30 -3
- package/openclaw/openclaw.plugin.json +1 -1
- package/openclaw/package.json +1 -1
- package/package.json +3 -1
package/codex/bundle/capture.js
CHANGED
|
@@ -98,6 +98,7 @@ function loadConfig() {
|
|
|
98
98
|
tableName: process.env.HIVEMIND_TABLE ?? "memory",
|
|
99
99
|
sessionsTableName: process.env.HIVEMIND_SESSIONS_TABLE ?? "sessions",
|
|
100
100
|
skillsTableName: process.env.HIVEMIND_SKILLS_TABLE ?? "skills",
|
|
101
|
+
codebaseTableName: process.env.HIVEMIND_CODEBASE_TABLE ?? "codebase",
|
|
101
102
|
memoryPath: process.env.HIVEMIND_MEMORY_PATH ?? join(home, ".deeplake", "memory")
|
|
102
103
|
};
|
|
103
104
|
}
|
|
@@ -215,9 +216,33 @@ function validateSchema(label, cols) {
|
|
|
215
216
|
}
|
|
216
217
|
}
|
|
217
218
|
}
|
|
219
|
+
var CODEBASE_COLUMNS = Object.freeze([
|
|
220
|
+
// Identity key (matches the PK below)
|
|
221
|
+
{ name: "org_id", sql: "TEXT NOT NULL DEFAULT ''" },
|
|
222
|
+
{ name: "workspace_id", sql: "TEXT NOT NULL DEFAULT ''" },
|
|
223
|
+
{ name: "repo_slug", sql: "TEXT NOT NULL DEFAULT ''" },
|
|
224
|
+
{ name: "user_id", sql: "TEXT NOT NULL DEFAULT ''" },
|
|
225
|
+
{ name: "worktree_id", sql: "TEXT NOT NULL DEFAULT ''" },
|
|
226
|
+
{ name: "commit_sha", sql: "TEXT NOT NULL DEFAULT ''" },
|
|
227
|
+
// Observation metadata
|
|
228
|
+
{ name: "parent_sha", sql: "TEXT NOT NULL DEFAULT ''" },
|
|
229
|
+
{ name: "branch", sql: "TEXT NOT NULL DEFAULT ''" },
|
|
230
|
+
{ name: "ts", sql: "TIMESTAMP" },
|
|
231
|
+
{ name: "pushed_by", sql: "TEXT NOT NULL DEFAULT ''" },
|
|
232
|
+
// Snapshot payload
|
|
233
|
+
{ name: "snapshot_sha256", sql: "TEXT NOT NULL DEFAULT ''" },
|
|
234
|
+
{ name: "snapshot_jsonb", sql: "TEXT NOT NULL DEFAULT ''" },
|
|
235
|
+
{ name: "node_count", sql: "BIGINT NOT NULL DEFAULT 0" },
|
|
236
|
+
{ name: "edge_count", sql: "BIGINT NOT NULL DEFAULT 0" },
|
|
237
|
+
// Generator metadata (for drift diagnostics — what hivemind version produced this?)
|
|
238
|
+
{ name: "generator", sql: "TEXT NOT NULL DEFAULT 'hivemind-graph'" },
|
|
239
|
+
{ name: "generator_version", sql: "TEXT NOT NULL DEFAULT ''" },
|
|
240
|
+
{ name: "schema_version", sql: "BIGINT NOT NULL DEFAULT 1" }
|
|
241
|
+
]);
|
|
218
242
|
validateSchema("MEMORY_COLUMNS", MEMORY_COLUMNS);
|
|
219
243
|
validateSchema("SESSIONS_COLUMNS", SESSIONS_COLUMNS);
|
|
220
244
|
validateSchema("SKILLS_COLUMNS", SKILLS_COLUMNS);
|
|
245
|
+
validateSchema("CODEBASE_COLUMNS", CODEBASE_COLUMNS);
|
|
221
246
|
function buildCreateTableSql(tableName, cols) {
|
|
222
247
|
const safe = sqlIdent(tableName);
|
|
223
248
|
const colSql = cols.map((c) => `${c.name} ${c.sql}`).join(", ");
|
|
@@ -782,6 +807,24 @@ var DeeplakeApi = class {
|
|
|
782
807
|
* This sidesteps the Deeplake UPDATE-coalescing quirk that bit the wiki
|
|
783
808
|
* worker.
|
|
784
809
|
*/
|
|
810
|
+
/**
|
|
811
|
+
* Create the codebase table. One row per (org, workspace, repo, user,
|
|
812
|
+
* worktree, commit) — see CODEBASE_COLUMNS for the schema. Healing
|
|
813
|
+
* + index follow the same pattern as ensureSessionsTable.
|
|
814
|
+
*/
|
|
815
|
+
async ensureCodebaseTable(name) {
|
|
816
|
+
const safe = sqlIdent(name);
|
|
817
|
+
const tables = await this.listTables();
|
|
818
|
+
if (!tables.includes(safe)) {
|
|
819
|
+
log3(`table "${safe}" not found, creating`);
|
|
820
|
+
await this.createTableWithRetry(buildCreateTableSql(safe, CODEBASE_COLUMNS), safe);
|
|
821
|
+
log3(`table "${safe}" created`);
|
|
822
|
+
if (!tables.includes(safe))
|
|
823
|
+
this._tablesCache = [...tables, safe];
|
|
824
|
+
}
|
|
825
|
+
await this.healSchema(safe, CODEBASE_COLUMNS);
|
|
826
|
+
await this.ensureLookupIndex(safe, "codebase_identity", `("org_id", "workspace_id", "repo_slug", "user_id", "worktree_id", "commit_sha")`);
|
|
827
|
+
}
|
|
785
828
|
async ensureSkillsTable(name) {
|
|
786
829
|
const safe = sqlIdent(name);
|
|
787
830
|
const tables = await this.listTables();
|
|
@@ -384,6 +384,7 @@ function loadConfig() {
|
|
|
384
384
|
tableName: process.env.HIVEMIND_TABLE ?? "memory",
|
|
385
385
|
sessionsTableName: process.env.HIVEMIND_SESSIONS_TABLE ?? "sessions",
|
|
386
386
|
skillsTableName: process.env.HIVEMIND_SKILLS_TABLE ?? "skills",
|
|
387
|
+
codebaseTableName: process.env.HIVEMIND_CODEBASE_TABLE ?? "codebase",
|
|
387
388
|
memoryPath: process.env.HIVEMIND_MEMORY_PATH ?? join3(home, ".deeplake", "memory")
|
|
388
389
|
};
|
|
389
390
|
}
|
|
@@ -489,9 +490,33 @@ function validateSchema(label, cols) {
|
|
|
489
490
|
}
|
|
490
491
|
}
|
|
491
492
|
}
|
|
493
|
+
var CODEBASE_COLUMNS = Object.freeze([
|
|
494
|
+
// Identity key (matches the PK below)
|
|
495
|
+
{ name: "org_id", sql: "TEXT NOT NULL DEFAULT ''" },
|
|
496
|
+
{ name: "workspace_id", sql: "TEXT NOT NULL DEFAULT ''" },
|
|
497
|
+
{ name: "repo_slug", sql: "TEXT NOT NULL DEFAULT ''" },
|
|
498
|
+
{ name: "user_id", sql: "TEXT NOT NULL DEFAULT ''" },
|
|
499
|
+
{ name: "worktree_id", sql: "TEXT NOT NULL DEFAULT ''" },
|
|
500
|
+
{ name: "commit_sha", sql: "TEXT NOT NULL DEFAULT ''" },
|
|
501
|
+
// Observation metadata
|
|
502
|
+
{ name: "parent_sha", sql: "TEXT NOT NULL DEFAULT ''" },
|
|
503
|
+
{ name: "branch", sql: "TEXT NOT NULL DEFAULT ''" },
|
|
504
|
+
{ name: "ts", sql: "TIMESTAMP" },
|
|
505
|
+
{ name: "pushed_by", sql: "TEXT NOT NULL DEFAULT ''" },
|
|
506
|
+
// Snapshot payload
|
|
507
|
+
{ name: "snapshot_sha256", sql: "TEXT NOT NULL DEFAULT ''" },
|
|
508
|
+
{ name: "snapshot_jsonb", sql: "TEXT NOT NULL DEFAULT ''" },
|
|
509
|
+
{ name: "node_count", sql: "BIGINT NOT NULL DEFAULT 0" },
|
|
510
|
+
{ name: "edge_count", sql: "BIGINT NOT NULL DEFAULT 0" },
|
|
511
|
+
// Generator metadata (for drift diagnostics — what hivemind version produced this?)
|
|
512
|
+
{ name: "generator", sql: "TEXT NOT NULL DEFAULT 'hivemind-graph'" },
|
|
513
|
+
{ name: "generator_version", sql: "TEXT NOT NULL DEFAULT ''" },
|
|
514
|
+
{ name: "schema_version", sql: "BIGINT NOT NULL DEFAULT 1" }
|
|
515
|
+
]);
|
|
492
516
|
validateSchema("MEMORY_COLUMNS", MEMORY_COLUMNS);
|
|
493
517
|
validateSchema("SESSIONS_COLUMNS", SESSIONS_COLUMNS);
|
|
494
518
|
validateSchema("SKILLS_COLUMNS", SKILLS_COLUMNS);
|
|
519
|
+
validateSchema("CODEBASE_COLUMNS", CODEBASE_COLUMNS);
|
|
495
520
|
function buildCreateTableSql(tableName, cols) {
|
|
496
521
|
const safe = sqlIdent(tableName);
|
|
497
522
|
const colSql = cols.map((c) => `${c.name} ${c.sql}`).join(", ");
|
|
@@ -1038,6 +1063,24 @@ var DeeplakeApi = class {
|
|
|
1038
1063
|
* This sidesteps the Deeplake UPDATE-coalescing quirk that bit the wiki
|
|
1039
1064
|
* worker.
|
|
1040
1065
|
*/
|
|
1066
|
+
/**
|
|
1067
|
+
* Create the codebase table. One row per (org, workspace, repo, user,
|
|
1068
|
+
* worktree, commit) — see CODEBASE_COLUMNS for the schema. Healing
|
|
1069
|
+
* + index follow the same pattern as ensureSessionsTable.
|
|
1070
|
+
*/
|
|
1071
|
+
async ensureCodebaseTable(name) {
|
|
1072
|
+
const safe = sqlIdent(name);
|
|
1073
|
+
const tables = await this.listTables();
|
|
1074
|
+
if (!tables.includes(safe)) {
|
|
1075
|
+
log3(`table "${safe}" not found, creating`);
|
|
1076
|
+
await this.createTableWithRetry(buildCreateTableSql(safe, CODEBASE_COLUMNS), safe);
|
|
1077
|
+
log3(`table "${safe}" created`);
|
|
1078
|
+
if (!tables.includes(safe))
|
|
1079
|
+
this._tablesCache = [...tables, safe];
|
|
1080
|
+
}
|
|
1081
|
+
await this.healSchema(safe, CODEBASE_COLUMNS);
|
|
1082
|
+
await this.ensureLookupIndex(safe, "codebase_identity", `("org_id", "workspace_id", "repo_slug", "user_id", "worktree_id", "commit_sha")`);
|
|
1083
|
+
}
|
|
1041
1084
|
async ensureSkillsTable(name) {
|
|
1042
1085
|
const safe = sqlIdent(name);
|
|
1043
1086
|
const tables = await this.listTables();
|