@polycore/runner 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polycore/runner",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "private": false,
5
5
  "description": "Polycore runner: executes governed, read-only-constrained connectors against a customer's datastores. Runs in the customer's own infrastructure; holds scoped credentials and connects outbound to the control plane.",
6
6
  "type": "module",
@@ -30,7 +30,7 @@
30
30
  "tsx": "4.21.0",
31
31
  "ws": "8.18.3",
32
32
  "zod": "4.4.3",
33
- "@polycore/protocol": "^0.4.0"
33
+ "@polycore/protocol": "^0.5.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/node": "25.6.2",
package/src/connect.ts CHANGED
@@ -26,6 +26,9 @@ export function describeConnectors(
26
26
  hazard: capability.hazard,
27
27
  kind: capability.kind,
28
28
  params: z.toJSONSchema(capability.params),
29
+ ...(capability.output === undefined
30
+ ? {}
31
+ : { result: z.toJSONSchema(capability.output) }),
29
32
  }));
30
33
  }
31
34
 
package/src/connector.ts CHANGED
@@ -93,6 +93,8 @@ export interface RegisteredCapability {
93
93
  readonly hazard: Hazard;
94
94
  readonly kind: CapabilityKind;
95
95
  readonly params: z.ZodType;
96
+ /** The result schema, when the capability declares one (actions do). */
97
+ readonly output?: z.ZodType;
96
98
  run(args: unknown, ctx: ConnectorContext): Promise<unknown>;
97
99
  }
98
100
 
@@ -203,6 +205,7 @@ export class ConnectorRegistry {
203
205
  hazard: action.hazard ?? "write",
204
206
  kind: "action",
205
207
  params: action.input,
208
+ output: action.output,
206
209
  run: (args, ctx) =>
207
210
  Promise.resolve(
208
211
  action.run({