@polycore/protocol 0.1.0 → 0.3.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 +14 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polycore/protocol",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.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
|
@@ -14,8 +14,12 @@ export const connectorDescriptorSchema = z.object({
|
|
|
14
14
|
name: z.string().min(1),
|
|
15
15
|
description: z.string(),
|
|
16
16
|
effect: z.string(),
|
|
17
|
-
/**
|
|
18
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Whether this is a built-in connector, a customer-authored action, or the
|
|
19
|
+
* generic delegated-workload executor (`workload.execute`), which runs
|
|
20
|
+
* human-approved arbitrary code in an isolated sandbox on the runner host.
|
|
21
|
+
*/
|
|
22
|
+
kind: z.enum(["connector", "action", "workload"]).default("connector"),
|
|
19
23
|
params: z.record(z.string(), z.unknown()),
|
|
20
24
|
});
|
|
21
25
|
|
|
@@ -35,6 +39,14 @@ export const projectAdvertisementSchema = z.object({
|
|
|
35
39
|
slug: z.string().min(1),
|
|
36
40
|
/** The environments this project can target (e.g. `["dev","prod"]`). */
|
|
37
41
|
environments: z.array(z.string().min(1)).min(1),
|
|
42
|
+
/**
|
|
43
|
+
* The environment an unqualified ask targets. Advertised from the runner's
|
|
44
|
+
* committed config (`defaultEnvironment`) so it is the single source of truth
|
|
45
|
+
* for the project's default; the control plane uses it as the front-door
|
|
46
|
+
* default (a per-front-door override still wins). Ignored when it is not one
|
|
47
|
+
* of `environments`; absent falls back to the first advertised environment.
|
|
48
|
+
*/
|
|
49
|
+
defaultEnvironment: z.string().min(1).optional(),
|
|
38
50
|
/** The capabilities callable on this project. */
|
|
39
51
|
connectors: z.array(connectorDescriptorSchema),
|
|
40
52
|
/** Optional agent grounding for this project (markdown/plain text). */
|