plures 1.1.0 → 1.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.
package/README.md CHANGED
@@ -44,7 +44,7 @@ if (event.type === "task.completed" && event.data.result?.agreement === 1) {
44
44
 
45
45
  ## API
46
46
 
47
- - `plures.tasks.create(params, { idempotencyKey? })`: send a task. Params: `question`, `options` (2 to 8, strings or `{ id, label }`), `context`, `image_url`, `instructions`, `verifiers` (1, 3, 5, 7 or 9), `max_verifiers`, `presence_check` (default true), `webhook_url`, `metadata`, `expires_in`.
47
+ - `plures.tasks.create(params, { idempotencyKey? })`: send a task. Params: `question`, `options` (2 to 8, strings or `{ id, label }`), `context`, `image_url`, `audio_url` or `video_url` with `media_seconds` (a clip up to 180 seconds that people play through before answering), `sensitive`, `instructions`, `verifiers` (1, 3, 5, 7 or 9), `max_verifiers`, `presence_check` (default true), `webhook_url`, `metadata`, `expires_in`.
48
48
  - `plures.tasks.retrieve(id)`, `plures.tasks.list({ status?, limit?, starting_after? })`, `plures.tasks.cancel(id)`
49
49
  - `plures.tasks.waitFor(id, { timeoutMs?, intervalMs? })`: poll until settled
50
50
  - `plures.verify(params, { timeoutMs?, idempotencyKey? })`: create and wait
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.1.0";
29
+ var VERSION = "1.2.0";
30
30
  var PluresError = class extends Error {
31
31
  constructor(message, status, type) {
32
32
  super(message);
package/dist/index.d.cts CHANGED
@@ -32,12 +32,21 @@ type Task = {
32
32
  context: string | null;
33
33
  image_url: string | null;
34
34
  instructions: string | null;
35
+ audio_url?: string | null;
36
+ video_url?: string | null;
37
+ media_seconds?: number | null;
38
+ sensitive?: boolean;
35
39
  options: Option[];
36
40
  verifiers: number;
37
41
  presence_check?: boolean;
38
42
  result: Result | null;
39
43
  escalation?: Escalation | null;
40
44
  metadata: Record<string, unknown>;
45
+ /** Where this decision sits on the Plures ledger, once recorded. */
46
+ ledger?: {
47
+ seq: number;
48
+ url: string;
49
+ } | null;
41
50
  webhook_url: string | null;
42
51
  created_at: string;
43
52
  completed_at: string | null;
@@ -48,6 +57,14 @@ type CreateTask = {
48
57
  options: (string | Option)[];
49
58
  context?: string;
50
59
  image_url?: string;
60
+ /** A recording people play through before answering, up to 3 minutes. Needs media_seconds. */
61
+ audio_url?: string;
62
+ /** A video people play through before answering, up to 3 minutes. Needs media_seconds. Not with audio_url. */
63
+ video_url?: string;
64
+ /** The clip's length in seconds, 1 to 180. Required with audio_url or video_url; pay scales with it. */
65
+ media_seconds?: number;
66
+ /** Disturbing content: only verifiers who opted in get it, behind a warning. Default false. */
67
+ sensitive?: boolean;
51
68
  instructions?: string;
52
69
  verifiers?: 1 | 3 | 5 | 7 | 9;
53
70
  max_verifiers?: number;
@@ -67,7 +84,7 @@ type WebhookEvent = {
67
84
  created_at: string;
68
85
  data: Task;
69
86
  };
70
- declare const VERSION = "1.1.0";
87
+ declare const VERSION = "1.2.0";
71
88
  declare class PluresError extends Error {
72
89
  readonly status: number;
73
90
  readonly type: string;
package/dist/index.d.ts CHANGED
@@ -32,12 +32,21 @@ type Task = {
32
32
  context: string | null;
33
33
  image_url: string | null;
34
34
  instructions: string | null;
35
+ audio_url?: string | null;
36
+ video_url?: string | null;
37
+ media_seconds?: number | null;
38
+ sensitive?: boolean;
35
39
  options: Option[];
36
40
  verifiers: number;
37
41
  presence_check?: boolean;
38
42
  result: Result | null;
39
43
  escalation?: Escalation | null;
40
44
  metadata: Record<string, unknown>;
45
+ /** Where this decision sits on the Plures ledger, once recorded. */
46
+ ledger?: {
47
+ seq: number;
48
+ url: string;
49
+ } | null;
41
50
  webhook_url: string | null;
42
51
  created_at: string;
43
52
  completed_at: string | null;
@@ -48,6 +57,14 @@ type CreateTask = {
48
57
  options: (string | Option)[];
49
58
  context?: string;
50
59
  image_url?: string;
60
+ /** A recording people play through before answering, up to 3 minutes. Needs media_seconds. */
61
+ audio_url?: string;
62
+ /** A video people play through before answering, up to 3 minutes. Needs media_seconds. Not with audio_url. */
63
+ video_url?: string;
64
+ /** The clip's length in seconds, 1 to 180. Required with audio_url or video_url; pay scales with it. */
65
+ media_seconds?: number;
66
+ /** Disturbing content: only verifiers who opted in get it, behind a warning. Default false. */
67
+ sensitive?: boolean;
51
68
  instructions?: string;
52
69
  verifiers?: 1 | 3 | 5 | 7 | 9;
53
70
  max_verifiers?: number;
@@ -67,7 +84,7 @@ type WebhookEvent = {
67
84
  created_at: string;
68
85
  data: Task;
69
86
  };
70
- declare const VERSION = "1.1.0";
87
+ declare const VERSION = "1.2.0";
71
88
  declare class PluresError extends Error {
72
89
  readonly status: number;
73
90
  readonly type: string;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/index.ts
2
- var VERSION = "1.1.0";
2
+ var VERSION = "1.2.0";
3
3
  var PluresError = class extends Error {
4
4
  constructor(message, status, type) {
5
5
  super(message);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plures",
3
- "version": "1.1.0",
3
+ "version": "1.2.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",