@kybernesis/create 0.3.0 → 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/dist/doctor.js
CHANGED
|
@@ -45,10 +45,13 @@ export async function doctor() {
|
|
|
45
45
|
if (env.ARCANA_API_KEY && env.ARCANA_COMPANY_WORKSPACE)
|
|
46
46
|
arcanaPairs.push({ key: env.ARCANA_API_KEY, ws: env.ARCANA_COMPANY_WORKSPACE, label: "company brain" });
|
|
47
47
|
if (env.ARCANA_EVAL_API_KEY) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
// Match both `WORKSPACE=name-eval` and the shell-default form
|
|
49
|
+
// `WORKSPACE=${ARCANA_EVAL_WORKSPACE:-name-eval}`.
|
|
50
|
+
const script = pkg.scripts?.eval ?? "";
|
|
51
|
+
const evalWs = /=\$\{[A-Z0-9_]+:-([a-z0-9][a-z0-9-]*-eval)\}/.exec(script) ??
|
|
52
|
+
/=([a-z0-9][a-z0-9-]*-eval)\b/.exec(script);
|
|
53
|
+
if (evalWs?.[1])
|
|
54
|
+
arcanaPairs.push({ key: env.ARCANA_EVAL_API_KEY, ws: evalWs[1], label: "eval workspace" });
|
|
52
55
|
}
|
|
53
56
|
for (const [k, v] of Object.entries(env)) {
|
|
54
57
|
const m = /^ARCANA_([A-Z0-9_]+)_API_KEY$/.exec(k);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kybernesis/create",
|
|
3
|
-
"version": "0.3.
|
|
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",
|
|
@@ -33,7 +33,23 @@ model under test.
|
|
|
33
33
|
- Stale sandbox state (migration errors, re-baking templates):
|
|
34
34
|
`rm -rf .eve/sandbox-cache .eve/dev-runtime` and rerun.
|
|
35
35
|
- Don't pipe the eval command through `tail` in scripts — it masks the exit
|
|
36
|
-
code
|
|
36
|
+
code (and `| tail -N` on a backgrounded run destroys the per-eval detail —
|
|
37
|
+
`tee` to a file instead).
|
|
38
|
+
- **Heavy-model suites: `maxConcurrency: 1` locally.** At 2, long opus turns
|
|
39
|
+
overload the local world-queue transport (`Queue delivery failed … fetch
|
|
40
|
+
failed`); crashed deliveries REPLAY subagent steps, surfacing as
|
|
41
|
+
`lost continuationToken` races and phantom failures that move between runs.
|
|
42
|
+
The deployed runtime uses real queue infra — this is a local-harness limit.
|
|
43
|
+
- **AI Gateway budget is a silent eval killer**: Vercel applies a default
|
|
44
|
+
per-project budget (e.g. $10/daily); a suite of real opus turns can exhaust
|
|
45
|
+
it MID-RUN → `MODEL_CALL_FAILED` on whatever ran last. Check/raise:
|
|
46
|
+
`vercel ai-gateway budgets list` / `budgets set project <name> --limit 30
|
|
47
|
+
--refresh-period monthly`.
|
|
48
|
+
- **"run parked on N unanswered input request(s)"** = the agent called a
|
|
49
|
+
human-in-the-loop tool (`approval: status=pending tool=ask_question` in the
|
|
50
|
+
turn log) — no one answers in an eval. Usually a behavior finding: the
|
|
51
|
+
fixture was self-contained and the agent asked instead of acting. Fix the
|
|
52
|
+
agent's bias-to-act instructions, not the fixture.
|
|
37
53
|
|
|
38
54
|
## eve version certification
|
|
39
55
|
|
|
@@ -18,7 +18,11 @@ able to *initiate*.
|
|
|
18
18
|
2. **Vercel identities** of both projects: team slug + project name as shown in
|
|
19
19
|
`npx vercel ls <project>` (slugs, not `team_…`/`prj_…` IDs).
|
|
20
20
|
3. **Stable production URL** of the callee: `npx vercel inspect <latest-prod-url>`
|
|
21
|
-
→ Aliases
|
|
21
|
+
→ Aliases — then **verify the alias is OPEN before wiring it**:
|
|
22
|
+
`curl -s -o /dev/null -w "%{http_code}" <url>/eve/v1/health` must return
|
|
23
|
+
**200**. The `<project>-<team>.vercel.app` aliases commonly sit behind
|
|
24
|
+
Vercel SSO deployment protection (302 → vercel.com/sso-api) and CANNOT
|
|
25
|
+
receive dispatches; the shorter production alias is usually the open one.
|
|
22
26
|
4. Both repos need `@kybernesis/dispatch` installed (`npm i @kybernesis/dispatch`).
|
|
23
27
|
|
|
24
28
|
## Caller side — one file
|
|
@@ -86,3 +90,30 @@ the peer by hand to BOTH the `vercelOidc({ subjects })` list and the
|
|
|
86
90
|
- **Works locally, 401 in production** → caller's OIDC not accepted: the
|
|
87
91
|
receiver's `trustedPeers` names the wrong environment (default is
|
|
88
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
|