@fleetless/contracts 1.0.0 → 1.0.2

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 (48) hide show
  1. package/CHANGELOG.md +68 -2
  2. package/CODE_OF_CONDUCT.md +83 -0
  3. package/CONTRIBUTING.md +136 -0
  4. package/README.md +49 -13
  5. package/SECURITY.md +55 -0
  6. package/artifacts/openapi.json +1 -1
  7. package/artifacts/routes.json +1 -1
  8. package/dist/alerts.d.ts +19 -24
  9. package/dist/alerts.js +18 -24
  10. package/dist/app-users.d.ts +7 -6
  11. package/dist/app-users.js +6 -6
  12. package/dist/apps.d.ts +21 -25
  13. package/dist/apps.js +40 -51
  14. package/dist/assets.d.ts +70 -132
  15. package/dist/assets.js +130 -223
  16. package/dist/audit.d.ts +11 -11
  17. package/dist/audit.js +25 -51
  18. package/dist/client-auth.d.ts +4 -4
  19. package/dist/client-auth.js +3 -4
  20. package/dist/common.d.ts +27 -35
  21. package/dist/common.js +26 -35
  22. package/dist/config-issues.d.ts +4 -3
  23. package/dist/config-issues.js +7 -6
  24. package/dist/config.d.ts +31 -37
  25. package/dist/config.js +81 -110
  26. package/dist/errors.d.ts +4 -3
  27. package/dist/errors.js +61 -87
  28. package/dist/identity.d.ts +18 -21
  29. package/dist/identity.js +17 -21
  30. package/dist/index.d.ts +4 -4
  31. package/dist/index.js +12 -13
  32. package/dist/introspection.d.ts +7 -6
  33. package/dist/introspection.js +6 -6
  34. package/dist/jobs.d.ts +12 -12
  35. package/dist/jobs.js +20 -25
  36. package/dist/mcp.d.ts +11 -12
  37. package/dist/mcp.js +10 -12
  38. package/dist/oauth.d.ts +13 -18
  39. package/dist/oauth.js +13 -19
  40. package/dist/protocol.d.ts +51 -62
  41. package/dist/protocol.js +107 -139
  42. package/dist/realtime.d.ts +53 -68
  43. package/dist/realtime.js +77 -103
  44. package/dist/rest.d.ts +182 -243
  45. package/dist/rest.js +301 -395
  46. package/dist/routes.d.ts +4 -3
  47. package/dist/routes.js +3 -2
  48. package/package.json +12 -7
package/dist/routes.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: Apache-2.0
1
2
  /**
2
3
  * **The route manifest: every HTTP route the cloud registers, declared once.**
3
4
  *
@@ -62,9 +63,9 @@ export interface RouteEntry {
62
63
  * It exists because the OpenAPI render marked every request body `required`,
63
64
  * which documented a refusal `POST /api/robots/:id/jobs/:slug/cancel` does not
64
65
  * make: it parses `request.body ?? {}`, and a bodyless `POST` was every
65
- * caller's shape before `job_id` existed. Getting that wrong in the other
66
- * direction is what W5's worst bug was — a bodyless `POST` with a JSON
67
- * content type rejected outright — so this is a fact worth carrying rather
66
+ * caller's shape before `job_id` existed. Getting it wrong in the other
67
+ * direction — a bodyless `POST` with a JSON content type rejected outright —
68
+ * makes whole routes unreachable, so this is a fact worth carrying rather
68
69
  * than a default worth assuming.
69
70
  */
70
71
  readonly requestOptional?: true;
package/dist/routes.js CHANGED
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: Apache-2.0
1
2
  import { appListResponse, createAppRequest, createServerKeyResponse, app as appSchema, role, roleListResponse, rolePermissions, serverKeyListResponse, updateAppRequest, } from './apps.js';
2
3
  import { alertListResponse, orgAlertsQuery, orgFiringAlertsResponse } from './alerts.js';
3
4
  import { asset, assetListResponse, assetSyncRequest, assetSyncResponse, assetSyncStatus, missingAssetQuery } from './assets.js';
@@ -1171,8 +1172,8 @@ export const ROUTES = [
1171
1172
  params: [APP_IDENTIFIER], query: null, request: null, response: null,
1172
1173
  errors: ['not_found', 'unauthorized', 'forbidden'], transport: 'http',
1173
1174
  notes: 'MCP\'s Streamable HTTP gives this path three verbs: `POST` carries JSON-RPC, `GET` opens the server-initiated SSE stream, and `DELETE` ' +
1174
- 'ends a session. This server has no sessions — the argument is in `MCP_PROTOCOL_VERSION`\'s own note, and W8\'s second cloud instance is ' +
1175
- 'where a per-process session map would break — so `GET` and `DELETE` answer `405`, which is what a client is built to fall back from. ' +
1175
+ 'ends a session. This server has no sessions — the argument is in `MCP_PROTOCOL_VERSION`\'s own note, and a per-process session map is ' +
1176
+ 'what breaks at the second cloud instance — so `GET` and `DELETE` answer `405`, which is what a client is built to fall back from. ' +
1176
1177
  '\n\n**The `405` is this cloud\'s own answer, not the SDK\'s**, and the difference was measured: MCP SDK 1.30.0 opens an SSE stream on ' +
1177
1178
  '`GET` (`handleGetRequest`) and answers `200` on `DELETE` (`handleDeleteRequest`), neither of which a stateless server has any ' +
1178
1179
  'business doing, so the cloud writes the `405` itself in the transport\'s own JSON-RPC error shape with `Allow: POST`. \n\n**The row exists so that the `405` is not a `404`.** An unregistered verb answers ' +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fleetless/contracts",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Fleetless wire contracts: the bridge-cloud protocol, the REST API schemas and the error codes, as zod schemas with generated JSON Schema and OpenAPI artifacts.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Dehne Robotik GmbH",
@@ -10,7 +10,8 @@
10
10
  "url": "https://github.com/fleetless/contracts"
11
11
  },
12
12
  "bugs": {
13
- "url": "https://github.com/fleetless/contracts/issues"
13
+ "url": "https://github.com/fleetless/contracts/issues",
14
+ "email": "security@fleetless.dev"
14
15
  },
15
16
  "keywords": [
16
17
  "fleetless",
@@ -36,21 +37,25 @@
36
37
  "LICENSE",
37
38
  "NOTICE",
38
39
  "README.md",
39
- "CHANGELOG.md"
40
+ "CHANGELOG.md",
41
+ "SECURITY.md",
42
+ "CONTRIBUTING.md",
43
+ "CODE_OF_CONDUCT.md"
40
44
  ],
41
45
  "engines": {
42
46
  "node": ">=20"
43
47
  },
44
48
  "scripts": {
45
49
  "typecheck": "tsc --noEmit && tsc --noEmit -p test/tsconfig.json",
46
- "build": "tsc",
47
- "prepare": "tsc",
50
+ "build": "tsc && node scripts/stamp-dist.mjs",
51
+ "prepare": "tsc && node scripts/stamp-dist.mjs",
48
52
  "test": "vitest run",
49
53
  "artifacts": "tsx scripts/export-schemas.ts",
50
- "test:pack": "node scripts/verify-pack.mjs"
54
+ "test:pack": "node scripts/verify-pack.mjs",
55
+ "prepublishOnly": "node scripts/refuse-manual-publish.mjs"
51
56
  },
52
57
  "dependencies": {
53
- "zod": "^4.0.0"
58
+ "zod": "^4.4.3"
54
59
  },
55
60
  "devDependencies": {
56
61
  "@types/node": "^26.2.0",