@abide/abide 0.109.0 → 0.110.1

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @abide/abide
2
2
 
3
+ ## 0.110.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 2aac4eb: an MCP tool's inputSchema is an object at its top level, and args that can never be one refuse the app at boot ([`ec9d80b`](https://github.com/briancray/abide/commit/ec9d80bb6f8902ba1d9f016f6dcd85eba83a47ef))
8
+
9
+ ## 0.110.0
10
+
11
+ ### Minor Changes
12
+
13
+ - bfa7a68: Breaking: a server-only module and a test are named by file rather than by directory — `<name>.server.<ext>` under `lib`, `.test.ts` anywhere; `lib` and `public` are the only fences ([`e8e2666`](https://github.com/briancray/abide/commit/e8e266676a90d4f4534b74c6373116a1cbab277b))
14
+
3
15
  ## 0.109.0
4
16
 
5
17
  ### Minor Changes
package/docs/REGISTRY.md CHANGED
@@ -313,7 +313,7 @@ type Gated<Gate, Accepted> = [Schema<Accepted>] extends [Gate] ? never : Failed<
313
313
 
314
314
  | Name | Signature | Meaning | Rules |
315
315
  | --- | --- | --- | --- |
316
- | `/__abide/mcp` | `POST` | The streamable-http MCP endpoint. | 19.21, 19.22, 20.5, 20.7, 20.8, 20.9, 20.10, 20.12, 20.13, 20.14, 20.16, 20.17, 36.7, 16.78 |
316
+ | `/__abide/mcp` | `POST` | The streamable-http MCP endpoint. | 19.21, 19.22, 20.5, 20.7, 20.8, 20.9, 20.10, 20.12, 20.13, 20.14, 20.16, 20.17, 20.19, 20.20, 36.7, 16.78 |
317
317
 
318
318
  # Assistant
319
319
 
@@ -325,7 +325,7 @@ type Gated<Gate, Accepted> = [Schema<Accepted>] extends [Gate] ? never : Failed<
325
325
  | `AssistantOptions` | `{ mcp?: boolean; maxTurns?: number }` | What `assistant` takes beside a provider. | 44.6, 44.8, 44.11 |
326
326
  | `Provider` | `{ run(messages: AssistantMessage[], tools: Toolbox, limits: { maxTurns: number; signal: AbortSignal }): AsyncGenerator<AssistantEvent> }` | What runs a conversation. | 44.2, 44.29 |
327
327
  | `Toolbox` | `{ list: ToolDefinition[]; call(name: string, input: unknown): Promise<{ text: string; failed: boolean }> }` | The app's MCP tools, called as the asker. | 44.6, 44.7 |
328
- | `ToolDefinition` | `{ name: string; description: string; inputSchema: unknown; annotations: { readOnlyHint: boolean; destructiveHint: boolean; idempotentHint: boolean }; outputSchema: unknown }` | A tool as the app's MCP surface lists it. | 20.14, 20.16, 44.6 |
328
+ | `ToolDefinition` | `{ name: string; description: string; inputSchema: unknown; annotations: { readOnlyHint: boolean; destructiveHint: boolean; idempotentHint: boolean }; outputSchema: unknown }` | A tool as the app's MCP surface lists it. | 20.14, 20.16, 20.19, 44.6 |
329
329
 
330
330
  ## `claudeApi`
331
331
 
@@ -650,9 +650,10 @@ type Gated<Gate, Accepted> = [Schema<Accepted>] extends [Gate] ? never : Failed<
650
650
  | Path | Meaning | Rules |
651
651
  | --- | --- | --- |
652
652
  | `src/**` | The app's source. | 36.10, 38.25 |
653
- | `**/server/**` | Source the browser never loads. | 16.29, 23.15, 23.16, 23.18, 36.10 |
654
- | `**/lib/**` | The app's code that is no address: components and modules, on both sides. | 23.15, 23.16, 23.18, 23.22, 37.1 |
655
- | `**/tests/**` | The app's tests. | 23.15, 23.16, 23.18, 23.22, 37.1, 38.109 |
653
+ | `**/lib/**` | The app's code that is no address: components and modules. | 23.15, 23.16, 23.18, 23.22, 37.1 |
654
+ | `**/lib/**/<name>.server.<extension>` | A server file: source the browser never loads. | 16.29, 23.23, 34.20, 36.10 |
655
+ | `**/<name>.test.ts` | A test file: one of the app's tests, wherever it lies. | 23.22, 38.109 |
656
+ | `**/<name>.d.ts` | A declaration file: types for the checker, wherever it lies. | 23.22 |
656
657
  | `**/public/**` | The files answered as authored, at their path below that directory. | 23.15, 23.16, 23.18, 36.11, 36.12, 36.13, 36.14, 36.15, 36.17, 21.12, 21.13, 21.14, 38.18, 38.19 |
657
658
  | `src/public/favicon.ico` | The file answered at `/favicon.ico`. | 36.11 |
658
659
  | `src/public/robots.txt` | The file answered at `/robots.txt`. | 36.11 |
package/docs/RULEBOOK.md CHANGED
@@ -115,8 +115,11 @@ REGISTRY.md because none of them is a name an app author writes.
115
115
  | sink | What 35.7 defines. |
116
116
  | implementation | Anything claiming conformance to this document. |
117
117
  | dependency's `.abide` | A `.abide` file under a `node_modules` directory or outside the app's root. |
118
- | fence | A `server`, `public`, `lib` or `tests` directory. |
119
- | handler file | A `.ts` of the app's own, neither a `.d.ts` nor a `.test.ts`, directly in a directory under no fence. |
118
+ | fence | A `public` or `lib` directory. |
119
+ | server file | A file named `<name>.server.<extension>`. |
120
+ | test file | A `.test.ts` file. |
121
+ | declaration file | A `.d.ts` file. |
122
+ | handler file | A `.ts` of the app's own, neither a declaration file, a test file nor a server file, directly in a directory under no fence. |
120
123
  | private handler | A handler a `<script server>` declares. |
121
124
  | chapter app | The app the documentation's story has built by the end of one chapter, kept whole so a reader can download it and run it. |
122
125
 
@@ -915,7 +918,7 @@ read it.
915
918
  16.28 A browser MUST receive a generated `Rpc` wrapper carrying the method, the mount-relative address and
916
919
  the description, and MUST NOT receive the handler file or the `<script server>` that declared it.
917
920
 
918
- 16.29 Importing a module under a `server` directory from the client graph MUST be a compile error,
921
+ 16.29 Importing a server file from the client graph MUST be a compile error,
919
922
  and MUST NOT be a silent stub.
920
923
 
921
924
  16.30 An `Rpc` returning a raw `Value` MUST transport as `application/json`.
@@ -1317,6 +1320,12 @@ tool, the status it was answered with and how long it took, whether `/__abide/mc
1317
1320
  made the call — a call naming a tool it does not publish answered 404, and one whose answer threw
1318
1321
  500.
1319
1322
 
1323
+ 20.19 A tool `/__abide/mcp` lists MUST declare an `inputSchema` whose top-level `type` is `object`,
1324
+ whatever its handler's args schema declares there.
1325
+
1326
+ 20.20 A handler `/__abide/mcp` would list whose args schema can never be an object MUST refuse the
1327
+ app at boot, naming the handler.
1328
+
1320
1329
  # 21. Generated headers
1321
1330
 
1322
1331
  21.1 Every response MUST carry `x-content-type-options: nosniff`.
@@ -1430,8 +1439,7 @@ segment a page below it adds.
1430
1439
 
1431
1440
  23.15 A file under a fence MUST NOT have a route.
1432
1441
 
1433
- 23.16 A fence under a fence MUST be a build error naming both, save a `server` directory under a
1434
- `lib` or a `tests` directory.
1442
+ 23.16 A fence under a fence MUST be a build error naming both.
1435
1443
 
1436
1444
  23.17 A route whose first segment is `__abide` MUST be a build error.
1437
1445
 
@@ -1447,9 +1455,12 @@ error naming the mount.
1447
1455
  23.21 A `.abide` of the app's own directly in a directory under no fence MUST be a page, save a
1448
1456
  `layout.abide`, an `error.abide` and the root's `launcher.abide`.
1449
1457
 
1450
- 23.22 A file of the app's own directly in a directory under no fence that is neither a `.abide` nor
1451
- a handler file MUST be a build error naming the file and a `lib` directory, save one beside the
1452
- `package.json` of a root that holds it, nor a `.ts`.
1458
+ 23.22 A file of the app's own directly in a directory under no fence that is neither a `.abide`, a
1459
+ handler file, a test file nor a declaration file MUST be a build error naming the file and a `lib` directory, save one
1460
+ beside the `package.json` of a root that holds it, nor a `.ts`.
1461
+
1462
+ 23.23 A server file of the app's own under no `lib` directory MUST be a build error naming the file
1463
+ and a `lib` directory.
1453
1464
 
1454
1465
  # 24. Tracing
1455
1466
 
@@ -2101,8 +2112,8 @@ error.
2101
2112
  34.19 A `<script server>` block MUST be module scope run on a server alone, and the module a browser
2102
2113
  loads MUST NOT carry it.
2103
2114
 
2104
- 34.20 A `<script server>` in a `.abide` file of the app's own under a `server` or `public` directory
2105
- MUST be a compile error.
2115
+ 34.20 A `<script server>` in a `.abide` file of the app's own under a `public` directory MUST be a
2116
+ compile error.
2106
2117
 
2107
2118
  34.21 A file a script block imports `with { type: 'text' }`, a `.abide` among them, MUST be imported
2108
2119
  as its text and typed a `string`, on a server, in a browser and to the checker alike.
@@ -2206,8 +2217,8 @@ navigation from it MUST load the document it asks for.
2206
2217
 
2207
2218
  36.9 `NO_COLOR` MUST beat `FORCE_COLOR`.
2208
2219
 
2209
- 36.10 A module MUST be importable from either graph unless it lies under a `server` directory, per
2210
- 16.29.
2220
+ 36.10 A module MUST be importable from either graph unless it is a server file, per 16.29,
2221
+ whatever imports it.
2211
2222
 
2212
2223
  36.11 A file under a `public` directory MUST be answered at that directory's path below the app's
2213
2224
  `--root` followed by its own path below that directory, rooted at the mount rather than at the
@@ -2237,7 +2248,7 @@ answered per 41.12.
2237
2248
  # 37. Lifecycle hooks
2238
2249
 
2239
2250
  37.1 A lifecycle hook MUST be filed at the route of the `.abide` or the handler file that called it,
2240
- one under a `lib` or a `tests` directory at the route of the directory holding that one, and at the
2251
+ one under a `lib` directory at the route of the directory holding that one, and at the
2241
2252
  root route where neither did; a call MUST be read as a hook only where it names a hook the module
2242
2253
  imports from abide, under any name, or a member of a namespace it imports from abide.
2243
2254