run402-mcp 3.8.3 → 4.0.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.
@@ -1,36 +1,11 @@
1
1
  import { z } from "zod";
2
- import { getSdk } from "../sdk.js";
3
- import { mapSdkError } from "../errors.js";
4
2
  export const listCustomDomainsSchema = {
5
3
  project_id: z.string().describe("The project ID"),
6
4
  };
7
5
  export async function handleListCustomDomains(args) {
8
- try {
9
- const body = await getSdk().domains.list(args.project_id);
10
- const domains = body.domains;
11
- if (domains.length === 0) {
12
- return {
13
- content: [
14
- {
15
- type: "text",
16
- text: `## Custom Domains\n\n_No custom domains registered. Use \`add_custom_domain\` to register one._`,
17
- },
18
- ],
19
- };
20
- }
21
- const lines = [
22
- `## Custom Domains (${domains.length})`,
23
- ``,
24
- `| Domain | Subdomain | Status | Created |`,
25
- `|--------|-----------|--------|---------|`,
26
- ];
27
- for (const d of domains) {
28
- lines.push(`| ${d.domain} | ${d.subdomain_url} | ${d.status} | ${d.created_at} |`);
29
- }
30
- return { content: [{ type: "text", text: lines.join("\n") }] };
31
- }
32
- catch (err) {
33
- return mapSdkError(err, "listing custom domains");
34
- }
6
+ return removed(`list_custom_domains has been removed. Use domains_list for project ${args.project_id}.`);
7
+ }
8
+ function removed(text) {
9
+ return { content: [{ type: "text", text: `Error: ${text}` }], isError: true };
35
10
  }
36
11
  //# sourceMappingURL=list-custom-domains.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"list-custom-domains.js","sourceRoot":"","sources":["../../src/tools/list-custom-domains.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,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,gBAAgB,CAAC;CAClD,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,IAE7C;IACC,OAAO,OAAO,CACZ,sEAAsE,IAAI,CAAC,UAAU,GAAG,CACzF,CAAC;AACJ,CAAC;AAED,SAAS,OAAO,CAAC,IAAY;IAC3B,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,IAAI,EAAE,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAChF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"remove-custom-domain.d.ts","sourceRoot":"","sources":["../../src/tools/remove-custom-domain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,wBAAwB;;;CAMpC,CAAC;AAEF,wBAAsB,wBAAwB,CAAC,IAAI,EAAE;IACnD,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,CAcjF"}
1
+ {"version":3,"file":"remove-custom-domain.d.ts","sourceRoot":"","sources":["../../src/tools/remove-custom-domain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,wBAAwB;;;CAMpC,CAAC;AAEF,wBAAsB,wBAAwB,CAAC,IAAI,EAAE;IACnD,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,CAIjF"}
@@ -1,6 +1,4 @@
1
1
  import { z } from "zod";
2
- import { getSdk } from "../sdk.js";
3
- import { mapSdkError } from "../errors.js";
4
2
  export const removeCustomDomainSchema = {
5
3
  domain: z.string().describe("The custom domain to release (e.g. 'example.com')"),
6
4
  project_id: z
@@ -9,19 +7,9 @@ export const removeCustomDomainSchema = {
9
7
  .describe("Optional project ID for ownership verification"),
10
8
  };
11
9
  export async function handleRemoveCustomDomain(args) {
12
- try {
13
- await getSdk().domains.remove(args.domain, { projectId: args.project_id });
14
- return {
15
- content: [
16
- {
17
- type: "text",
18
- text: `## Custom Domain Removed\n\nDomain \`${args.domain}\` has been released. Traffic to this domain will no longer be routed to Run402.`,
19
- },
20
- ],
21
- };
22
- }
23
- catch (err) {
24
- return mapSdkError(err, "removing custom domain");
25
- }
10
+ return removed(`remove_custom_domain has been removed. Use domains_disconnect for ${args.domain}${args.project_id ? ` in project ${args.project_id}` : ""}.`);
11
+ }
12
+ function removed(text) {
13
+ return { content: [{ type: "text", text: `Error: ${text}` }], isError: true };
26
14
  }
27
15
  //# sourceMappingURL=remove-custom-domain.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"remove-custom-domain.js","sourceRoot":"","sources":["../../src/tools/remove-custom-domain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mDAAmD,CAAC;IAChF,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,gDAAgD,CAAC;CAC9D,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,IAG9C;IACC,IAAI,CAAC;QACH,MAAM,MAAM,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;QAC3E,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,wCAAwC,IAAI,CAAC,MAAM,kFAAkF;iBAC5I;aACF;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,WAAW,CAAC,GAAG,EAAE,wBAAwB,CAAC,CAAC;IACpD,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"remove-custom-domain.js","sourceRoot":"","sources":["../../src/tools/remove-custom-domain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mDAAmD,CAAC;IAChF,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,gDAAgD,CAAC;CAC9D,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,IAG9C;IACC,OAAO,OAAO,CACZ,qEAAqE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,eAAe,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAC9I,CAAC;AACJ,CAAC;AAED,SAAS,OAAO,CAAC,IAAY;IAC3B,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,IAAI,EAAE,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAChF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "run402-mcp",
3
- "version": "3.8.3",
3
+ "version": "4.0.0",
4
4
  "description": "MCP server for Run402 — AI-native Postgres databases with REST API, auth, storage, and row-level security. Pay with x402 USDC micropayments.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,73 +1,166 @@
1
1
  /**
2
- * `domains` namespace — custom domains (BYODomain) mapped to run402
3
- * subdomains. Manages the registration/verification lifecycle and DNS
4
- * instructions surfaced back to the user's DNS provider.
2
+ * `domains` namespace — ProjectDomain lifecycle.
3
+ *
4
+ * Domain operations are project-scoped control-plane actions. They use the
5
+ * SDK credential provider's server auth (SIWX, control-plane session, or
6
+ * delegate) and deliberately do not require local project-key cache entries.
5
7
  */
6
8
  import type { Client } from "../kernel.js";
7
- export type DomainAuthMode = "principal" | "service_key";
8
- export interface DomainAddOptions {
9
- domain: string;
10
- subdomainName: string;
11
- authMode?: DomainAuthMode;
9
+ export type ProjectDomainStatus = "action_required" | "waiting" | "active" | "needs_repair" | "failed";
10
+ export type ProjectDomainReceiveStrategy = "auto" | "outbound_only" | "forwarding_mode" | "subdomain_mode" | "full_receive_takeover";
11
+ export type ProjectDomainMailboxAddressMode = "primary" | "alias" | "managed" | "none";
12
+ export type ProjectDomainActivationMode = "automatic_when_ready" | "manual";
13
+ export type ProjectDomainWaitUntil = "active" | "safe" | "receive-active";
14
+ export interface ProjectDomainMailboxAddressBinding {
15
+ local_part: string;
16
+ mailbox_slug: string;
17
+ create_mailbox?: boolean;
12
18
  }
13
- export interface DnsInstructions {
14
- cname_target?: string;
15
- txt_name?: string;
16
- txt_value?: string;
19
+ export interface ProjectDomainDesired {
20
+ web?: {
21
+ enabled: boolean;
22
+ target?: string;
23
+ role?: "primary" | "alias";
24
+ };
25
+ email?: {
26
+ send?: {
27
+ enabled: boolean;
28
+ };
29
+ receive?: {
30
+ enabled: boolean;
31
+ strategy?: ProjectDomainReceiveStrategy;
32
+ resolved_strategy?: ProjectDomainReceiveStrategy;
33
+ observed_mx_fingerprint?: string;
34
+ mail_subdomain?: string;
35
+ };
36
+ mailbox_addresses?: {
37
+ mode: ProjectDomainMailboxAddressMode;
38
+ addresses: ProjectDomainMailboxAddressBinding[];
39
+ };
40
+ activation?: ProjectDomainActivationMode;
41
+ };
17
42
  }
18
- export interface CustomDomainAddResult {
19
- domain: string;
20
- subdomain_name: string;
21
- url: string;
22
- subdomain_url: string;
23
- status: string;
24
- dns_instructions: DnsInstructions | null;
25
- project_id: string | null;
26
- created_at: string;
43
+ export interface ProjectDomainCheck {
44
+ id: string;
45
+ status: "unknown" | "pending" | "passed" | "failed" | "drifted" | "blocked";
46
+ blocking: boolean;
47
+ reason_code?: string;
48
+ summary?: string;
49
+ blocked_by?: string[];
50
+ checked_at?: string;
27
51
  }
28
- export interface CustomDomainSummary {
29
- domain: string;
30
- subdomain_name: string;
31
- url: string;
32
- subdomain_url: string;
33
- status: string;
34
- created_at: string;
52
+ export interface ProjectDomainDnsRecord {
53
+ id: string;
54
+ purpose: string;
55
+ type: string;
56
+ name: string;
57
+ value: string;
58
+ priority?: number;
59
+ required: boolean;
60
+ status: "unknown" | "missing" | "present" | "conflict";
61
+ safety: {
62
+ safe_to_auto_run: boolean;
63
+ confirmation_required: boolean;
64
+ destructive: boolean;
65
+ external_required: boolean;
66
+ conflict_policy?: string;
67
+ [key: string]: unknown;
68
+ };
69
+ bind?: string;
35
70
  }
36
- export interface CustomDomainListResult {
37
- domains: CustomDomainSummary[];
71
+ export interface ProjectDomainNextAction {
72
+ type: string;
73
+ method?: string;
74
+ path?: string;
75
+ auth?: string;
76
+ why?: string;
77
+ safe_to_auto_run?: boolean;
78
+ destructive?: boolean;
79
+ confirmation_required?: boolean;
80
+ external_required?: boolean;
81
+ affected_record_ids?: string[];
82
+ [key: string]: unknown;
38
83
  }
39
- export interface CustomDomainStatusResult {
40
- domain: string;
41
- subdomain_name: string;
42
- url: string;
43
- subdomain_url: string;
44
- status: string;
45
- dns_instructions: DnsInstructions | null;
84
+ export interface ProjectDomainReceiveTest {
85
+ id: string;
86
+ local_part: string;
87
+ address: string;
88
+ target_managed_address: string;
89
+ token: string;
90
+ status: "pending" | "passed" | "failed" | "stale";
46
91
  created_at: string;
92
+ passed_at?: string | null;
47
93
  }
48
- export interface CustomDomainRemoveOptions {
49
- projectId?: string;
50
- authMode?: DomainAuthMode;
51
- }
52
- export interface CustomDomainRemoveResult {
53
- status: string;
94
+ export interface ProjectDomain {
95
+ project_id: string;
54
96
  domain: string;
97
+ status: ProjectDomainStatus;
98
+ desired: ProjectDomainDesired;
99
+ observed: Record<string, unknown>;
100
+ effective: Record<string, unknown>;
101
+ authority: {
102
+ recommended_mode: string;
103
+ options: Array<Record<string, unknown>>;
104
+ };
105
+ dns_records: ProjectDomainDnsRecord[];
106
+ checks: ProjectDomainCheck[];
107
+ next_action: ProjectDomainNextAction | null;
108
+ alternate_actions: ProjectDomainNextAction[];
109
+ provenance: {
110
+ project: "server_control_plane";
111
+ desired: "server_control_plane";
112
+ observed_dns: "public_dns_resolvers";
113
+ effective: "run402_control_plane";
114
+ local_cache: "not_used";
115
+ };
116
+ created_at?: string;
117
+ updated_at?: string;
118
+ }
119
+ export interface ProjectDomainListResult {
120
+ domains: ProjectDomain[];
121
+ }
122
+ export interface ProjectDomainEnsureOptions {
123
+ desired: ProjectDomainDesired;
55
124
  }
56
- export interface DomainRequestOptions {
57
- authMode?: DomainAuthMode;
125
+ export interface ProjectDomainTestReceiveResult extends ProjectDomain {
126
+ receive_test: ProjectDomainReceiveTest;
58
127
  }
128
+ export interface ProjectDomainWaitOptions {
129
+ until?: ProjectDomainWaitUntil;
130
+ timeoutMs?: number;
131
+ intervalMs?: number;
132
+ }
133
+ export type DomainAddOptions = {
134
+ domain: string;
135
+ subdomainName?: string;
136
+ };
137
+ export type DomainRequestOptions = Record<string, never>;
138
+ export type CustomDomainRemoveOptions = {
139
+ projectId?: string;
140
+ };
59
141
  export declare class Domains {
60
142
  private readonly client;
61
143
  constructor(client: Client);
62
- /** Register a custom domain. Returns DNS records the user must add at their DNS provider. */
63
- add(projectId: string, opts: DomainAddOptions): Promise<CustomDomainAddResult>;
64
- /** @deprecated Two same-type strings are swap-prone. Use `add(projectId, { domain, subdomainName })`. */
65
- add(projectId: string, domain: string, subdomainName: string): Promise<CustomDomainAddResult>;
66
- /** List all custom domains registered for a project. */
67
- list(projectId: string, opts?: DomainRequestOptions): Promise<CustomDomainListResult>;
68
- /** Check verification/SSL status for a specific custom domain. */
69
- status(projectId: string, domain: string, opts?: DomainRequestOptions): Promise<CustomDomainStatusResult>;
70
- /** Release a custom domain. `projectId` is optional for ownership-free removal. */
71
- remove(domain: string, opts?: CustomDomainRemoveOptions): Promise<CustomDomainRemoveResult>;
144
+ ensure(projectId: string, domain: string, opts: ProjectDomainEnsureOptions): Promise<ProjectDomain>;
145
+ get(projectId: string, domain: string): Promise<ProjectDomain>;
146
+ list(projectId: string): Promise<ProjectDomainListResult>;
147
+ check(projectId: string, domain: string): Promise<ProjectDomain>;
148
+ apply(projectId: string, domain: string): Promise<ProjectDomain>;
149
+ repair(projectId: string, domain: string): Promise<ProjectDomain>;
150
+ testReceive(projectId: string, domain: string, to: string): Promise<ProjectDomainTestReceiveResult>;
151
+ activate(projectId: string, domain: string): Promise<ProjectDomain>;
152
+ disconnect(projectId: string, domain: string): Promise<{
153
+ status: string;
154
+ domain: string;
155
+ }>;
156
+ wait(projectId: string, domain: string, opts?: ProjectDomainWaitOptions): Promise<ProjectDomain>;
157
+ /** @deprecated Removed. Use ensure(projectId, domain, { desired }). */
158
+ add(projectId: string, opts: DomainAddOptions): Promise<never>;
159
+ /** @deprecated Removed. Use ensure(projectId, domain, { desired }). */
160
+ add(projectId: string, domain: string, subdomainName: string): Promise<never>;
161
+ /** @deprecated Removed. Use get(projectId, domain). */
162
+ status(projectId: string, domain: string): Promise<never>;
163
+ /** @deprecated Removed. Use disconnect(projectId, domain). */
164
+ remove(domain: string, opts?: CustomDomainRemoveOptions): Promise<never>;
72
165
  }
73
166
  //# sourceMappingURL=domains.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"domains.d.ts","sourceRoot":"","sources":["../../src/namespaces/domains.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAI3C,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,aAAa,CAAC;AAEzD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B;AAED,MAAM,WAAW,eAAe;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,EAAE,eAAe,GAAG,IAAI,CAAC;IACzC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,mBAAmB,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EA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E,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAQjE,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,8BAA8B,CAAC;IASnG,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAQnE,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAQ1F,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,GAAE,wBAA6B,GAAG,OAAO,CAAC,aAAa,CAAC;IAwB1G,uEAAuE;IACjE,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,KAAK,CAAC;IACpE,uEAAuE;IACjE,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IAMnF,uDAAuD;IACjD,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IAI/D,8DAA8D;IACxD,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,GAAE,yBAA8B,GAAG,OAAO,CAAC,KAAK,CAAC;CAGnF"}
@@ -1,89 +1,134 @@
1
1
  /**
2
- * `domains` namespace — custom domains (BYODomain) mapped to run402
3
- * subdomains. Manages the registration/verification lifecycle and DNS
4
- * instructions surfaced back to the user's DNS provider.
2
+ * `domains` namespace — ProjectDomain lifecycle.
3
+ *
4
+ * Domain operations are project-scoped control-plane actions. They use the
5
+ * SDK credential provider's server auth (SIWX, control-plane session, or
6
+ * delegate) and deliberately do not require local project-key cache entries.
5
7
  */
6
- import { deprecatePositional } from "../deprecate.js";
7
- import { requireProjectCredentials } from "../project-credentials.js";
8
- function withProjectId(path, projectId) {
9
- const sep = path.includes("?") ? "&" : "?";
10
- return `${path}${sep}project_id=${encodeURIComponent(projectId)}`;
8
+ import { LocalError } from "../errors.js";
9
+ function domainPath(projectId, domain) {
10
+ return `/projects/v1/${encodeURIComponent(projectId)}/domains/${encodeURIComponent(domain)}`;
11
+ }
12
+ function authMeta(method, projectId) {
13
+ return { method, target: { project_id: projectId } };
14
+ }
15
+ function removed(command, replacement) {
16
+ throw new LocalError(`${command} has been removed. Use ${replacement}.`, command, {
17
+ code: "COMMAND_REMOVED",
18
+ details: { command, replacement },
19
+ next_actions: [{ type: "use_replacement_command", command: replacement }],
20
+ });
21
+ }
22
+ function waitSatisfied(domain, until) {
23
+ if (until === "active")
24
+ return domain.status === "active";
25
+ if (until === "receive-active") {
26
+ const email = domain.effective.email;
27
+ return email?.receive?.active === true;
28
+ }
29
+ return domain.checks.every((check) => !check.blocking || check.status === "passed");
30
+ }
31
+ function sleep(ms) {
32
+ return new Promise((resolve) => setTimeout(resolve, ms));
11
33
  }
12
34
  export class Domains {
13
35
  client;
14
36
  constructor(client) {
15
37
  this.client = client;
16
38
  }
17
- async add(projectId, domainOrOpts, subdomainName) {
18
- let domain;
19
- let subdomain;
20
- let authMode;
21
- if (typeof domainOrOpts === "object" && domainOrOpts !== null) {
22
- domain = domainOrOpts.domain;
23
- subdomain = domainOrOpts.subdomainName;
24
- authMode = domainOrOpts.authMode;
25
- }
26
- else {
27
- deprecatePositional("domains.add", "use add(projectId, { domain, subdomainName })");
28
- domain = domainOrOpts;
29
- subdomain = subdomainName;
30
- }
31
- if (authMode === "service_key") {
32
- const project = await requireProjectCredentials(this.client, projectId, "registering custom domain");
33
- return this.client.request("/domains/v1", {
34
- method: "POST",
35
- headers: { Authorization: `Bearer ${project.service_key}` },
36
- body: { domain, subdomain_name: subdomain },
37
- context: "registering custom domain",
38
- });
39
- }
40
- return this.client.request("/domains/v1", {
39
+ async ensure(projectId, domain, opts) {
40
+ return this.client.request(domainPath(projectId, domain), {
41
+ method: "PUT",
42
+ body: { desired: opts.desired },
43
+ authMeta: authMeta("domains.ensure", projectId),
44
+ context: "ensuring project domain",
45
+ });
46
+ }
47
+ async get(projectId, domain) {
48
+ return this.client.request(domainPath(projectId, domain), {
49
+ authMeta: authMeta("domains.get", projectId),
50
+ context: "getting project domain",
51
+ });
52
+ }
53
+ async list(projectId) {
54
+ return this.client.request(`/projects/v1/${encodeURIComponent(projectId)}/domains`, {
55
+ authMeta: authMeta("domains.list", projectId),
56
+ context: "listing project domains",
57
+ });
58
+ }
59
+ async check(projectId, domain) {
60
+ return this.client.request(`${domainPath(projectId, domain)}/actions/check`, {
41
61
  method: "POST",
42
- body: { project_id: projectId, domain, subdomain_name: subdomain },
43
- context: "registering custom domain",
62
+ authMeta: authMeta("domains.check", projectId),
63
+ context: "checking project domain",
44
64
  });
45
65
  }
46
- /** List all custom domains registered for a project. */
47
- async list(projectId, opts = {}) {
48
- if (opts.authMode === "service_key") {
49
- const project = await requireProjectCredentials(this.client, projectId, "listing custom domains");
50
- return this.client.request("/domains/v1", {
51
- headers: { Authorization: `Bearer ${project.service_key}` },
52
- context: "listing custom domains",
53
- });
54
- }
55
- return this.client.request(withProjectId("/domains/v1", projectId), {
56
- context: "listing custom domains",
66
+ async apply(projectId, domain) {
67
+ return this.client.request(`${domainPath(projectId, domain)}/actions/apply`, {
68
+ method: "POST",
69
+ authMeta: authMeta("domains.apply", projectId),
70
+ context: "applying project domain",
57
71
  });
58
72
  }
59
- /** Check verification/SSL status for a specific custom domain. */
60
- async status(projectId, domain, opts = {}) {
61
- if (opts.authMode === "service_key") {
62
- const project = await requireProjectCredentials(this.client, projectId, "checking domain status");
63
- return this.client.request(`/domains/v1/${encodeURIComponent(domain)}`, {
64
- headers: { Authorization: `Bearer ${project.service_key}` },
65
- context: "checking domain status",
66
- });
67
- }
68
- return this.client.request(withProjectId(`/domains/v1/${encodeURIComponent(domain)}`, projectId), {
69
- context: "checking domain status",
73
+ async repair(projectId, domain) {
74
+ return this.client.request(`${domainPath(projectId, domain)}/actions/repair`, {
75
+ method: "POST",
76
+ authMeta: authMeta("domains.repair", projectId),
77
+ context: "repairing project domain",
70
78
  });
71
79
  }
72
- /** Release a custom domain. `projectId` is optional for ownership-free removal. */
73
- async remove(domain, opts = {}) {
74
- const headers = {};
75
- if (opts.projectId && opts.authMode === "service_key") {
76
- const project = await requireProjectCredentials(this.client, opts.projectId, "removing custom domain");
77
- headers.Authorization = `Bearer ${project.service_key}`;
78
- }
79
- const path = opts.projectId && opts.authMode !== "service_key"
80
- ? withProjectId(`/domains/v1/${encodeURIComponent(domain)}`, opts.projectId)
81
- : `/domains/v1/${encodeURIComponent(domain)}`;
82
- return this.client.request(path, {
80
+ async testReceive(projectId, domain, to) {
81
+ return this.client.request(`${domainPath(projectId, domain)}/actions/test_receive`, {
82
+ method: "POST",
83
+ body: { to },
84
+ authMeta: authMeta("domains.testReceive", projectId),
85
+ context: "creating project domain receive test",
86
+ });
87
+ }
88
+ async activate(projectId, domain) {
89
+ return this.client.request(`${domainPath(projectId, domain)}/actions/activate_mailbox_addresses`, {
90
+ method: "POST",
91
+ authMeta: authMeta("domains.activate", projectId),
92
+ context: "activating project domain mailbox addresses",
93
+ });
94
+ }
95
+ async disconnect(projectId, domain) {
96
+ return this.client.request(domainPath(projectId, domain), {
83
97
  method: "DELETE",
84
- headers,
85
- context: "removing custom domain",
98
+ authMeta: authMeta("domains.disconnect", projectId),
99
+ context: "disconnecting project domain",
86
100
  });
87
101
  }
102
+ async wait(projectId, domain, opts = {}) {
103
+ const until = opts.until ?? "active";
104
+ const timeoutMs = opts.timeoutMs ?? 120_000;
105
+ const intervalMs = opts.intervalMs ?? 5_000;
106
+ const started = Date.now();
107
+ let last = await this.check(projectId, domain);
108
+ while (!waitSatisfied(last, until)) {
109
+ if (Date.now() - started >= timeoutMs) {
110
+ throw new LocalError(`Timed out waiting for project domain ${domain} to reach ${until}`, "waiting for project domain", {
111
+ code: "DOMAIN_WAIT_TIMEOUT",
112
+ details: { project_id: projectId, domain, until, last_status: last.status, checks: last.checks },
113
+ next_actions: [{ type: "check", command: `run402 domains check ${domain} --project ${projectId}` }],
114
+ });
115
+ }
116
+ await sleep(intervalMs);
117
+ last = await this.check(projectId, domain);
118
+ }
119
+ return last;
120
+ }
121
+ async add(projectId, domainOrOpts) {
122
+ const domain = typeof domainOrOpts === "string" ? domainOrOpts : domainOrOpts.domain;
123
+ return removed("domains.add", `run402 domains connect ${domain} --project ${projectId} --web`);
124
+ }
125
+ /** @deprecated Removed. Use get(projectId, domain). */
126
+ async status(projectId, domain) {
127
+ return removed("domains.status", `run402 domains status ${domain} --project ${projectId}`);
128
+ }
129
+ /** @deprecated Removed. Use disconnect(projectId, domain). */
130
+ async remove(domain, opts = {}) {
131
+ return removed("domains.remove", `run402 domains disconnect ${domain}${opts.projectId ? ` --project ${opts.projectId}` : ""} --confirm`);
132
+ }
88
133
  }
89
134
  //# sourceMappingURL=domains.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"domains.js","sourceRoot":"","sources":["../../src/namespaces/domains.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAgEtE,SAAS,aAAa,CAAC,IAAY,EAAE,SAAiB;IACpD,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;IAC3C,OAAO,GAAG,IAAI,GAAG,GAAG,cAAc,kBAAkB,CAAC,SAAS,CAAC,EAAE,CAAC;AACpE,CAAC;AAED,MAAM,OAAO,OAAO;IACW;IAA7B,YAA6B,MAAc;QAAd,WAAM,G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