@sweny-ai/core 0.1.30 → 0.1.32

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/cli/main.js CHANGED
@@ -19,7 +19,9 @@ import { buildWorkflow, refineWorkflow } from "../workflow-builder.js";
19
19
  import { toMermaid, toMermaidBlock } from "../mermaid.js";
20
20
  import { DagRenderer } from "./renderer.js";
21
21
  import * as readline from "node:readline";
22
- import { loadDotenv, loadConfigFile, STARTER_CONFIG } from "./config-file.js";
22
+ import { loadDotenv, loadConfigFile } from "./config-file.js";
23
+ import { runInit } from "./init.js";
24
+ import { runE2eInit, runE2eRun } from "./e2e.js";
23
25
  import { registerTriageCommand, registerImplementCommand, parseCliInputs, validateInputs, validateWarnings, } from "./config.js";
24
26
  import { c, formatBanner, getStepDetails, formatStepLine, formatDagResultHuman, formatResultJson, formatValidationErrors, formatCrashError, formatCheckResults, } from "./output.js";
25
27
  import { checkProviderConnectivity } from "./check.js";
@@ -55,16 +57,27 @@ const program = new Command()
55
57
  // ── sweny init ────────────────────────────────────────────────────────
56
58
  program
57
59
  .command("init")
58
- .description("Create a starter .sweny.yml config file")
59
- .action(() => {
60
- const target = path.join(process.cwd(), ".sweny.yml");
61
- if (fs.existsSync(target)) {
62
- console.error(chalk.yellow(" .sweny.yml already exists — skipping."));
63
- process.exit(1);
64
- }
65
- fs.writeFileSync(target, STARTER_CONFIG, "utf-8");
66
- console.log(chalk.green(" Created .sweny.yml"));
67
- console.log(chalk.dim(" Add your secrets to .env and run: sweny triage --dry-run"));
60
+ .description("Interactive setup wizard — creates .sweny.yml, .env template, and optional GitHub Action")
61
+ .action(async () => {
62
+ await runInit();
63
+ });
64
+ // ── sweny e2e ────────────────────────────────────────────────────────
65
+ const e2eCmd = program.command("e2e").description("End-to-end browser testing");
66
+ e2eCmd
67
+ .command("init")
68
+ .description("Interactive wizard — generates .sweny/e2e/*.yml workflow files")
69
+ .action(async () => {
70
+ await runE2eInit();
71
+ });
72
+ e2eCmd
73
+ .command("run [file]")
74
+ .description("Run e2e workflow files from .sweny/e2e/")
75
+ .option("--timeout <ms>", "Timeout per workflow in milliseconds (default: 900000 = 15 min)")
76
+ .action(async (file, options) => {
77
+ await runE2eRun({
78
+ file,
79
+ timeout: options.timeout ? parseInt(options.timeout, 10) : undefined,
80
+ });
68
81
  });
69
82
  // ── sweny check ───────────────────────────────────────────────────────
70
83
  program
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sweny-ai/core",
3
- "version": "0.1.30",
3
+ "version": "0.1.32",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "sweny": "./dist/cli/main.js"
@@ -49,6 +49,7 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@anthropic-ai/claude-agent-sdk": "^0.2.84",
52
+ "@clack/prompts": "^1.2.0",
52
53
  "chalk": "^5",
53
54
  "commander": "^13",
54
55
  "yaml": "^2",