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.
- package/CHANGELOG.md +82 -1
- package/README.md +54 -14
- package/dist/backend.d.ts.map +1 -1
- package/dist/backend.js +8 -2
- package/dist/backend.js.map +1 -1
- package/dist/cli.d.ts +9 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +451 -24
- package/dist/cli.js.map +1 -1
- package/dist/client.d.ts +34 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +162 -11
- package/dist/client.js.map +1 -1
- package/dist/cloud.d.ts +16 -0
- package/dist/cloud.d.ts.map +1 -0
- package/dist/cloud.js +19 -0
- package/dist/cloud.js.map +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +8 -1
- package/dist/config.js.map +1 -1
- package/dist/configure.d.ts +55 -0
- package/dist/configure.d.ts.map +1 -0
- package/dist/configure.js +193 -0
- package/dist/configure.js.map +1 -0
- package/dist/credentials.d.ts +15 -2
- package/dist/credentials.d.ts.map +1 -1
- package/dist/credentials.js +9 -1
- package/dist/credentials.js.map +1 -1
- package/dist/discover.d.ts +48 -0
- package/dist/discover.d.ts.map +1 -0
- package/dist/discover.js +106 -0
- package/dist/discover.js.map +1 -0
- package/dist/import.d.ts +58 -43
- package/dist/import.d.ts.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +15 -6
- package/dist/mcp/index.js.map +1 -1
- package/dist/oauth.d.ts.map +1 -1
- package/dist/oauth.js +8 -1
- package/dist/oauth.js.map +1 -1
- package/dist/projections.d.ts.map +1 -1
- package/dist/projections.js +19 -11
- package/dist/projections.js.map +1 -1
- package/dist/prompt.d.ts +28 -0
- package/dist/prompt.d.ts.map +1 -0
- package/dist/prompt.js +72 -0
- package/dist/prompt.js.map +1 -0
- package/dist/remote.d.ts +4 -0
- package/dist/remote.d.ts.map +1 -1
- package/dist/remote.js +4 -0
- package/dist/remote.js.map +1 -1
- package/dist/schemas.d.ts +101 -60
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +57 -5
- package/dist/schemas.js.map +1 -1
- package/dist/service.d.ts +6 -1
- package/dist/service.d.ts.map +1 -1
- package/dist/storage.d.ts +19 -1
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +61 -14
- package/dist/storage.js.map +1 -1
- package/dist/types.d.ts +50 -2
- package/dist/types.d.ts.map +1 -1
- package/docs/cli.md +68 -4
- package/docs/examples.md +1 -1
- package/docs/mcp.md +1 -1
- package/docs/skill.md +1 -1
- package/docs/storage-format.md +1 -1
- package/package.json +8 -8
- package/src/backend.ts +8 -2
- package/src/cli.ts +597 -31
- package/src/client.ts +176 -12
- package/src/cloud.ts +19 -0
- package/src/config.ts +8 -1
- package/src/configure.ts +249 -0
- package/src/credentials.ts +26 -3
- package/src/discover.ts +155 -0
- package/src/index.ts +9 -1
- package/src/mcp/index.ts +19 -5
- package/src/oauth.ts +8 -1
- package/src/projections.ts +21 -11
- package/src/prompt.ts +88 -0
- package/src/remote.ts +24 -0
- package/src/schemas.ts +60 -5
- package/src/service.ts +12 -0
- package/src/storage.ts +79 -13
- 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
|
-
## [
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
|
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
|
-
- **
|
|
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
|
|
42
|
-
|
|
43
|
-
and
|
|
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
|
-
|
|
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 ~/.
|
|
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 ~/.
|
|
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
|
-
~/.
|
|
245
|
+
~/.synomem/
|
|
206
246
|
├── synomem/
|
|
207
247
|
│ ├── config.json
|
|
208
248
|
│ └── synomem.sqlite3
|
package/dist/backend.d.ts.map
CHANGED
|
@@ -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;
|
|
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
|
-
|
|
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);
|
package/dist/backend.js.map
CHANGED
|
@@ -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,eAAe,CAAC;AACvB,OAAO,EAAE,6BAA6B,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAStD,SAAS,cAAc,CAAC,YAAqB;IAK3C,MAAM,IAAI,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC;IACvC,
|
|
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,IAA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AAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACvD,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,EAAE,OAAO,IAAI,SAAS,EAAE,OAAO,IAAI,aAAa,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;
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,OAAO,EAA0B,MAAM,WAAW,CAAC;AAmB5D,OAAO,EAAmB,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC7D,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,EASd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