@polycore/protocol 0.4.0 → 0.5.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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/messages.ts +8 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polycore/protocol",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "private": false,
5
5
  "description": "Polycore control-plane and runner wire contract: message schemas and signed-envelope helpers. Pure (zod + node:crypto), no transport.",
6
6
  "type": "module",
package/src/messages.ts CHANGED
@@ -3,7 +3,7 @@ import { z } from "zod";
3
3
  import { dispatchEnvelopeSchema } from "./envelope.js";
4
4
 
5
5
  /** Bumped on any breaking change to the wire messages. */
6
- export const PROTOCOL_VERSION = 4;
6
+ export const PROTOCOL_VERSION = 5;
7
7
 
8
8
  /**
9
9
  * What a runner advertises about one connector at enrollment, so the
@@ -29,6 +29,13 @@ export const connectorDescriptorSchema = z.object({
29
29
  */
30
30
  kind: z.enum(["connector", "action", "workload"]).default("connector"),
31
31
  params: z.record(z.string(), z.unknown()),
32
+ /**
33
+ * JSON Schema of the capability's *result*. Actions declare an output schema,
34
+ * so a caller (a page author, the agent) is grounded in the exact result
35
+ * shape instead of guessing field names and nesting. Generic connectors have
36
+ * no declared output shape, so they omit it.
37
+ */
38
+ result: z.record(z.string(), z.unknown()).optional(),
32
39
  });
33
40
 
34
41
  export type ConnectorDescriptor = z.infer<typeof connectorDescriptorSchema>;