@todoforai/tfa-memory 0.4.0 → 0.4.1

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.
Files changed (2) hide show
  1. package/dist/cli.js +5 -5
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -462,7 +462,7 @@ function checkForUpdates(pkg) {
462
462
  // package.json
463
463
  var package_default = {
464
464
  name: "@todoforai/tfa-memory",
465
- version: "0.4.0",
465
+ version: "0.4.1",
466
466
  description: "Zero-config TODOforAI memory CLI — add/search/ls/get/rm text memory rows addressed as source/ref, plus federated search over every message of every past TODO (read-only `todo` source), with full-text and semantic search. Reuses bridge credentials.",
467
467
  type: "module",
468
468
  bin: {
@@ -502,7 +502,7 @@ address updates in place; identical content+meta is skipped (no re-embed).
502
502
  \`search\` covers two corpora at once: rows you saved, plus every message of
503
503
  every TODO under the read-only \`todo\` source (\`todo/<todoId>:<messageId>\`,
504
504
  live from the backend index, nothing separate to sync). \`--source todo\` searches
505
- past TODOs only; \`get todo/<todoId>:<messageId>\` prints the whole message.
505
+ past TODO messages only; \`get todo/<todoId>:<messageId>\` prints the whole message.
506
506
 
507
507
  Usage:
508
508
  tfa-memory <command> [options] [args...]
@@ -589,9 +589,9 @@ async function api(ctx, method, path2, body) {
589
589
  }
590
590
  return res.status === 204 ? null : await res.json();
591
591
  }
592
- function printRows(rows, json, snippet = 120) {
592
+ function printRows(rows, json, snippet = 200) {
593
593
  if (json)
594
- return console.log(JSON.stringify(rows, null, 2));
594
+ return console.log(JSON.stringify(rows.map(({ source: _s, ref: _r, ...row }) => row), null, process.stdout.isTTY ? 2 : 0));
595
595
  if (!rows.length)
596
596
  return console.log("(no results)");
597
597
  for (const r of rows) {
@@ -695,7 +695,7 @@ async function main() {
695
695
  const res = await api(ctx, "GET", `/memory/search${qs({ query, semantic: values.semantic ? true : undefined, sources, limit, todoId: values.todo })}`);
696
696
  for (const w of res.warnings ?? [])
697
697
  console.error(`Warning: ${w}`);
698
- printRows(res.rows, json, 200);
698
+ printRows(res.rows, json);
699
699
  break;
700
700
  }
701
701
  case "ls": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@todoforai/tfa-memory",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Zero-config TODOforAI memory CLI — add/search/ls/get/rm text memory rows addressed as source/ref, plus federated search over every message of every past TODO (read-only `todo` source), with full-text and semantic search. Reuses bridge credentials.",
5
5
  "type": "module",
6
6
  "bin": {