@graphorin/protocol 0.6.0 → 0.6.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,11 @@
1
1
  # @graphorin/protocol
2
2
 
3
+ ## 0.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#142](https://github.com/o-stepper/graphorin/pull/142) [`436d6ca`](https://github.com/o-stepper/graphorin/commit/436d6ca5ebbd16df094e915682d3915c279a8430) Thanks [@o-stepper](https://github.com/o-stepper)! - Version constants and version-bearing strings now derive from each package's manifest at build time (`VERSION = pkg.version`; writer ids, client/server info, OTLP framework attributes, build-info metrics interpolate it). No behavioral change at the current version: the rendered strings are byte-identical. A release bump no longer edits source; the new `check-version-consistency` gate fails any reintroduced hardcoded framework version.
8
+
3
9
  ## 0.6.0
4
10
 
5
11
  ## 0.5.0
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)
6
6
  [![Node.js: 22+](https://img.shields.io/badge/Node.js-22%2B-43853d.svg)](https://nodejs.org)
7
7
 
8
- - **Version:** v0.6.0
8
+ - **Version:** v0.6.1
9
9
  - **License:** [MIT](./LICENSE) (© 2026 Oleksiy Stepurenko)
10
10
  - **Repository:** <https://github.com/o-stepper/graphorin/tree/main/packages/protocol>
11
11
  - **Issues:** <https://github.com/o-stepper/graphorin/issues>
@@ -68,4 +68,4 @@ MIT © 2026 Oleksiy Stepurenko. See [`LICENSE`](./LICENSE).
68
68
 
69
69
  ---
70
70
 
71
- **Project Graphorin** · v0.6.0 · MIT License · © 2026 Oleksiy Stepurenko · <https://github.com/o-stepper/graphorin>
71
+ **Project Graphorin** · v0.6.1 · MIT License · © 2026 Oleksiy Stepurenko · <https://github.com/o-stepper/graphorin>
package/dist/index.d.ts CHANGED
@@ -20,8 +20,7 @@ import { PROTOCOL_VERSION, SUBPROTOCOL_NAME, TICKET_SUBPROTOCOL_PREFIX, formatTi
20
20
  *
21
21
  * @packageDocumentation
22
22
  */
23
- /** Canonical version constant. Mirrors the `package.json` version. */
24
- declare const VERSION = "0.6.0";
23
+ declare const VERSION: string;
25
24
  //#endregion
26
25
  export { CLOSE_CODE_VALUES, ClientMessage, ClientMessageId, ClientMessageSchema, GraphorinCloseReason, PROTOCOL_VERSION, RPC_ERROR_CODES, SUBPROTOCOL_NAME, ServerErrorFrame, ServerEventFrame, ServerLifecycleFrame, ServerMessage, ServerMessageSchema, ServerPongFrame, ServerReplayMarkerFrame, ServerRpcFailure, ServerRpcSuccess, ServerSubscribedFrame, ServerUnsubscribedFrame, TICKET_SUBPROTOCOL_PREFIX, VERSION, closeCodeFor, closeCodeReason, formatTicketSubprotocol, isCancelledNotification, isErrorFrame, isEventFrame, isInitializeRequest, isLifecycleFrame, isPingRequest, isPongFrame, isReplayMarkerFrame, isRpcFailure, isRpcSuccess, isRunCancelRequest, isSubscribeRequest, isSubscribedFrame, isUnsubscribeRequest, isUnsubscribedFrame, negotiateSubprotocol, parseTicketSubprotocol };
27
26
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;AAiBA;;;;;;;;;;cAAa,OAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;AAmBA;;;;;;;;;cAAa"}
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { version } from "./package.js";
1
2
  import { ClientMessageSchema, isCancelledNotification, isInitializeRequest, isPingRequest, isRunCancelRequest, isSubscribeRequest, isUnsubscribeRequest } from "./client-message.js";
2
3
  import { CLOSE_CODE_VALUES, closeCodeFor, closeCodeReason } from "./close-codes.js";
3
4
  import { RPC_ERROR_CODES, ServerMessageSchema, isErrorFrame, isEventFrame, isLifecycleFrame, isPongFrame, isReplayMarkerFrame, isRpcFailure, isRpcSuccess, isSubscribedFrame, isUnsubscribedFrame } from "./server-message.js";
@@ -19,8 +20,8 @@ import { PROTOCOL_VERSION, SUBPROTOCOL_NAME, TICKET_SUBPROTOCOL_PREFIX, formatTi
19
20
  *
20
21
  * @packageDocumentation
21
22
  */
22
- /** Canonical version constant. Mirrors the `package.json` version. */
23
- const VERSION = "0.6.0";
23
+ /** Canonical version constant, derived from `package.json` at build time. */
24
+ const VERSION = version;
24
25
 
25
26
  //#endregion
26
27
  export { CLOSE_CODE_VALUES, ClientMessageSchema, PROTOCOL_VERSION, RPC_ERROR_CODES, SUBPROTOCOL_NAME, ServerMessageSchema, TICKET_SUBPROTOCOL_PREFIX, VERSION, closeCodeFor, closeCodeReason, formatTicketSubprotocol, isCancelledNotification, isErrorFrame, isEventFrame, isInitializeRequest, isLifecycleFrame, isPingRequest, isPongFrame, isReplayMarkerFrame, isRpcFailure, isRpcSuccess, isRunCancelRequest, isSubscribeRequest, isSubscribedFrame, isUnsubscribeRequest, isUnsubscribedFrame, negotiateSubprotocol, parseTicketSubprotocol };
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * `@graphorin/protocol` - wire-format contract for the Graphorin\n * WebSocket subprotocol.\n *\n * The package is the **single source of truth** for the shape of\n * every frame exchanged over `wss://.../v1/ws`. Both\n * `@graphorin/server` and `@graphorin/client` import their schemas\n * from here so the two implementations cannot drift.\n *\n * Browser-friendly: the only runtime dependency is\n * [`zod`](https://zod.dev). No Node-only imports, no DOM-only\n * imports.\n *\n * @packageDocumentation\n */\n\n/** Canonical version constant. Mirrors the `package.json` version. */\nexport const VERSION = '0.6.0';\n\nexport * from './client-message.js';\nexport * from './close-codes.js';\nexport * from './server-message.js';\nexport * from './subprotocol.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAiBA,MAAa,UAAU"}
1
+ {"version":3,"file":"index.js","names":["VERSION: string","pkg.version"],"sources":["../src/index.ts"],"sourcesContent":["/**\n * `@graphorin/protocol` - wire-format contract for the Graphorin\n * WebSocket subprotocol.\n *\n * The package is the **single source of truth** for the shape of\n * every frame exchanged over `wss://.../v1/ws`. Both\n * `@graphorin/server` and `@graphorin/client` import their schemas\n * from here so the two implementations cannot drift.\n *\n * Browser-friendly: the only runtime dependency is\n * [`zod`](https://zod.dev). No Node-only imports, no DOM-only\n * imports.\n *\n * @packageDocumentation\n */\n\n/** Canonical version constant, derived from `package.json` at build time. */\nimport pkg from '../package.json' with { type: 'json' };\n\nexport const VERSION: string = pkg.version;\n\nexport * from './client-message.js';\nexport * from './close-codes.js';\nexport * from './server-message.js';\nexport * from './subprotocol.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAmBA,MAAaA,UAAkBC"}
@@ -0,0 +1,6 @@
1
+ //#region package.json
2
+ var version = "0.6.1";
3
+
4
+ //#endregion
5
+ export { version };
6
+ //# sourceMappingURL=package.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package.js","names":[],"sources":["../package.json"],"sourcesContent":["{\n \"name\": \"@graphorin/protocol\",\n \"version\": \"0.6.1\",\n \"description\": \"Wire protocol contract for the Graphorin framework: Zod schemas + TypeScript types for the WebSocket subprotocol `graphorin.protocol.v1`. Defines the `ClientMessage` and `ServerMessage` discriminated unions, the JSON-RPC-shaped control channel (`initialize` / `subscription.subscribe` / `subscription.unsubscribe` / `run.cancel` / `ping`), the typed event push frames (`{ kind: 'event', subject, type, payload, eventId }`), the asynchronous server-initiated error frames (`{ kind: 'error', code, message }`), the subprotocol negotiation helpers, and the close-code taxonomy (4001 auth.required, 4002 auth.invalid, 4003 auth.revoked, 4004 auth.scope_denied, 4005 rate.limited, 4006 flow.throttled, 4007 server.shutdown, 4008 protocol.violation). Browser-friendly: zero Node-only dependencies; the only runtime dependency is `zod`. Created and maintained by Oleksiy Stepurenko.\",\n \"license\": \"MIT\",\n \"author\": \"Oleksiy Stepurenko\",\n \"homepage\": \"https://github.com/o-stepper/graphorin/tree/main/packages/protocol\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/o-stepper/graphorin.git\",\n \"directory\": \"packages/protocol\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/o-stepper/graphorin/issues\"\n },\n \"keywords\": [\n \"graphorin\",\n \"ai\",\n \"agents\",\n \"framework\",\n \"protocol\",\n \"websocket\",\n \"subprotocol\",\n \"zod\",\n \"wire-format\",\n \"browser-friendly\"\n ],\n \"type\": \"module\",\n \"engines\": {\n \"node\": \">=22.0.0\"\n },\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"sideEffects\": false,\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.js\"\n },\n \"./client-message\": {\n \"types\": \"./dist/client-message.d.ts\",\n \"import\": \"./dist/client-message.js\"\n },\n \"./server-message\": {\n \"types\": \"./dist/server-message.d.ts\",\n \"import\": \"./dist/server-message.js\"\n },\n \"./subprotocol\": {\n \"types\": \"./dist/subprotocol.d.ts\",\n \"import\": \"./dist/subprotocol.js\"\n },\n \"./close-codes\": {\n \"types\": \"./dist/close-codes.d.ts\",\n \"import\": \"./dist/close-codes.js\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"files\": [\n \"dist\",\n \"README.md\",\n \"CHANGELOG.md\",\n \"LICENSE\"\n ],\n \"scripts\": {\n \"build\": \"tsdown\",\n \"typecheck\": \"tsc --noEmit && tsc -p tsconfig.tests.json\",\n \"test\": \"vitest run\",\n \"lint\": \"biome check .\",\n \"clean\": \"rimraf dist .turbo *.tsbuildinfo\"\n },\n \"dependencies\": {\n \"zod\": \"^3.25.0\"\n },\n \"publishConfig\": {\n \"access\": \"public\",\n \"provenance\": true\n }\n}\n"],"mappings":";cAEa"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphorin/protocol",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Wire protocol contract for the Graphorin framework: Zod schemas + TypeScript types for the WebSocket subprotocol `graphorin.protocol.v1`. Defines the `ClientMessage` and `ServerMessage` discriminated unions, the JSON-RPC-shaped control channel (`initialize` / `subscription.subscribe` / `subscription.unsubscribe` / `run.cancel` / `ping`), the typed event push frames (`{ kind: 'event', subject, type, payload, eventId }`), the asynchronous server-initiated error frames (`{ kind: 'error', code, message }`), the subprotocol negotiation helpers, and the close-code taxonomy (4001 auth.required, 4002 auth.invalid, 4003 auth.revoked, 4004 auth.scope_denied, 4005 rate.limited, 4006 flow.throttled, 4007 server.shutdown, 4008 protocol.violation). Browser-friendly: zero Node-only dependencies; the only runtime dependency is `zod`. Created and maintained by Oleksiy Stepurenko.",
5
5
  "license": "MIT",
6
6
  "author": "Oleksiy Stepurenko",