@run402/sdk 1.54.4 → 1.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -3
- package/core-dist/allowance-auth.d.ts +9 -2
- package/core-dist/allowance-auth.js +42 -22
- package/dist/ci-credentials.d.ts +22 -0
- package/dist/ci-credentials.d.ts.map +1 -0
- package/dist/ci-credentials.js +103 -0
- package/dist/ci-credentials.js.map +1 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/namespaces/apps.d.ts +11 -4
- package/dist/namespaces/apps.d.ts.map +1 -1
- package/dist/namespaces/apps.js +73 -9
- package/dist/namespaces/apps.js.map +1 -1
- package/dist/namespaces/ci.d.ts +21 -0
- package/dist/namespaces/ci.d.ts.map +1 -0
- package/dist/namespaces/ci.js +256 -0
- package/dist/namespaces/ci.js.map +1 -0
- package/dist/namespaces/ci.types.d.ts +91 -0
- package/dist/namespaces/ci.types.d.ts.map +1 -0
- package/dist/namespaces/ci.types.js +8 -0
- package/dist/namespaces/ci.types.js.map +1 -0
- package/dist/namespaces/deploy.d.ts.map +1 -1
- package/dist/namespaces/deploy.js +145 -30
- package/dist/namespaces/deploy.js.map +1 -1
- package/dist/namespaces/deploy.types.d.ts +24 -9
- package/dist/namespaces/deploy.types.d.ts.map +1 -1
- package/dist/namespaces/secrets.d.ts +3 -2
- package/dist/namespaces/secrets.d.ts.map +1 -1
- package/dist/namespaces/secrets.js +45 -5
- package/dist/namespaces/secrets.js.map +1 -1
- package/dist/node/ci.d.ts +12 -0
- package/dist/node/ci.d.ts.map +1 -0
- package/dist/node/ci.js +30 -0
- package/dist/node/ci.js.map +1 -0
- package/dist/node/index.d.ts +7 -2
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +3 -2
- package/dist/node/index.js.map +1 -1
- package/dist/type-contract.d.ts +2 -0
- package/dist/type-contract.d.ts.map +1 -0
- package/dist/type-contract.js +2 -0
- package/dist/type-contract.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -54,12 +54,13 @@ const r = new Run402({
|
|
|
54
54
|
|
|
55
55
|
The `CredentialsProvider` interface has two required methods (`getAuth`, `getProject`) plus optional ones (`saveProject`, `removeProject`, `setActiveProject`, `readAllowance`, `saveAllowance`, …) for hosts that want full sticky-default behavior.
|
|
56
56
|
|
|
57
|
-
## Namespaces (
|
|
57
|
+
## Namespaces (20)
|
|
58
58
|
|
|
59
59
|
| Namespace | Highlights |
|
|
60
60
|
|---|---|
|
|
61
61
|
| `projects` | `provision`, `delete`, `list`, `sql`, `rest`, `applyExpose`, `getExpose`, `getUsage`, `getSchema`, `info`, `keys`, `use`, `active`, `pin`, `getQuote` |
|
|
62
62
|
| `deploy` | **The unified deploy primitive (v1.34+).** `apply` / `start` / `resume` / `status` / `list` / `events` / `getRelease` / `diff` / `plan` / `upload` / `commit` |
|
|
63
|
+
| `ci` | GitHub Actions OIDC federation over `/ci/v1/*`: `createBinding`, `listBindings`, `getBinding`, `revokeBinding`, `exchangeToken`; plus canonical delegation helpers |
|
|
63
64
|
| `sites` | `deployDir` — Node entry only (`@run402/sdk/node`); thin wrapper over `r.deploy.apply` |
|
|
64
65
|
| `blobs` | `put` (returns `AssetRef` with `cdnUrl` / `sri` / `etag` / `cacheKind` and `scriptTag()`/`linkTag()`/`imgTag()` emitters), `get`, `ls`, `rm`, `sign`, `diagnoseUrl`, `waitFresh` |
|
|
65
66
|
| `functions` | `deploy`, `invoke`, `logs`, `update`, `list`, `delete` |
|
|
@@ -129,7 +130,7 @@ const logo = await r.blobs.put(projectId, "logo.png", { bytes });
|
|
|
129
130
|
|
|
130
131
|
### Unified deploy (v1.34+) — `r.deploy.apply`
|
|
131
132
|
|
|
132
|
-
The canonical primitive for any deploy (database + migrations + manifest +
|
|
133
|
+
The canonical primitive for any deploy (database + migrations + manifest + value-free secret declarations + functions + site + subdomain). Three layers:
|
|
133
134
|
|
|
134
135
|
```ts
|
|
135
136
|
// One-shot — most agents use this.
|
|
@@ -145,7 +146,8 @@ const resumed = await r.deploy.resume(operationId);
|
|
|
145
146
|
```
|
|
146
147
|
|
|
147
148
|
- **All bytes ride through CAS.** The plan request body never carries inline bytes — only `ContentRef` objects. When the spec exceeds 5 MB JSON, the SDK uploads the manifest itself as a CAS object (`manifest_ref` escape hatch).
|
|
148
|
-
- **Per-resource semantics on the spec.** `site.replace` = "this is the whole site" (files absent are removed). `site.patch.put` / `patch.delete` are surgical updates. `functions.replace` / `functions.patch.set` / `functions.patch.delete` mirror that. `secrets.set
|
|
149
|
+
- **Per-resource semantics on the spec.** `site.replace` = "this is the whole site" (files absent are removed). `site.patch.put` / `patch.delete` are surgical updates. `functions.replace` / `functions.patch.set` / `functions.patch.delete` mirror that. Secrets are value-free: set values first with `r.secrets.set(project, key, value)`, then deploy with `secrets.require` and/or `secrets.delete`. `subdomains.set` / `subdomains.add` / `subdomains.remove` use their own shape. Top-level absence = leave untouched.
|
|
150
|
+
- **Warnings are structured.** `DeployResult.warnings` contains `WarningEntry[]` (`code`, `severity`, `requires_confirmation`, `message`, optional `affected`/`details`/`confidence`); `apply()` emits `plan.warnings` and stops before upload/commit on confirmation-required warnings unless `allowWarnings` is set. For `MISSING_REQUIRED_SECRET`, set the affected keys with `r.secrets.set`, then retry.
|
|
149
151
|
- **Server-authoritative manifest digest** — no byte-for-byte canonicalize requirement on the client.
|
|
150
152
|
- The Node entry adds `fileSetFromDir(path)` for filesystem byte sources:
|
|
151
153
|
|
|
@@ -159,6 +161,61 @@ const resumed = await r.deploy.resume(operationId);
|
|
|
159
161
|
});
|
|
160
162
|
```
|
|
161
163
|
|
|
164
|
+
### GitHub Actions OIDC — CI credentials drive deploy
|
|
165
|
+
|
|
166
|
+
The v1 CI path keeps the deploy primitive simple: link a GitHub repository once, then call the existing `r.deploy.apply` with CI-marked credentials. There is no separate `r.ci.deployApply` method and no public `ci: true` deploy option.
|
|
167
|
+
|
|
168
|
+
The CLI is the easiest setup path (`run402 ci link github`), but the SDK exposes the building blocks:
|
|
169
|
+
|
|
170
|
+
```ts
|
|
171
|
+
import {
|
|
172
|
+
CI_GITHUB_ACTIONS_PROVIDER,
|
|
173
|
+
V1_CI_ALLOWED_ACTIONS,
|
|
174
|
+
V1_CI_ALLOWED_EVENTS_DEFAULT,
|
|
175
|
+
run402,
|
|
176
|
+
signCiDelegation,
|
|
177
|
+
} from "@run402/sdk/node";
|
|
178
|
+
|
|
179
|
+
const values = {
|
|
180
|
+
project_id: projectId,
|
|
181
|
+
subject_match: "repo:owner/name:ref:refs/heads/main",
|
|
182
|
+
allowed_actions: V1_CI_ALLOWED_ACTIONS,
|
|
183
|
+
allowed_events: V1_CI_ALLOWED_EVENTS_DEFAULT,
|
|
184
|
+
github_repository_id: "123456789",
|
|
185
|
+
expires_at: null,
|
|
186
|
+
nonce: "0123456789abcdef0123456789abcdef",
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
const r = run402({ disablePaidFetch: true });
|
|
190
|
+
const signed_delegation = signCiDelegation(values);
|
|
191
|
+
await r.ci.createBinding({
|
|
192
|
+
...values,
|
|
193
|
+
provider: CI_GITHUB_ACTIONS_PROVIDER,
|
|
194
|
+
signed_delegation,
|
|
195
|
+
});
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Inside GitHub Actions, use `githubActionsCredentials`. It reads GitHub's OIDC environment, exchanges the subject token through `r.ci.exchangeToken`, caches the Run402 session until `expires_in - refreshBeforeSeconds`, and marks the credentials so deploy uses CI Bearer auth:
|
|
199
|
+
|
|
200
|
+
```ts
|
|
201
|
+
import { githubActionsCredentials, run402, type ReleaseSpec } from "@run402/sdk/node";
|
|
202
|
+
|
|
203
|
+
const r = run402({
|
|
204
|
+
credentials: githubActionsCredentials({ projectId }),
|
|
205
|
+
disablePaidFetch: true,
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
const ciSpec: ReleaseSpec = {
|
|
209
|
+
project: projectId,
|
|
210
|
+
base: { release: "current" },
|
|
211
|
+
site: { patch: { put: { "index.html": "<h1>ship</h1>" } } },
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
await r.deploy.apply(ciSpec);
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
CI deploys intentionally allow only `project`, `database`, `functions`, `site`, and absent/current `base`. They reject `secrets`, `subdomains`, `routes`, `checks`, unknown future top-level fields, and specs large enough to require `manifest_ref`. Use the canonical builders (`buildCiDelegationStatement`, `buildCiDelegationResourceUri`) instead of hand-rolling SIWX text; gateway tests pin those strings as golden vectors.
|
|
218
|
+
|
|
162
219
|
### Errors
|
|
163
220
|
|
|
164
221
|
All failures throw subclasses of `Run402Error`. Every subclass carries a stable
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Allowance auth helper — generates SIWX (Sign-In With X / EIP-4361) headers for Run402 API.
|
|
3
3
|
* Uses @noble/curves (lighter than viem) for signing.
|
|
4
4
|
*/
|
|
5
|
+
import type { AllowanceData } from "./allowance.js";
|
|
5
6
|
export interface SIWxAuthHeaders {
|
|
6
7
|
"SIGN-IN-WITH-X": string;
|
|
7
8
|
}
|
|
@@ -13,17 +14,23 @@ interface SIWEMessageOpts {
|
|
|
13
14
|
domain: string;
|
|
14
15
|
uri: string;
|
|
15
16
|
statement: string;
|
|
16
|
-
version
|
|
17
|
-
chainId: number;
|
|
17
|
+
version?: string;
|
|
18
|
+
chainId: number | string;
|
|
18
19
|
nonce: string;
|
|
19
20
|
issuedAt: string;
|
|
20
21
|
expirationTime?: string;
|
|
22
|
+
resources?: string[];
|
|
23
|
+
}
|
|
24
|
+
export interface SIWxAuthOptions extends SIWEMessageOpts {
|
|
25
|
+
allowance: Pick<AllowanceData, "address" | "privateKey">;
|
|
26
|
+
type?: "eip191";
|
|
21
27
|
}
|
|
22
28
|
/**
|
|
23
29
|
* Format an EIP-4361 (SIWE) message. Must be byte-for-byte compatible
|
|
24
30
|
* with the `siwe` library's message format used server-side for verification.
|
|
25
31
|
*/
|
|
26
32
|
export declare function formatSIWEMessage(opts: SIWEMessageOpts, address: string): string;
|
|
33
|
+
export declare function buildSIWxAuthHeaders(opts: SIWxAuthOptions): SIWxAuthHeaders;
|
|
27
34
|
/**
|
|
28
35
|
* Get SIWX auth headers for the Run402 API.
|
|
29
36
|
* Returns null if no allowance is configured.
|
|
@@ -70,16 +70,44 @@ export function formatSIWEMessage(opts, address) {
|
|
|
70
70
|
opts.statement,
|
|
71
71
|
"",
|
|
72
72
|
`URI: ${opts.uri}`,
|
|
73
|
-
`Version: ${opts.version}`,
|
|
74
|
-
`Chain ID: ${opts.chainId}`,
|
|
73
|
+
`Version: ${opts.version ?? "1"}`,
|
|
74
|
+
`Chain ID: ${messageChainId(opts.chainId)}`,
|
|
75
75
|
`Nonce: ${opts.nonce}`,
|
|
76
76
|
`Issued At: ${opts.issuedAt}`,
|
|
77
77
|
];
|
|
78
78
|
if (opts.expirationTime) {
|
|
79
79
|
lines.push(`Expiration Time: ${opts.expirationTime}`);
|
|
80
80
|
}
|
|
81
|
+
if (opts.resources && opts.resources.length > 0) {
|
|
82
|
+
lines.push("Resources:");
|
|
83
|
+
for (const resource of opts.resources)
|
|
84
|
+
lines.push(`- ${resource}`);
|
|
85
|
+
}
|
|
81
86
|
return lines.join("\n");
|
|
82
87
|
}
|
|
88
|
+
export function buildSIWxAuthHeaders(opts) {
|
|
89
|
+
const message = formatSIWEMessage(opts, opts.allowance.address);
|
|
90
|
+
const signature = personalSign(opts.allowance.privateKey, opts.allowance.address, message);
|
|
91
|
+
const payload = {
|
|
92
|
+
domain: opts.domain,
|
|
93
|
+
address: toChecksumAddress(opts.allowance.address),
|
|
94
|
+
statement: opts.statement,
|
|
95
|
+
uri: opts.uri,
|
|
96
|
+
version: opts.version ?? "1",
|
|
97
|
+
chainId: payloadChainId(opts.chainId),
|
|
98
|
+
type: opts.type ?? "eip191",
|
|
99
|
+
nonce: opts.nonce,
|
|
100
|
+
issuedAt: opts.issuedAt,
|
|
101
|
+
expirationTime: opts.expirationTime,
|
|
102
|
+
signature,
|
|
103
|
+
};
|
|
104
|
+
if (opts.resources !== undefined) {
|
|
105
|
+
payload.resources = opts.resources;
|
|
106
|
+
}
|
|
107
|
+
return {
|
|
108
|
+
"SIGN-IN-WITH-X": Buffer.from(JSON.stringify(payload)).toString("base64"),
|
|
109
|
+
};
|
|
110
|
+
}
|
|
83
111
|
/**
|
|
84
112
|
* Get SIWX auth headers for the Run402 API.
|
|
85
113
|
* Returns null if no allowance is configured.
|
|
@@ -103,32 +131,24 @@ export function getAllowanceAuthHeaders(path, allowancePath) {
|
|
|
103
131
|
const now = new Date();
|
|
104
132
|
const issuedAt = now.toISOString();
|
|
105
133
|
const expirationTime = new Date(now.getTime() + 5 * 60 * 1000).toISOString();
|
|
106
|
-
|
|
134
|
+
return buildSIWxAuthHeaders({
|
|
135
|
+
allowance,
|
|
107
136
|
domain,
|
|
108
137
|
uri,
|
|
109
138
|
statement: "Sign in to Run402",
|
|
110
|
-
version: "1",
|
|
111
|
-
chainId: 84532, // Base Sepolia
|
|
112
|
-
nonce,
|
|
113
|
-
issuedAt,
|
|
114
|
-
expirationTime,
|
|
115
|
-
}, allowance.address);
|
|
116
|
-
const signature = personalSign(allowance.privateKey, allowance.address, message);
|
|
117
|
-
const payload = {
|
|
118
|
-
domain,
|
|
119
|
-
address: toChecksumAddress(allowance.address),
|
|
120
|
-
statement: "Sign in to Run402",
|
|
121
|
-
uri,
|
|
122
|
-
version: "1",
|
|
123
139
|
chainId: "eip155:84532",
|
|
124
|
-
type: "eip191",
|
|
125
140
|
nonce,
|
|
126
141
|
issuedAt,
|
|
127
142
|
expirationTime,
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
function messageChainId(chainId) {
|
|
146
|
+
if (typeof chainId === "number")
|
|
147
|
+
return String(chainId);
|
|
148
|
+
const match = /^eip155:(\d+)$/.exec(chainId);
|
|
149
|
+
return match ? match[1] : chainId;
|
|
150
|
+
}
|
|
151
|
+
function payloadChainId(chainId) {
|
|
152
|
+
return typeof chainId === "number" ? `eip155:${chainId}` : chainId;
|
|
133
153
|
}
|
|
134
154
|
//# sourceMappingURL=allowance-auth.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** CI-session credential helpers for OIDC-backed deploy flows. */
|
|
2
|
+
import type { CredentialsProvider } from "./credentials.js";
|
|
3
|
+
export declare const CI_SESSION_CREDENTIALS: unique symbol;
|
|
4
|
+
export interface CiMarkedCredentialsProvider extends CredentialsProvider {
|
|
5
|
+
readonly [CI_SESSION_CREDENTIALS]: true;
|
|
6
|
+
}
|
|
7
|
+
export interface CreateCiSessionCredentialsOptions {
|
|
8
|
+
projectId: string;
|
|
9
|
+
accessToken?: string;
|
|
10
|
+
getAccessToken?: () => Promise<string>;
|
|
11
|
+
}
|
|
12
|
+
export interface GithubActionsCredentialsOptions {
|
|
13
|
+
projectId: string;
|
|
14
|
+
apiBase?: string;
|
|
15
|
+
audience?: string;
|
|
16
|
+
refreshBeforeSeconds?: number;
|
|
17
|
+
fetch?: typeof globalThis.fetch;
|
|
18
|
+
}
|
|
19
|
+
export declare function isCiSessionCredentials(credentials: CredentialsProvider): credentials is CiMarkedCredentialsProvider;
|
|
20
|
+
export declare function createCiSessionCredentials(opts: CreateCiSessionCredentialsOptions): CiMarkedCredentialsProvider;
|
|
21
|
+
export declare function githubActionsCredentials(opts: GithubActionsCredentialsOptions): CiMarkedCredentialsProvider;
|
|
22
|
+
//# sourceMappingURL=ci-credentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ci-credentials.d.ts","sourceRoot":"","sources":["../src/ci-credentials.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAElE,OAAO,KAAK,EAAE,mBAAmB,EAAe,MAAM,kBAAkB,CAAC;AASzE,eAAO,MAAM,sBAAsB,eAAmD,CAAC;AAEvF,MAAM,WAAW,2BAA4B,SAAQ,mBAAmB;IACtE,QAAQ,CAAC,CAAC,sBAAsB,CAAC,EAAE,IAAI,CAAC;CACzC;AAED,MAAM,WAAW,iCAAiC;IAChD,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,+BAA+B;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;CACjC;AAED,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,mBAAmB,GAC/B,WAAW,IAAI,2BAA2B,CAE5C;AAED,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,iCAAiC,GACtC,2BAA2B,CAuC7B;AAED,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,+BAA+B,GACpC,2BAA2B,CA4B7B"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/** CI-session credential helpers for OIDC-backed deploy flows. */
|
|
2
|
+
import { LocalError } from "./errors.js";
|
|
3
|
+
import { buildClient } from "./kernel.js";
|
|
4
|
+
import { Ci } from "./namespaces/ci.js";
|
|
5
|
+
import { CI_AUDIENCE, } from "./namespaces/ci.types.js";
|
|
6
|
+
export const CI_SESSION_CREDENTIALS = Symbol.for("@run402/sdk/ci-session-credentials");
|
|
7
|
+
export function isCiSessionCredentials(credentials) {
|
|
8
|
+
return Boolean(credentials[CI_SESSION_CREDENTIALS]);
|
|
9
|
+
}
|
|
10
|
+
export function createCiSessionCredentials(opts) {
|
|
11
|
+
if (!opts?.projectId) {
|
|
12
|
+
throw new LocalError("createCiSessionCredentials requires projectId", "creating CI session credentials");
|
|
13
|
+
}
|
|
14
|
+
if (!opts.accessToken && !opts.getAccessToken) {
|
|
15
|
+
throw new LocalError("createCiSessionCredentials requires accessToken or getAccessToken", "creating CI session credentials");
|
|
16
|
+
}
|
|
17
|
+
const provider = {
|
|
18
|
+
async getAuth() {
|
|
19
|
+
const token = opts.getAccessToken ? await opts.getAccessToken() : opts.accessToken;
|
|
20
|
+
if (!token) {
|
|
21
|
+
throw new LocalError("CI session credentials did not return an access token", "authenticating with CI session");
|
|
22
|
+
}
|
|
23
|
+
return { Authorization: `Bearer ${token}` };
|
|
24
|
+
},
|
|
25
|
+
async getProject(id) {
|
|
26
|
+
if (id !== opts.projectId)
|
|
27
|
+
return null;
|
|
28
|
+
return { anon_key: "", service_key: "" };
|
|
29
|
+
},
|
|
30
|
+
async getActiveProject() {
|
|
31
|
+
return opts.projectId;
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
Object.defineProperty(provider, CI_SESSION_CREDENTIALS, {
|
|
35
|
+
value: true,
|
|
36
|
+
enumerable: false,
|
|
37
|
+
});
|
|
38
|
+
return provider;
|
|
39
|
+
}
|
|
40
|
+
export function githubActionsCredentials(opts) {
|
|
41
|
+
if (!opts?.projectId) {
|
|
42
|
+
throw new LocalError("githubActionsCredentials requires projectId", "creating GitHub Actions CI credentials");
|
|
43
|
+
}
|
|
44
|
+
const apiBase = opts.apiBase ?? CI_AUDIENCE;
|
|
45
|
+
const audience = opts.audience ?? CI_AUDIENCE;
|
|
46
|
+
const fetchImpl = opts.fetch ?? globalThis.fetch.bind(globalThis);
|
|
47
|
+
const refreshBeforeMs = Math.max(0, opts.refreshBeforeSeconds ?? 60) * 1000;
|
|
48
|
+
let cached = null;
|
|
49
|
+
return createCiSessionCredentials({
|
|
50
|
+
projectId: opts.projectId,
|
|
51
|
+
getAccessToken: async () => {
|
|
52
|
+
const now = Date.now();
|
|
53
|
+
if (cached && now < cached.refreshAtMs)
|
|
54
|
+
return cached.token;
|
|
55
|
+
const subjectToken = await requestGithubOidcToken(fetchImpl, audience);
|
|
56
|
+
const exchanged = await exchangeWithRun402Ci(fetchImpl, apiBase, opts.projectId, subjectToken);
|
|
57
|
+
cached = {
|
|
58
|
+
token: exchanged.access_token,
|
|
59
|
+
refreshAtMs: now + Math.max(0, exchanged.expires_in * 1000 - refreshBeforeMs),
|
|
60
|
+
};
|
|
61
|
+
return cached.token;
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
async function requestGithubOidcToken(fetchImpl, audience) {
|
|
66
|
+
const env = getProcessEnv();
|
|
67
|
+
const requestUrl = env.ACTIONS_ID_TOKEN_REQUEST_URL;
|
|
68
|
+
const requestToken = env.ACTIONS_ID_TOKEN_REQUEST_TOKEN;
|
|
69
|
+
if (!requestUrl || !requestToken) {
|
|
70
|
+
throw new LocalError("GitHub Actions OIDC environment is missing ACTIONS_ID_TOKEN_REQUEST_URL or ACTIONS_ID_TOKEN_REQUEST_TOKEN. Ensure the workflow has permissions: id-token: write.", "requesting GitHub Actions OIDC token");
|
|
71
|
+
}
|
|
72
|
+
const url = new URL(requestUrl);
|
|
73
|
+
url.searchParams.set("audience", audience);
|
|
74
|
+
const res = await fetchImpl(url.toString(), {
|
|
75
|
+
headers: { Authorization: `Bearer ${requestToken}` },
|
|
76
|
+
});
|
|
77
|
+
const body = await res.json().catch(() => null);
|
|
78
|
+
if (!res.ok || typeof body?.value !== "string" || body.value.length === 0) {
|
|
79
|
+
throw new LocalError(`GitHub Actions OIDC token request failed (HTTP ${res.status})`, "requesting GitHub Actions OIDC token");
|
|
80
|
+
}
|
|
81
|
+
return body.value;
|
|
82
|
+
}
|
|
83
|
+
async function exchangeWithRun402Ci(fetchImpl, apiBase, projectId, subjectToken) {
|
|
84
|
+
const noAuth = {
|
|
85
|
+
async getAuth() {
|
|
86
|
+
return null;
|
|
87
|
+
},
|
|
88
|
+
async getProject() {
|
|
89
|
+
return null;
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
const ci = new Ci(buildClient({
|
|
93
|
+
apiBase,
|
|
94
|
+
fetch: fetchImpl,
|
|
95
|
+
credentials: noAuth,
|
|
96
|
+
}));
|
|
97
|
+
return ci.exchangeToken({ project_id: projectId, subject_token: subjectToken });
|
|
98
|
+
}
|
|
99
|
+
function getProcessEnv() {
|
|
100
|
+
const proc = globalThis;
|
|
101
|
+
return proc.process?.env ?? {};
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=ci-credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ci-credentials.js","sourceRoot":"","sources":["../src/ci-credentials.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAGlE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AACxC,OAAO,EACL,WAAW,GAEZ,MAAM,0BAA0B,CAAC;AAElC,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC;AAoBvF,MAAM,UAAU,sBAAsB,CACpC,WAAgC;IAEhC,OAAO,OAAO,CAAE,WAAoD,CAAC,sBAAsB,CAAC,CAAC,CAAC;AAChG,CAAC;AAED,MAAM,UAAU,0BAA0B,CACxC,IAAuC;IAEvC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,CAAC;QACrB,MAAM,IAAI,UAAU,CAClB,+CAA+C,EAC/C,iCAAiC,CAClC,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;QAC9C,MAAM,IAAI,UAAU,CAClB,mEAAmE,EACnE,iCAAiC,CAClC,CAAC;IACJ,CAAC;IAED,MAAM,QAAQ,GAAwB;QACpC,KAAK,CAAC,OAAO;YACX,MAAM,KAAK,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,MAA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1C,OAAO,EAAE,EAAE,aAAa,EAAE,UAAU,YAAY,EAAE,EAAE;KACrD,CAAC,CAAC;IACH,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAA+B,CAAC;IAC9E,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,OAAO,IAAI,EAAE,KAAK,KAAK,QAAQ,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1E,MAAM,IAAI,UAAU,CAClB,kDAAkD,GAAG,CAAC,MAAM,GAAG,EAC/D,sCAAsC,CACvC,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC,KAAK,CAAC;AACpB,CAAC;AAED,KAAK,UAAU,oBAAoB,CACjC,SAAkC,EAClC,OAAe,EACf,SAAiB,EACjB,YAAoB;IAEpB,MAAM,MAAM,GAAwB;QAClC,KAAK,CAAC,OAAO;YACX,OAAO,IAAI,CAAC;QACd,CAAC;QACD,KAAK,CAAC,UAAU;YACd,OAAO,IAAI,CAAC;QACd,CAAC;KACF,CAAC;IACF,MAAM,EAAE,GAAG,IAAI,EAAE,CAAC,WAAW,CAAC;QAC5B,OAAO;QACP,KAAK,EAAE,SAAS;QAChB,WAAW,EAAE,MAAM;KACpB,CAAC,CAAC,CAAC;IACJ,OAAO,EAAE,CAAC,aAAa,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,CAAC,CAAC;AAClF,CAAC;AAED,SAAS,aAAa;IACpB,MAAM,IAAI,GAAG,UAEZ,CAAC;IACF,OAAO,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;AACjC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ import { Email } from "./namespaces/email.js";
|
|
|
25
25
|
import { Contracts } from "./namespaces/contracts.js";
|
|
26
26
|
import { Admin } from "./namespaces/admin.js";
|
|
27
27
|
import { Deploy } from "./namespaces/deploy.js";
|
|
28
|
+
import { Ci } from "./namespaces/ci.js";
|
|
28
29
|
import type { ContentSource, FileSet } from "./namespaces/deploy.types.js";
|
|
29
30
|
import { ScopedRun402 } from "./scoped.js";
|
|
30
31
|
export interface Run402Options {
|
|
@@ -61,6 +62,7 @@ export declare class Run402 {
|
|
|
61
62
|
readonly contracts: Contracts;
|
|
62
63
|
readonly admin: Admin;
|
|
63
64
|
readonly deploy: Deploy;
|
|
65
|
+
readonly ci: Ci;
|
|
64
66
|
constructor(opts: Run402Options);
|
|
65
67
|
/**
|
|
66
68
|
* Return a project-scoped sub-client where every project-id-bearing namespace
|
|
@@ -122,7 +124,11 @@ export { withRetry } from "./retry.js";
|
|
|
122
124
|
export type { RetryOptions } from "./retry.js";
|
|
123
125
|
export type { CredentialsProvider, ProjectKeys } from "./credentials.js";
|
|
124
126
|
export type { RequestOptions, Client } from "./kernel.js";
|
|
127
|
+
export { CI_SESSION_CREDENTIALS, createCiSessionCredentials, githubActionsCredentials, isCiSessionCredentials, } from "./ci-credentials.js";
|
|
128
|
+
export type { CiMarkedCredentialsProvider, CreateCiSessionCredentialsOptions, GithubActionsCredentialsOptions, } from "./ci-credentials.js";
|
|
125
129
|
export { Deploy } from "./namespaces/deploy.js";
|
|
130
|
+
export { Ci, CI_AUDIENCE, CI_GITHUB_ACTIONS_ISSUER, CI_GITHUB_ACTIONS_PROVIDER, DEFAULT_CI_DELEGATION_CHAIN_ID, V1_CI_ALLOWED_ACTIONS, V1_CI_ALLOWED_EVENTS_DEFAULT, assertCiDeployableSpec, buildCiDelegationResourceUri, buildCiDelegationStatement, normalizeCiDelegationValues, validateCiNonce, validateCiSubjectMatch, } from "./namespaces/ci.js";
|
|
126
131
|
export { ScopedRun402 } from "./scoped.js";
|
|
127
|
-
export type {
|
|
132
|
+
export type { CiAllowedAction, CiAllowedEvent, CiBindingErrorCode, CiBindingRow, CiCreateBindingInput, CiDelegationValues, CiDeployErrorCode, CiErrorCode, CiListBindingsInput, CiListBindingsResult, CiProvider, CiTokenExchangeErrorCode, CiTokenExchangeInput, CiTokenExchangeRequestBody, CiTokenExchangeResponse, NormalizedCiDelegationValues, ParsedDelegation, } from "./namespaces/ci.types.js";
|
|
133
|
+
export type { ApplyOptions, CommitResponse, CommitStatus, ContentRef, ContentSource, DatabaseSpec, DeployDiff, DeployEvent, DeployOperation, DeployResult, ExposeManifest, FileSet, FsFileSource, FunctionSpec, FunctionsSpec, MigrationSpec, MissingContent, OperationSnapshot, OperationStatus, PaymentRequiredHint, PlanRequest, PlanResponse, ReleaseSpec, RouteSpec, SecretsSpec, SiteSpec, SmokeCheck, StartOptions, SubdomainsSpec, WarningEntry, } from "./namespaces/deploy.types.js";
|
|
128
134
|
//# 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":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,EAAE,EAAE,MA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BAA8B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -25,6 +25,7 @@ import { Email } from "./namespaces/email.js";
|
|
|
25
25
|
import { Contracts } from "./namespaces/contracts.js";
|
|
26
26
|
import { Admin } from "./namespaces/admin.js";
|
|
27
27
|
import { Deploy } from "./namespaces/deploy.js";
|
|
28
|
+
import { Ci } from "./namespaces/ci.js";
|
|
28
29
|
import { ScopedRun402 } from "./scoped.js";
|
|
29
30
|
import { LocalError } from "./errors.js";
|
|
30
31
|
export class Run402 {
|
|
@@ -48,6 +49,7 @@ export class Run402 {
|
|
|
48
49
|
contracts;
|
|
49
50
|
admin;
|
|
50
51
|
deploy;
|
|
52
|
+
ci;
|
|
51
53
|
#client;
|
|
52
54
|
constructor(opts) {
|
|
53
55
|
if (!opts || typeof opts !== "object") {
|
|
@@ -93,6 +95,7 @@ export class Run402 {
|
|
|
93
95
|
this.contracts = new Contracts(client);
|
|
94
96
|
this.admin = new Admin(client);
|
|
95
97
|
this.deploy = new Deploy(client);
|
|
98
|
+
this.ci = new Ci(client);
|
|
96
99
|
}
|
|
97
100
|
/**
|
|
98
101
|
* Return a project-scoped sub-client where every project-id-bearing namespace
|
|
@@ -171,6 +174,8 @@ export function run402(opts) {
|
|
|
171
174
|
}
|
|
172
175
|
export { Run402Error, PaymentRequired, ProjectNotFound, Unauthorized, ApiError, NetworkError, LocalError, Run402DeployError, isRun402Error, isPaymentRequired, isProjectNotFound, isUnauthorized, isApiError, isNetworkError, isLocalError, isDeployError, isRetryableRun402Error, } from "./errors.js";
|
|
173
176
|
export { withRetry } from "./retry.js";
|
|
177
|
+
export { CI_SESSION_CREDENTIALS, createCiSessionCredentials, githubActionsCredentials, isCiSessionCredentials, } from "./ci-credentials.js";
|
|
174
178
|
export { Deploy } from "./namespaces/deploy.js";
|
|
179
|
+
export { Ci, CI_AUDIENCE, CI_GITHUB_ACTIONS_ISSUER, CI_GITHUB_ACTIONS_PROVIDER, DEFAULT_CI_DELEGATION_CHAIN_ID, V1_CI_ALLOWED_ACTIONS, V1_CI_ALLOWED_EVENTS_DEFAULT, assertCiDeployableSpec, buildCiDelegationResourceUri, buildCiDelegationStatement, normalizeCiDelegationValues, validateCiNonce, validateCiSubjectMatch, } from "./namespaces/ci.js";
|
|
175
180
|
export { ScopedRun402 } from "./scoped.js";
|
|
176
181
|
//# 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;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAkC,MAAM,aAAa,CAAC;AAE1E,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OA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ects.types.js";
|
|
7
7
|
import type { SiteFile } from "./sites.js";
|
|
8
|
+
import type { WarningEntry } from "./deploy.types.js";
|
|
8
9
|
export interface BundleRlsOptions {
|
|
9
10
|
template: RlsTemplate;
|
|
10
11
|
tables: RlsTableSpec[];
|
|
@@ -47,6 +48,7 @@ export interface BundleDeployResult {
|
|
|
47
48
|
schedule?: string | null;
|
|
48
49
|
}>;
|
|
49
50
|
subdomain_url?: string;
|
|
51
|
+
warnings?: WarningEntry[];
|
|
50
52
|
}
|
|
51
53
|
export interface AppSummary {
|
|
52
54
|
id: string;
|
|
@@ -128,10 +130,10 @@ export declare class Apps {
|
|
|
128
130
|
private readonly client;
|
|
129
131
|
constructor(client: Client);
|
|
130
132
|
/**
|
|
131
|
-
* Deploy to an existing project: runs migrations, applies RLS,
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
* renewal.
|
|
133
|
+
* Deploy to an existing project: runs migrations, applies RLS, writes
|
|
134
|
+
* legacy in-memory secret values through the secrets API, deploys
|
|
135
|
+
* functions, deploys a static site, and claims a subdomain. Payment flows
|
|
136
|
+
* through x402 when the project lease needs renewal.
|
|
135
137
|
*
|
|
136
138
|
* **As of v1.34, this method is a thin compatibility shim over
|
|
137
139
|
* {@link Deploy.apply}.** It translates the legacy bundle options into a
|
|
@@ -144,6 +146,11 @@ export declare class Apps {
|
|
|
144
146
|
* the only behavior change vs. v1's blind re-execution and is safe for
|
|
145
147
|
* idempotent migrations (the documented agent norm).
|
|
146
148
|
*
|
|
149
|
+
* Legacy `opts.secrets` are not embedded in the release spec. They are
|
|
150
|
+
* pre-validated, written before deploy, then represented as
|
|
151
|
+
* `secrets.require` keys. Those writes are intentionally not atomic with
|
|
152
|
+
* the later deploy commit.
|
|
153
|
+
*
|
|
147
154
|
* `inherit: true` is silently ignored;
|
|
148
155
|
* patch semantics on `r.deploy.apply` replace it.
|
|
149
156
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../src/namespaces/apps.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAClF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../src/namespaces/apps.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAClF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,KAAK,EAMV,YAAY,EACb,MAAM,mBAAmB,CAAC;AAM3B,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,WAAW,CAAC;IACtB,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,iCAAiC,CAAC,EAAE,OAAO,CAAC;CAC7C;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,gBAAgB,CAAC;IACvB,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAChD,SAAS,CAAC,EAAE,kBAAkB,EAAE,CAAC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