hippo-memory 1.12.4 → 1.12.5
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/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +84 -1
- package/dist/cli.js.map +1 -1
- package/dist/connectors/slack/workspaces.d.ts +48 -0
- package/dist/connectors/slack/workspaces.d.ts.map +1 -0
- package/dist/connectors/slack/workspaces.js +60 -0
- package/dist/connectors/slack/workspaces.js.map +1 -0
- package/dist/src/cli.js +84 -1
- package/dist/src/cli.js.map +1 -1
- package/dist/src/connectors/slack/workspaces.js +60 -0
- package/dist/src/connectors/slack/workspaces.js.map +1 -0
- package/dist/src/version.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/extensions/openclaw-plugin/openclaw.plugin.json +1 -1
- package/extensions/openclaw-plugin/package.json +1 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAwBH,OAAO,EASL,WAAW,EAGZ,MAAM,aAAa,CAAC;AAiGrB,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAwBH,OAAO,EASL,WAAW,EAGZ,MAAM,aAAa,CAAC;AAiGrB,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AA27DhC;;;GAGG;AACH,oHAAoH;AACpH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CA2C/D;AA4tCD,oHAAoH;AACpH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,KAAK,CAAC;IAAE,KAAK,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAC,EACtF,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,MAAkB,GAC1B,IAAI,CA6BN"}
|
package/dist/cli.js
CHANGED
|
@@ -70,6 +70,7 @@ import { computeAmbientState, renderAmbientSummary } from './ambient.js';
|
|
|
70
70
|
import { listDlq, replayDlqEntry } from './connectors/slack/dlq.js';
|
|
71
71
|
import { backfillChannel } from './connectors/slack/backfill.js';
|
|
72
72
|
import { slackHistoryFetcher } from './connectors/slack/web-client.js';
|
|
73
|
+
import { addWorkspace as addSlackWorkspace, listWorkspaces as listSlackWorkspaces, removeWorkspace as removeSlackWorkspace, } from './connectors/slack/workspaces.js';
|
|
73
74
|
import { cmdGithub } from './connectors/github/cli-impl.js';
|
|
74
75
|
// ---------------------------------------------------------------------------
|
|
75
76
|
// Helpers
|
|
@@ -4567,6 +4568,71 @@ function cmdSlackDlqReplay(hippoRoot, args, flags) {
|
|
|
4567
4568
|
}
|
|
4568
4569
|
console.log(`replay ok: status=${result.status} memory_id=${result.memoryId ?? '(none)'} retry_count=${result.retryCount}`);
|
|
4569
4570
|
}
|
|
4571
|
+
function printSlackWorkspacesUsage() {
|
|
4572
|
+
console.log('hippo slack workspaces <add|list|remove> [options]');
|
|
4573
|
+
console.log(' add --team <T> --tenant <t> Register a workspace (upserts on existing team-id)');
|
|
4574
|
+
console.log(' list List all registered workspaces');
|
|
4575
|
+
console.log(' remove --team <T> Remove a workspace registration');
|
|
4576
|
+
}
|
|
4577
|
+
function cmdSlackWorkspacesAdd(hippoRoot, flags) {
|
|
4578
|
+
if (flags['help']) {
|
|
4579
|
+
printSlackWorkspacesUsage();
|
|
4580
|
+
return;
|
|
4581
|
+
}
|
|
4582
|
+
const teamId = typeof flags['team'] === 'string' ? flags['team'].trim() : '';
|
|
4583
|
+
const tenantId = typeof flags['tenant'] === 'string' ? flags['tenant'].trim() : '';
|
|
4584
|
+
if (!teamId || !tenantId) {
|
|
4585
|
+
console.error('Usage: hippo slack workspaces add --team <T> --tenant <t>');
|
|
4586
|
+
process.exit(1);
|
|
4587
|
+
}
|
|
4588
|
+
const db = openHippoDb(hippoRoot);
|
|
4589
|
+
try {
|
|
4590
|
+
const ws = addSlackWorkspace(db, { teamId, tenantId });
|
|
4591
|
+
console.log(`added: ${ws.teamId} -> ${ws.tenantId} (${ws.addedAt})`);
|
|
4592
|
+
}
|
|
4593
|
+
finally {
|
|
4594
|
+
closeHippoDb(db);
|
|
4595
|
+
}
|
|
4596
|
+
}
|
|
4597
|
+
function cmdSlackWorkspacesList(hippoRoot) {
|
|
4598
|
+
const db = openHippoDb(hippoRoot);
|
|
4599
|
+
try {
|
|
4600
|
+
const items = listSlackWorkspaces(db);
|
|
4601
|
+
if (items.length === 0) {
|
|
4602
|
+
console.log('(no registered workspaces; routing via HIPPO_TENANT fallback)');
|
|
4603
|
+
return;
|
|
4604
|
+
}
|
|
4605
|
+
for (const ws of items) {
|
|
4606
|
+
console.log(`${ws.teamId}\t${ws.tenantId}\t${ws.addedAt}`);
|
|
4607
|
+
}
|
|
4608
|
+
}
|
|
4609
|
+
finally {
|
|
4610
|
+
closeHippoDb(db);
|
|
4611
|
+
}
|
|
4612
|
+
}
|
|
4613
|
+
function cmdSlackWorkspacesRemove(hippoRoot, flags) {
|
|
4614
|
+
if (flags['help']) {
|
|
4615
|
+
printSlackWorkspacesUsage();
|
|
4616
|
+
return;
|
|
4617
|
+
}
|
|
4618
|
+
const teamId = typeof flags['team'] === 'string' ? flags['team'].trim() : '';
|
|
4619
|
+
if (!teamId) {
|
|
4620
|
+
console.error('Usage: hippo slack workspaces remove --team <T>');
|
|
4621
|
+
process.exit(1);
|
|
4622
|
+
}
|
|
4623
|
+
const db = openHippoDb(hippoRoot);
|
|
4624
|
+
try {
|
|
4625
|
+
const removed = removeSlackWorkspace(db, teamId);
|
|
4626
|
+
if (!removed) {
|
|
4627
|
+
console.error(`no workspace registered for team ${teamId}`);
|
|
4628
|
+
process.exit(1);
|
|
4629
|
+
}
|
|
4630
|
+
console.log(`removed: ${teamId}`);
|
|
4631
|
+
}
|
|
4632
|
+
finally {
|
|
4633
|
+
closeHippoDb(db);
|
|
4634
|
+
}
|
|
4635
|
+
}
|
|
4570
4636
|
function cmdSlack(hippoRoot, args, flags) {
|
|
4571
4637
|
const sub = args[0];
|
|
4572
4638
|
if (sub === 'backfill') {
|
|
@@ -4581,7 +4647,24 @@ function cmdSlack(hippoRoot, args, flags) {
|
|
|
4581
4647
|
cmdSlackDlqReplay(hippoRoot, args, flags);
|
|
4582
4648
|
return;
|
|
4583
4649
|
}
|
|
4584
|
-
|
|
4650
|
+
if (sub === 'workspaces') {
|
|
4651
|
+
const action = args[1];
|
|
4652
|
+
if (action === 'add') {
|
|
4653
|
+
cmdSlackWorkspacesAdd(hippoRoot, flags);
|
|
4654
|
+
return;
|
|
4655
|
+
}
|
|
4656
|
+
if (action === 'list') {
|
|
4657
|
+
cmdSlackWorkspacesList(hippoRoot);
|
|
4658
|
+
return;
|
|
4659
|
+
}
|
|
4660
|
+
if (action === 'remove') {
|
|
4661
|
+
cmdSlackWorkspacesRemove(hippoRoot, flags);
|
|
4662
|
+
return;
|
|
4663
|
+
}
|
|
4664
|
+
printSlackWorkspacesUsage();
|
|
4665
|
+
process.exit(1);
|
|
4666
|
+
}
|
|
4667
|
+
console.error('Usage: hippo slack <backfill|dlq list|dlq replay <id> [--force]|workspaces add|workspaces list|workspaces remove> [...]');
|
|
4585
4668
|
process.exit(1);
|
|
4586
4669
|
}
|
|
4587
4670
|
function printUsage() {
|