@bentoai/cli 1.1.34 → 1.1.37

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
@@ -12,15 +12,19 @@ install and operate the released command from their own computer.
12
12
  [Agent setup](../../skills/bento/references/setup.md) owns installation, skill
13
13
  install and sign-in; the lander publishes it at https://heybento.ai/agents.md.
14
14
 
15
- The CLI embeds that consumer skill so an installed release can install it without
16
- repository access. Build steps derive its text-import inventory from the skill
17
- folder; the tree guard catches missing files and stale bytes. Successful CLI
18
- upgrades use the newly installed launcher to refresh the skill for saved agents,
19
- so the instructions match the executable. `bento local skill --help` owns the command
20
- syntax; `bento local skill list` keeps its JSON discovery contract.
15
+ The consumer skill is generated: the [skills registry](../skills-registry/README.md)
16
+ owns its source and renders it into `skills/bento`. The CLI embeds that folder
17
+ so an installed release can install it without repository access. Build steps
18
+ derive the embedded inventory from the folder; the tree guard catches missing
19
+ files and stale bytes. Successful CLI upgrades use the newly installed launcher
20
+ to refresh the skill for saved agents, so the instructions match the
21
+ executable. `bento local skill --help` owns the command syntax;
22
+ `bento local skill list` keeps its JSON discovery contract.
21
23
 
22
24
  npm installs a Node launcher and the compiled executable for the host; users need
23
- Node, not Bun. `bento --help` owns the command surface.
25
+ Node, not Bun. On a Mac with an installed app, the launcher uses the
26
+ [app-owned CLI and updater](../../apps/macos/README.md#cli-and-sync-ownership).
27
+ `bento --help` owns the command surface.
24
28
 
25
29
  Harness runtime and protocol ownership belong to the private
26
30
  [agent workspace](../agent/README.md). The CLI consumes that owner directly;
@@ -124,7 +128,72 @@ their module graph and load native data beside the binary. The root lockfile own
124
128
  dependencies and the root repository owns publication and VM release delivery.
125
129
  Use the package scripts for builds, checks and disposable-container tests.
126
130
 
127
- [Mac sync](src/sync/README.md) keeps one computer identity across separate
128
- workspace transfer instances, with account removal independent of user login.
131
+ [Mac sync](src/sync/README.md) runs only with the Bento menu bar app. Install
132
+ the app and enable sync in Settings, or use `bento local sync workspace update <ws>`
133
+ while it runs. Enrollment keeps one computer identity across workspace transfer
134
+ instances, with account removal independent of user login.
135
+
136
+ ## Recording commands
137
+
138
+ `bento recording operation create --help` discovers the binding-derived command offline.
139
+ The copied catalog owns operation names and validation; select a dotted name with
140
+ `--operation`, for example `--operation recording.list --workspace demo`.
141
+ `--body-file` accepts a complete wire envelope (or `-` for stdin); `--id`,
142
+ `--operation` and JSON `--params` override its fields. The CLI supplies a fresh
143
+ request ID when omitted and retains the recording response envelope on stdout.
144
+
145
+ Cloud-owned operations use the supervised service socket on a managed VM and the
146
+ workspace API elsewhere. Mac capture and app operations use their own sockets;
147
+ they refuse on a VM. Explicit `--socket` connects directly without starting a
148
+ service. The [shared contract](../contract/README.md#recording-operations) owns
149
+ HTTP authority and lease delivery.
150
+
151
+ `recording.playback` is answered by the CLI. With `recordingId` it reads the
152
+ cloud catalog and published source membership, then mints separate headerless
153
+ file-download references for picture, narration and system audio when present.
154
+ It returns `refreshAtMs` and `expiresAtMs` with those references. Reissue the same
155
+ operation before the refresh time; each call mints fresh grants. These URLs are
156
+ temporary playback capabilities, never durable recording facts. The native
157
+ player preserves its timeline when replacing them and retains its last usable
158
+ player during a transient refresh failure. Expired grants suspend playback until
159
+ a fresh set arrives. The ordinary workspace login and file-read authority apply.
160
+
161
+ Finished takes use `local recording outbox create <dir>`; the directory is named with the
162
+ recording UUID and contains the published source/camera layout. `--agent` selects
163
+ an agent slug or `root`; the workspace and agent identity are frozen at enqueue.
164
+ `--agent-id` accepts a previously selected agent identity without resolving a slug
165
+ online. With no override, the CLI uses the recording default stored through
166
+ `local config update --recording-agent`; changing the default workspace clears
167
+ that choice. The widget supplies an explicit per-take selection.
168
+ The [outbox](src/recording/outbox.ts) uses the shared CLI state root and retains
169
+ source bytes until adoption and session acceptance have completed. A failed create
170
+ prints its durable entry; `local recording outbox list` exposes its error and retry time.
171
+ `local recording outbox update` retries every entry that is due: past its backoff,
172
+ interrupted mid-delivery, or held only for sign-in; the Mac app runs it on its status
173
+ cadence. Other holds (capacity, refusals) wait for the person: rerunning
174
+ `local recording outbox create <dir>` retries one, overriding backoff; its frozen
175
+ workspace and agent never change. Each file PUT gets a fresh grant, because a grant
176
+ is checked when a PUT starts and a long take outlasts one. A retry skips the files
177
+ the workspace already accepted and restarts the rest from their first byte; only a
178
+ PUT that stops moving is abandoned. When adoption finds members missing or
179
+ mismatched, the next retry sends the whole take again. A retry after an uncertain
180
+ session response replays its saved creation body, preserving API idempotency.
181
+
182
+ `local recording handoff get` renders the saved take facts and available session
183
+ URL without network access or source media. A recording ID selects one take;
184
+ omitting it selects the latest outbox entry. This is the Mac paste shortcut's
185
+ owner, so it keeps working after delivery removes local bytes and while offline.
186
+
187
+ The [session mode](src/recording/session-start.ts) polls the cloud-owned
188
+ `recording.transcriptReadiness` operation through the ordinary derived command.
189
+ A settled response exits 0; the parent reads `data.state` to select the recording
190
+ agent or explain `data.error`. Pending observations return a retryable operation
191
+ error; transport and authentication failures also leave the poll waiting.
192
+
193
+ Long-running calls accept `--wait --timeout-ms 30000`; waiting observes the
194
+ admitted job and its publication without submitting it again. A pending deadline
195
+ returns the acknowledged identity and exits 2. Artifact operations save complete
196
+ files, with `--output` choosing a new file or a new directory for a batch. Existing
197
+ destinations are preserved, and failed delivery drains leases and staging files.
129
198
 
130
199
  Public commands follow the [contract naming rule](../contract/README.md#naming).
@@ -3692,3 +3692,30 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
3692
3692
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
3693
3693
  SOFTWARE.
3694
3694
 
3695
+
3696
+ ## zod@4.6.5
3697
+
3698
+ License: MIT
3699
+
3700
+ MIT License
3701
+
3702
+ Copyright (c) 2025 Colin McDonnell
3703
+
3704
+ Permission is hereby granted, free of charge, to any person obtaining a copy
3705
+ of this software and associated documentation files (the "Software"), to deal
3706
+ in the Software without restriction, including without limitation the rights
3707
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
3708
+ copies of the Software, and to permit persons to whom the Software is
3709
+ furnished to do so, subject to the following conditions:
3710
+
3711
+ The above copyright notice and this permission notice shall be included in all
3712
+ copies or substantial portions of the Software.
3713
+
3714
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
3715
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
3716
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3717
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
3718
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
3719
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
3720
+ SOFTWARE.
3721
+
package/dist/cli-entry.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // packages/bento/src/launcher/main.ts
4
- import { realpathSync } from "node:fs";
4
+ import { realpathSync as realpathSync2 } from "node:fs";
5
5
  import { createRequire } from "node:module";
6
6
  import { fileURLToPath } from "node:url";
7
7
 
@@ -38,6 +38,43 @@ async function launch(executable, args, launcherPath, context = {}) {
38
38
  }
39
39
  }
40
40
 
41
+ // packages/bento/src/launcher/mac-app.ts
42
+ import { spawnSync } from "node:child_process";
43
+ import { accessSync, constants as constants2, realpathSync } from "node:fs";
44
+ import { homedir } from "node:os";
45
+ import { dirname, join } from "node:path";
46
+ function installedMacApp(context = {}) {
47
+ const applications = [
48
+ join(context.home ?? homedir(), "Applications"),
49
+ context.systemApplications ?? "/Applications"
50
+ ];
51
+ for (const folder of applications) {
52
+ try {
53
+ const bundle = realpathSync(join(folder, "Bento.app"));
54
+ if (bundle.split("/").includes("AppTranslocation"))
55
+ continue;
56
+ if (dirname(bundle) !== realpathSync(folder))
57
+ continue;
58
+ if ((context.quarantine ?? isQuarantined)(bundle))
59
+ continue;
60
+ const executable = join(bundle, "Contents/Resources/bin/bento");
61
+ accessSync(executable, constants2.X_OK);
62
+ accessSync(join(bundle, "Contents/Resources/cli/bento"), constants2.X_OK);
63
+ return { bundle, executable };
64
+ } catch {}
65
+ }
66
+ return;
67
+ }
68
+ function isQuarantined(bundle) {
69
+ const result = spawnSync("/usr/bin/xattr", [bundle], {
70
+ encoding: "utf8",
71
+ stdio: ["ignore", "pipe", "ignore"],
72
+ timeout: 2000
73
+ });
74
+ return result.status !== 0 || result.stdout.split(`
75
+ `).includes("com.apple.quarantine");
76
+ }
77
+
41
78
  // packages/bento/src/launcher/platforms.ts
42
79
  var PLATFORMS = {
43
80
  "darwin-arm64": { name: "@bentoai/cli-darwin-arm64", os: "darwin", cpu: "arm64" },
@@ -58,13 +95,19 @@ try {
58
95
  const report = process.platform === "linux" ? process.report.getReport() : undefined;
59
96
  const glibc = report && typeof report !== "string" ? report.header.glibcVersionRuntime : undefined;
60
97
  const platform = platformPackage(process.platform, process.arch, glibc);
98
+ const app = process.platform === "darwin" ? installedMacApp() : undefined;
61
99
  let executable;
62
- try {
63
- executable = createRequire(import.meta.url).resolve(`${platform.name}/bin/bento`);
64
- } catch {
65
- throw new Error(`Bento platform package ${platform.name} is missing. Reinstall @bentoai/cli with optional dependencies enabled; --omit=optional / --no-optional prevents its installation.`);
100
+ if (app) {
101
+ executable = app.executable;
102
+ process.env.BENTO_APP = app.bundle;
103
+ } else {
104
+ try {
105
+ executable = createRequire(import.meta.url).resolve(`${platform.name}/bin/bento`);
106
+ } catch {
107
+ throw new Error(`Bento platform package ${platform.name} is missing. Reinstall @bentoai/cli with optional dependencies enabled; --omit=optional / --no-optional prevents its installation.`);
108
+ }
66
109
  }
67
- process.exitCode = await launch(executable, process.argv.slice(2), realpathSync(fileURLToPath(import.meta.url)));
110
+ process.exitCode = await launch(executable, process.argv.slice(2), realpathSync2(fileURLToPath(import.meta.url)));
68
111
  } catch (error) {
69
112
  console.error(error instanceof Error ? error.message : String(error));
70
113
  process.exitCode = 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bentoai/cli",
3
- "version": "1.1.34",
3
+ "version": "1.1.37",
4
4
  "description": "Bento CLI for local agents, workspaces and file sync",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0-only",
@@ -24,10 +24,10 @@
24
24
  "access": "public"
25
25
  },
26
26
  "optionalDependencies": {
27
- "@bentoai/cli-darwin-arm64": "1.1.34",
28
- "@bentoai/cli-darwin-x64": "1.1.34",
29
- "@bentoai/cli-linux-x64": "1.1.34",
30
- "@bentoai/cli-linux-arm64": "1.1.34",
27
+ "@bentoai/cli-darwin-arm64": "1.1.37",
28
+ "@bentoai/cli-darwin-x64": "1.1.37",
29
+ "@bentoai/cli-linux-x64": "1.1.37",
30
+ "@bentoai/cli-linux-arm64": "1.1.37",
31
31
  "@mariozechner/clipboard": "0.3.9"
32
32
  }
33
33
  }