@kybernesis/create 0.23.2 → 0.24.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/README.md CHANGED
@@ -116,6 +116,12 @@ run and upgrade exits with status 2, prints that the gate can only run on the
116
116
  host, and gives the exact ssh command. It does not print "Do NOT deploy" because
117
117
  no eval exercised the code.
118
118
 
119
+ `kyb upgrade --check` plans only: it prints what would change as one
120
+ `KYB_UPGRADE_PLAN {"ok":true,"changes":[{"name","from","to"}],"resetsConversations":false}`
121
+ line and installs, repairs and renews nothing. `@kybernesis/manage` reads it for
122
+ the owner's Update card, and runs the real upgrade (with its eval gate, then a
123
+ rebuild and a safe restart, or everything put back) from that card.
124
+
119
125
  Use `kyb upgrade --host` to run the gate over ssh after the upgrade. The target
120
126
  uses the same defaults as `kyb deploy`: `EVE_SSH_HOST`, then
121
127
  `$EXE_VM_NAME.exe.xyz`; `--host=<ssh-target>` overrides them. The remote project
package/dist/buzz.d.ts CHANGED
@@ -15,7 +15,7 @@
15
15
  * Channels page (manage's `buzz.join`), which writes the relay, publishes the
16
16
  * agent's profile and starts the bridge.
17
17
  */
18
- export declare const BUZZ_PACKAGE = "@kybernesis/buzz@^0.10.2";
18
+ export declare const BUZZ_PACKAGE = "@kybernesis/buzz@^0.11.0";
19
19
  export declare const BUZZ_EXTENSION_MOUNT: string;
20
20
  /** Where the agent's Buzz key lives: inside the agent, so the bridge and the agent read the same file. */
21
21
  export declare function buzzKeyPath(appDir: string): string;
package/dist/buzz.js CHANGED
@@ -20,7 +20,7 @@ import { bold, capture, dim, green, red, run, yellow } from "./util.js";
20
20
  * Channels page (manage's `buzz.join`), which writes the relay, publishes the
21
21
  * agent's profile and starts the bridge.
22
22
  */
23
- export const BUZZ_PACKAGE = "@kybernesis/buzz@^0.10.2";
23
+ export const BUZZ_PACKAGE = "@kybernesis/buzz@^0.11.0";
24
24
  export const BUZZ_EXTENSION_MOUNT = `// The agent's hands in Buzz: projects, issues, pull requests, patches, repos,\n` +
25
25
  `// long-form notes, channel canvases, workflows, the feed, media — everything the\n` +
26
26
  `// workspace has beyond talking, which the bridge alone does not provide.\n` +
package/dist/cli.js CHANGED
@@ -84,7 +84,7 @@ const COMMANDS = {
84
84
  credential: "Write the agent credential onto a host (--local to stay here).",
85
85
  register: "Register this agent with the control plane (--name, --url).",
86
86
  deploy: "Deploy this agent to its host (--no-env to leave the env file alone).",
87
- upgrade: "Bring @kybernesis packages and eve to certified versions (--host, --skip-eval, --allow-stale, --yes).",
87
+ upgrade: "Bring @kybernesis packages and eve to certified versions (--check, --host, --skip-eval, --allow-stale, --yes).",
88
88
  tui: "Talk to your agents in the terminal.",
89
89
  version: "Print the version of this tool.",
90
90
  };
@@ -116,6 +116,7 @@ function usage(command) {
116
116
  --host[=<target>] ${dim("run the eval gate over ssh; defaults like kyb deploy")}
117
117
  --skip-eval ${dim("skip the eval gate")}
118
118
  --allow-stale ${dim("continue even when this kyb is behind the published version")}
119
+ --check ${dim("print what would change (one KYB_UPGRADE_PLAN json line) and change nothing")}
119
120
  --yes, -y ${dim("confirm an eve version change noninteractively")}
120
121
  `);
121
122
  }
@@ -179,6 +180,7 @@ switch (command) {
179
180
  case "upgrade":
180
181
  await upgrade({
181
182
  allowStale: rest.includes("--allow-stale"),
183
+ check: rest.includes("--check"),
182
184
  host: optionalValueFlag(rest, "host"),
183
185
  skipEval: rest.includes("--skip-eval"),
184
186
  yes: rest.includes("--yes") || rest.includes("-y"),
package/dist/upgrade.d.ts CHANGED
@@ -29,6 +29,12 @@ export type GithubToolsMountRepair = {
29
29
  export declare function repairGithubToolsMount(cwd: string): GithubToolsMountRepair;
30
30
  export interface UpgradeOptions {
31
31
  allowStale?: boolean;
32
+ /**
33
+ * Plan only: print what an upgrade would change as one `KYB_UPGRADE_PLAN <json>`
34
+ * line and touch nothing (no install, no repair, no renewal of kyb itself).
35
+ * The owner's Update card reads it through @kybernesis/manage.
36
+ */
37
+ check?: boolean;
32
38
  host?: true | string;
33
39
  skipEval?: boolean;
34
40
  yes?: boolean;
@@ -40,5 +46,7 @@ type EvalGatePreflight = {
40
46
  reasons: string[];
41
47
  };
42
48
  export declare function preflightEvalGate(cwd: string): Promise<EvalGatePreflight>;
49
+ /** The one line `kyb upgrade --check` prints for a program to read; everything else it prints is for people. */
50
+ export declare const UPGRADE_PLAN_PREFIX = "KYB_UPGRADE_PLAN ";
43
51
  export declare function upgrade(options?: UpgradeOptions): Promise<void>;
44
52
  export {};
package/dist/upgrade.js CHANGED
@@ -861,6 +861,11 @@ function startStoppedBridge(cwd, unit) {
861
861
  ` systemctl status ${unit}`);
862
862
  return false;
863
863
  }
864
+ /** The one line `kyb upgrade --check` prints for a program to read; everything else it prints is for people. */
865
+ export const UPGRADE_PLAN_PREFIX = "KYB_UPGRADE_PLAN ";
866
+ function printPlan(plan) {
867
+ console.log(`${UPGRADE_PLAN_PREFIX}${JSON.stringify(plan)}`);
868
+ }
864
869
  export async function upgrade(options = {}) {
865
870
  console.log(bold("\nkyb upgrade — checking @kybernesis/* and eve against npm\n"));
866
871
  const cwd = process.cwd();
@@ -871,7 +876,7 @@ export async function upgrade(options = {}) {
871
876
  ...(pkg.devDependencies ?? {}),
872
877
  };
873
878
  const selfVersion = checkSelfVersion();
874
- if (selfVersion.kind === "stale" && !options.allowStale) {
879
+ if (selfVersion.kind === "stale" && !options.allowStale && !options.check) {
875
880
  /**
876
881
  * A stale kyb that is the PROJECT's own dependency renews itself.
877
882
  *
@@ -957,6 +962,8 @@ export async function upgrade(options = {}) {
957
962
  console.log(dim(` note: eve@${eveLatest} exists upstream; ${EVE_VERSION} is the newest Kybernesis-certified version.`));
958
963
  }
959
964
  if (unresolved.size > 0) {
965
+ if (options.check)
966
+ printPlan({ ok: false, unresolved: [...unresolved].sort(), changes: [], resetsConversations: false });
960
967
  fail(`\nUpgrade planning failed for ${[...unresolved].sort().join(", ")}. ` +
961
968
  `No manifest, dependency tree, or service state was changed.`);
962
969
  return;
@@ -985,6 +992,17 @@ export async function upgrade(options = {}) {
985
992
  const changed = [...new Set(targets
986
993
  .filter((target) => target.installedVersion !== target.targetVersion && !(target.name === "eve" && versionLt(target.targetVersion, target.installedVersion)))
987
994
  .map((target) => `${target.name}@${target.targetVersion}`))];
995
+ if (options.check) {
996
+ printPlan({
997
+ ok: true,
998
+ eve: { installed: eveInstalled ?? null, certified: EVE_VERSION },
999
+ changes: [...new Map(targets
1000
+ .filter((target) => changed.includes(`${target.name}@${target.targetVersion}`))
1001
+ .map((target) => [target.name, { name: target.name, from: target.installedVersion, to: target.targetVersion }])).values()],
1002
+ resetsConversations: eveChanged,
1003
+ });
1004
+ return;
1005
+ }
988
1006
  if (eveChanged && !(await approveEveChange(cwd, options.yes === true, Boolean(deps["@kybernesis/buzz"])))) {
989
1007
  process.exitCode = 1;
990
1008
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kybernesis/create",
3
- "version": "0.23.2",
3
+ "version": "0.24.0",
4
4
  "description": "The Kybernesis agent scaffolder and FDE toolkit: one command to a governed, remembering, multiplayer, self-testing eve agent \u2014 plus doctor and upgrade.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -95,7 +95,7 @@ then `eve add @kybernesis/<item>`). Each covers one axis:
95
95
  `KYBERNESIS_VOICE_OPENAI_KEY`, the owner's key for voice calls, with a `voice`
96
96
  setup item shown when @kybernesis/voice is installed) and the actions
97
97
  `claude.login` (link, then the code on stdin), `linq.signup`/`linq.verify`, `linq.contacts`/`linq.contact.add`/`linq.contact.remove` (who can text a shared line, 0.15),
98
- `link.login`/`link.logout`, `wallet.add` (0.16: adds the payments item to an agent with a computer, rebuilds, rolls back on a failed build, restarts only after a good one), `linq.add` (0.18: the same for the iMessage channel, offered while `agent/channels/linq.ts` is missing, so an agent built without iMessage can answer the line it signs up), `slack.add` (0.19: the control-plane Slack channel via `kyb add channel slack`, offered to a registered agent on its own host with no Slack channel; the client then asks the control plane to make the agent's Slack app), `buzz.add` (0.19: `kyb add buzz` plus a build, answered 202 at once because the Buzz CLI build takes minutes; the `buzz` item reports `busy`, then the Buzz card or why it failed) and `vnc.password`. Every change applies at one restart that
98
+ `link.login`/`link.logout`, `wallet.add` (0.16: adds the payments item to an agent with a computer, rebuilds, rolls back on a failed build, restarts only after a good one), `linq.add` (0.18: the same for the iMessage channel, offered while `agent/channels/linq.ts` is missing, so an agent built without iMessage can answer the line it signs up), `slack.add` (0.19: the control-plane Slack channel via `kyb add channel slack`, offered to a registered agent on its own host with no Slack channel; the client then asks the control plane to make the agent's Slack app), `buzz.add` (0.19: `kyb add buzz` plus a build, answered 202 at once because the Buzz CLI build takes minutes; the `buzz` item reports `busy`, then the Buzz card or why it failed), `buzz.profile` (0.22: sends the owner's name and picture to every Buzz community now; advertised only when the installed `@kybernesis/buzz` is 0.11+) and `vnc.password`. Every change applies at one restart that
99
99
  waits until no conversation is in flight (deploy.sh's count). A BYOK key only
100
100
  takes effect when `agent/agent.ts` uses that provider; status says so.
101
101
  Since 0.12 it also takes `KYB_MODEL_REACH` (`gateway`, `byok`,
@@ -120,7 +120,13 @@ then `eve add @kybernesis/<item>`). Each covers one axis:
120
120
  (kind 7). Wire gotchas: reactions and dm-open go over HTTP with NIP-98 auth,
121
121
  NOT the socket (a socket reaction is accepted and then never appears), and
122
122
  command acks come back as `response:{…}` — parse without stripping that prefix
123
- and a working call reads as a failure.
123
+ and a working call reads as a failure. Its face (0.11): the bridge keeps each
124
+ community's profile in step with the name and picture the OWNER set (control
125
+ plane `GET /api/agent/profile`, agent credential), the `.agent` name filling
126
+ the gaps, every 15 min; the picture (a data URL) is uploaded to the community's
127
+ Blossom store once per change. `profile --sync` runs it now; manage 0.22
128
+ `buzz.profile` is the app's Sync profile button. Below 0.11 the name sync put
129
+ the `.agent` picture back over the owner's.
124
130
 
125
131
  - **evals** — QA. `kybernesisBaseline({ agentDisplayName, routing, engineer?,
126
132
  safety? })` = smoke + 5 memory + 1 safety (quoted content is data, on by