@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.
Files changed (79) hide show
  1. package/README.md +3 -3
  2. package/dist/errors.d.ts +1 -1
  3. package/dist/errors.js +2 -2
  4. package/dist/errors.js.map +1 -1
  5. package/dist/grant-key-credentials.d.ts +38 -0
  6. package/dist/grant-key-credentials.d.ts.map +1 -0
  7. package/dist/grant-key-credentials.js +42 -0
  8. package/dist/grant-key-credentials.js.map +1 -0
  9. package/dist/index.d.ts +7 -14
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +6 -13
  12. package/dist/index.js.map +1 -1
  13. package/dist/namespaces/billing.d.ts +1 -1
  14. package/dist/namespaces/billing.js +1 -1
  15. package/dist/namespaces/buzz.js +1 -1
  16. package/dist/namespaces/buzz.js.map +1 -1
  17. package/dist/namespaces/credentials.d.ts +4 -4
  18. package/dist/namespaces/credentials.js +4 -4
  19. package/dist/namespaces/deploy.js +5 -5
  20. package/dist/namespaces/deploy.js.map +1 -1
  21. package/dist/namespaces/domains.d.ts +1 -1
  22. package/dist/namespaces/domains.js +1 -1
  23. package/dist/namespaces/errors.d.ts +1 -1
  24. package/dist/namespaces/errors.js +2 -2
  25. package/dist/namespaces/escalations.d.ts +2 -2
  26. package/dist/namespaces/escalations.js +2 -2
  27. package/dist/namespaces/escalations.types.d.ts +3 -3
  28. package/dist/namespaces/escalations.types.d.ts.map +1 -1
  29. package/dist/namespaces/events.d.ts +1 -1
  30. package/dist/namespaces/events.js +1 -1
  31. package/dist/namespaces/functions.js +1 -1
  32. package/dist/namespaces/functions.js.map +1 -1
  33. package/dist/namespaces/grants.d.ts +43 -9
  34. package/dist/namespaces/grants.d.ts.map +1 -1
  35. package/dist/namespaces/grants.js +99 -10
  36. package/dist/namespaces/grants.js.map +1 -1
  37. package/dist/namespaces/grants.types.d.ts +120 -15
  38. package/dist/namespaces/grants.types.d.ts.map +1 -1
  39. package/dist/namespaces/grants.types.js +12 -3
  40. package/dist/namespaces/grants.types.js.map +1 -1
  41. package/dist/namespaces/identity-links.types.d.ts +2 -2
  42. package/dist/namespaces/identity-links.types.d.ts.map +1 -1
  43. package/dist/namespaces/org.d.ts +1 -1
  44. package/dist/namespaces/org.js +1 -1
  45. package/dist/namespaces/projects.d.ts +1 -1
  46. package/dist/namespaces/projects.js +1 -1
  47. package/dist/namespaces/repos.js +2 -2
  48. package/dist/namespaces/repos.js.map +1 -1
  49. package/dist/namespaces/rooms.d.ts +3 -3
  50. package/dist/namespaces/rooms.js +3 -3
  51. package/dist/node/credentials.d.ts +9 -9
  52. package/dist/node/credentials.d.ts.map +1 -1
  53. package/dist/node/credentials.js +12 -12
  54. package/dist/node/credentials.js.map +1 -1
  55. package/dist/node/index.d.ts +5 -5
  56. package/dist/node/index.d.ts.map +1 -1
  57. package/dist/node/index.js +2 -2
  58. package/dist/node/index.js.map +1 -1
  59. package/dist/project-auth-classification.d.ts +8 -8
  60. package/dist/project-auth-classification.d.ts.map +1 -1
  61. package/dist/project-auth-classification.js +7 -7
  62. package/dist/project-auth-classification.js.map +1 -1
  63. package/dist/scoped.d.ts +6 -14
  64. package/dist/scoped.d.ts.map +1 -1
  65. package/dist/scoped.js +10 -21
  66. package/dist/scoped.js.map +1 -1
  67. package/package.json +1 -1
  68. package/dist/delegate-credentials.d.ts +0 -37
  69. package/dist/delegate-credentials.d.ts.map +0 -1
  70. package/dist/delegate-credentials.js +0 -41
  71. package/dist/delegate-credentials.js.map +0 -1
  72. package/dist/namespaces/delegates.d.ts +0 -50
  73. package/dist/namespaces/delegates.d.ts.map +0 -1
  74. package/dist/namespaces/delegates.js +0 -99
  75. package/dist/namespaces/delegates.js.map +0 -1
  76. package/dist/namespaces/delegates.types.d.ts +0 -88
  77. package/dist/namespaces/delegates.types.d.ts.map +0 -1
  78. package/dist/namespaces/delegates.types.js +0 -10
  79. 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 delegate can never satisfy it — a scoped agent credential
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 delegate, use {@link mintToken}.
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
- * delegate CAN make with no human present: an agent that lost its local
121
- * state but still holds a delegate gets back to work unattended. There is no
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 delegate can never satisfy it — a scoped agent credential
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 delegate, use {@link mintToken}.
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
- * delegate CAN make with no human present: an agent that lost its local
109
- * state but still holds a delegate gets back to work unattended. There is no
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 { isDelegateCredentials } from "../delegate-credentials.js";
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 delegate both already authorize these routes via
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) || isDelegateClient(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 isDelegateClient(client) {
4126
- return isDelegateCredentials(client.credentials);
4125
+ function isGrantKeyClient(client) {
4126
+ return isGrantKeyCredentials(client.credentials);
4127
4127
  }
4128
4128
  function makeEmitter(cb) {
4129
4129
  if (!cb)