stitchkit 0.6.0 → 0.8.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 (36) hide show
  1. package/README.md +20 -10
  2. package/dist/cli.js +3 -3
  3. package/dist/contract/define.d.ts +7 -0
  4. package/dist/contract/define.d.ts.map +1 -1
  5. package/dist/contract/errors.d.ts +26 -1
  6. package/dist/contract/errors.d.ts.map +1 -1
  7. package/dist/contract/index.d.ts +2 -2
  8. package/dist/contract/index.d.ts.map +1 -1
  9. package/dist/contract/index.js +9 -1
  10. package/dist/contract/pagination.d.ts +11 -0
  11. package/dist/contract/pagination.d.ts.map +1 -1
  12. package/dist/{index-m9328d8z.js → index-5789sbt8.js} +36 -10
  13. package/dist/{index-1cf8jkhf.js → index-5qe31283.js} +1 -1
  14. package/dist/{index-d4rwrjbc.js → index-a1702zj4.js} +1 -1
  15. package/dist/{index-afzt3nmx.js → index-eq29zkrx.js} +33 -4
  16. package/dist/{index-0ma1eqv4.js → index-tr7r1530.js} +3 -3
  17. package/dist/{index-vhdvv00d.js → index-wjwj5bz2.js} +1 -1
  18. package/dist/index.js +11 -3
  19. package/dist/node.js +3 -3
  20. package/dist/server/context.d.ts +1 -1
  21. package/dist/server/context.d.ts.map +1 -1
  22. package/dist/server/create.d.ts.map +1 -1
  23. package/dist/server/implement.d.ts.map +1 -1
  24. package/dist/server/index.d.ts +1 -1
  25. package/dist/server/index.d.ts.map +1 -1
  26. package/dist/server/index.js +9 -5
  27. package/dist/server/router.d.ts.map +1 -1
  28. package/dist/server/socket-io.d.ts.map +1 -1
  29. package/dist/server/types.d.ts +19 -2
  30. package/dist/server/types.d.ts.map +1 -1
  31. package/dist/tools/execute.d.ts +2 -2
  32. package/dist/tools/execute.d.ts.map +1 -1
  33. package/dist/tools.js +4 -4
  34. package/llms-full.txt +3025 -0
  35. package/llms.txt +23 -0
  36. package/package.json +4 -2
package/llms.txt ADDED
@@ -0,0 +1,23 @@
1
+ # stitchkit
2
+
3
+ > Contract-first backend framework for Bun and Node. One `defineContract()` becomes an HTTP API, MCP tools, AI-agent tools, a CLI and a fully-typed client — one source of truth, no drift.
4
+
5
+ Build with stitchkit: define a contract once, then `implement` it and serve it (`createServer` on Bun, `serveNode` on Node ≥ 22). The same contract drives MCP / agent tools and a typed client, so the transports cannot diverge. The pages below are the full guide; `llms-full.txt` (in this package) inlines all of them for offline reading.
6
+
7
+ ## Guide
8
+ - [Getting started](https://github.com/max-listov/stitchkit/blob/master/docs/guide/getting-started.md): install, entrypoints, and a first contract → server → client app
9
+ - [Contracts](https://github.com/max-listov/stitchkit/blob/master/docs/guide/contracts.md): every endpoint field — method, path, params/input/output, scope, expose, meta, multipart
10
+ - [HTTP server](https://github.com/max-listov/stitchkit/blob/master/docs/guide/server.md): createServer/createHandler, implement, lifecycle hooks, raw routes + helpers, scopePrefixes, serveFile, primitives
11
+ - [Typed client](https://github.com/max-listov/stitchkit/blob/master/docs/guide/client.md): createClient/createHttpClient, the typed call surface, scoped clients, SSE
12
+ - [MCP & agents](https://github.com/max-listov/stitchkit/blob/master/docs/guide/mcp-and-agents.md): contracts as MCP tools (createMcpHandler) and AI-agent tools (mountAgent); tool lifecycle, extend, identity
13
+ - [CLI](https://github.com/max-listov/stitchkit/blob/master/docs/guide/cli.md): contracts as a command-line program
14
+ - [Realtime](https://github.com/max-listov/stitchkit/blob/master/docs/guide/realtime.md): Socket.IO server/client wrappers, handshake auth, the cache bridge, a raw WebSocket lane
15
+ - [Auth & errors](https://github.com/max-listov/stitchkit/blob/master/docs/guide/auth-and-errors.md): scopes, createAuthHook, JWT/cookies, the AppError model, the stitch error-code registry
16
+ - [Observability](https://github.com/max-listov/stitchkit/blob/master/docs/guide/observability.md): request and tool-call logging via hooks, W3C trace context, createAuditHook
17
+ - [Testing & deployment](https://github.com/max-listov/stitchkit/blob/master/docs/guide/testing-and-deployment.md): in-process testing; deploying on Bun and on Node (serveNode)
18
+ - [Multi-tenant](https://github.com/max-listov/stitchkit/blob/master/docs/guide/multi-tenant.md): a /tenants/:id/… scenario end-to-end — scopePrefixes, scoped client, extend
19
+ - [Upgrading](https://github.com/max-listov/stitchkit/blob/master/docs/guide/upgrading.md): moving a project across stitchkit versions; how breaking changes are marked
20
+
21
+ ## Reference
22
+ - [API reference](https://github.com/max-listov/stitchkit/blob/master/docs/api/reference.md): every public export, grouped by entrypoint, each linked to the guide
23
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stitchkit",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "description": "Contract-first backend framework — one defineContract() into an HTTP API, MCP tools, AI-agent tools and a typed client. Bun and Node.",
5
5
  "keywords": [
6
6
  "bun",
@@ -38,6 +38,8 @@
38
38
  "types": "./dist/index.d.ts",
39
39
  "files": [
40
40
  "dist",
41
+ "llms.txt",
42
+ "llms-full.txt",
41
43
  "README.md",
42
44
  "LICENSE"
43
45
  ],
@@ -84,7 +86,7 @@
84
86
  "build:types": "bun x tsc -p tsconfig.build.json --emitDeclarationOnly",
85
87
  "build": "rm -rf dist && bun run build:js && bun run build:types",
86
88
  "dev": "bun run build:js -- --watch",
87
- "prepublishOnly": "cp ../../README.md ./README.md && bun run build",
89
+ "prepublishOnly": "cp ../../README.md ./README.md && bun ../../scripts/gen-llms.ts && bun run build",
88
90
  "test": "bun test",
89
91
  "smoke:node": "node scripts/node-smoke.mjs"
90
92
  },