@nomac/cli 0.27.1 → 0.27.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nomac/cli",
3
- "version": "0.27.1",
3
+ "version": "0.27.3",
4
4
  "description": "A real cloud Mac for AI agents: Xcode, the iOS Simulator, signing, TestFlight and App Store publishing, by the minute, over MCP, SSH and HTTPS.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
package/skill/SKILL.md CHANGED
@@ -40,10 +40,10 @@ takes the hosted links.
40
40
  not a payment. No Apple Developer account is needed for an unsigned build.
41
41
  Under an hour left, answers say `low_credit` with a `buy_url`: tell the
42
42
  human before a long build (bigger refills earn bonus credit; the answer suggests how many packs).
43
- 2. Install `npm install -g @nomac/cli@0.27.1` (it updates itself after), run `nomac login`, and give the human
43
+ 2. Install `npm install -g @nomac/cli@0.27.3` (it updates itself after), run `nomac login`, and give the human
44
44
  the printed device URL and code. With a key the human made at
45
45
  https://nomac.app/keys: `nomac login --with-token < key.txt`, or set
46
- `NOMAC_API_KEY`. MCP: `claude mcp add nomac -- npx -y @nomac/cli@0.27.1 mcp`.
46
+ `NOMAC_API_KEY`. MCP: `claude mcp add nomac -- npx -y @nomac/cli@0.27.3 mcp`.
47
47
  Hosted MCP: https://mcp.nomac.app/mcp with `Authorization: Bearer <nmk_key>`.
48
48
  3. `nomac start --json`, wait until ready, `nomac sync .`, then `nomac ssh`.
49
49
  Run commands with `nomac exec -- COMMAND`: it prints the output as it
@@ -93,7 +93,9 @@ drive at `~/drive`, on one Mac at a time: the first gets the account's
93
93
  default drive, a second a new drive of its own, and `nomac status` and
94
94
  `~/NOMAC.md` name it. To keep an agent's work apart, give it a drive:
95
95
  `nomac start --drive NAME` (made empty the first time; the folder asks for it
96
- again at its next start), `--drive-from default` to start it as a copy, and
96
+ again at its next start; one name per project, not one per build or task,
97
+ whose new drive would start without the project's caches), `--drive-from
98
+ default` to start it as a copy, and
97
99
  `--reuse` to be given the running Mac that has it. `nomac drive` lists the
98
100
  drives. A Mac running a `nomac run` command is never offered to attach: it
99
101
  stops when its command ends.
@@ -137,7 +139,7 @@ is installed: Node, Python, uv, nvm, Ruby with CocoaPods, xcbeautify, xcodegen,
137
139
  gh, Git LFS, jq and simulator-use.
138
140
  Pipe xcodebuild through `xcbeautify`. Simulator devices share names across iOS
139
141
  runtimes: pick one by ID (`xcrun simctl list devices available`) or with
140
- `OS=27.0` in `-destination`; an older iOS downloads in about 6 minutes
142
+ `OS=latest` in `-destination`; an older iOS downloads in about 6 minutes
141
143
  (`xcodebuild -downloadPlatform iOS -buildVersion 26.5`). Apple Intelligence cannot generate on a virtual
142
144
  Mac, in the Simulator either: test it on a device.
143
145
  Report failures using `report_issue` with `session_id`, optional `job_id` and
@@ -445,7 +445,7 @@ export function driveList(answer) {
445
445
  /** Which drive a Mac has (LIM-394): the default goes unnamed, as with one Mac; any other is named, with how to get it again. */
446
446
  export function driveLine(d) {
447
447
  const which = !d.name || d.default !== false ? `${d.path}` : `${d.path}, drive ${d.name}`;
448
- const again = d.name && d.default === false ? ` Get it again: nomac start --drive ${d.name}.${/^drive-[0-9]+$/.test(d.name) ? ` It is deleted after 30 days unused; nomac drive rename ${d.name} NAME keeps it 90.` : ""}` : "";
448
+ const again = d.name && d.default === false ? ` Get it again: nomac start --drive ${d.name}.` : "";
449
449
  return `Drive: ${which}, kept between sessions${d.source === "r2" ? " (downloaded to this Mac before boot)" : ""}.${again}`;
450
450
  }
451
451
  export function statusSummary(session, image) {
package/src/mac-tools.mjs CHANGED
@@ -29,7 +29,7 @@ export const MAC_TOOLS = [
29
29
  { name: "list_mac_sessions", description: "Find existing Mac sessions, including after losing a response. Shows state, cost, limits and cleanup.", inputSchema: schema({}), handler: async () => text(await api("GET", "/api/v1/mac/sessions")) },
30
30
  { name: "get_mac_session", description: "Read live Mac allocation state, cost, funded time and cleanup confirmation, and once ready the credentials installed on it (secrets, signing identities and profiles, by name and path, never values) and account: the Mac's user, whether its login password is set (in $NOMAC_MAC_PASSWORD on the Mac), the access choices, and how to type and click (mac_input). queued/provisioning means wait; stopping is not yet confirmed cleanup.", inputSchema: schema({ session_id: session }, ["session_id"]), handler: async args => text(await api("GET", base(args))) },
31
31
  { name: "extend_mac", description: "Keep a running Mac going longer: raises its time limit by minutes (default 60; a Mac has no longest time), and its spend cap with it. Call it when an answer's stop_notice says the Mac stops soon at its time limit or spend cap, or before a build or test that would not finish in time. It adds no credit: when stop_notice's reason is credit, the human adds some (get_mac_checkout). The Mac still bills at its hourly price while it runs.", inputSchema: schema({ session_id: session, minutes: { type: "integer", minimum: 1, maximum: 5256000, default: 60, description: "Minutes to add to the time limit. Default 60." } }, ["session_id"]), handler: async ({ session_id, minutes = 60 }) => text(await api("POST", `${base({ session_id })}/extend`, { body: { minutes } })) },
32
- { name: "get_mac_drive", description: "Read the account's drives: each Mac has one at ~/drive (20 GB), kept between sessions and on one Mac at a time. What is there stays for the next Mac with that drive: keep projects in ~/drive/src for incremental builds; package and build caches (DerivedData, Swift packages, CocoaPods, npm) are kept there already. NoMac saves it when a Mac stops, with nothing to call. Lists each drive's name, space used, the Mac using it now, a save still in progress, recent versions, and the date it is deleted unused (90 days; 30 for a drive NoMac made for a Mac that named none). name reads one drive.", inputSchema: schema({ name: { type: "string", description: "One drive's name; without it, every drive" } }),
32
+ { name: "get_mac_drive", description: "Read the account's drives: each Mac has one at ~/drive (20 GB), kept between sessions and on one Mac at a time. What is there stays for the next Mac with that drive: keep projects in ~/drive/src for incremental builds; package and build caches (DerivedData, Swift packages, CocoaPods, npm) are kept there already. NoMac saves it when a Mac stops, with nothing to call. Lists each drive's name, space used, the Mac using it now, a save still in progress, recent versions, and the date it is deleted unused (30 days without a session). name reads one drive.", inputSchema: schema({ name: { type: "string", description: "One drive's name; without it, every drive" } }),
33
33
  // A site before LIM-394 has only /api/v1/mac/drive, the one drive.
34
34
  handler: async ({ name } = {}) => text(await api("GET", name ? `/api/v1/mac/drives/${encodeURIComponent(name)}` : "/api/v1/mac/drives")
35
35
  .catch(error => { if (error?.status === 404 && (!name || name === "default")) return api("GET", "/api/v1/mac/drive"); throw error; })) },
package/src/mcp.mjs CHANGED
@@ -21,18 +21,18 @@ const INSTRUCTIONS = [
21
21
  "The cloud iPhone (the phone tools: phone and phone_*) builds, runs and tests an iOS app, ready in seconds, no shell: phone with action start (its answer has links.view for the person); phone_app_run with local_path (a folder here, only changes sent) or git (an https repository link) builds and runs the app, incrementally; phone_ui_look reads the screen as text, phone_ui_act taps and types by label; phone_app_logs, phone_tests_run; a long build answers with a job for phone_job_status; phone with action stop when done. The Mac (start_mac and the Mac tools) does the rest.",
22
22
  "Use it when work needs macOS this machine lacks (Windows, Linux, a cloud sandbox): an iOS, iPadOS, watchOS, visionOS or macOS app (Swift, SwiftUI, React Native, Expo, Flutter, Capacitor), Xcode, signing, TestFlight or the App Store.",
23
23
  "Typical flow: get_mac_credits, start_mac, poll get_mac_session until ready, put code there (exec_mac with git clone into ~/drive/src, write_mac_file, fetch_to_mac, create_mac_upload_link), run exec_mac, get results with read_mac_file or create_mac_download_link, then stop_mac.",
24
- "~/drive (20 GB) is kept between sessions, on one Mac at a time (a second gets its own, named in its answer; access drive NAME picks one); the rest is deleted at stop. Clone and build in ~/drive/src/<repo> so the next session rebuilds only what changed; keep it under 10 GB (nomac-drive shows the space, nomac-drive clean frees it).",
25
- "The Mac's own Simulator: simulator-use is on it (run it with exec_mac): simulator-use look reads the screen as text, simulator-use act 'tap \"Sign In\"' taps by label, simulator-use run builds and launches it, app storekit tests purchases; ~/NOMAC.md has the rest.",
24
+ "~/drive (20 GB) is kept between sessions, on one Mac at a time (a second gets its own, named in its answer; access drive NAME picks one per project, not per build); the rest is deleted at stop. Clone and build in ~/drive/src/<repo> so later sessions rebuild only what changed; keep it under 10 GB (nomac-drive shows the space, nomac-drive clean frees it).",
25
+ "The Mac's own Simulator: simulator-use is on it (with exec_mac): simulator-use look reads the screen as text, simulator-use act 'tap \"Sign In\"' taps by label, simulator-use run builds and launches it, app storekit tests purchases; ~/NOMAC.md has the rest.",
26
26
  "When an answer says low_credit (under an hour left), tell the human before a long build and offer its buy_url: a Mac stops when the credit runs out.",
27
27
  "One Mac per account: start_mac while one runs answers session_limit_reached naming it, who started it and its last command; use it if it is yours; parallel: true starts a second; queue_seconds waits.",
28
- "exec_mac returns a quick command's output in the same call; pass wait_seconds: 40 for builds and tests (a call answers within 45 s). A command still running comes back as a job: poll get_mac_job with its job_id, then read_mac_output.",
28
+ "exec_mac returns a quick command's output in the same call; pass wait_seconds: 40 for builds and tests (a call answers in 45 s). A command still running comes back as a job: poll get_mac_job with its job_id, then read_mac_output.",
29
29
  "Never rerun a command to get its output; after a lost response, repeat the call with the same request_key and arguments.",
30
30
  "Write files with write_mac_file, not heredocs in exec_mac: a command is at most 64 KiB.",
31
31
  "Shipping without the Apple key on the Mac: set_up_signing returns the files and commands that sign a build; send_to_testflight sends the signed .ipa to TestFlight; publish submits it for App Review; notarize notarizes and staples a Developer ID-signed Mac app. Never ask for a secret in the chat: request_secret gives the human a link, and every Mac receives the account's secrets (on-request ones through install_secrets).",
32
32
  "The Mac is fully enabled for you: sudo needs no password, prompts and password dialogs are answered within seconds, the screen never locks, and the login password is in $NOMAC_MAC_PASSWORD on it. nomac-permit APP camera (with exec_mac) grants an app privacy permissions before it asks. To type or click as a person would, also on the lock screen, call mac_input; when screenshot_mac reports screen_locked or a dialog, follow its next_step.",
33
33
  "A Mac stops at its time limit (2 hours unless start_mac set max_duration_seconds), its spend cap, its idle timeout or when credit runs out; everything outside ~/drive is deleted then. In its last 15 minutes answers carry stop_notice: extend_mac keeps it running (time limit or spend cap), or the human adds credit (reason credit). Before a long build, check that it fits.",
34
34
  "When an answer carries cli_update, this NoMac CLI is out of date: tell the human, who updates it with npm install -g @nomac/cli@latest (or nomac update) and restarts this MCP server.",
35
- "Always stop_mac when finished, after reading the output you need, so no credit goes to an idle Mac.",
35
+ "Always stop_mac when finished, after reading the output you need: idle Macs cost credit.",
36
36
  ].join(" ");
37
37
 
38
38
  const text = (obj) => ({