@membank/cli 0.10.2 → 0.11.0

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/index.mjs +22 -2
  2. package/package.json +4 -4
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { cancel, confirm, intro, isCancel, multiselect, note, outro } from "@clack/prompts";
3
3
  import { DatabaseManager, EmbeddingService, MIGRATIONS, MemoryRepository, MemoryTypeSchema, MemoryTypeSchema as MemoryTypeSchema$1, PIN_BUDGET_THRESHOLD, ProjectRepository, QueryEngine, SessionContextBuilder, SynthesisRepository, TagsJsonSchema as TagsRowSchema, resolveProject, runScopeToProjectsMigration } from "@membank/core";
4
- import { startServer } from "@membank/mcp";
4
+ import { runSynthesis, startServer } from "@membank/mcp";
5
5
  import chalk from "chalk";
6
6
  import { Command } from "commander";
7
7
  import ora from "ora";
@@ -438,6 +438,16 @@ async function statsCommand(formatter) {
438
438
  function hasSynthesesTable(db) {
439
439
  return db.db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='syntheses'").get() !== void 0;
440
440
  }
441
+ async function synthesizeRunCommand(opts, formatter) {
442
+ const scope = opts.scope ?? "global";
443
+ if (!formatter.isJson) process.stdout.write(`Running synthesis for scope: ${scope}\n`);
444
+ const content = await runSynthesis(scope);
445
+ if (formatter.isJson) process.stdout.write(`${JSON.stringify({
446
+ scope,
447
+ content
448
+ })}\n`);
449
+ else process.stdout.write(`\nSynthesis complete for scope: ${scope}\n\n${content}\n\n`);
450
+ }
441
451
  function synthesizeShowCommand(opts, formatter) {
442
452
  const db = DatabaseManager.open();
443
453
  try {
@@ -1794,7 +1804,17 @@ configCmd.command("show").description("print the entire config as formatted JSON
1794
1804
  const globalOpts = program.opts();
1795
1805
  configShowCommand(Formatter.create(globalOpts.json === true));
1796
1806
  });
1797
- const synthesizeCmd = program.command("synthesize").description("view synthesis state");
1807
+ const synthesizeCmd = program.command("synthesize").description("view and manage synthesis");
1808
+ synthesizeCmd.command("run").description("trigger a synthesis run for a scope").option("--scope <scope>", "scope to synthesize (default: global)").action(async (cmdOptions) => {
1809
+ const globalOpts = program.opts();
1810
+ const formatter = Formatter.create(globalOpts.json === true);
1811
+ try {
1812
+ await synthesizeRunCommand(cmdOptions, formatter);
1813
+ } catch (err) {
1814
+ formatter.error(err instanceof Error ? err.message : String(err));
1815
+ process.exit(2);
1816
+ }
1817
+ });
1798
1818
  synthesizeCmd.command("show").description("display current synthesis for a scope").option("--scope <scope>", "scope to show (default: global)").action((cmdOptions) => {
1799
1819
  const globalOpts = program.opts();
1800
1820
  const formatter = Formatter.create(globalOpts.json === true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@membank/cli",
3
- "version": "0.10.2",
3
+ "version": "0.11.0",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,9 +21,9 @@
21
21
  "commander": "^14.0.3",
22
22
  "ora": "^9.4.0",
23
23
  "zod": "^4.4.3",
24
- "@membank/core": "0.9.1",
25
- "@membank/dashboard": "0.5.2",
26
- "@membank/mcp": "0.11.2"
24
+ "@membank/core": "0.9.2",
25
+ "@membank/dashboard": "0.5.3",
26
+ "@membank/mcp": "0.12.0"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/node": "^25.6.0",