@nomac/cli 0.6.0 → 0.6.1

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.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Cloud Mac sessions over SSH and HTTPS, plus iOS builds and publishing — built for agents.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
package/skill/SKILL.md CHANGED
@@ -45,9 +45,12 @@ Keep the same request key and arguments after uncertain responses; inspect
45
45
  the original job before retrying. Output retrieval failure is not job failure.
46
46
  Managed jobs have a 600-second limit; SSH can run longer within session limits.
47
47
  CLI sync skips symlinks and preserves remote extra files; use native SSH/rsync
48
- when needed. Agents have no GUI control: drive the Simulator with simctl, and
49
- give the human `open_mac_desktop` when a screen needs a person. Persistent disks
50
- are not currently offered.
48
+ when needed. Commands can take screenshots (`screencapture -x shot.png`, then
49
+ `read_mac_file`) and drive apps with AppleScript without a permission prompt;
50
+ drive the Simulator with simctl, and give the human `open_mac_desktop` when a
51
+ screen needs a person. `get_mac_session` (and `nomac status --json`) lists what
52
+ is installed: Ruby with CocoaPods, xcbeautify, xcodegen, gh, Git LFS, jq.
53
+ Pipe xcodebuild through `xcbeautify`. Persistent disks are not currently offered.
51
54
  Report failures using `report_issue` with `session_id`, optional `job_id` and
52
55
  a description without secrets. Read https://nomac.app/llms.txt for full limits.
53
56
 
@@ -128,8 +128,9 @@ async function waitForCommand(id, base, started, waitSeconds, { request, transpo
128
128
  const usd = microunits => `$${(Number(microunits ?? 0) / 1_000_000).toFixed(2)}`;
129
129
  const clockUtc = ms => new Date(ms).toISOString().slice(11, 16) + " UTC";
130
130
  /** One readable paragraph for nomac status. */
131
- export function statusSummary(session) {
131
+ export function statusSummary(session, image) {
132
132
  const lines = [`${session.id}: ${session.state}`];
133
+ if (image?.macos) lines.push(`Mac: macOS ${image.macos.split(" ")[0]}, Xcode ${image.xcode}${(image.simulator_runtimes ?? []).map(r => `, ${r} Simulator`).join("")}`);
133
134
  if (["ready", "provisioning", "queued"].includes(session.state)) lines.push(`Cost so far: ${usd(session.cost?.accrued_microunits)} ($0.80/hour, billed by the minute while ready). Credit left: nomac credits`);
134
135
  const a = session.activity ?? {};
135
136
  if (session.state === "ready") {
@@ -193,9 +194,10 @@ export async function hostedSessionCommand(command, argv, { store = sessionStore
193
194
  if (positionals.length) throw new CliError("Usage: nomac status [--json]");
194
195
  const loaded = store.load();
195
196
  if (!loaded) { print(values.json ? JSON.stringify({ session: null }) : "No Mac in this folder. Start one: nomac start"); return null; }
196
- const session = await refresh(localSession());
197
- if (values.json) { print(JSON.stringify({ session }, null, 2)); return session; }
198
- print(statusSummary(session));
197
+ const local = localSession(), result = await request("GET", `/api/v1/mac/sessions/${sessionId(local.id)}`);
198
+ const session = saveView(local, result.session);
199
+ if (values.json) { print(JSON.stringify({ session, ...(result.image ? { image: result.image } : {}) }, null, 2)); return session; }
200
+ print(statusSummary(session, result.image));
199
201
  return session;
200
202
  }
201
203
  if (["exec", "job", "output"].includes(command)) {