@vibest/cli 0.0.1-beta.14 → 0.0.1-beta.16

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/bin/vibest.cjs CHANGED
@@ -9,7 +9,15 @@ let binary
9
9
  try {
10
10
  binary = require.resolve(`@vibest/cli-${target}/bin/vibest`)
11
11
  } catch {
12
- console.error(`vibest: no binary for ${target} (reinstall @vibest/cli without --omit=optional)`)
12
+ // The package manager skipped the optional platform package (bun does at times): the exact command that adds it.
13
+ const pkg = `@vibest/cli-${target}@${require("../package.json").version}`
14
+ const prefix = /^(.+)\/lib\/node_modules\/@vibest\/cli\/bin$/.exec(__dirname)
15
+ const install = __dirname.includes("/.bun/")
16
+ ? `bun add -g ${pkg}`
17
+ : prefix
18
+ ? `npm install -g --prefix ${prefix[1]} ${pkg}`
19
+ : `npm install -g ${pkg}`
20
+ console.error(`vibest: no binary for ${target}; install it with: ${install}`)
13
21
  process.exit(1)
14
22
  }
15
23
 
@@ -6,5 +6,5 @@
6
6
  },
7
7
  "repository": "https://github.com/vibest-dev/vibest",
8
8
  "license": "MIT",
9
- "version": "0.0.1-beta.14"
9
+ "version": "0.0.1-beta.16"
10
10
  }
@@ -143,7 +143,7 @@ function register(on, _options) {
143
143
  return;
144
144
  }),
145
145
  runtime: await host.env("VIBEST_RUNTIME"),
146
- pluginVersion: "0.0.1-beta.14"
146
+ pluginVersion: "0.0.1-beta.16"
147
147
  });
148
148
  const r = await timeout(host.fetch(who.socket, path, { ...headers, "content-type": "application/json" }, JSON.stringify(body)), ms, host.after);
149
149
  const reply = { status: r.status, body: parse(r.text) };
@@ -297,9 +297,9 @@ function register(on, _options) {
297
297
  const text = list?.shift();
298
298
  if (list?.length === 0)
299
299
  full.delete(event.text);
300
- if (text !== undefined)
301
- return next({ ...event, context: [...event.context ?? [], text] });
302
- return next(event);
300
+ if (text === undefined || event.text.trimEnd().endsWith(text.trim()))
301
+ return next(event);
302
+ return next({ ...event, context: [...event.context ?? [], text] });
303
303
  }
304
304
  const who = await identity(host).catch(() => {
305
305
  return;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "vibest",
3
- "version": "0.0.1-beta.14",
3
+ "version": "0.0.1-beta.16",
4
4
  "description": "vibest's Cursor CLI plugin: a session's turn-end result and the tool guard, loaded with `cursor-agent --plugin-dir`."
5
5
  }
@@ -1,5 +1,26 @@
1
1
  #!/bin/sh
2
- # @vibest/cursor 0.0.1-beta.14: `vibest integration guard` before a tool call, `vibest integration prompt` when the user submits, `vibest integration stop` at a turn end.
2
+ # @vibest/cursor 0.0.1-beta.16: `vibest integration guard` before a tool call, `vibest integration prompt` when the user submits, `vibest integration stop` at a turn end.
3
+ # The vibest vibestd started this agent with (VIBEST_COMMAND, a JSON argv), not the first vibest on PATH. A value this
4
+ # cannot read safely (not a JSON array of plain strings: a backslash in it) falls back to PATH.
5
+ vibest() {
6
+ case "${VIBEST_COMMAND:-}" in
7
+ *'\'*) ;;
8
+ '["'*'"]')
9
+ words=$(printf '%s' "$VIBEST_COMMAND" | sed -e 's/^\["//' -e 's/"\]$//' -e 's/","/\
10
+ /g')
11
+ ifs=$IFS
12
+ IFS='
13
+ '
14
+ set -f
15
+ set -- $words "$@"
16
+ IFS=$ifs
17
+ set +f
18
+ "$@"
19
+ return
20
+ ;;
21
+ esac
22
+ command vibest "$@"
23
+ }
3
24
  case "${1:-}" in
4
25
  guard)
5
26
  # preToolUse runs fail-closed, where no answer refuses: outside vibest, allow (it grants no approval).
@@ -17834,10 +17834,10 @@ var fromDuplex = (open, options) => withFiber2((fiber) => {
17834
17834
  // ../../protocol/src/protocol.ts
17835
17835
  var PROTOCOL = 4;
17836
17836
  var MISMATCH_ACTION = "vibest update";
17837
- var protocolMismatch = (caller, server, version) => ({
17837
+ var protocolMismatch = (caller, server, version, callerVersion) => ({
17838
17838
  protocol: server,
17839
17839
  version,
17840
- message: caller !== undefined && caller > server ? `vibestd is older (${version}); run ${MISMATCH_ACTION}` : `vibest was updated to ${version}; run ${MISMATCH_ACTION} to restart this agent on it`,
17840
+ message: caller !== undefined && caller > server ? `vibestd is older (${version}); run ${MISMATCH_ACTION}` : `this agent runs ${callerVersion ? `vibest ${callerVersion}` : "an older vibest"} (protocol ${caller ?? "none"}), vibestd runs ${version} (protocol ${server}); run ${MISMATCH_ACTION} to restart this agent on it`,
17841
17841
  action: MISMATCH_ACTION
17842
17842
  });
17843
17843
  var PROTOCOL_HEADER = "vibest-protocol";
@@ -19433,7 +19433,7 @@ var Service2 = () => (id, options) => {
19433
19433
  // ../../protocol/package.json
19434
19434
  var package_default = {
19435
19435
  name: "@vibest/protocol",
19436
- version: "0.0.1-beta.14",
19436
+ version: "0.0.1-beta.16",
19437
19437
  private: true,
19438
19438
  license: "MIT",
19439
19439
  type: "module",
@@ -19818,7 +19818,7 @@ class IncompatibleDaemon extends TaggedError3()("IncompatibleDaemon", {
19818
19818
  get message() {
19819
19819
  const got = this.daemonProtocol === null ? "no protocol" : `protocol ${this.daemonProtocol}`;
19820
19820
  const self = `vibest ${this.client.version} (${this.client.command.map(shellQuote).join(" ")})`;
19821
- const mismatch = protocolMismatch(PROTOCOL, this.daemonProtocol ?? 0, this.daemonVersion || "unknown");
19821
+ const mismatch = protocolMismatch(PROTOCOL, this.daemonProtocol ?? 0, this.daemonVersion || "unknown", this.client.version);
19822
19822
  return `${mismatch.message}. ${described(this.daemonVersion, this.daemon)} on ${this.socket} speaks ${got}; ${self} speaks protocol ${PROTOCOL}. If \`vibest daemon restart\` cannot replace it: ${stopByHand(this.socket, this.daemon.pid).replace(/^To replace it, /, "")}. A package-version difference alone does not require a restart.`;
19823
19823
  }
19824
19824
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibest/cli",
3
- "version": "0.0.1-beta.14",
3
+ "version": "0.0.1-beta.16",
4
4
  "description": "vibest: vibestd daemon and the vibest CLI. A coordinator directing sessions in herdr panes.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -24,8 +24,7 @@
24
24
  }
25
25
  },
26
26
  "exports": {
27
- "./test/*": "./test/*.ts",
28
- "./*": "./src/*.ts"
27
+ "./package.json": "./package.json"
29
28
  },
30
29
  "publishConfig": {
31
30
  "access": "public"
@@ -33,19 +32,19 @@
33
32
  "devDependencies": {
34
33
  "@effect/platform-bun": "4.0.2",
35
34
  "@effect/sql-sqlite-bun": "4.0.2",
36
- "@vibest/client": "0.0.1-beta.14",
37
- "@vibest/core": "0.0.1-beta.14",
38
- "@vibest/plugin": "0.0.1-beta.14",
39
- "@vibest/protocol": "0.0.1-beta.14",
40
- "@vibest/runtime-herdr": "0.0.1-beta.14",
41
- "@vibest/schema": "0.0.1-beta.14",
42
- "@vibest/server": "0.0.1-beta.14",
35
+ "@vibest/client": "0.0.1-beta.16",
36
+ "@vibest/core": "0.0.1-beta.16",
37
+ "@vibest/plugin": "0.0.1-beta.16",
38
+ "@vibest/protocol": "0.0.1-beta.16",
39
+ "@vibest/runtime-herdr": "0.0.1-beta.16",
40
+ "@vibest/schema": "0.0.1-beta.16",
41
+ "@vibest/server": "0.0.1-beta.16",
43
42
  "effect": "4.0.2",
44
- "effect-herdr-sdk": "0.0.1-beta.14"
43
+ "effect-herdr-sdk": "0.0.1-beta.16"
45
44
  },
46
45
  "optionalDependencies": {
47
- "@vibest/cli-darwin-arm64": "0.0.1-beta.14",
48
- "@vibest/cli-linux-x64": "0.0.1-beta.14"
46
+ "@vibest/cli-darwin-arm64": "0.0.1-beta.16",
47
+ "@vibest/cli-linux-x64": "0.0.1-beta.16"
49
48
  },
50
49
  "scripts": {
51
50
  "build": "bun scripts/build.ts && bun scripts/build-harnesses.ts",