@kybernesis/create 0.3.1 → 0.3.2

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": "@kybernesis/create",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "The Kybernesis agent scaffolder and FDE toolkit: one command to a governed, remembering, multiplayer, self-testing eve agent — plus doctor and upgrade.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -90,3 +90,30 @@ the peer by hand to BOTH the `vercelOidc({ subjects })` list and the
90
90
  - **Works locally, 401 in production** → caller's OIDC not accepted: the
91
91
  receiver's `trustedPeers` names the wrong environment (default is
92
92
  production-only) or wrong project.
93
+
94
+ ## Governed mode (control-plane edges — preferred when the client runs the admin)
95
+
96
+ Instead of hand-enumerated peers, edges are GRANTED in the Kybernesis control
97
+ plane and enforced with 300s A2A tokens. Full lifecycle proven live 2026-08-07
98
+ (grant → dispatch → revoke → refused ≤5 min → re-grant → restored, no deploys).
99
+
100
+ Setup, per agent (admin UI /agents):
101
+ 1. Register both agents as eve deployments — URL must be the OPEN production
102
+ alias (health 200; forms sanitize pasted punctuation as of this writing).
103
+ 2. Grant the edge on the CALLEE's panel ("Agent-to-agent edges" → allow calls
104
+ from <caller> + purpose; expiry optional — self-destructing edge).
105
+ 3. Mint each agent's credential (shown ONCE) → set as Sensitive env
106
+ `KYBERNESIS_AGENT_CREDENTIAL` on that agent's Vercel project.
107
+
108
+ Then in code (dispatch ≥0.2.1 + enterprise ≥0.2.0 both installed):
109
+ - caller: `remotePeer({ callee: "<EXACT registered name>", governed: { issuer },
110
+ envVar, fallbackUrl, description })` — envVar/fallbackUrl kept as overrides;
111
+ registry supplies the URL when the credential is present.
112
+ - receiver: `dispatchChannel({ governed: { issuer, agent: "<own name>" } })`.
113
+
114
+ Gotchas: names are case-sensitive ("Kyber" ≠ "kyber" — copy from the admin);
115
+ credentials are one JWS line ~3 segments, an ES256 signature is 86 base64url
116
+ chars — a truncated paste fails verification silently, so length-check it;
117
+ scheduled/cron turns still forward no human (service identity at the peer);
118
+ the deployed agent's model spend shares the project's AI Gateway budget with
119
+ local eval runs — size the budget for BOTH or production goes model-dead.
@@ -49,6 +49,17 @@ then `eve add @kybernesis/<item>`). Each covers one axis:
49
49
  versions (old receivers silently drop forwarding → service identity).
50
50
  Composes with enterprise via `extraAuth: [kybernesisAuth(...)]`. See the
51
51
  `connect-agents` skill for the end-to-end wiring flow.
52
+ **GOVERNED mode (≥0.2.1, proven live 2026-08-07):** `remotePeer({ callee:
53
+ "<registered-name>", governed: { issuer } })` + `dispatchChannel({ governed:
54
+ { issuer, agent } })` — edges granted in the control plane, outbound auth =
55
+ a 300s A2A token minted from POST /api/agent/session with the deployment's
56
+ `KYBERNESIS_AGENT_CREDENTIAL`, callee URL from the registry (envVar
57
+ overrides). Revoke in the admin → refused within the token TTL, no
58
+ redeploy. Names match EXACTLY (case-sensitive: "Kyber" ≠ "kyber").
59
+ Requires @kybernesis/enterprise ≥0.2.0 installed (optional peer, lazy).
60
+ 0.2.1 lesson: eve resolves remote URLs at BOOT — url() must degrade
61
+ (env → discovery-if-credentialed → fallbackUrl), never throw on a missing
62
+ credential, or the whole agent (and its evals) fails to boot.
52
63
  - **evals** — QA. `kybernesisBaseline({ agentDisplayName, routing,
53
64
  engineer? })` = smoke + 5 memory + routing per dept + optional vision-loop
54
65
  eval. Judge model ≠ model under test. Hermetic runs force all workspaces to