@bentoai/cli 1.1.34 → 1.1.35

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
@@ -20,7 +20,9 @@ so the instructions match the executable. `bento local skill --help` owns the co
20
20
  syntax; `bento local skill list` keeps its JSON discovery contract.
21
21
 
22
22
  npm installs a Node launcher and the compiled executable for the host; users need
23
- Node, not Bun. `bento --help` owns the command surface.
23
+ Node, not Bun. On a Mac with an installed app, the launcher uses the
24
+ [app-owned CLI and updater](../../apps/macos/README.md#cli-and-sync-ownership).
25
+ `bento --help` owns the command surface.
24
26
 
25
27
  Harness runtime and protocol ownership belong to the private
26
28
  [agent workspace](../agent/README.md). The CLI consumes that owner directly;
@@ -124,7 +126,72 @@ their module graph and load native data beside the binary. The root lockfile own
124
126
  dependencies and the root repository owns publication and VM release delivery.
125
127
  Use the package scripts for builds, checks and disposable-container tests.
126
128
 
127
- [Mac sync](src/sync/README.md) keeps one computer identity across separate
128
- workspace transfer instances, with account removal independent of user login.
129
+ [Mac sync](src/sync/README.md) runs only with the Bento menu bar app. Install
130
+ the app and enable sync in Settings, or use `bento local sync workspace update <ws>`
131
+ while it runs. Enrollment keeps one computer identity across workspace transfer
132
+ instances, with account removal independent of user login.
133
+
134
+ ## Recording commands
135
+
136
+ `bento recording operation create --help` discovers the binding-derived command offline.
137
+ The copied catalog owns operation names and validation; select a dotted name with
138
+ `--operation`, for example `--operation recording.list --workspace demo`.
139
+ `--body-file` accepts a complete wire envelope (or `-` for stdin); `--id`,
140
+ `--operation` and JSON `--params` override its fields. The CLI supplies a fresh
141
+ request ID when omitted and retains the recording response envelope on stdout.
142
+
143
+ Cloud-owned operations use the supervised service socket on a managed VM and the
144
+ workspace API elsewhere. Mac capture and app operations use their own sockets;
145
+ they refuse on a VM. Explicit `--socket` connects directly without starting a
146
+ service. The [shared contract](../contract/README.md#recording-operations) owns
147
+ HTTP authority and lease delivery.
148
+
149
+ `recording.playback` is answered by the CLI. With `recordingId` it reads the
150
+ cloud catalog and published source membership, then mints separate headerless
151
+ file-download references for picture, narration and system audio when present.
152
+ It returns `refreshAtMs` and `expiresAtMs` with those references. Reissue the same
153
+ operation before the refresh time; each call mints fresh grants. These URLs are
154
+ temporary playback capabilities, never durable recording facts. The native
155
+ player preserves its timeline when replacing them and retains its last usable
156
+ player during a transient refresh failure. Expired grants suspend playback until
157
+ a fresh set arrives. The ordinary workspace login and file-read authority apply.
158
+
159
+ Finished takes use `local recording outbox create <dir>`; the directory is named with the
160
+ recording UUID and contains the published source/camera layout. `--agent` selects
161
+ an agent slug or `root`; the workspace and agent identity are frozen at enqueue.
162
+ `--agent-id` accepts a previously selected agent identity without resolving a slug
163
+ online. With no override, the CLI uses the recording default stored through
164
+ `local config update --recording-agent`; changing the default workspace clears
165
+ that choice. The widget supplies an explicit per-take selection.
166
+ The [outbox](src/recording/outbox.ts) uses the shared CLI state root and retains
167
+ source bytes until adoption and session acceptance have completed. A failed create
168
+ prints its durable entry; `local recording outbox list` exposes its error and retry time.
169
+ `local recording outbox update` retries every entry that is due: past its backoff,
170
+ interrupted mid-delivery, or held only for sign-in; the Mac app runs it on its status
171
+ cadence. Other holds (capacity, refusals) wait for the person: rerunning
172
+ `local recording outbox create <dir>` retries one, overriding backoff; its frozen
173
+ workspace and agent never change. Each file PUT gets a fresh grant, because a grant
174
+ is checked when a PUT starts and a long take outlasts one. A retry skips the files
175
+ the workspace already accepted and restarts the rest from their first byte; only a
176
+ PUT that stops moving is abandoned. When adoption finds members missing or
177
+ mismatched, the next retry sends the whole take again. A retry after an uncertain
178
+ session response replays its saved creation body, preserving API idempotency.
179
+
180
+ `local recording handoff get` renders the saved take facts and available session
181
+ URL without network access or source media. A recording ID selects one take;
182
+ omitting it selects the latest outbox entry. This is the Mac paste shortcut's
183
+ owner, so it keeps working after delivery removes local bytes and while offline.
184
+
185
+ The [session mode](src/recording/session-start.ts) polls the cloud-owned
186
+ `recording.transcriptReadiness` operation through the ordinary derived command.
187
+ A settled response exits 0; the parent reads `data.state` to select the recording
188
+ agent or explain `data.error`. Pending observations return a retryable operation
189
+ error; transport and authentication failures also leave the poll waiting.
190
+
191
+ Long-running calls accept `--wait --timeout-ms 30000`; waiting observes the
192
+ admitted job and its publication without submitting it again. A pending deadline
193
+ returns the acknowledged identity and exits 2. Artifact operations save complete
194
+ files, with `--output` choosing a new file or a new directory for a batch. Existing
195
+ destinations are preserved, and failed delivery drains leases and staging files.
129
196
 
130
197
  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.35",
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.35",
28
+ "@bentoai/cli-darwin-x64": "1.1.35",
29
+ "@bentoai/cli-linux-x64": "1.1.35",
30
+ "@bentoai/cli-linux-arm64": "1.1.35",
31
31
  "@mariozechner/clipboard": "0.3.9"
32
32
  }
33
33
  }