hippo-memory 1.12.5 → 1.12.7

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 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;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"}
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;AAm8DhC;;;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
@@ -67,6 +67,7 @@ import { multihopSearch } from './multihop.js';
67
67
  import { getReranker } from './rerankers/index.js';
68
68
  import { computeSalience } from './salience.js';
69
69
  import { computeAmbientState, renderAmbientSummary } from './ambient.js';
70
+ import { validateOwner, isStrictOwnerEnv } from './owner-validation.js';
70
71
  import { listDlq, replayDlqEntry } from './connectors/slack/dlq.js';
71
72
  import { backfillChannel } from './connectors/slack/backfill.js';
72
73
  import { slackHistoryFetcher } from './connectors/slack/web-client.js';
@@ -530,7 +531,15 @@ async function cmdRemember(hippoRoot, text, flags) {
530
531
  console.error(`(kind='raw' is reserved for ingestion connectors; kind='archived' is internal.)`);
531
532
  process.exit(1);
532
533
  }
533
- const ownerFlag = typeof flags['owner'] === 'string' ? flags['owner'] : null;
534
+ const ownerRaw = typeof flags['owner'] === 'string' ? flags['owner'] : null;
535
+ const ownerCheck = validateOwner(ownerRaw, { strict: isStrictOwnerEnv() });
536
+ if (!ownerCheck.ok) {
537
+ console.error(ownerCheck.message);
538
+ process.exit(1);
539
+ }
540
+ if (ownerCheck.message)
541
+ console.error(ownerCheck.message);
542
+ const ownerFlag = ownerCheck.value ?? null;
534
543
  const artifactRefFlag = typeof flags['artifact-ref'] === 'string' ? flags['artifact-ref'] : null;
535
544
  const scopeForEnvelope = typeof flags['scope'] === 'string' ? flags['scope'].trim() || null : null;
536
545
  // A5 stub auth: stamp tenant_id from env (HIPPO_TENANT) so recall isolation
@@ -5066,12 +5075,23 @@ async function main() {
5066
5075
  const tags = Array.isArray(tagsRaw)
5067
5076
  ? tagsRaw.map(String)
5068
5077
  : typeof tagsRaw === 'string' ? [tagsRaw] : undefined;
5078
+ // B2 v1.12.6 — validate --owner on the thin-client path too.
5079
+ // Failure on this path exits early so the user gets the same
5080
+ // validation experience whether or not a server is up.
5081
+ const thinOwnerRaw = typeof flags['owner'] === 'string' ? flags['owner'] : undefined;
5082
+ const thinOwnerCheck = validateOwner(thinOwnerRaw, { strict: isStrictOwnerEnv() });
5083
+ if (!thinOwnerCheck.ok) {
5084
+ console.error(thinOwnerCheck.message);
5085
+ process.exit(1);
5086
+ }
5087
+ if (thinOwnerCheck.message)
5088
+ console.error(thinOwnerCheck.message);
5069
5089
  const remembered = await runViaServerIfAvailable(hippoRoot, async (info, apiKey) => {
5070
5090
  const result = await client.remember(info.url, apiKey, {
5071
5091
  content: text,
5072
5092
  kind: rememberKindRaw,
5073
5093
  scope: typeof flags['scope'] === 'string' ? flags['scope'] : undefined,
5074
- owner: typeof flags['owner'] === 'string' ? flags['owner'] : undefined,
5094
+ owner: thinOwnerCheck.value,
5075
5095
  artifactRef: typeof flags['artifact-ref'] === 'string' ? flags['artifact-ref'] : undefined,
5076
5096
  tags,
5077
5097
  });