notex-companion 0.3.2 → 0.4.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/README.md +16 -0
- package/dist/atomicWrite.d.ts +1 -0
- package/dist/cli.d.ts +2 -3
- package/dist/cli.js +384 -223
- package/dist/cliErrors.d.ts +3 -0
- package/dist/client.js +5 -1
- package/dist/graph.d.ts +13 -1
- package/dist/index.js +64 -10
- package/dist/link.d.ts +15 -0
- package/dist/notexClient.d.ts +10 -0
- package/dist/notexConfig.d.ts +2 -0
- package/dist/ops.d.ts +8 -1
- package/dist/types.d.ts +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -45,10 +45,13 @@ notex-companion mcp # start the stdio MCP server — graph_statu
|
|
|
45
45
|
# graph_query, graph_path, graph_node, plus notex_list_questions,
|
|
46
46
|
# notex_get_question, notex_get_answer, notex_save_answer
|
|
47
47
|
# (require .notex/notex.json — see docs/specs/notex-mcp-server.md)
|
|
48
|
+
notex-companion link [options] # write .notex/notex.json, pairing this checkout to a Notex Repository
|
|
48
49
|
```
|
|
49
50
|
|
|
50
51
|
Setup, how it picks which checkout to serve, and a manual verification walkthrough:
|
|
51
52
|
[`docs/testing/mcp-server-setup.md`](https://github.com/bhirmbani/notex/blob/main/docs/testing/mcp-server-setup.md).
|
|
53
|
+
For `link` specifically — happy path, rotation, and every refusal path — see
|
|
54
|
+
[`docs/testing/notex-companion-link-manual-test.md`](https://github.com/bhirmbani/notex/blob/main/docs/testing/notex-companion-link-manual-test.md).
|
|
52
55
|
|
|
53
56
|
### `serve` options
|
|
54
57
|
|
|
@@ -58,6 +61,19 @@ Setup, how it picks which checkout to serve, and a manual verification walkthrou
|
|
|
58
61
|
| `--origin <url>` | — | An additional allowed CORS origin, beyond the production Notex origin (and `http://localhost:3000` outside `NODE_ENV=production`). Repeatable. |
|
|
59
62
|
| `--rotate-token` | off | Generate a new pairing token, invalidating the previous one. |
|
|
60
63
|
|
|
64
|
+
### `link` options (all required)
|
|
65
|
+
|
|
66
|
+
| Flag | Meaning |
|
|
67
|
+
|---|---|
|
|
68
|
+
| `--organization-id <id>` | Notex organization id. |
|
|
69
|
+
| `--project-id <id>` | Notex project id — cross-checked against the Repository's actual project before writing. |
|
|
70
|
+
| `--repository-id <id>` | Notex repository id to bind this checkout to. |
|
|
71
|
+
| `--api-key <key>` | Generated once, plaintext, from Notex Settings → API keys. |
|
|
72
|
+
|
|
73
|
+
`link` validates all four against the Notex API before writing `.notex/notex.json` (mode `0600`) —
|
|
74
|
+
a bad key, an inaccessible repository, or a repository/project mismatch fails with an actionable
|
|
75
|
+
message and writes nothing.
|
|
76
|
+
|
|
61
77
|
## Pairing
|
|
62
78
|
|
|
63
79
|
On first run the companion generates a 32-byte token, persists it to `.notex/companion.json`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function atomicWriteFile(path: string, content: string, mode: number): void;
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
}
|
|
1
|
+
import { CliUsageError } from "./cliErrors.js";
|
|
2
|
+
export { CliUsageError };
|
|
4
3
|
export type ServeArgs = {
|
|
5
4
|
port: number | undefined;
|
|
6
5
|
origins: Array<string>;
|