@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 +1 -1
- package/skill/SKILL.md +6 -3
- package/src/hosted-sessions.mjs +6 -4
package/package.json
CHANGED
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.
|
|
49
|
-
|
|
50
|
-
|
|
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
|
|
package/src/hosted-sessions.mjs
CHANGED
|
@@ -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
|
|
197
|
-
|
|
198
|
-
print(
|
|
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)) {
|