@run402/sdk 4.96.0 → 4.97.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 +3 -3
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +2 -2
- package/dist/errors.js.map +1 -1
- package/dist/grant-key-credentials.d.ts +38 -0
- package/dist/grant-key-credentials.d.ts.map +1 -0
- package/dist/grant-key-credentials.js +42 -0
- package/dist/grant-key-credentials.js.map +1 -0
- package/dist/index.d.ts +7 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -13
- package/dist/index.js.map +1 -1
- package/dist/namespaces/billing.d.ts +1 -1
- package/dist/namespaces/billing.js +1 -1
- package/dist/namespaces/buzz.js +1 -1
- package/dist/namespaces/buzz.js.map +1 -1
- package/dist/namespaces/credentials.d.ts +4 -4
- package/dist/namespaces/credentials.js +4 -4
- package/dist/namespaces/deploy.js +5 -5
- package/dist/namespaces/deploy.js.map +1 -1
- package/dist/namespaces/domains.d.ts +1 -1
- package/dist/namespaces/domains.js +1 -1
- package/dist/namespaces/errors.d.ts +1 -1
- package/dist/namespaces/errors.js +2 -2
- package/dist/namespaces/escalations.d.ts +2 -2
- package/dist/namespaces/escalations.js +2 -2
- package/dist/namespaces/escalations.types.d.ts +3 -3
- package/dist/namespaces/escalations.types.d.ts.map +1 -1
- package/dist/namespaces/events.d.ts +1 -1
- package/dist/namespaces/events.js +1 -1
- package/dist/namespaces/functions.js +1 -1
- package/dist/namespaces/functions.js.map +1 -1
- package/dist/namespaces/grants.d.ts +43 -9
- package/dist/namespaces/grants.d.ts.map +1 -1
- package/dist/namespaces/grants.js +99 -10
- package/dist/namespaces/grants.js.map +1 -1
- package/dist/namespaces/grants.types.d.ts +120 -15
- package/dist/namespaces/grants.types.d.ts.map +1 -1
- package/dist/namespaces/grants.types.js +12 -3
- package/dist/namespaces/grants.types.js.map +1 -1
- package/dist/namespaces/identity-links.types.d.ts +2 -2
- package/dist/namespaces/identity-links.types.d.ts.map +1 -1
- package/dist/namespaces/org.d.ts +1 -1
- package/dist/namespaces/org.js +1 -1
- package/dist/namespaces/projects.d.ts +1 -1
- package/dist/namespaces/projects.js +1 -1
- package/dist/namespaces/repos.js +2 -2
- package/dist/namespaces/repos.js.map +1 -1
- package/dist/namespaces/rooms.d.ts +3 -3
- package/dist/namespaces/rooms.js +3 -3
- package/dist/node/credentials.d.ts +9 -9
- package/dist/node/credentials.d.ts.map +1 -1
- package/dist/node/credentials.js +12 -12
- package/dist/node/credentials.js.map +1 -1
- package/dist/node/index.d.ts +5 -5
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +2 -2
- package/dist/node/index.js.map +1 -1
- package/dist/project-auth-classification.d.ts +8 -8
- package/dist/project-auth-classification.d.ts.map +1 -1
- package/dist/project-auth-classification.js +7 -7
- package/dist/project-auth-classification.js.map +1 -1
- package/dist/scoped.d.ts +6 -14
- package/dist/scoped.d.ts.map +1 -1
- package/dist/scoped.js +10 -21
- package/dist/scoped.js.map +1 -1
- package/package.json +1 -1
- package/dist/delegate-credentials.d.ts +0 -37
- package/dist/delegate-credentials.d.ts.map +0 -1
- package/dist/delegate-credentials.js +0 -41
- package/dist/delegate-credentials.js.map +0 -1
- package/dist/namespaces/delegates.d.ts +0 -50
- package/dist/namespaces/delegates.d.ts.map +0 -1
- package/dist/namespaces/delegates.js +0 -99
- package/dist/namespaces/delegates.js.map +0 -1
- package/dist/namespaces/delegates.types.d.ts +0 -88
- package/dist/namespaces/delegates.types.d.ts.map +0 -1
- package/dist/namespaces/delegates.types.js +0 -10
- package/dist/namespaces/delegates.types.js.map +0 -1
|
@@ -66,9 +66,9 @@ export declare class Credentials {
|
|
|
66
66
|
* (`POST /projects/v1/:project_id/credentials`).
|
|
67
67
|
*
|
|
68
68
|
* Requires owner membership on the project's owning org PLUS a fresh
|
|
69
|
-
* step-up, and a
|
|
69
|
+
* step-up, and a grant key can never satisfy it — a scoped agent credential
|
|
70
70
|
* must not be able to escalate itself into a permanent root. If you are
|
|
71
|
-
* running unattended and hold only a
|
|
71
|
+
* running unattended and hold only a grant key, use {@link mintToken}.
|
|
72
72
|
*
|
|
73
73
|
* The returned `secret` is shown ONCE. Persist it before doing anything
|
|
74
74
|
* else; there is no read that returns it, only `rotate()` for a new one.
|
|
@@ -117,8 +117,8 @@ export declare class Credentials {
|
|
|
117
117
|
* Mint a SHORT-LIVED project token (`POST /projects/v1/:project_id/tokens`).
|
|
118
118
|
*
|
|
119
119
|
* This is the cold-restart recovery path, and the one credential call a
|
|
120
|
-
*
|
|
121
|
-
* state but still holds a
|
|
120
|
+
* grant key CAN make with no human present: an agent that lost its local
|
|
121
|
+
* state but still holds a grant key gets back to work unattended. There is no
|
|
122
122
|
* step-up, because there is nobody to prompt; what it hands back expires, so
|
|
123
123
|
* it cannot become a durable root.
|
|
124
124
|
*
|
|
@@ -13,9 +13,9 @@ export class Credentials {
|
|
|
13
13
|
* (`POST /projects/v1/:project_id/credentials`).
|
|
14
14
|
*
|
|
15
15
|
* Requires owner membership on the project's owning org PLUS a fresh
|
|
16
|
-
* step-up, and a
|
|
16
|
+
* step-up, and a grant key can never satisfy it — a scoped agent credential
|
|
17
17
|
* must not be able to escalate itself into a permanent root. If you are
|
|
18
|
-
* running unattended and hold only a
|
|
18
|
+
* running unattended and hold only a grant key, use {@link mintToken}.
|
|
19
19
|
*
|
|
20
20
|
* The returned `secret` is shown ONCE. Persist it before doing anything
|
|
21
21
|
* else; there is no read that returns it, only `rotate()` for a new one.
|
|
@@ -105,8 +105,8 @@ export class Credentials {
|
|
|
105
105
|
* Mint a SHORT-LIVED project token (`POST /projects/v1/:project_id/tokens`).
|
|
106
106
|
*
|
|
107
107
|
* This is the cold-restart recovery path, and the one credential call a
|
|
108
|
-
*
|
|
109
|
-
* state but still holds a
|
|
108
|
+
* grant key CAN make with no human present: an agent that lost its local
|
|
109
|
+
* state but still holds a grant key gets back to work unattended. There is no
|
|
110
110
|
* step-up, because there is nobody to prompt; what it hands back expires, so
|
|
111
111
|
* it cannot become a durable root.
|
|
112
112
|
*
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
*/
|
|
21
21
|
import { normalizeEdgeEvidence } from "./edge-evidence.js";
|
|
22
22
|
import { isCiSessionCredentials } from "../ci-credentials.js";
|
|
23
|
-
import {
|
|
23
|
+
import { isGrantKeyCredentials } from "../grant-key-credentials.js";
|
|
24
24
|
import { isKnownBinaryContent, isUtf8StringSource } from "../validation.js";
|
|
25
25
|
import { assertCiDeployableSpec } from "./ci.js";
|
|
26
26
|
import { ROUTE_PRICING_NETWORKS, ROUTE_HTTP_METHODS, isModernPlanMigrationDiff, normalizeDeployResolveRequest, } from "./deploy.types.js";
|
|
@@ -4062,11 +4062,11 @@ async function uploadInlineCas(client, projectId, bytes, contentType) {
|
|
|
4062
4062
|
* recovery.
|
|
4063
4063
|
*/
|
|
4064
4064
|
async function apikeyHeaders(client, projectId) {
|
|
4065
|
-
// A CI session and a
|
|
4065
|
+
// A CI session and a grant key both already authorize these routes via
|
|
4066
4066
|
// `Authorization: Bearer`, supplied by the kernel's getAuth. Attaching an
|
|
4067
4067
|
// apikey beside a bearer mixes credential families on one request, which the
|
|
4068
4068
|
// kernel explicitly forbids — so stand down and let the bearer carry it.
|
|
4069
|
-
if (isCiClient(client) ||
|
|
4069
|
+
if (isCiClient(client) || isGrantKeyClient(client))
|
|
4070
4070
|
return {};
|
|
4071
4071
|
const project = await client.getProject(projectId);
|
|
4072
4072
|
if (project?.anon_key)
|
|
@@ -4122,8 +4122,8 @@ async function mintedAnonToken(client, projectId) {
|
|
|
4122
4122
|
function isCiClient(client) {
|
|
4123
4123
|
return isCiSessionCredentials(client.credentials);
|
|
4124
4124
|
}
|
|
4125
|
-
function
|
|
4126
|
-
return
|
|
4125
|
+
function isGrantKeyClient(client) {
|
|
4126
|
+
return isGrantKeyCredentials(client.credentials);
|
|
4127
4127
|
}
|
|
4128
4128
|
function makeEmitter(cb) {
|
|
4129
4129
|
if (!cb)
|