stitchkit 0.59.3 → 0.60.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 (122) hide show
  1. package/README.md +14 -4
  2. package/dist/agent-runtime/admission-lanes.d.ts +35 -0
  3. package/dist/agent-runtime/admission-lanes.d.ts.map +1 -0
  4. package/dist/agent-runtime/coordinator.d.ts +36 -2
  5. package/dist/agent-runtime/coordinator.d.ts.map +1 -1
  6. package/dist/agent-runtime/events.d.ts +7 -0
  7. package/dist/agent-runtime/events.d.ts.map +1 -1
  8. package/dist/agent-runtime/history.d.ts +7 -0
  9. package/dist/agent-runtime/history.d.ts.map +1 -1
  10. package/dist/agent-runtime/models.d.ts +2 -3
  11. package/dist/agent-runtime/models.d.ts.map +1 -1
  12. package/dist/agent-runtime/observability.d.ts.map +1 -1
  13. package/dist/agent-runtime/run-execution.d.ts +31 -0
  14. package/dist/agent-runtime/run-execution.d.ts.map +1 -0
  15. package/dist/agent-runtime/runtime-internals.d.ts +25 -0
  16. package/dist/agent-runtime/runtime-internals.d.ts.map +1 -0
  17. package/dist/agent-runtime/runtime-result.d.ts +11 -0
  18. package/dist/agent-runtime/runtime-result.d.ts.map +1 -0
  19. package/dist/agent-runtime/runtime.d.ts +16 -15
  20. package/dist/agent-runtime/runtime.d.ts.map +1 -1
  21. package/dist/agent-runtime/schemas.d.ts.map +1 -1
  22. package/dist/agent-runtime/store-driver.d.ts.map +1 -1
  23. package/dist/agent-runtime/store.d.ts +9 -2
  24. package/dist/agent-runtime/store.d.ts.map +1 -1
  25. package/dist/agent-runtime/terminal-commit.d.ts.map +1 -1
  26. package/dist/agent-runtime/terminal-status.d.ts +13 -0
  27. package/dist/agent-runtime/terminal-status.d.ts.map +1 -0
  28. package/dist/agent-runtime.d.ts +5 -3
  29. package/dist/agent-runtime.d.ts.map +1 -1
  30. package/dist/agent-runtime.js +211 -156
  31. package/dist/application/activity.d.ts +7 -2
  32. package/dist/application/activity.d.ts.map +1 -1
  33. package/dist/application/grammy.d.ts +6 -0
  34. package/dist/application/grammy.d.ts.map +1 -1
  35. package/dist/application/health.d.ts +20 -1
  36. package/dist/application/health.d.ts.map +1 -1
  37. package/dist/application/kernel.d.ts +49 -3
  38. package/dist/application/kernel.d.ts.map +1 -1
  39. package/dist/application/opentelemetry.d.ts +25 -0
  40. package/dist/application/opentelemetry.d.ts.map +1 -0
  41. package/dist/application/schemas.d.ts +42 -0
  42. package/dist/application/schemas.d.ts.map +1 -1
  43. package/dist/application-opentelemetry.d.ts +2 -0
  44. package/dist/application-opentelemetry.d.ts.map +1 -0
  45. package/dist/application-opentelemetry.js +248 -0
  46. package/dist/application.d.ts +4 -4
  47. package/dist/application.d.ts.map +1 -1
  48. package/dist/application.js +69 -1243
  49. package/dist/cli.js +6 -6
  50. package/dist/contract/errors.d.ts +6 -0
  51. package/dist/contract/errors.d.ts.map +1 -1
  52. package/dist/contract/index.js +1 -1
  53. package/dist/declaration.d.ts +345 -0
  54. package/dist/declaration.d.ts.map +1 -0
  55. package/dist/declaration.js +183 -0
  56. package/dist/index-1zencgcb.js +651 -0
  57. package/dist/{index-sa2mbwa7.js → index-2akar0rq.js} +2 -2
  58. package/dist/{index-41wm56v0.js → index-3hn10n4c.js} +1 -1
  59. package/dist/{index-f6pymtqe.js → index-3w74r08v.js} +2 -2
  60. package/dist/{index-7c0gkyvj.js → index-6fbp58g8.js} +2 -2
  61. package/dist/{index-gnvzyw0k.js → index-8es1hrv4.js} +2 -2
  62. package/dist/index-8eywc9zv.js +100 -0
  63. package/dist/{index-3nwng7hs.js → index-8pc5s3pz.js} +4 -4
  64. package/dist/{index-28cqssm3.js → index-9h1vba8n.js} +6 -0
  65. package/dist/{index-0nc0cddp.js → index-a59da114.js} +17 -28
  66. package/dist/{index-0tszzfxp.js → index-f7521k0x.js} +25 -19
  67. package/dist/{index-y2rb7dwx.js → index-pzyt11ch.js} +5 -1
  68. package/dist/{index-mr617n62.js → index-svqhcrrj.js} +1 -1
  69. package/dist/{index-ps5pxp3h.js → index-v6e8hnkx.js} +7 -1
  70. package/dist/{index-1tkyng3g.js → index-vkk06pv1.js} +1 -9
  71. package/dist/index-x8v8b7rc.js +560 -0
  72. package/dist/index.js +1 -1
  73. package/dist/internal/observability-sink.d.ts.map +1 -1
  74. package/dist/internal/route-pattern.d.ts +9 -0
  75. package/dist/internal/route-pattern.d.ts.map +1 -1
  76. package/dist/node.d.ts +1 -1
  77. package/dist/node.d.ts.map +1 -1
  78. package/dist/node.js +12 -12
  79. package/dist/observability/index.js +5 -5
  80. package/dist/observability/sanitize.d.ts +3 -1
  81. package/dist/observability/sanitize.d.ts.map +1 -1
  82. package/dist/remote.js +3 -3
  83. package/dist/server/error-hook.d.ts +10 -3
  84. package/dist/server/error-hook.d.ts.map +1 -1
  85. package/dist/server/index.d.ts +1 -1
  86. package/dist/server/index.d.ts.map +1 -1
  87. package/dist/server/index.js +16 -19
  88. package/dist/server/middleware/cors.d.ts +5 -2
  89. package/dist/server/middleware/cors.d.ts.map +1 -1
  90. package/dist/server/openapi.d.ts.map +1 -1
  91. package/dist/server/router.d.ts.map +1 -1
  92. package/dist/server/socket-io-config.d.ts +68 -3
  93. package/dist/server/socket-io-config.d.ts.map +1 -1
  94. package/dist/server/socket-io-node.d.ts +1 -1
  95. package/dist/server/socket-io-node.d.ts.map +1 -1
  96. package/dist/server/socket-io.d.ts +1 -1
  97. package/dist/server/socket-io.d.ts.map +1 -1
  98. package/dist/testing/managed-resource-conformance-contract.d.ts +114 -0
  99. package/dist/testing/managed-resource-conformance-contract.d.ts.map +1 -0
  100. package/dist/testing/managed-resource-conformance-driver.d.ts +20 -0
  101. package/dist/testing/managed-resource-conformance-driver.d.ts.map +1 -0
  102. package/dist/testing/managed-resource-conformance-scenarios.d.ts +33 -0
  103. package/dist/testing/managed-resource-conformance-scenarios.d.ts.map +1 -0
  104. package/dist/testing/managed-resource-conformance.d.ts +5 -0
  105. package/dist/testing/managed-resource-conformance.d.ts.map +1 -0
  106. package/dist/testing/surface-manifest.d.ts.map +1 -1
  107. package/dist/testing.d.ts +1 -0
  108. package/dist/testing.d.ts.map +1 -1
  109. package/dist/testing.js +664 -78
  110. package/dist/tools/flatten-join.d.ts +2 -0
  111. package/dist/tools/flatten-join.d.ts.map +1 -1
  112. package/dist/tools/flatten.d.ts.map +1 -1
  113. package/dist/tools/mcp-prepare.d.ts +0 -2
  114. package/dist/tools/mcp-prepare.d.ts.map +1 -1
  115. package/dist/tools/runtime-tool.d.ts +0 -3
  116. package/dist/tools/runtime-tool.d.ts.map +1 -1
  117. package/dist/tools/schema.d.ts +0 -4
  118. package/dist/tools/schema.d.ts.map +1 -1
  119. package/dist/tools.js +9 -9
  120. package/llms-full.txt +1212 -67
  121. package/llms.txt +2 -0
  122. package/package.json +16 -3
package/llms.txt CHANGED
@@ -12,6 +12,7 @@ Build with stitchkit: define a contract once, then `implement` it and serve it (
12
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
13
  - [Agent application runtime](https://github.com/max-listov/stitchkit/blob/master/docs/guide/agent-runtime.md): optional durable history, prompt/model composition, stream loop, coordination, fencing and events
14
14
  - [Managed application kernel](https://github.com/max-listov/stitchkit/blob/master/docs/guide/application-kernel.md): process-local resources, readiness, admission, schedules, projections and optional provider adapters
15
+ - [Application migration recipes](https://github.com/max-listov/stitchkit/blob/master/docs/guide/application-migration-recipes.md): executable database, poller, queue-consumer and operational publishing cutovers
15
16
  - [CLI](https://github.com/max-listov/stitchkit/blob/master/docs/guide/cli.md): contracts as a command-line program
16
17
  - [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
17
18
  - [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
@@ -20,6 +21,7 @@ Build with stitchkit: define a contract once, then `implement` it and serve it (
20
21
  - [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
21
22
  - [Frontend integrations](https://github.com/max-listov/stitchkit/blob/master/docs/guide/frontend-integrations.md): React Router resource routes and a separate Vite development proxy
22
23
  - [Upgrading](https://github.com/max-listov/stitchkit/blob/master/docs/guide/upgrading.md): moving a project across stitchkit versions; how breaking changes are marked
24
+ - [Project declaration](https://github.com/max-listov/stitchkit/blob/master/docs/guide/declaration.md): the optional machine-readable statement a repository makes about itself — identity, roles, build, requirements, release steps and the names of the values a deployment supplies
23
25
 
24
26
  ## Reference
25
27
  - [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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stitchkit",
3
- "version": "0.59.3",
3
+ "version": "0.60.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",
@@ -92,6 +92,10 @@
92
92
  "types": "./dist/application-grammy.d.ts",
93
93
  "import": "./dist/application-grammy.js"
94
94
  },
95
+ "./application/opentelemetry": {
96
+ "types": "./dist/application-opentelemetry.d.ts",
97
+ "import": "./dist/application-opentelemetry.js"
98
+ },
95
99
  "./testing": {
96
100
  "types": "./dist/testing.d.ts",
97
101
  "import": "./dist/testing.js"
@@ -100,6 +104,10 @@
100
104
  "types": "./dist/files.d.ts",
101
105
  "import": "./dist/files.js"
102
106
  },
107
+ "./declaration": {
108
+ "types": "./dist/declaration.d.ts",
109
+ "import": "./dist/declaration.js"
110
+ },
103
111
  "./node": {
104
112
  "types": "./dist/node.d.ts",
105
113
  "import": "./dist/node.js"
@@ -110,8 +118,8 @@
110
118
  },
111
119
  "scripts": {
112
120
  "check": "bun x tsc --noEmit",
113
- "build:browser": "bun build src/index.ts src/react.ts src/contract/index.ts --outdir dist --target node --packages external --splitting --root src",
114
- "build:server": "bun build src/server/index.ts src/node.ts src/tools.ts src/cli.ts src/remote.ts src/files.ts src/testing.ts src/observability/index.ts src/agent-runtime.ts src/agent-runtime-openrouter.ts src/application.ts src/application-grammy.ts --outdir dist --target node --packages external --splitting --root src",
121
+ "build:browser": "bun build src/index.ts src/react.ts src/contract/index.ts src/declaration.ts --outdir dist --target node --packages external --splitting --root src",
122
+ "build:server": "bun build src/server/index.ts src/node.ts src/tools.ts src/cli.ts src/remote.ts src/files.ts src/testing.ts src/observability/index.ts src/agent-runtime.ts src/agent-runtime-openrouter.ts src/application.ts src/application-grammy.ts src/application-opentelemetry.ts --outdir dist --target node --packages external --splitting --root src",
115
123
  "build:js": "bun run build:browser && bun run build:server",
116
124
  "build:types": "bun x tsc -p tsconfig.build.json --emitDeclarationOnly",
117
125
  "build": "rm -rf dist && bun run build:js && bun run build:types && bun scripts/check-browser-clean.mjs && bun scripts/check-env-live.mjs && bun scripts/check-public-types.mjs",
@@ -126,6 +134,7 @@
126
134
  "peerDependencies": {
127
135
  "@modelcontextprotocol/ext-apps": "^1.7.2",
128
136
  "@modelcontextprotocol/server": "^2.0.0",
137
+ "@opentelemetry/api": "^1.9.0",
129
138
  "@openrouter/ai-sdk-provider": "^3.0.0",
130
139
  "@types/bun": "^1.3.14",
131
140
  "@socket.io/bun-engine": "^0.1.1",
@@ -150,6 +159,9 @@
150
159
  "@modelcontextprotocol/server": {
151
160
  "optional": true
152
161
  },
162
+ "@opentelemetry/api": {
163
+ "optional": true
164
+ },
153
165
  "@openrouter/ai-sdk-provider": {
154
166
  "optional": true
155
167
  },
@@ -191,6 +203,7 @@
191
203
  "@modelcontextprotocol/client": "^2.0.0",
192
204
  "@modelcontextprotocol/ext-apps": "^1.7.5",
193
205
  "@modelcontextprotocol/server": "^2.0.0",
206
+ "@opentelemetry/api": "^1.9.0",
194
207
  "@openrouter/ai-sdk-provider": "^3.0.0",
195
208
  "@socket.io/bun-engine": "^0.1.1",
196
209
  "@socket.io/component-emitter": "^3.1.2",