plures 1.18.0 → 1.21.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.
package/README.md CHANGED
@@ -52,7 +52,7 @@ if (event.type === "task.completed" && event.data.result?.agreement === 1) {
52
52
  - `plures.tasks.retrieve(id)`, `plures.tasks.list({ status?, limit?, starting_after?, app? })`, `plures.tasks.cancel(id)`
53
53
  - `new Plures(key, { app: "support-agent" })` or `PLURES_APP`: send everything to one of your apps. `plures.apps.list()`, `.create({ name, id? })`, `.retrieve(id)`, `.update(id, { name?, id?, default? })`, `.del(id)`. Each app keeps its own tasks, ledger view, map and quality.
54
54
  - `plures.maps.guide()`, `.retrieve(app)`, `.upload(app, map, { branch? })` (a branch other than main gets its own map, compared with main and noted on its pull request), `.setCheckpoint(app, id, status)`: the agent map, where your agent needs a person. Or run `npx plures map` in your repo: your own coding agent reads the code and only the map is sent.
55
- - `plures.maps.createKey(app, { label? })`, `.keys(app)`, `.revokeKey(app, id)`: map keys for CI, which can only read and upload that app's map. `.workflow(app, branch?)` returns the GitHub Action that maps on every push; `npx plures map workflow` writes it to `.github/workflows/plures-map.yml`. Or use **Map with GitHub** on the app's map page and Plures opens the pull request for you, then **Turn on mapping** merges it. `plures.maps.startRun(app)` and `.runs(app)`: in CI with no Claude key, `npx plures map` starts a run where Plures runs Claude (first map free, then Claude's cost plus 30%, at most $5).
55
+ - `plures.maps.createKey(app, { label? })`, `.keys(app)`, `.revokeKey(app, id)`: map keys for CI, which can only read and upload that app's map. `.workflow(app, branch?)` returns the GitHub Action that maps on every push; `npx plures map workflow` writes it to `.github/workflows/plures-map.yml`. Or use **Map with GitHub** on the app's map page and Plures opens the pull request for you, then **Turn on mapping** merges it. `plures.maps.startRun(app)` and `.runs(app)`: in CI with no Claude key, `npx plures map` starts a run where Plures runs Claude (Claude at cost, at most $5 a run). `plures.maps.estimate(app, "map" | "drift")` shows what the next map or drift fix costs before it starts: the Plures engine fee, 5¢ a step of the app's map (the first map of each app is free; branch maps are free), plus Claude at cost when Plures runs it. `npx plures map` and `npx plures drift fix` check it first and stop if your credit can't cover it. A drift fix is paid by outcome: each quality point it wins back, once people have graded the new outputs, costs 20¢ a step of the map ($3 to $15 a point), at most $500 a fix, with Claude included; no better or worse is free.
56
56
  - In your terminal, `npx plures map` opens your map page so you can watch it build (`--no-open` to skip), keeps one live line of what it's reading, and ends by drawing the map's flows with the checks Plures suggests. On GitHub and other CI it prints a plain log.
57
57
  - `npx plures map` shows each file as Claude Code reads it and sends the file names (never their contents) to Plures, so the map page shows the reading live and the map builds itself when it lands. `plures.maps.progress(app, { session, phase, events })` is the call behind it.
58
58
  - `plures.github.repos()`, `.connect(app, "owner/repo")`, `.turnOn(app)`, `.run(app)` (map now), `.status(app)`, `.disconnect(app)`: Map with GitHub from code. Plures sets the repo's map key secret and opens a pull request adding the workflow; `turnOn` merges it. Installing the Plures GitHub App needs a browser once (`install_url`). From a terminal: `npx plures map github connect`, then `npx plures map github on`; `npx plures map github run` maps again now.
@@ -1,5 +1,5 @@
1
1
  // src/index.ts
2
- var VERSION = "1.18.0";
2
+ var VERSION = "1.21.0";
3
3
  var PluresError = class extends Error {
4
4
  constructor(message, status, type) {
5
5
  super(message);
@@ -107,8 +107,12 @@ var Plures = class {
107
107
  createKey: (app, opts = {}) => this.req("POST", `/api/v1/apps/${encodeURIComponent(app)}/map_keys`, opts),
108
108
  keys: (app) => this.req("GET", `/api/v1/apps/${encodeURIComponent(app)}/map_keys`),
109
109
  revokeKey: (app, id) => this.req("DELETE", `/api/v1/apps/${encodeURIComponent(app)}/map_keys/${encodeURIComponent(id)}`),
110
+ /** What the next map or drift fix will cost before it starts. A map: the Plures engine fee, per step of the app's map
111
+ * (the first map of each app is free), and Claude at cost if Plures runs it. A drift fix: paid by outcome,
112
+ * drift_fix.per_point_cents for each quality point it wins back, at most drift_fix.max_cents, Claude included. blocked says why it can't start. */
113
+ estimate: (app, kind = "map", opts = {}) => this.req("GET", `/api/v1/apps/${encodeURIComponent(app)}/map_estimate?for=${kind}${opts.case ? `&case=${encodeURIComponent(opts.case)}` : ""}`),
110
114
  /** Starts a map run where Plures runs Claude (CI with no Anthropic key). npx plures map does this. */
111
- startRun: (app) => this.req("POST", `/api/v1/apps/${encodeURIComponent(app)}/map_runs`, {}),
115
+ startRun: (app, opts = {}) => this.req("POST", `/api/v1/apps/${encodeURIComponent(app)}/map_runs`, opts),
112
116
  runs: (app) => this.req("GET", `/api/v1/apps/${encodeURIComponent(app)}/map_runs`),
113
117
  /** While mapping, which files the coding agent is reading, shown live on the map page. File names only. npx plures map does this. */
114
118
  progress: (app, p) => this.req("POST", `/api/v1/apps/${encodeURIComponent(app)}/map/progress`, p),
package/dist/cli.cjs CHANGED
@@ -30,7 +30,7 @@ var import_node_path = require("path");
30
30
  var import_node_fs = require("fs");
31
31
 
32
32
  // src/index.ts
33
- var VERSION = "1.18.0";
33
+ var VERSION = "1.21.0";
34
34
  var PluresError = class extends Error {
35
35
  constructor(message, status, type) {
36
36
  super(message);
@@ -138,8 +138,12 @@ var Plures = class {
138
138
  createKey: (app2, opts = {}) => this.req("POST", `/api/v1/apps/${encodeURIComponent(app2)}/map_keys`, opts),
139
139
  keys: (app2) => this.req("GET", `/api/v1/apps/${encodeURIComponent(app2)}/map_keys`),
140
140
  revokeKey: (app2, id) => this.req("DELETE", `/api/v1/apps/${encodeURIComponent(app2)}/map_keys/${encodeURIComponent(id)}`),
141
+ /** What the next map or drift fix will cost before it starts. A map: the Plures engine fee, per step of the app's map
142
+ * (the first map of each app is free), and Claude at cost if Plures runs it. A drift fix: paid by outcome,
143
+ * drift_fix.per_point_cents for each quality point it wins back, at most drift_fix.max_cents, Claude included. blocked says why it can't start. */
144
+ estimate: (app2, kind = "map", opts = {}) => this.req("GET", `/api/v1/apps/${encodeURIComponent(app2)}/map_estimate?for=${kind}${opts.case ? `&case=${encodeURIComponent(opts.case)}` : ""}`),
141
145
  /** Starts a map run where Plures runs Claude (CI with no Anthropic key). npx plures map does this. */
142
- startRun: (app2) => this.req("POST", `/api/v1/apps/${encodeURIComponent(app2)}/map_runs`, {}),
146
+ startRun: (app2, opts = {}) => this.req("POST", `/api/v1/apps/${encodeURIComponent(app2)}/map_runs`, opts),
143
147
  runs: (app2) => this.req("GET", `/api/v1/apps/${encodeURIComponent(app2)}/map_runs`),
144
148
  /** While mapping, which files the coding agent is reading, shown live on the map page. File names only. npx plures map does this. */
145
149
  progress: (app2, p) => this.req("POST", `/api/v1/apps/${encodeURIComponent(app2)}/map/progress`, p),
@@ -512,8 +516,7 @@ async function upload(file) {
512
516
  }
513
517
  if (!fancy) console.log(dim(`Sending the map to Plures. No source code is sent.`));
514
518
  let m;
515
- const gitBranch = (0, import_node_child_process.spawnSync)("git", ["rev-parse", "--abbrev-ref", "HEAD"], { encoding: "utf8" }).stdout?.trim();
516
- const branchName = process.env.PLURES_BRANCH || process.env.GITHUB_HEAD_REF || process.env.GITHUB_REF_NAME || (gitBranch && gitBranch !== "HEAD" ? gitBranch : "");
519
+ const branchName = currentBranch();
517
520
  try {
518
521
  m = await client().maps.upload(app, map2, branchName ? { branch: branchName } : {});
519
522
  } catch (e) {
@@ -563,6 +566,14 @@ With plures-mcp connected, just ask: ${cyan("Map this app for Plures")}`);
563
566
  return;
564
567
  }
565
568
  const before = (0, import_node_fs.existsSync)(FILE) ? (0, import_node_fs.statSync)(FILE).mtimeMs : 0;
569
+ const est = await client().maps.estimate(app).catch(() => null);
570
+ if (est) {
571
+ const br = currentBranch();
572
+ const main2 = !br || br === "main" || br === "master";
573
+ if (est.blocked && main2) die(est.blocked);
574
+ if (main2 && est.engine_fee.free) console.log(dim("Plures engine: this app's first map is free."));
575
+ else if (main2 && est.engine_fee.cents) console.log(dim(`Plures engine: about $${(est.engine_fee.cents / 100).toFixed(2)} (${est.engine_fee.steps} steps at ${est.engine_fee.per_step_cents}\xA2), from your credit when the map uploads.`));
576
+ }
566
577
  const childEnv = { ...process.env };
567
578
  const ownClaude = Boolean(process.env.ANTHROPIC_API_KEY || process.env.CLAUDE_CODE_OAUTH_TOKEN || process.env.ANTHROPIC_AUTH_TOKEN);
568
579
  if (!ownClaude && (process.env.CI || argv.includes("--plures-claude"))) {
@@ -821,6 +832,10 @@ ${cyan("\u2713")} The check is on the branch ${bold(br)}. Review it with ${cyan(
821
832
  die(e instanceof PluresError ? e.message : String(e));
822
833
  }
823
834
  }
835
+ function currentBranch() {
836
+ const gitBranch = (0, import_node_child_process.spawnSync)("git", ["rev-parse", "--abbrev-ref", "HEAD"], { encoding: "utf8" }).stdout?.trim();
837
+ return process.env.PLURES_BRANCH || process.env.GITHUB_HEAD_REF || process.env.GITHUB_REF_NAME || (gitBranch && gitBranch !== "HEAD" ? gitBranch : "");
838
+ }
824
839
  async function driftFix(id) {
825
840
  if (!id) die("npx plures drift fix <case id> [--app <app>]");
826
841
  const cl = client();
@@ -836,6 +851,8 @@ async function driftFix(id) {
836
851
  } catch (e) {
837
852
  return fail(e instanceof PluresError ? e.message : String(e));
838
853
  }
854
+ const est = await cl.maps.estimate(app, "drift", { case: id }).catch(() => null);
855
+ if (est?.blocked) return fail(est.blocked);
839
856
  if (!hasClaude()) return fail("Claude Code isn't installed here, so nothing could read the code.");
840
857
  const git = (...a) => (0, import_node_child_process.spawnSync)("git", a, { encoding: "utf8" });
841
858
  if (git("status", "--porcelain").stdout.trim()) return fail("This repo has changes that aren't committed. Commit or stash them first.");
@@ -843,7 +860,7 @@ async function driftFix(id) {
843
860
  const ownClaude = Boolean(process.env.ANTHROPIC_API_KEY || process.env.CLAUDE_CODE_OAUTH_TOKEN || process.env.ANTHROPIC_AUTH_TOKEN);
844
861
  if (!ownClaude && process.env.CI) {
845
862
  try {
846
- const run = await cl.maps.startRun(app);
863
+ const run = await cl.maps.startRun(app, { purpose: "drift", case: id });
847
864
  childEnv.ANTHROPIC_BASE_URL = run.base_url;
848
865
  childEnv.ANTHROPIC_API_KEY = run.token;
849
866
  } catch (e) {
package/dist/cli.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  Plures,
4
4
  PluresError,
5
5
  VERSION
6
- } from "./chunk-RKIJTDS3.js";
6
+ } from "./chunk-Z3YGRA2U.js";
7
7
 
8
8
  // src/cli.ts
9
9
  import { spawnSync, spawn } from "child_process";
@@ -228,8 +228,7 @@ async function upload(file) {
228
228
  }
229
229
  if (!fancy) console.log(dim(`Sending the map to Plures. No source code is sent.`));
230
230
  let m;
231
- const gitBranch = spawnSync("git", ["rev-parse", "--abbrev-ref", "HEAD"], { encoding: "utf8" }).stdout?.trim();
232
- const branchName = process.env.PLURES_BRANCH || process.env.GITHUB_HEAD_REF || process.env.GITHUB_REF_NAME || (gitBranch && gitBranch !== "HEAD" ? gitBranch : "");
231
+ const branchName = currentBranch();
233
232
  try {
234
233
  m = await client().maps.upload(app, map2, branchName ? { branch: branchName } : {});
235
234
  } catch (e) {
@@ -279,6 +278,14 @@ With plures-mcp connected, just ask: ${cyan("Map this app for Plures")}`);
279
278
  return;
280
279
  }
281
280
  const before = existsSync(FILE) ? statSync(FILE).mtimeMs : 0;
281
+ const est = await client().maps.estimate(app).catch(() => null);
282
+ if (est) {
283
+ const br = currentBranch();
284
+ const main2 = !br || br === "main" || br === "master";
285
+ if (est.blocked && main2) die(est.blocked);
286
+ if (main2 && est.engine_fee.free) console.log(dim("Plures engine: this app's first map is free."));
287
+ else if (main2 && est.engine_fee.cents) console.log(dim(`Plures engine: about $${(est.engine_fee.cents / 100).toFixed(2)} (${est.engine_fee.steps} steps at ${est.engine_fee.per_step_cents}\xA2), from your credit when the map uploads.`));
288
+ }
282
289
  const childEnv = { ...process.env };
283
290
  const ownClaude = Boolean(process.env.ANTHROPIC_API_KEY || process.env.CLAUDE_CODE_OAUTH_TOKEN || process.env.ANTHROPIC_AUTH_TOKEN);
284
291
  if (!ownClaude && (process.env.CI || argv.includes("--plures-claude"))) {
@@ -537,6 +544,10 @@ ${cyan("\u2713")} The check is on the branch ${bold(br)}. Review it with ${cyan(
537
544
  die(e instanceof PluresError ? e.message : String(e));
538
545
  }
539
546
  }
547
+ function currentBranch() {
548
+ const gitBranch = spawnSync("git", ["rev-parse", "--abbrev-ref", "HEAD"], { encoding: "utf8" }).stdout?.trim();
549
+ return process.env.PLURES_BRANCH || process.env.GITHUB_HEAD_REF || process.env.GITHUB_REF_NAME || (gitBranch && gitBranch !== "HEAD" ? gitBranch : "");
550
+ }
540
551
  async function driftFix(id) {
541
552
  if (!id) die("npx plures drift fix <case id> [--app <app>]");
542
553
  const cl = client();
@@ -552,6 +563,8 @@ async function driftFix(id) {
552
563
  } catch (e) {
553
564
  return fail(e instanceof PluresError ? e.message : String(e));
554
565
  }
566
+ const est = await cl.maps.estimate(app, "drift", { case: id }).catch(() => null);
567
+ if (est?.blocked) return fail(est.blocked);
555
568
  if (!hasClaude()) return fail("Claude Code isn't installed here, so nothing could read the code.");
556
569
  const git = (...a) => spawnSync("git", a, { encoding: "utf8" });
557
570
  if (git("status", "--porcelain").stdout.trim()) return fail("This repo has changes that aren't committed. Commit or stash them first.");
@@ -559,7 +572,7 @@ async function driftFix(id) {
559
572
  const ownClaude = Boolean(process.env.ANTHROPIC_API_KEY || process.env.CLAUDE_CODE_OAUTH_TOKEN || process.env.ANTHROPIC_AUTH_TOKEN);
560
573
  if (!ownClaude && process.env.CI) {
561
574
  try {
562
- const run = await cl.maps.startRun(app);
575
+ const run = await cl.maps.startRun(app, { purpose: "drift", case: id });
563
576
  childEnv.ANTHROPIC_BASE_URL = run.base_url;
564
577
  childEnv.ANTHROPIC_API_KEY = run.token;
565
578
  } catch (e) {
package/dist/index.cjs CHANGED
@@ -26,7 +26,7 @@ __export(index_exports, {
26
26
  default: () => index_default
27
27
  });
28
28
  module.exports = __toCommonJS(index_exports);
29
- var VERSION = "1.18.0";
29
+ var VERSION = "1.21.0";
30
30
  var PluresError = class extends Error {
31
31
  constructor(message, status, type) {
32
32
  super(message);
@@ -134,8 +134,12 @@ var Plures = class {
134
134
  createKey: (app, opts = {}) => this.req("POST", `/api/v1/apps/${encodeURIComponent(app)}/map_keys`, opts),
135
135
  keys: (app) => this.req("GET", `/api/v1/apps/${encodeURIComponent(app)}/map_keys`),
136
136
  revokeKey: (app, id) => this.req("DELETE", `/api/v1/apps/${encodeURIComponent(app)}/map_keys/${encodeURIComponent(id)}`),
137
+ /** What the next map or drift fix will cost before it starts. A map: the Plures engine fee, per step of the app's map
138
+ * (the first map of each app is free), and Claude at cost if Plures runs it. A drift fix: paid by outcome,
139
+ * drift_fix.per_point_cents for each quality point it wins back, at most drift_fix.max_cents, Claude included. blocked says why it can't start. */
140
+ estimate: (app, kind = "map", opts = {}) => this.req("GET", `/api/v1/apps/${encodeURIComponent(app)}/map_estimate?for=${kind}${opts.case ? `&case=${encodeURIComponent(opts.case)}` : ""}`),
137
141
  /** Starts a map run where Plures runs Claude (CI with no Anthropic key). npx plures map does this. */
138
- startRun: (app) => this.req("POST", `/api/v1/apps/${encodeURIComponent(app)}/map_runs`, {}),
142
+ startRun: (app, opts = {}) => this.req("POST", `/api/v1/apps/${encodeURIComponent(app)}/map_runs`, opts),
139
143
  runs: (app) => this.req("GET", `/api/v1/apps/${encodeURIComponent(app)}/map_runs`),
140
144
  /** While mapping, which files the coding agent is reading, shown live on the map page. File names only. npx plures map does this. */
141
145
  progress: (app, p) => this.req("POST", `/api/v1/apps/${encodeURIComponent(app)}/map/progress`, p),
package/dist/index.d.cts CHANGED
@@ -1,3 +1,29 @@
1
+ type MapEstimate = {
2
+ object: "map_estimate";
3
+ app: string;
4
+ for: "map" | "drift";
5
+ engine_fee: {
6
+ steps: number | null;
7
+ cents: number | null;
8
+ free: boolean;
9
+ per_step_cents: number;
10
+ basis: string;
11
+ };
12
+ claude_cents_if_plures_runs: number | null;
13
+ /** For a drift fix: paid by outcome, per_point_cents for each quality point won back, at most max_cents. Claude included. */
14
+ drift_fix?: {
15
+ steps: number | null;
16
+ per_point_cents: number;
17
+ lost_points: number | null;
18
+ max_cents: number;
19
+ min_point_cents: number;
20
+ max_point_cents: number;
21
+ cap_cents: number;
22
+ outcome: true;
23
+ free_under_guarantee: boolean;
24
+ };
25
+ blocked: string | null;
26
+ };
1
27
  type Option = {
2
28
  id: string;
3
29
  label: string;
@@ -480,7 +506,7 @@ type WebhookEvent = {
480
506
  created_at: string;
481
507
  data: Task;
482
508
  };
483
- declare const VERSION = "1.18.0";
509
+ declare const VERSION = "1.21.0";
484
510
  type GitHubLink = {
485
511
  object: "github_link";
486
512
  app: string;
@@ -617,12 +643,22 @@ declare class Plures {
617
643
  id: string;
618
644
  deleted: true;
619
645
  }>;
646
+ /** What the next map or drift fix will cost before it starts. A map: the Plures engine fee, per step of the app's map
647
+ * (the first map of each app is free), and Claude at cost if Plures runs it. A drift fix: paid by outcome,
648
+ * drift_fix.per_point_cents for each quality point it wins back, at most drift_fix.max_cents, Claude included. blocked says why it can't start. */
649
+ estimate: (app: string, kind?: "map" | "drift", opts?: {
650
+ case?: string;
651
+ }) => Promise<MapEstimate>;
620
652
  /** Starts a map run where Plures runs Claude (CI with no Anthropic key). npx plures map does this. */
621
- startRun: (app: string) => Promise<{
653
+ startRun: (app: string, opts?: {
654
+ purpose?: "map" | "drift";
655
+ case?: string;
656
+ }) => Promise<{
622
657
  object: "map_run";
623
658
  id: string;
624
659
  app: string;
625
660
  free: boolean;
661
+ purpose: "map" | "drift";
626
662
  max_cents: number;
627
663
  token: string;
628
664
  base_url: string;
@@ -898,4 +934,4 @@ declare class Plures {
898
934
  static verifyWebhook(rawBody: string, signatureHeader: string | null, secret: string, toleranceSec?: number): Promise<WebhookEvent>;
899
935
  }
900
936
 
901
- export { type AgentMap, type App, type Balance, type CheckOverrides, type CheckResult, type Consensus, type CreateTask, type DriftCase, type DriftDiagnosis, type Escalation, type GitHubLink, type MapChanges, type MapCheckpoint, type MapDraft, type MapKey, type MapNode, type Mix, type Option, Plures, PluresError, type Release, type Result, type Route, type Routing, type RoutingRule, type RoutingUpdate, type Rubric, type RubricParams, type Sample, type StoredAgentMap, type Task, type TaskStatus, type TeamTally, type TeamVote, type TestMix, type TurnParams, VERSION, type WebhookEvent, Plures as default };
937
+ export { type AgentMap, type App, type Balance, type CheckOverrides, type CheckResult, type Consensus, type CreateTask, type DriftCase, type DriftDiagnosis, type Escalation, type GitHubLink, type MapChanges, type MapCheckpoint, type MapDraft, type MapEstimate, type MapKey, type MapNode, type Mix, type Option, Plures, PluresError, type Release, type Result, type Route, type Routing, type RoutingRule, type RoutingUpdate, type Rubric, type RubricParams, type Sample, type StoredAgentMap, type Task, type TaskStatus, type TeamTally, type TeamVote, type TestMix, type TurnParams, VERSION, type WebhookEvent, Plures as default };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,29 @@
1
+ type MapEstimate = {
2
+ object: "map_estimate";
3
+ app: string;
4
+ for: "map" | "drift";
5
+ engine_fee: {
6
+ steps: number | null;
7
+ cents: number | null;
8
+ free: boolean;
9
+ per_step_cents: number;
10
+ basis: string;
11
+ };
12
+ claude_cents_if_plures_runs: number | null;
13
+ /** For a drift fix: paid by outcome, per_point_cents for each quality point won back, at most max_cents. Claude included. */
14
+ drift_fix?: {
15
+ steps: number | null;
16
+ per_point_cents: number;
17
+ lost_points: number | null;
18
+ max_cents: number;
19
+ min_point_cents: number;
20
+ max_point_cents: number;
21
+ cap_cents: number;
22
+ outcome: true;
23
+ free_under_guarantee: boolean;
24
+ };
25
+ blocked: string | null;
26
+ };
1
27
  type Option = {
2
28
  id: string;
3
29
  label: string;
@@ -480,7 +506,7 @@ type WebhookEvent = {
480
506
  created_at: string;
481
507
  data: Task;
482
508
  };
483
- declare const VERSION = "1.18.0";
509
+ declare const VERSION = "1.21.0";
484
510
  type GitHubLink = {
485
511
  object: "github_link";
486
512
  app: string;
@@ -617,12 +643,22 @@ declare class Plures {
617
643
  id: string;
618
644
  deleted: true;
619
645
  }>;
646
+ /** What the next map or drift fix will cost before it starts. A map: the Plures engine fee, per step of the app's map
647
+ * (the first map of each app is free), and Claude at cost if Plures runs it. A drift fix: paid by outcome,
648
+ * drift_fix.per_point_cents for each quality point it wins back, at most drift_fix.max_cents, Claude included. blocked says why it can't start. */
649
+ estimate: (app: string, kind?: "map" | "drift", opts?: {
650
+ case?: string;
651
+ }) => Promise<MapEstimate>;
620
652
  /** Starts a map run where Plures runs Claude (CI with no Anthropic key). npx plures map does this. */
621
- startRun: (app: string) => Promise<{
653
+ startRun: (app: string, opts?: {
654
+ purpose?: "map" | "drift";
655
+ case?: string;
656
+ }) => Promise<{
622
657
  object: "map_run";
623
658
  id: string;
624
659
  app: string;
625
660
  free: boolean;
661
+ purpose: "map" | "drift";
626
662
  max_cents: number;
627
663
  token: string;
628
664
  base_url: string;
@@ -898,4 +934,4 @@ declare class Plures {
898
934
  static verifyWebhook(rawBody: string, signatureHeader: string | null, secret: string, toleranceSec?: number): Promise<WebhookEvent>;
899
935
  }
900
936
 
901
- export { type AgentMap, type App, type Balance, type CheckOverrides, type CheckResult, type Consensus, type CreateTask, type DriftCase, type DriftDiagnosis, type Escalation, type GitHubLink, type MapChanges, type MapCheckpoint, type MapDraft, type MapKey, type MapNode, type Mix, type Option, Plures, PluresError, type Release, type Result, type Route, type Routing, type RoutingRule, type RoutingUpdate, type Rubric, type RubricParams, type Sample, type StoredAgentMap, type Task, type TaskStatus, type TeamTally, type TeamVote, type TestMix, type TurnParams, VERSION, type WebhookEvent, Plures as default };
937
+ export { type AgentMap, type App, type Balance, type CheckOverrides, type CheckResult, type Consensus, type CreateTask, type DriftCase, type DriftDiagnosis, type Escalation, type GitHubLink, type MapChanges, type MapCheckpoint, type MapDraft, type MapEstimate, type MapKey, type MapNode, type Mix, type Option, Plures, PluresError, type Release, type Result, type Route, type Routing, type RoutingRule, type RoutingUpdate, type Rubric, type RubricParams, type Sample, type StoredAgentMap, type Task, type TaskStatus, type TeamTally, type TeamVote, type TestMix, type TurnParams, VERSION, type WebhookEvent, Plures as default };
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  PluresError,
4
4
  VERSION,
5
5
  index_default
6
- } from "./chunk-RKIJTDS3.js";
6
+ } from "./chunk-Z3YGRA2U.js";
7
7
  export {
8
8
  Plures,
9
9
  PluresError,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plures",
3
- "version": "1.18.0",
3
+ "version": "1.21.0",
4
4
  "description": "Human judgment as an API for AI agents. Send a decision to ID verified people and get their consensus back.",
5
5
  "keywords": [
6
6
  "human-in-the-loop",