zcode-app-cli 3.3.5-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/LICENSE +24 -0
- package/README.md +642 -0
- package/bin/zcode.js +848 -0
- package/config.example.json +110 -0
- package/package.json +81 -0
- package/vendor/.node-bundle-meta.json +6 -0
- package/vendor/extraction.json +11 -0
- package/vendor/node_modules/@zcode/tui/dist/index.js +161875 -0
- package/vendor/node_modules/@zcode/tui/package.json +14 -0
- package/vendor/packages/android-emulator-plugin/.mcp.json +19 -0
- package/vendor/packages/android-emulator-plugin/.zcode-plugin/plugin.json +63 -0
- package/vendor/packages/android-emulator-plugin/README.md +134 -0
- package/vendor/packages/android-emulator-plugin/commands/android-dev.md +11 -0
- package/vendor/packages/android-emulator-plugin/dist/lib/path.d.ts +4 -0
- package/vendor/packages/android-emulator-plugin/dist/lib/path.js +17 -0
- package/vendor/packages/android-emulator-plugin/dist/lib/result.d.ts +5 -0
- package/vendor/packages/android-emulator-plugin/dist/lib/result.js +22 -0
- package/vendor/packages/android-emulator-plugin/dist/lib/run.d.ts +18 -0
- package/vendor/packages/android-emulator-plugin/dist/lib/run.js +99 -0
- package/vendor/packages/android-emulator-plugin/dist/mcp/server.d.ts +3 -0
- package/vendor/packages/android-emulator-plugin/dist/mcp/server.js +47607 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/app.d.ts +39 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/app.js +50 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/avd.d.ts +37 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/avd.js +185 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/build.d.ts +68 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/build.js +131 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/config.d.ts +7 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/config.js +29 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/device.d.ts +20 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/device.js +91 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/logs.d.ts +15 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/logs.js +31 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/preflight.d.ts +15 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/preflight.js +123 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/project-template.d.ts +13 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/project-template.js +211 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/project.d.ts +33 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/project.js +195 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/screenshot.d.ts +14 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/screenshot.js +73 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/sdk.d.ts +14 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/sdk.js +185 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/ui.d.ts +92 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/ui.js +146 -0
- package/vendor/packages/android-emulator-plugin/hooks/hooks.json +3 -0
- package/vendor/packages/android-emulator-plugin/package.json +35 -0
- package/vendor/packages/android-emulator-plugin/skills/android-dev/INSTALL_ENVIRONMENT.md +357 -0
- package/vendor/packages/android-emulator-plugin/skills/android-dev/SKILL.md +73 -0
- package/vendor/packages/android-emulator-plugin/templates/compose-app/README.md +5 -0
- package/vendor/packages/document-skills-plugin/.zcode-plugin/plugin.json +8 -0
- package/vendor/packages/document-skills-plugin/package.json +8 -0
- package/vendor/packages/document-skills-plugin/skills/docx/LICENSE.txt +13 -0
- package/vendor/packages/document-skills-plugin/skills/docx/SKILL.md +201 -0
- package/vendor/packages/document-skills-plugin/skills/docx/references/chart-templates.md +386 -0
- package/vendor/packages/document-skills-plugin/skills/docx/references/common-rules.md +419 -0
- package/vendor/packages/document-skills-plugin/skills/docx/references/decorations.md +537 -0
- package/vendor/packages/document-skills-plugin/skills/docx/references/design-system.md +1797 -0
- package/vendor/packages/document-skills-plugin/skills/docx/references/docx-js-advanced.md +257 -0
- package/vendor/packages/document-skills-plugin/skills/docx/references/docx-js-core.md +332 -0
- package/vendor/packages/document-skills-plugin/skills/docx/references/faq.md +323 -0
- package/vendor/packages/document-skills-plugin/skills/docx/references/math-formulas.md +276 -0
- package/vendor/packages/document-skills-plugin/skills/docx/references/ooxml.md +222 -0
- package/vendor/packages/document-skills-plugin/skills/docx/references/toc.md +264 -0
- package/vendor/packages/document-skills-plugin/skills/docx/routes/comment.md +88 -0
- package/vendor/packages/document-skills-plugin/skills/docx/routes/create.md +207 -0
- package/vendor/packages/document-skills-plugin/skills/docx/routes/edit.md +115 -0
- package/vendor/packages/document-skills-plugin/skills/docx/routes/format.md +120 -0
- package/vendor/packages/document-skills-plugin/skills/docx/routes/read.md +114 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scenes/academic.md +783 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scenes/contract.md +463 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scenes/copywriting.md +139 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scenes/exam.md +698 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scenes/official-doc.md +411 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scenes/report.md +340 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scenes/resume.md +534 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scripts/__init__.py +1 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scripts/add_toc_placeholders.py +749 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scripts/document.py +1333 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scripts/postcheck.py +807 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scripts/templates/comments.xml +3 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scripts/templates/commentsExtended.xml +3 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scripts/templates/commentsExtensible.xml +3 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scripts/templates/commentsIds.xml +3 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scripts/templates/people.xml +3 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scripts/utilities.py +374 -0
- package/vendor/packages/document-skills-plugin/skills/docx/setup.sh +177 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/LICENSE.txt +13 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/SKILL.md +919 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/briefs/academic.md +1058 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/briefs/creative.md +770 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/briefs/poster.md +702 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/briefs/process-advanced.md +284 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/briefs/process.md +319 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/briefs/report.md +1659 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/configs/components.md +153 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/configs/fonts.md +93 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/configs/visual_framework.md +263 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/references/resume-academic.tex +130 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/references/resume-altacv.tex +190 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/scripts/cover_validate.js +367 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/scripts/design_engine.py +2816 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/scripts/html2pdf-next.js +754 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/scripts/html2poster.js +256 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/scripts/pdf.py +2959 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/scripts/pdf_qa.py +901 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/scripts/poster_validate.py +1337 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/scripts/setup.sh +269 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/scripts/toc_validate.py +2075 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/typesetting/charts.md +320 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/typesetting/cover-backgrounds.md +384 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/typesetting/cover.md +1442 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/typesetting/fill-engine.md +527 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/typesetting/geometry.md +142 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/typesetting/overflow.md +630 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/typesetting/pagination.md +367 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/typesetting/palette.md +217 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/typesetting/typography.md +20 -0
- package/vendor/packages/ios-simulator-plugin/.mcp.json +15 -0
- package/vendor/packages/ios-simulator-plugin/.zcode-plugin/plugin.json +34 -0
- package/vendor/packages/ios-simulator-plugin/README.md +111 -0
- package/vendor/packages/ios-simulator-plugin/commands/ios-dev.md +11 -0
- package/vendor/packages/ios-simulator-plugin/dist/lib/path.d.ts +4 -0
- package/vendor/packages/ios-simulator-plugin/dist/lib/path.js +18 -0
- package/vendor/packages/ios-simulator-plugin/dist/lib/result.d.ts +5 -0
- package/vendor/packages/ios-simulator-plugin/dist/lib/result.js +20 -0
- package/vendor/packages/ios-simulator-plugin/dist/lib/run.d.ts +17 -0
- package/vendor/packages/ios-simulator-plugin/dist/lib/run.js +83 -0
- package/vendor/packages/ios-simulator-plugin/dist/mcp/server.d.ts +3 -0
- package/vendor/packages/ios-simulator-plugin/dist/mcp/server.js +46833 -0
- package/vendor/packages/ios-simulator-plugin/dist/providers/build.d.ts +112 -0
- package/vendor/packages/ios-simulator-plugin/dist/providers/build.js +99 -0
- package/vendor/packages/ios-simulator-plugin/dist/providers/logs.d.ts +21 -0
- package/vendor/packages/ios-simulator-plugin/dist/providers/logs.js +26 -0
- package/vendor/packages/ios-simulator-plugin/dist/providers/preflight.d.ts +12 -0
- package/vendor/packages/ios-simulator-plugin/dist/providers/preflight.js +62 -0
- package/vendor/packages/ios-simulator-plugin/dist/providers/project.d.ts +35 -0
- package/vendor/packages/ios-simulator-plugin/dist/providers/project.js +288 -0
- package/vendor/packages/ios-simulator-plugin/dist/providers/screenshot.d.ts +22 -0
- package/vendor/packages/ios-simulator-plugin/dist/providers/screenshot.js +30 -0
- package/vendor/packages/ios-simulator-plugin/dist/providers/sim.d.ts +60 -0
- package/vendor/packages/ios-simulator-plugin/dist/providers/sim.js +116 -0
- package/vendor/packages/ios-simulator-plugin/dist/providers/ui.d.ts +57 -0
- package/vendor/packages/ios-simulator-plugin/dist/providers/ui.js +67 -0
- package/vendor/packages/ios-simulator-plugin/hooks/hooks.json +3 -0
- package/vendor/packages/ios-simulator-plugin/package.json +35 -0
- package/vendor/packages/ios-simulator-plugin/skills/ios-dev/SKILL.md +45 -0
- package/vendor/packages/ios-simulator-plugin/templates/swiftui-app/README.md +5 -0
- package/vendor/packages/restore-legacy-sessions-plugin/.zcode-plugin/plugin.json +9 -0
- package/vendor/packages/restore-legacy-sessions-plugin/README.md +35 -0
- package/vendor/packages/restore-legacy-sessions-plugin/commands/restore-legacy-sessions.md +11 -0
- package/vendor/packages/restore-legacy-sessions-plugin/package.json +8 -0
- package/vendor/packages/restore-legacy-sessions-plugin/skills/restore-legacy-sessions/SKILL.md +92 -0
- package/vendor/packages/restore-legacy-sessions-plugin/skills/restore-legacy-sessions/scripts/restore-conversation.mjs +648 -0
- package/vendor/packages/restore-legacy-sessions-plugin/skills/restore-legacy-sessions/scripts/scan-legacy-sessions.mjs +422 -0
- package/vendor/packages/skill-creator-plugin/.zcode-plugin/plugin.json +8 -0
- package/vendor/packages/skill-creator-plugin/package.json +8 -0
- package/vendor/packages/skill-creator-plugin/skills/skill-creator/SKILL.md +159 -0
- package/vendor/packages/zcode-guide-plugin/.zcode-plugin/plugin.json +8 -0
- package/vendor/packages/zcode-guide-plugin/README.md +22 -0
- package/vendor/packages/zcode-guide-plugin/package.json +8 -0
- package/vendor/packages/zcode-guide-plugin/skills/diagnosing-commands/SKILL.md +66 -0
- package/vendor/packages/zcode-guide-plugin/skills/diagnosing-hooks/SKILL.md +66 -0
- package/vendor/packages/zcode-guide-plugin/skills/diagnosing-mcp/SKILL.md +97 -0
- package/vendor/packages/zcode-guide-plugin/skills/diagnosing-plugins/SKILL.md +59 -0
- package/vendor/packages/zcode-guide-plugin/skills/diagnosing-skills/SKILL.md +61 -0
- package/vendor/packages/zcode-guide-plugin/skills/zcode-configuration-guide/SKILL.md +99 -0
- package/vendor/zcode.cjs +2926 -0
- package/zcode-runtime.lock.json +8 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { mkdir, readFile } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { data, inside, rel } from "../lib/path.js";
|
|
4
|
+
import { brief, ok, run } from "../lib/run.js";
|
|
5
|
+
import { boot } from "./sim.js";
|
|
6
|
+
export async function shot(input = {}) {
|
|
7
|
+
const sim = await boot({
|
|
8
|
+
udid: input.udid,
|
|
9
|
+
name: input.device,
|
|
10
|
+
runtime: input.runtime,
|
|
11
|
+
open: input.openSimulator,
|
|
12
|
+
});
|
|
13
|
+
const file = input.path
|
|
14
|
+
? inside(process.cwd(), input.path)
|
|
15
|
+
: path.join(await data("screenshots"), `${stamp()}-${sim.udid}.png`);
|
|
16
|
+
await mkdir(path.dirname(file), { recursive: true });
|
|
17
|
+
const out = await run(["xcrun", "simctl", "io", sim.udid, "screenshot", file], { timeout: 30_000 });
|
|
18
|
+
if (!ok(out))
|
|
19
|
+
throw new Error(brief(out));
|
|
20
|
+
const bytes = await readFile(file);
|
|
21
|
+
return {
|
|
22
|
+
simulator: sim,
|
|
23
|
+
path: rel(file),
|
|
24
|
+
bytes: bytes.byteLength,
|
|
25
|
+
data: bytes.toString("base64"),
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
function stamp() {
|
|
29
|
+
return new Date().toISOString().replaceAll(/[:.]/g, "-");
|
|
30
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
type Sim = {
|
|
2
|
+
name: string;
|
|
3
|
+
udid: string;
|
|
4
|
+
state: string;
|
|
5
|
+
runtime: string;
|
|
6
|
+
available: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare function list(): Promise<Sim[]>;
|
|
9
|
+
export declare function parseSimulators(value: string): Sim[];
|
|
10
|
+
export declare function isIosRuntime(runtime: string): boolean;
|
|
11
|
+
export declare function pick(input?: {
|
|
12
|
+
udid?: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
runtime?: string;
|
|
15
|
+
}): Promise<Sim>;
|
|
16
|
+
export declare function boot(input?: {
|
|
17
|
+
udid?: string;
|
|
18
|
+
name?: string;
|
|
19
|
+
runtime?: string;
|
|
20
|
+
open?: boolean;
|
|
21
|
+
}): Promise<{
|
|
22
|
+
opened: boolean;
|
|
23
|
+
name: string;
|
|
24
|
+
udid: string;
|
|
25
|
+
state: string;
|
|
26
|
+
runtime: string;
|
|
27
|
+
available: boolean;
|
|
28
|
+
}>;
|
|
29
|
+
export declare function show(udid?: string): Promise<{
|
|
30
|
+
opened: boolean;
|
|
31
|
+
udid: string | undefined;
|
|
32
|
+
fallback?: undefined;
|
|
33
|
+
} | {
|
|
34
|
+
opened: boolean;
|
|
35
|
+
udid: string | undefined;
|
|
36
|
+
fallback: boolean;
|
|
37
|
+
}>;
|
|
38
|
+
export declare function install(udid: string, app: string): Promise<{
|
|
39
|
+
installed: boolean;
|
|
40
|
+
udid: string;
|
|
41
|
+
app: string;
|
|
42
|
+
}>;
|
|
43
|
+
export declare function launch(udid: string, bundle: string, args?: string[]): Promise<{
|
|
44
|
+
launched: boolean;
|
|
45
|
+
udid: string;
|
|
46
|
+
bundle: string;
|
|
47
|
+
output: string;
|
|
48
|
+
}>;
|
|
49
|
+
export declare function terminate(udid: string, bundle: string): Promise<{
|
|
50
|
+
terminated: boolean;
|
|
51
|
+
udid: string;
|
|
52
|
+
bundle: string;
|
|
53
|
+
}>;
|
|
54
|
+
export declare function url(udid: string, value: string): Promise<{
|
|
55
|
+
opened: boolean;
|
|
56
|
+
udid: string;
|
|
57
|
+
url: string;
|
|
58
|
+
}>;
|
|
59
|
+
export {};
|
|
60
|
+
//# sourceMappingURL=sim.d.ts.map
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { brief, ok, run } from "../lib/run.js";
|
|
2
|
+
const UDID = /^[0-9A-Fa-f-]{8,}$/;
|
|
3
|
+
function valid(udid) {
|
|
4
|
+
return UDID.test(udid);
|
|
5
|
+
}
|
|
6
|
+
export async function list() {
|
|
7
|
+
const out = await run(["xcrun", "simctl", "list", "devices", "--json"], { timeout: 20_000 });
|
|
8
|
+
if (!ok(out))
|
|
9
|
+
throw new Error(brief(out));
|
|
10
|
+
return parseSimulators(out.stdout);
|
|
11
|
+
}
|
|
12
|
+
export function parseSimulators(value) {
|
|
13
|
+
const raw = JSON.parse(value);
|
|
14
|
+
return Object.entries(raw.devices ?? {}).flatMap(([runtime, devices]) => {
|
|
15
|
+
if (!isIosRuntime(runtime))
|
|
16
|
+
return [];
|
|
17
|
+
return devices
|
|
18
|
+
.filter((item) => typeof item === "object" && item !== null)
|
|
19
|
+
.map((item) => ({
|
|
20
|
+
name: String(item.name ?? ""),
|
|
21
|
+
udid: String(item.udid ?? ""),
|
|
22
|
+
state: String(item.state ?? ""),
|
|
23
|
+
runtime,
|
|
24
|
+
available: item.isAvailable !== false && item.availabilityError === undefined,
|
|
25
|
+
}))
|
|
26
|
+
.filter((item) => item.name && item.udid);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
export function isIosRuntime(runtime) {
|
|
30
|
+
return /(?:^|[.\s-])(iOS|iPadOS)(?:$|[.\s-])/.test(runtime);
|
|
31
|
+
}
|
|
32
|
+
export async function pick(input) {
|
|
33
|
+
if (input?.udid) {
|
|
34
|
+
if (!valid(input.udid))
|
|
35
|
+
throw new Error(`Invalid simulator UDID: ${input.udid}`);
|
|
36
|
+
const hit = (await list()).find((item) => item.udid === input.udid);
|
|
37
|
+
if (hit)
|
|
38
|
+
return hit;
|
|
39
|
+
throw new Error(`Simulator not found: ${input.udid}`);
|
|
40
|
+
}
|
|
41
|
+
const sims = (await list()).filter((item) => item.available);
|
|
42
|
+
const booted = sims.find((item) => item.state === "Booted");
|
|
43
|
+
if (booted && !input?.name && !input?.runtime)
|
|
44
|
+
return booted;
|
|
45
|
+
const want = (input?.name || process.env.IOS_SIM_DEFAULT_DEVICE || "iPhone 16").toLowerCase();
|
|
46
|
+
const found = sims.find((item) => {
|
|
47
|
+
return item.name.toLowerCase().includes(want) && (!input?.runtime || item.runtime.includes(input.runtime));
|
|
48
|
+
});
|
|
49
|
+
if (found)
|
|
50
|
+
return found;
|
|
51
|
+
const phone = sims.find((item) => item.name.startsWith("iPhone") && (!input?.runtime || item.runtime.includes(input.runtime)));
|
|
52
|
+
if (phone)
|
|
53
|
+
return phone;
|
|
54
|
+
const first = sims[0];
|
|
55
|
+
if (first)
|
|
56
|
+
return first;
|
|
57
|
+
throw new Error("No available iOS simulators found.");
|
|
58
|
+
}
|
|
59
|
+
export async function boot(input = {}) {
|
|
60
|
+
const sim = await pick(input);
|
|
61
|
+
if (sim.state !== "Booted") {
|
|
62
|
+
const out = await run(["xcrun", "simctl", "boot", sim.udid], { timeout: 60_000 });
|
|
63
|
+
if (!ok(out) && !brief(out).includes("current state: Booted"))
|
|
64
|
+
throw new Error(brief(out));
|
|
65
|
+
const ready = await run(["xcrun", "simctl", "bootstatus", sim.udid, "-b"], { timeout: 120_000 });
|
|
66
|
+
if (!ok(ready))
|
|
67
|
+
throw new Error(brief(ready));
|
|
68
|
+
}
|
|
69
|
+
if (input.open)
|
|
70
|
+
await show(sim.udid);
|
|
71
|
+
return { ...(await pick({ udid: sim.udid })), opened: Boolean(input.open) };
|
|
72
|
+
}
|
|
73
|
+
export async function show(udid) {
|
|
74
|
+
const args = udid ? ["open", "-a", "Simulator", "--args", "-CurrentDeviceUDID", udid] : ["open", "-a", "Simulator"];
|
|
75
|
+
const out = await run(args, { timeout: 10_000 });
|
|
76
|
+
if (ok(out))
|
|
77
|
+
return { opened: true, udid };
|
|
78
|
+
const fallback = await run(["open", "-a", "Simulator"], { timeout: 10_000 });
|
|
79
|
+
if (ok(fallback))
|
|
80
|
+
return { opened: true, udid, fallback: true };
|
|
81
|
+
throw new Error(brief(out) || brief(fallback));
|
|
82
|
+
}
|
|
83
|
+
export async function install(udid, app) {
|
|
84
|
+
if (!valid(udid))
|
|
85
|
+
throw new Error(`Invalid simulator UDID: ${udid}`);
|
|
86
|
+
const out = await run(["xcrun", "simctl", "install", udid, app], { timeout: 120_000 });
|
|
87
|
+
if (!ok(out))
|
|
88
|
+
throw new Error(brief(out));
|
|
89
|
+
return { installed: true, udid, app };
|
|
90
|
+
}
|
|
91
|
+
export async function launch(udid, bundle, args = []) {
|
|
92
|
+
if (!valid(udid))
|
|
93
|
+
throw new Error(`Invalid simulator UDID: ${udid}`);
|
|
94
|
+
const out = await run(["xcrun", "simctl", "launch", udid, bundle, ...args], { timeout: 60_000 });
|
|
95
|
+
if (!ok(out))
|
|
96
|
+
throw new Error(brief(out));
|
|
97
|
+
return { launched: true, udid, bundle, output: brief(out) };
|
|
98
|
+
}
|
|
99
|
+
export async function terminate(udid, bundle) {
|
|
100
|
+
if (!valid(udid))
|
|
101
|
+
throw new Error(`Invalid simulator UDID: ${udid}`);
|
|
102
|
+
const out = await run(["xcrun", "simctl", "terminate", udid, bundle], { timeout: 30_000 });
|
|
103
|
+
if (!ok(out))
|
|
104
|
+
throw new Error(brief(out));
|
|
105
|
+
return { terminated: true, udid, bundle };
|
|
106
|
+
}
|
|
107
|
+
export async function url(udid, value) {
|
|
108
|
+
if (!valid(udid))
|
|
109
|
+
throw new Error(`Invalid simulator UDID: ${udid}`);
|
|
110
|
+
if (value.length > 2048)
|
|
111
|
+
throw new Error("URL is too long.");
|
|
112
|
+
const out = await run(["xcrun", "simctl", "openurl", udid, value], { timeout: 30_000 });
|
|
113
|
+
if (!ok(out))
|
|
114
|
+
throw new Error(brief(out));
|
|
115
|
+
return { opened: true, udid, url: value };
|
|
116
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
type Target = {
|
|
2
|
+
udid?: string;
|
|
3
|
+
device?: string;
|
|
4
|
+
runtime?: string;
|
|
5
|
+
};
|
|
6
|
+
type Tap = Target & {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
duration?: number;
|
|
10
|
+
};
|
|
11
|
+
type Swipe = Target & {
|
|
12
|
+
x1: number;
|
|
13
|
+
y1: number;
|
|
14
|
+
x2: number;
|
|
15
|
+
y2: number;
|
|
16
|
+
delta?: number;
|
|
17
|
+
};
|
|
18
|
+
type Text = Target & {
|
|
19
|
+
text: string;
|
|
20
|
+
};
|
|
21
|
+
type Button = Target & {
|
|
22
|
+
button: "APPLE_PAY" | "HOME" | "LOCK" | "SIDE_BUTTON" | "SIRI";
|
|
23
|
+
duration?: number;
|
|
24
|
+
};
|
|
25
|
+
export declare function status(): Promise<{
|
|
26
|
+
backend: string;
|
|
27
|
+
available: boolean;
|
|
28
|
+
detail: string;
|
|
29
|
+
reservedBackends: string[];
|
|
30
|
+
}>;
|
|
31
|
+
export declare function tap(input: Tap): Promise<{
|
|
32
|
+
backend: string;
|
|
33
|
+
udid: string;
|
|
34
|
+
output: string;
|
|
35
|
+
}>;
|
|
36
|
+
export declare function swipe(input: Swipe): Promise<{
|
|
37
|
+
backend: string;
|
|
38
|
+
udid: string;
|
|
39
|
+
output: string;
|
|
40
|
+
}>;
|
|
41
|
+
export declare function typeText(input: Text): Promise<{
|
|
42
|
+
backend: string;
|
|
43
|
+
udid: string;
|
|
44
|
+
output: string;
|
|
45
|
+
}>;
|
|
46
|
+
export declare function button(input: Button): Promise<{
|
|
47
|
+
backend: string;
|
|
48
|
+
udid: string;
|
|
49
|
+
output: string;
|
|
50
|
+
}>;
|
|
51
|
+
export declare function describe(input?: Target): Promise<{
|
|
52
|
+
backend: string;
|
|
53
|
+
udid: string;
|
|
54
|
+
output: string;
|
|
55
|
+
}>;
|
|
56
|
+
export {};
|
|
57
|
+
//# sourceMappingURL=ui.d.ts.map
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { brief, ok, run } from "../lib/run.js";
|
|
2
|
+
import { boot } from "./sim.js";
|
|
3
|
+
export async function status() {
|
|
4
|
+
const idb = await run(["idb", "--version"], { timeout: 5000 });
|
|
5
|
+
return {
|
|
6
|
+
backend: "idb",
|
|
7
|
+
available: ok(idb),
|
|
8
|
+
detail: ok(idb) ? brief(idb) : "idb is not installed or not on PATH",
|
|
9
|
+
reservedBackends: ["xcodebuildmcp"],
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export async function tap(input) {
|
|
13
|
+
const sim = await target(input);
|
|
14
|
+
return exec(sim.udid, [
|
|
15
|
+
"ui",
|
|
16
|
+
"tap",
|
|
17
|
+
String(input.x),
|
|
18
|
+
String(input.y),
|
|
19
|
+
...(input.duration === undefined ? [] : ["--duration", String(input.duration)]),
|
|
20
|
+
]);
|
|
21
|
+
}
|
|
22
|
+
export async function swipe(input) {
|
|
23
|
+
const sim = await target(input);
|
|
24
|
+
return exec(sim.udid, [
|
|
25
|
+
"ui",
|
|
26
|
+
"swipe",
|
|
27
|
+
String(input.x1),
|
|
28
|
+
String(input.y1),
|
|
29
|
+
String(input.x2),
|
|
30
|
+
String(input.y2),
|
|
31
|
+
...(input.delta === undefined ? [] : ["--delta", String(input.delta)]),
|
|
32
|
+
]);
|
|
33
|
+
}
|
|
34
|
+
export async function typeText(input) {
|
|
35
|
+
const sim = await target(input);
|
|
36
|
+
return exec(sim.udid, ["ui", "text", input.text]);
|
|
37
|
+
}
|
|
38
|
+
export async function button(input) {
|
|
39
|
+
const sim = await target(input);
|
|
40
|
+
return exec(sim.udid, [
|
|
41
|
+
"ui",
|
|
42
|
+
"button",
|
|
43
|
+
input.button,
|
|
44
|
+
...(input.duration === undefined ? [] : ["--duration", String(input.duration)]),
|
|
45
|
+
]);
|
|
46
|
+
}
|
|
47
|
+
export async function describe(input = {}) {
|
|
48
|
+
const sim = await target(input);
|
|
49
|
+
return exec(sim.udid, ["ui", "describe-all", "--json"]);
|
|
50
|
+
}
|
|
51
|
+
async function target(input) {
|
|
52
|
+
return boot({ udid: input.udid, name: input.device, runtime: input.runtime });
|
|
53
|
+
}
|
|
54
|
+
async function exec(udid, args) {
|
|
55
|
+
const found = await status();
|
|
56
|
+
if (!found.available) {
|
|
57
|
+
throw new Error("UI automation backend unavailable. Install idb and idb-companion, or use build/run/screenshot tools only.");
|
|
58
|
+
}
|
|
59
|
+
const out = await run(["idb", ...args, "--udid", udid], { timeout: 60_000 });
|
|
60
|
+
if (!ok(out))
|
|
61
|
+
throw new Error(brief(out));
|
|
62
|
+
return {
|
|
63
|
+
backend: "idb",
|
|
64
|
+
udid,
|
|
65
|
+
output: brief(out, 20_000),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/package.json",
|
|
3
|
+
"name": "@zcode/ios-simulator-plugin",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"private": true,
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"main": "./dist/mcp/server.js",
|
|
9
|
+
"types": "./dist/mcp/server.d.ts",
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsc && node scripts/build-mcp.mjs",
|
|
12
|
+
"clean": "node ../../scripts/clean-dist.mjs",
|
|
13
|
+
"typecheck": "tsc --noEmit",
|
|
14
|
+
"test": "vitest run test"
|
|
15
|
+
},
|
|
16
|
+
"exports": {
|
|
17
|
+
"./mcp": {
|
|
18
|
+
"types": "./dist/mcp/server.d.ts",
|
|
19
|
+
"import": "./dist/mcp/server.js"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"bin": {
|
|
23
|
+
"ios-simulator-mcp": "./dist/mcp/server.js"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
27
|
+
"zod": "^4.4.3"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@types/node": "^24.0.0",
|
|
31
|
+
"esbuild": "^0.25.0",
|
|
32
|
+
"typescript": "^5.9.0",
|
|
33
|
+
"vitest": "^4.1.5"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ios-dev
|
|
3
|
+
description: Build, run, inspect, and lightly automate iOS simulator apps with the ios-simulator MCP tools.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# iOS Dev
|
|
7
|
+
|
|
8
|
+
Use this skill when the user wants you to create, modify, build, run, debug, screenshot, or inspect an iOS app in the macOS iOS Simulator.
|
|
9
|
+
|
|
10
|
+
## ZCode Tool Names
|
|
11
|
+
|
|
12
|
+
This skill assumes the MCP server is configured in zcode as `ios_simulator`. In zcode, MCP tools are exposed to the model as `mcp__ios_simulator__<tool>`.
|
|
13
|
+
|
|
14
|
+
If the server is configured with a different name, use the corresponding visible `mcp__<server>__...` tool names from the active zcode tool list.
|
|
15
|
+
|
|
16
|
+
## Default Workflow
|
|
17
|
+
|
|
18
|
+
1. Call `mcp__ios_simulator__ios_preflight` first.
|
|
19
|
+
- If full Xcode or `simctl` is missing, stop the simulator workflow and explain the exact missing check.
|
|
20
|
+
- Command Line Tools alone are not enough for this plugin.
|
|
21
|
+
2. Discover the project with `mcp__ios_simulator__ios_discover_project`.
|
|
22
|
+
- If no Xcode project exists and the user wants a new app, call `mcp__ios_simulator__ios_create_app`.
|
|
23
|
+
- Prefer editing the generated SwiftUI files directly after project creation.
|
|
24
|
+
- `mcp__ios_simulator__ios_create_app` refuses to overwrite generated files by default; only pass `overwrite: true` after explicit user confirmation.
|
|
25
|
+
3. Build and launch with `mcp__ios_simulator__ios_build_and_run`.
|
|
26
|
+
- Pass `scheme` when multiple schemes exist.
|
|
27
|
+
- Use `openSimulator: true` when the user expects to see the macOS Simulator window.
|
|
28
|
+
- Read the returned `output` first for compile errors; use the returned log path only when more detail is needed.
|
|
29
|
+
4. Verify the app visually with `mcp__ios_simulator__ios_screenshot`.
|
|
30
|
+
5. For simple runtime checks, use `mcp__ios_simulator__ios_open_url`, `mcp__ios_simulator__ios_launch_app`, `mcp__ios_simulator__ios_terminate_app`, and `mcp__ios_simulator__ios_logs`.
|
|
31
|
+
6. For UI automation, call `mcp__ios_simulator__ios_ui_status` first.
|
|
32
|
+
- `mcp__ios_simulator__ios_ui_tap`, `mcp__ios_simulator__ios_ui_swipe`, `mcp__ios_simulator__ios_ui_type_text`, `mcp__ios_simulator__ios_ui_button`, and `mcp__ios_simulator__ios_ui_describe` require the optional `idb` backend.
|
|
33
|
+
- If `idb` is unavailable, continue with build/run/screenshot checks and say UI automation is unavailable.
|
|
34
|
+
|
|
35
|
+
## Tool Notes
|
|
36
|
+
|
|
37
|
+
- This MVP intentionally uses Apple's macOS Simulator app for rendering. Do not create or expect a custom simulator window.
|
|
38
|
+
- The MCP tools accept `udid`, `device`, and `runtime` when a specific simulator is needed. Otherwise they choose the booted simulator, then the configured default iPhone device.
|
|
39
|
+
- Keep simulator interactions through MCP tools instead of raw `xcrun` commands unless a tool does not cover the operation.
|
|
40
|
+
- `mcp__ios_simulator__ios_create_app` generates a minimal SwiftUI app suitable for model-driven iteration.
|
|
41
|
+
- `mcp__ios_simulator__ios_build_app` only builds. `mcp__ios_simulator__ios_build_and_run` builds, installs, launches, and opens Simulator.
|
|
42
|
+
|
|
43
|
+
## Extension Point
|
|
44
|
+
|
|
45
|
+
The UI backend is deliberately isolated. P0 uses `idb` when installed; future backends can map the same public operations to XcodeBuildMCP, native Accessibility, or another automation bridge without changing the skill workflow.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "restore-legacy-sessions",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Select and restore legacy ACP-era ZCode sessions into the new ZCode task and session store.",
|
|
5
|
+
"author": { "name": "Z.ai" },
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"skills": "skills",
|
|
8
|
+
"commands": "commands"
|
|
9
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Restore Legacy Sessions Plugin
|
|
2
|
+
|
|
3
|
+
ZCode official plugin for restoring old ACP-era ZCode session snapshots into the new task index and CLI session DB.
|
|
4
|
+
|
|
5
|
+
This plugin is bundled as `restore-legacy-sessions@zcode-plugins-official` and is disabled by default. Enable it only when you need to inspect or restore old session data.
|
|
6
|
+
|
|
7
|
+
## Enable
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
zcode plugins enable restore-legacy-sessions
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Or inside a ZCode session:
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
/plugins enable restore-legacy-sessions
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Changes apply to new sessions. After enabling, use:
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
/restore-legacy-sessions
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Data Boundaries
|
|
26
|
+
|
|
27
|
+
- Default source: `~/.zcode/v2/sessions`
|
|
28
|
+
- Task index destination: `~/.zcode/v2/tasks-index.sqlite`
|
|
29
|
+
- CLI session DB destination: `~/.zcode/cli/db/db.sqlite`
|
|
30
|
+
|
|
31
|
+
The restore scripts create timestamped DB backups before writing. Restored ACP-era conversations are persisted as normal `glm` ZCode Agent history and do not write `migration_source`.
|
|
32
|
+
|
|
33
|
+
## Development
|
|
34
|
+
|
|
35
|
+
This is a skill-only / command-only plugin. It has no MCP server and no build step.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Select and restore a legacy ZCode session.
|
|
3
|
+
argument-hint: "[agent/workspace/session filters]"
|
|
4
|
+
skills: restore-legacy-sessions
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Use the `restore-legacy-sessions` skill for this request:
|
|
8
|
+
|
|
9
|
+
$ARGUMENTS
|
|
10
|
+
|
|
11
|
+
Start by listing legacy agents, then narrow to a workspace and a conversation. Run a dry run before applying any restore, and keep the default source as `~/.zcode/v2/sessions` unless the user explicitly provides another source directory.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/package.json",
|
|
3
|
+
"name": "@zcode/restore-legacy-sessions-plugin",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"private": true,
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"description": "Legacy ZCode session restoration skills published as an official ZCode plugin."
|
|
8
|
+
}
|
package/vendor/packages/restore-legacy-sessions-plugin/skills/restore-legacy-sessions/SKILL.md
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: restore-legacy-sessions
|
|
3
|
+
description: Use when ZCode needs to inspect, plan, or execute restoration of old ACP-era ZCode sessions from ~/.zcode/v2/sessions into the new ZCode task/session stores. Trigger when the user wants to choose a previous agent, select a workspace to restore, pick a specific historical conversation, dry-run legacy session migration, or reason about tasks-index.sqlite and ~/.zcode/cli/db/db.sqlite consistency.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Restore Legacy Sessions
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Use this skill to guide old ACP-era ZCode session restoration. The first job is selection, not mutation: identify the source agent, the workspace, and the exact conversation before proposing any write to the new stores.
|
|
11
|
+
|
|
12
|
+
## Stores
|
|
13
|
+
|
|
14
|
+
- Legacy snapshots: `~/.zcode/v2/sessions/{workspaceHash}/{legacyTaskId}.json`
|
|
15
|
+
- Task index: `~/.zcode/v2/tasks-index.sqlite`
|
|
16
|
+
- New ZCode session DB: `~/.zcode/cli/db/db.sqlite`
|
|
17
|
+
|
|
18
|
+
Use `restoredTaskId = meta.acpSessionId || meta.taskId`. The legacy snapshot filename and `meta.taskId` are historical IDs; the app task list often uses `meta.acpSessionId` as the real task/session ID.
|
|
19
|
+
|
|
20
|
+
The scan script defaults to the live legacy source `~/.zcode/v2/sessions`; pass `--legacy-dir <path>` only when the user explicitly asks to inspect another source directory.
|
|
21
|
+
|
|
22
|
+
Restored ACP-era conversations are normal ZCode Agent history, so persisted provider fields must be `glm`. Treat the snapshot provider as legacy source context only; do not write task-index `migration_source` or `meta_json.migrationSource` for these restores. The `migrationSource` enum is reserved for the existing Claude Code native import path (`claudeCode`).
|
|
23
|
+
|
|
24
|
+
## Selection Workflow
|
|
25
|
+
|
|
26
|
+
Resolve script paths relative to this `SKILL.md` directory. When running from another working directory, use the absolute path to the script inside the plugin cache.
|
|
27
|
+
|
|
28
|
+
List source agents:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
node scripts/scan-legacy-sessions.mjs agents
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
After the user chooses an agent, list workspaces for that agent:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
node scripts/scan-legacy-sessions.mjs workspaces --agent glm
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
After the user chooses a workspace, list conversations:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
node scripts/scan-legacy-sessions.mjs conversations --agent glm --workspace /Users/mbear/test/z-m
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Use `--query <text>` to narrow conversations by title, message content, task id, or session id. Use `--json` when feeding the result into `jq` or another script.
|
|
47
|
+
|
|
48
|
+
## Presenting Choices
|
|
49
|
+
|
|
50
|
+
Ask for one choice at a time unless the user already supplied enough filters:
|
|
51
|
+
|
|
52
|
+
1. previous agent/provider
|
|
53
|
+
2. workspace to restore
|
|
54
|
+
3. conversation to restore
|
|
55
|
+
|
|
56
|
+
Show compact numbered options with title, updated time, message count, `restoredTaskId`, and restore state. If there are many options, show the top 20 by `updatedAt` and tell the user how to filter with `--query`.
|
|
57
|
+
|
|
58
|
+
After the user chooses an exact conversation, run a dry run first:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
node scripts/restore-conversation.mjs --snapshot ~/.zcode/v2/sessions/<workspaceHash>/<legacyTaskId>.json --dry-run
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Then apply the restore:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
node scripts/restore-conversation.mjs --snapshot ~/.zcode/v2/sessions/<workspaceHash>/<legacyTaskId>.json
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Restore States
|
|
71
|
+
|
|
72
|
+
- `ready`: CLI DB and task-index both already contain the restored task id.
|
|
73
|
+
- `needs-cli-db`: task-index exists, but `~/.zcode/cli/db/db.sqlite` has no session row; rebuild the real session from the legacy snapshot.
|
|
74
|
+
- `needs-task-index`: CLI DB exists, but task-index is missing; backfill task-index only.
|
|
75
|
+
- `needs-full-import`: both stores are missing; import session history and then index it.
|
|
76
|
+
|
|
77
|
+
## Mutation Rules
|
|
78
|
+
|
|
79
|
+
Do not write data during selection. Before any apply step:
|
|
80
|
+
|
|
81
|
+
- Create timestamped backups of `tasks-index.sqlite` and `db.sqlite`.
|
|
82
|
+
- Keep writes idempotent; never overwrite a new real session that already contains user continuation messages.
|
|
83
|
+
- Preserve task-index `pinned`, `archived`, `deleted`, and `title_overridden`.
|
|
84
|
+
- Use `workspaceKey = workspaceIdentity?.trim() || workspacePath` for identity/isolation semantics.
|
|
85
|
+
- Write task-index `provider = "glm"` and CLI message `providerID = "glm"` regardless of the snapshot provider.
|
|
86
|
+
- Keep `task-index.meta_json.taskId = restoredTaskId`; never leave it as the old snapshot `meta.taskId`.
|
|
87
|
+
- Leave task-index `migration_source` empty for ACP-era restores. If a previous restore wrote `legacy-session`, clear it before validating visibility.
|
|
88
|
+
- Write CLI DB `part` rows for visible text and tool calls. The app detail page renders from `part`; `message.data.content` alone is not enough.
|
|
89
|
+
- Preserve assistant threading by setting `parentID` to the preceding user message id when possible.
|
|
90
|
+
- Do not start old ACP runtimes. Restore from snapshots and new ZCode stores only.
|
|
91
|
+
|
|
92
|
+
For app code changes, update a spec under `docs/` before implementation and run `pnpm typecheck` and `pnpm lint`.
|