@polycore/protocol 0.3.0 → 0.4.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 +1 -1
- package/src/messages.ts +10 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polycore/protocol",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.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 =
|
|
6
|
+
export const PROTOCOL_VERSION = 4;
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* What a runner advertises about one connector at enrollment, so the
|
|
@@ -13,7 +13,15 @@ export const PROTOCOL_VERSION = 3;
|
|
|
13
13
|
export const connectorDescriptorSchema = z.object({
|
|
14
14
|
name: z.string().min(1),
|
|
15
15
|
description: z.string(),
|
|
16
|
-
|
|
16
|
+
/**
|
|
17
|
+
* How the capability must be gated, the honest description of what it can do:
|
|
18
|
+
* - `read`: no side effects, runs with no human approval.
|
|
19
|
+
* - `write`: a known, declared mutation, runs behind one human approval.
|
|
20
|
+
* - `unknown`: arbitrary code (a delegated workload) whose effect can't be
|
|
21
|
+
* established from a declaration; a human reviews the code before it runs.
|
|
22
|
+
* Defaults to `write` (the safe default: an unclassified capability is gated).
|
|
23
|
+
*/
|
|
24
|
+
hazard: z.enum(["read", "write", "unknown"]).default("write"),
|
|
17
25
|
/**
|
|
18
26
|
* Whether this is a built-in connector, a customer-authored action, or the
|
|
19
27
|
* generic delegated-workload executor (`workload.execute`), which runs
|