oblien 2.2.36 → 2.2.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -274
- package/dist/cdn.d.ts +105 -0
- package/dist/cdn.d.ts.map +1 -0
- package/dist/cdn.js +201 -0
- package/dist/cdn.js.map +1 -0
- package/dist/cli/commands/cdn.d.ts +3 -0
- package/dist/cli/commands/cdn.d.ts.map +1 -0
- package/dist/cli/commands/cdn.js +216 -0
- package/dist/cli/commands/cdn.js.map +1 -0
- package/dist/cli/commands/namespaces.js +19 -6
- package/dist/cli/commands/namespaces.js.map +1 -1
- package/dist/cli/commands/serve.d.ts +17 -0
- package/dist/cli/commands/serve.d.ts.map +1 -0
- package/dist/cli/commands/serve.js +113 -0
- package/dist/cli/commands/serve.js.map +1 -0
- package/dist/cli/commands/tunnel.d.ts +1 -0
- package/dist/cli/commands/tunnel.d.ts.map +1 -1
- package/dist/cli/commands/tunnel.js +100 -3
- package/dist/cli/commands/tunnel.js.map +1 -1
- package/dist/cli/index.js +14 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/client.d.ts +12 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +16 -1
- package/dist/client.js.map +1 -1
- package/dist/domain.d.ts +20 -1
- package/dist/domain.d.ts.map +1 -1
- package/dist/domain.js +37 -0
- package/dist/domain.js.map +1 -1
- package/dist/edge-proxy.d.ts +50 -11
- package/dist/edge-proxy.d.ts.map +1 -1
- package/dist/edge-proxy.js +55 -10
- package/dist/edge-proxy.js.map +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +145 -7
- package/dist/mcp/tools.js.map +1 -1
- package/dist/namespace.d.ts +27 -5
- package/dist/namespace.d.ts.map +1 -1
- package/dist/namespace.js +30 -4
- package/dist/namespace.js.map +1 -1
- package/dist/notifications.d.ts +72 -0
- package/dist/notifications.d.ts.map +1 -0
- package/dist/notifications.js +93 -0
- package/dist/notifications.js.map +1 -0
- package/dist/runtime/proxy.d.ts +55 -0
- package/dist/runtime/proxy.d.ts.map +1 -0
- package/dist/runtime/proxy.js +79 -0
- package/dist/runtime/proxy.js.map +1 -0
- package/dist/runtime.d.ts +16 -0
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +18 -0
- package/dist/runtime.js.map +1 -1
- package/dist/server/static.d.ts +81 -0
- package/dist/server/static.d.ts.map +1 -0
- package/dist/server/static.js +465 -0
- package/dist/server/static.js.map +1 -0
- package/dist/types/cdn.d.ts +301 -0
- package/dist/types/cdn.d.ts.map +1 -0
- package/dist/types/cdn.js +10 -0
- package/dist/types/cdn.js.map +1 -0
- package/dist/types/client.d.ts +10 -0
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/edge-proxy.d.ts +50 -1
- package/dist/types/edge-proxy.d.ts.map +1 -1
- package/dist/types/index.d.ts +6 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/namespace.d.ts +55 -9
- package/dist/types/namespace.d.ts.map +1 -1
- package/dist/types/notifications.d.ts +77 -0
- package/dist/types/notifications.d.ts.map +1 -0
- package/dist/types/notifications.js +3 -0
- package/dist/types/notifications.js.map +1 -0
- package/dist/types/webhooks.d.ts +52 -0
- package/dist/types/webhooks.d.ts.map +1 -0
- package/dist/types/webhooks.js +3 -0
- package/dist/types/webhooks.js.map +1 -0
- package/dist/types/workspace-resources.d.ts +48 -0
- package/dist/types/workspace-resources.d.ts.map +1 -1
- package/dist/webhooks.d.ts +53 -0
- package/dist/webhooks.d.ts.map +1 -0
- package/dist/webhooks.js +60 -0
- package/dist/webhooks.js.map +1 -0
- package/docs/analytics.md +36 -0
- package/docs/cdn.md +119 -0
- package/docs/domains.md +47 -0
- package/docs/edge-proxy.md +44 -0
- package/docs/edge-tunnel.md +42 -0
- package/docs/errors.md +34 -0
- package/docs/namespaces.md +69 -0
- package/docs/notifications.md +40 -0
- package/docs/pages.md +26 -0
- package/docs/runtime.md +83 -0
- package/docs/serve.md +84 -0
- package/docs/tokens.md +24 -0
- package/docs/webhooks.md +42 -0
- package/docs/workspaces.md +82 -0
- package/package.json +5 -2
package/dist/edge-proxy.d.ts
CHANGED
|
@@ -1,29 +1,37 @@
|
|
|
1
1
|
import type { HttpClient } from './http.js';
|
|
2
2
|
import type { ApiResponse } from './types/common.js';
|
|
3
|
-
import type { EdgeProxyData, EdgeProxyCreateParams, EdgeProxyUpdateParams, EdgeProxyListResponse } from './types/edge-proxy.js';
|
|
3
|
+
import type { EdgeProxyData, EdgeProxyCreateParams, EdgeProxyUpdateParams, EdgeProxyListResponse, EdgeProxyVerificationChallenge, EdgeProxyVerificationCheckResult, EdgeProxyVerificationListResponse } from './types/edge-proxy.js';
|
|
4
4
|
/**
|
|
5
|
-
* Edge proxy — route subdomains to external upstreams
|
|
5
|
+
* Edge proxy — route subdomains to external upstreams.
|
|
6
|
+
*
|
|
7
|
+
* A target must be **proven** before it can be routed: {@link create} and
|
|
8
|
+
* {@link update} reject an unverified target with `403 target_unverified`.
|
|
9
|
+
* Prove ownership ACME-style first:
|
|
6
10
|
*
|
|
7
11
|
* ```ts
|
|
8
12
|
* import Oblien from 'oblien';
|
|
9
13
|
* const client = new Oblien({ clientId, clientSecret });
|
|
10
14
|
*
|
|
11
|
-
* //
|
|
12
|
-
* const {
|
|
15
|
+
* // 1. Request a challenge for the target.
|
|
16
|
+
* const { verification } = await client.edgeProxy.requestVerification(
|
|
17
|
+
* 'https://internal-staging.example.com:8080',
|
|
18
|
+
* );
|
|
19
|
+
* // 2. Serve `verification.token` (HTTP 200) at `verification.path` on the target.
|
|
20
|
+
* // → see verification.instructions
|
|
21
|
+
* // 3. Prove it.
|
|
22
|
+
* const checked = await client.edgeProxy.checkVerification(verification.id);
|
|
23
|
+
* if (checked.verification.status !== 'verified') throw new Error(checked.verification.error);
|
|
13
24
|
*
|
|
14
|
-
* //
|
|
15
|
-
* const proxy = await client.edgeProxy.create({
|
|
25
|
+
* // 4. Now the proxy can be created against the proven target.
|
|
26
|
+
* const { proxy } = await client.edgeProxy.create({
|
|
16
27
|
* name: 'staging-api',
|
|
17
28
|
* slug: 'staging-api',
|
|
18
|
-
* domain: 'edge.example.com',
|
|
19
29
|
* target: 'https://internal-staging.example.com:8080',
|
|
20
30
|
* });
|
|
21
31
|
*
|
|
22
|
-
* // Toggle
|
|
32
|
+
* // Toggle / delete
|
|
23
33
|
* await client.edgeProxy.disable(proxy.id);
|
|
24
34
|
* await client.edgeProxy.enable(proxy.id);
|
|
25
|
-
*
|
|
26
|
-
* // Delete
|
|
27
35
|
* await client.edgeProxy.delete(proxy.id);
|
|
28
36
|
* ```
|
|
29
37
|
*/
|
|
@@ -31,6 +39,7 @@ export declare class EdgeProxy {
|
|
|
31
39
|
/** @internal */
|
|
32
40
|
readonly _http: HttpClient;
|
|
33
41
|
private readonly _base;
|
|
42
|
+
private readonly _verifyBase;
|
|
34
43
|
constructor(client: {
|
|
35
44
|
_http: HttpClient;
|
|
36
45
|
});
|
|
@@ -40,7 +49,13 @@ export declare class EdgeProxy {
|
|
|
40
49
|
get(proxyId: number): Promise<ApiResponse & {
|
|
41
50
|
proxy: EdgeProxyData;
|
|
42
51
|
}>;
|
|
43
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* Create a new edge proxy.
|
|
54
|
+
*
|
|
55
|
+
* The `target` must already be verified (see {@link requestVerification} /
|
|
56
|
+
* {@link checkVerification}) or this rejects with `403 target_unverified`.
|
|
57
|
+
* `domain` is optional and defaults to the platform default domain.
|
|
58
|
+
*/
|
|
44
59
|
create(params: EdgeProxyCreateParams): Promise<ApiResponse & {
|
|
45
60
|
proxy: EdgeProxyData;
|
|
46
61
|
}>;
|
|
@@ -58,5 +73,29 @@ export declare class EdgeProxy {
|
|
|
58
73
|
}>;
|
|
59
74
|
/** Permanently delete a proxy. */
|
|
60
75
|
delete(proxyId: number): Promise<ApiResponse>;
|
|
76
|
+
/**
|
|
77
|
+
* Request a verification challenge for a target. Returns a one-time token to
|
|
78
|
+
* serve (HTTP 200) at the returned `path` on the target, after which
|
|
79
|
+
* {@link checkVerification} proves ownership. Re-requesting resets the token.
|
|
80
|
+
*
|
|
81
|
+
* @param target - The upstream target to prove control of (URL or `host:port`).
|
|
82
|
+
*/
|
|
83
|
+
requestVerification(target: string): Promise<ApiResponse & {
|
|
84
|
+
verification: EdgeProxyVerificationChallenge;
|
|
85
|
+
}>;
|
|
86
|
+
/** List all target verifications for the authenticated user. */
|
|
87
|
+
listVerifications(): Promise<EdgeProxyVerificationListResponse>;
|
|
88
|
+
/**
|
|
89
|
+
* Run the verification check: the platform fetches the token from the target
|
|
90
|
+
* over an SSRF-safe pinned connection. On success the target becomes routable
|
|
91
|
+
* (the route is pinned to the validated IP).
|
|
92
|
+
*
|
|
93
|
+
* @param verificationId - The `id` returned by {@link requestVerification}.
|
|
94
|
+
*/
|
|
95
|
+
checkVerification(verificationId: number): Promise<ApiResponse & {
|
|
96
|
+
verification: EdgeProxyVerificationCheckResult;
|
|
97
|
+
}>;
|
|
98
|
+
/** Delete a verification record. */
|
|
99
|
+
deleteVerification(verificationId: number): Promise<ApiResponse>;
|
|
61
100
|
}
|
|
62
101
|
//# sourceMappingURL=edge-proxy.d.ts.map
|
package/dist/edge-proxy.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edge-proxy.d.ts","sourceRoot":"","sources":["../src/edge-proxy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EACV,aAAa,EACb,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,
|
|
1
|
+
{"version":3,"file":"edge-proxy.d.ts","sourceRoot":"","sources":["../src/edge-proxy.ts"],"names":[],"mappings":"AAAA,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AAC;IAI/E,kCAAkC;IAC5B,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAOnD;;;;;;OAMG;IACG,mBAAmB,CACvB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,WAAW,GAAG;QAAE,YAAY,EAAE,8BAA8B,CAAA;KAAE,CAAC;IAI1E,gEAAgE;IAC1D,iBAAiB,IAAI,OAAO,CAAC,iCAAiC,CAAC;IAIrE;;;;;;OAMG;IACG,iBAAiB,CACrB,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,WAAW,GAAG;QAAE,YAAY,EAAE,gCAAgC,CAAA;KAAE,CAAC;IAI5E,oCAAoC;IAC9B,kBAAkB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;CAGvE"}
|
package/dist/edge-proxy.js
CHANGED
|
@@ -1,26 +1,34 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Edge proxy — route subdomains to external upstreams
|
|
2
|
+
* Edge proxy — route subdomains to external upstreams.
|
|
3
|
+
*
|
|
4
|
+
* A target must be **proven** before it can be routed: {@link create} and
|
|
5
|
+
* {@link update} reject an unverified target with `403 target_unverified`.
|
|
6
|
+
* Prove ownership ACME-style first:
|
|
3
7
|
*
|
|
4
8
|
* ```ts
|
|
5
9
|
* import Oblien from 'oblien';
|
|
6
10
|
* const client = new Oblien({ clientId, clientSecret });
|
|
7
11
|
*
|
|
8
|
-
* //
|
|
9
|
-
* const {
|
|
12
|
+
* // 1. Request a challenge for the target.
|
|
13
|
+
* const { verification } = await client.edgeProxy.requestVerification(
|
|
14
|
+
* 'https://internal-staging.example.com:8080',
|
|
15
|
+
* );
|
|
16
|
+
* // 2. Serve `verification.token` (HTTP 200) at `verification.path` on the target.
|
|
17
|
+
* // → see verification.instructions
|
|
18
|
+
* // 3. Prove it.
|
|
19
|
+
* const checked = await client.edgeProxy.checkVerification(verification.id);
|
|
20
|
+
* if (checked.verification.status !== 'verified') throw new Error(checked.verification.error);
|
|
10
21
|
*
|
|
11
|
-
* //
|
|
12
|
-
* const proxy = await client.edgeProxy.create({
|
|
22
|
+
* // 4. Now the proxy can be created against the proven target.
|
|
23
|
+
* const { proxy } = await client.edgeProxy.create({
|
|
13
24
|
* name: 'staging-api',
|
|
14
25
|
* slug: 'staging-api',
|
|
15
|
-
* domain: 'edge.example.com',
|
|
16
26
|
* target: 'https://internal-staging.example.com:8080',
|
|
17
27
|
* });
|
|
18
28
|
*
|
|
19
|
-
* // Toggle
|
|
29
|
+
* // Toggle / delete
|
|
20
30
|
* await client.edgeProxy.disable(proxy.id);
|
|
21
31
|
* await client.edgeProxy.enable(proxy.id);
|
|
22
|
-
*
|
|
23
|
-
* // Delete
|
|
24
32
|
* await client.edgeProxy.delete(proxy.id);
|
|
25
33
|
* ```
|
|
26
34
|
*/
|
|
@@ -28,6 +36,7 @@ export class EdgeProxy {
|
|
|
28
36
|
/** @internal */
|
|
29
37
|
_http;
|
|
30
38
|
_base = '/edge/proxies';
|
|
39
|
+
_verifyBase = '/edge/verifications';
|
|
31
40
|
constructor(client) {
|
|
32
41
|
this._http = client._http;
|
|
33
42
|
}
|
|
@@ -39,7 +48,13 @@ export class EdgeProxy {
|
|
|
39
48
|
async get(proxyId) {
|
|
40
49
|
return this._http.request({ method: 'GET', path: `${this._base}/${proxyId}` });
|
|
41
50
|
}
|
|
42
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* Create a new edge proxy.
|
|
53
|
+
*
|
|
54
|
+
* The `target` must already be verified (see {@link requestVerification} /
|
|
55
|
+
* {@link checkVerification}) or this rejects with `403 target_unverified`.
|
|
56
|
+
* `domain` is optional and defaults to the platform default domain.
|
|
57
|
+
*/
|
|
43
58
|
async create(params) {
|
|
44
59
|
return this._http.request({ method: 'POST', path: this._base, body: params });
|
|
45
60
|
}
|
|
@@ -59,5 +74,35 @@ export class EdgeProxy {
|
|
|
59
74
|
async delete(proxyId) {
|
|
60
75
|
return this._http.request({ method: 'DELETE', path: `${this._base}/${proxyId}` });
|
|
61
76
|
}
|
|
77
|
+
// ── Target ownership verification ──────────────────────────────────
|
|
78
|
+
// ACME-style proof that you control a target before it can be routed.
|
|
79
|
+
/**
|
|
80
|
+
* Request a verification challenge for a target. Returns a one-time token to
|
|
81
|
+
* serve (HTTP 200) at the returned `path` on the target, after which
|
|
82
|
+
* {@link checkVerification} proves ownership. Re-requesting resets the token.
|
|
83
|
+
*
|
|
84
|
+
* @param target - The upstream target to prove control of (URL or `host:port`).
|
|
85
|
+
*/
|
|
86
|
+
async requestVerification(target) {
|
|
87
|
+
return this._http.request({ method: 'POST', path: this._verifyBase, body: { target } });
|
|
88
|
+
}
|
|
89
|
+
/** List all target verifications for the authenticated user. */
|
|
90
|
+
async listVerifications() {
|
|
91
|
+
return this._http.request({ method: 'GET', path: this._verifyBase });
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Run the verification check: the platform fetches the token from the target
|
|
95
|
+
* over an SSRF-safe pinned connection. On success the target becomes routable
|
|
96
|
+
* (the route is pinned to the validated IP).
|
|
97
|
+
*
|
|
98
|
+
* @param verificationId - The `id` returned by {@link requestVerification}.
|
|
99
|
+
*/
|
|
100
|
+
async checkVerification(verificationId) {
|
|
101
|
+
return this._http.request({ method: 'POST', path: `${this._verifyBase}/${verificationId}/check` });
|
|
102
|
+
}
|
|
103
|
+
/** Delete a verification record. */
|
|
104
|
+
async deleteVerification(verificationId) {
|
|
105
|
+
return this._http.request({ method: 'DELETE', path: `${this._verifyBase}/${verificationId}` });
|
|
106
|
+
}
|
|
62
107
|
}
|
|
63
108
|
//# sourceMappingURL=edge-proxy.js.map
|
package/dist/edge-proxy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edge-proxy.js","sourceRoot":"","sources":["../src/edge-proxy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"edge-proxy.js","sourceRoot":"","sources":["../src/edge-proxy.ts"],"names":[],"mappings":"AAY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,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,WAAW,IAAI,cAAc,EAAE,EAAE,CAAC,CAAC;IACjG,CAAC;CACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -8,13 +8,20 @@ export { Pages } from './pages.js';
|
|
|
8
8
|
export { Pages as Sites } from './pages.js';
|
|
9
9
|
export { EdgeProxy } from './edge-proxy.js';
|
|
10
10
|
export { EdgeTunnel } from './edge-tunnel.js';
|
|
11
|
+
export { Notifications } from './notifications.js';
|
|
12
|
+
export { Webhooks } from './webhooks.js';
|
|
11
13
|
export { TunnelClient } from './tunnel/client.js';
|
|
12
14
|
export type { TunnelClientOptions } from './tunnel/client.js';
|
|
15
|
+
export { startStaticServer, createStaticServer, createStaticHandler } from './server/static.js';
|
|
16
|
+
export type { StaticServerOptions, StaticServerHandle } from './server/static.js';
|
|
13
17
|
export { Domain } from './domain.js';
|
|
14
18
|
export { Tokens } from './tokens.js';
|
|
15
19
|
export { Analytics } from './analytics.js';
|
|
20
|
+
export { Cdn } from './cdn.js';
|
|
16
21
|
export { Runtime } from './runtime.js';
|
|
17
22
|
export { RuntimeWebSocket } from './runtime/ws.js';
|
|
23
|
+
export { RuntimeProxy } from './runtime/proxy.js';
|
|
24
|
+
export type { ProxyFetchInit } from './runtime/proxy.js';
|
|
18
25
|
export { OblienError, AuthenticationError, NotFoundError, RateLimitError, ValidationError, PaymentRequiredError, ConflictError, } from './error.js';
|
|
19
|
-
export type { OblienOptions, RequestOptions, ApiResponse, WorkspaceCreateParams, WorkspaceUpdateParams, WorkspaceListParams, WorkspaceListResponse, WorkspaceData, ResourceSpec, LifecycleSpec, NetworkSpec, FirewallRule, PrivateLink, RuntimeOptions, FileListParams, FileEntry, FileListResponse, FileReadParams, FileReadResponse, FileWriteParams, FileWriteResponse, FileMkdirParams, FileStatParams, FileStatResponse, FileDeleteParams, ContentSearchParams, SearchMatch, ContentSearchResponse, FileSearchParams, FileSearchResponse, SearchStatusResponse, SearchInitResponse, ExecRunParams, ExecTask, ExecListResponse, ExecStreamEvent, TerminalCreateParams, TerminalSession, TerminalListResponse, TerminalScrollbackResponse, WatcherCreateParams, WatcherInfo, WatcherListResponse, WSOptions, WSMessage, WSTerminalResize, WSTerminalExit, WSTerminalEvent, WSWatcherChange, WSWatcherReady, WSWatcherOverflow, WSWatcherEvent, TransferProgress, TransferDownloadParams, TransferUploadParams, TransferUploadResponse, LifecycleStatus, MakeTemporaryParams, UpdateTtlParams, SshStatus, SshPasswordParams, SshKeyParams, PublicAccessPort, ExposePortParams, UpdateSlugParams, SnapshotParams, ArchiveCreateParams, ArchiveInfo, WorkloadCreateParams, WorkloadUpdateParams, WorkloadInfo, WorkloadListParams, UsageParams, UpdateResourcesParams, UpdateMetadataParams, ApiAccessStatus, RawTokenResponse, NetworkUpdateParams, NetworkConfig, LogsParams, LogFile, LogStreamEvent, StatsEvent, WorkloadStatsEvent, WorkloadLogEntry, ImagesListParams, DomainInfo, ConnectDomainParams, ConnectDomainResponse, CheckDNSParams, CheckDNSResponse, RenewSSLResponse, CheckSlugParams, CheckSlugResponse, VerifyDomainParams, VerifyDomainResponse, PageData, PageCreateParams, PageDeployParams, PageUpdateParams, PageListResponse, PageDomainResponse, PageDNSCheckResponse, PageSSLRenewResponse, SiteData, SiteCreateParams, SiteUpdateParams, SiteListResponse, EdgeProxyData, EdgeProxyCreateParams, EdgeProxyUpdateParams, EdgeProxyListResponse, EdgeTunnelSSLState, EdgeTunnelData, EdgeTunnelCreateParams, EdgeTunnelCheckDomainParams, EdgeTunnelCheckDomainResponse, EdgeTunnelUpdateParams, EdgeTunnelListResponse, EdgeTunnelIssueTokenParams, EdgeTunnelTokenResponse, EdgeTunnelSSLRenewResponse, NamespaceStatus, NamespaceType, NamespaceResourceLimits, NamespaceData, NamespaceCreateParams, NamespaceEnsureParams, NamespaceEnsureResponse, NamespaceUpdateParams, NamespaceListParams, NamespaceListResponse, NamespaceActivity, NamespaceActivityParams, NamespaceUsageParams,
|
|
26
|
+
export type { OblienOptions, RequestOptions, ApiResponse, WorkspaceCreateParams, WorkspaceUpdateParams, WorkspaceListParams, WorkspaceListResponse, WorkspaceData, ResourceSpec, LifecycleSpec, NetworkSpec, FirewallRule, PrivateLink, RuntimeOptions, FileListParams, FileEntry, FileListResponse, FileReadParams, FileReadResponse, FileWriteParams, FileWriteResponse, FileMkdirParams, FileStatParams, FileStatResponse, FileDeleteParams, ContentSearchParams, SearchMatch, ContentSearchResponse, FileSearchParams, FileSearchResponse, SearchStatusResponse, SearchInitResponse, ExecRunParams, ExecTask, ExecListResponse, ExecStreamEvent, TerminalCreateParams, TerminalSession, TerminalListResponse, TerminalScrollbackResponse, WatcherCreateParams, WatcherInfo, WatcherListResponse, WSOptions, WSMessage, WSTerminalResize, WSTerminalExit, WSTerminalEvent, WSWatcherChange, WSWatcherReady, WSWatcherOverflow, WSWatcherEvent, TransferProgress, TransferDownloadParams, TransferUploadParams, TransferUploadResponse, LifecycleStatus, MakeTemporaryParams, UpdateTtlParams, SshStatus, SshPasswordParams, SshKeyParams, PublicAccessPort, ExposePortParams, UpdateSlugParams, SnapshotParams, ArchiveCreateParams, ArchiveInfo, WorkloadCreateParams, WorkloadUpdateParams, WorkloadInfo, WorkloadListParams, UsageParams, UpdateResourcesParams, UpdateMetadataParams, ApiAccessStatus, RawTokenResponse, NetworkUpdateParams, NetworkConfig, LogsParams, LogFile, LogStreamEvent, StatsEvent, WorkloadStatsEvent, WorkloadLogEntry, ImagesListParams, DomainInfo, ConnectDomainParams, ConnectDomainResponse, CheckDNSParams, CheckDNSResponse, RenewSSLResponse, CheckSlugParams, CheckSlugResponse, VerifyDomainParams, VerifyDomainResponse, DomainListParams, DomainRoute, DomainRoutesResponse, SslCertificate, SslListResponse, SslAutoRenewResponse, PageData, PageCreateParams, PageDeployParams, PageUpdateParams, PageListResponse, PageDomainResponse, PageDNSCheckResponse, PageSSLRenewResponse, SiteData, SiteCreateParams, SiteUpdateParams, SiteListResponse, EdgeProxyData, EdgeProxyCreateParams, EdgeProxyUpdateParams, EdgeProxyListResponse, EdgeProxyVerificationStatus, EdgeProxyVerification, EdgeProxyVerificationChallenge, EdgeProxyVerificationCheckResult, EdgeProxyVerificationListResponse, EdgeTunnelSSLState, EdgeTunnelData, EdgeTunnelCreateParams, EdgeTunnelCheckDomainParams, EdgeTunnelCheckDomainResponse, EdgeTunnelUpdateParams, EdgeTunnelListResponse, EdgeTunnelIssueTokenParams, EdgeTunnelTokenResponse, EdgeTunnelSSLRenewResponse, PushPlatform, PushDeviceStatus, PushTokenStatus, PushDevice, RegisterDeviceParams, PushDeviceListResponse, WorkspacePushToken, CreatedWorkspacePushToken, CreatePushTokenParams, PushTokenListResponse, SendNotificationParams, SendNotificationResponse, WebhookEvent, Webhook, WebhookCreateParams, WebhookUpdateParams, WebhookListParams, WebhookListResponse, WebhookEventsResponse, NamespaceStatus, NamespaceType, NamespaceResourceLimits, NamespaceData, NamespaceCreateParams, NamespaceEnsureParams, NamespaceEnsureResponse, NamespaceUpdateParams, NamespaceListParams, NamespaceListResponse, NamespaceActivity, NamespaceActivityParams, NamespaceUsageParams, NamespaceUsageUnitsParams, NamespaceUsageUnitBucket, NamespaceUsageUnits, NamespaceDeleteParams, OverdraftAction, NamespaceQuota, SetNamespaceQuotaParams, ResetNamespaceQuotaParams, NamespaceListWithQuotasParams, NamespaceDetailsParams, DefaultQuotaConfig, SetDefaultQuotaParams, ToggleDefaultQuotaAutoApplyParams, DeleteDefaultQuotaParams, AnalyticsOverview, AnalyticsDomainSummary, AnalyticsHomeSummary, AnalyticsBucket, AnalyticsTimeseriesParams, AnalyticsTimeseriesResponse, AnalyticsGeoEntry, AnalyticsGeoParams, AnalyticsGeoResponse, AnalyticsRequestEntry, AnalyticsRequestsParams, AnalyticsRequestsResponse, AnalyticsStreamTokenResponse, CdnTokenScope, CdnFile, CdnTokenParams, CdnTokenResponse, CdnUploadInput, CdnUploadParams, CdnUploadVariant, CdnUploadResponse, CdnUploadManyResponse, CdnProcessUrlsParams, CdnProcessUrlsResponse, CdnLimitsResponse, CdnVariantOptionsResponse, CdnListParams, CdnPagination, CdnListResponse, CdnStatsParams, CdnStats, CdnStatsResponse, CdnFileResponse, } from './types/index.js';
|
|
20
27
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC;AAGhD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,6CAA6C;AAC7C,OAAO,EAAE,KAAK,IAAI,KAAK,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","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vB,yBAAyB,EACzB,6BAA6B,EAC7B,sBAAsB,EACtB,kBAAkB,EAClB,qBAAqB,EACrB,iCAAiC,EACjC,wBAAwB,EAExB,iBAAiB,EACjB,sBAAsB,EACtB,oBAAoB,EACpB,eAAe,EACf,yBAAyB,EACzB,2BAA2B,EAC3B,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,EACvB,yBAAyB,EACzB,4BAA4B,EAE5B,aAAa,EACb,OAAO,EACP,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,yBAAyB,EACzB,aAAa,EACb,aAAa,EACb,eAAe,EACf,cAAc,EACd,QAAQ,EACR,gBAAgB,EAChB,eAAe,GAChB,MAAM,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -10,12 +10,17 @@ export { Pages } from './pages.js';
|
|
|
10
10
|
export { Pages as Sites } from './pages.js';
|
|
11
11
|
export { EdgeProxy } from './edge-proxy.js';
|
|
12
12
|
export { EdgeTunnel } from './edge-tunnel.js';
|
|
13
|
+
export { Notifications } from './notifications.js';
|
|
14
|
+
export { Webhooks } from './webhooks.js';
|
|
13
15
|
export { TunnelClient } from './tunnel/client.js';
|
|
16
|
+
export { startStaticServer, createStaticServer, createStaticHandler } from './server/static.js';
|
|
14
17
|
export { Domain } from './domain.js';
|
|
15
18
|
export { Tokens } from './tokens.js';
|
|
16
19
|
export { Analytics } from './analytics.js';
|
|
20
|
+
export { Cdn } from './cdn.js';
|
|
17
21
|
export { Runtime } from './runtime.js';
|
|
18
22
|
export { RuntimeWebSocket } from './runtime/ws.js';
|
|
23
|
+
export { RuntimeProxy } from './runtime/proxy.js';
|
|
19
24
|
// Errors
|
|
20
25
|
export { OblienError, AuthenticationError, NotFoundError, RateLimitError, ValidationError, PaymentRequiredError, ConflictError, } from './error.js';
|
|
21
26
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC;AAEhD,sEAAsE;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,6CAA6C;AAC7C,OAAO,EAAE,KAAK,IAAI,KAAK,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC;AAEhD,sEAAsE;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,6CAA6C;AAC7C,OAAO,EAAE,KAAK,IAAI,KAAK,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEhG,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD,SAAS;AACT,OAAO,EACL,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,aAAa,GACd,MAAM,YAAY,CAAC"}
|
package/dist/mcp/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/mcp/tools.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/mcp/tools.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAmC3C,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,QA2xB9D"}
|
package/dist/mcp/tools.js
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { readFileSync } from 'node:fs';
|
|
3
|
+
import { basename, extname } from 'node:path';
|
|
2
4
|
// ── Helpers ──────────────────────────────────────────────────────────
|
|
5
|
+
const CDN_MIME_BY_EXT = {
|
|
6
|
+
'.png': 'image/png', '.jpg': 'image/jpeg', '.jpeg': 'image/jpeg', '.gif': 'image/gif',
|
|
7
|
+
'.webp': 'image/webp', '.svg': 'image/svg+xml', '.pdf': 'application/pdf',
|
|
8
|
+
'.json': 'application/json', '.txt': 'text/plain', '.csv': 'text/csv',
|
|
9
|
+
'.mp4': 'video/mp4', '.webm': 'video/webm', '.mp3': 'audio/mpeg',
|
|
10
|
+
};
|
|
11
|
+
function cdnMime(filename) {
|
|
12
|
+
return CDN_MIME_BY_EXT[extname(filename).toLowerCase()] || 'application/octet-stream';
|
|
13
|
+
}
|
|
3
14
|
function wrap(fn) {
|
|
4
15
|
return fn()
|
|
5
16
|
.then(r => ({ content: [{ type: 'text', text: JSON.stringify(r, null, 2) }] }))
|
|
@@ -442,7 +453,7 @@ export function registerTools(server, client) {
|
|
|
442
453
|
slug: pageSlug,
|
|
443
454
|
}, (args) => wrap(() => pg.renewSSL(args.slug)));
|
|
444
455
|
// ════════════════════════════════════════════════════════════════════
|
|
445
|
-
// Domain —
|
|
456
|
+
// Domain — pre-flight, routes + SSL (5 tools)
|
|
446
457
|
// ════════════════════════════════════════════════════════════════════
|
|
447
458
|
const dm = client.domain;
|
|
448
459
|
reg(server, 'domain_check_slug', 'Check whether a slug is available on a wildcard domain (no DNS verification).', {
|
|
@@ -453,20 +464,31 @@ export function registerTools(server, client) {
|
|
|
453
464
|
domain: z.string().describe('Custom domain to verify (e.g. app.example.com)'),
|
|
454
465
|
resource_id: z.string().optional().describe('Workspace or page ID for TXT ownership check'),
|
|
455
466
|
}, (args) => wrap(() => dm.verify(args)));
|
|
456
|
-
|
|
457
|
-
|
|
467
|
+
reg(server, 'domain_list_routes', 'List all registered routes (ports, pages, edge proxies/tunnels, custom domains) and the resource each is bound to. Optionally filter by namespace.', {
|
|
468
|
+
namespace: z.string().optional().describe('Filter to a namespace (admin only; scoped keys auto-pinned)'),
|
|
469
|
+
}, (args) => wrap(() => dm.routes(args)));
|
|
470
|
+
reg(server, 'domain_list_ssls', 'List the caller\'s SSL certificates with renewal status (expiry, auto_renew, last error). Optionally filter by namespace.', {
|
|
471
|
+
namespace: z.string().optional().describe('Filter to a namespace (admin only; scoped keys auto-pinned)'),
|
|
472
|
+
}, (args) => wrap(() => dm.ssls(args)));
|
|
473
|
+
reg(server, 'domain_set_ssl_auto_renew', 'Enable or disable automatic SSL renewal for a domain you own.', {
|
|
474
|
+
domain: z.string().describe('Certificate domain'),
|
|
475
|
+
enabled: z.boolean().describe('true to auto-renew, false to opt out'),
|
|
476
|
+
}, ({ domain, enabled }) => wrap(() => dm.setSslAutoRenew(domain, enabled)));
|
|
477
|
+
// ════════════════════════════════════════════════════════════════════
|
|
478
|
+
// Edge Proxy (11 tools)
|
|
458
479
|
// ════════════════════════════════════════════════════════════════════
|
|
459
480
|
const ep = client.edgeProxy;
|
|
460
481
|
const proxyId = z.number().describe('Edge proxy ID');
|
|
461
|
-
|
|
482
|
+
const verificationId = z.number().describe('Verification ID (from edge_proxy_verify_request)');
|
|
483
|
+
reg(server, 'edge_proxy_list', 'List all edge proxies', {}, () => wrap(() => ep.list()));
|
|
462
484
|
reg(server, 'edge_proxy_get', 'Get an edge proxy by ID', {
|
|
463
485
|
proxy_id: proxyId,
|
|
464
486
|
}, (args) => wrap(() => ep.get(args.proxy_id)));
|
|
465
|
-
reg(server, 'edge_proxy_create', 'Create a new edge proxy (
|
|
487
|
+
reg(server, 'edge_proxy_create', 'Create a new edge proxy. The target must already be verified (edge_proxy_verify_request → edge_proxy_verify_check) or this fails with target_unverified.', {
|
|
466
488
|
name: z.string().describe('Proxy name'),
|
|
467
489
|
slug: z.string().describe('Subdomain slug'),
|
|
468
|
-
domain: z.string().describe('Base domain
|
|
469
|
-
target: z.string().describe('Target URL or host:port to route to'),
|
|
490
|
+
domain: z.string().optional().describe('Base domain (optional — defaults to the platform default domain)'),
|
|
491
|
+
target: z.string().describe('Target URL or host:port to route to (must be verified)'),
|
|
470
492
|
}, (args) => wrap(() => ep.create(args)));
|
|
471
493
|
reg(server, 'edge_proxy_update', 'Update an edge proxy', {
|
|
472
494
|
proxy_id: proxyId,
|
|
@@ -483,5 +505,121 @@ export function registerTools(server, client) {
|
|
|
483
505
|
reg(server, 'edge_proxy_delete', 'Permanently delete an edge proxy', {
|
|
484
506
|
proxy_id: proxyId,
|
|
485
507
|
}, (args) => wrap(() => ep.delete(args.proxy_id)));
|
|
508
|
+
// ── Target ownership verification ──
|
|
509
|
+
reg(server, 'edge_proxy_verify_request', 'Request a target ownership challenge. Returns a token to serve at the given path on the target, then call edge_proxy_verify_check.', {
|
|
510
|
+
target: z.string().describe('Upstream target to prove control of (URL or host:port)'),
|
|
511
|
+
}, (args) => wrap(() => ep.requestVerification(args.target)));
|
|
512
|
+
reg(server, 'edge_proxy_verify_list', 'List all target ownership verifications', {}, () => wrap(() => ep.listVerifications()));
|
|
513
|
+
reg(server, 'edge_proxy_verify_check', 'Run the verification check — the platform fetches the token from the target. On success the target becomes routable.', {
|
|
514
|
+
verification_id: verificationId,
|
|
515
|
+
}, (args) => wrap(() => ep.checkVerification(args.verification_id)));
|
|
516
|
+
reg(server, 'edge_proxy_verify_delete', 'Delete a target verification record', {
|
|
517
|
+
verification_id: verificationId,
|
|
518
|
+
}, (args) => wrap(() => ep.deleteVerification(args.verification_id)));
|
|
519
|
+
// ════════════════════════════════════════════════════════════════════
|
|
520
|
+
// Notifications — mobile push (8 tools)
|
|
521
|
+
// ════════════════════════════════════════════════════════════════════
|
|
522
|
+
const nt = client.notifications;
|
|
523
|
+
reg(server, 'notification_register_device', 'Register (or refresh) a mobile device. Token is FCM-validated before storage.', {
|
|
524
|
+
device_id: z.string().describe('Stable app-provided device identifier'),
|
|
525
|
+
fcm_token: z.string().describe('Device FCM/APNs registration token'),
|
|
526
|
+
platform: z.enum(['ios', 'android', 'web']).optional().describe('Device platform'),
|
|
527
|
+
device_info: z.record(z.string(), z.any()).optional().describe('Arbitrary device metadata'),
|
|
528
|
+
}, (args) => wrap(() => nt.registerDevice(args)));
|
|
529
|
+
reg(server, 'notification_list_devices', 'List the user\'s registered devices', {}, () => wrap(() => nt.listDevices()));
|
|
530
|
+
reg(server, 'notification_remove_device', 'Remove a registered device', {
|
|
531
|
+
device_id: z.number().describe('Device ID'),
|
|
532
|
+
}, (args) => wrap(() => nt.removeDevice(args.device_id)));
|
|
533
|
+
reg(server, 'notification_create_token', 'Create a per-workspace virtual send token. The plaintext token is returned ONCE.', {
|
|
534
|
+
workspace_id: z.string().describe('Workspace this token sends for'),
|
|
535
|
+
name: z.string().optional().describe('Label'),
|
|
536
|
+
metadata: z.record(z.string(), z.any()).optional().describe('Arbitrary metadata (e.g. channel, device_id)'),
|
|
537
|
+
}, (args) => wrap(() => nt.createToken(args)));
|
|
538
|
+
reg(server, 'notification_list_tokens', 'List virtual send tokens, optionally filtered to a workspace', {
|
|
539
|
+
workspace_id: z.string().optional().describe('Filter to one workspace'),
|
|
540
|
+
}, (args) => wrap(() => nt.listTokens(args.workspace_id)));
|
|
541
|
+
reg(server, 'notification_revoke_token', 'Revoke a virtual send token (keeps the record)', {
|
|
542
|
+
token_id: z.number().describe('Token ID'),
|
|
543
|
+
}, (args) => wrap(() => nt.revokeToken(args.token_id)));
|
|
544
|
+
reg(server, 'notification_delete_token', 'Permanently delete a virtual send token', {
|
|
545
|
+
token_id: z.number().describe('Token ID'),
|
|
546
|
+
}, (args) => wrap(() => nt.deleteToken(args.token_id)));
|
|
547
|
+
reg(server, 'notification_send', 'Send a push notification using a virtual send token. Fans out to the token owner\'s devices.', {
|
|
548
|
+
token: z.string().describe('Virtual send token (plaintext)'),
|
|
549
|
+
title: z.string().optional().describe('Notification title'),
|
|
550
|
+
body: z.string().optional().describe('Notification body'),
|
|
551
|
+
data: z.record(z.string(), z.any()).optional().describe('Arbitrary data payload'),
|
|
552
|
+
}, ({ token, ...params }) => wrap(() => nt.send(token, params)));
|
|
553
|
+
// ════════════════════════════════════════════════════════════════════
|
|
554
|
+
// Webhooks (5 tools)
|
|
555
|
+
// ════════════════════════════════════════════════════════════════════
|
|
556
|
+
const wh = client.webhooks;
|
|
557
|
+
reg(server, 'webhook_list', 'List webhooks, optionally filtered by namespace.', {
|
|
558
|
+
namespace: z.string().optional().describe('Filter to a namespace (scoped keys auto-pinned)'),
|
|
559
|
+
}, (args) => wrap(() => wh.list(args)));
|
|
560
|
+
reg(server, 'webhook_events', 'List the event types a webhook can subscribe to.', {}, () => wrap(() => wh.events()));
|
|
561
|
+
reg(server, 'webhook_create', 'Create a webhook. Set namespace to scope it to one namespace\'s events, or omit for account-wide.', {
|
|
562
|
+
url: z.string().describe('HTTPS endpoint to POST events to'),
|
|
563
|
+
events: z.array(z.string()).describe('Event types to subscribe to'),
|
|
564
|
+
secret: z.string().optional().describe('HMAC-SHA256 signing secret'),
|
|
565
|
+
description: z.string().optional().describe('Label'),
|
|
566
|
+
namespace: z.string().optional().describe('Scope to one namespace (omit = account-wide)'),
|
|
567
|
+
}, (args) => wrap(() => wh.create(args)));
|
|
568
|
+
reg(server, 'webhook_update', 'Update a webhook (url, events, secret, description, namespace, active).', {
|
|
569
|
+
id: z.number().describe('Webhook ID'),
|
|
570
|
+
url: z.string().optional(),
|
|
571
|
+
events: z.array(z.string()).optional(),
|
|
572
|
+
secret: z.string().nullable().optional(),
|
|
573
|
+
description: z.string().nullable().optional(),
|
|
574
|
+
namespace: z.string().nullable().optional().describe('Namespace to scope to, or null for account-wide'),
|
|
575
|
+
active: z.boolean().optional(),
|
|
576
|
+
}, ({ id, ...params }) => wrap(() => wh.update(id, params)));
|
|
577
|
+
reg(server, 'webhook_delete', 'Delete a webhook.', {
|
|
578
|
+
id: z.number().describe('Webhook ID'),
|
|
579
|
+
}, (args) => wrap(() => wh.delete(args.id)));
|
|
580
|
+
// ── Per-namespace raw metered usage units (external billing) ──
|
|
581
|
+
reg(server, 'namespace_usage_units', 'Per-namespace RAW metered usage units (cpu_time_minutes, memory_gb_minutes, disk_io_gb, network_gb + derived vcpu_hours/gb_hours) over a time range, bucketed. For external billing with your own rates.', {
|
|
582
|
+
namespace: z.string().describe('Namespace id or slug'),
|
|
583
|
+
from: z.string().optional().describe('ISO8601 range start (default: 30 days ago)'),
|
|
584
|
+
to: z.string().optional().describe('ISO8601 range end (default: now)'),
|
|
585
|
+
groupBy: z.enum(['hour', 'day']).optional().describe('Bucket granularity (default day)'),
|
|
586
|
+
}, ({ namespace, ...params }) => wrap(() => client.namespaces.usageUnits(namespace, params)));
|
|
587
|
+
// ════════════════════════════════════════════════════════════════════
|
|
588
|
+
// CDN — upload tokens, file uploads, and management (namespace-aware, 8 tools)
|
|
589
|
+
// ════════════════════════════════════════════════════════════════════
|
|
590
|
+
const cd = client.cdn;
|
|
591
|
+
const cdnNamespace = z.string().optional().describe('Namespace slug to scope the operation to');
|
|
592
|
+
reg(server, 'cdn_token', 'Mint a short-lived USER-scope CDN upload token', {
|
|
593
|
+
namespace: cdnNamespace,
|
|
594
|
+
}, (args) => wrap(() => cd.token({ namespace: args.namespace })));
|
|
595
|
+
reg(server, 'cdn_upload', 'Upload a local file to the CDN (reads the file from disk)', {
|
|
596
|
+
path: z.string().describe('Local file path to upload'),
|
|
597
|
+
namespace: cdnNamespace,
|
|
598
|
+
content_type: z.string().optional().describe('MIME type (inferred from extension if omitted)'),
|
|
599
|
+
}, (args) => wrap(async () => {
|
|
600
|
+
const data = readFileSync(args.path);
|
|
601
|
+
const filename = basename(args.path);
|
|
602
|
+
return cd.upload({ data, filename, contentType: args.content_type || cdnMime(filename) }, { namespace: args.namespace });
|
|
603
|
+
}));
|
|
604
|
+
reg(server, 'cdn_list', 'List logged CDN files, optionally filtered by namespace', {
|
|
605
|
+
namespace: cdnNamespace,
|
|
606
|
+
page: z.number().optional().describe('Page number'),
|
|
607
|
+
limit: z.number().optional().describe('Results per page (max 100)'),
|
|
608
|
+
include_deleted: z.boolean().optional().describe('Include soft-deleted files'),
|
|
609
|
+
upload_type: z.enum(['upload', 'url']).optional().describe('Filter by upload type'),
|
|
610
|
+
}, (args) => wrap(() => cd.list(args)));
|
|
611
|
+
reg(server, 'cdn_stats', 'Get CDN storage statistics, optionally scoped to a namespace', {
|
|
612
|
+
namespace: cdnNamespace,
|
|
613
|
+
}, (args) => wrap(() => cd.stats({ namespace: args.namespace })));
|
|
614
|
+
reg(server, 'cdn_limits', 'Get the CDN upload size and count limits', {}, () => wrap(() => cd.getLimits()));
|
|
615
|
+
reg(server, 'cdn_get', 'Get a single logged CDN file by id', {
|
|
616
|
+
file_id: z.union([z.string(), z.number()]).describe('CDN file id'),
|
|
617
|
+
}, (args) => wrap(() => cd.get(args.file_id)));
|
|
618
|
+
reg(server, 'cdn_delete', 'Soft-delete a logged CDN file', {
|
|
619
|
+
file_id: z.union([z.string(), z.number()]).describe('CDN file id'),
|
|
620
|
+
}, (args) => wrap(() => cd.delete(args.file_id)));
|
|
621
|
+
reg(server, 'cdn_restore', 'Restore a soft-deleted CDN file', {
|
|
622
|
+
file_id: z.union([z.string(), z.number()]).describe('CDN file id'),
|
|
623
|
+
}, (args) => wrap(() => cd.restore(args.file_id)));
|
|
486
624
|
}
|
|
487
625
|
//# sourceMappingURL=tools.js.map
|