synomem 0.3.0 → 0.5.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 (91) hide show
  1. package/CHANGELOG.md +82 -1
  2. package/README.md +54 -14
  3. package/dist/backend.d.ts.map +1 -1
  4. package/dist/backend.js +8 -2
  5. package/dist/backend.js.map +1 -1
  6. package/dist/cli.d.ts +9 -0
  7. package/dist/cli.d.ts.map +1 -1
  8. package/dist/cli.js +451 -24
  9. package/dist/cli.js.map +1 -1
  10. package/dist/client.d.ts +34 -2
  11. package/dist/client.d.ts.map +1 -1
  12. package/dist/client.js +162 -11
  13. package/dist/client.js.map +1 -1
  14. package/dist/cloud.d.ts +16 -0
  15. package/dist/cloud.d.ts.map +1 -0
  16. package/dist/cloud.js +19 -0
  17. package/dist/cloud.js.map +1 -0
  18. package/dist/config.d.ts.map +1 -1
  19. package/dist/config.js +8 -1
  20. package/dist/config.js.map +1 -1
  21. package/dist/configure.d.ts +55 -0
  22. package/dist/configure.d.ts.map +1 -0
  23. package/dist/configure.js +193 -0
  24. package/dist/configure.js.map +1 -0
  25. package/dist/credentials.d.ts +15 -2
  26. package/dist/credentials.d.ts.map +1 -1
  27. package/dist/credentials.js +9 -1
  28. package/dist/credentials.js.map +1 -1
  29. package/dist/discover.d.ts +48 -0
  30. package/dist/discover.d.ts.map +1 -0
  31. package/dist/discover.js +106 -0
  32. package/dist/discover.js.map +1 -0
  33. package/dist/import.d.ts +58 -43
  34. package/dist/import.d.ts.map +1 -1
  35. package/dist/index.d.ts +4 -1
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +2 -0
  38. package/dist/index.js.map +1 -1
  39. package/dist/mcp/index.d.ts.map +1 -1
  40. package/dist/mcp/index.js +15 -6
  41. package/dist/mcp/index.js.map +1 -1
  42. package/dist/oauth.d.ts.map +1 -1
  43. package/dist/oauth.js +8 -1
  44. package/dist/oauth.js.map +1 -1
  45. package/dist/projections.d.ts.map +1 -1
  46. package/dist/projections.js +19 -11
  47. package/dist/projections.js.map +1 -1
  48. package/dist/prompt.d.ts +28 -0
  49. package/dist/prompt.d.ts.map +1 -0
  50. package/dist/prompt.js +72 -0
  51. package/dist/prompt.js.map +1 -0
  52. package/dist/remote.d.ts +4 -0
  53. package/dist/remote.d.ts.map +1 -1
  54. package/dist/remote.js +4 -0
  55. package/dist/remote.js.map +1 -1
  56. package/dist/schemas.d.ts +101 -60
  57. package/dist/schemas.d.ts.map +1 -1
  58. package/dist/schemas.js +57 -5
  59. package/dist/schemas.js.map +1 -1
  60. package/dist/service.d.ts +6 -1
  61. package/dist/service.d.ts.map +1 -1
  62. package/dist/storage.d.ts +19 -1
  63. package/dist/storage.d.ts.map +1 -1
  64. package/dist/storage.js +61 -14
  65. package/dist/storage.js.map +1 -1
  66. package/dist/types.d.ts +50 -2
  67. package/dist/types.d.ts.map +1 -1
  68. package/docs/cli.md +68 -4
  69. package/docs/examples.md +1 -1
  70. package/docs/mcp.md +1 -1
  71. package/docs/skill.md +1 -1
  72. package/docs/storage-format.md +1 -1
  73. package/package.json +8 -8
  74. package/src/backend.ts +8 -2
  75. package/src/cli.ts +597 -31
  76. package/src/client.ts +176 -12
  77. package/src/cloud.ts +19 -0
  78. package/src/config.ts +8 -1
  79. package/src/configure.ts +249 -0
  80. package/src/credentials.ts +26 -3
  81. package/src/discover.ts +155 -0
  82. package/src/index.ts +9 -1
  83. package/src/mcp/index.ts +19 -5
  84. package/src/oauth.ts +8 -1
  85. package/src/projections.ts +21 -11
  86. package/src/prompt.ts +88 -0
  87. package/src/remote.ts +24 -0
  88. package/src/schemas.ts +60 -5
  89. package/src/service.ts +12 -0
  90. package/src/storage.ts +79 -13
  91. package/src/types.ts +45 -2
package/CHANGELOG.md CHANGED
@@ -3,7 +3,88 @@
3
3
  All notable changes will be documented here. The format follows
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and releases follow Semantic Versioning.
5
5
 
6
- ## [Unreleased]
6
+ ## [0.5.0] - 2026-09-07
7
+
8
+ ### Added
9
+
10
+ - **`synomem backend status`** — connects to the selected backend and reports
11
+ what answered. `backend show` still reads the configuration file and connects
12
+ to nothing; a person debugging a broken setup needs that, and a person
13
+ confirming a working one needs a connection to have been made.
14
+ - **`synomem projection status`** — whether the generated files match the
15
+ canonical events, when they were last rebuilt, and which ones drifted. The
16
+ comparison is against Synomem's own manifest, so a file somebody added to the
17
+ projection tree by hand is not reported as drift.
18
+ - **`synomem remote workspaces`** — the organizations and workspaces a
19
+ credential can reach, with the IDs `backend use remote --workspace` takes.
20
+ - `agent runtime list` with no agent named lists every agent that runs
21
+ anywhere. Requiring the agent meant already knowing the answer to the
22
+ question being asked.
23
+
24
+ ### Changed
25
+
26
+ - **Remote setup no longer asks for a workspace ID.** An installation access
27
+ key is bound to exactly one workspace, so the service is asked which one
28
+ rather than the person; `config init --backend remote --access-token-stdin`
29
+ needs no `--workspace`. Typing `ws-04psqx2rkt8ttft7a1t2z69r97` from memory
30
+ was never something a person could do.
31
+ - The Windows credential-store choice is the restricted file rather than
32
+ Credential Manager, which the credential layer does not implement. Offering a
33
+ store that cannot read its own credential back fails on first use, after
34
+ setup has already claimed the credential was safe.
35
+
36
+ ### Fixed
37
+
38
+ - `doctor` reported every workspace's projections as stale once any agent had a
39
+ generated ID: the expected-path list was built from canonical IDs while the
40
+ files, the manifest and the cleanup all used handles.
41
+ - `doctor`'s agent-directory symbolic-link check inspected a path built from the
42
+ canonical ID, so it examined a directory that does not exist and passed on a
43
+ workspace whose agent directory really had been replaced with a link.
44
+
45
+ ## [0.4.0] - 2026-09-07
46
+
47
+ Published as 0.3.0 and 0.4.0 on the same day; the entries below cover both.
48
+
49
+ ### Changed
50
+
51
+ - **Agents have an opaque canonical ID and a separate handle.** `agent create
52
+ <handle>` generates a ULID; the handle is what people type and can be renamed
53
+ with `agent rename` without orphaning the events written under the old name.
54
+ Events, rosters and statistics key on the canonical ID.
55
+ - The home IS the storage directory. It was `<home>/synomem`, which produced
56
+ `~/.synomem/synomem` once the home moved — a path the layout rules out.
57
+ - The default home is `~/.synomem`. There is no detection of or migration from
58
+ `~/.agents`, per the greenfield policy.
59
+ - Projection directories are named by handle, since they exist to be read.
60
+
61
+ ### Added
62
+
63
+ - **`synomem config`** — the onboarding wizard, with `configure` and `setup` as
64
+ aliases. It refuses to run without a terminal and names the deterministic
65
+ flags instead of blocking forever on a pipe.
66
+ - **`synomem config init`** — the non-interactive equivalent, including
67
+ `--access-token-stdin` so an installation key is never passed as an argument
68
+ where the shell history and process list would keep it.
69
+ - **`synomem config show`** — reports where a credential comes from, never the
70
+ credential.
71
+ - **`synomem reset`** — lists every exact target before removing anything.
72
+ Installed skills and MCP registrations are left alone unless
73
+ `--integrations` is passed.
74
+ - Synomem Cloud is implicit: `backend use remote` needs only `--workspace`.
75
+ `--url` remains for private deployments and stays out of the public docs.
76
+ - A discriminated credential model, so an installation key is no longer treated
77
+ as a refreshable OAuth credential.
78
+ - `agent rename`, `agent archive`, `agent restore`, and `agent alias add` /
79
+ `alias remove`, which add and remove aliases without replacing the set.
80
+ - The MCP server reports the canonical actor rather than the requested name, so
81
+ a misconfigured runtime cannot appear to act as somebody it is not.
82
+
83
+ ### Schema
84
+
85
+ - Version 7 adds `agents.handle` (backfilled from the ID, uniquely indexed) and
86
+ `agents.status`. Existing agents keep their name-shaped ID; only new agents
87
+ get a generated one.
7
88
 
8
89
  ### Added
9
90
 
package/README.md CHANGED
@@ -14,20 +14,24 @@
14
14
 
15
15
  [CLI reference](docs/cli.md) · [MCP guide](docs/mcp.md) · [Storage](docs/storage-format.md) · [Security](SECURITY.md)
16
16
 
17
- The experimental remote client supports explicit backend configuration. `synomem backend use remote
18
- --url <https-origin> --workspace <id>` makes the CLI and stdio MCP use the versioned domain API with
19
- actor-scoped OAuth credentials; it does not synchronize local history or create a shadow SQLite
20
- database. Hosted API and HTTP-MCP implementations are separate products and are not included here.
21
- See the [CLI reference](docs/cli.md#backend-and-authentication).
17
+ Synomem runs two ways, and the CLI, the library and the MCP server behave identically on both.
18
+ **Local** keeps an append-only SQLite database on this machine, needs no account, and opens no
19
+ network listener. **Synomem Cloud** keeps canonical state in a hosted workspace shared across
20
+ machines and agents, with organizations, roles and administration. `synomem config` sets up either
21
+ one. Nothing is synchronized between them and choosing the hosted backend never creates a shadow
22
+ local database. See the [CLI reference](docs/cli.md#backend-and-authentication).
22
23
 
23
24
  </div>
24
25
 
25
- Synomem gives humans and AI agents four durable ways to coordinate beyond a disappearing chat:
26
+ Synomem gives humans and AI agents durable ways to coordinate beyond a disappearing chat:
26
27
 
27
28
  - **Kudos** recognize a concrete contribution.
28
29
  - **Memos** deliver a message to another agent or to one's future self.
29
30
  - **Notes** retain agent-owned, revisable knowledge.
30
- - **Todos** track assigned actions with optional date-only or timezone-aware deadlines.
31
+ - **Posts** announce something to everyone in the workspace, and record who has acknowledged it.
32
+ - **Tasks** delegate work to another agent, with their consent.
33
+ - **Todos** track an agent's own actions, private to them, with optional date-only or
34
+ timezone-aware deadlines.
31
35
 
32
36
  ## Core philosophy
33
37
 
@@ -38,9 +42,11 @@ collaboration through one auditable protocol. V1 provides that substrate locally
38
42
  designed so the same agent identities and semantics can later cross machines through an explicitly
39
43
  configured service.
40
44
 
41
- One append-only SQLite event store powers the TypeScript library, `synomem` CLI, actor-bound stdio
42
- MCP server, compact change feeds, and readable Markdown projections. V1 runs entirely on one machine
43
- and opens no network listener.
45
+ One append-only event store powers the TypeScript library, `synomem` CLI, actor-bound stdio MCP
46
+ server, compact change feeds, and readable Markdown projections. On the local backend that store is
47
+ SQLite on this machine, and nothing listens on the network. On Synomem Cloud it is a hosted
48
+ Postgres workspace reached over HTTPS with actor-scoped credentials. Events are never rewritten on
49
+ either one.
44
50
 
45
51
  > [!IMPORTANT]
46
52
  > Synomem is pre-1.0 software. Review the release notes before upgrading persisted storage or public
@@ -50,8 +56,35 @@ and opens no network listener.
50
56
 
51
57
  ```bash
52
58
  npm install --global synomem
59
+ synomem config # asks where state should live, then sets it up
60
+ ```
61
+
62
+ `synomem config` is interactive. Its deterministic equivalents, for a machine with no terminal:
63
+
64
+ ```bash
65
+ # Local: SQLite on this machine, no account.
66
+ synomem config init --backend local --yes
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.
72
+ printf '%s' "$SYNOMEM_KEY" | synomem config init \
73
+ --backend remote --auth access-key --access-token-stdin --yes
74
+ ```
75
+
76
+ Check either one at any time:
53
77
 
54
- export SYNOMEM_HOME="$(mktemp -d)/.agents"
78
+ ```bash
79
+ synomem backend status # connects, and reports what answered
80
+ synomem projection status # local only: are the generated files current?
81
+ synomem doctor
82
+ ```
83
+
84
+ Everything below works the same on both backends.
85
+
86
+ ```bash
87
+ export SYNOMEM_HOME="$(mktemp -d)/.synomem"
55
88
  synomem init
56
89
  synomem agent create codex --name "Codex"
57
90
  synomem agent create gracie --name "Gracie"
@@ -78,8 +111,15 @@ synomem task accept <task-id> --as codex --response "Starting after the tests."
78
111
  # A todo is private to the agent that wrote it; nobody else can assign one.
79
112
  synomem todo create --as codex --title "Re-read the migration notes"
80
113
 
114
+ # A post is readable by everyone in the workspace, and tracks acknowledgement.
115
+ synomem post create --as gracie \
116
+ --title "Migration tonight" --body "Expect a short read-only window."
117
+ synomem post acknowledge <post-id> --as codex --note "Already handled."
118
+ synomem post roster <post-id>
119
+
81
120
  synomem agent resolve Mike
82
121
  synomem agent directory
122
+ synomem agent runtime list
83
123
  synomem list
84
124
  ```
85
125
 
@@ -93,12 +133,12 @@ terminal-capable agent. The Synomem package contains the portable
93
133
  installer for the six named local harnesses.
94
134
 
95
135
  ```text
96
- Set up Synomem for this agent and runtime. Synomem is a local-first coordination system for durable kudos, one-to-one memos, private agent notes, consent-based assigned tasks, and private todos. It uses an append-only SQLite database under ~/.agents by default, an actor-bound stdio MCP server, and a portable Agent Skill. Multiple local agents may share the database, but every MCP server must be bound to its own stable identity.
136
+ Set up Synomem for this agent and runtime. Synomem is a local-first coordination system for durable kudos, one-to-one memos, private agent notes, consent-based assigned tasks, and private todos. It uses an append-only SQLite database under ~/.synomem by default, an actor-bound stdio MCP server, and a portable Agent Skill. Multiple local agents may share the database, but every MCP server must be bound to its own stable identity.
97
137
 
98
138
  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.
99
139
 
100
140
  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`.
101
- 2. Preserve an existing `SYNOMEM_HOME`; otherwise use the default ~/.agents. Run `synomem init`, then `synomem doctor`. Never point tests or experiments at another Synomem home.
141
+ 2. Preserve an existing `SYNOMEM_HOME`; otherwise use the default ~/.synomem. Run `synomem init`, then `synomem doctor`. Never point tests or experiments at another Synomem home.
102
142
  3. Run `synomem agent list`. Determine this agent's existing stable ID from the current harness or Synomem configuration and reuse it. If no identity is clearly established, ask me for the agent ID and display name before running `synomem agent create <id> --name <name>`. Never silently merge or rename identities.
103
143
  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.
104
144
  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.
@@ -202,7 +242,7 @@ are `claude`, `codex`, `hermes`, `openclaw`, `cursor`, and `grok`; `grokbot` ali
202
242
  ## Storage
203
243
 
204
244
  ```text
205
- ~/.agents/
245
+ ~/.synomem/
206
246
  ├── synomem/
207
247
  │ ├── config.json
208
248
  │ └── synomem.sqlite3
@@ -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;AAYpB,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,wCAmBrC;AAED,eAAO,MAAM,wBAAwB,EAAE,qBACL,CAAC"}
package/dist/backend.js CHANGED
@@ -9,9 +9,15 @@ import { environmentCredentialProvider, RemoteSynomemService } from './remote.js
9
9
  import { credentialReference, OsCredentialStore } from './credentials.js';
10
10
  import { StoredCredentialProvider } from './oauth.js';
11
11
  function configLocation(explicitHome) {
12
+ /*
13
+ * The home IS the storage directory. It used to be `<home>/synomem`, which
14
+ * made sense while the default home was `~/.agents` and Synomem was one
15
+ * tenant inside it. Now that the home is `~/.synomem`, that nesting produces
16
+ * `~/.synomem/synomem` — a path the layout explicitly rules out, and one that
17
+ * makes every documented path wrong by a level.
18
+ */
12
19
  const home = resolveHome(explicitHome);
13
- const storageDirectory = join(home, 'synomem');
14
- return { home, storageDirectory, configPath: join(storageDirectory, 'config.json') };
20
+ return { home, storageDirectory: home, configPath: join(home, 'config.json') };
15
21
  }
16
22
  export function readSynomemConfig(explicitHome, env = process.env) {
17
23
  const { home, storageDirectory, configPath } = configLocation(explicitHome);
@@ -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,O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CAAC,OAAO,CAAC;IACvF,IAAI,OAAO,CAAC,IAAI,KAAK,OAAO;QAAE,OAAO,IAAI,aAAa,CAAC,OAAO,CAAC,CAAC;IAChE,MAAM,aAAa,GAAkB,OAAO,CAAC,KAAK,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC;IAC1F,OAAO,IAAI,oBAAoB,CAAC;QAC9B,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,aAAa;QACb,kBAAkB,EAAE,GAAG,CAAC,oBAAoB;YAC1C,CAAC,CAAC,6BAA6B,CAAC,GAAG,CAAC;YACpC,CAAC,CAAC,IAAI,wBAAwB,CAC1B,mBAAmB,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,WAAW,EAAE,aAAa,CAAC,EACxE,IAAI,iBAAiB,EAAE,EACvB,GAAG,CACJ;QACL,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACtD,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,MAAM,wBAAwB,GAA0B,CAAC,OAAO,EAAE,EAAE,CACzE,uBAAuB,CAAC,OAAO,CAAC,CAAC"}
package/dist/cli.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { Command } from 'commander';
3
+ import { type PromptIo } from './prompt.js';
3
4
  import { type CredentialStore } from './credentials.js';
4
5
  import { type OAuthLoginOptions } from './oauth.js';
5
6
  import { type ImportBundle, type ImportPreview, type ImportResult } from './import.js';
@@ -10,6 +11,8 @@ export interface CliIo {
10
11
  stderr: (text: string) => void;
11
12
  }
12
13
  export interface CliDependencies {
14
+ /** Injected so the wizard can be driven by a test without a terminal. */
15
+ promptIo?: PromptIo;
13
16
  credentialStore?: CredentialStore;
14
17
  oauthLogin?: (options: OAuthLoginOptions) => Promise<void>;
15
18
  env?: NodeJS.ProcessEnv;
@@ -20,6 +23,12 @@ export interface CliDependencies {
20
23
  reference: string;
21
24
  credentialStore: CredentialStore;
22
25
  }) => Promise<void>;
26
+ discoverBoundWorkspace?: (options: {
27
+ baseUrl: string;
28
+ accessToken: string;
29
+ }) => Promise<{
30
+ workspaceId: string;
31
+ }>;
23
32
  createImportBundle?: (home: string) => Promise<ImportBundle>;
24
33
  remoteImport?: (options: {
25
34
  baseUrl: string;
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,OAAO,EAA0B,MAAM,WAAW,CAAC;AAE5D,OAAO,EAA0C,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAIhG,OAAO,EAA4C,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE9F,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,YAAY,EAClB,MAAM,aAAa,CAAC;AASrB,OAAO,KAAK,EACV,aAAa,EAQd,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAkB,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAE1E,MAAM,WAAW,KAAK;IACpB,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC;AAED,MAAM,WAAW,eAAe;IAC9B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3D,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,sBAAsB,CAAC,EAAE,CAAC,OAAO,EAAE;QACjC,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,EAAE,M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