@run402/sdk 4.151.0 → 4.152.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.
|
@@ -13,8 +13,12 @@
|
|
|
13
13
|
* `/projects/v1/:project_id/grant-keys/:key_id[...]`. Every call requires the
|
|
14
14
|
* caller to be an active owner of the project's org.
|
|
15
15
|
*/
|
|
16
|
-
/**
|
|
17
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Grant-key kinds. `run402_agent_key` is the bearer an agent holds and the
|
|
18
|
+
* only kind these routes mint; a `ci_oidc` key is a CI binding
|
|
19
|
+
* (`run402 ci link`).
|
|
20
|
+
*/
|
|
21
|
+
export type GrantKeyKind = "run402_agent_key" | "ci_oidc";
|
|
18
22
|
/**
|
|
19
23
|
* Grant-key scope (`scope` JSONB). Always a subset of the grant: a key never
|
|
20
24
|
* widens it. Omit to take the grant's own capability.
|
|
@@ -28,7 +32,12 @@ export interface GrantKeyScope {
|
|
|
28
32
|
projects?: string[];
|
|
29
33
|
[key: string]: unknown;
|
|
30
34
|
}
|
|
31
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* Spend cap (`spend_cap` JSONB), in USD micros. Enforced when the key or a
|
|
37
|
+
* token it minted spends: a managed job, a signer provision, transfer, call or
|
|
38
|
+
* deploy, an image. A key with no cap spends nothing
|
|
39
|
+
* (`403 GRANT_KEY_NO_SPEND_CAP`). Code the key deploys is not capped by it.
|
|
40
|
+
*/
|
|
32
41
|
export interface GrantKeySpendCap {
|
|
33
42
|
v: 1;
|
|
34
43
|
currency: "usd_micros";
|
|
@@ -43,11 +52,11 @@ export interface GrantKeyInput {
|
|
|
43
52
|
kind?: GrantKeyKind;
|
|
44
53
|
/** Defaults to the grant's own capability. */
|
|
45
54
|
scope?: GrantKeyScope;
|
|
46
|
-
/** Spend cap
|
|
55
|
+
/** Spend cap. Omit and the key, and every token it mints, spends nothing. */
|
|
47
56
|
spendCap?: GrantKeySpendCap | null;
|
|
48
57
|
/** ISO-8601 expiry; omit or `null` for none beyond the grant's. */
|
|
49
58
|
expiresAt?: string | null;
|
|
50
|
-
/**
|
|
59
|
+
/** Kind-specific public subject. */
|
|
51
60
|
publicSubject?: string;
|
|
52
61
|
}
|
|
53
62
|
/** Input to {@link Grants.create}. */
|
|
@@ -98,6 +107,10 @@ export interface GrantKey {
|
|
|
98
107
|
expires_at: string | null;
|
|
99
108
|
revoked_at: string | null;
|
|
100
109
|
created_at: string;
|
|
110
|
+
/** On a capped key: what it and the tokens it minted spent this period (USD micros). */
|
|
111
|
+
spent_usd_micros?: number;
|
|
112
|
+
/** On a capped key: when the current period ends (ISO-8601). */
|
|
113
|
+
resets_at?: string;
|
|
101
114
|
[key: string]: unknown;
|
|
102
115
|
}
|
|
103
116
|
/** A per-project capability grant with its grant keys nested. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grants.types.d.ts","sourceRoot":"","sources":["../../src/namespaces/grants.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH
|
|
1
|
+
{"version":3,"file":"grants.types.d.ts","sourceRoot":"","sources":["../../src/namespaces/grants.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,kBAAkB,GAAG,SAAS,CAAC;AAE1D;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,mCAAmC;IACnC,CAAC,EAAE,CAAC,CAAC;IACL,oDAAoD;IACpD,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,CAAC,EAAE,CAAC,CAAC;IACL,QAAQ,EAAE,YAAY,CAAC;IACvB,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,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,GAAG,OAAO,CAAC;CACxB;AAED,0EAA0E;AAC1E,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,6EAA6E;AAC7E,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,cAAc,CAAC;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,2EAA2E;AAC3E,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,mGAAmG;AACnG,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,cAAc,CAAC;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@run402/sdk",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.152.0",
|
|
4
4
|
"description": "Typed TypeScript client for the Run402 API. Kernel shared by the run402-mcp server, the run402 CLI, and user-deployed run402 functions.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|