@kybernesis/create 0.7.14 → 0.8.1
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/credential.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { execFileSync } from "node:child_process";
|
|
2
2
|
import { existsSync, readFileSync } from "node:fs";
|
|
3
|
+
import { hostname } from "node:os";
|
|
3
4
|
import { join } from "node:path";
|
|
4
5
|
import { upsertEnv } from "./envfile.js";
|
|
5
6
|
import { signIn } from "./register.js";
|
|
@@ -34,6 +35,19 @@ function envOf(dir) {
|
|
|
34
35
|
}
|
|
35
36
|
return out;
|
|
36
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Is this machine the SSH target we were about to dial?
|
|
40
|
+
*
|
|
41
|
+
* Compared on the short name as well as the full one, because a host that
|
|
42
|
+
* answers to `box.example.xyz` usually reports itself as `box` — and the env
|
|
43
|
+
* file names whichever the person happened to type.
|
|
44
|
+
*/
|
|
45
|
+
function isThisHost(target) {
|
|
46
|
+
const self = hostname().toLowerCase();
|
|
47
|
+
const short = self.split(".")[0] ?? self;
|
|
48
|
+
const wanted = target.toLowerCase();
|
|
49
|
+
return wanted === self || wanted === short || wanted.split(".")[0] === short;
|
|
50
|
+
}
|
|
37
51
|
export async function credential(options) {
|
|
38
52
|
const dir = options.dir ?? process.cwd();
|
|
39
53
|
const env = envOf(dir);
|
|
@@ -85,9 +99,19 @@ export async function credential(options) {
|
|
|
85
99
|
// leaves discovery silent, because `kyb deploy` deliberately never overwrites
|
|
86
100
|
// a host .env.local that already exists.
|
|
87
101
|
const target = options.host ?? env.EVE_SSH_HOST ?? (env.EXE_VM_NAME ? `${env.EXE_VM_NAME}.exe.xyz` : null);
|
|
88
|
-
|
|
102
|
+
// Already ON the host it would otherwise SSH to.
|
|
103
|
+
//
|
|
104
|
+
// Naming a host is how a laptop installs the credential where the agent will
|
|
105
|
+
// read it. Run the same command on that host — the natural thing to do while
|
|
106
|
+
// setting one up over SSH — and it dialled itself, needed a key the host does
|
|
107
|
+
// not hold for itself, and failed at the last step of an otherwise complete
|
|
108
|
+
// sign-in. The file it wanted to write was already under the cursor.
|
|
109
|
+
const onTargetHost = target !== null && isThisHost(target);
|
|
110
|
+
if (options.local || !target || onTargetHost) {
|
|
89
111
|
upsertEnv(dir, { KYBERNESIS_AGENT_CREDENTIAL: value });
|
|
90
112
|
console.log(green("\n ✓ credential written to ./.env.local"));
|
|
113
|
+
if (onTargetHost)
|
|
114
|
+
console.log(dim(` This IS ${target}, so there was nothing to copy.`));
|
|
91
115
|
if (!target)
|
|
92
116
|
console.log(dim(" No host known — deploy it, or re-run with --host=<ssh target>."));
|
|
93
117
|
return;
|
package/dist/upgrade.js
CHANGED
|
@@ -20,11 +20,37 @@ function versionLt(a, b) {
|
|
|
20
20
|
}
|
|
21
21
|
return false;
|
|
22
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Warn when this CLI is itself out of date.
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* The certified eve version is a constant compiled INTO this tool, so an old
|
|
28
|
+
* kyb reports an old pin as though it were current — and does it with total
|
|
29
|
+
* confidence, in the one command whose entire job is telling you what current
|
|
30
|
+
* means. That failure runs the wrong way round: it tells a healthy agent it is
|
|
31
|
+
* ahead of certified and in "unsupported territory", which invites someone to
|
|
32
|
+
* downgrade a fleet that was fine.
|
|
33
|
+
*
|
|
34
|
+
* Checked here rather than at install because this is the command where being
|
|
35
|
+
* stale changes the answer.
|
|
36
|
+
*/
|
|
37
|
+
function warnIfStale() {
|
|
38
|
+
const installed = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version;
|
|
39
|
+
const latest = capture("npm", ["view", "@kybernesis/create", "version"])?.trim();
|
|
40
|
+
if (!latest || latest === installed)
|
|
41
|
+
return;
|
|
42
|
+
if (!versionLt(installed, latest))
|
|
43
|
+
return;
|
|
44
|
+
console.log(` ${yellow("!")} kyb ${installed} is behind ${latest}. The certified eve version is ` +
|
|
45
|
+
`compiled into this tool, so an old kyb reports an old pin as current.`);
|
|
46
|
+
console.log(` ${dim("npm install -g @kybernesis/create@latest")}\n`);
|
|
47
|
+
}
|
|
23
48
|
export async function upgrade(skipEval) {
|
|
24
49
|
const cwd = process.cwd();
|
|
25
50
|
const pkg = JSON.parse(readFileSync(join(cwd, "package.json"), "utf8"));
|
|
26
51
|
const deps = { ...pkg.dependencies, ...pkg.devDependencies };
|
|
27
52
|
console.log(bold("\nkyb upgrade — checking @kybernesis/* and eve against npm\n"));
|
|
53
|
+
warnIfStale();
|
|
28
54
|
const toUpgrade = [];
|
|
29
55
|
for (const name of PACKAGES) {
|
|
30
56
|
if (!deps[name])
|
package/dist/util.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const EVE_VERSION = "0.
|
|
1
|
+
export declare const EVE_VERSION = "0.38.3";
|
|
2
2
|
export declare const REGISTRY_URL = "https://registry.kybernesis.ai/r/{name}.json";
|
|
3
3
|
export declare const DEFAULT_ISSUER = "https://agent.kybernesis.ai";
|
|
4
4
|
export declare const green: (s: string) => string;
|
package/dist/util.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { spawnSync } from "node:child_process";
|
|
2
2
|
import { createInterface } from "node:readline/promises";
|
|
3
|
-
export const EVE_VERSION = "0.
|
|
3
|
+
export const EVE_VERSION = "0.38.3";
|
|
4
4
|
export const REGISTRY_URL = "https://registry.kybernesis.ai/r/{name}.json";
|
|
5
5
|
export const DEFAULT_ISSUER = "https://agent.kybernesis.ai";
|
|
6
6
|
const TTY = process.stdout.isTTY === true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kybernesis/create",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
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",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
33
|
"build": "tsc -p tsconfig.build.json",
|
|
34
|
-
"
|
|
34
|
+
"prepack": "tsc -p tsconfig.build.json",
|
|
35
35
|
"typecheck": "tsc --noEmit",
|
|
36
36
|
"prepublishOnly": "node ../../scripts/prepublish.mjs"
|
|
37
37
|
},
|
|
@@ -185,7 +185,7 @@ something. Chase them a week out — an unprovisioned Vercel team on Day 1 costs
|
|
|
185
185
|
`@kybernesis/arcana@0.1.1`, `@kybernesis/enterprise@0.1.2`,
|
|
186
186
|
`@kybernesis/multiplayer@0.1.0`, `@kybernesis/evals@0.2.1`,
|
|
187
187
|
`@kybernesis/create@0.1.4`, `@kybernesis/engineer@0.2.0`, and
|
|
188
|
-
`eve@0.
|
|
188
|
+
`eve@0.38.3` (the Kybernesis-certified version). All public on npm;
|
|
189
189
|
`kyb doctor` checks the wiring.
|
|
190
190
|
|
|
191
191
|
---
|
|
@@ -349,8 +349,8 @@ npx eve registry view @kybernesis/arcana
|
|
|
349
349
|
### 3.4 Pin your versions
|
|
350
350
|
|
|
351
351
|
Before you install anything else, decide and record the versions this engagement pins.
|
|
352
|
-
Put them in the repo README. Pin `eve@0.
|
|
353
|
-
(certification run 2026-08-
|
|
352
|
+
Put them in the repo README. Pin `eve@0.38.3` — the **Kybernesis-certified** version
|
|
353
|
+
(certification run 2026-08-17: full suite green; one schedule API change, see HANDOFF). Never pin blind
|
|
354
354
|
npm-latest; `kyb upgrade` carries a client to the certified pin behind their own eval
|
|
355
355
|
gate, and that upgrade is a **deliberate, eval-gated step**, never something that
|
|
356
356
|
happens by accident mid-pilot.
|
|
@@ -82,9 +82,10 @@ then `eve add @kybernesis/<item>`). Each covers one axis:
|
|
|
82
82
|
same shape as eve's `experimental_chatgpt()`), `hostPreflight()`, Photon
|
|
83
83
|
iMessage credentials, and a `/preview` tool. Subpaths: `/slack`, `/photon`,
|
|
84
84
|
`/sandbox`, `/preview`. See the `self-hosting` skill.
|
|
85
|
-
- **evals** — QA. `kybernesisBaseline({ agentDisplayName, routing,
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
- **evals** — QA. `kybernesisBaseline({ agentDisplayName, routing, engineer?,
|
|
86
|
+
safety? })` = smoke + 5 memory + 1 safety (quoted content is data, on by
|
|
87
|
+
default) + routing per dept + optional engineer pair (vision loop, push-to-main
|
|
88
|
+
refusal). Judge model ≠ model under test. Hermetic runs force all workspaces to
|
|
88
89
|
`<name>-eval` via the npm script.
|
|
89
90
|
- **create** — the `kyb` CLI, and the whole lifecycle of an agent:
|
|
90
91
|
`init` (scaffold; `--host=exe` also installs the hardened restart script),
|
|
@@ -110,7 +111,7 @@ then `eve add @kybernesis/<item>`). Each covers one axis:
|
|
|
110
111
|
asterisks onto the URL in Slack and breaks it. Coach agents in prose, not
|
|
111
112
|
shell (WAFs eat shell-syntax Slack messages).
|
|
112
113
|
- **ESM packaging**: relative imports need `.js` extensions (tsc doesn't
|
|
113
|
-
rewrite); eve is a peer dep with an explicit range (`>=0.
|
|
114
|
+
rewrite); eve is a peer dep with an explicit range (`>=0.38.0 <0.39.0`),
|
|
114
115
|
pinned exactly in devDeps.
|
|
115
116
|
- **Eval fixtures are hardened on purpose** — in-test nonces (eve caches
|
|
116
117
|
compiled eval modules), per-run unique keys (workspaces accumulate),
|