@motir/cli 0.1.1 → 0.2.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 (3) hide show
  1. package/README.md +25 -10
  2. package/dist/index.js +49859 -416
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -1,10 +1,22 @@
1
1
  # `@motir/cli` — the `motir` command-line tool
2
2
 
3
- Terminal dispatch of the Motir work loop. The CLI is an **MCP client** of the
4
- Motir server (`/api/mcp`): every command speaks Model Context Protocol to the
5
- tenant with a personal access token (PAT) as a bearer credential. There is no
6
- parallel REST path — if the CLI needs a capability it lands as an MCP tool
7
- first, then the CLI consumes it (story 7.9 architecture).
3
+ Terminal dispatch of the Motir work loop. The CLI is a client of **Motir's
4
+ public REST API** (`/api/v1`): every command is an ordinary HTTPS request
5
+ carrying a personal access token (PAT) as its bearer. There is no private
6
+ channel — the CLI uses the same documented endpoints, the same credential and
7
+ the same scopes any third-party integration gets, and if it needs a capability
8
+ that capability lands on `/api/v1` first, where everyone can reach it.
9
+
10
+ That is the point rather than an implementation detail: nothing this tool does
11
+ is unavailable to a script you write yourself. The reference is at
12
+ [`/docs/api`](https://app.motir.co/docs/api) and the machine-readable spec at
13
+ [`/api/openapi/v1.json`](https://app.motir.co/api/openapi/v1.json) — the same
14
+ document this package's types are generated from.
15
+
16
+ > It was an MCP client until Story 11.5 (`docs/decisions/cli-v1-client.md`).
17
+ > Motir still SERVES the Model Context Protocol at `/api/mcp`, for agents; the
18
+ > CLI is simply no longer one of its clients, and no longer ships an
19
+ > agent-protocol SDK to everyone who installs it.
8
20
 
9
21
  > **Status (Subtask 7.9.1):** this is the scaffold + auth + link layer. Read
10
22
  > commands (`ready` / `status` / `open` — 7.9.2), single dispatch (`next` /
@@ -500,10 +512,10 @@ pnpm vitest run tests/cli/ # the story suite — the BUILT binary,
500
512
  ```
501
513
 
502
514
  **The package suite** (`packages/cli/test/**`) covers each module in isolation.
503
- Where a module talks to a server it is pointed at a REAL MCP server the test
504
- starts in-process (`test/helpers/mcpTestServer.ts`) with canned tool results —
505
- the transport, framing and error envelopes are the real ones, only the data is
506
- scripted. `test/auto.test.ts` drives the whole `motir auto` loop against a
515
+ Where a module talks to a server it is pointed at a REAL HTTP server the test
516
+ starts in-process (`test/helpers/testServer.ts`) with canned `/api/v1`
517
+ responses — the framing, status handling and URL building are the real ones,
518
+ only the data is scripted. `test/auto.test.ts` drives the whole `motir auto` loop against a
507
519
  scripted server, agent and git, because its load-bearing properties — that it
508
520
  re-queries every iteration, that an integrated item unlocks its dependents
509
521
  mid-run, that `main` is never advanced, and that the pull request opens even when
@@ -511,7 +523,7 @@ the run ended badly — are not visible in any single function.
511
523
 
512
524
  **The story suite** (`tests/cli/cli-story.test.ts`, in the root Vitest lane where
513
525
  Postgres is) spawns the BUILT binary as a child process against the real
514
- `/api/mcp` route, with a scripted fake agent and a recorded fake `gh`. It is what
526
+ `/api/v1` routes, with a scripted fake agent and a recorded fake `gh`. It is what
515
527
  proves the assembled tool works: repo routing into real checkouts, the
516
528
  session-branch cascade, one pull request per touched repo, a `main` nobody
517
529
  advanced, and the help surface of the binary a user actually runs.
@@ -526,6 +538,9 @@ uses; the story suite rides the sharded Vitest job.
526
538
 
527
539
  ## Releasing
528
540
 
541
+ What each version changed, for the person who installs it, is
542
+ [`CHANGELOG.md`](./CHANGELOG.md). Below is how one gets published.
543
+
529
544
  Releases publish to the **public npm registry** via CI — the
530
545
  `.github/workflows/release-cli.yml` workflow, triggered by a package-scoped git
531
546
  tag. There is no manual `npm publish` in the normal path.