apps 0.0.1-beta.141 → 0.0.1-beta.143

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 (47) hide show
  1. package/framework-reference.json +1 -1
  2. package/js/{chunk-I6QAWNUM.js → chunk-2OGVSUNI.js} +2 -2
  3. package/js/{chunk-QTX7OUFH.js → chunk-2XEQYDQY.js} +2 -2
  4. package/js/{chunk-EYZHR4UA.js → chunk-3RIEA22Q.js} +17 -13
  5. package/js/{chunk-LSOHA2RH.js → chunk-6XBOKQ4E.js} +1 -1
  6. package/js/{chunk-H2K7OZ47.js → chunk-7A4ZSEM3.js} +1 -1
  7. package/js/{chunk-EKXBHVMR.js → chunk-ADG72XX3.js} +2 -2
  8. package/js/{chunk-SB2DNKDL.js → chunk-B54D6AN7.js} +5 -5
  9. package/js/{chunk-VX36SA7Y.js → chunk-BHSWVS3Q.js} +1 -1
  10. package/js/{chunk-JH3MOQZR.js → chunk-H4JK7UTH.js} +4 -4
  11. package/js/{chunk-6QZVXLF2.js → chunk-INQON4A2.js} +2 -2
  12. package/js/{chunk-MB6L5YZE.js → chunk-IWLFLMIL.js} +1 -1
  13. package/js/{chunk-YF7TYPDS.js → chunk-K24M6LZ7.js} +3 -3
  14. package/js/{chunk-7MPPHKRW.js → chunk-LRXY54YF.js} +18 -5
  15. package/js/{chunk-YFSOSNF3.js → chunk-NXEGROI6.js} +116 -116
  16. package/js/{chunk-GJG5G6CH.js → chunk-NXUNFV44.js} +8 -8
  17. package/js/{chunk-DQ6FIDC3.js → chunk-PASOVDON.js} +6 -6
  18. package/js/{chunk-YVN2AMAU.js → chunk-QLUWYCOT.js} +2 -2
  19. package/js/{chunk-RBSXSRPU.js → chunk-RUSVGD5N.js} +4 -4
  20. package/js/{chunk-Z6DSU4VL.js → chunk-RW5EXIO6.js} +35 -23
  21. package/js/{chunk-OBT33ZDK.js → chunk-TMYRAFMC.js} +3 -3
  22. package/js/{chunk-5JBDHSLK.js → chunk-V6OUBNL4.js} +6 -6
  23. package/js/{chunk-2XDCAXAR.js → chunk-W6V5OIHB.js} +1 -1
  24. package/js/{chunk-34RH47V5.js → chunk-XAOJP46A.js} +2 -2
  25. package/js/{chunk-JHAHT26O.js → chunk-XRNSAU62.js} +2 -2
  26. package/js/{chunk-JIXIOWZP.js → chunk-Y3QPWYHC.js} +6 -6
  27. package/js/client.js +10 -10
  28. package/js/contracts.js +9 -7
  29. package/js/effect.js +18 -18
  30. package/js/graphql.js +20 -20
  31. package/js/host.js +18 -18
  32. package/js/index.js +13 -13
  33. package/js/mcp/effect.js +19 -19
  34. package/js/mcp.js +21 -21
  35. package/js/openapi.js +16 -16
  36. package/js/react.js +2 -2
  37. package/js/skills/effect.js +6 -6
  38. package/js/skills.js +15 -15
  39. package/js/ui/auth/contracts.js +2 -2
  40. package/js/ui/auth.js +5 -5
  41. package/js/ui/contracts.js +5 -5
  42. package/js/ui/serving.js +10 -10
  43. package/package.json +1 -1
  44. package/runtime.json +1 -1
  45. package/types/apps/src/contracts/host.d.ts +13 -0
  46. package/types/apps/src/contracts/protocols/current.d.ts +27 -0
  47. package/types/apps/src/contracts/provider.d.ts +5 -0
@@ -5,7 +5,7 @@ import {
5
5
  fromWeb,
6
6
  layerMergedContext,
7
7
  make2 as make
8
- } from "./chunk-MB6L5YZE.js";
8
+ } from "./chunk-IWLFLMIL.js";
9
9
  import {
10
10
  Reference,
11
11
  Service,
@@ -28,7 +28,7 @@ import {
28
28
  sync2 as sync,
29
29
  toReadableStreamEffect,
30
30
  tryPromise
31
- } from "./chunk-YFSOSNF3.js";
31
+ } from "./chunk-NXEGROI6.js";
32
32
  import {
33
33
  __export
34
34
  } from "./chunk-CZ7CSFO4.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  RecordedMessage
3
- } from "./chunk-LSOHA2RH.js";
3
+ } from "./chunk-6XBOKQ4E.js";
4
4
  import {
5
5
  SchemaGetter_exports,
6
6
  Schema_exports
7
- } from "./chunk-YFSOSNF3.js";
7
+ } from "./chunk-NXEGROI6.js";
8
8
 
9
9
  // ../utils/src/api-error.ts
10
10
  var MessageField = Schema_exports.String.pipe(
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  authorCache,
3
3
  unavailableCache
4
- } from "./chunk-DQ6FIDC3.js";
4
+ } from "./chunk-PASOVDON.js";
5
5
  import {
6
6
  accountSecrets,
7
7
  boundFailureMessage,
@@ -12,13 +12,13 @@ import {
12
12
  parseSkillLoadFailed,
13
13
  readCatalog,
14
14
  routerSkills
15
- } from "./chunk-GJG5G6CH.js";
15
+ } from "./chunk-NXUNFV44.js";
16
16
  import {
17
17
  appInvocationFetch
18
- } from "./chunk-YF7TYPDS.js";
18
+ } from "./chunk-K24M6LZ7.js";
19
19
  import {
20
20
  folderSkillsEffect
21
- } from "./chunk-34RH47V5.js";
21
+ } from "./chunk-XAOJP46A.js";
22
22
  import {
23
23
  ResponseStatusError,
24
24
  declaredEvents,
@@ -26,12 +26,12 @@ import {
26
26
  makeEmitter,
27
27
  toEffectApp,
28
28
  withPlacements
29
- } from "./chunk-5JBDHSLK.js";
29
+ } from "./chunk-V6OUBNL4.js";
30
30
  import {
31
31
  declaredOperations,
32
32
  locate,
33
33
  nativeOperation
34
- } from "./chunk-SB2DNKDL.js";
34
+ } from "./chunk-B54D6AN7.js";
35
35
  import {
36
36
  accountProviderError,
37
37
  appCode,
@@ -39,9 +39,10 @@ import {
39
39
  httpProviderError,
40
40
  parseProviderError,
41
41
  toPromise
42
- } from "./chunk-RBSXSRPU.js";
42
+ } from "./chunk-RUSVGD5N.js";
43
43
  import {
44
44
  AccountCheckResult,
45
+ AfterReply,
45
46
  DeclaredProvider,
46
47
  DeclaredRequirements,
47
48
  ElicitationFailed,
@@ -95,11 +96,11 @@ import {
95
96
  sqlBindingsLimit,
96
97
  withoutHelp,
97
98
  workflowDurationMillis
98
- } from "./chunk-7MPPHKRW.js";
99
+ } from "./chunk-LRXY54YF.js";
99
100
  import {
100
101
  AppSkills,
101
102
  SkillFile
102
- } from "./chunk-QTX7OUFH.js";
103
+ } from "./chunk-2XEQYDQY.js";
103
104
  import {
104
105
  allowedValues,
105
106
  echoableKey,
@@ -112,17 +113,17 @@ import {
112
113
  missingKeyText,
113
114
  objectShape,
114
115
  unionShape
115
- } from "./chunk-EKXBHVMR.js";
116
+ } from "./chunk-ADG72XX3.js";
116
117
  import {
117
118
  captureTelemetry,
118
119
  makeOwnershipAccounting,
119
120
  measuredSpan,
120
121
  owned
121
- } from "./chunk-JH3MOQZR.js";
122
+ } from "./chunk-H4JK7UTH.js";
122
123
  import {
123
124
  JsonObject,
124
125
  JsonValue
125
- } from "./chunk-H2K7OZ47.js";
126
+ } from "./chunk-7A4ZSEM3.js";
126
127
  import {
127
128
  Base64_exports,
128
129
  Cause_exports,
@@ -135,7 +136,7 @@ import {
135
136
  SchemaIssue_exports,
136
137
  Schema_exports,
137
138
  Stream_exports
138
- } from "./chunk-YFSOSNF3.js";
139
+ } from "./chunk-NXEGROI6.js";
139
140
 
140
141
  // src/implementation/invocation-timing.ts
141
142
  var elicitationWaitSpan = "app.elicitation.wait";
@@ -1739,6 +1740,9 @@ function dispatch(app, request, context, signal, emitted) {
1739
1740
  ...kind === "mutate" ? { events: emitter() } : {}
1740
1741
  },
1741
1742
  input
1743
+ ).pipe(
1744
+ // The cache session's background runner, which the host drains after the reply.
1745
+ Effect_exports.provideService(AfterReply, context.cache?.background)
1742
1746
  );
1743
1747
  }).pipe(
1744
1748
  Effect_exports.ensuring(
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Predicate_exports
3
- } from "./chunk-YFSOSNF3.js";
3
+ } from "./chunk-NXEGROI6.js";
4
4
 
5
5
  // ../utils/src/recorded-message.ts
6
6
  var RecordedMessage = /* @__PURE__ */ Symbol.for("@executor-js/utils/RecordedMessage");
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SchemaTransformation_exports,
3
3
  Schema_exports
4
- } from "./chunk-YFSOSNF3.js";
4
+ } from "./chunk-NXEGROI6.js";
5
5
 
6
6
  // src/contracts/schema.ts
7
7
  var JsonValue = Schema_exports.Json;
@@ -2,7 +2,7 @@ import {
2
2
  DeclarationInvalid,
3
3
  JsonObject,
4
4
  ValidationError
5
- } from "./chunk-H2K7OZ47.js";
5
+ } from "./chunk-7A4ZSEM3.js";
6
6
  import {
7
7
  Cause_exports,
8
8
  Effect_exports,
@@ -11,7 +11,7 @@ import {
11
11
  SchemaIssue_exports,
12
12
  SchemaParser_exports,
13
13
  Schema_exports
14
- } from "./chunk-YFSOSNF3.js";
14
+ } from "./chunk-NXEGROI6.js";
15
15
 
16
16
  // ../../node_modules/.bun/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/deep-compare-strict.js
17
17
  function deepCompareStrict(a, b) {
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  accountProviderError,
3
3
  fromPromise
4
- } from "./chunk-RBSXSRPU.js";
4
+ } from "./chunk-RUSVGD5N.js";
5
5
  import {
6
6
  HostedTool,
7
7
  HostedToolSummary,
8
8
  RouterKey,
9
9
  RouterMeta,
10
10
  reservedRouterKeys
11
- } from "./chunk-7MPPHKRW.js";
11
+ } from "./chunk-LRXY54YF.js";
12
12
  import {
13
13
  combineJsonSchemas,
14
14
  decoderOf,
@@ -18,15 +18,15 @@ import {
18
18
  schemaIdentity,
19
19
  schemaMemo,
20
20
  withLazyJsonSchemaDocument
21
- } from "./chunk-EKXBHVMR.js";
21
+ } from "./chunk-ADG72XX3.js";
22
22
  import {
23
23
  JsonObject
24
- } from "./chunk-H2K7OZ47.js";
24
+ } from "./chunk-7A4ZSEM3.js";
25
25
  import {
26
26
  Effect_exports,
27
27
  Result_exports,
28
28
  Schema_exports
29
- } from "./chunk-YFSOSNF3.js";
29
+ } from "./chunk-NXEGROI6.js";
30
30
 
31
31
  // src/implementation/operations.ts
32
32
  var NativeOperation = /* @__PURE__ */ Symbol("apps.Operation");
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Schema_exports
3
- } from "./chunk-YFSOSNF3.js";
3
+ } from "./chunk-NXEGROI6.js";
4
4
 
5
5
  // src/contracts/ui-auth.ts
6
6
  var AppSignInId = Schema_exports.String.check(Schema_exports.isPattern(/^[a-f0-9]{64}$/u)).pipe(
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  FetchHttpClient_exports
3
- } from "./chunk-I6QAWNUM.js";
3
+ } from "./chunk-2OGVSUNI.js";
4
4
  import {
5
5
  recordedMessage
6
- } from "./chunk-LSOHA2RH.js";
6
+ } from "./chunk-6XBOKQ4E.js";
7
7
  import {
8
8
  HttpBody_exports,
9
9
  HttpClient,
@@ -25,7 +25,7 @@ import {
25
25
  text,
26
26
  transformResponse,
27
27
  uint8Array
28
- } from "./chunk-MB6L5YZE.js";
28
+ } from "./chunk-IWLFLMIL.js";
29
29
  import {
30
30
  Array as Array2,
31
31
  Boolean2 as Boolean,
@@ -139,7 +139,7 @@ import {
139
139
  withDefault2 as withDefault,
140
140
  withTracerEnabled,
141
141
  zero
142
- } from "./chunk-YFSOSNF3.js";
142
+ } from "./chunk-NXEGROI6.js";
143
143
  import {
144
144
  __export
145
145
  } from "./chunk-CZ7CSFO4.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  appSignInCallbackPath
3
- } from "./chunk-VX36SA7Y.js";
3
+ } from "./chunk-BHSWVS3Q.js";
4
4
  import {
5
5
  HttpServerResponse_exports
6
- } from "./chunk-MB6L5YZE.js";
6
+ } from "./chunk-IWLFLMIL.js";
7
7
 
8
8
  // src/implementation/ui-auth.ts
9
9
  var appPrivateHeaders = {
@@ -268,7 +268,7 @@ import {
268
268
  withLogSpan,
269
269
  withParentSpan,
270
270
  zero2 as zero
271
- } from "./chunk-YFSOSNF3.js";
271
+ } from "./chunk-NXEGROI6.js";
272
272
  import {
273
273
  __export
274
274
  } from "./chunk-CZ7CSFO4.js";
@@ -5,14 +5,14 @@ import {
5
5
  networkRefusalHeader,
6
6
  networkRefusalStatus,
7
7
  supportedFetchOptions
8
- } from "./chunk-7MPPHKRW.js";
8
+ } from "./chunk-LRXY54YF.js";
9
9
  import {
10
10
  invocationFetch
11
- } from "./chunk-JH3MOQZR.js";
11
+ } from "./chunk-H4JK7UTH.js";
12
12
  import {
13
13
  Effect_exports,
14
14
  Schema_exports
15
- } from "./chunk-YFSOSNF3.js";
15
+ } from "./chunk-NXEGROI6.js";
16
16
 
17
17
  // src/implementation/network.ts
18
18
  var refusalHeader = (status, header) => status === networkRefusalStatus && header !== null && header !== void 0 ? header : void 0;
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  AppSkillName,
3
3
  AppSkills
4
- } from "./chunk-QTX7OUFH.js";
4
+ } from "./chunk-2XEQYDQY.js";
5
5
  import {
6
6
  RecordedMessage
7
- } from "./chunk-LSOHA2RH.js";
7
+ } from "./chunk-6XBOKQ4E.js";
8
8
  import {
9
9
  AccountId,
10
10
  HttpUrl,
11
11
  JsonObject,
12
12
  JsonValue,
13
13
  withLegacyKeys
14
- } from "./chunk-H2K7OZ47.js";
14
+ } from "./chunk-7A4ZSEM3.js";
15
15
  import {
16
16
  Any,
17
17
  ArraySchema,
@@ -65,7 +65,7 @@ import {
65
65
  transformOptional,
66
66
  withConstructorDefault,
67
67
  withDefault
68
- } from "./chunk-YFSOSNF3.js";
68
+ } from "./chunk-NXEGROI6.js";
69
69
 
70
70
  // src/contracts/failure.ts
71
71
  var maxFailureMessageLength = 2048;
@@ -2452,6 +2452,12 @@ var declaredAuthorizationQuery = Schema_exports.makeFilter(
2452
2452
  return void 0;
2453
2453
  }
2454
2454
  );
2455
+ var declaredPkce = Schema_exports.makeFilter(
2456
+ (config) => config.pkce === false && (config.tokenEndpointAuthMethod === void 0 || config.tokenEndpointAuthMethod === "none") ? {
2457
+ path: ["pkce"],
2458
+ issue: "pkce: false requires tokenEndpointAuthMethod client_secret_post, client_secret_basic or client_secret_basic_raw."
2459
+ } : void 0
2460
+ );
2455
2461
  var OAuthTokenRequestFormat = Schema_exports.Literals(["form", "json"]);
2456
2462
  var OAuthTokenResponse = Schema_exports.Struct({
2457
2463
  path: Schema_exports.String.check(Schema_exports.isPattern(/^[^.]+(\.[^.]+)*$/))
@@ -2501,9 +2507,14 @@ var OAuth2Config = Schema_exports.Union([
2501
2507
  scopes: Schema_exports.Array(Schema_exports.String),
2502
2508
  /** RFC 8414 issuer identifier. Declared issuers are checked against the callback's `iss`. */
2503
2509
  issuer: Schema_exports.optionalKey(HttpUrl),
2510
+ /**
2511
+ * `false` signs in without PKCE, for a service whose token endpoint refuses a confidential
2512
+ * client's `code_verifier`: LinkedIn answers `invalid_client`. Requires a secret client method.
2513
+ */
2514
+ pkce: Schema_exports.optionalKey(Schema_exports.Literal(false)),
2504
2515
  discover: Schema_exports.optionalKey(Schema_exports.Never),
2505
2516
  authorizationServerMetadataUrl: Schema_exports.optionalKey(Schema_exports.Never)
2506
- }).check(declaredAuthorizationQuery),
2517
+ }).check(declaredAuthorizationQuery, declaredPkce),
2507
2518
  Schema_exports.Struct({
2508
2519
  grant: Schema_exports.Literal("client_credentials"),
2509
2520
  discover: HttpUrl,
@@ -5174,6 +5185,7 @@ var ToolResultObservation = Context_exports.Reference(
5174
5185
  { defaultValue: () => ({ failed: () => {
5175
5186
  } }) }
5176
5187
  );
5188
+ var AfterReply = Context_exports.Reference("apps/AfterReply", { defaultValue: () => void 0 });
5177
5189
  var InvocationTiming = Schema_exports.Struct({
5178
5190
  elapsedMs: Schema_exports.Finite,
5179
5191
  upstreamMs: Schema_exports.Finite,
@@ -5413,6 +5425,7 @@ export {
5413
5425
  HostAccountCheckError,
5414
5426
  HostDataError,
5415
5427
  ToolResultObservation,
5428
+ AfterReply,
5416
5429
  InvocationTiming,
5417
5430
  InvocationTimingSink
5418
5431
  };