arcmira 0.4.2 → 0.5.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.
Files changed (84) hide show
  1. package/README.md +14 -14
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/api/resources/me/client/Client.d.ts +1 -1
  4. package/dist/cjs/api/resources/me/client/Client.js +1 -1
  5. package/dist/cjs/api/resources/monitors/client/Client.d.ts +1 -1
  6. package/dist/cjs/api/resources/monitors/client/Client.js +1 -1
  7. package/dist/cjs/api/resources/monitors/client/requests/CreateMonitorsRequest.d.ts +0 -2
  8. package/dist/cjs/api/resources/monitors/resources/entities/client/Client.d.ts +1 -1
  9. package/dist/cjs/api/resources/monitors/resources/entities/client/Client.js +1 -1
  10. package/dist/cjs/api/resources/monitors/resources/entities/client/requests/AddEntitiesRequest.d.ts +1 -1
  11. package/dist/cjs/api/resources/monitors/resources/trackers/client/Client.d.ts +1 -1
  12. package/dist/cjs/api/resources/monitors/resources/trackers/client/Client.js +1 -1
  13. package/dist/cjs/api/resources/monitors/resources/trackers/client/requests/AddTrackersRequest.d.ts +1 -1
  14. package/dist/cjs/api/resources/trackers/client/Client.d.ts +2 -27
  15. package/dist/cjs/api/resources/trackers/client/Client.js +2 -78
  16. package/dist/cjs/api/resources/trackers/client/requests/UpdateTrackersRequest.d.ts +0 -12
  17. package/dist/cjs/api/resources/trackers/client/requests/index.d.ts +0 -1
  18. package/dist/cjs/api/resources/trackers/client/requests/index.js +1 -3
  19. package/dist/cjs/api/resources/transcripts/client/Client.d.ts +1 -1
  20. package/dist/cjs/api/resources/transcripts/client/Client.js +1 -1
  21. package/dist/cjs/api/types/Alert.d.ts +4 -4
  22. package/dist/cjs/api/types/ChannelSponsorsResponse.d.ts +0 -6
  23. package/dist/cjs/api/types/EntityMomentumResponse.d.ts +0 -6
  24. package/dist/cjs/api/types/Error_.d.ts +0 -6
  25. package/dist/cjs/api/types/MeResponse.d.ts +39 -9
  26. package/dist/cjs/api/types/MeResponse.js +14 -0
  27. package/dist/cjs/api/types/Monitor.d.ts +8 -24
  28. package/dist/cjs/api/types/Monitor.js +2 -4
  29. package/dist/cjs/api/types/MonitorListResponse.d.ts +1 -1
  30. package/dist/cjs/api/types/SignupVerifiedResponse.d.ts +1 -1
  31. package/dist/cjs/api/types/Tracker.d.ts +2 -14
  32. package/dist/cjs/api/types/TranscriptQuote.d.ts +1 -1
  33. package/dist/cjs/api/types/TranscriptResponse.d.ts +1 -7
  34. package/dist/cjs/api/types/TranscriptSearchChunk.d.ts +1 -1
  35. package/dist/cjs/api/types/TranscriptSearchResponse.d.ts +0 -6
  36. package/dist/cjs/version.d.ts +1 -1
  37. package/dist/cjs/version.js +1 -1
  38. package/dist/cli/main.js +39 -34
  39. package/dist/cli/operations.js +4 -5
  40. package/dist/esm/BaseClient.mjs +2 -2
  41. package/dist/esm/api/resources/me/client/Client.d.mts +1 -1
  42. package/dist/esm/api/resources/me/client/Client.mjs +1 -1
  43. package/dist/esm/api/resources/monitors/client/Client.d.mts +1 -1
  44. package/dist/esm/api/resources/monitors/client/Client.mjs +1 -1
  45. package/dist/esm/api/resources/monitors/client/requests/CreateMonitorsRequest.d.mts +0 -2
  46. package/dist/esm/api/resources/monitors/resources/entities/client/Client.d.mts +1 -1
  47. package/dist/esm/api/resources/monitors/resources/entities/client/Client.mjs +1 -1
  48. package/dist/esm/api/resources/monitors/resources/entities/client/requests/AddEntitiesRequest.d.mts +1 -1
  49. package/dist/esm/api/resources/monitors/resources/trackers/client/Client.d.mts +1 -1
  50. package/dist/esm/api/resources/monitors/resources/trackers/client/Client.mjs +1 -1
  51. package/dist/esm/api/resources/monitors/resources/trackers/client/requests/AddTrackersRequest.d.mts +1 -1
  52. package/dist/esm/api/resources/trackers/client/Client.d.mts +2 -27
  53. package/dist/esm/api/resources/trackers/client/Client.mjs +2 -78
  54. package/dist/esm/api/resources/trackers/client/requests/UpdateTrackersRequest.d.mts +0 -12
  55. package/dist/esm/api/resources/trackers/client/requests/index.d.mts +0 -1
  56. package/dist/esm/api/resources/trackers/client/requests/index.mjs +0 -1
  57. package/dist/esm/api/resources/transcripts/client/Client.d.mts +1 -1
  58. package/dist/esm/api/resources/transcripts/client/Client.mjs +1 -1
  59. package/dist/esm/api/types/Alert.d.mts +4 -4
  60. package/dist/esm/api/types/ChannelSponsorsResponse.d.mts +0 -6
  61. package/dist/esm/api/types/EntityMomentumResponse.d.mts +0 -6
  62. package/dist/esm/api/types/Error_.d.mts +0 -6
  63. package/dist/esm/api/types/MeResponse.d.mts +39 -9
  64. package/dist/esm/api/types/MeResponse.mjs +14 -0
  65. package/dist/esm/api/types/Monitor.d.mts +8 -24
  66. package/dist/esm/api/types/Monitor.mjs +2 -4
  67. package/dist/esm/api/types/MonitorListResponse.d.mts +1 -1
  68. package/dist/esm/api/types/SignupVerifiedResponse.d.mts +1 -1
  69. package/dist/esm/api/types/Tracker.d.mts +2 -14
  70. package/dist/esm/api/types/TranscriptQuote.d.mts +1 -1
  71. package/dist/esm/api/types/TranscriptResponse.d.mts +1 -7
  72. package/dist/esm/api/types/TranscriptSearchChunk.d.mts +1 -1
  73. package/dist/esm/api/types/TranscriptSearchResponse.d.mts +0 -6
  74. package/dist/esm/version.d.mts +1 -1
  75. package/dist/esm/version.mjs +1 -1
  76. package/llms.txt +3 -3
  77. package/package.json +9 -3
  78. package/reference.md +7 -35
  79. package/skills/arcmira/SKILL.md +2 -2
  80. package/skills/company-watch/SKILL.md +1 -1
  81. package/dist/cjs/api/resources/trackers/client/requests/CreateTrackersRequest.d.ts +0 -53
  82. package/dist/cjs/api/resources/trackers/client/requests/CreateTrackersRequest.js +0 -22
  83. package/dist/esm/api/resources/trackers/client/requests/CreateTrackersRequest.d.mts +0 -53
  84. package/dist/esm/api/resources/trackers/client/requests/CreateTrackersRequest.mjs +0 -19
@@ -17,13 +17,13 @@ export interface Monitor {
17
17
  digest_time?: string | undefined;
18
18
  /** True when webhook delivery is enabled. */
19
19
  notify_webhook: boolean;
20
- /** Webhook destination URL. Null when no webhook is configured. Absent when access is member: only the team owner sees the webhook. */
20
+ /** Webhook destination URL. Null when no webhook is configured. */
21
21
  webhook_url?: (string | null) | undefined;
22
- /** True when a webhook signing secret exists for this monitor. The secret itself is never returned on reads; enablement and rotation responses support recovery with the original Idempotency-Key during the valid recovery window. Absent when access is member. */
22
+ /** True when a webhook signing secret exists for this monitor. The secret itself is never returned on reads; enablement and rotation responses support recovery with the original Idempotency-Key during the valid recovery window. */
23
23
  webhook_secret_set?: boolean | undefined;
24
- /** Last 4 characters of the current signing secret, for identifying which secret you hold. Null until a secret exists. Absent when access is member. */
24
+ /** Last 4 characters of the current signing secret, for identifying which secret you hold. Null until a secret exists. */
25
25
  webhook_secret_hint?: (string | null) | undefined;
26
- /** Consecutive webhook delivery failures recorded for this monitor. Reset by a secret rotation or PATCHing notify_webhook: true; 10 consecutive failures auto-disable a webhook. Note: the delivery pipeline currently accrues failures on the tracker that fired, so this monitor-level counter can lag. */
26
+ /** Consecutive webhook delivery failures recorded for this monitor. Reset by a secret rotation or PATCHing notify_webhook: true; 10 consecutive failures auto-disable a webhook. */
27
27
  webhook_failures?: number | undefined;
28
28
  /** When the webhook was auto-disabled after repeated failures. Null while delivery is enabled. Re-enable by PATCHing notify_webhook: true; rotation alone never re-enables. */
29
29
  webhook_disabled_at: string | null;
@@ -39,35 +39,29 @@ export interface Monitor {
39
39
  created_at: string;
40
40
  /** When the monitor was last updated. */
41
41
  updated_at: string;
42
- /** The team the monitor is shared with. Null for a personal monitor. */
43
- team: Monitor.Team | null;
44
- /** account: the caller pays for the monitor, as its personal owner or the team owner. member: the caller is another member of its team, who may edit it but not its webhook, and may not delete it. */
42
+ /** account: the caller owns the account the monitor belongs to, or is an admin in it. member: the caller is a member of that team account, who may edit the monitor and its webhook but may not delete it. */
45
43
  access: Monitor.Access;
46
- /** True when the caller muted this team monitor for themselves. Always false on a personal monitor. */
47
- muted: boolean;
48
44
  }
49
45
  export declare namespace Monitor {
50
46
  type EmailRecipients = EmailRecipients.Item[];
51
47
  namespace EmailRecipients {
52
48
  interface Item {
53
49
  email: string;
54
- /** owner: the paying account. member: a member of the monitor's team, who receives its alerts without an invitation and does not count toward the recipient limits. external: anyone else, who must confirm first. */
50
+ /** owner: the address of the account the monitor belongs to. member: a teammate in that account. external: anyone else, who must confirm first. */
55
51
  role: Item.Role;
56
52
  /** The Arcmira user behind an owner or member address. Null for external recipients. */
57
53
  user_id: string | null;
58
- /** muted: a team member muted this monitor for themselves. */
59
54
  status: Item.Status;
60
55
  invitation_status?: Item.InvitationStatus | undefined;
61
56
  }
62
57
  namespace Item {
63
- /** owner: the paying account. member: a member of the monitor's team, who receives its alerts without an invitation and does not count toward the recipient limits. external: anyone else, who must confirm first. */
58
+ /** owner: the address of the account the monitor belongs to. member: a teammate in that account. external: anyone else, who must confirm first. */
64
59
  const Role: {
65
60
  readonly Owner: "owner";
66
61
  readonly Member: "member";
67
62
  readonly External: "external";
68
63
  };
69
64
  type Role = (typeof Role)[keyof typeof Role];
70
- /** muted: a team member muted this monitor for themselves. */
71
65
  const Status: {
72
66
  readonly Active: "active";
73
67
  readonly Pending: "pending";
@@ -76,7 +70,6 @@ export declare namespace Monitor {
76
70
  readonly Removed: "removed";
77
71
  readonly OwnerUnverified: "owner_unverified";
78
72
  readonly PlanLimited: "plan_limited";
79
- readonly Muted: "muted";
80
73
  };
81
74
  type Status = (typeof Status)[keyof typeof Status];
82
75
  const InvitationStatus: {
@@ -88,16 +81,7 @@ export declare namespace Monitor {
88
81
  type InvitationStatus = (typeof InvitationStatus)[keyof typeof InvitationStatus];
89
82
  }
90
83
  }
91
- /**
92
- * The team the monitor is shared with. Null for a personal monitor.
93
- */
94
- interface Team {
95
- /** Team id. */
96
- id: string;
97
- /** Team name. */
98
- name: string;
99
- }
100
- /** account: the caller pays for the monitor, as its personal owner or the team owner. member: the caller is another member of its team, who may edit it but not its webhook, and may not delete it. */
84
+ /** account: the caller owns the account the monitor belongs to, or is an admin in it. member: the caller is a member of that team account, who may edit the monitor and its webhook but may not delete it. */
101
85
  const Access: {
102
86
  readonly Account: "account";
103
87
  readonly Member: "member";
@@ -8,13 +8,12 @@ var Monitor;
8
8
  (function (EmailRecipients) {
9
9
  let Item;
10
10
  (function (Item) {
11
- /** owner: the paying account. member: a member of the monitor's team, who receives its alerts without an invitation and does not count toward the recipient limits. external: anyone else, who must confirm first. */
11
+ /** owner: the address of the account the monitor belongs to. member: a teammate in that account. external: anyone else, who must confirm first. */
12
12
  Item.Role = {
13
13
  Owner: "owner",
14
14
  Member: "member",
15
15
  External: "external",
16
16
  };
17
- /** muted: a team member muted this monitor for themselves. */
18
17
  Item.Status = {
19
18
  Active: "active",
20
19
  Pending: "pending",
@@ -23,7 +22,6 @@ var Monitor;
23
22
  Removed: "removed",
24
23
  OwnerUnverified: "owner_unverified",
25
24
  PlanLimited: "plan_limited",
26
- Muted: "muted",
27
25
  };
28
26
  Item.InvitationStatus = {
29
27
  Sent: "sent",
@@ -33,7 +31,7 @@ var Monitor;
33
31
  };
34
32
  })(Item = EmailRecipients.Item || (EmailRecipients.Item = {}));
35
33
  })(EmailRecipients = Monitor.EmailRecipients || (Monitor.EmailRecipients = {}));
36
- /** account: the caller pays for the monitor, as its personal owner or the team owner. member: the caller is another member of its team, who may edit it but not its webhook, and may not delete it. */
34
+ /** account: the caller owns the account the monitor belongs to, or is an admin in it. member: the caller is a member of that team account, who may edit the monitor and its webhook but may not delete it. */
37
35
  Monitor.Access = {
38
36
  Account: "account",
39
37
  Member: "member",
@@ -1,6 +1,6 @@
1
1
  import type * as Arcmira from "../index.js";
2
2
  export interface MonitorListResponse {
3
- /** The account's personal monitors and the monitors of every team it belongs to, ordered by dashboard sort position, then name. */
3
+ /** The monitors of the account the caller acts in, ordered by dashboard sort position, then name. */
4
4
  monitors: MonitorListResponse.Monitors.Item[];
5
5
  }
6
6
  export declare namespace MonitorListResponse {
@@ -9,7 +9,7 @@ export interface SignupVerifiedResponse {
9
9
  scopes: string[];
10
10
  /** The plan the account is on: free for a new account, its plan when the address already had one. */
11
11
  tier: string;
12
- /** On a paid plan, its monthly allowance in rows; a row is 4 credits. On the free plan, the account's row allotment from before credits (1,000 for a new account). The free plan uses 1,000 credits a month, read from usage.credits on GET /v1/me. */
12
+ /** Plan credits a month, in rows (a row is 4 credits), on a paid plan. On the free plan, the account's allotment from before credits (1,000 for a new account). The free plan has 1,000 credits a month; read the balance from usage.credits on GET /v1/me. */
13
13
  rows_allotted: number;
14
14
  /** A curl command for the first call: GET /v1/me with the key. */
15
15
  next: string;
@@ -7,18 +7,6 @@ export interface Tracker {
7
7
  entity_type: string;
8
8
  /** User-facing display name. Falls back to entity_name when not customized. */
9
9
  display_name: string;
10
- /** True when this tracker delivers by email (default true at creation). */
11
- notify_email: boolean;
12
- /** True when this tracker has a per-tracker webhook override enabled. */
13
- notify_webhook: boolean;
14
- /** True when this tracker has a per-tracker Slack override enabled. */
15
- notify_slack: boolean;
16
- /** Per-tracker webhook destination override. Null when the tracker uses its monitor's delivery settings. Absent when the tracker is in a team monitor the caller does not own. */
17
- webhook_url?: (string | null) | undefined;
18
- /** Per-tracker Slack channel override. Null when not set. */
19
- slack_channel_id: string | null;
20
- /** Per-tracker Slack integration override. Null when not set. */
21
- slack_integration_id: string | null;
22
10
  /** Optional matching filters as submitted. Null when none were set. */
23
11
  filters: Record<string, unknown> | null;
24
12
  /** True when the tracker is paused. */
@@ -31,8 +19,8 @@ export interface Tracker {
31
19
  created_at: string;
32
20
  /** When the tracker was last updated. */
33
21
  updated_at: string | null;
34
- /** The monitor this tracker belongs to. Absent for standalone trackers. */
35
- monitor_id?: string | undefined;
22
+ /** The monitor this tracker wakes, whose delivery its alerts use. Every tracker is in exactly one monitor. */
23
+ monitor_id: string;
36
24
  /** Email deliveries in the current billing period. */
37
25
  email_delivery_count: number;
38
26
  /** Webhook deliveries in the current billing period. */
@@ -1,6 +1,6 @@
1
1
  export interface TranscriptQuote {
2
2
  /** Number of 15-minute blocks in the video, ceiling'd, minimum 1. */
3
3
  quarters: number;
4
- /** Rows the whole video uses, 75 rows per 15-minute block. A row is 4 credits, so Premium uses 300 credits per block. */
4
+ /** Credits the whole video uses, in rows: 300 credits per 15-minute block (75 rows; a row is 4 credits). */
5
5
  rows: number;
6
6
  }
@@ -19,7 +19,7 @@ export interface TranscriptResponse {
19
19
  revision?: string | undefined;
20
20
  /** Echoed when you sent start and end. Lines overlapping the window are returned. On captions only the window is billed. An explicit Premium read is charged for the whole video, from the account's plan credits and then its on-demand budget; the window only trims the returned content. */
21
21
  range?: TranscriptResponse.Range | undefined;
22
- /** Rows this captions read used: 1 row per started 15 minutes, and a row is 4 credits. 0 on a repeat of the same video, quality, language, and range inside the 7 day dedupe window. Premium reads report 0, because the Premium transcript job carries their charge. */
22
+ /** Credits this captions read used, in rows (a row is 4 credits): 4 credits per started 15 minutes. 0 on a repeat of the same video, quality, language, and range inside the 7 day dedupe window. Premium reads report 0, because the Premium transcript job carries their charge. */
23
23
  rows_billed: number;
24
24
  /** When the transcript was produced. */
25
25
  as_of: string | null;
@@ -174,12 +174,6 @@ export declare namespace TranscriptResponse {
174
174
  */
175
175
  interface Details {
176
176
  quote?: Arcmira.RefusedQuote | undefined;
177
- /** On tracker_already_exists, the existing tracker id. Reuse it instead of creating another tracker. */
178
- existing_id?: string | undefined;
179
- /** On tracker_limit, the trackers the plan holds. */
180
- limit?: number | undefined;
181
- /** On tracker_limit, the trackers the account holds now. */
182
- count?: number | undefined;
183
177
  }
184
178
  }
185
179
  }
@@ -24,7 +24,7 @@ export interface TranscriptSearchChunk {
24
24
  text: string;
25
25
  /** Offset of the slice in the video, in seconds. */
26
26
  start_seconds: number | null;
27
- /** Site-relative watch URL with the timestamp, e.g. /watch?v=...&t=4787. */
27
+ /** Absolute watch URL on arcmira.com with the timestamp, e.g. https://arcmira.com/watch?v=...&t=4787. */
28
28
  watch_url: string;
29
29
  /** A ready citation line: title, clock, channel, date. */
30
30
  cite_line?: (string | null) | undefined;
@@ -155,12 +155,6 @@ export declare namespace TranscriptSearchResponse {
155
155
  */
156
156
  interface Details {
157
157
  quote?: Arcmira.RefusedQuote | undefined;
158
- /** On tracker_already_exists, the existing tracker id. Reuse it instead of creating another tracker. */
159
- existing_id?: string | undefined;
160
- /** On tracker_limit, the trackers the plan holds. */
161
- limit?: number | undefined;
162
- /** On tracker_limit, the trackers the account holds now. */
163
- count?: number | undefined;
164
158
  }
165
159
  }
166
160
  /**
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.4.2";
1
+ export declare const SDK_VERSION = "0.5.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.4.2";
4
+ exports.SDK_VERSION = "0.5.0";
package/dist/cli/main.js CHANGED
@@ -27,6 +27,8 @@ const SKILLS = (0, node_fs_1.readdirSync)(SKILLS_DIR)
27
27
  .map((name) => ({ name, content: (0, node_fs_1.readFileSync)((0, node_path_1.join)(SKILLS_DIR, name, "SKILL.md"), "utf8") }));
28
28
  /** Exit codes past 0 ok, 1 API or network error and 2 usage error. A pipeline sees them even with --json. 3 is retired. */
29
29
  const EXIT_PENDING = 4;
30
+ /** The API prices reads in rows of 4 credits; people see credits. */
31
+ const CREDITS_PER_ROW = 4;
30
32
  const GLOBAL = {
31
33
  json: { type: "boolean", help: "Print the API response as JSON on stdout; errors as JSON on stderr." },
32
34
  key: { type: "string", help: "API key. Defaults to ARCMIRA_API_KEY, then the key saved by `arcmira login`." },
@@ -52,7 +54,7 @@ const ALIASES = { transcript: "transcripts get", follow: "trackers create" };
52
54
  /** Names held for later versions, each with the way to reach the same endpoints today. */
53
55
  const RESERVED = {
54
56
  feedback: "use `arcmira api POST /v1/feedback --body @feedback.json` (arcmira schema submit_feedback)",
55
- keys: "manage keys at https://arcmira.com/dashboard?tab=api-keys",
57
+ keys: "manage keys at https://arcmira.com/dashboard/api",
56
58
  };
57
59
  /** Commands earlier versions had, each with what replaces it. */
58
60
  const RETIRED = {
@@ -352,6 +354,9 @@ function printMonitor({ monitor: m, message }) {
352
354
  console.log(`webhook secret (shown once): ${m.webhook_secret}`);
353
355
  note(message);
354
356
  }
357
+ /** Whose plan and credits the key spends, and the caller's role there. */
358
+ const accountLine = ({ account, role }) => `account ${account.name ?? account.id} (${account.kind}, ${role})`;
359
+ const entityResultLine = (x) => `${x.entity_id ?? x.name} ${x.tracker_id ?? "-"} ${x.attached ? (x.created ? "followed" : "attached") : `not added: ${x.reason ?? "unknown"}${x.current_monitor_id ? ` (monitor ${x.current_monitor_id})` : ""}`}`;
355
360
  const trackerLine = (t) => `${t.id} ${t.entity_type.padEnd(12)} ${t.entity_name}${t.monitor_id ? ` monitor ${t.monitor_id}` : ""}${t.paused ? " paused" : ""}`;
356
361
  const limit = (max, help) => ({ limit: { type: "string", short: "n", int: [1, max], help } });
357
362
  const cursor = { cursor: { type: "string", help: "Page cursor from the previous page (printed on stderr, or next_cursor in --json)." } };
@@ -490,7 +495,12 @@ function usageLine(me) {
490
495
  const n = (x) => x.toLocaleString("en-US");
491
496
  const plan = c.plan.credits == null ? `${n(c.plan.used)} plan credits used` : `${n(c.plan.used)} of ${n(c.plan.credits)} plan credits used`;
492
497
  const onDemand = c.on_demand.enabled ? `, on-demand ${n(c.on_demand.used)}${c.on_demand.cap_credits == null ? "" : ` of ${n(c.on_demand.cap_credits)}`}` : ", on-demand off";
493
- return `${plan}${onDemand}${c.available == null ? "" : `, ${n(c.available)} available`}, resets ${day(c.plan.resets_at)}`;
498
+ const sources = [
499
+ c.plan.credits == null ? null : `${n(Math.max(c.plan.credits - c.plan.used, 0))} plan`,
500
+ c.granted ? `${n(c.granted)} granted` : null,
501
+ ].filter(Boolean);
502
+ const available = c.available == null ? "" : `, ${n(c.available)} available${sources.length > 1 ? ` (${sources.join(", ")})` : ""}`;
503
+ return `${plan}${onDemand}${available}, resets ${day(c.plan.resets_at)}`;
494
504
  }
495
505
  const COMMANDS = {
496
506
  search: {
@@ -639,9 +649,9 @@ const COMMANDS = {
639
649
  examples: ["arcmira sponsors UC-DRzaGnL_vtBUpCFH5M0tg", "arcmira sponsors UC-DRzaGnL_vtBUpCFH5M0tg --status active --limit 20"],
640
650
  positionals: "one",
641
651
  options: {
642
- "min-ad-reads": { type: "string", int: [1, 100], help: "Exclude sponsors with fewer ad reads. Default 3. Pro plans." },
643
- status: { type: "string", oneOf: ["active", "lapsed", "ended", "uncertain"], help: "Filter by curated sponsorship status. Pro plans." },
644
- ...limit(200, "Sponsors to return, 1 to 200. Pro plans past the free slice."),
652
+ "min-ad-reads": { type: "string", int: [1, 100], help: "Exclude sponsors with fewer ad reads. Default 3. Pro+." },
653
+ status: { type: "string", oneOf: ["active", "lapsed", "ended", "uncertain"], help: "Filter by curated sponsorship status. Pro+." },
654
+ ...limit(200, "Sponsors to return, 1 to 200. Pro+ past the free slice."),
645
655
  },
646
656
  run: ({ client, positionals: [channel_id], values: v }) => client.channels.sponsors.list({
647
657
  channel_id,
@@ -769,7 +779,7 @@ const COMMANDS = {
769
779
  console.log(`[${seconds(line.start)}] ${who(line.speaker)}${line.text}`);
770
780
  for (const p of r.paragraphs ?? [])
771
781
  console.log(`${who(p.speaker)}${p.text}\n`);
772
- note(`${r.video.title || r.video.id} ${r.quality} ${r.language} rows billed ${r.rows_billed}`);
782
+ note(`${r.video.title || r.video.id} ${r.quality} ${r.language} ${(r.rows_billed * CREDITS_PER_ROW).toLocaleString("en-US")} credits`);
773
783
  },
774
784
  },
775
785
  "transcripts quote": {
@@ -831,7 +841,7 @@ const COMMANDS = {
831
841
  status: {
832
842
  section: "data",
833
843
  operations: ["get_me", "get_channel_coverage"],
834
- summary: "Your key and plan, or what the index holds for a channel.",
844
+ summary: "Your account, key and plan, or what the index holds for a channel.",
835
845
  usage: "status [UC...]",
836
846
  examples: ["arcmira status", "arcmira status UC-DRzaGnL_vtBUpCFH5M0tg"],
837
847
  positionals: "optional",
@@ -844,44 +854,39 @@ const COMMANDS = {
844
854
  return note(r.note);
845
855
  }
846
856
  const me = r;
847
- console.log(`plan ${me.tier} ${usageLine(me)} scopes ${me.scopes.join(",")} key from ${keySource}`);
857
+ console.log(`${accountLine(me)} plan ${me.tier} ${usageLine(me)} scopes ${me.scopes.join(",")} key from ${keySource}`);
848
858
  },
849
859
  },
850
860
  "trackers create": {
851
861
  section: "follow",
852
- operations: ["create_tracker", "add_monitor_trackers"],
853
- summary: "Follow an exact name. Alerts fire when newly analyzed media mention it, even before Arcmira has indexed it.",
854
- usage: "trackers create <exact name|UC...> --type person|organization|org|product|topic|channel [--monitor ID] [--display-name TEXT] [--person-match-mode mentions|appearances|both]",
862
+ operations: ["add_monitor_entities"],
863
+ summary: "Follow an exact name in a monitor. Alerts fire when newly analyzed media mention it, even before Arcmira has indexed it.",
864
+ usage: "trackers create <exact name|UC...> --type person|organization|org|product|topic|channel --monitor ID [--person-match-mode mentions|appearances|both]",
855
865
  examples: [
856
- "arcmira follow Ramp --type org",
866
+ "arcmira follow Ramp --type org --monitor <monitor-id>",
857
867
  'arcmira follow "Sam Altman" --type person --person-match-mode both --monitor <monitor-id>',
858
- "arcmira trackers create UC-DRzaGnL_vtBUpCFH5M0tg --type channel",
868
+ "arcmira trackers create UC-DRzaGnL_vtBUpCFH5M0tg --type channel --monitor <monitor-id>",
859
869
  ],
860
870
  positionals: "text",
861
871
  options: {
862
872
  type: { type: "string", short: "t", oneOf: FOLLOW_TYPES, help: "What the name is: person, organization (or org), product, topic or channel. Required. A channel is followed by its YouTube channel id." },
863
- monitor: { type: "string", short: "m", help: "Attach the new tracker to this monitor, by the id arcmira monitors list prints." },
864
- "display-name": { type: "string", help: "Label for alerts. Defaults to the name." },
873
+ monitor: { type: "string", short: "m", help: "The monitor that follows the name and alerts on it, by the id arcmira monitors list prints. Required." },
865
874
  "person-match-mode": { type: "string", oneOf: PERSON_MATCH_MODES, help: "For a person: mentions (default), appearances (on air) or both." },
866
875
  },
867
- run: async ({ client, positionals, values: v }) => {
876
+ run: ({ client, positionals, values: v }) => {
868
877
  const type = str(v.type);
869
- const created = await client.trackers.create({
878
+ return client.monitors.entities.add({
870
879
  "Idempotency-Key": (0, node_crypto_1.randomUUID)(),
871
- entity_name: positionals.join(" "),
872
- entity_type: (type === "org" ? "organization" : type),
873
- display_name: str(v["display-name"]),
880
+ id: str(v.monitor),
881
+ names: [{ name: positionals.join(" "), type: (type === "org" ? "organization" : type) }],
874
882
  person_match_mode: str(v["person-match-mode"]),
875
883
  });
876
- const monitor = str(v.monitor);
877
- if (!monitor)
878
- return created;
879
- return { ...created, attached: await client.monitors.trackers.add({ "Idempotency-Key": (0, node_crypto_1.randomUUID)(), id: monitor, tracker_ids: [created.tracker.id] }) };
880
884
  },
881
885
  print: (r) => {
882
- console.log(trackerLine(r.tracker));
883
- note(r.attached ? `${r.message} Attached to monitor ${r.attached.monitor_id}.` : r.message);
886
+ for (const x of r.results)
887
+ console.log(entityResultLine(x));
884
888
  },
889
+ exitCode: (r) => (r.results.every((x) => x.attached) ? 0 : 1),
885
890
  },
886
891
  "trackers list": {
887
892
  section: "follow",
@@ -894,7 +899,7 @@ const COMMANDS = {
894
899
  run: ({ client }) => client.trackers.list(),
895
900
  print: (r) => {
896
901
  if (r.trackers.length === 0)
897
- return console.log("No trackers. Follow a name: arcmira follow Ramp --type org");
902
+ return console.log("No trackers. Follow a name in a monitor: arcmira follow Ramp --type org --monitor <monitor-id>");
898
903
  for (const t of r.trackers)
899
904
  console.log(trackerLine(t));
900
905
  },
@@ -980,7 +985,7 @@ const COMMANDS = {
980
985
  run: ({ client, positionals: [id, ...entity_ids], values: v }) => client.monitors.entities.add({ "Idempotency-Key": (0, node_crypto_1.randomUUID)(), id, entity_ids: [...new Set(entity_ids)], person_match_mode: str(v["person-match-mode"]) }),
981
986
  print: (r) => {
982
987
  for (const x of r.results)
983
- console.log(`${x.entity_id} ${x.tracker_id ?? "-"} ${x.attached ? (x.created ? "followed" : "attached") : `not added: ${x.reason ?? "unknown"}${x.current_monitor_id ? ` (monitor ${x.current_monitor_id})` : ""}`}`);
988
+ console.log(entityResultLine(x));
984
989
  },
985
990
  },
986
991
  "monitors attach": {
@@ -1062,17 +1067,17 @@ const COMMANDS = {
1062
1067
  whoami: {
1063
1068
  section: "account",
1064
1069
  operations: ["get_me"],
1065
- summary: "The key in use: its id, label, account, plan, scopes, rate limit, credits, and where it came from.",
1070
+ summary: "The key in use: the account it spends and your role there, its id, label, plan, scopes, rate limit, credits, and where it came from.",
1066
1071
  usage: "whoami",
1067
1072
  examples: ["arcmira whoami", "arcmira whoami --json"],
1068
1073
  positionals: "none",
1069
1074
  options: {},
1070
1075
  run: ({ client }) => client.me.get(),
1071
1076
  print: (me) => {
1072
- console.log(`plan ${me.tier} scopes ${me.scopes.join(",")} rate limit ${me.rate_limit} a minute`);
1077
+ console.log(`${accountLine(me)} plan ${me.tier} scopes ${me.scopes.join(",")} rate limit ${me.rate_limit} a minute`);
1073
1078
  console.log(usageLine(me));
1074
1079
  const credential = [me.credential_kind === "oauth" ? "oauth token" : "key", me.key_label ? `"${me.key_label}"` : "", me.key_id ?? ""].filter(Boolean).join(" ");
1075
- console.log(`${credential}${me.email_masked ? ` account ${me.email_masked}` : ""} from ${keySource}`);
1080
+ console.log(`${credential}${me.email_masked ? ` as ${me.email_masked}` : ""} from ${keySource}`);
1076
1081
  },
1077
1082
  },
1078
1083
  "auth token": {
@@ -1252,7 +1257,7 @@ function help(name) {
1252
1257
  if (!spec.reserved)
1253
1258
  lines.push(optionLine(key, spec, 24));
1254
1259
  const reserved = Object.entries(GLOBAL).filter(([, spec]) => spec.reserved).map(([key, spec]) => `--${key}${spec.short ? `/-${spec.short}` : ""}`);
1255
- lines.push(`Reserved flags, not available yet: ${reserved.join(", ")}.`, "", "Examples:", " arcmira setup connect the MCP server and skills to your coding agents, updates on", " arcmira login you@example.com email a code, then: arcmira login you@example.com --code 123456", " arcmira resolve Ramp names to ent_ ids; filter with the id: arcmira mentions --entity ent_14", " arcmira resolve TBPN --type channel shows to UC ids: arcmira sponsors UC-DRzaGnL_vtBUpCFH5M0tg", " arcmira mentions --entity ent_14 --after 2026-09-01 --before 2026-10-01 --json", " arcmira follow Ramp --type org alerts on a name, even before it is indexed", " arcmira api GET /v1/monitors any endpoint; arcmira schema lists them", "", "Key: --key, then ARCMIRA_API_KEY, then the key saved by `arcmira login`.", "Output: data on stdout, messages on stderr; --json prints the API response, and errors as JSON on stderr.", "Errors: every API error line carries the request_id to quote to support.", "Dates: --after is inclusive and --before exclusive, in UTC, on every dated command.", "Exit codes: 0 ok, 1 API or network error, 2 usage error (bad input, a name where an id belongs, no key),", " 4 Premium still transcribing (run the same command again later; it never uses credits twice).", "Telemetry: none. The CLI sends only the API requests you ask for.", "Docs: https://arcmira.com/docs Worked examples: arcmira examples Each command: arcmira <command> --help");
1260
+ lines.push(`Reserved flags, not available yet: ${reserved.join(", ")}. setup has its own --dry-run and --yes.`, "", "Examples:", " arcmira setup connect the MCP server and skills to your coding agents, updates on", " arcmira login you@example.com email a code, then: arcmira login you@example.com --code 123456", " arcmira resolve Ramp names to ent_ ids; filter with the id: arcmira mentions --entity ent_14", " arcmira resolve TBPN --type channel shows to UC ids: arcmira sponsors UC-DRzaGnL_vtBUpCFH5M0tg", " arcmira mentions --entity ent_14 --after 2026-09-01 --before 2026-10-01 --json", " arcmira follow Ramp --type org -m ID alerts on a name in a monitor, even before it is indexed", " arcmira api GET /v1/monitors any endpoint; arcmira schema lists them", "", "Key: --key, then ARCMIRA_API_KEY, then the key saved by `arcmira login`.", "Output: data on stdout, messages on stderr; --json prints the API response, and errors as JSON on stderr.", "Errors: every API error line carries the request_id to quote to support.", "Dates: --after is inclusive and --before exclusive, in UTC, on every dated command.", "Exit codes: 0 ok, 1 API or network error, 2 usage error (bad input, a name where an id belongs, no key),", " 4 Premium still transcribing (run the same command again later; it never uses credits twice).", "Telemetry: none. The CLI sends only the API requests you ask for.", "Docs: https://arcmira.com/docs Worked examples: arcmira examples Each command: arcmira <command> --help");
1256
1261
  return lines.join("\n");
1257
1262
  }
1258
1263
  function validate(name, command, values, positionals) {
@@ -1299,6 +1304,8 @@ function validate(name, command, values, positionals) {
1299
1304
  throw new UsageError("trackers create needs --type: person, organization (or org), product, topic or channel", "missing_type");
1300
1305
  if (values.type === "channel")
1301
1306
  needId(positionals.join(" "), "channel", "a channel follow");
1307
+ if (!values.monitor)
1308
+ throw new UsageError("trackers create needs --monitor: every tracker lives in a monitor, which sets how it alerts", "missing_monitor", "arcmira monitors list");
1302
1309
  }
1303
1310
  if (name === "monitors add" || name === "monitors attach") {
1304
1311
  const [, ...ids] = positionals;
@@ -1358,8 +1365,6 @@ function fail(error, json, name, baseUrl = "") {
1358
1365
  const quote = detail?.details?.quote;
1359
1366
  if (quote)
1360
1367
  lines.push(`quote: ${quote.rows} rows${quote.charge ? `, ${quote.charge.amount} ${quote.charge.unit} from ${quote.charge.from}` : ""}`);
1361
- if (detail?.details?.existing_id)
1362
- lines.push(`existing: ${detail.details.existing_id}`);
1363
1368
  if (detail?.unlock?.url)
1364
1369
  lines.push(`unlock: ${detail.unlock.url}`);
1365
1370
  else if (detail?.doc_url)
@@ -22,18 +22,17 @@ exports.OPERATIONS = [
22
22
  { "operationId": "list_channel_videos", "method": "GET", "path": "/v1/channels/{channel_id}/videos", "summary": "Newest indexed videos of a channel", "params": [{ "name": "channel_id", "in": "path", "required": true, "type": "string", "description": "YouTube channel id, the UC... form." }, { "name": "limit", "in": "query", "required": false, "type": "integer 1..25", "description": "Videos to return, 1 to 25, newest first. Default 10. Pass 1 for the latest episode." }, { "name": "cursor", "in": "query", "required": false, "type": "string", "description": "Opaque continuation from next_cursor. Bound to the channel, filters, caller, and visibility; limit may change between pages. Invalid or old tokens return invalid_cursor." }, { "name": "after", "in": "query", "required": false, "type": "string", "description": "Only media published at or after this instant. An ISO 8601 date (2026-09-01) or datetime with offset (2026-09-01T00:00:00Z), read in UTC. The window is half-open: after is inclusive, before is exclusive." }, { "name": "before", "in": "query", "required": false, "type": "string", "description": "Only media published before this instant, so before=2026-09-02 includes all of 2026-09-01. An ISO 8601 date (2026-09-01) or datetime with offset (2026-09-01T00:00:00Z), read in UTC. The window is half-open: after is inclusive, before is exclusive." }, { "name": "src", "in": "query", "required": false, "type": "string", "enum": ["mcp-tool"], "description": "The surface making this call. The Arcmira MCP server sends mcp-tool so every unlock link in a gate attributes to the directory install. Omit from your own client." }], "body": null },
23
23
  { "operationId": "count_mentions", "method": "GET", "path": "/v1/mentions/counts", "summary": "Ranked catalog counts of who a set of channels mention", "params": [{ "name": "channel_ids", "in": "query", "required": false, "type": "string", "description": "Comma-separated YouTube channel ids (UC...), at most 8. Two or more also return shared, the entities on more than one of them." }, { "name": "entity_ids", "in": "query", "required": false, "type": "string", "description": "Comma-separated entity ids (ent_{n}), at most 20. Counts only these entities." }, { "name": "video_ids", "in": "query", "required": false, "type": "string", "description": "Comma-separated 11-character YouTube video ids, at most 20. Counts only these episodes; take the ids from GET /v1/channels/{channel_id}/videos." }, { "name": "entity_types", "in": "query", "required": false, "type": "string", "description": "Comma-separated entity types to count: person, organization, product, topic, channel. Subjects are topic; guests are person; brands are organization,product. Omit and organizations dominate." }, { "name": "mode", "in": "query", "required": false, "type": "string", "enum": ["mentions", "appearances", "both"], "description": "mentions counts talk about an entity; appearances counts a person being present; both counts either. Default mentions." }, { "name": "after", "in": "query", "required": false, "type": "string", "description": "Only media published at or after this instant. Counts are all-time without it. An after later than your plan's freshness gate is refused with freshness_requires_paid rather than widened. An ISO 8601 date (2026-09-01) or datetime with offset (2026-09-01T00:00:00Z), read in UTC. The window is half-open: after is inclusive, before is exclusive." }, { "name": "before", "in": "query", "required": false, "type": "string", "description": "Only media published before this instant, so before=2026-09-02 includes all of 2026-09-01. An ISO 8601 date (2026-09-01) or datetime with offset (2026-09-01T00:00:00Z), read in UTC. The window is half-open: after is inclusive, before is exclusive." }, { "name": "limit", "in": "query", "required": false, "type": "integer 1..40", "description": "Rows in the ranked table, 1 to 40. Default 20." }, { "name": "src", "in": "query", "required": false, "type": "string", "enum": ["mcp-tool"], "description": "The surface making this call. The Arcmira MCP server sends mcp-tool so every unlock link in a gate attributes to the directory install. Omit from your own client." }], "body": null },
24
24
  { "operationId": "list_monitors", "method": "GET", "path": "/v1/monitors", "summary": "List monitors", "params": [], "body": null },
25
- { "operationId": "create_monitor", "method": "POST", "path": "/v1/monitors", "summary": "Create monitor", "params": [{ "name": "Idempotency-Key", "in": "header", "required": false, "type": "string", "description": "One key per intent, 1 to 255 printable ASCII characters (0x21 to 0x7E); anything else is 400 invalid_idempotency_key. Keys are scoped to the account, credential and resource family. The same key and normalized method, path and body returns the committed response with Idempotency-Replayed: true. A changed intent within the same family returns 409 idempotency_conflict. Monitor and tracker families have independent namespaces. Secret recovery is limited as described by the operation." }], "body": [{ "name": "name", "in": "body", "required": true, "type": "string", "description": "Display name (1-100 characters). Required on create." }, { "name": "notify_emails", "in": "body", "required": false, "type": "string[]", "description": "Desired email recipients. External recipients must confirm before delivery. Free includes one additional recipient per monitor; paid plans allow up to 20 total. Default []." }, { "name": "notify_frequency", "in": "body", "required": false, "type": "string", "enum": ["realtime", "hourly", "daily"], "description": "Delivery cadence. Default realtime. Values: realtime (as analysis completes), hourly (hourly digest), daily (daily digest)." }, { "name": "digest_day", "in": "body", "required": false, "type": "string", "description": "Digest day of week. Default \"monday\". Consulted only by weekly digests, which are dashboard-configured today; inert for API-set frequencies." }, { "name": "digest_time", "in": "body", "required": false, "type": "string", "description": "Digest send hour as HH:MM (account timezone). Default \"09:00\". Applies to daily digests." }, { "name": "notify_webhook", "in": "body", "required": false, "type": "boolean", "description": "Enable HMAC-signed webhook delivery (paid plans). When enabled together with webhook_url, the response returns the signing secret (monitor.webhook_secret), recoverable with the original Idempotency-Key during the valid recovery window. PATCHing true also re-enables an auto-disabled webhook and resets its failure counter." }, { "name": "webhook_url", "in": "body", "required": false, "type": "string", "description": "Destination URL for webhook alert deliveries." }, { "name": "notify_slack", "in": "body", "required": false, "type": "boolean", "description": "Enable Slack delivery. Requires a Slack integration connected in the dashboard." }, { "name": "slack_integration_id", "in": "body", "required": false, "type": "string", "description": "Slack integration id from the dashboard OAuth flow." }, { "name": "slack_channel_id", "in": "body", "required": false, "type": "string", "description": "Slack channel id to deliver to." }, { "name": "team_id", "in": "body", "required": false, "type": "string", "description": "Create the monitor in this team, which the caller must belong to. The team owner pays for it and its plan sets the limits. A member may not set a webhook. Create only." }] },
25
+ { "operationId": "create_monitor", "method": "POST", "path": "/v1/monitors", "summary": "Create monitor", "params": [{ "name": "Idempotency-Key", "in": "header", "required": false, "type": "string", "description": "One key per intent, 1 to 255 printable ASCII characters (0x21 to 0x7E); anything else is 400 invalid_idempotency_key. Keys are scoped to the account, credential and resource family. The same key and normalized method, path and body returns the committed response with Idempotency-Replayed: true. A changed intent within the same family returns 409 idempotency_conflict. Monitor and tracker families have independent namespaces. Secret recovery is limited as described by the operation." }], "body": [{ "name": "name", "in": "body", "required": true, "type": "string", "description": "Display name (1-100 characters). Required on create." }, { "name": "notify_emails", "in": "body", "required": false, "type": "string[]", "description": "Desired email recipients. External recipients must confirm before delivery. Free includes one additional recipient per monitor; paid plans allow up to 20 total. Default []." }, { "name": "notify_frequency", "in": "body", "required": false, "type": "string", "enum": ["realtime", "hourly", "daily"], "description": "Delivery cadence. Default realtime. Values: realtime (as analysis completes), hourly (hourly digest), daily (daily digest)." }, { "name": "digest_day", "in": "body", "required": false, "type": "string", "description": "Digest day of week. Default \"monday\". Consulted only by weekly digests, which are dashboard-configured today; inert for API-set frequencies." }, { "name": "digest_time", "in": "body", "required": false, "type": "string", "description": "Digest send hour as HH:MM (account timezone). Default \"09:00\". Applies to daily digests." }, { "name": "notify_webhook", "in": "body", "required": false, "type": "boolean", "description": "Enable HMAC-signed webhook delivery (paid plans). When enabled together with webhook_url, the response returns the signing secret (monitor.webhook_secret), recoverable with the original Idempotency-Key during the valid recovery window. PATCHing true also re-enables an auto-disabled webhook and resets its failure counter." }, { "name": "webhook_url", "in": "body", "required": false, "type": "string", "description": "Destination URL for webhook alert deliveries." }, { "name": "notify_slack", "in": "body", "required": false, "type": "boolean", "description": "Enable Slack delivery. Requires a Slack integration connected in the dashboard." }, { "name": "slack_integration_id", "in": "body", "required": false, "type": "string", "description": "Slack integration id from the dashboard OAuth flow." }, { "name": "slack_channel_id", "in": "body", "required": false, "type": "string", "description": "Slack channel id to deliver to." }, { "name": "team_id", "in": "body", "required": false, "type": "string|null", "description": "Retired. A monitor belongs to the account the key acts in. Absent or null is ignored; any other value answers 400 team_id_retired. Create only." }] },
26
26
  { "operationId": "update_monitor", "method": "PATCH", "path": "/v1/monitors/{id}", "summary": "Update monitor", "params": [{ "name": "id", "in": "path", "required": true, "type": "string", "description": "Monitor id." }, { "name": "Idempotency-Key", "in": "header", "required": false, "type": "string", "description": "One key per intent, 1 to 255 printable ASCII characters (0x21 to 0x7E); anything else is 400 invalid_idempotency_key. Keys are scoped to the account, credential and resource family. The same key and normalized method, path and body returns the committed response with Idempotency-Replayed: true. A changed intent within the same family returns 409 idempotency_conflict. Monitor and tracker families have independent namespaces. Secret recovery is limited as described by the operation." }], "body": [{ "name": "name", "in": "body", "required": false, "type": "string", "description": "Display name (1-100 characters). Required on create." }, { "name": "notify_emails", "in": "body", "required": false, "type": "string[]", "description": "Desired email recipients. External recipients must confirm before delivery. Free includes one additional recipient per monitor; paid plans allow up to 20 total. Default []." }, { "name": "notify_frequency", "in": "body", "required": false, "type": "string", "enum": ["realtime", "hourly", "daily"], "description": "Delivery cadence. Default realtime. Values: realtime (as analysis completes), hourly (hourly digest), daily (daily digest)." }, { "name": "digest_day", "in": "body", "required": false, "type": "string", "description": "Digest day of week. Default \"monday\". Consulted only by weekly digests, which are dashboard-configured today; inert for API-set frequencies." }, { "name": "digest_time", "in": "body", "required": false, "type": "string", "description": "Digest send hour as HH:MM (account timezone). Default \"09:00\". Applies to daily digests." }, { "name": "notify_webhook", "in": "body", "required": false, "type": "boolean", "description": "Enable HMAC-signed webhook delivery (paid plans). When enabled together with webhook_url, the response returns the signing secret (monitor.webhook_secret), recoverable with the original Idempotency-Key during the valid recovery window. PATCHing true also re-enables an auto-disabled webhook and resets its failure counter." }, { "name": "webhook_url", "in": "body", "required": false, "type": "string", "description": "Destination URL for webhook alert deliveries." }, { "name": "notify_slack", "in": "body", "required": false, "type": "boolean", "description": "Enable Slack delivery. Requires a Slack integration connected in the dashboard." }, { "name": "slack_integration_id", "in": "body", "required": false, "type": "string", "description": "Slack integration id from the dashboard OAuth flow." }, { "name": "slack_channel_id", "in": "body", "required": false, "type": "string", "description": "Slack channel id to deliver to." }, { "name": "paused", "in": "body", "required": false, "type": "boolean", "description": "Paused monitors accept config changes but do not deliver; alerts that would have fired are not queued." }] },
27
27
  { "operationId": "delete_monitor", "method": "DELETE", "path": "/v1/monitors/{id}", "summary": "Delete monitor", "params": [{ "name": "id", "in": "path", "required": true, "type": "string", "description": "Monitor id." }, { "name": "Idempotency-Key", "in": "header", "required": false, "type": "string", "description": "One key per intent, 1 to 255 printable ASCII characters (0x21 to 0x7E); anything else is 400 invalid_idempotency_key. Keys are scoped to the account, credential and resource family. The same key and normalized method, path and body returns the committed response with Idempotency-Replayed: true. A changed intent within the same family returns 409 idempotency_conflict. Monitor and tracker families have independent namespaces. Secret recovery is limited as described by the operation." }], "body": null },
28
28
  { "operationId": "rotate_monitor_webhook_secret", "method": "POST", "path": "/v1/monitors/{id}/webhook-secret/rotate", "summary": "Rotate the monitor webhook signing secret", "params": [{ "name": "id", "in": "path", "required": true, "type": "string", "description": "Monitor id." }, { "name": "Idempotency-Key", "in": "header", "required": false, "type": "string", "description": "One key per intent, 1 to 255 printable ASCII characters (0x21 to 0x7E); anything else is 400 invalid_idempotency_key. Keys are scoped to the account, credential and resource family. The same key and normalized method, path and body returns the committed response with Idempotency-Replayed: true. A changed intent within the same family returns 409 idempotency_conflict. Monitor and tracker families have independent namespaces. Secret recovery is limited as described by the operation." }], "body": null },
29
29
  { "operationId": "list_monitor_trackers", "method": "GET", "path": "/v1/monitors/{id}/trackers", "summary": "List monitor trackers", "params": [{ "name": "id", "in": "path", "required": true, "type": "string", "description": "Monitor id." }], "body": null },
30
- { "operationId": "add_monitor_trackers", "method": "POST", "path": "/v1/monitors/{id}/trackers", "summary": "Add trackers to monitor", "params": [{ "name": "id", "in": "path", "required": true, "type": "string", "description": "Monitor id." }, { "name": "Idempotency-Key", "in": "header", "required": false, "type": "string", "description": "One key per intent, 1 to 255 printable ASCII characters (0x21 to 0x7E); anything else is 400 invalid_idempotency_key. Keys are scoped to the account, credential and resource family. The same key and normalized method, path and body returns the committed response with Idempotency-Replayed: true. A changed intent within the same family returns 409 idempotency_conflict. Monitor and tracker families have independent namespaces. Secret recovery is limited as described by the operation." }], "body": [{ "name": "tracker_ids", "in": "body", "required": true, "type": "string[]", "description": "Ids of existing trackers (\"trk_...\") to attach to this monitor. Create trackers first via POST /v1/trackers. At most 90 IDs per request; duplicates count once. All IDs must belong to the account or none are attached." }] },
30
+ { "operationId": "add_monitor_trackers", "method": "POST", "path": "/v1/monitors/{id}/trackers", "summary": "Add trackers to monitor", "params": [{ "name": "id", "in": "path", "required": true, "type": "string", "description": "Monitor id." }, { "name": "Idempotency-Key", "in": "header", "required": false, "type": "string", "description": "One key per intent, 1 to 255 printable ASCII characters (0x21 to 0x7E); anything else is 400 invalid_idempotency_key. Keys are scoped to the account, credential and resource family. The same key and normalized method, path and body returns the committed response with Idempotency-Replayed: true. A changed intent within the same family returns 409 idempotency_conflict. Monitor and tracker families have independent namespaces. Secret recovery is limited as described by the operation." }], "body": [{ "name": "tracker_ids", "in": "body", "required": true, "type": "string[]", "description": "Ids of the account's trackers (\"trk_...\") to move into this monitor from the monitors they are in. At most 90 IDs per request; duplicates count once. All IDs must belong to the account or none move." }] },
31
31
  { "operationId": "list_monitor_alerts", "method": "GET", "path": "/v1/monitors/{id}/alerts", "summary": "List recent monitor alerts", "params": [{ "name": "id", "in": "path", "required": true, "type": "string", "description": "Monitor id." }, { "name": "limit", "in": "query", "required": false, "type": "integer 1..100", "description": "Alerts to return, newest first, 1 to 100. Default 25." }], "body": null },
32
- { "operationId": "add_monitor_entities", "method": "POST", "path": "/v1/monitors/{id}/entities", "summary": "Follow entities in a monitor by id or exact name", "params": [{ "name": "id", "in": "path", "required": true, "type": "string", "description": "Monitor id." }, { "name": "Idempotency-Key", "in": "header", "required": false, "type": "string", "description": "One key per intent, 1 to 255 printable ASCII characters (0x21 to 0x7E); anything else is 400 invalid_idempotency_key. Keys are scoped to the account, credential and resource family. The same key and normalized method, path and body returns the committed response with Idempotency-Replayed: true. A changed intent within the same family returns 409 idempotency_conflict. Monitor and tracker families have independent namespaces. Secret recovery is limited as described by the operation." }], "body": [{ "name": "entity_ids", "in": "body", "required": false, "type": "string[]", "description": "Entity ids (\"ent_...\") to follow in this monitor, from GET /v1/entities/resolve or search. Duplicates count once. A merged id follows its redirect to the canonical entity." }, { "name": "names", "in": "body", "required": false, "type": "object[]", "description": "Exact names to follow in this monitor, for a name not yet indexed or one you have no id for. The tracker is created under the monitor's account (the team owner on a team monitor) and attached in the same call; the account's tracker for the same name (compared case-insensitively) and type is reused. Duplicates count once." }, { "name": "person_match_mode", "in": "body", "required": false, "type": "string", "enum": ["mentions", "appearances", "both"], "description": "For person trackers this request creates: mentions (default) matches others talking about the person; appearances matches the person present as a speaker, host or guest; both accepts either. Other types ignore it, and a tracker that already exists keeps its own setting (change it with PATCH /v1/trackers/{id})." }] },
32
+ { "operationId": "add_monitor_entities", "method": "POST", "path": "/v1/monitors/{id}/entities", "summary": "Follow entities in a monitor by id or exact name", "params": [{ "name": "id", "in": "path", "required": true, "type": "string", "description": "Monitor id." }, { "name": "Idempotency-Key", "in": "header", "required": false, "type": "string", "description": "One key per intent, 1 to 255 printable ASCII characters (0x21 to 0x7E); anything else is 400 invalid_idempotency_key. Keys are scoped to the account, credential and resource family. The same key and normalized method, path and body returns the committed response with Idempotency-Replayed: true. A changed intent within the same family returns 409 idempotency_conflict. Monitor and tracker families have independent namespaces. Secret recovery is limited as described by the operation." }], "body": [{ "name": "entity_ids", "in": "body", "required": false, "type": "string[]", "description": "Entity ids (\"ent_...\") to follow in this monitor, from GET /v1/entities/resolve or search. Duplicates count once. A merged id follows its redirect to the canonical entity." }, { "name": "names", "in": "body", "required": false, "type": "object[]", "description": "Exact names to follow in this monitor, for a name not yet indexed or one you have no id for. The tracker is created in the monitor's account and attached in the same call; the account's tracker for the same name (compared case-insensitively) and type is reused. Duplicates count once." }, { "name": "person_match_mode", "in": "body", "required": false, "type": "string", "enum": ["mentions", "appearances", "both"], "description": "For person trackers this request creates: mentions (default) matches others talking about the person; appearances matches the person present as a speaker, host or guest; both accepts either. Other types ignore it, and a tracker that already exists keeps its own setting (change it with PATCH /v1/trackers/{id})." }] },
33
33
  { "operationId": "list_slack_integrations", "method": "GET", "path": "/v1/integrations/slack", "summary": "List connected Slack workspaces", "params": [], "body": null },
34
34
  { "operationId": "list_trackers", "method": "GET", "path": "/v1/trackers", "summary": "List trackers", "params": [], "body": null },
35
- { "operationId": "create_tracker", "method": "POST", "path": "/v1/trackers", "summary": "Create tracker", "params": [{ "name": "Idempotency-Key", "in": "header", "required": false, "type": "string", "description": "One key per intent, 1 to 255 printable ASCII characters (0x21 to 0x7E); anything else is 400 invalid_idempotency_key. Keys are scoped to the account, credential and resource family. The same key and normalized method, path and body returns the committed response with Idempotency-Replayed: true. A changed intent within the same family returns 409 idempotency_conflict. Monitor and tracker families have independent namespaces. Secret recovery is limited as described by the operation." }], "body": [{ "name": "entity_name", "in": "body", "required": true, "type": "string", "description": "The exact name to watch, matched case-insensitively against analyzed media, so a tracker can exist before the entity is indexed. For a channel, the YouTube channel id (UC plus 22 characters), never a name: a channel name answers 400 id_required naming GET /v1/entities/resolve?q=...&type=channel and best.youtube_channel_id. Required on create. Creating a duplicate (same name, compared case-insensitively, and type) returns 409 tracker_already_exists with the existing tracker id in error.details.existing_id." }, { "name": "entity_type", "in": "body", "required": true, "type": "string", "enum": ["person", "organization", "org", "product", "topic", "channel"], "description": "Entity type of the tracked entity. Required on create. org is accepted for organization, and the tracker answers organization." }, { "name": "display_name", "in": "body", "required": false, "type": "string", "description": "Optional label shown in alerts and the dashboard." }, { "name": "notify_email", "in": "body", "required": false, "type": "boolean", "description": "Per-tracker email delivery. Default true." }, { "name": "notify_webhook", "in": "body", "required": false, "type": "boolean", "description": "Per-tracker webhook delivery override. Paid plans only." }, { "name": "notify_slack", "in": "body", "required": false, "type": "boolean", "description": "Per-tracker Slack delivery override. Paid plans only." }, { "name": "webhook_url", "in": "body", "required": false, "type": "string", "description": "Per-tracker webhook destination override (http/https)." }, { "name": "slack_channel_id", "in": "body", "required": false, "type": "string", "description": "Per-tracker Slack channel override." }, { "name": "slack_integration_id", "in": "body", "required": false, "type": "string", "description": "Per-tracker Slack integration override." }, { "name": "person_match_mode", "in": "body", "required": false, "type": "string", "enum": ["mentions", "appearances", "both"], "description": "Person trackers only. Mentions (default) matches others talking about the person; appearances matches the person present as a speaker, host or guest; both accepts either. Non-person trackers reject this field. PATCH changes future and pending delivery eligibility, without backfill." }, { "name": "filters", "in": "body", "required": false, "type": "object", "description": "Stored filter object. personMatchMode is also accepted here for person trackers. Other filter keys are retained; do not assume they change matching." }] },
36
- { "operationId": "update_tracker", "method": "PATCH", "path": "/v1/trackers/{id}", "summary": "Update tracker", "params": [{ "name": "id", "in": "path", "required": true, "type": "string", "description": "Tracker id, trk_ form." }, { "name": "Idempotency-Key", "in": "header", "required": false, "type": "string", "description": "One key per intent, 1 to 255 printable ASCII characters (0x21 to 0x7E); anything else is 400 invalid_idempotency_key. Keys are scoped to the account, credential and resource family. The same key and normalized method, path and body returns the committed response with Idempotency-Replayed: true. A changed intent within the same family returns 409 idempotency_conflict. Monitor and tracker families have independent namespaces. Secret recovery is limited as described by the operation." }], "body": [{ "name": "display_name", "in": "body", "required": false, "type": "string", "description": "Optional label shown in alerts and the dashboard." }, { "name": "notify_email", "in": "body", "required": false, "type": "boolean", "description": "Per-tracker email delivery. Default true." }, { "name": "notify_webhook", "in": "body", "required": false, "type": "boolean", "description": "Per-tracker webhook delivery override. Paid plans only." }, { "name": "notify_slack", "in": "body", "required": false, "type": "boolean", "description": "Per-tracker Slack delivery override. Paid plans only." }, { "name": "webhook_url", "in": "body", "required": false, "type": "string", "description": "Per-tracker webhook destination override (http/https)." }, { "name": "slack_channel_id", "in": "body", "required": false, "type": "string", "description": "Per-tracker Slack channel override." }, { "name": "slack_integration_id", "in": "body", "required": false, "type": "string", "description": "Per-tracker Slack integration override." }, { "name": "person_match_mode", "in": "body", "required": false, "type": "string", "enum": ["mentions", "appearances", "both"], "description": "Person trackers only. Mentions (default) matches others talking about the person; appearances matches the person present as a speaker, host or guest; both accepts either. Non-person trackers reject this field. PATCH changes future and pending delivery eligibility, without backfill." }, { "name": "filters", "in": "body", "required": false, "type": "object", "description": "Stored filter object. personMatchMode is also accepted here for person trackers. Other filter keys are retained; do not assume they change matching." }, { "name": "paused", "in": "body", "required": false, "type": "boolean", "description": "Pause or resume the tracker. Paused trackers stop producing alerts; there is no backfill for the paused window." }] },
35
+ { "operationId": "update_tracker", "method": "PATCH", "path": "/v1/trackers/{id}", "summary": "Update tracker", "params": [{ "name": "id", "in": "path", "required": true, "type": "string", "description": "Tracker id, trk_ form." }, { "name": "Idempotency-Key", "in": "header", "required": false, "type": "string", "description": "One key per intent, 1 to 255 printable ASCII characters (0x21 to 0x7E); anything else is 400 invalid_idempotency_key. Keys are scoped to the account, credential and resource family. The same key and normalized method, path and body returns the committed response with Idempotency-Replayed: true. A changed intent within the same family returns 409 idempotency_conflict. Monitor and tracker families have independent namespaces. Secret recovery is limited as described by the operation." }], "body": [{ "name": "display_name", "in": "body", "required": false, "type": "string", "description": "Optional label shown in alerts and the dashboard." }, { "name": "notify_email", "in": "body", "required": false, "type": "boolean", "description": "Retired: a tracker alerts through its monitor's delivery (set it with PATCH /v1/monitors/{id}). Omitted or true is accepted and ignored; any other value answers 400 tracker_delivery_retired." }, { "name": "notify_webhook", "in": "body", "required": false, "type": "boolean", "description": "Retired: a tracker alerts through its monitor's delivery (set it with PATCH /v1/monitors/{id}). Omitted or false is accepted and ignored; any other value answers 400 tracker_delivery_retired." }, { "name": "notify_slack", "in": "body", "required": false, "type": "boolean", "description": "Retired: a tracker alerts through its monitor's delivery (set it with PATCH /v1/monitors/{id}). Omitted or false is accepted and ignored; any other value answers 400 tracker_delivery_retired." }, { "name": "webhook_url", "in": "body", "required": false, "type": "string|null", "description": "Retired: a tracker alerts through its monitor's delivery (set it with PATCH /v1/monitors/{id}). Omitted or null is accepted and ignored; any other value answers 400 tracker_delivery_retired." }, { "name": "slack_channel_id", "in": "body", "required": false, "type": "string|null", "description": "Retired: a tracker alerts through its monitor's delivery (set it with PATCH /v1/monitors/{id}). Omitted or null is accepted and ignored; any other value answers 400 tracker_delivery_retired." }, { "name": "slack_integration_id", "in": "body", "required": false, "type": "string|null", "description": "Retired: a tracker alerts through its monitor's delivery (set it with PATCH /v1/monitors/{id}). Omitted or null is accepted and ignored; any other value answers 400 tracker_delivery_retired." }, { "name": "person_match_mode", "in": "body", "required": false, "type": "string", "enum": ["mentions", "appearances", "both"], "description": "Person trackers only. Mentions (default) matches others talking about the person; appearances matches the person present as a speaker, host or guest; both accepts either. Non-person trackers reject this field. PATCH changes future and pending delivery eligibility, without backfill." }, { "name": "filters", "in": "body", "required": false, "type": "object", "description": "Stored filter object. personMatchMode is also accepted here for person trackers. Other filter keys are retained; do not assume they change matching." }, { "name": "paused", "in": "body", "required": false, "type": "boolean", "description": "Pause or resume the tracker. Paused trackers stop producing alerts; there is no backfill for the paused window." }] },
37
36
  { "operationId": "delete_tracker", "method": "DELETE", "path": "/v1/trackers/{id}", "summary": "Delete tracker", "params": [{ "name": "id", "in": "path", "required": true, "type": "string", "description": "Tracker id, trk_ form." }, { "name": "Idempotency-Key", "in": "header", "required": false, "type": "string", "description": "One key per intent, 1 to 255 printable ASCII characters (0x21 to 0x7E); anything else is 400 invalid_idempotency_key. Keys are scoped to the account, credential and resource family. The same key and normalized method, path and body returns the committed response with Idempotency-Replayed: true. A changed intent within the same family returns 409 idempotency_conflict. Monitor and tracker families have independent namespaces. Secret recovery is limited as described by the operation." }], "body": null },
38
37
  { "operationId": "list_tracker_alerts", "method": "GET", "path": "/v1/trackers/{id}/alerts", "summary": "List recent tracker alerts", "params": [{ "name": "id", "in": "path", "required": true, "type": "string", "description": "Tracker id, trk_ form." }, { "name": "limit", "in": "query", "required": false, "type": "integer 1..100", "description": "Alerts to return, newest first, 1 to 100. Default 25." }], "body": null },
39
38
  { "operationId": "get_transcript", "method": "GET", "path": "/v1/transcripts/{video_id}", "summary": "Get a video transcript", "params": [{ "name": "video_id", "in": "path", "required": true, "type": "string", "description": "YouTube video id, 11 characters." }, { "name": "quality", "in": "query", "required": false, "type": "string", "enum": ["captions", "premium"], "description": "captions reads creator or automatic captions at 4 credits per started 15 minutes. premium is one read. An owned transcript returns 200 state ready at no charge. Otherwise the read starts a Premium transcript of the whole video, 300 credits per started 15 minutes, using credits from the account's plan first and then the account's on-demand budget up to its limit, and returns 202 state pending with the job until it is ready. When the last Premium transcript for the video failed it answers 200 state failed and starts a new one only with retry=true. 402 quota_exceeded or spend_limit_exceeded and 403 paid_plan_required carry the price in quote. It never substitutes captions. Default captions unless changed in account settings." }, { "name": "language", "in": "query", "required": false, "type": "string", "description": "Comma-separated caption language priority list, at most 5, tried in order (e.g. \"de,en\"). Use asr for the first automatic track and asr-<code> for a specific one. Default en. languages[] in the response lists every track the video offers." }, { "name": "timestamps", "in": "query", "required": false, "type": "boolean", "description": "false returns paragraphs[] of { start, text, speaker? } instead of lines[], for reading rather than citing. Default true." }, { "name": "start", "in": "query", "required": false, "type": "number|null 0..", "description": "Window start in seconds from the beginning of the video. Send start and end together. On captions the window bills only its own started 15-minute blocks; on Premium it trims the returned content. An explicit Premium read is charged for the whole video from the account's plan credits and then its on-demand budget; a window does not reduce that charge." }, { "name": "end", "in": "query", "required": false, "type": "number|null 0..", "description": "Window end in seconds, greater than start and no greater than the video duration. Send start and end together." }, { "name": "retry", "in": "query", "required": false, "type": "boolean", "description": "Premium only; captions with retry=true returns invalid_query. When the last Premium transcript for this video failed, a read answers 200 state failed with the job and last_attempt and charges nothing; retry=true starts a new one under the same quote, budget and one-job-per-video rules as the first read. While that refund is still settling (job.status refund_pending) even retry=true answers state failed. Without a failed job it changes nothing." }, { "name": "refresh", "in": "query", "required": false, "type": "boolean", "description": "Captions only; Premium with refresh=true returns invalid_query. Refetch the caption track from YouTube instead of serving the stored copy. Available only for videos outside our index; a pipeline-owned video refuses it with invalid_query." }, { "name": "src", "in": "query", "required": false, "type": "string", "enum": ["mcp-tool"], "description": "The surface making this call. The Arcmira MCP server sends mcp-tool so every unlock link in a gate attributes to the directory install. Omit from your own client." }], "body": null },
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
8
  "X-Fern-SDK-Name": "arcmira",
9
- "X-Fern-SDK-Version": "0.4.2",
10
- "User-Agent": "arcmira/0.4.2",
9
+ "X-Fern-SDK-Version": "0.5.0",
10
+ "User-Agent": "arcmira/0.5.0",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -11,7 +11,7 @@ export declare class MeClient {
11
11
  protected readonly _options: NormalizedClientOptionsWithAuth<MeClient.Options>;
12
12
  constructor(options?: MeClient.Options);
13
13
  /**
14
- * Available even when the account has exhausted its usage allowance. Returns the credential making the request (key_id, key_label, credential_kind), the masked account email, the tier, scopes, rate limit, usage with period_resets_at, and account settings. usage.credits is the primary measure: credits from the plan, then the on-demand budget. The row fields restate it at 4 credits a row. settings.transcripts is what a transcript request that names no parameter of its own receives: every key of the account resolves against it.
14
+ * Available even when the account has exhausted its usage allowance. Returns the credential making the request (key_id, key_label, credential_kind), the masked email of the person, the account whose credits it spends (account: id, name, kind, plan) and the role the person holds on it, the tier, scopes, rate limit, usage with period_resets_at, and account settings. usage.credits is the primary measure: credits from the plan, then the on-demand budget. The row fields restate it at 4 credits a row. settings.transcripts is what a transcript request that names no parameter of its own receives: every key of the account resolves against it.
15
15
  *
16
16
  * @param {MeClient.RequestOptions} requestOptions - Request-specific configuration.
17
17
  *