@cutleryapp/agent 1.0.3 → 1.0.7

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 (2) hide show
  1. package/dist/cli.js +7 -0
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -98,6 +98,10 @@ function buildIdentity(args) {
98
98
  platform: process.platform,
99
99
  arch: process.arch,
100
100
  nodeVersion: process.version,
101
+ // Allow the operator to identify themselves so the server can enforce
102
+ // per-plan concurrent-agent caps. Pass via `--owner you@example.com` or
103
+ // the CUTLERY_OWNER_EMAIL env var.
104
+ ownerEmail: args.ownerEmail || process.env.CUTLERY_OWNER_EMAIL || null,
101
105
  capabilities: {
102
106
  // Today the executor only drives Chromium. When that changes, advertise
103
107
  // the actual list — the server's capability matcher consumes this.
@@ -324,6 +328,7 @@ function runConnect(opts) {
324
328
  headless: opts.headless,
325
329
  maxConcurrency: opts.maxConcurrency,
326
330
  tags: opts.tags,
331
+ ownerEmail: opts.ownerEmail,
327
332
  });
328
333
  const running = new Map();
329
334
  let lastErrorAt = 0;
@@ -632,6 +637,7 @@ program
632
637
  .option("--headless", "Run tests in headless mode (default: browser is visible)", false)
633
638
  .option("-t, --tag <tag...>", "Capability tag(s) for routing (repeatable). Also reads AGENT_TAGS (comma-separated).")
634
639
  .option("--max-concurrency <n>", "Max tests this agent will accept at once (default: 1)", (v) => parseInt(v, 10))
640
+ .option("-o, --owner <email>", "Your Cutlery account email — lets the server enforce per-plan concurrent-agent caps. Also reads CUTLERY_OWNER_EMAIL.")
635
641
  .option("-v, --verbose", "Verbose output", false)
636
642
  .action(async (options) => {
637
643
  const envTags = (process.env.AGENT_TAGS || "")
@@ -647,6 +653,7 @@ program
647
653
  verbose: !!options.verbose,
648
654
  tags: tags.length ? tags : undefined,
649
655
  maxConcurrency: options.maxConcurrency,
656
+ ownerEmail: options.owner,
650
657
  onEvicted: () => setTimeout(() => process.exit(1), 200),
651
658
  });
652
659
  process.on("SIGINT", () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cutleryapp/agent",
3
- "version": "1.0.3",
3
+ "version": "1.0.7",
4
4
  "description": "Local agent that connects your machine to the Cutlery QA platform and runs UI tests via Playwright",
5
5
  "main": "dist/cli.js",
6
6
  "bin": {
@@ -58,4 +58,4 @@
58
58
  ],
59
59
  "outputPath": "dist"
60
60
  }
61
- }
61
+ }