@ontemper/sdk 0.10.0-oauth.1 → 0.10.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 (55) hide show
  1. package/README.md +24 -58
  2. package/dist/AccessTokens.d.ts +22 -15
  3. package/dist/AccessTokens.d.ts.map +1 -1
  4. package/dist/AccessTokens.js +55 -57
  5. package/dist/AccessTokens.js.map +1 -1
  6. package/dist/As2Transport.d.ts +2 -7
  7. package/dist/As2Transport.d.ts.map +1 -1
  8. package/dist/As2Transport.js.map +1 -1
  9. package/dist/Contract/RuntimeApi.d.ts +29 -35
  10. package/dist/Contract/RuntimeApi.d.ts.map +1 -1
  11. package/dist/Contract/RuntimeApi.js +25 -59
  12. package/dist/Contract/RuntimeApi.js.map +1 -1
  13. package/dist/Contract/index.d.ts +1 -1
  14. package/dist/Contract/index.d.ts.map +1 -1
  15. package/dist/Contract/index.js +1 -1
  16. package/dist/Contract/index.js.map +1 -1
  17. package/dist/HttpApiResource.d.ts +0 -133
  18. package/dist/HttpApiResource.d.ts.map +1 -1
  19. package/dist/HttpApiResource.js +3 -31
  20. package/dist/HttpApiResource.js.map +1 -1
  21. package/dist/Kafka.d.ts.map +1 -1
  22. package/dist/Kafka.js +73 -6
  23. package/dist/Kafka.js.map +1 -1
  24. package/dist/Manifest.d.ts +1 -1
  25. package/dist/Manifest.d.ts.map +1 -1
  26. package/dist/Manifest.js +1 -1
  27. package/dist/Manifest.js.map +1 -1
  28. package/dist/Redaction.d.ts.map +1 -1
  29. package/dist/Redaction.js +0 -1
  30. package/dist/Redaction.js.map +1 -1
  31. package/dist/RuntimeResources.d.ts +23 -9
  32. package/dist/RuntimeResources.d.ts.map +1 -1
  33. package/dist/RuntimeResources.js +25 -43
  34. package/dist/RuntimeResources.js.map +1 -1
  35. package/dist/Workflow.d.ts +5 -3
  36. package/dist/Workflow.d.ts.map +1 -1
  37. package/dist/Workflow.js +9 -7
  38. package/dist/Workflow.js.map +1 -1
  39. package/dist/index.d.ts +3 -3
  40. package/dist/index.d.ts.map +1 -1
  41. package/dist/index.js +2 -2
  42. package/dist/index.js.map +1 -1
  43. package/dist/testing.d.ts +3 -9
  44. package/dist/testing.d.ts.map +1 -1
  45. package/dist/testing.js +19 -64
  46. package/dist/testing.js.map +1 -1
  47. package/package.json +2 -6
  48. package/dist/HttpApiClient.d.ts +0 -30
  49. package/dist/HttpApiClient.d.ts.map +0 -1
  50. package/dist/HttpApiClient.js +0 -142
  51. package/dist/HttpApiClient.js.map +0 -1
  52. package/dist/OAuthToken.d.ts +0 -46
  53. package/dist/OAuthToken.d.ts.map +0 -1
  54. package/dist/OAuthToken.js +0 -132
  55. package/dist/OAuthToken.js.map +0 -1
package/README.md CHANGED
@@ -150,12 +150,11 @@ const partners = yield * PartnerApis;
150
150
  const { key, value } = yield * partners.select({ tenantKey }); // ResourceNotFoundError when no record matches
151
151
  ```
152
152
 
153
- - `HttpApiResource` reads the `http_api` type at catalog revision 3. `auth` is one of `none`, `basic`,
153
+ - `HttpApiResource` reads the `http_api` type at catalog revision 2. `auth` is one of `none`, `basic`,
154
154
  `bearer`, `api_key`, `oauth2_client_credentials`, `oauth2_password`, `oauth2_jwt_bearer`, `oauth1_tba`,
155
155
  or `aws_sigv4`. The two token-grant variants hold the client in `auth.tokenRequest`
156
156
  (`OAuthTokenRequest`: `tokenUrl`, `clientId`, `clientAuthentication`, and `tokenRequestFormat`, `form`
157
- by default; `HttpApiOAuthTokenRequest` adds the optional token-request `headers`, and refuses a header that
158
- the platform's login sets or that controls the connection, such as `Accept` or `Transfer-Encoding`). An auth `type` that a newer platform adds decodes as
157
+ by default). An auth `type` that a newer platform adds decodes as
159
158
  `{ type: 'unsupported', variant, fields }`, with `fields` `Redacted`. A known type with a missing or
160
159
  invalid field fails. The record can also carry `tls`, `proxy`, and `secondaryTenantKey`.
161
160
  - Every `x-secret` field of a system type decodes to `Redacted`: for example `clientSecret`, `privateKey`,
@@ -207,6 +206,28 @@ const { key, value } = yield * partners.select({ tenantKey }); // ResourceNotFou
207
206
  To keep a check that deploy does not run, annotate it: `Schema.isPattern(regExp, { toJsonSchema: () => ({}) })`.
208
207
  A `Schema.makeFilter` predicate without `toJsonSchema` runs only when the workflow decodes the value.
209
208
 
209
+ ### Partner access tokens
210
+
211
+ `AccessTokens` keeps a partner OAuth access token for the workflow. Read the service where the client layer or the
212
+ handler group is built. Pass it the key of the record that holds the login and the Effect that requests a token:
213
+
214
+ ```ts
215
+ import { AccessTokens } from '@temper/workflow';
216
+
217
+ const tokens = yield * AccessTokens; // in `make`, or in the Effect that builds the handler group
218
+
219
+ // requestToken: Effect<{ token: Redacted<string>; expiresIn: number }>
220
+ const token = yield * tokens.get(tenant.key, requestToken(tenant.value));
221
+ // After a 401 from the partner:
222
+ yield * tokens.refuse(tenant.key, token);
223
+ ```
224
+
225
+ `get` returns the token this VM holds, else the one another VM of the workflow stored on the Temper platform,
226
+ else a new one from the request. It reuses a token until 30 seconds before it expires; a token whose `expiresIn` is not a
227
+ positive number is used once. A failed or interrupted token request keeps nothing. After `refuse`, the next `get` requests a new token. Each workflow and environment
228
+ has its own token for a record. `testPlatform({ resources })` keeps tokens in memory, so two modules on one test
229
+ platform share them.
230
+
210
231
  ## Steps
211
232
 
212
233
  🟡 Proposed ([Workflow Flow](../../docs/specs/workflows/flow.md)). A step is one named unit of work. You
@@ -314,61 +335,6 @@ function, still writes its lines, also with an id or kind that the build refuses
314
335
  process, as in a test, gets the same closed catalog. Keep a step's `id` when you change its title: the platform keys Run state on the id.
315
336
  `sdk/workflow-examples/step-flow` is a complete example.
316
337
 
317
- ### Partner clients for `http_api` records
318
-
319
- `HttpApiClients` gives an `HttpClient` for one `http_api` record. Each request joins the record's `baseUrl`
320
- and carries its headers, authentication, TLS, and proxy settings. A header that the request sets wins over the
321
- record's header. Read the service where the handler group is built, and build the client where the record is read:
322
-
323
- ```ts
324
- import { HttpApiClients } from '@temper/workflow';
325
-
326
- const clients = yield * HttpApiClients; // in the Effect that builds the handler group
327
-
328
- const carrier = yield * clients.client('carrier', yield * CarrierApi); // in a request
329
- const response = yield * carrier.get('/v1/shipments');
330
- ```
331
-
332
- The client applies `none`, `basic`, `bearer`, `api_key`, `oauth2_client_credentials`, and `oauth2_password`.
333
- For the two OAuth types, workflow code holds no token, and the VM never logs in to the partner:
334
-
335
- - The Temper API logs in with the record's `tokenRequest`, including `private_key_jwt` client authentication and
336
- the token-request `headers` (for example a login API key), and keeps the token in its memory. Every VM of
337
- the organization that uses the same login gets that token until 60 seconds before it expires. Each API
338
- process logs in on its own, so the partner must accept tokens from several API processes at the same time.
339
- The client asks for the token at `POST /api/v1/runtime/resources/access-token`, within one 20-second deadline.
340
- - The key must name a stored `http_api` record in the workflow's reach: the API resolves the key itself, so a
341
- record that workflow code builds gets no token. On a stack whose Temper API does not have the route yet, the
342
- call fails with a message that says so; update the API first.
343
- - The client names the login identity of its record: a hash of the base URL, auth type, token URL, client id,
344
- username, scope, audience, `extraParams`, and token-request `headers`, without the client secret, private key,
345
- or password. When the key names a record with another identity, the call fails with
346
- `Resource <key> changed since this workflow read it`. After an edit of one of these fields (a login header
347
- value included, also a secret one), a running workflow gets this error until it reads the record again; the SDK
348
- caches a resolved record for 30 seconds.
349
- - The client keeps the token in the memory of this VM until 30 seconds before it expires, per resource key and
350
- login identity. Two records read under one key, such as two tenants, never share a token. A rotated secret
351
- keeps the held token until it expires or the partner answers 401. Concurrent calls for one login share one
352
- request to the API. A token answer without a lifetime serves one call.
353
- - A failed or interrupted request keeps no token, so the next call asks again. A failed partner login fails the
354
- call with an `HttpClientError` that names the key, the partner's HTTP status, and its OAuth error code.
355
- - After a 401 answer, the client tells the API which token the partner refused and sends the request one more
356
- time with the token the API answers. A second 401 goes to the workflow. The API logs in again only for a
357
- refused token whose login is 60 seconds old or more, at most once in 5 seconds; a login the partner refused
358
- with 400, 401, or 403 answers with that failure for 60 seconds. A request with a stream body is not sent
359
- again: the workflow gets the 401, and the next call asks the API again.
360
-
361
- A partner call follows redirects as `fetch` does. On a redirect to another origin, `fetch` removes
362
- `Authorization` only: an API key in another header, and the record's `headers`, go to that origin. To stop
363
- that for a partner that redirects, provide `FetchHttpClient.RequestInit` with `redirect: 'manual'` around the call.
364
-
365
- The client fails with `UnsupportedHttpApiResourceError` and sends nothing for a setting it cannot apply:
366
- `oauth2_jwt_bearer`, `oauth1_tba`, `aws_sigv4`, an auth type a newer platform added, and TLS or proxy settings
367
- outside the Bun runtime, and, on an OAuth record, TLS or proxy settings or a token URL that is not https. The
368
- message is `Resource <key> uses <setting>, which the workflow HTTP client does not support.` In tests,
369
- `testPlatform({ fetch, resources })` logs in for each token in memory: it sends the record's token request through
370
- `fetch`.
371
-
372
338
  ## Invoke in a test
373
339
 
374
340
  ```ts
@@ -1,22 +1,29 @@
1
- import { Effect, Redacted } from 'effect';
2
- /** A token the platform issued for one login. */
1
+ import { Context, Effect, Layer, Redacted } from 'effect';
2
+ import { RuntimeAccessTokenStore } from './RuntimeResources.js';
3
+ /** What a partner's token endpoint issued. */
3
4
  export interface IssuedAccessToken {
4
- /** The credential as the workflow sends it, for example the `access_token`. */
5
+ /** The credential as the workflow sends it, for example the `access_token` or a whole `Authorization` value. */
5
6
  readonly token: Redacted.Redacted<string>;
6
- /** Seconds of lifetime left when the request started. `null` means "use once"; a lifetime under 30 s is used once too. */
7
- readonly expiresIn: number | null;
7
+ /** The partner's lifetime in seconds (`expires_in`). A value that is not a positive number means "use once". */
8
+ readonly expiresIn: number;
8
9
  }
9
- export interface AccessTokens {
10
+ export interface AccessTokensService {
10
11
  /**
11
- * A usable token for `login`: the one this VM holds, else a new one from `request`, which receives the token
12
- * the partner last refused for this login. That refusal goes on one request only: it is cleared when the request
13
- * settles, unless the request is interrupted. Concurrent calls for one login share one request, and its answer,
14
- * also a use-once token. A failed or interrupted `request` keeps no token.
12
+ * A usable token for the resource record `resourceKey`: this VM's, else the one another VM of this workflow
13
+ * stored on the platform, else a new one from `request`. Concurrent calls for one record share one request.
14
+ * A failed or interrupted `request` keeps and shares nothing.
15
15
  */
16
- readonly get: <E, R>(login: string, request: (refused: string | undefined) => Effect.Effect<IssuedAccessToken, E, R>) => Effect.Effect<Redacted.Redacted<string>, E, R>;
17
- /** Reports a token the partner refused (a 401): this VM drops it, and the next request names it. */
18
- readonly refuse: (login: string, token: Redacted.Redacted<string>) => Effect.Effect<void>;
16
+ readonly get: <E, R>(resourceKey: string, request: Effect.Effect<IssuedAccessToken, E, R>) => Effect.Effect<Redacted.Redacted<string>, E, R>;
17
+ /** Reports a token the partner refused (a 401): this VM never uses it again, and its next `get` replaces it. */
18
+ readonly refuse: (resourceKey: string, token: Redacted.Redacted<string>) => Effect.Effect<void>;
19
19
  }
20
- /** Platform-issued access tokens held in the memory of this VM and reused until they expire. */
21
- export declare const makeAccessTokens: () => AccessTokens;
20
+ declare const AccessTokens_base: Context.ServiceClass<AccessTokens, "@temper/workflow/AccessTokens", AccessTokensService>;
21
+ /**
22
+ * Partner access tokens for a workflow, reused until they expire: across requests in this VM, and across the VMs
23
+ * and hosts of the workflow through the Temper platform. Contract: docs/specs/workflow-access-tokens.md.
24
+ */
25
+ export declare class AccessTokens extends AccessTokens_base {
26
+ static readonly layer: Layer.Layer<AccessTokens, never, RuntimeAccessTokenStore>;
27
+ }
28
+ export {};
22
29
  //# sourceMappingURL=AccessTokens.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AccessTokens.d.ts","sourceRoot":"","sources":["../src/AccessTokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,MAAM,EAAgB,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAMhF,iDAAiD;AACjD,MAAM,WAAW,iBAAiB;IAChC,+EAA+E;IAC/E,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC1C,0HAA0H;IAC1H,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAED,MAAM,WAAW,YAAY;IAC3B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,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACpD,gHAAgH;IAChH,QAAQ,CAAC,MAAM,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;CACjG;;AA+DD;;;GAGG;AACH,qBAAa,YAAa,SAAQ,iBAEjC;IAEC,MAAM,CAAC,QAAQ,CAAC,KAAK,4DAAoC;CAC1D"}
@@ -1,69 +1,67 @@
1
- import { Cause, Clock, Deferred, Effect, Exit, Option, Redacted } from 'effect';
1
+ import { Clock, Context, Duration, Effect, Layer, Option, Redacted, Semaphore } from 'effect';
2
2
  import { registerSecrets } from './Redaction.js';
3
- // A token this close to its expiry could lapse mid-request, so it counts as spent (as in legacy `unnbound-env`).
3
+ import { RuntimeAccessTokenStore } from './RuntimeResources.js';
4
+ /** A token this close to its expiry could lapse mid-request, so it counts as spent (as in legacy `unnbound-env`). */
4
5
  const EXPIRY_MARGIN_MS = 30_000;
6
+ /** The platform store only saves partner requests: past this wait the workflow asks the partner itself. */
7
+ const STORE_BUDGET = Duration.seconds(2);
5
8
  const usable = (expiresAt, now) => expiresAt - EXPIRY_MARGIN_MS > now;
6
- /** Platform-issued access tokens held in the memory of this VM and reused until they expire. */
7
- export const makeAccessTokens = () => {
8
- const logins = new Map();
9
- const loginOf = (login) => {
10
- const existing = logins.get(login);
9
+ const make = Effect.gen(function* () {
10
+ const store = yield* RuntimeAccessTokenStore;
11
+ const held = new Map();
12
+ // The last token each record's partner refused: the store still holds it until the replacement is written.
13
+ const refused = new Map();
14
+ const locks = new Map();
15
+ const lockOf = (resourceKey) => {
16
+ const existing = locks.get(resourceKey);
11
17
  if (existing !== undefined)
12
18
  return existing;
13
- const created = { held: undefined, refused: undefined, flight: undefined };
14
- logins.set(login, created);
15
- return created;
19
+ const lock = Semaphore.makeUnsafe(1);
20
+ locks.set(resourceKey, lock);
21
+ return lock;
16
22
  };
17
- // The waiters of a request share its outcome; an interrupted request hands them none, and they start over.
18
- const settle = (state, flight, refused, exit) => {
19
- state.flight = undefined;
20
- const interrupted = Exit.isFailure(exit) && Cause.hasInterruptsOnly(exit.cause);
21
- // A refusal reported while the request ran is newer, so it stays for the next request.
22
- if (!interrupted && state.refused === refused)
23
- state.refused = undefined;
24
- if (Exit.isSuccess(exit))
25
- Deferred.doneUnsafe(flight, Exit.succeed(Option.some(exit.value)));
26
- else if (interrupted)
27
- Deferred.doneUnsafe(flight, Exit.succeed(Option.none()));
28
- else
29
- Deferred.doneUnsafe(flight, Exit.failCause(exit.cause));
30
- };
31
- const get = (login, request) => Effect.gen(function* () {
32
- const state = loginOf(login);
33
- const now = yield* Clock.currentTimeMillis;
34
- if (state.held !== undefined && usable(state.held.expiresAt, now)) {
35
- // A cached token may reach a request this VM serves later, so its mask registers on every hit.
36
- yield* registerSecrets([state.held.token]);
37
- return Redacted.make(state.held.token);
23
+ // The store never fails or delays a partner call: an error, or no answer in time, reads as no answer.
24
+ const bounded = (operation) => operation.pipe(Effect.timeoutOption(STORE_BUDGET), Effect.catch(() => Effect.succeed(Option.none())));
25
+ const get = (resourceKey, request) => Effect.gen(function* () {
26
+ const local = held.get(resourceKey);
27
+ if (local !== undefined && usable(local.expiresAt, yield* Clock.currentTimeMillis)) {
28
+ return Redacted.make(local.token);
38
29
  }
39
- if (state.flight !== undefined) {
40
- // SAFETY: one client builds every request of a login, so the flight fails only with that request's error type.
41
- const shared = yield* Deferred.await(state.flight);
42
- return Option.isSome(shared) ? Redacted.make(shared.value) : yield* get(login, request);
30
+ const shared = Option.flatten(yield* bounded(store.read(resourceKey)));
31
+ if (Option.isSome(shared)) {
32
+ const token = Redacted.value(shared.value.token);
33
+ if (token !== refused.get(resourceKey) && usable(shared.value.expiresAt, yield* Clock.currentTimeMillis)) {
34
+ held.set(resourceKey, { token, expiresAt: shared.value.expiresAt });
35
+ return shared.value.token;
36
+ }
43
37
  }
44
- const flight = Deferred.makeUnsafe();
45
- state.flight = flight;
46
- const { refused } = state;
47
- return yield* Effect.gen(function* () {
48
- const issued = yield* request(refused);
49
- const token = Redacted.value(issued.token);
50
- yield* registerSecrets([token]);
51
- // The lifetime counts from the start of the request: the platform's clock ran while its answer travelled.
52
- const expiresAt = now + (issued.expiresIn ?? 0) * 1000;
53
- state.held =
54
- issued.expiresIn !== null && usable(expiresAt, yield* Clock.currentTimeMillis)
55
- ? { token, expiresAt }
56
- : undefined;
57
- return token;
58
- }).pipe(Effect.onExit((exit) => Effect.sync(() => settle(state, flight, refused, exit))), Effect.map((token) => Redacted.make(token)));
59
- });
60
- const refuse = (login, token) => Effect.sync(() => {
61
- const state = loginOf(login);
38
+ // The lifetime counts from the start of the request: the partner's clock ran while its answer travelled.
39
+ const requestedAt = yield* Clock.currentTimeMillis;
40
+ const issued = yield* request;
41
+ const token = Redacted.value(issued.token);
42
+ yield* registerSecrets([token]);
43
+ const expiresAt = requestedAt + issued.expiresIn * 1000;
44
+ if (!Number.isFinite(expiresAt) || !usable(expiresAt, yield* Clock.currentTimeMillis))
45
+ return issued.token;
46
+ held.set(resourceKey, { token, expiresAt });
47
+ // Inside the lock, so the writes of this VM reach the store in the order of its token requests.
48
+ yield* bounded(store.write(resourceKey, { token: issued.token, expiresAt }));
49
+ return issued.token;
50
+ }).pipe(Semaphore.withPermit(lockOf(resourceKey)));
51
+ const refuse = (resourceKey, token) => Effect.sync(() => {
62
52
  const value = Redacted.value(token);
63
- if (state.held?.token === value)
64
- state.held = undefined;
65
- state.refused = value;
53
+ refused.set(resourceKey, value);
54
+ if (held.get(resourceKey)?.token === value)
55
+ held.delete(resourceKey);
66
56
  });
67
57
  return { get, refuse };
68
- };
58
+ });
59
+ /**
60
+ * Partner access tokens for a workflow, reused until they expire: across requests in this VM, and across the VMs
61
+ * and hosts of the workflow through the Temper platform. Contract: docs/specs/workflow-access-tokens.md.
62
+ */
63
+ export class AccessTokens extends Context.Service()('@temper/workflow/AccessTokens') {
64
+ // Needs the store, which `workflow()` provides.
65
+ static layer = Layer.effect(AccessTokens, make);
66
+ }
69
67
  //# sourceMappingURL=AccessTokens.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AccessTokens.js","sourceRoot":"","sources":["../src/AccessTokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,iHAAiH;AACjH,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAoChC,MAAM,MAAM,GAAG,CAAC,SAAiB,EAAE,GAAW,EAAE,EAAE,CAAC,SAAS,GAAG,gBAAgB,GAAG,GAAG,CAAC;AAEtF,gGAAgG;AAChG,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAiB,EAAE;IACjD,MAAM,MAAM,GAAG,IAAI,GAAG,EAAiB,CAAC;IAExC,MAAM,OAAO,GAAG,CAAC,KAAa,EAAS,EAAE;QACvC,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACnC,IAAI,QAAQ,KAAK,SAAS;YAAE,OAAO,QAAQ,CAAC;QAC5C,MAAM,OAAO,GAAU,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;QAClF,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAC3B,OAAO,OAAO,CAAC;IACjB,CAAC,CAAC;IAEF,2GAA2G;IAC3G,MAAM,MAAM,GAAG,CACb,KAAY,EACZ,MAAoC,EACpC,OAA2B,EAC3B,IAA0B,EAC1B,EAAE;QACF,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC;QACzB,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,CA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,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAC5C,gGAAgG;QAChG,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC;QAC7E,OAAO,MAAM,CAAC,KAAK,CAAC;IACtB,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAErD,MAAM,MAAM,GAAkC,CAAC,WAAW,EAAE,KAAK,EAAE,EAAE,CACnE,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE;QACf,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACpC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;QAChC,IAAI,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,KAAK,KAAK,KAAK;YAAE,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IACvE,CAAC,CAAC,CAAC;IAEL,OAAO,EAAE,GAAG,EAAE,MAAM,EAAgC,CAAC;AACvD,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,OAAO,YAAa,SAAQ,OAAO,CAAC,OAAO,EAAqC,CACpF,+BAA+B,CAChC;IACC,gDAAgD;IAChD,MAAM,CAAU,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;CAC1D"}
@@ -1,4 +1,4 @@
1
- import type { HttpProxy, TlsSettings } from './HttpApiResource.js';
1
+ import type { As2PartnerResource } from './As2Resource.js';
2
2
  import type { BunTransport } from './HttpClient.js';
3
3
  /** A partner's delivery connection: the Bun `fetch` options that apply its settings, or why they cannot apply. */
4
4
  export type As2DeliveryTransport = {
@@ -9,18 +9,13 @@ export type As2DeliveryTransport = {
9
9
  readonly code: string;
10
10
  readonly message: string;
11
11
  };
12
- /** The connection settings an `as2_partner` and an `http_api` record share. */
13
- export interface TransportSettings {
14
- readonly tls?: TlsSettings | undefined;
15
- readonly proxy?: HttpProxy | undefined;
16
- }
17
12
  /** True where the global `fetch` is Bun's, the only one that takes `tls` and `proxy`. */
18
13
  export declare const bunFetch: () => boolean;
19
14
  /**
20
15
  * Legacy `@ontemper/as2` checks and connection options for one delivery URL, on Bun's `fetch`. Another runtime's
21
16
  * `fetch` skips `tls` and `proxy` without an error, so a partner that sets either is refused there.
22
17
  */
23
- export declare const deliveryTransport: (partner: TransportSettings, url: URL, bun: boolean) => As2DeliveryTransport;
18
+ export declare const deliveryTransport: (partner: As2PartnerResource, url: URL, bun: boolean) => As2DeliveryTransport;
24
19
  /** A request to the address the destination check approved, in place of the name in its URL. */
25
20
  export interface PinnedDestination {
26
21
  readonly url: string;
@@ -1 +1 @@
1
- {"version":3,"file":"As2Transport.d.ts","sourceRoot":"","sources":["../src/As2Transport.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,kHAAkH;AAClH,MAAM,MAAM,oBAAoB,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,YAAY,CAAA;CAAE,GAC5D;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAIlF,+EAA+E;AAC/E,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,GAAG,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IACvC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS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,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;IACxG,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;AACtC,CAAC,CAAC;AASF;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,GAAQ,EAAE,OAAe,EAAqB,EAAE;IAChF,MAAM,IAAI,GAAG,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAClD,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACjC,MAAM,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,OAAO,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC;IACnE,MAAM,SAAS,GAA0B,EAAE,CAAC;IAC5C,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ,IAAI,IAAI,KAAK,OAAO;QAAE,SAAS,CAAC,GAAG,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;IACxF,OAAO,EAAE,GAAG,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,SAAS,EAAE,CAAC;AACzD,CAAC,CAAC"}
@@ -31,14 +31,11 @@ export declare const RuntimeInspectedResourceSchema: Schema.Struct<{
31
31
  export declare const SelectResourceRuntimeOutputSchema: Schema.Struct<{
32
32
  readonly key: Schema.String;
33
33
  }>;
34
- /** A partner OAuth token the platform issued for the login identity the caller named. */
35
- export declare const IssuedAccessTokenSchema: Schema.Struct<{
34
+ /** A token one VM got from a partner, kept for the other VMs of the same workflow and environment. */
35
+ export declare const RuntimeAccessTokenSchema: Schema.Struct<{
36
36
  readonly token: Schema.String;
37
- readonly expiresIn: Schema.NullOr<Schema.Number>;
38
- readonly redactionMasks: Schema.$Array<Schema.String>;
37
+ readonly expiresAt: Schema.Number;
39
38
  }>;
40
- /** The RFC 6749 section 5.2 error codes a partner refusal can name; any other code is left out. */
41
- export declare const OAUTH_TOKEN_ERROR_CODES: readonly ['invalid_request', 'invalid_client', 'invalid_grant', 'unauthorized_client', 'unsupported_grant_type', 'invalid_scope'];
42
39
  declare const RuntimeResourcesUnauthorizedError_base: Schema.Class<RuntimeResourcesUnauthorizedError, Schema.TaggedStruct<"RuntimeResourcesUnauthorizedError", {
43
40
  readonly error: Schema.Literal<"Unauthorized">;
44
41
  }>, import("effect/Cause").YieldableError>;
@@ -54,15 +51,6 @@ declare const RuntimeResourcesNotFoundError_base: Schema.Class<RuntimeResourcesN
54
51
  }>, import("effect/Cause").YieldableError>;
55
52
  export declare class RuntimeResourcesNotFoundError extends RuntimeResourcesNotFoundError_base {
56
53
  }
57
- declare const RuntimeResourcesRecordNotFoundError_base: Schema.Class<RuntimeResourcesRecordNotFoundError, Schema.TaggedStruct<"RuntimeResourcesRecordNotFoundError", {
58
- readonly error: Schema.Literal<"Resource not found">;
59
- }>, import("effect/Cause").YieldableError>;
60
- /**
61
- * The access-token route's 404: no record of the key in reach, or a Variable it points at is missing. Its body differs
62
- * from the API's answer for a route it does not have, `{ error: 'Not found' }`, so a client can tell them apart.
63
- */
64
- export declare class RuntimeResourcesRecordNotFoundError extends RuntimeResourcesRecordNotFoundError_base {
65
- }
66
54
  declare const RuntimeResourcesBadRequestError_base: Schema.Class<RuntimeResourcesBadRequestError, Schema.TaggedStruct<"RuntimeResourcesBadRequestError", {
67
55
  readonly error: Schema.String;
68
56
  }>, import("effect/Cause").YieldableError>;
@@ -78,14 +66,6 @@ declare const RuntimeResourcesUnavailableError_base: Schema.Class<RuntimeResourc
78
66
  }>, import("effect/Cause").YieldableError>;
79
67
  export declare class RuntimeResourcesUnavailableError extends RuntimeResourcesUnavailableError_base {
80
68
  }
81
- declare const RuntimeResourcesPartnerLoginError_base: Schema.Class<RuntimeResourcesPartnerLoginError, Schema.TaggedStruct<"RuntimeResourcesPartnerLoginError", {
82
- readonly error: Schema.String;
83
- readonly partnerStatus: Schema.optionalKey<Schema.Number>;
84
- readonly oauthError: Schema.optionalKey<Schema.Literals<readonly ["invalid_request", "invalid_client", "invalid_grant", "unauthorized_client", "unsupported_grant_type", "invalid_scope"]>>;
85
- }>, import("effect/Cause").YieldableError>;
86
- /** The platform's login to the partner token endpoint failed, now or inside the time its last failure still answers. */
87
- export declare class RuntimeResourcesPartnerLoginError extends RuntimeResourcesPartnerLoginError_base {
88
- }
89
69
  export declare const ResourcesRuntimeApi: HttpApi.HttpApi<"resources-runtime-api", HttpApiGroup.HttpApiGroup<"resourcesRuntime", HttpApiEndpoint.HttpApiEndpoint<"inspectResource", "POST", "/api/v1/runtime/resources/inspect", never, never, Schema.toCodecJson<Schema.Struct<{
90
70
  readonly key: Schema.String;
91
71
  }>>, Schema.toCodecStringTree<Schema.Struct<{
@@ -122,34 +102,28 @@ export declare const ResourcesRuntimeApi: HttpApi.HttpApi<"resources-runtime-api
122
102
  readonly error: Schema.String;
123
103
  }>, never, never> | Schema.decodeTo<typeof RuntimeResourcesUnavailableError, Schema.Struct<{
124
104
  readonly error: Schema.String;
125
- }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"issueAccessToken", "POST", "/api/v1/runtime/resources/access-token", never, never, Schema.toCodecJson<Schema.Struct<{
105
+ }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"readAccessToken", "POST", "/api/v1/runtime/resources/access-token/read", never, never, Schema.toCodecJson<Schema.Struct<{
126
106
  readonly key: Schema.String;
127
- readonly identity: Schema.String;
128
- readonly refused: Schema.optionalKey<Schema.String>;
129
107
  }>>, Schema.toCodecStringTree<Schema.Struct<{
130
108
  readonly authorization: Schema.optionalKey<Schema.String>;
131
109
  }>>, Schema.toCodecJson<Schema.Struct<{
132
- readonly token: Schema.String;
133
- readonly expiresIn: Schema.NullOr<Schema.Number>;
134
- readonly redactionMasks: Schema.$Array<Schema.String>;
110
+ readonly redactionMasks: Schema.optionalKey<Schema.$Array<Schema.String>>;
111
+ readonly value: Schema.NullOr<Schema.Struct<{
112
+ readonly token: Schema.String;
113
+ readonly expiresAt: Schema.Number;
114
+ }>>;
135
115
  }>>, Schema.toCodecJson<Schema.decodeTo<typeof RuntimeResourcesUnauthorizedError, Schema.Struct<{
136
116
  readonly error: Schema.Literal<"Unauthorized">;
137
117
  }>, never, never> | Schema.decodeTo<typeof RuntimeResourcesForbiddenError, Schema.Struct<{
138
118
  readonly error: Schema.Literal<"Forbidden">;
139
119
  }>, never, never> | Schema.decodeTo<typeof RuntimeResourcesNotFoundError, Schema.Struct<{
140
120
  readonly error: Schema.Literal<"Not found">;
141
- }>, never, never> | Schema.decodeTo<typeof RuntimeResourcesRecordNotFoundError, Schema.Struct<{
142
- readonly error: Schema.Literal<"Resource not found">;
143
121
  }>, never, never> | Schema.decodeTo<typeof RuntimeResourcesBadRequestError, Schema.Struct<{
144
122
  readonly error: Schema.String;
145
123
  }>, never, never> | Schema.decodeTo<typeof RuntimeResourcesConflictError, Schema.Struct<{
146
124
  readonly error: Schema.String;
147
125
  }>, never, never> | Schema.decodeTo<typeof RuntimeResourcesUnavailableError, Schema.Struct<{
148
126
  readonly error: Schema.String;
149
- }>, never, never> | Schema.decodeTo<typeof RuntimeResourcesPartnerLoginError, Schema.Struct<{
150
- readonly error: Schema.String;
151
- readonly partnerStatus: Schema.optionalKey<Schema.Number>;
152
- readonly oauthError: Schema.optionalKey<Schema.Literals<readonly ["invalid_request", "invalid_client", "invalid_grant", "unauthorized_client", "unsupported_grant_type", "invalid_scope"]>>;
153
127
  }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"resolveResource", "POST", "/api/v1/runtime/resources/resolve", never, never, Schema.toCodecJson<Schema.Struct<{
154
128
  readonly key: Schema.String;
155
129
  }>>, Schema.toCodecStringTree<Schema.Struct<{
@@ -210,6 +184,26 @@ export declare const ResourcesRuntimeApi: HttpApi.HttpApi<"resources-runtime-api
210
184
  readonly error: Schema.String;
211
185
  }>, never, never> | Schema.decodeTo<typeof RuntimeResourcesUnavailableError, Schema.Struct<{
212
186
  readonly error: Schema.String;
187
+ }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"writeAccessToken", "POST", "/api/v1/runtime/resources/access-token/write", never, never, Schema.toCodecJson<Schema.Struct<{
188
+ readonly key: Schema.String;
189
+ readonly token: Schema.String;
190
+ readonly expiresAt: Schema.Number;
191
+ }>>, Schema.toCodecStringTree<Schema.Struct<{
192
+ readonly authorization: Schema.optionalKey<Schema.String>;
193
+ }>>, Schema.toCodecJson<Schema.Struct<{
194
+ readonly stored: Schema.Boolean;
195
+ }>>, Schema.toCodecJson<Schema.decodeTo<typeof RuntimeResourcesUnauthorizedError, Schema.Struct<{
196
+ readonly error: Schema.Literal<"Unauthorized">;
197
+ }>, never, never> | Schema.decodeTo<typeof RuntimeResourcesForbiddenError, Schema.Struct<{
198
+ readonly error: Schema.Literal<"Forbidden">;
199
+ }>, never, never> | Schema.decodeTo<typeof RuntimeResourcesNotFoundError, Schema.Struct<{
200
+ readonly error: Schema.Literal<"Not found">;
201
+ }>, never, never> | Schema.decodeTo<typeof RuntimeResourcesBadRequestError, Schema.Struct<{
202
+ readonly error: Schema.String;
203
+ }>, never, never> | Schema.decodeTo<typeof RuntimeResourcesConflictError, Schema.Struct<{
204
+ readonly error: Schema.String;
205
+ }>, never, never> | Schema.decodeTo<typeof RuntimeResourcesUnavailableError, Schema.Struct<{
206
+ readonly error: Schema.String;
213
207
  }>, never, never>>, never, never>, false>>;
214
208
  export {};
215
209
  //# sourceMappingURL=RuntimeApi.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RuntimeApi.d.ts","sourceRoot":"","sources":["../../src/Contract/RuntimeApi.ts"],"names":[],"mappings":"AA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