synomem 0.6.1 → 0.6.3

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/README.md CHANGED
@@ -65,10 +65,11 @@ synomem config # asks where state should live, then sets it up
65
65
  # Local: SQLite on this machine, no account.
66
66
  synomem config init --backend local --yes
67
67
 
68
- # Synomem Cloud with an installation access key from
69
- # https://portal.synomem.ai/installations. The key names its own workspace, so
70
- # there is no ID to look up -- and it is piped rather than passed as an
71
- # argument, which the shell history and the process list would both keep.
68
+ # Synomem Cloud with an access key from https://portal.synomem.ai/access-keys/new.
69
+ # It reaches every workspace your membership already lets you reach, so setup
70
+ # picks the workspace for you when there is only one, and otherwise asks for
71
+ # --workspace <id>. The key is piped rather than passed as an argument, which
72
+ # the shell history and the process list would both keep.
72
73
  printf '%s' "$SYNOMEM_KEY" | synomem config init \
73
74
  --backend remote --auth access-key --access-token-stdin --yes
74
75
  ```
@@ -140,8 +141,8 @@ Each agent has an opaque canonical ID, generated at creation and never reused, a
140
141
  Work autonomously through the safe, reversible steps below. Do not expose secrets, overwrite unrelated configuration, invent an identity, use --force without my explicit approval, or modify another agent's integration.
141
142
 
142
143
  1. Verify Node.js 22.13+ and npm are available. Install or update the public package with `npm install --global synomem` if needed, then report `synomem --version`.
143
- 2. Preserve an existing `SYNOMEM_HOME`; otherwise use the default ~/.synomem. Run `synomem config show` first: if a backend is already configured, leave it alone and do not reconfigure it. Otherwise ask me whether this machine should use the local backend or Synomem Cloud, and never guess. For local, run `synomem config init --backend local --yes`. For Synomem Cloud, ask me for an installation access key from https://portal.synomem.ai/installations and pipe it in — `printf '%s' "$KEY" | synomem config init --backend remote --auth access-key --access-token-stdin --yes` — because an argument is kept by both the shell history and the process list. The key names its own workspace, so do not ask me for a workspace ID. Then run `synomem backend status` and `synomem doctor`. Never point tests or experiments at another Synomem home.
144
- 3. Run `synomem agent list`. Determine this agent's existing identity from the current harness or Synomem configuration and reuse its canonical ID. If no identity is clearly established, ask me for the handle and display name before running `synomem agent create <handle> --name <name>`, then record the canonical ID it reports. Never silently merge or rename identities.
144
+ 2. Preserve an existing `SYNOMEM_HOME`; otherwise use the default ~/.synomem. Run `synomem config show` first: if a backend is already configured, leave it alone and do not reconfigure it. Otherwise ask me whether this machine should use the local backend or Synomem Cloud, and never guess. For local, run `synomem config init --backend local --yes`. For Synomem Cloud, ask me for an access key from https://portal.synomem.ai/access-keys/new and pipe it in — `printf '%s' "$KEY" | synomem config init --backend remote --auth access-key --access-token-stdin --yes` — because an argument is kept by both the shell history and the process list. The key reaches every workspace my membership already allows; setup picks one automatically when there is only one, and asks for `--workspace <workspace-id>` if there are several — ask me which, and re-run with it, if so. Then run `synomem backend status` and `synomem doctor`. Never point tests or experiments at another Synomem home.
145
+ 3. Run `synomem agent list`. Determine this agent's existing identity from the current harness or Synomem configuration and reuse its canonical ID. If no identity is clearly established: for a local backend, ask me for the handle and display name and run `synomem agent create <handle> --name <name>` directly, then record the canonical ID it reports. For Synomem Cloud configured with an access key, do not attempt `synomem agent create` — it always fails there (agent creation requires an administrator, which an access key never asserts on its own, regardless of my own role in the organization); ask me to create the agent in the Synomem portal instead (a workspace's Actors page → New agent) and give you its canonical ID. Never silently merge or rename identities.
145
146
  4. Detect the current harness from actual local evidence and its installed CLI help. Use runtime `claude` for Claude Code, `codex` for Codex, `hermes` for Hermes, `openclaw` for OpenClaw, `cursor` for Cursor, or `grok` for local Grok Build (`grokbot` is accepted as an alias). Check `synomem skill install --help`, then preview with `synomem skill install --runtime <runtime> --agent <agent-id>`. Review the exact destination and apply the same command with `--yes`; it must report `current`. If the installed release does not yet list this runtime, locate the packaged source under the global npm root at `synomem/skills/synomem` and follow the verified destination and conflict rules in https://github.com/Coaden/synomem/blob/main/docs/skill.md instead. Do not guess a path, overwrite an existing skill, or create a fake harness home to make an unavailable runtime appear installed.
146
147
  5. Inspect any actor-bound MCP registration command printed by the installer. Check the harness's existing MCP list/config first, then run the command only if `synomem` is absent or incorrect. Do not create duplicates. Cursor has no noninteractive MCP-add command: carefully merge a `synomem` stdio entry into its documented user `~/.cursor/mcp.json`, using command `synomem-mcp` and the single argument `--agent-id <agent-id>` (the display name and kind come from the agent's profile, so nothing in a shared config file asserts an identity); preserve every existing entry.
147
148
  6. Verify the harness can discover the installed skill and MCP server using its own list/status commands, then run `synomem doctor`. Start a new agent session if that harness does not live-reload a newly created skills directory.
@@ -1 +1 @@
1
- {"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAS5C,OAAO,EAAiC,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAGlF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EAEV,oBAAoB,EACpB,oBAAoB,EACpB,aAAa,EACd,MAAM,YAAY,CAAC;AAkBpB,wBAAgB,iBAAiB,CAC/B,YAAY,CAAC,EAAE,MAAM,EACrB,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,aAAa,GAAG,SAAS,CAQ3B;AAED,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,oBAAoB,EAC7B,YAAY,CAAC,EAAE,MAAM,GACpB,aAAa,CAef;AAED,wBAAgB,uBAAuB,CACrC,OAAO,GAAE,oBAAyB,EAClC,GAAG,GAAE,MAAM,CAAC,UAAwB,wCAmBrC;AAED,eAAO,MAAM,wBAAwB,EAAE,qBACL,CAAC"}
1
+ {"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAS5C,OAAO,EAAiC,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAGlF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EAEV,oBAAoB,EACpB,oBAAoB,EACpB,aAAa,EACd,MAAM,YAAY,CAAC;AAkBpB,wBAAgB,iBAAiB,CAC/B,YAAY,CAAC,EAAE,MAAM,EACrB,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,aAAa,GAAG,SAAS,CAQ3B;AAED,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,oBAAoB,EAC7B,YAAY,CAAC,EAAE,MAAM,GACpB,aAAa,CAef;AAED,wBAAgB,uBAAuB,CACrC,OAAO,GAAE,oBAAyB,EAClC,GAAG,GAAE,MAAM,CAAC,UAAwB,wCAqBrC;AAED,eAAO,MAAM,wBAAwB,EAAE,qBACL,CAAC"}
package/dist/backend.js CHANGED
@@ -58,7 +58,7 @@ export function createConfiguredService(options = {}, env = process.env) {
58
58
  expectedActor,
59
59
  credentialProvider: env.SYNOMEM_ACCESS_TOKEN
60
60
  ? environmentCredentialProvider(env)
61
- : new StoredCredentialProvider(credentialReference(backend.baseUrl, backend.workspaceId, expectedActor), new OsCredentialStore(), env),
61
+ : new StoredCredentialProvider(credentialReference(backend.baseUrl, backend.workspaceId, expectedActor), new OsCredentialStore(), env, fetch, resolveHome(options.home)),
62
62
  ...(options.signal ? { signal: options.signal } : {}),
63
63
  });
64
64
  }
@@ -1 +1 @@
1
- {"version":3,"file":"backend.js","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACtE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,eAAe,EACf,YAAY,GACb,MAAM,e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,CAAC,OAAO,EAAE;QACjC,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,aAAa,CAAC;QACrB,SAAS,EAAE,MAAM,CAAC;QAClB,eAAe,EAAE,eAAe,CAAC;KAClC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAKpB,2BAA2B,CAAC,EAAE,CAAC,OAAO,EAAE;QACtC,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,EAAE,MAAM,CAAC;KACrB,KAAK,OAAO,CAAC;QAAE,cAAc,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,mBAAmB,EAAE,CAAA;KAAE,CAAC,CAAC;IAC7E,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;IAC7D,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE;QACvB,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,aAAa,CAAC;QACrB,MAAM,EAAE,YAAY,CAAC;QACrB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,KAAK,OAAO,CAAC,aAAa,GAAG,YAAY,CAAC,CAAC;CAC7C;AA+QD,wBAAgB,SAAS,CACvB,EAAE,GAAE,KAAiB,EACrB,cAAc,GAAE,qBAAgD,EAChE,YAAY,GAAE,eAAoB,EAClC,IAAI,GAAE,MAAM,EAAiB,GAC5B,OAAO,CA4kFT;AAED,wBAAsB,MAAM,CAC1B,IAAI,WAAe,EACnB,EAAE,GAAE,KAAiB,EACrB,cAAc,GAAE,qBAAgD,EAChE,YAAY,GAAE,eAAoB,GACjC,OAAO,CAAC,MAAM,CAAC,CAqBjB"}
package/dist/cli.js CHANGED
@@ -404,12 +404,12 @@ export function createCli(io = defaultIo, serviceFactory = configuredServiceFact
404
404
  });
405
405
  const remoteCommand = program.command('remote').description('Administer a remote workspace');
406
406
  /*
407
- * The browser counterpart to an access key naming its own workspace.
408
- *
409
- * A signed-in account may reach several organizations, each with several
410
- * workspaces, so there is a genuine choice to make -- and no way to make it
411
- * without seeing the list. Printing the IDs alongside the names is the point:
412
- * the ID is what `backend use remote --workspace` takes.
407
+ * The browser counterpart to `discoverAccessKeyWorkspaces` same purpose,
408
+ * different credential: a signed-in account may reach several
409
+ * organizations, each with several workspaces, so there is a genuine choice
410
+ * to make, and no way to make it without seeing the list. Printing the IDs
411
+ * alongside the names is the point: the ID is what `backend use remote
412
+ * --workspace` takes.
413
413
  */
414
414
  remoteCommand
415
415
  .command('workspaces')
@@ -469,7 +469,7 @@ export function createCli(io = defaultIo, serviceFactory = configuredServiceFact
469
469
  : await (async () => {
470
470
  const credentialProvider = env.SYNOMEM_ACCESS_TOKEN
471
471
  ? { getAccessToken: async () => env.SYNOMEM_ACCESS_TOKEN }
472
- : new StoredCredentialProvider(credentialReference(backend.baseUrl, backend.workspaceId, administrator), credentialStore, env);
472
+ : new StoredCredentialProvider(credentialReference(backend.baseUrl, backend.workspaceId, administrator), credentialStore, env, fetch, resolveHome(global.home));
473
473
  const importer = new RemoteImportClient({
474
474
  baseUrl: backend.baseUrl,
475
475
  workspaceId: backend.workspaceId,
@@ -529,6 +529,10 @@ export function createCli(io = defaultIo, serviceFactory = configuredServiceFact
529
529
  * person who already knows which one they want should not be asked again.
530
530
  */
531
531
  let workspaceId = plan.workspaceId;
532
+ // Only known once discovered below — printed in the final summary rather
533
+ // than the bare ID, so "what did config just do" reads like an answer
534
+ // instead of a lookup key.
535
+ let workspaceName;
532
536
  if (plan.backend === 'remote' && !workspaceId && token) {
533
537
  const discovered = await discoverWorkspaces({ baseUrl: serviceUrl, accessToken: token });
534
538
  if (discovered.workspaces.length === 0) {
@@ -540,7 +544,7 @@ export function createCli(io = defaultIo, serviceFactory = configuredServiceFact
540
544
  }
541
545
  else if (discovered.workspaces.length === 1) {
542
546
  workspaceId = discovered.workspaces[0].id;
543
- io.stdout(`Using this key's only workspace: ${discovered.workspaces[0].displayName} (${workspaceId}).\n`);
547
+ workspaceName = discovered.workspaces[0].displayName;
544
548
  }
545
549
  else if (promptIo.interactive) {
546
550
  workspaceId = await select(promptIo, 'Which workspace should this machine use?', discovered.workspaces.map((workspace) => ({
@@ -548,6 +552,7 @@ export function createCli(io = defaultIo, serviceFactory = configuredServiceFact
548
552
  label: workspace.displayName,
549
553
  detail: workspace.id,
550
554
  })));
555
+ workspaceName = discovered.workspaces.find((w) => w.id === workspaceId)?.displayName;
551
556
  }
552
557
  else {
553
558
  throw new SynomemError('INVALID_INPUT', [
@@ -611,23 +616,58 @@ export function createCli(io = defaultIo, serviceFactory = configuredServiceFact
611
616
  // Diagnostics run before success is claimed: a configuration that cannot
612
617
  // open its own database is not a finished setup.
613
618
  const diagnostics = await withClient(home, defaultActor(env, 'system', 'cli'), (client) => client.doctor());
619
+ /*
620
+ * What to do next differs by exactly one thing: whether an agent can be
621
+ * created from here at all. An access key never carries the
622
+ * administrator authority agent creation requires (§ deliberate,
623
+ * independent of the key owner's own role) — local storage and a human
624
+ * browser sign-in both can. Telling everyone to just run `agent create`
625
+ * regardless was the CLI recommending a command guaranteed to fail for
626
+ * the single most common setup path.
627
+ */
628
+ const canCreateAgentHere = config.backend.kind === 'local' || plan.auth !== 'access-key';
629
+ const nextSteps = canCreateAgentHere
630
+ ? [
631
+ ' synomem agent create <handle> --name "<display name>"',
632
+ ' synomem skill install --runtime <claude|codex|cursor|...> --agent <agent-id>',
633
+ ]
634
+ : [
635
+ " An access key can't create an agent — that needs an administrator,",
636
+ " which a key never asserts on its own, regardless of the member's own",
637
+ " role. Create one in the Synomem portal (a workspace's Actors page →",
638
+ ' New agent), then use its ID:',
639
+ '',
640
+ ' synomem skill install --runtime <claude|codex|cursor|...> --agent <agent-id>',
641
+ ];
614
642
  output(io, global.json, {
615
643
  backend: config.backend,
616
644
  home,
617
645
  ...(credentialLocation ? { credentialSource: credentialLocation } : {}),
618
646
  ...(token ? { credential: credentialFingerprint(token) } : {}),
619
647
  healthy: diagnostics.healthy,
648
+ canCreateAgentHere,
620
649
  }, [
621
650
  '',
622
651
  'Synomem is ready.',
623
652
  '',
624
- ` Backend: ${config.backend.kind === 'local' ? 'Local SQLite' : 'Synomem Cloud'}`,
625
- ` Home: ${home}`,
653
+ ` Backend: ${config.backend.kind === 'local' ? 'Local SQLite' : 'Synomem Cloud'}`,
654
+ ` Home: ${home}`,
626
655
  ...(config.backend.kind === 'remote'
627
- ? [` Service: ${config.backend.baseUrl}`, ` Workspace: ${config.backend.workspaceId}`]
656
+ ? [
657
+ ` Service: ${config.backend.baseUrl}`,
658
+ ` Workspace: ${workspaceName ? `${workspaceName} (${config.backend.workspaceId})` : config.backend.workspaceId}`,
659
+ ]
628
660
  : []),
629
661
  ...(credentialLocation ? [` Credential: ${credentialLocation}`] : []),
630
- ` Database: ${diagnostics.healthy ? 'Healthy' : 'Needs attention — run synomem doctor'}`,
662
+ ` Database: ${diagnostics.healthy ? 'Healthy' : 'Needs attention — run synomem doctor'}`,
663
+ '',
664
+ 'Next: set up an agent for this machine.',
665
+ '',
666
+ ...nextSteps,
667
+ '',
668
+ 'Full walkthrough, including the MCP connector for each platform, and a',
669
+ 'prompt that does all of this for you:',
670
+ ' https://github.com/Coaden/synomem#let-your-agent-set-it-up',
631
671
  ].join('\n'));
632
672
  };
633
673
  configCommand.action(async (_options, command) => {
@@ -652,7 +692,7 @@ export function createCli(io = defaultIo, serviceFactory = configuredServiceFact
652
692
  .option('--credential-store <where>', 'auto, keychain, file, or environment', 'auto')
653
693
  // The token is read from stdin, never taken as an argument: an argument is
654
694
  // kept by the shell history and visible in the process list.
655
- .option('--access-token-stdin', 'read the installation access key from stdin', false)
695
+ .option('--access-token-stdin', 'read the access key from stdin', false)
656
696
  .option('--yes', 'apply without confirming', false)
657
697
  .action(async (options, command) => {
658
698
  const global = globals(command);