@frankzhang2026/opencode-android-orchestrator 0.1.0 → 0.2.0

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.
Files changed (124) hide show
  1. package/CHANGELOG.md +75 -2
  2. package/LICENSE +21 -0
  3. package/README.md +391 -6
  4. package/THIRD_PARTY_NOTICES.md +119 -0
  5. package/dist/cli.js +243 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/compatibility/hooks.d.ts +23 -0
  8. package/dist/compatibility/hooks.d.ts.map +1 -0
  9. package/dist/compatibility/hooks.js +44 -0
  10. package/dist/compatibility/hooks.js.map +1 -0
  11. package/dist/compatibility/versions.d.ts +19 -0
  12. package/dist/compatibility/versions.d.ts.map +1 -1
  13. package/dist/compatibility/versions.js +116 -0
  14. package/dist/compatibility/versions.js.map +1 -1
  15. package/dist/doctor/index.d.ts +36 -0
  16. package/dist/doctor/index.d.ts.map +1 -0
  17. package/dist/doctor/index.js +289 -0
  18. package/dist/doctor/index.js.map +1 -0
  19. package/dist/doctor/installation.d.ts +4 -0
  20. package/dist/doctor/installation.d.ts.map +1 -0
  21. package/dist/doctor/installation.js +472 -0
  22. package/dist/doctor/installation.js.map +1 -0
  23. package/dist/index.d.ts +13 -2
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +13 -2
  26. package/dist/index.js.map +1 -1
  27. package/dist/installer/adaptive-templates.d.ts +56 -0
  28. package/dist/installer/adaptive-templates.d.ts.map +1 -0
  29. package/dist/installer/adaptive-templates.js +167 -0
  30. package/dist/installer/adaptive-templates.js.map +1 -0
  31. package/dist/installer/agents-config.d.ts +19 -0
  32. package/dist/installer/agents-config.d.ts.map +1 -0
  33. package/dist/installer/agents-config.js +147 -0
  34. package/dist/installer/agents-config.js.map +1 -0
  35. package/dist/installer/android-project.d.ts +36 -0
  36. package/dist/installer/android-project.d.ts.map +1 -0
  37. package/dist/installer/android-project.js +418 -0
  38. package/dist/installer/android-project.js.map +1 -0
  39. package/dist/installer/index.d.ts +8 -0
  40. package/dist/installer/index.d.ts.map +1 -1
  41. package/dist/installer/index.js +8 -1
  42. package/dist/installer/index.js.map +1 -1
  43. package/dist/installer/init.d.ts +67 -0
  44. package/dist/installer/init.d.ts.map +1 -0
  45. package/dist/installer/init.js +389 -0
  46. package/dist/installer/init.js.map +1 -0
  47. package/dist/installer/install-manifest.d.ts +132 -0
  48. package/dist/installer/install-manifest.d.ts.map +1 -0
  49. package/dist/installer/install-manifest.js +1047 -0
  50. package/dist/installer/install-manifest.js.map +1 -0
  51. package/dist/installer/opencode-config.d.ts +31 -0
  52. package/dist/installer/opencode-config.d.ts.map +1 -0
  53. package/dist/installer/opencode-config.js +296 -0
  54. package/dist/installer/opencode-config.js.map +1 -0
  55. package/dist/installer/uninstall.d.ts +70 -0
  56. package/dist/installer/uninstall.d.ts.map +1 -0
  57. package/dist/installer/uninstall.js +770 -0
  58. package/dist/installer/uninstall.js.map +1 -0
  59. package/dist/installer/upgrade.d.ts +96 -0
  60. package/dist/installer/upgrade.d.ts.map +1 -0
  61. package/dist/installer/upgrade.js +1106 -0
  62. package/dist/installer/upgrade.js.map +1 -0
  63. package/dist/opencode-plugin.d.ts +2 -0
  64. package/dist/opencode-plugin.d.ts.map +1 -0
  65. package/dist/opencode-plugin.js +4 -0
  66. package/dist/opencode-plugin.js.map +1 -0
  67. package/dist/plugin/index.d.ts +7 -2
  68. package/dist/plugin/index.d.ts.map +1 -1
  69. package/dist/plugin/index.js +23 -6
  70. package/dist/plugin/index.js.map +1 -1
  71. package/dist/tools/index.d.ts +35 -1
  72. package/dist/tools/index.d.ts.map +1 -1
  73. package/dist/tools/index.js +197 -1
  74. package/dist/tools/index.js.map +1 -1
  75. package/docs/MIGRATION.md +173 -0
  76. package/docs/SECURITY.md +212 -0
  77. package/docs/TROUBLESHOOTING.md +172 -0
  78. package/package.json +23 -5
  79. package/templates/.opencode/agents/scheduled-coder.md +115 -0
  80. package/templates/.opencode/agents/scheduled-planner.md +166 -0
  81. package/templates/.opencode/agents/scheduled-reviewer.md +88 -0
  82. package/templates/.opencode/commands/abort-task.md +20 -0
  83. package/templates/.opencode/commands/acceptance.md +20 -0
  84. package/templates/.opencode/commands/change.md +23 -0
  85. package/templates/.opencode/commands/resume-review.md +19 -0
  86. package/templates/.opencode/skills/scheduled-quality-coder/SKILL.md +93 -0
  87. package/templates/.opencode/skills/scheduled-quality-orchestrator/SKILL.md +216 -0
  88. package/templates/.opencode/skills/scheduled-quality-reviewer/SKILL.md +68 -0
  89. package/templates/AGENTS.md.fragment +19 -0
  90. package/templates/README.md +52 -9
  91. package/templates/automation/config.json +50 -0
  92. package/templates/automation/config.schema.json +163 -0
  93. package/templates/automation/task-contract.schema.json +71 -0
  94. package/templates/automation/tasks/TASK-TEMPLATE.json.example +53 -0
  95. package/templates/docs/plans/README.md +26 -0
  96. package/templates/installation-manifest.schema.json +201 -0
  97. package/templates/scripts/automation/abort-task.sh +171 -0
  98. package/templates/scripts/automation/accept-and-integrate.sh +263 -0
  99. package/templates/scripts/automation/acceptance-report.sh +132 -0
  100. package/templates/scripts/automation/approve-and-run.sh +175 -0
  101. package/templates/scripts/automation/begin-review.sh +18 -0
  102. package/templates/scripts/automation/block-task.sh +26 -0
  103. package/templates/scripts/automation/claim-task.sh +74 -0
  104. package/templates/scripts/automation/integration-scope-gate.sh +103 -0
  105. package/templates/scripts/automation/lib.sh +697 -0
  106. package/templates/scripts/automation/orchestrate-task.sh +119 -0
  107. package/templates/scripts/automation/preflight.sh +206 -0
  108. package/templates/scripts/automation/prepare-contract-review.sh +101 -0
  109. package/templates/scripts/automation/quality-gate.sh +72 -0
  110. package/templates/scripts/automation/queue-task.sh +35 -0
  111. package/templates/scripts/automation/record-red.sh +57 -0
  112. package/templates/scripts/automation/resume-review-fix.sh +32 -0
  113. package/templates/scripts/automation/resume-review.sh +120 -0
  114. package/templates/scripts/automation/scope-gate.sh +110 -0
  115. package/templates/scripts/automation/select-task.sh +34 -0
  116. package/templates/scripts/automation/shadow-run.sh +24 -0
  117. package/templates/scripts/automation/show-acceptance-review.sh +111 -0
  118. package/templates/scripts/automation/status.sh +125 -0
  119. package/templates/scripts/automation/submit-review.sh +73 -0
  120. package/templates/scripts/automation/tests/run-tests.sh +699 -0
  121. package/templates/scripts/automation/transition-state.sh +21 -0
  122. package/templates/scripts/automation/validate-contract.sh +87 -0
  123. package/templates/scripts/automation/verify-integration.sh +37 -0
  124. package/templates/scripts/automation/verify-task.sh +54 -0
@@ -0,0 +1,389 @@
1
+ import { spawnSync } from "node:child_process";
2
+ import { lstatSync, readdirSync, readFileSync, } from "node:fs";
3
+ import { isAbsolute, join, relative, resolve, sep, } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ import { formatDoctorReport, runDoctor, } from "../doctor/index.js";
6
+ import { planAdaptiveProjectTemplates, } from "./adaptive-templates.js";
7
+ import { planAgentsConfigMerge, } from "./agents-config.js";
8
+ import { INSTALLATION_MANIFEST_RELATIVE_PATH, InstallationManifestError, applyInstallationPlan, planInstallationPreparation, readInstallationManifest, verifyInstallationIntegrity, } from "./install-manifest.js";
9
+ import { ORCHESTRATOR_PACKAGE_NAME, ORCHESTRATOR_PACKAGE_VERSION, planOpenCodeConfigMerge, } from "./opencode-config.js";
10
+ const TEMPLATE_COPY_ROOTS = [
11
+ ".opencode",
12
+ "scripts/automation",
13
+ ];
14
+ const TEMPLATE_COPY_FILES = [
15
+ "automation/config.schema.json",
16
+ "automation/task-contract.schema.json",
17
+ "docs/plans/README.md",
18
+ ];
19
+ export class ProjectInitializationError extends Error {
20
+ code;
21
+ details;
22
+ constructor(code, message, details = []) {
23
+ super(message);
24
+ this.name = "ProjectInitializationError";
25
+ this.code = code;
26
+ this.details = details;
27
+ }
28
+ }
29
+ export const runInitProcess = (executable, args, options) => {
30
+ const result = spawnSync(executable, [...args], {
31
+ cwd: options.cwd,
32
+ encoding: "utf8",
33
+ shell: false,
34
+ timeout: options.timeoutMs,
35
+ });
36
+ return {
37
+ status: result.status,
38
+ stdout: result.stdout ?? "",
39
+ stderr: result.stderr ?? "",
40
+ error: result.error?.message ?? null,
41
+ };
42
+ };
43
+ function comparePaths(left, right) {
44
+ return left < right ? -1 : left > right ? 1 : 0;
45
+ }
46
+ function templateRoot() {
47
+ return fileURLToPath(new URL("../../templates/", import.meta.url));
48
+ }
49
+ function templateError(message, error) {
50
+ throw new ProjectInitializationError("TEMPLATE_INVALID", message, error === undefined
51
+ ? []
52
+ : [error instanceof Error ? error.message : String(error)]);
53
+ }
54
+ function readTemplateFile(templatesDirectory, relativePath) {
55
+ const absolutePath = join(templatesDirectory, ...relativePath.split("/"));
56
+ try {
57
+ const stats = lstatSync(absolutePath);
58
+ if (stats.isSymbolicLink() || !stats.isFile()) {
59
+ return templateError(`Packaged installation template is not a regular file: ${relativePath}`);
60
+ }
61
+ return {
62
+ path: relativePath,
63
+ source: `templates/${relativePath}`,
64
+ strategy: "copy",
65
+ content: readFileSync(absolutePath),
66
+ mode: stats.mode & 0o777,
67
+ };
68
+ }
69
+ catch (error) {
70
+ if (error instanceof ProjectInitializationError) {
71
+ throw error;
72
+ }
73
+ return templateError(`Unable to read packaged installation template: ${relativePath}`, error);
74
+ }
75
+ }
76
+ function collectTemplateDirectory(templatesDirectory, relativeDirectory) {
77
+ const absoluteDirectory = join(templatesDirectory, ...relativeDirectory.split("/"));
78
+ let entries;
79
+ try {
80
+ const stats = lstatSync(absoluteDirectory);
81
+ if (stats.isSymbolicLink() || !stats.isDirectory()) {
82
+ return templateError(`Packaged installation template root is not a directory: ${relativeDirectory}`);
83
+ }
84
+ entries = readdirSync(absoluteDirectory, { withFileTypes: true })
85
+ .sort((left, right) => comparePaths(left.name, right.name));
86
+ }
87
+ catch (error) {
88
+ if (error instanceof ProjectInitializationError) {
89
+ throw error;
90
+ }
91
+ return templateError(`Unable to inspect packaged installation template root: ${relativeDirectory}`, error);
92
+ }
93
+ return entries.flatMap((entry) => {
94
+ const relativePath = `${relativeDirectory}/${entry.name}`;
95
+ if (entry.isDirectory()) {
96
+ return [...collectTemplateDirectory(templatesDirectory, relativePath)];
97
+ }
98
+ if (!entry.isFile()) {
99
+ return templateError(`Packaged installation template entry is not regular: ${relativePath}`);
100
+ }
101
+ return [readTemplateFile(templatesDirectory, relativePath)];
102
+ });
103
+ }
104
+ function repositoryRelativePath(root, absolutePath) {
105
+ const value = relative(root, absolutePath);
106
+ if (value.length === 0 ||
107
+ isAbsolute(value) ||
108
+ value === ".." ||
109
+ value.startsWith(`..${sep}`)) {
110
+ throw new ProjectInitializationError("TEMPLATE_INVALID", `Generated installation target is outside the project root: ${absolutePath}`);
111
+ }
112
+ return value.split(sep).join("/");
113
+ }
114
+ function installationPreparationOptions(options) {
115
+ const result = {};
116
+ if (options.installationId !== undefined) {
117
+ result.installationId = options.installationId;
118
+ }
119
+ if (options.preparedAt !== undefined) {
120
+ result.preparedAt = options.preparedAt;
121
+ }
122
+ return result;
123
+ }
124
+ function baseInstallationInputs(adaptive) {
125
+ const templatesDirectory = templateRoot();
126
+ const copied = [
127
+ ...TEMPLATE_COPY_ROOTS.flatMap((root) => collectTemplateDirectory(templatesDirectory, root)),
128
+ ...TEMPLATE_COPY_FILES.map((path) => readTemplateFile(templatesDirectory, path)),
129
+ ];
130
+ return [
131
+ ...copied,
132
+ {
133
+ path: "automation/config.json",
134
+ source: "generated/adaptive-automation-config",
135
+ strategy: "generate",
136
+ content: adaptive.automationConfigContent,
137
+ },
138
+ {
139
+ path: "automation/tasks/TASK-TEMPLATE.json.example",
140
+ source: "generated/adaptive-task-contract-example",
141
+ strategy: "generate",
142
+ content: adaptive.taskContractExampleContent,
143
+ },
144
+ ];
145
+ }
146
+ export function planProjectResourceInputs(directory, options = {}) {
147
+ const adaptiveTemplates = planAdaptiveProjectTemplates(directory, options);
148
+ return {
149
+ targetDirectory: adaptiveTemplates.projectRoot,
150
+ adaptiveTemplates,
151
+ inputs: baseInstallationInputs(adaptiveTemplates),
152
+ };
153
+ }
154
+ function mergedInstallationInputs(resources, agentsMerge, openCodeConfigMerge) {
155
+ return [
156
+ ...resources.inputs,
157
+ {
158
+ path: repositoryRelativePath(resources.targetDirectory, agentsMerge.agentsPath),
159
+ source: "generated/agents-managed-block-merge",
160
+ strategy: "merge",
161
+ content: agentsMerge.content,
162
+ },
163
+ {
164
+ path: repositoryRelativePath(resources.targetDirectory, openCodeConfigMerge.configPath),
165
+ source: "generated/opencode-config-merge",
166
+ strategy: "merge",
167
+ content: openCodeConfigMerge.content,
168
+ },
169
+ ];
170
+ }
171
+ export function planProjectInitialization(directory, options = {}) {
172
+ const adaptiveOptions = {};
173
+ if (options.primaryModule !== undefined) {
174
+ adaptiveOptions.primaryModule = options.primaryModule;
175
+ }
176
+ const resources = planProjectResourceInputs(directory, adaptiveOptions);
177
+ const { adaptiveTemplates, targetDirectory } = resources;
178
+ const agentsMerge = planAgentsConfigMerge(targetDirectory);
179
+ const openCodeConfigMerge = planOpenCodeConfigMerge(targetDirectory);
180
+ const installation = planInstallationPreparation(targetDirectory, mergedInstallationInputs(resources, agentsMerge, openCodeConfigMerge), installationPreparationOptions(options));
181
+ return {
182
+ targetDirectory,
183
+ adaptiveTemplates,
184
+ agentsMerge,
185
+ openCodeConfigMerge,
186
+ installation,
187
+ };
188
+ }
189
+ function commandDetails(result) {
190
+ return [result.error, result.stderr.trim(), result.stdout.trim()]
191
+ .filter((value) => value !== null && value.length > 0)
192
+ .map((value) => value.length <= 4_000
193
+ ? value
194
+ : `[truncated]\n${value.slice(-4_000)}`)
195
+ .slice(0, 3);
196
+ }
197
+ function processCheck(id, label, result, outputIsValid) {
198
+ const passed = result.error === null &&
199
+ result.status === 0 &&
200
+ outputIsValid(result.stdout);
201
+ return {
202
+ id,
203
+ status: passed ? "pass" : "fail",
204
+ summary: passed
205
+ ? `${label} passed.`
206
+ : `${label} failed with status ${String(result.status)}.`,
207
+ details: passed ? [] : commandDetails(result),
208
+ };
209
+ }
210
+ function shadowOutputIsSafe(stdout) {
211
+ try {
212
+ const value = JSON.parse(stdout);
213
+ return (typeof value === "object" &&
214
+ value !== null &&
215
+ "mutationPerformed" in value &&
216
+ value.mutationPerformed === false);
217
+ }
218
+ catch {
219
+ return false;
220
+ }
221
+ }
222
+ export function verifyInitializedProject(targetDirectory, runner = runInitProcess) {
223
+ const automationTests = runner(join(targetDirectory, "scripts/automation/tests/run-tests.sh"), [], { cwd: targetDirectory, timeoutMs: 300_000 });
224
+ const shadowRun = runner(join(targetDirectory, "scripts/automation/shadow-run.sh"), [], { cwd: targetDirectory, timeoutMs: 120_000 });
225
+ const checks = [
226
+ processCheck("automation-tests", "Automation transaction tests", automationTests, (stdout) => /(?:^|\n)1\.\.38(?:\n|$)/.test(stdout)),
227
+ processCheck("shadow-run", "Read-only shadow run", shadowRun, shadowOutputIsSafe),
228
+ ];
229
+ return {
230
+ ok: checks.every((check) => check.status === "pass"),
231
+ checks,
232
+ };
233
+ }
234
+ function doctorForInitialization(directory, options, runner) {
235
+ const baseReport = runDoctor({
236
+ ...(options.androidSdkDirectory === undefined
237
+ ? {}
238
+ : { androidSdkDirectory: options.androidSdkDirectory }),
239
+ checkDependencies: true,
240
+ targetDirectory: directory,
241
+ ...(options.opencodeExecutable === undefined
242
+ ? {}
243
+ : { opencodeExecutable: options.opencodeExecutable }),
244
+ runCommand: (executable, args) => runner(executable, args, { cwd: resolve(directory), timeoutMs: 10_000 }),
245
+ });
246
+ const report = baseReport;
247
+ if (!report.ok) {
248
+ throw new ProjectInitializationError("DOCTOR_FAILED", "Initialization prerequisites failed before any project file was changed.", report.checks
249
+ .filter((check) => check.status === "fail")
250
+ .map((check) => `${check.label}: ${check.summary}`));
251
+ }
252
+ return report;
253
+ }
254
+ function existingManifest(targetDirectory) {
255
+ try {
256
+ return readInstallationManifest(targetDirectory);
257
+ }
258
+ catch (error) {
259
+ if (error instanceof InstallationManifestError &&
260
+ error.code === "MANIFEST_MISSING") {
261
+ return null;
262
+ }
263
+ throw error;
264
+ }
265
+ }
266
+ function desiredFilesMatch(existing, planned) {
267
+ if (existing.files.length !== planned.files.length) {
268
+ return false;
269
+ }
270
+ return existing.files.every((file, index) => {
271
+ const desired = planned.files[index];
272
+ return (desired !== undefined &&
273
+ file.path === desired.path &&
274
+ file.source === desired.source &&
275
+ file.strategy === desired.strategy &&
276
+ file.sha256 === desired.sha256 &&
277
+ file.size === desired.size &&
278
+ file.mode === desired.mode);
279
+ });
280
+ }
281
+ function assertExistingInstallationIsCurrent(plan, manifest) {
282
+ if (manifest.installation.state !== "installed" ||
283
+ manifest.package.name !== ORCHESTRATOR_PACKAGE_NAME ||
284
+ manifest.package.version !== ORCHESTRATOR_PACKAGE_VERSION) {
285
+ throw new ProjectInitializationError("EXISTING_INSTALLATION_INVALID", "An installation manifest already exists but is not this installed package version.", [
286
+ `State: ${manifest.installation.state}`,
287
+ `Package: ${manifest.package.name}@${manifest.package.version}`,
288
+ ]);
289
+ }
290
+ if (!desiredFilesMatch(manifest, plan.installation.manifest)) {
291
+ throw new ProjectInitializationError("EXISTING_INSTALLATION_DIFFERENT", "The installed manifest does not match the resources planned by this package.", ["Use the future upgrade workflow; init will not overwrite this installation."]);
292
+ }
293
+ const integrity = verifyInstallationIntegrity(plan.targetDirectory);
294
+ if (!integrity.ok) {
295
+ throw new ProjectInitializationError("EXISTING_INSTALLATION_INVALID", "The existing installation or its backups failed integrity verification.", integrity.checks
296
+ .filter((check) => check.installed === "missing" ||
297
+ check.installed === "mismatch" ||
298
+ check.backup === "missing" ||
299
+ check.backup === "mismatch")
300
+ .map((check) => `${check.path}: installed=${check.installed}, backup=${check.backup}`));
301
+ }
302
+ }
303
+ function assertVerificationPassed(report) {
304
+ if (!report.ok) {
305
+ throw new ProjectInitializationError("POST_INSTALL_VERIFICATION_FAILED", "Installed resources failed verification and the new installation will be rolled back.", report.checks
306
+ .filter((check) => check.status === "fail")
307
+ .flatMap((check) => [check.summary, ...check.details]));
308
+ }
309
+ }
310
+ function resultFromApplied(plan, applied, doctor, verification) {
311
+ return {
312
+ status: "installed",
313
+ targetDirectory: plan.targetDirectory,
314
+ primaryModule: plan.adaptiveTemplates.primaryModule.gradlePath,
315
+ manifestPath: applied.prepared.manifestPath,
316
+ backupDirectory: applied.prepared.backupDirectory,
317
+ managedFileCount: applied.manifest.files.length,
318
+ writtenFileCount: applied.writtenFileCount,
319
+ reusedFileCount: applied.reusedFileCount,
320
+ manifest: applied.manifest,
321
+ doctor,
322
+ verification,
323
+ };
324
+ }
325
+ export function runProjectInitialization(directory, options = {}) {
326
+ const runner = options.processRunner ?? runInitProcess;
327
+ const doctor = doctorForInitialization(directory, options, runner);
328
+ const plan = planProjectInitialization(directory, options);
329
+ const existing = existingManifest(plan.targetDirectory);
330
+ if (existing !== null) {
331
+ assertExistingInstallationIsCurrent(plan, existing);
332
+ const verification = verifyInitializedProject(plan.targetDirectory, runner);
333
+ if (!verification.ok) {
334
+ throw new ProjectInitializationError("POST_INSTALL_VERIFICATION_FAILED", "The existing installation failed verification; no file was changed.", verification.checks
335
+ .filter((check) => check.status === "fail")
336
+ .flatMap((check) => [check.summary, ...check.details]));
337
+ }
338
+ return {
339
+ status: "already-installed",
340
+ targetDirectory: plan.targetDirectory,
341
+ primaryModule: plan.adaptiveTemplates.primaryModule.gradlePath,
342
+ manifestPath: join(plan.targetDirectory, ...INSTALLATION_MANIFEST_RELATIVE_PATH.split("/")),
343
+ backupDirectory: join(plan.targetDirectory, ...existing.backupDirectory.split("/")),
344
+ managedFileCount: existing.files.length,
345
+ writtenFileCount: 0,
346
+ reusedFileCount: existing.files.length,
347
+ manifest: existing,
348
+ doctor,
349
+ verification,
350
+ };
351
+ }
352
+ let verification = null;
353
+ const applied = applyInstallationPlan(plan.installation, {
354
+ ...(options.installedAt === undefined
355
+ ? {}
356
+ : { installedAt: options.installedAt }),
357
+ verify: () => {
358
+ verification = verifyInitializedProject(plan.targetDirectory, runner);
359
+ assertVerificationPassed(verification);
360
+ },
361
+ });
362
+ if (verification === null) {
363
+ throw new ProjectInitializationError("POST_INSTALL_VERIFICATION_FAILED", "Installation verification did not produce a report.");
364
+ }
365
+ return resultFromApplied(plan, applied, doctor, verification);
366
+ }
367
+ export function formatProjectInitializationResult(result) {
368
+ const lines = [
369
+ "OpenCode Android Orchestrator init",
370
+ "",
371
+ `Result: ${result.status === "installed" ? "INSTALLED" : "ALREADY INSTALLED"}`,
372
+ `Project root: ${result.targetDirectory}`,
373
+ `Primary module: ${result.primaryModule}`,
374
+ `Managed files: ${String(result.managedFileCount)}`,
375
+ `Written files: ${String(result.writtenFileCount)}`,
376
+ `Reused files: ${String(result.reusedFileCount)}`,
377
+ `Manifest: ${result.manifestPath}`,
378
+ `Recovery backups: ${result.backupDirectory}`,
379
+ "Failure rollback: automatic until the manifest is marked installed",
380
+ "",
381
+ formatDoctorReport(result.doctor).trimEnd(),
382
+ "",
383
+ ...result.verification.checks.map((check) => `[${check.status.toUpperCase()}] ${check.summary}`),
384
+ "",
385
+ `Next: opencode --agent scheduled-planner ${result.targetDirectory}`,
386
+ ];
387
+ return `${lines.join("\n")}\n`;
388
+ }
389
+ //# sourceMappingURL=init.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/installer/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EACL,SAAS,EACT,WAAW,EACX,YAAY,GACb,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,GAAG,GACJ,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EACL,kBAAkB,EAClB,SAAS,GAGV,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,4BAA4B,GAG7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,qBAAqB,GAEtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,mCAAmC,EACnC,yBAAyB,EACzB,qBAAq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ACF,4CAA4C,MAAM,CAAC,eAAe,EAAE;KACrE,CAAC;IACF,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;AACjC,CAAC"}
@@ -0,0 +1,132 @@
1
+ export declare const INSTALLATION_MANIFEST_SCHEMA_VERSION = 1;
2
+ export declare const INSTALLATION_CONTROL_DIRECTORY = ".automation-plugin";
3
+ export declare const INSTALLATION_MANIFEST_RELATIVE_PATH = ".automation-plugin/manifest.json";
4
+ export declare const INSTALLATION_BACKUPS_DIRECTORY = ".automation-plugin/backups";
5
+ export declare const INSTALLATION_HISTORY_DIRECTORY = ".automation-plugin/history";
6
+ export type InstallationManifestState = "prepared" | "installed" | "rolledBack";
7
+ export type InstallationFileStrategy = "copy" | "generate" | "merge";
8
+ export type InstallationConflictKind = "content" | "mode" | "content-and-mode";
9
+ export type InstallationManifestErrorCode = "BACKUP_EXISTS" | "BACKUP_INTEGRITY_FAILED" | "BACKUP_WRITE_FAILED" | "CONTROL_PATH_CONFLICT" | "DUPLICATE_FILE" | "FILE_CONFLICT" | "FILE_NOT_REGULAR" | "FILE_SYMLINK" | "INSTALLATION_INCOMPLETE" | "INSTALLATION_ROLLBACK_FAILED" | "INSTALLATION_WRITE_FAILED" | "INVALID_FILE_PATH" | "INVALID_INSTALLATION_ID" | "INVALID_TIMESTAMP" | "MANIFEST_EXISTS" | "MANIFEST_INVALID" | "MANIFEST_MISSING" | "MANIFEST_STATE" | "MANIFEST_WRITE_FAILED" | "PLAN_STALE" | "ROLLBACK_FAILED" | "TARGET_MODIFIED" | "TARGET_NOT_DIRECTORY" | "TARGET_SYMLINK";
10
+ export declare class InstallationManifestError extends Error {
11
+ readonly code: InstallationManifestErrorCode;
12
+ readonly details: readonly string[];
13
+ constructor(code: InstallationManifestErrorCode, message: string, details?: readonly string[]);
14
+ }
15
+ export interface InstallationFileInput {
16
+ path: string;
17
+ source: string;
18
+ strategy: InstallationFileStrategy;
19
+ content: string | Uint8Array;
20
+ mode?: number;
21
+ }
22
+ export interface InstallationFileConflict {
23
+ path: string;
24
+ source: string;
25
+ strategy: InstallationFileStrategy;
26
+ kind: InstallationConflictKind;
27
+ existingSha256: string;
28
+ desiredSha256: string;
29
+ existingSize: number;
30
+ desiredSize: number;
31
+ existingMode: number;
32
+ desiredMode: number;
33
+ }
34
+ export interface InstallationConflictReport {
35
+ ok: boolean;
36
+ targetDirectory: string;
37
+ conflicts: readonly InstallationFileConflict[];
38
+ }
39
+ export interface PreviousInstallationFile {
40
+ existed: boolean;
41
+ sha256: string | null;
42
+ size: number | null;
43
+ mode: number | null;
44
+ backupPath: string | null;
45
+ }
46
+ export interface InstallationManifestFile {
47
+ path: string;
48
+ source: string;
49
+ strategy: InstallationFileStrategy;
50
+ sha256: string;
51
+ size: number;
52
+ mode: number;
53
+ previous: PreviousInstallationFile;
54
+ }
55
+ export interface InstallationManifest {
56
+ schemaVersion: 1;
57
+ package: {
58
+ name: string;
59
+ version: string;
60
+ };
61
+ installation: {
62
+ id: string;
63
+ state: InstallationManifestState;
64
+ preparedAt: string;
65
+ installedAt: string | null;
66
+ rolledBackAt: string | null;
67
+ };
68
+ backupDirectory: string;
69
+ files: readonly InstallationManifestFile[];
70
+ }
71
+ export interface InstallationPreparationOptions {
72
+ installationId?: string;
73
+ preparedAt?: string;
74
+ }
75
+ export interface PlannedInstallationFile {
76
+ absolutePath: string;
77
+ content: Uint8Array;
78
+ previousContent: Uint8Array | null;
79
+ manifest: InstallationManifestFile;
80
+ }
81
+ export interface InstallationPreparationPlan {
82
+ targetDirectory: string;
83
+ controlDirectory: string;
84
+ manifestPath: string;
85
+ backupDirectory: string;
86
+ manifest: InstallationManifest;
87
+ manifestContent: string;
88
+ files: readonly PlannedInstallationFile[];
89
+ }
90
+ export interface PreparedInstallation {
91
+ manifestPath: string;
92
+ backupDirectory: string;
93
+ manifestSha256: string;
94
+ backedUpFileCount: number;
95
+ manifest: InstallationManifest;
96
+ }
97
+ export interface InstallationApplyOptions {
98
+ installedAt?: string;
99
+ verify?: () => void;
100
+ }
101
+ export interface AppliedInstallation {
102
+ prepared: PreparedInstallation;
103
+ manifest: InstallationManifest;
104
+ writtenFileCount: number;
105
+ reusedFileCount: number;
106
+ }
107
+ export type InstallationIntegrityStatus = "match" | "mismatch" | "missing" | "not-required" | "not-checked";
108
+ export interface InstallationIntegrityCheck {
109
+ path: string;
110
+ installed: InstallationIntegrityStatus;
111
+ backup: InstallationIntegrityStatus;
112
+ }
113
+ export interface InstallationIntegrityReport {
114
+ ok: boolean;
115
+ manifest: InstallationManifest;
116
+ checks: readonly InstallationIntegrityCheck[];
117
+ }
118
+ export interface InstallationCompletionOptions {
119
+ installedAt?: string;
120
+ }
121
+ export interface InstallationRollbackOptions {
122
+ rolledBackAt?: string;
123
+ }
124
+ export declare function detectInstallationConflicts(directory: string, inputs: readonly InstallationFileInput[]): InstallationConflictReport;
125
+ export declare function planInstallationPreparation(directory: string, inputs: readonly InstallationFileInput[], options?: InstallationPreparationOptions): InstallationPreparationPlan;
126
+ export declare function prepareInstallationBackup(plan: InstallationPreparationPlan): PreparedInstallation;
127
+ export declare function applyInstallationPlan(plan: InstallationPreparationPlan, options?: InstallationApplyOptions): AppliedInstallation;
128
+ export declare function readInstallationManifest(directory: string): InstallationManifest;
129
+ export declare function verifyInstallationIntegrity(directory: string): InstallationIntegrityReport;
130
+ export declare function completeInstallationManifest(directory: string, options?: InstallationCompletionOptions): InstallationManifest;
131
+ export declare function rollbackPreparedInstallation(directory: string, options?: InstallationRollbackOptions): InstallationManifest;
132
+ //# sourceMappingURL=install-manifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install-manifest.d.ts","sourceRoot":"","sources":["../../src/installer/install-manifest.ts"],"names":[],"mappings":"AAyBA,eAAO,MAAM,oCAAoC,IAAI,CAAC;AACtD,eAAO,MAAM,8BAA8B,uBAAuB,CAAC;AACnE,eAAO,MAAM,mCAAmC,qCACG,CAAC;AACpD,eAAO,MAAM,8BAA8B,+BAC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