@sun-asterisk/sungen 3.2.2-beta.9 → 3.2.3-beta.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/dist/capabilities/discover.d.ts.map +1 -1
- package/dist/capabilities/discover.js +26 -3
- package/dist/capabilities/discover.js.map +1 -1
- package/dist/cli/commands/add-flow.d.ts.map +1 -1
- package/dist/cli/commands/add-flow.js +2 -0
- package/dist/cli/commands/add-flow.js.map +1 -1
- package/dist/cli/commands/add.d.ts.map +1 -1
- package/dist/cli/commands/add.js +4 -0
- package/dist/cli/commands/add.js.map +1 -1
- package/dist/cli/commands/capability.d.ts.map +1 -1
- package/dist/cli/commands/capability.js +61 -0
- package/dist/cli/commands/capability.js.map +1 -1
- package/dist/cli/commands/delivery.d.ts.map +1 -1
- package/dist/cli/commands/delivery.js +89 -2
- package/dist/cli/commands/delivery.js.map +1 -1
- package/dist/cli/commands/eval.js +3 -3
- package/dist/cli/commands/eval.js.map +1 -1
- package/dist/cli/commands/generate.d.ts.map +1 -1
- package/dist/cli/commands/generate.js +2 -1
- package/dist/cli/commands/generate.js.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +32 -2
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/journey.d.ts.map +1 -1
- package/dist/cli/commands/journey.js +24 -2
- package/dist/cli/commands/journey.js.map +1 -1
- package/dist/cli/commands/update.d.ts.map +1 -1
- package/dist/cli/commands/update.js +10 -3
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/dashboard/snapshot-builder.d.ts.map +1 -1
- package/dist/dashboard/snapshot-builder.js +10 -1
- package/dist/dashboard/snapshot-builder.js.map +1 -1
- package/dist/exporters/csv-exporter.d.ts.map +1 -1
- package/dist/exporters/csv-exporter.js +3 -1
- package/dist/exporters/csv-exporter.js.map +1 -1
- package/dist/exporters/json-exporter.js +3 -1
- package/dist/exporters/json-exporter.js.map +1 -1
- package/dist/exporters/mobile-app-id.d.ts +22 -0
- package/dist/exporters/mobile-app-id.d.ts.map +1 -0
- package/dist/exporters/mobile-app-id.js +37 -0
- package/dist/exporters/mobile-app-id.js.map +1 -0
- package/dist/exporters/spec-parser.d.ts.map +1 -1
- package/dist/exporters/spec-parser.js +6 -2
- package/dist/exporters/spec-parser.js.map +1 -1
- package/dist/generators/test-generator/adapters/adapter-interface.d.ts +3 -0
- package/dist/generators/test-generator/adapters/adapter-interface.d.ts.map +1 -1
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/scroll-action.hbs +7 -4
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/toggle-action.hbs +20 -3
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/checked-assertion.hbs +4 -1
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/not-checked-assertion.hbs +4 -1
- package/dist/generators/test-generator/adapters/appium/templates/test-file.hbs +3 -0
- package/dist/generators/test-generator/code-generator.d.ts.map +1 -1
- package/dist/generators/test-generator/code-generator.js +48 -9
- package/dist/generators/test-generator/code-generator.js.map +1 -1
- package/dist/generators/test-generator/template-engine.d.ts +3 -0
- package/dist/generators/test-generator/template-engine.d.ts.map +1 -1
- package/dist/generators/test-generator/template-engine.js +11 -1
- package/dist/generators/test-generator/template-engine.js.map +1 -1
- package/dist/generators/test-generator/utils/selector-resolver.d.ts +11 -1
- package/dist/generators/test-generator/utils/selector-resolver.d.ts.map +1 -1
- package/dist/generators/test-generator/utils/selector-resolver.js +33 -0
- package/dist/generators/test-generator/utils/selector-resolver.js.map +1 -1
- package/dist/harness/audit.d.ts.map +1 -1
- package/dist/harness/audit.js +8 -1
- package/dist/harness/audit.js.map +1 -1
- package/dist/harness/catalog/universal-viewpoints.yaml +15 -0
- package/dist/harness/eval/skill-lint.d.ts +3 -3
- package/dist/harness/eval/skill-lint.d.ts.map +1 -1
- package/dist/harness/eval/skill-lint.js +88 -68
- package/dist/harness/eval/skill-lint.js.map +1 -1
- package/dist/harness/journey.d.ts +37 -1
- package/dist/harness/journey.d.ts.map +1 -1
- package/dist/harness/journey.js +146 -19
- package/dist/harness/journey.js.map +1 -1
- package/dist/harness/quality-gates.d.ts +13 -0
- package/dist/harness/quality-gates.d.ts.map +1 -1
- package/dist/harness/quality-gates.js +23 -0
- package/dist/harness/quality-gates.js.map +1 -1
- package/dist/harness/sensors.d.ts +1 -1
- package/dist/harness/sensors.d.ts.map +1 -1
- package/dist/harness/sensors.js +32 -9
- package/dist/harness/sensors.js.map +1 -1
- package/dist/orchestrator/ai-rules-updater.d.ts +11 -3
- package/dist/orchestrator/ai-rules-updater.d.ts.map +1 -1
- package/dist/orchestrator/ai-rules-updater.js +44 -180
- package/dist/orchestrator/ai-rules-updater.js.map +1 -1
- package/dist/orchestrator/ai-skills/adapters.d.ts +28 -0
- package/dist/orchestrator/ai-skills/adapters.d.ts.map +1 -0
- package/dist/orchestrator/ai-skills/adapters.js +34 -0
- package/dist/orchestrator/ai-skills/adapters.js.map +1 -0
- package/dist/orchestrator/ai-skills/build.d.ts +10 -0
- package/dist/orchestrator/ai-skills/build.d.ts.map +1 -0
- package/dist/orchestrator/ai-skills/build.js +128 -0
- package/dist/orchestrator/ai-skills/build.js.map +1 -0
- package/dist/orchestrator/ai-skills/cap-stripper.d.ts +27 -0
- package/dist/orchestrator/ai-skills/cap-stripper.d.ts.map +1 -0
- package/dist/orchestrator/ai-skills/cap-stripper.js +78 -0
- package/dist/orchestrator/ai-skills/cap-stripper.js.map +1 -0
- package/dist/orchestrator/ai-skills/commands.d.ts +22 -0
- package/dist/orchestrator/ai-skills/commands.d.ts.map +1 -0
- package/dist/orchestrator/ai-skills/commands.js +109 -0
- package/dist/orchestrator/ai-skills/commands.js.map +1 -0
- package/dist/orchestrator/ai-skills/generator.d.ts +23 -0
- package/dist/orchestrator/ai-skills/generator.d.ts.map +1 -0
- package/dist/orchestrator/ai-skills/generator.js +79 -0
- package/dist/orchestrator/ai-skills/generator.js.map +1 -0
- package/dist/orchestrator/ai-skills/golden-skills.test.d.ts +2 -0
- package/dist/orchestrator/ai-skills/golden-skills.test.d.ts.map +1 -0
- package/dist/orchestrator/ai-skills/golden-skills.test.js +183 -0
- package/dist/orchestrator/ai-skills/golden-skills.test.js.map +1 -0
- package/dist/orchestrator/ai-skills/resolve-assistants.d.ts +8 -0
- package/dist/orchestrator/ai-skills/resolve-assistants.d.ts.map +1 -0
- package/dist/orchestrator/ai-skills/resolve-assistants.js +28 -0
- package/dist/orchestrator/ai-skills/resolve-assistants.js.map +1 -0
- package/dist/orchestrator/ai-skills/writer.d.ts +15 -0
- package/dist/orchestrator/ai-skills/writer.d.ts.map +1 -0
- package/dist/orchestrator/ai-skills/writer.js +129 -0
- package/dist/orchestrator/ai-skills/writer.js.map +1 -0
- package/dist/orchestrator/flow-manager.d.ts +11 -0
- package/dist/orchestrator/flow-manager.d.ts.map +1 -1
- package/dist/orchestrator/flow-manager.js +147 -29
- package/dist/orchestrator/flow-manager.js.map +1 -1
- package/dist/orchestrator/mobile-runtime-scaffolder.d.ts +59 -0
- package/dist/orchestrator/mobile-runtime-scaffolder.d.ts.map +1 -0
- package/dist/orchestrator/mobile-runtime-scaffolder.js +298 -0
- package/dist/orchestrator/mobile-runtime-scaffolder.js.map +1 -0
- package/dist/orchestrator/project-initializer.d.ts +44 -7
- package/dist/orchestrator/project-initializer.d.ts.map +1 -1
- package/dist/orchestrator/project-initializer.js +147 -79
- package/dist/orchestrator/project-initializer.js.map +1 -1
- package/dist/orchestrator/screen-manager.d.ts +30 -0
- package/dist/orchestrator/screen-manager.d.ts.map +1 -1
- package/dist/orchestrator/screen-manager.js +205 -22
- package/dist/orchestrator/screen-manager.js.map +1 -1
- package/dist/orchestrator/templates/ai-src/README.md +58 -0
- package/dist/orchestrator/templates/{ai-instructions/claude-cmd-add-flow.md → ai-src/commands/add-flow.md} +63 -2
- package/dist/orchestrator/templates/{ai-instructions/claude-cmd-add-screen.md → ai-src/commands/add-screen.md} +171 -6
- package/dist/orchestrator/templates/{ai-instructions/claude-cmd-create-test.md → ai-src/commands/create-test.md} +118 -5
- package/{src/orchestrator/templates/ai-instructions/claude-cmd-dashboard.md → dist/orchestrator/templates/ai-src/commands/dashboard.md} +25 -3
- package/{src/orchestrator/templates/ai-instructions/claude-cmd-delivery.md → dist/orchestrator/templates/ai-src/commands/delivery.md} +67 -3
- package/dist/orchestrator/templates/ai-src/commands/design.md +29 -0
- package/{src/orchestrator/templates/ai-instructions/claude-cmd-feedback.md → dist/orchestrator/templates/ai-src/commands/feedback.md} +34 -3
- package/dist/orchestrator/templates/{ai-instructions/claude-cmd-locale.md → ai-src/commands/locale.md} +56 -4
- package/{src/orchestrator/templates/ai-instructions/claude-cmd-review.md → dist/orchestrator/templates/ai-src/commands/review.md} +57 -2
- package/dist/orchestrator/templates/{ai-instructions/claude-cmd-run-test.md → ai-src/commands/run-test.md} +116 -8
- package/dist/orchestrator/templates/ai-src/config/codex.md +8 -0
- package/{src/orchestrator/templates/ai-instructions/claude-skill-capture-mobile.md → dist/orchestrator/templates/ai-src/skills/sungen-capture-mobile/SKILL.md} +11 -0
- package/dist/orchestrator/templates/{ai-instructions/github-skill-sungen-error-mapping.md → ai-src/skills/sungen-error-mapping/SKILL.md} +31 -10
- package/{src/orchestrator/templates/ai-instructions/claude-skill-harness-audit.md → dist/orchestrator/templates/ai-src/skills/sungen-harness-audit/SKILL.md} +5 -5
- package/{src/orchestrator/templates/ai-instructions/claude-skill-locale.md → dist/orchestrator/templates/ai-src/skills/sungen-locale/SKILL.md} +275 -3
- package/{src/orchestrator/templates/ai-instructions/github-skill-sungen-selector-fix.md → dist/orchestrator/templates/ai-src/skills/sungen-selector-fix/SKILL.md} +17 -0
- package/{src/orchestrator/templates/ai-instructions/claude-skill-selector-fix-mobile.md → dist/orchestrator/templates/ai-src/skills/sungen-selector-fix-mobile/SKILL.md} +5 -0
- package/dist/orchestrator/templates/{ai-instructions/claude-skill-tc-generation.md → ai-src/skills/sungen-tc-generation/SKILL.md} +5 -0
- package/dist/orchestrator/templates/playwright.config.ts +7 -4
- package/package.json +3 -3
- package/src/capabilities/discover.ts +29 -3
- package/src/cli/commands/add-flow.ts +2 -0
- package/src/cli/commands/add.ts +4 -0
- package/src/cli/commands/capability.ts +64 -1
- package/src/cli/commands/delivery.ts +89 -2
- package/src/cli/commands/eval.ts +3 -3
- package/src/cli/commands/generate.ts +2 -1
- package/src/cli/commands/init.ts +50 -3
- package/src/cli/commands/journey.ts +20 -3
- package/src/cli/commands/update.ts +14 -4
- package/src/dashboard/snapshot-builder.ts +10 -1
- package/src/exporters/csv-exporter.ts +3 -1
- package/src/exporters/json-exporter.ts +3 -1
- package/src/exporters/mobile-app-id.ts +34 -0
- package/src/exporters/spec-parser.ts +6 -2
- package/src/generators/test-generator/adapters/adapter-interface.ts +3 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/scroll-action.hbs +7 -4
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/toggle-action.hbs +20 -3
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/checked-assertion.hbs +4 -1
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/not-checked-assertion.hbs +4 -1
- package/src/generators/test-generator/adapters/appium/templates/test-file.hbs +3 -0
- package/src/generators/test-generator/code-generator.ts +49 -9
- package/src/generators/test-generator/template-engine.ts +14 -1
- package/src/generators/test-generator/utils/selector-resolver.ts +51 -1
- package/src/harness/audit.ts +9 -2
- package/src/harness/catalog/universal-viewpoints.yaml +15 -0
- package/src/harness/eval/skill-lint.ts +71 -60
- package/src/harness/journey.ts +167 -19
- package/src/harness/quality-gates.ts +20 -0
- package/src/harness/sensors.ts +25 -8
- package/src/orchestrator/ai-rules-updater.ts +35 -197
- package/src/orchestrator/ai-skills/adapters.ts +52 -0
- package/src/orchestrator/ai-skills/build.ts +103 -0
- package/src/orchestrator/ai-skills/cap-stripper.ts +85 -0
- package/src/orchestrator/ai-skills/commands.ts +112 -0
- package/src/orchestrator/ai-skills/generator.ts +47 -0
- package/src/orchestrator/ai-skills/golden-skills.test.ts +124 -0
- package/src/orchestrator/ai-skills/resolve-assistants.ts +18 -0
- package/src/orchestrator/ai-skills/writer.ts +92 -0
- package/src/orchestrator/flow-manager.ts +165 -29
- package/src/orchestrator/mobile-runtime-scaffolder.ts +277 -0
- package/src/orchestrator/project-initializer.ts +159 -86
- package/src/orchestrator/screen-manager.ts +237 -22
- package/src/orchestrator/templates/ai-src/README.md +58 -0
- package/src/orchestrator/templates/{ai-instructions/claude-cmd-add-flow.md → ai-src/commands/add-flow.md} +63 -2
- package/src/orchestrator/templates/{ai-instructions/claude-cmd-add-screen.md → ai-src/commands/add-screen.md} +171 -6
- package/src/orchestrator/templates/{ai-instructions/claude-cmd-create-test.md → ai-src/commands/create-test.md} +118 -5
- package/{dist/orchestrator/templates/ai-instructions/claude-cmd-dashboard.md → src/orchestrator/templates/ai-src/commands/dashboard.md} +25 -3
- package/{dist/orchestrator/templates/ai-instructions/claude-cmd-delivery.md → src/orchestrator/templates/ai-src/commands/delivery.md} +67 -3
- package/src/orchestrator/templates/ai-src/commands/design.md +29 -0
- package/{dist/orchestrator/templates/ai-instructions/claude-cmd-feedback.md → src/orchestrator/templates/ai-src/commands/feedback.md} +34 -3
- package/src/orchestrator/templates/{ai-instructions/claude-cmd-locale.md → ai-src/commands/locale.md} +56 -4
- package/{dist/orchestrator/templates/ai-instructions/claude-cmd-review.md → src/orchestrator/templates/ai-src/commands/review.md} +57 -2
- package/src/orchestrator/templates/{ai-instructions/claude-cmd-run-test.md → ai-src/commands/run-test.md} +116 -8
- package/src/orchestrator/templates/ai-src/config/codex.md +8 -0
- package/{dist/orchestrator/templates/ai-instructions/claude-skill-capture-mobile.md → src/orchestrator/templates/ai-src/skills/sungen-capture-mobile/SKILL.md} +11 -0
- package/{dist/orchestrator/templates/ai-instructions/claude-skill-error-mapping.md → src/orchestrator/templates/ai-src/skills/sungen-error-mapping/SKILL.md} +31 -10
- package/{dist/orchestrator/templates/ai-instructions/claude-skill-harness-audit.md → src/orchestrator/templates/ai-src/skills/sungen-harness-audit/SKILL.md} +5 -5
- package/{dist/orchestrator/templates/ai-instructions/claude-skill-locale.md → src/orchestrator/templates/ai-src/skills/sungen-locale/SKILL.md} +275 -3
- package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-selector-fix.md → src/orchestrator/templates/ai-src/skills/sungen-selector-fix/SKILL.md} +17 -0
- package/{dist/orchestrator/templates/ai-instructions/claude-skill-selector-fix-mobile.md → src/orchestrator/templates/ai-src/skills/sungen-selector-fix-mobile/SKILL.md} +5 -0
- package/src/orchestrator/templates/{ai-instructions/claude-skill-tc-generation.md → ai-src/skills/sungen-tc-generation/SKILL.md} +5 -0
- package/src/orchestrator/templates/playwright.config.ts +7 -4
- package/dist/orchestrator/templates/ai-instructions/claude-cmd-design.md +0 -12
- package/dist/orchestrator/templates/ai-instructions/claude-skill-selector-fix.md +0 -347
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-add-flow.md +0 -86
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-add-screen.md +0 -131
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-create-test.md +0 -94
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-dashboard.md +0 -65
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-delivery.md +0 -83
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-design.md +0 -13
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-feedback.md +0 -24
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-locale.md +0 -70
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-review.md +0 -38
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-run-test.md +0 -158
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mobile.md +0 -184
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-harness-audit.md +0 -85
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-locale.md +0 -291
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-selector-fix-mobile.md +0 -316
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-selector-keys.md +0 -221
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-tc-generation.md +0 -617
- package/src/orchestrator/templates/ai-instructions/claude-cmd-design.md +0 -12
- package/src/orchestrator/templates/ai-instructions/claude-skill-api-design.md +0 -62
- package/src/orchestrator/templates/ai-instructions/claude-skill-capture-mode-figma-mcp.md +0 -82
- package/src/orchestrator/templates/ai-instructions/claude-skill-capture-mode-figma-pat.md +0 -117
- package/src/orchestrator/templates/ai-instructions/claude-skill-capture-mode-live.md +0 -60
- package/src/orchestrator/templates/ai-instructions/claude-skill-capture-mode-local.md +0 -38
- package/src/orchestrator/templates/ai-instructions/claude-skill-capture.md +0 -35
- package/src/orchestrator/templates/ai-instructions/claude-skill-dashboard.md +0 -121
- package/src/orchestrator/templates/ai-instructions/claude-skill-delivery.md +0 -141
- package/src/orchestrator/templates/ai-instructions/claude-skill-error-mapping.md +0 -176
- package/src/orchestrator/templates/ai-instructions/claude-skill-gherkin-syntax.md +0 -446
- package/src/orchestrator/templates/ai-instructions/claude-skill-ingest-legacy.md +0 -79
- package/src/orchestrator/templates/ai-instructions/claude-skill-mobile-gestures.md +0 -109
- package/src/orchestrator/templates/ai-instructions/claude-skill-selector-fix.md +0 -347
- package/src/orchestrator/templates/ai-instructions/claude-skill-tc-review.md +0 -320
- package/src/orchestrator/templates/ai-instructions/claude-skill-test-design-techniques.md +0 -118
- package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-a-data-entry.md +0 -203
- package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-b-data-ops.md +0 -179
- package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-c-data-explore.md +0 -233
- package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-d-display.md +0 -226
- package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-e-identity.md +0 -177
- package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint.md +0 -118
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-add-flow.md +0 -86
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-add-screen.md +0 -131
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-create-test.md +0 -94
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-dashboard.md +0 -65
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-delivery.md +0 -83
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-design.md +0 -13
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-feedback.md +0 -24
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-locale.md +0 -70
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-review.md +0 -38
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-run-test.md +0 -158
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-api-design.md +0 -62
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mobile.md +0 -184
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-figma-mcp.md +0 -82
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-figma-pat.md +0 -117
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-live.md +0 -60
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-local.md +0 -38
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-capture.md +0 -35
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-dashboard.md +0 -121
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-delivery.md +0 -141
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-error-mapping.md +0 -176
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-gherkin-syntax.md +0 -446
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-harness-audit.md +0 -85
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-ingest-legacy.md +0 -79
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-locale.md +0 -291
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-mobile-gestures.md +0 -109
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-selector-fix-mobile.md +0 -316
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-selector-keys.md +0 -221
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-tc-generation.md +0 -617
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-tc-review.md +0 -320
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-test-design-techniques.md +0 -118
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-a-data-entry.md +0 -203
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-b-data-ops.md +0 -179
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-c-data-explore.md +0 -233
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-d-display.md +0 -226
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-e-identity.md +0 -177
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint.md +0 -118
- /package/dist/orchestrator/templates/{ai-instructions/claude-agent-challenge.md → ai-src/agents/challenge.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-agent-discovery.md → ai-src/agents/discovery.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-agent-generator.md → ai-src/agents/generator.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-agent-reviewer.md → ai-src/agents/reviewer.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-config.md → ai-src/config/claude.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/copilot-config.md → ai-src/config/copilot.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-api-design.md → ai-src/skills/sungen-api-design/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-capture.md → ai-src/skills/sungen-capture/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-capture-mode-figma-mcp.md → ai-src/skills/sungen-capture/mode-figma-mcp.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-capture-mode-figma-pat.md → ai-src/skills/sungen-capture/mode-figma-pat.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-capture-mode-live.md → ai-src/skills/sungen-capture/mode-live.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-capture-mode-local.md → ai-src/skills/sungen-capture/mode-local.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-dashboard.md → ai-src/skills/sungen-dashboard/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-delivery.md → ai-src/skills/sungen-delivery/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-gherkin-syntax.md → ai-src/skills/sungen-gherkin-syntax/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-ingest-legacy.md → ai-src/skills/sungen-ingest-legacy/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-mobile-gestures.md → ai-src/skills/sungen-mobile-gestures/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-selector-keys.md → ai-src/skills/sungen-selector-keys/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-tc-review.md → ai-src/skills/sungen-tc-review/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-test-design-techniques.md → ai-src/skills/sungen-test-design-techniques/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-viewpoint.md → ai-src/skills/sungen-viewpoint/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-viewpoint-group-a-data-entry.md → ai-src/skills/sungen-viewpoint/group-a-data-entry.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-viewpoint-group-b-data-ops.md → ai-src/skills/sungen-viewpoint/group-b-data-ops.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-viewpoint-group-c-data-explore.md → ai-src/skills/sungen-viewpoint/group-c-data-explore.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-viewpoint-group-d-display.md → ai-src/skills/sungen-viewpoint/group-d-display.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-viewpoint-group-e-identity.md → ai-src/skills/sungen-viewpoint/group-e-identity.md} +0 -0
- /package/src/orchestrator/templates/{ai-instructions/claude-agent-challenge.md → ai-src/agents/challenge.md} +0 -0
- /package/src/orchestrator/templates/{ai-instructions/claude-agent-discovery.md → ai-src/agents/discovery.md} +0 -0
- /package/src/orchestrator/templates/{ai-instructions/claude-agent-generator.md → ai-src/agents/generator.md} +0 -0
- /package/src/orchestrator/templates/{ai-instructions/claude-agent-reviewer.md → ai-src/agents/reviewer.md} +0 -0
- /package/src/orchestrator/templates/{ai-instructions/claude-config.md → ai-src/config/claude.md} +0 -0
- /package/src/orchestrator/templates/{ai-instructions/copilot-config.md → ai-src/config/copilot.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-api-design.md → src/orchestrator/templates/ai-src/skills/sungen-api-design/SKILL.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-capture.md → src/orchestrator/templates/ai-src/skills/sungen-capture/SKILL.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-figma-mcp.md → src/orchestrator/templates/ai-src/skills/sungen-capture/mode-figma-mcp.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-figma-pat.md → src/orchestrator/templates/ai-src/skills/sungen-capture/mode-figma-pat.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-live.md → src/orchestrator/templates/ai-src/skills/sungen-capture/mode-live.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-local.md → src/orchestrator/templates/ai-src/skills/sungen-capture/mode-local.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-dashboard.md → src/orchestrator/templates/ai-src/skills/sungen-dashboard/SKILL.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-delivery.md → src/orchestrator/templates/ai-src/skills/sungen-delivery/SKILL.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-gherkin-syntax.md → src/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-ingest-legacy.md → src/orchestrator/templates/ai-src/skills/sungen-ingest-legacy/SKILL.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-mobile-gestures.md → src/orchestrator/templates/ai-src/skills/sungen-mobile-gestures/SKILL.md} +0 -0
- /package/src/orchestrator/templates/{ai-instructions/claude-skill-selector-keys.md → ai-src/skills/sungen-selector-keys/SKILL.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-tc-review.md → src/orchestrator/templates/ai-src/skills/sungen-tc-review/SKILL.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-test-design-techniques.md → src/orchestrator/templates/ai-src/skills/sungen-test-design-techniques/SKILL.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint.md → src/orchestrator/templates/ai-src/skills/sungen-viewpoint/SKILL.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-a-data-entry.md → src/orchestrator/templates/ai-src/skills/sungen-viewpoint/group-a-data-entry.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-b-data-ops.md → src/orchestrator/templates/ai-src/skills/sungen-viewpoint/group-b-data-ops.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-c-data-explore.md → src/orchestrator/templates/ai-src/skills/sungen-viewpoint/group-c-data-explore.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-d-display.md → src/orchestrator/templates/ai-src/skills/sungen-viewpoint/group-d-display.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-e-identity.md → src/orchestrator/templates/ai-src/skills/sungen-viewpoint/group-e-identity.md} +0 -0
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Mobile Runtime Scaffolder
|
|
4
|
+
*
|
|
5
|
+
* Emits the Appium/WebdriverIO harness files into a project directory.
|
|
6
|
+
* Called by ProjectInitializer (init --mobile) and, in Phase 02, by `capability add mobile`.
|
|
7
|
+
* Never duplicated — always imported from here.
|
|
8
|
+
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
+
}
|
|
15
|
+
Object.defineProperty(o, k2, desc);
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
+
}) : function(o, v) {
|
|
23
|
+
o["default"] = v;
|
|
24
|
+
});
|
|
25
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
26
|
+
var ownKeys = function(o) {
|
|
27
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
28
|
+
var ar = [];
|
|
29
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
30
|
+
return ar;
|
|
31
|
+
};
|
|
32
|
+
return ownKeys(o);
|
|
33
|
+
};
|
|
34
|
+
return function (mod) {
|
|
35
|
+
if (mod && mod.__esModule) return mod;
|
|
36
|
+
var result = {};
|
|
37
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
38
|
+
__setModuleDefault(result, mod);
|
|
39
|
+
return result;
|
|
40
|
+
};
|
|
41
|
+
})();
|
|
42
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
+
exports.emitMobileRuntime = emitMobileRuntime;
|
|
44
|
+
exports.writeMobileCapabilities = writeMobileCapabilities;
|
|
45
|
+
exports.installMobileDriver = installMobileDriver;
|
|
46
|
+
const fs = __importStar(require("fs"));
|
|
47
|
+
const path = __importStar(require("path"));
|
|
48
|
+
const child_process_1 = require("child_process");
|
|
49
|
+
const capability_1 = require("../harness/capability");
|
|
50
|
+
/** Read a template from the orchestrator's bundled templates directory. */
|
|
51
|
+
function readTemplate(filename) {
|
|
52
|
+
const templatePath = path.join(__dirname, 'templates', filename);
|
|
53
|
+
return fs.readFileSync(templatePath, 'utf-8');
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Emit the mobile runtime harness into `cwd`.
|
|
57
|
+
*
|
|
58
|
+
* Files written:
|
|
59
|
+
* wdio.conf.ts — project root (seeded from mobile options)
|
|
60
|
+
* specs/reporters/pw-shape-reporter.ts — Playwright-shaped JSON reporter for WDIO
|
|
61
|
+
* .env.appium — seeded from flags (gitignored)
|
|
62
|
+
* .env.appium.example — committed placeholder guide
|
|
63
|
+
*
|
|
64
|
+
* The caller is responsible for adding `test:mobile` to package.json scripts and
|
|
65
|
+
* writing qa/capabilities.yaml — helpers for both are exported below.
|
|
66
|
+
*/
|
|
67
|
+
function emitMobileRuntime(cwd, opts) {
|
|
68
|
+
const created = [];
|
|
69
|
+
const skipped = [];
|
|
70
|
+
// wdio.conf.ts (project root) — substitute init-provided app defaults into the template
|
|
71
|
+
const wdioPath = path.join(cwd, 'wdio.conf.ts');
|
|
72
|
+
if (fs.existsSync(wdioPath)) {
|
|
73
|
+
skipped.push('wdio.conf.ts');
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
const content = readTemplate('wdio.conf.ts')
|
|
77
|
+
.replace('__APP_PACKAGE__', opts.appPackage || 'com.example.app')
|
|
78
|
+
// appActivity is optional — leave empty when not provided so UiAutomator2
|
|
79
|
+
// auto-resolves the launcher activity from appPackage. Only pin when explicitly passed.
|
|
80
|
+
.replace('__APP_ACTIVITY__', opts.appActivity || '')
|
|
81
|
+
.replace('__ANDROID_UDID__', opts.androidUdid || 'emulator-5554')
|
|
82
|
+
.replace('__IOS_BUNDLE_ID__', opts.iosBundleId || 'com.example.app')
|
|
83
|
+
.replace('__IOS_DEVICE__', opts.iosDevice || 'iPhone 16')
|
|
84
|
+
.replace('__IOS_VERSION__', opts.iosVersion || '18.0');
|
|
85
|
+
fs.writeFileSync(wdioPath, content, 'utf-8');
|
|
86
|
+
created.push('wdio.conf.ts');
|
|
87
|
+
}
|
|
88
|
+
// specs/reporters/pw-shape-reporter.ts
|
|
89
|
+
const reporterPath = path.join(cwd, 'specs', 'reporters', 'pw-shape-reporter.ts');
|
|
90
|
+
if (fs.existsSync(reporterPath)) {
|
|
91
|
+
skipped.push('specs/reporters/pw-shape-reporter.ts');
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
fs.mkdirSync(path.dirname(reporterPath), { recursive: true });
|
|
95
|
+
fs.writeFileSync(reporterPath, readTemplate('specs-pw-shape-reporter.ts'), 'utf-8');
|
|
96
|
+
created.push('specs/reporters/pw-shape-reporter.ts');
|
|
97
|
+
}
|
|
98
|
+
// .env.appium — seeded from the flags that were provided; env vars that were not passed
|
|
99
|
+
// are left commented out so the file is a useful guide without imposing bogus values.
|
|
100
|
+
const envPath = path.join(cwd, '.env.appium');
|
|
101
|
+
if (fs.existsSync(envPath)) {
|
|
102
|
+
skipped.push('.env.appium');
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
const lines = [
|
|
106
|
+
'# .env.appium — loaded by wdio.conf.ts. Shell exports override these values.',
|
|
107
|
+
'# See .env.appium.example for the full reference.',
|
|
108
|
+
'',
|
|
109
|
+
];
|
|
110
|
+
if (opts.appPackage)
|
|
111
|
+
lines.push(`APP_PACKAGE=${opts.appPackage}`);
|
|
112
|
+
if (opts.appActivity)
|
|
113
|
+
lines.push(`APP_ACTIVITY=${opts.appActivity}`);
|
|
114
|
+
if (opts.appApk)
|
|
115
|
+
lines.push(`APP_APK=${opts.appApk}`);
|
|
116
|
+
if (opts.androidUdid)
|
|
117
|
+
lines.push(`ANDROID_UDID=${opts.androidUdid}`);
|
|
118
|
+
if (opts.iosBundleId)
|
|
119
|
+
lines.push(`IOS_BUNDLE_ID=${opts.iosBundleId}`);
|
|
120
|
+
if (opts.iosDevice)
|
|
121
|
+
lines.push(`IOS_DEVICE=${opts.iosDevice}`);
|
|
122
|
+
if (opts.iosVersion)
|
|
123
|
+
lines.push(`IOS_VERSION=${opts.iosVersion}`);
|
|
124
|
+
lines.push('');
|
|
125
|
+
fs.writeFileSync(envPath, lines.join('\n'), 'utf-8');
|
|
126
|
+
created.push('.env.appium');
|
|
127
|
+
}
|
|
128
|
+
// .env.appium.example — committed placeholder guide (template stored without leading dot
|
|
129
|
+
// so copy-templates' glob picks it up; the output file gets the dot).
|
|
130
|
+
const envExamplePath = path.join(cwd, '.env.appium.example');
|
|
131
|
+
if (fs.existsSync(envExamplePath)) {
|
|
132
|
+
skipped.push('.env.appium.example');
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
fs.writeFileSync(envExamplePath, readTemplate('env.appium.example'), 'utf-8');
|
|
136
|
+
created.push('.env.appium.example');
|
|
137
|
+
}
|
|
138
|
+
return { created, skipped };
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Write qa/capabilities.yaml for a mobile project.
|
|
142
|
+
* Uses the canonical writeCapabilities from harness/capability so the format is always consistent.
|
|
143
|
+
*/
|
|
144
|
+
function writeMobileCapabilities(cwd) {
|
|
145
|
+
return (0, capability_1.writeCapabilities)(cwd, { platform: 'mobile', enabled: ['mobile'] });
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Resolve the install spec for `@sungen/driver-mobile`.
|
|
149
|
+
*
|
|
150
|
+
* In a monorepo checkout (dev / dogfood) the driver lives at `packages/driver-mobile` next to core and
|
|
151
|
+
* is NOT published to the registry — so we install it by `file:` path. In a published install (core in
|
|
152
|
+
* node_modules, no sibling package) we fall back to the registry pinned to the core version (lockstep).
|
|
153
|
+
*
|
|
154
|
+
* Why: a bare `@sungen/driver-mobile@<coreVersion>` hits npm E404 whenever the driver is unpublished or
|
|
155
|
+
* the consuming project lives outside the workspace (`test-mobile/`). The local `file:` path makes the
|
|
156
|
+
* dev/dogfood path work without the registry, while the registry fallback preserves lockstep for users.
|
|
157
|
+
*/
|
|
158
|
+
function resolveMobileDriverSpec() {
|
|
159
|
+
// From this file (src/orchestrator OR dist/orchestrator) the sibling driver package is ../../../driver-mobile.
|
|
160
|
+
const localDriverDir = path.resolve(__dirname, '..', '..', '..', 'driver-mobile');
|
|
161
|
+
if (fs.existsSync(path.join(localDriverDir, 'package.json'))) {
|
|
162
|
+
return `file:${localDriverDir}`;
|
|
163
|
+
}
|
|
164
|
+
let coreVersion = 'latest';
|
|
165
|
+
try {
|
|
166
|
+
coreVersion = require('../../package.json').version || 'latest';
|
|
167
|
+
}
|
|
168
|
+
catch {
|
|
169
|
+
// noop — fall back to latest
|
|
170
|
+
}
|
|
171
|
+
return `@sungen/driver-mobile@${coreVersion}`;
|
|
172
|
+
}
|
|
173
|
+
/** Best-effort `npm install -D <specs…> [extraArgs…]` in `cwd`. Returns true on exit code 0. */
|
|
174
|
+
function npmInstallDev(cwd, specs, extraArgs = []) {
|
|
175
|
+
const result = (0, child_process_1.spawnSync)('npm', ['install', '-D', ...specs, ...extraArgs], { cwd, stdio: 'inherit', shell: true });
|
|
176
|
+
return result.status === 0;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Locate the project's locally-installed appium CLI bin. Walks up from `cwd` so it works whether the
|
|
180
|
+
* appium dep is nested under @sungen/driver-mobile or hoisted to a parent node_modules/.bin. Returns
|
|
181
|
+
* null when appium is not installed in the project (then we skip cleanly — no `npx` auto-fetch).
|
|
182
|
+
*/
|
|
183
|
+
function appiumBinPath(cwd) {
|
|
184
|
+
const binName = process.platform === 'win32' ? 'appium.cmd' : 'appium';
|
|
185
|
+
let dir = path.resolve(cwd);
|
|
186
|
+
for (let i = 0; i < 8; i++) {
|
|
187
|
+
const bin = path.join(dir, 'node_modules', '.bin', binName);
|
|
188
|
+
if (fs.existsSync(bin))
|
|
189
|
+
return bin;
|
|
190
|
+
const parent = path.dirname(dir);
|
|
191
|
+
if (parent === dir)
|
|
192
|
+
break;
|
|
193
|
+
dir = parent;
|
|
194
|
+
}
|
|
195
|
+
return null;
|
|
196
|
+
}
|
|
197
|
+
/** Appium platform drivers already installed in ~/.appium (per-user). Empty set if it can't tell. */
|
|
198
|
+
function installedAppiumDrivers(appiumBin, cwd) {
|
|
199
|
+
const r = (0, child_process_1.spawnSync)(appiumBin, ['driver', 'list', '--installed', '--json'], { cwd, encoding: 'utf-8' });
|
|
200
|
+
if (r.status !== 0 || !r.stdout)
|
|
201
|
+
return new Set();
|
|
202
|
+
try {
|
|
203
|
+
return new Set(Object.keys(JSON.parse(r.stdout)));
|
|
204
|
+
}
|
|
205
|
+
catch {
|
|
206
|
+
return new Set();
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Auto-install the Appium PLATFORM drivers needed for ANY session — both the appium-mcp live capture
|
|
211
|
+
* (`/sungen:create-test`) and the wdio runner (`/sungen:run-test`). Provisioned by the SAME code path
|
|
212
|
+
* that installs @sungen/driver-mobile (right after its `appium` dep is installed). Best-effort + idempotent.
|
|
213
|
+
*
|
|
214
|
+
* - `uiautomator2` (Android): cross-platform → always.
|
|
215
|
+
* - `xcuitest` (iOS): macOS-only — it builds WebDriverAgent via Xcode at RUN time, usable only on a
|
|
216
|
+
* Mac → installed only on darwin; elsewhere we print the command for when on a Mac.
|
|
217
|
+
*
|
|
218
|
+
* Runs the project-local appium bin directly (NOT `npx`, which would either auto-fetch a latest appium
|
|
219
|
+
* or hard-fail with `--no-install`). If appium isn't installed in the project, skip with a clear hint.
|
|
220
|
+
*/
|
|
221
|
+
function installAppiumPlatformDrivers(cwd) {
|
|
222
|
+
const appiumBin = appiumBinPath(cwd);
|
|
223
|
+
if (!appiumBin) {
|
|
224
|
+
console.warn('⚠️ appium is not installed in the project — skipping platform-driver install.\n' +
|
|
225
|
+
' Install the mobile runtime first (the @sungen/driver-mobile deps via `npm install`), then run:\n' +
|
|
226
|
+
` npx appium driver install uiautomator2${process.platform === 'darwin' ? ' (+ xcuitest)' : ''}`);
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
const installed = installedAppiumDrivers(appiumBin, cwd);
|
|
230
|
+
const want = ['uiautomator2', ...(process.platform === 'darwin' ? ['xcuitest'] : [])];
|
|
231
|
+
for (const drv of want) {
|
|
232
|
+
if (installed.has(drv)) {
|
|
233
|
+
console.log(`✓ appium driver "${drv}" already installed.`);
|
|
234
|
+
continue;
|
|
235
|
+
}
|
|
236
|
+
console.log(`📦 Installing appium driver "${drv}"...`);
|
|
237
|
+
const r = (0, child_process_1.spawnSync)(appiumBin, ['driver', 'install', drv], { cwd, stdio: 'inherit' });
|
|
238
|
+
if (!r || r.status !== 0) {
|
|
239
|
+
console.warn(`⚠️ appium driver "${drv}" not installed (best-effort) — retry: npx appium driver install ${drv}`);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
if (process.platform !== 'darwin') {
|
|
243
|
+
console.log('ℹ️ iOS (xcuitest) is macOS-only (needs Xcode at run time) — skipped on this OS. On a Mac: npx appium driver install xcuitest');
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Best-effort provision of the mobile runtime into a project that has opted into mobile
|
|
248
|
+
* (`sungen init --mobile` / `sungen capability add mobile` — never auto-run; consent-gated).
|
|
249
|
+
*
|
|
250
|
+
* Installs everything the runner needs:
|
|
251
|
+
* 1. `@sungen/driver-mobile` + its WebdriverIO/Appium runtime (declared as that package's `dependencies`).
|
|
252
|
+
* A local `file:` spec (dev/dogfood) uses `npm install --install-links` so npm COPIES the package and
|
|
253
|
+
* installs its transitive deps — a plain file: install only SYMLINKS it and skips the runtime. A
|
|
254
|
+
* published/registry spec installs deps normally.
|
|
255
|
+
* 2. the appium PLATFORM drivers (uiautomator2 / xcuitest, ~/.appium-managed) — NOT npm packages, so
|
|
256
|
+
* installed via the appium CLI here (installAppiumPlatformDrivers), so a session can actually start.
|
|
257
|
+
*
|
|
258
|
+
* Non-fatal: logs a warning on failure so offline/air-gapped init still scaffolds correctly.
|
|
259
|
+
*
|
|
260
|
+
* @returns true if the driver install succeeded (or was already present), false on failure
|
|
261
|
+
*/
|
|
262
|
+
function installMobileDriver(cwd) {
|
|
263
|
+
const driverSpec = resolveMobileDriverSpec();
|
|
264
|
+
// A `file:` spec (unpublished dev/dogfood driver) MUST install with --install-links: a plain file:
|
|
265
|
+
// install only SYMLINKS the package and skips its transitive deps, so the wdio/appium runtime never
|
|
266
|
+
// lands in the project. --install-links makes npm COPY it and install those deps. Registry specs
|
|
267
|
+
// install deps normally, so the flag is omitted there.
|
|
268
|
+
const isFileSpec = driverSpec.startsWith('file:');
|
|
269
|
+
// Provisioned only when BOTH the driver dep AND its appium runtime are present — a driver that was
|
|
270
|
+
// symlinked earlier (no runtime) must be re-installed (with --install-links) to actually pull appium.
|
|
271
|
+
let hasDriverDep = false;
|
|
272
|
+
try {
|
|
273
|
+
const pkgJsonPath = path.join(cwd, 'package.json');
|
|
274
|
+
if (fs.existsSync(pkgJsonPath)) {
|
|
275
|
+
const pkg = JSON.parse(fs.readFileSync(pkgJsonPath, 'utf-8'));
|
|
276
|
+
const allDeps = { ...pkg.dependencies, ...pkg.devDependencies };
|
|
277
|
+
hasDriverDep = !!allDeps['@sungen/driver-mobile'];
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
catch {
|
|
281
|
+
// proceed to install
|
|
282
|
+
}
|
|
283
|
+
const runtimeReady = hasDriverDep && appiumBinPath(cwd) !== null;
|
|
284
|
+
let driverOk = runtimeReady;
|
|
285
|
+
if (!runtimeReady) {
|
|
286
|
+
console.log(`📦 Installing mobile driver + runtime (${driverSpec})...`);
|
|
287
|
+
driverOk = npmInstallDev(cwd, [driverSpec], isFileSpec ? ['--install-links'] : []);
|
|
288
|
+
if (!driverOk) {
|
|
289
|
+
console.warn(`⚠️ Could not install ${driverSpec} — scaffold is complete but the mobile driver is not installed.\n` +
|
|
290
|
+
` Install manually later: npm install -D ${driverSpec}${isFileSpec ? ' --install-links' : ''}`);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
// Appium platform driver(s) — REQUIRED for any session (appium-mcp live capture AND the wdio runner).
|
|
294
|
+
// NOT npm packages, so installed via the appium CLI here, by the same code path that installs the driver.
|
|
295
|
+
installAppiumPlatformDrivers(cwd);
|
|
296
|
+
return driverOk;
|
|
297
|
+
}
|
|
298
|
+
//# sourceMappingURL=mobile-runtime-scaffolder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mobile-runtime-scaffolder.js","sourceRoot":"","sources":["../../src/orchestrator/mobile-runtime-scaffolder.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CH,8CAkEC;AAMD,0DAEC;AAgHD,kDAyCC;AA5QD,uCAAyB;AACzB,2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
* Project Initializer
|
|
3
3
|
* Creates essential directory structure for Sungen pipeline
|
|
4
4
|
*/
|
|
5
|
+
import { AdapterKey } from './ai-skills/adapters';
|
|
6
|
+
import { MobileInitOptions } from './mobile-runtime-scaffolder';
|
|
7
|
+
export { MobileInitOptions };
|
|
5
8
|
export declare class ProjectInitializer {
|
|
6
9
|
private baseUrl;
|
|
7
10
|
private baseCwd;
|
|
8
11
|
private cwd;
|
|
9
12
|
private createdItems;
|
|
10
13
|
private skippedItems;
|
|
11
|
-
|
|
14
|
+
private agents;
|
|
15
|
+
private force;
|
|
16
|
+
private mobile;
|
|
17
|
+
constructor(baseUrl: string, opts?: {
|
|
18
|
+
agents?: AdapterKey[];
|
|
19
|
+
force?: boolean;
|
|
20
|
+
enabled?: boolean;
|
|
21
|
+
mobileOnly?: boolean;
|
|
22
|
+
appPackage?: string;
|
|
23
|
+
appActivity?: string;
|
|
24
|
+
appApk?: string;
|
|
25
|
+
androidUdid?: string;
|
|
26
|
+
iosBundleId?: string;
|
|
27
|
+
iosDevice?: string;
|
|
28
|
+
iosVersion?: string;
|
|
29
|
+
});
|
|
30
|
+
/** Mobile-only project: no Playwright/web scaffolding. */
|
|
31
|
+
private get mobileOnly();
|
|
12
32
|
/**
|
|
13
33
|
* Initialize project with essential directories and config
|
|
14
34
|
*/
|
|
@@ -18,7 +38,9 @@ export declare class ProjectInitializer {
|
|
|
18
38
|
*/
|
|
19
39
|
private createProjectRoot;
|
|
20
40
|
/**
|
|
21
|
-
* Create essential directories only
|
|
41
|
+
* Create essential directories only.
|
|
42
|
+
* Mobile-only: skips specs/storage (Playwright auth state); qa/screens + qa/flows still created
|
|
43
|
+
* (1-platform model — mobile uses the same tree as web, NOT a separate qa/mobile/ path).
|
|
22
44
|
*/
|
|
23
45
|
private createDirectories;
|
|
24
46
|
/**
|
|
@@ -30,7 +52,9 @@ export declare class ProjectInitializer {
|
|
|
30
52
|
*/
|
|
31
53
|
private createTsConfig;
|
|
32
54
|
/**
|
|
33
|
-
* Update .gitignore with Sungen-specific entries
|
|
55
|
+
* Update .gitignore with Sungen-specific entries.
|
|
56
|
+
* Mobile projects add .env.appium (device ids + machine paths) and specs/.auth-mobile/
|
|
57
|
+
* (Appium auth contract). Web projects add Playwright auth state + report dirs.
|
|
34
58
|
*/
|
|
35
59
|
private updateGitignore;
|
|
36
60
|
/**
|
|
@@ -38,11 +62,13 @@ export declare class ProjectInitializer {
|
|
|
38
62
|
*/
|
|
39
63
|
private createReadme;
|
|
40
64
|
/**
|
|
41
|
-
* Create VS Code settings for Copilot auto-attach
|
|
65
|
+
* Create VS Code settings for Copilot auto-attach.
|
|
66
|
+
* Mobile-only: approves wdio + npx appium instead of npx playwright.
|
|
42
67
|
*/
|
|
43
68
|
private createVSCodeSettings;
|
|
44
69
|
/**
|
|
45
|
-
* Create root .mcp.json for Claude Code
|
|
70
|
+
* Create root .mcp.json for Claude Code.
|
|
71
|
+
* Mobile-only: appium-mcp instead of Playwright MCP. Figma always included.
|
|
46
72
|
*/
|
|
47
73
|
private createClaudeMCPConfig;
|
|
48
74
|
/**
|
|
@@ -59,6 +85,10 @@ export declare class ProjectInitializer {
|
|
|
59
85
|
* Shares `AI_RULES_FILE_MAPPING` with `sungen update` so a newly added
|
|
60
86
|
* skill / command template only needs to be registered once.
|
|
61
87
|
*/
|
|
88
|
+
/**
|
|
89
|
+
* Create AI rules files for the selected assistants from the single source (ai-src).
|
|
90
|
+
* Shares the generator (ai-skills/build) with `sungen update` so a skill is authored once.
|
|
91
|
+
*/
|
|
62
92
|
private createAIRules;
|
|
63
93
|
/**
|
|
64
94
|
* Create qa/context.md for the QA lead to fill project-wide context
|
|
@@ -66,8 +96,9 @@ export declare class ProjectInitializer {
|
|
|
66
96
|
*/
|
|
67
97
|
private createContext;
|
|
68
98
|
/**
|
|
69
|
-
* Create qa/capabilities.yaml — the platform driver profile
|
|
70
|
-
*
|
|
99
|
+
* Create qa/capabilities.yaml — the platform driver profile.
|
|
100
|
+
* Web default: platform=web, enabled=[web].
|
|
101
|
+
* Mobile: platform=mobile, enabled=[mobile] (via writeMobileCapabilities from the scaffolder).
|
|
71
102
|
*/
|
|
72
103
|
private createCapabilities;
|
|
73
104
|
/**
|
|
@@ -78,6 +109,12 @@ export declare class ProjectInitializer {
|
|
|
78
109
|
* Create specs/test-data.ts for runtime YAML loading
|
|
79
110
|
*/
|
|
80
111
|
private createSpecsTestData;
|
|
112
|
+
/**
|
|
113
|
+
* Delegate to mobile-runtime-scaffolder to emit Appium/WDIO harness files,
|
|
114
|
+
* then best-effort install @sungen/driver-mobile at lockstep version.
|
|
115
|
+
* Called only when `--mobile` is set.
|
|
116
|
+
*/
|
|
117
|
+
private emitMobileHarness;
|
|
81
118
|
/**
|
|
82
119
|
* Read a template file from the templates directory
|
|
83
120
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-initializer.d.ts","sourceRoot":"","sources":["../../src/orchestrator/project-initializer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,qBAAa,kBAAkB;
|
|
1
|
+
{"version":3,"file":"project-initializer.d.ts","sourceRoot":"","sources":["../../src/orchestrator/project-initializer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EACL,iBAAiB,EAIlB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAO7B,qBAAa,kBAAkB;IASjB,OAAO,CAAC,OAAO;IAR3B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,GAAG,CAAS;IACpB,OAAO,CAAC,YAAY,CAAgB;IACpC,OAAO,CAAC,YAAY,CAAgB;IACpC,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,KAAK,CAAU;IACvB,OAAO,CAAC,MAAM,CAAoB;gBAEd,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE;QAAE,MAAM,CAAC,EAAE,UAAU,EAAE,CA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