apps 0.0.1-beta.44 → 0.0.1-beta.46

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 (46) hide show
  1. package/framework-reference.json +1 -1
  2. package/js/{chunk-646JVUH4.js → chunk-3B2JAOSE.js} +23 -12
  3. package/js/{chunk-5SHUB37R.js → chunk-3UGDI2UI.js} +3 -3
  4. package/js/{chunk-7EBODVQJ.js → chunk-6QXPBJ5T.js} +14 -13
  5. package/js/{chunk-MGGMEGB2.js → chunk-7LGRK7TP.js} +2 -2
  6. package/js/{chunk-DZQYE626.js → chunk-7UUHJR2Q.js} +1 -1
  7. package/js/{chunk-4ZTVLEN6.js → chunk-CDXQDN7W.js} +1 -1
  8. package/js/{chunk-ELO5PRCO.js → chunk-CVAJ4F6O.js} +14 -1
  9. package/js/{chunk-CZGWW4NQ.js → chunk-JM7LOD2W.js} +187 -9
  10. package/js/{chunk-EJUK2NK5.js → chunk-KLYSEHUD.js} +1 -1
  11. package/js/{chunk-OTGUPKKK.js → chunk-LHCGND3R.js} +12 -46
  12. package/js/{chunk-EMHFXFTJ.js → chunk-LTDHQJ2Z.js} +53 -0
  13. package/js/{chunk-DRJRCHHO.js → chunk-OJ47HQVJ.js} +141 -63
  14. package/js/{chunk-MZH4J2PO.js → chunk-PD6I2SDG.js} +1 -1
  15. package/js/{chunk-KSGYJV46.js → chunk-TUMGL2OC.js} +1 -1
  16. package/js/{chunk-5GLC42LK.js → chunk-UM62MBJQ.js} +42 -24
  17. package/js/{chunk-V3RS2BK6.js → chunk-XK5I2XOI.js} +39 -29
  18. package/js/client.js +8 -8
  19. package/js/contracts.js +7 -3
  20. package/js/effect.js +11 -11
  21. package/js/graphql.js +20 -18
  22. package/js/host.js +76 -51
  23. package/js/index.js +21 -16
  24. package/js/mcp/effect.js +13 -13
  25. package/js/mcp/stdio.js +27 -22
  26. package/js/mcp.js +20 -18
  27. package/js/openapi.js +103 -77
  28. package/js/skills/effect.js +2 -2
  29. package/js/skills.js +50 -33
  30. package/js/ui/auth.js +3 -3
  31. package/js/ui/contracts.js +3 -3
  32. package/js/ui/serving.js +6 -6
  33. package/package.json +1 -1
  34. package/runtime.json +1 -1
  35. package/types/apps/src/contracts/host.d.ts +15 -0
  36. package/types/apps/src/host.d.ts +5 -0
  37. package/types/apps/src/implementation/authoring.d.ts +25 -5
  38. package/types/apps/src/implementation/cache.d.ts +4 -0
  39. package/types/apps/src/implementation/elicitation.d.ts +6 -3
  40. package/types/apps/src/implementation/invocation-timing.d.ts +16 -0
  41. package/types/apps/src/implementation/operations.d.ts +2 -2
  42. package/types/apps/src/implementation/router-catalog.d.ts +4 -4
  43. package/types/apps/src/implementation/workflows.d.ts +1 -1
  44. package/types/telemetry/src/index.d.ts +1 -0
  45. package/types/telemetry/src/ownership.d.ts +56 -0
  46. package/js/{chunk-LNSVJS2Q.js → chunk-EOPQ727L.js} +2 -2
package/js/skills.js CHANGED
@@ -1,19 +1,22 @@
1
1
  import {
2
2
  catalogCache,
3
3
  catalogScope
4
- } from "./chunk-5GLC42LK.js";
4
+ } from "./chunk-UM62MBJQ.js";
5
5
  import "./chunk-AQU56EPI.js";
6
6
  import {
7
7
  failOnNetworkRefusal
8
- } from "./chunk-DZQYE626.js";
8
+ } from "./chunk-7UUHJR2Q.js";
9
9
  import {
10
10
  folderSkillsEffect,
11
11
  skillFromFiles
12
12
  } from "./chunk-XBG7HHXC.js";
13
13
  import {
14
14
  accountProviderError,
15
- httpProviderError
16
- } from "./chunk-EMHFXFTJ.js";
15
+ fromPromise,
16
+ httpProviderError,
17
+ method,
18
+ toPromise
19
+ } from "./chunk-LTDHQJ2Z.js";
17
20
  import {
18
21
  NetworkRefused,
19
22
  ProviderError,
@@ -29,20 +32,20 @@ import {
29
32
  SkillServiceName,
30
33
  skillLoadLimits
31
34
  } from "./chunk-H72MEDMN.js";
32
- import "./chunk-CZGWW4NQ.js";
33
- import {
34
- FetchHttpClient_exports
35
- } from "./chunk-MZH4J2PO.js";
36
35
  import {
37
36
  wrap
38
37
  } from "./chunk-KGCTYL2S.js";
38
+ import "./chunk-JM7LOD2W.js";
39
+ import {
40
+ FetchHttpClient_exports
41
+ } from "./chunk-PD6I2SDG.js";
39
42
  import "./chunk-5FHWNLCI.js";
40
43
  import "./chunk-H2CJWXA3.js";
41
- import "./chunk-KSGYJV46.js";
44
+ import "./chunk-TUMGL2OC.js";
42
45
  import {
43
46
  HttpBody_exports,
44
47
  HttpClient_exports
45
- } from "./chunk-LNSVJS2Q.js";
48
+ } from "./chunk-EOPQ727L.js";
46
49
  import {
47
50
  Base64_exports,
48
51
  Effect_exports,
@@ -699,10 +702,13 @@ var unreadable = () => new SkillLoadFailed({
699
702
  reason: "request",
700
703
  message: "GitHub returned a git response Executor could not read."
701
704
  });
702
- var git = (run) => Effect_exports.tryPromise({
703
- try: async () => run(),
704
- catch: (error) => error instanceof InflateLimitExceeded ? failed("limit") : unreadable()
705
- });
705
+ var git = (run) => (
706
+ // oxlint-disable-next-line executor/authored-code-through-adapter -- this module's git parsing
707
+ Effect_exports.tryPromise({
708
+ try: async () => run(),
709
+ catch: (error) => error instanceof InflateLimitExceeded ? failed("limit") : unreadable()
710
+ })
711
+ );
706
712
  var githubHosts = ["github.com", "raw.githubusercontent.com"];
707
713
  var githubRequests = (remote, repo, token) => {
708
714
  const refused = (host) => (refusal) => refusal.refusal.reason === "credential_host" ? new SkillLoadFailed({
@@ -783,12 +789,16 @@ var skillDirectories = (github, commit, path) => Effect_exports.gen(function* ()
783
789
  return yield* failed("limit");
784
790
  return directories;
785
791
  });
786
- var cachedSkillDirectories = (cache, transport, options, commit) => Effect_exports.tryPromise({
787
- try: () => cache.get({
788
- key: ["apps/githubSkills/directories", 1, options.repo, commit, options.path ?? null],
789
- schema: wrap(SkillDirectories, false),
790
- freshFor: "7 days",
791
- load: (context) => Effect_exports.runPromise(
792
+ var cachedSkillDirectories = (cache, transport, options, commit) => fromPromise(
793
+ method(cache, "get"),
794
+ "cache"
795
+ )({
796
+ key: ["apps/githubSkills/directories", 1, options.repo, commit, options.path ?? null],
797
+ schema: wrap(SkillDirectories, false),
798
+ freshFor: "7 days",
799
+ // Executor's own loader: the app's cache runs it natively, so only its requests are upstream.
800
+ load: toPromise(
801
+ (context) => (
792
802
  // Keep the author's fetch and this read's token, as every other request in it does.
793
803
  reader({ fetch: transport.fetch, signal: context.signal }).pipe(
794
804
  Effect_exports.flatMap(
@@ -798,21 +808,28 @@ var cachedSkillDirectories = (cache, transport, options, commit) => Effect_expor
798
808
  options.path
799
809
  )
800
810
  )
801
- ),
802
- { signal: context.signal }
811
+ )
812
+ ),
813
+ // A cache may call the loader as a Promise; its own signal cancels that load.
814
+ (context) => context.signal
815
+ )
816
+ }).pipe(
817
+ Effect_exports.mapError(
818
+ (error) => loaderFailure(
819
+ error,
820
+ () => new SkillLoadFailed({
821
+ reason: "request",
822
+ message: "Executor could not read or update the app cache for skills."
823
+ })
803
824
  )
804
- }),
805
- catch: (error) => loaderFailure(
806
- error,
807
- () => new SkillLoadFailed({
808
- reason: "request",
809
- message: "Executor could not read or update the app cache for skills."
810
- })
811
825
  )
812
- });
813
- var digest = (value) => Effect_exports.promise(
814
- () => crypto.subtle.digest("SHA-256", new TextEncoder().encode(JSON.stringify(value)))
815
- ).pipe(Effect_exports.map((bytes) => Hex_exports.encode(new Uint8Array(bytes))));
826
+ );
827
+ var digest = (value) => (
828
+ // oxlint-disable-next-line executor/authored-code-through-adapter -- Web Crypto
829
+ Effect_exports.promise(
830
+ () => crypto.subtle.digest("SHA-256", new TextEncoder().encode(JSON.stringify(value)))
831
+ ).pipe(Effect_exports.map((bytes) => Hex_exports.encode(new Uint8Array(bytes))))
832
+ );
816
833
  var checked = (request) => request.pipe(
817
834
  Effect_exports.timeoutOrElse({
818
835
  duration: skillLoadLimits.checkMillis,
package/js/ui/auth.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  appRedirect,
4
4
  appSignInCallback,
5
5
  appSignInFailed
6
- } from "../chunk-EJUK2NK5.js";
6
+ } from "../chunk-KLYSEHUD.js";
7
7
  import {
8
8
  AppReturnPath,
9
9
  AppSignInCallback,
@@ -12,8 +12,8 @@ import {
12
12
  AppSignInId,
13
13
  appSignInCallbackPath
14
14
  } from "../chunk-JPEUKEV4.js";
15
- import "../chunk-MZH4J2PO.js";
16
- import "../chunk-LNSVJS2Q.js";
15
+ import "../chunk-PD6I2SDG.js";
16
+ import "../chunk-EOPQ727L.js";
17
17
  import "../chunk-IFJU5SYQ.js";
18
18
  import "../chunk-CZ7CSFO4.js";
19
19
  export {
@@ -7,10 +7,10 @@ import {
7
7
  UiOperation,
8
8
  UiSnapshot,
9
9
  UiUnauthorized
10
- } from "../chunk-4ZTVLEN6.js";
10
+ } from "../chunk-CDXQDN7W.js";
11
11
  import "../chunk-H2CJWXA3.js";
12
- import "../chunk-KSGYJV46.js";
13
- import "../chunk-LNSVJS2Q.js";
12
+ import "../chunk-TUMGL2OC.js";
13
+ import "../chunk-EOPQ727L.js";
14
14
  import "../chunk-IFJU5SYQ.js";
15
15
  import "../chunk-CZ7CSFO4.js";
16
16
  export {
package/js/ui/serving.js CHANGED
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  appPrivateHeaders
3
- } from "../chunk-EJUK2NK5.js";
3
+ } from "../chunk-KLYSEHUD.js";
4
4
  import "../chunk-JPEUKEV4.js";
5
5
  import {
6
6
  UiForbidden
7
- } from "../chunk-4ZTVLEN6.js";
7
+ } from "../chunk-CDXQDN7W.js";
8
8
  import {
9
9
  CurrentTelemetryConfig
10
- } from "../chunk-CZGWW4NQ.js";
11
- import "../chunk-MZH4J2PO.js";
10
+ } from "../chunk-JM7LOD2W.js";
11
+ import "../chunk-PD6I2SDG.js";
12
12
  import "../chunk-5FHWNLCI.js";
13
13
  import "../chunk-H2CJWXA3.js";
14
- import "../chunk-KSGYJV46.js";
14
+ import "../chunk-TUMGL2OC.js";
15
15
  import {
16
16
  HttpServerRequest_exports,
17
17
  HttpServerResponse_exports
18
- } from "../chunk-LNSVJS2Q.js";
18
+ } from "../chunk-EOPQ727L.js";
19
19
  import {
20
20
  Effect_exports
21
21
  } from "../chunk-IFJU5SYQ.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apps",
3
- "version": "0.0.1-beta.44",
3
+ "version": "0.0.1-beta.46",
4
4
  "description": "TypeScript apps with typed tools, accounts, storage, and UI.",
5
5
  "type": "module",
6
6
  "sideEffects": false,