apps 0.0.1-beta.34 → 0.0.1-beta.36

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 (91) hide show
  1. package/framework-reference.json +1 -1
  2. package/js/{chunk-OX233L7N.js → chunk-4U2VUDET.js} +2 -2
  3. package/js/{chunk-HW3DPBZR.js → chunk-556EWA6P.js} +3 -2
  4. package/js/{chunk-UMCMZFXW.js → chunk-73AV3JVU.js} +1 -1
  5. package/js/{chunk-QKVZGWGZ.js → chunk-A2NN45C7.js} +7 -7
  6. package/js/{chunk-6ZJ2H6P4.js → chunk-A4O72Z3A.js} +298 -190
  7. package/js/{chunk-FBBXFFFJ.js → chunk-BI45HZWM.js} +2 -2
  8. package/js/{chunk-DXGWKNTQ.js → chunk-BI6R577B.js} +2 -2
  9. package/js/{chunk-QUEPZ67T.js → chunk-BKJDZYK7.js} +3 -3
  10. package/js/{chunk-QZD2RZ4S.js → chunk-CZLCA2O4.js} +8 -8
  11. package/js/{chunk-IU6OK5G2.js → chunk-ENJCQWVF.js} +3 -3
  12. package/js/{chunk-DASNNAP4.js → chunk-HDAQBRT5.js} +391 -14
  13. package/js/{chunk-EXGKN554.js → chunk-IJQ5LE74.js} +9805 -9254
  14. package/js/{chunk-5JVNM3CQ.js → chunk-IU7CCCUC.js} +12 -12
  15. package/js/{chunk-Q7Q5JTRW.js → chunk-JU7F4PRK.js} +2 -2
  16. package/js/{chunk-CJY5X26R.js → chunk-KOOJUMLR.js} +86 -50
  17. package/js/{chunk-ETLILMHY.js → chunk-KZFV3WCJ.js} +21 -19
  18. package/js/{chunk-ZOY7PDMI.js → chunk-NHCFIWN5.js} +1 -1
  19. package/js/chunk-NHUHTWAF.js +0 -0
  20. package/js/{chunk-QYM4STZW.js → chunk-PHO7HXTC.js} +149 -353
  21. package/js/{chunk-O3OAFU7Q.js → chunk-POOIHRPF.js} +2 -2
  22. package/js/{chunk-AUFVX4KM.js → chunk-RSNZDT4L.js} +2 -2
  23. package/js/{chunk-EPUWF4ZG.js → chunk-SRB2WDU7.js} +3 -3
  24. package/js/{chunk-MFHUR5SB.js → chunk-TADLIUEU.js} +4 -4
  25. package/js/{chunk-5OM6HBNU.js → chunk-UBAKWXAJ.js} +20 -29
  26. package/js/chunk-V5DWGYRK.js +268 -0
  27. package/js/{chunk-MYH3QZ4L.js → chunk-WAGGHNWH.js} +23 -15
  28. package/js/{chunk-GZ4UHXRT.js → chunk-WDBUOIWV.js} +3 -3
  29. package/js/{chunk-PUBNIORL.js → chunk-WMVTBHGK.js} +2 -2
  30. package/js/{chunk-DSUKW6KJ.js → chunk-XEXUHXC3.js} +296 -174
  31. package/js/{chunk-6KG4DZD7.js → chunk-Y3XN4X4Q.js} +1 -1
  32. package/js/{chunk-UKMIHP2G.js → chunk-YW333DH3.js} +4 -4
  33. package/js/{chunk-O4QOPXQT.js → chunk-ZQWDOHEO.js} +31 -24
  34. package/js/client.js +12 -11
  35. package/js/contracts.js +14 -11
  36. package/js/effect.js +23 -21
  37. package/js/graphql.js +25 -23
  38. package/js/host.js +23 -21
  39. package/js/index.js +16 -14
  40. package/js/mcp/effect.js +25 -23
  41. package/js/mcp/stdio.js +25 -23
  42. package/js/mcp.js +27 -25
  43. package/js/openapi.js +22 -21
  44. package/js/react.js +3 -3
  45. package/js/skills/effect.js +6 -5
  46. package/js/skills.js +60 -45
  47. package/js/storage/facet.js +19 -345
  48. package/js/ui/auth/contracts.js +2 -2
  49. package/js/ui/auth.js +5 -5
  50. package/js/ui/contracts.js +6 -5
  51. package/js/ui/serving.js +10 -9
  52. package/package.json +3 -3
  53. package/runtime.json +1 -1
  54. package/types/app-data/src/implementation/sqlite.d.ts +1 -1
  55. package/types/apps/src/contracts/elicitation.d.ts +6 -6
  56. package/types/apps/src/contracts/host.d.ts +10 -6
  57. package/types/apps/src/contracts/mcp.d.ts +6 -1
  58. package/types/apps/src/contracts/openapi.d.ts +1 -1
  59. package/types/apps/src/contracts/protocol-version.d.ts +2 -2
  60. package/types/apps/src/contracts/protocols/1.d.ts +12 -5
  61. package/types/apps/src/contracts/protocols/2.d.ts +5 -5
  62. package/types/apps/src/contracts/protocols/3.d.ts +5 -6
  63. package/types/apps/src/contracts/protocols/4.d.ts +5 -6
  64. package/types/apps/src/contracts/protocols/5.d.ts +7 -7
  65. package/types/apps/src/contracts/protocols/6.d.ts +7 -7
  66. package/types/apps/src/contracts/protocols/7.d.ts +7 -7
  67. package/types/apps/src/contracts/protocols/8.d.ts +17 -6
  68. package/types/apps/src/contracts/protocols/9.d.ts +1106 -0
  69. package/types/apps/src/contracts/skills.d.ts +5 -0
  70. package/types/apps/src/contracts/ui.d.ts +1 -1
  71. package/types/apps/src/implementation/failure-detail.d.ts +4 -3
  72. package/types/apps/src/implementation/live.d.ts +2 -2
  73. package/types/apps/src/implementation/mcp-client.d.ts +1 -1
  74. package/types/apps/src/implementation/mcp.d.ts +1 -1
  75. package/types/apps/src/implementation/network.d.ts +1 -1
  76. package/types/apps/src/implementation/openapi-compile.d.ts +1 -1
  77. package/types/apps/src/implementation/optimistic.d.ts +1 -1
  78. package/types/apps/src/implementation/query-commit.d.ts +1 -1
  79. package/types/apps/src/implementation/router-catalog.d.ts +2 -3
  80. package/types/apps/src/implementation/skills.d.ts +8 -8
  81. package/types/apps/src/implementation/ui-auth.d.ts +1 -1
  82. package/types/apps/src/implementation/ui-client.d.ts +1 -1
  83. package/types/apps/src/implementation/ui-serving.d.ts +1 -1
  84. package/types/apps/src/react.d.ts +1 -1
  85. package/types/apps/src/skills.d.ts +2 -1
  86. package/types/telemetry/src/browser-operations.d.ts +1 -1
  87. package/types/telemetry/src/browser.d.ts +2 -2
  88. package/types/telemetry/src/layer.d.ts +2 -2
  89. package/types/telemetry/src/relay.d.ts +2 -2
  90. package/types/telemetry/src/transport.d.ts +1 -1
  91. package/types/utils/src/api-error.d.ts +1 -1
package/js/mcp/stdio.js CHANGED
@@ -3,38 +3,40 @@ import {
3
3
  answeredError,
4
4
  mcpClient,
5
5
  mcpJsonSchemaValidator
6
- } from "../chunk-QKVZGWGZ.js";
6
+ } from "../chunk-A2NN45C7.js";
7
7
  import {
8
8
  protocolRouter
9
- } from "../chunk-PUBNIORL.js";
9
+ } from "../chunk-WMVTBHGK.js";
10
10
  import "../chunk-BCSNKUAC.js";
11
- import "../chunk-5OM6HBNU.js";
12
- import "../chunk-Q7Q5JTRW.js";
13
- import "../chunk-O4QOPXQT.js";
14
- import "../chunk-EPUWF4ZG.js";
15
- import "../chunk-OX233L7N.js";
16
- import "../chunk-QZD2RZ4S.js";
17
- import "../chunk-5JVNM3CQ.js";
18
- import "../chunk-QUEPZ67T.js";
19
- import "../chunk-IU6OK5G2.js";
11
+ import "../chunk-UBAKWXAJ.js";
12
+ import "../chunk-JU7F4PRK.js";
13
+ import "../chunk-ZQWDOHEO.js";
14
+ import "../chunk-SRB2WDU7.js";
15
+ import "../chunk-4U2VUDET.js";
16
+ import "../chunk-CZLCA2O4.js";
17
+ import "../chunk-IU7CCCUC.js";
18
+ import "../chunk-BKJDZYK7.js";
19
+ import "../chunk-ENJCQWVF.js";
20
+ import "../chunk-NHUHTWAF.js";
20
21
  import {
21
22
  McpError,
22
23
  ProcessConfig
23
- } from "../chunk-DSUKW6KJ.js";
24
- import "../chunk-UMCMZFXW.js";
25
- import "../chunk-DXGWKNTQ.js";
26
- import "../chunk-HW3DPBZR.js";
27
- import "../chunk-ETLILMHY.js";
28
- import "../chunk-MFHUR5SB.js";
29
- import "../chunk-O3OAFU7Q.js";
30
- import "../chunk-6KG4DZD7.js";
31
- import "../chunk-FBBXFFFJ.js";
32
- import "../chunk-QYM4STZW.js";
33
- import "../chunk-CJY5X26R.js";
24
+ } from "../chunk-XEXUHXC3.js";
25
+ import "../chunk-73AV3JVU.js";
26
+ import "../chunk-BI6R577B.js";
27
+ import "../chunk-556EWA6P.js";
28
+ import "../chunk-KZFV3WCJ.js";
29
+ import "../chunk-TADLIUEU.js";
30
+ import "../chunk-POOIHRPF.js";
31
+ import "../chunk-Y3XN4X4Q.js";
32
+ import "../chunk-BI45HZWM.js";
33
+ import "../chunk-PHO7HXTC.js";
34
+ import "../chunk-V5DWGYRK.js";
35
+ import "../chunk-KOOJUMLR.js";
34
36
  import {
35
37
  Effect_exports,
36
38
  Schema_exports
37
- } from "../chunk-EXGKN554.js";
39
+ } from "../chunk-IJQ5LE74.js";
38
40
  import "../chunk-CZ7CSFO4.js";
39
41
 
40
42
  // src/implementation/mcp-stdio.ts
package/js/mcp.js CHANGED
@@ -1,55 +1,57 @@
1
1
  import {
2
2
  mcpClientEffect,
3
3
  mcpHealthEffect
4
- } from "./chunk-MYH3QZ4L.js";
4
+ } from "./chunk-WAGGHNWH.js";
5
5
  import {
6
6
  catalogCache,
7
7
  catalogScope
8
- } from "./chunk-UKMIHP2G.js";
8
+ } from "./chunk-YW333DH3.js";
9
9
  import {
10
10
  adaptMcpTool
11
- } from "./chunk-QKVZGWGZ.js";
11
+ } from "./chunk-A2NN45C7.js";
12
12
  import {
13
13
  protocolOperations
14
- } from "./chunk-PUBNIORL.js";
14
+ } from "./chunk-WMVTBHGK.js";
15
15
  import "./chunk-BCSNKUAC.js";
16
- import "./chunk-5OM6HBNU.js";
16
+ import "./chunk-UBAKWXAJ.js";
17
17
  import {
18
18
  cacheKey
19
- } from "./chunk-Q7Q5JTRW.js";
19
+ } from "./chunk-JU7F4PRK.js";
20
20
  import {
21
21
  operationDescription
22
- } from "./chunk-O4QOPXQT.js";
23
- import "./chunk-EPUWF4ZG.js";
24
- import "./chunk-OX233L7N.js";
25
- import "./chunk-QZD2RZ4S.js";
26
- import "./chunk-5JVNM3CQ.js";
22
+ } from "./chunk-ZQWDOHEO.js";
23
+ import "./chunk-SRB2WDU7.js";
24
+ import "./chunk-4U2VUDET.js";
25
+ import "./chunk-CZLCA2O4.js";
26
+ import "./chunk-IU7CCCUC.js";
27
27
  import {
28
28
  nativeOperation,
29
29
  routerDeclaration
30
- } from "./chunk-QUEPZ67T.js";
31
- import "./chunk-IU6OK5G2.js";
30
+ } from "./chunk-BKJDZYK7.js";
31
+ import "./chunk-ENJCQWVF.js";
32
+ import "./chunk-NHUHTWAF.js";
32
33
  import {
33
34
  McpCredentialsUnverified,
34
35
  McpError,
35
36
  McpServerHeader,
36
37
  McpToolMetadata,
37
38
  McpToolsOptions
38
- } from "./chunk-DSUKW6KJ.js";
39
- import "./chunk-UMCMZFXW.js";
40
- import "./chunk-DXGWKNTQ.js";
41
- import "./chunk-HW3DPBZR.js";
42
- import "./chunk-ETLILMHY.js";
43
- import "./chunk-MFHUR5SB.js";
44
- import "./chunk-O3OAFU7Q.js";
45
- import "./chunk-6KG4DZD7.js";
46
- import "./chunk-FBBXFFFJ.js";
47
- import "./chunk-QYM4STZW.js";
48
- import "./chunk-CJY5X26R.js";
39
+ } from "./chunk-XEXUHXC3.js";
40
+ import "./chunk-73AV3JVU.js";
41
+ import "./chunk-BI6R577B.js";
42
+ import "./chunk-556EWA6P.js";
43
+ import "./chunk-KZFV3WCJ.js";
44
+ import "./chunk-TADLIUEU.js";
45
+ import "./chunk-POOIHRPF.js";
46
+ import "./chunk-Y3XN4X4Q.js";
47
+ import "./chunk-BI45HZWM.js";
48
+ import "./chunk-PHO7HXTC.js";
49
+ import "./chunk-V5DWGYRK.js";
50
+ import "./chunk-KOOJUMLR.js";
49
51
  import {
50
52
  Effect_exports,
51
53
  Schema_exports
52
- } from "./chunk-EXGKN554.js";
54
+ } from "./chunk-IJQ5LE74.js";
53
55
  import "./chunk-CZ7CSFO4.js";
54
56
 
55
57
  // src/implementation/mcp-catalog.ts
package/js/openapi.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  protocolOperations,
10
10
  protocolRouter
11
- } from "./chunk-PUBNIORL.js";
11
+ } from "./chunk-WMVTBHGK.js";
12
12
  import {
13
13
  OpenapiCompileError,
14
14
  OpenapiCompileErrorCode,
@@ -27,59 +27,61 @@ import {
27
27
  isOpenapiTextMedia,
28
28
  openapiBinaryResultSchema,
29
29
  openapiMediaKind
30
- } from "./chunk-O4QOPXQT.js";
30
+ } from "./chunk-ZQWDOHEO.js";
31
31
  import {
32
32
  failOnNetworkRefusal
33
- } from "./chunk-EPUWF4ZG.js";
34
- import "./chunk-OX233L7N.js";
33
+ } from "./chunk-SRB2WDU7.js";
34
+ import "./chunk-4U2VUDET.js";
35
35
  import {
36
36
  fromPromise,
37
37
  nativeOperation,
38
38
  routerDeclaration,
39
39
  toPromise
40
- } from "./chunk-QUEPZ67T.js";
40
+ } from "./chunk-BKJDZYK7.js";
41
41
  import {
42
42
  accountProviderError,
43
43
  httpProviderError
44
- } from "./chunk-IU6OK5G2.js";
44
+ } from "./chunk-ENJCQWVF.js";
45
+ import "./chunk-NHUHTWAF.js";
45
46
  import {
46
47
  ApiErrorRecovery,
47
48
  ApiErrorResponse,
48
49
  OpenapiResponseError,
49
50
  RouterMeta,
50
51
  defaultOpenapiErrorLimits
51
- } from "./chunk-DSUKW6KJ.js";
52
- import "./chunk-UMCMZFXW.js";
52
+ } from "./chunk-XEXUHXC3.js";
53
+ import "./chunk-73AV3JVU.js";
53
54
  import {
54
55
  NetworkRefused,
55
56
  ProviderError,
56
57
  cacheLimits
57
- } from "./chunk-DXGWKNTQ.js";
58
- import "./chunk-HW3DPBZR.js";
59
- import "./chunk-ETLILMHY.js";
58
+ } from "./chunk-BI6R577B.js";
59
+ import "./chunk-556EWA6P.js";
60
+ import "./chunk-KZFV3WCJ.js";
60
61
  import {
61
62
  FetchHttpClient_exports
62
- } from "./chunk-MFHUR5SB.js";
63
+ } from "./chunk-TADLIUEU.js";
63
64
  import {
64
65
  jsonSchema,
65
66
  lazyJsonSchemaDecoder,
66
67
  once,
67
68
  wrap
68
- } from "./chunk-O3OAFU7Q.js";
69
- import "./chunk-6KG4DZD7.js";
69
+ } from "./chunk-POOIHRPF.js";
70
+ import "./chunk-Y3XN4X4Q.js";
70
71
  import {
71
72
  JsonObject
72
- } from "./chunk-FBBXFFFJ.js";
73
- import "./chunk-QYM4STZW.js";
73
+ } from "./chunk-BI45HZWM.js";
74
+ import "./chunk-PHO7HXTC.js";
75
+ import "./chunk-V5DWGYRK.js";
74
76
  import {
75
77
  HttpClientRequest_exports,
76
78
  HttpClient_exports
77
- } from "./chunk-CJY5X26R.js";
79
+ } from "./chunk-KOOJUMLR.js";
78
80
  import {
81
+ Base64_exports,
79
82
  Deferred_exports,
80
83
  Duration_exports,
81
84
  Effect_exports,
82
- Encoding_exports,
83
85
  Exit_exports,
84
86
  JsonPointer_exports,
85
87
  JsonSchema_exports,
@@ -87,7 +89,7 @@ import {
87
89
  SchemaIssue_exports,
88
90
  Schema_exports,
89
91
  Stream_exports
90
- } from "./chunk-EXGKN554.js";
92
+ } from "./chunk-IJQ5LE74.js";
91
93
  import "./chunk-CZ7CSFO4.js";
92
94
 
93
95
  // src/implementation/swagger-client.ts
@@ -393,8 +395,7 @@ function createRequest(config) {
393
395
  data.set(chunk, offset);
394
396
  offset += chunk.length;
395
397
  }
396
- if (!isOpenapiTextMedia(contentType))
397
- return { base64: Encoding_exports.encodeBase64(data), contentType };
398
+ if (!isOpenapiTextMedia(contentType)) return { base64: Base64_exports.encode(data), contentType };
398
399
  const text = new TextDecoder().decode(data);
399
400
  return contentType.includes("json") && !isOpenapiJsonSequence(contentType) ? yield* Schema_exports.decodeUnknownEffect(Schema_exports.fromJsonString(Schema_exports.Json))(text).pipe(
400
401
  Effect_exports.mapError(() => unreadable)
package/js/react.js CHANGED
@@ -2,11 +2,11 @@ import {
2
2
  AsyncResult_exports,
3
3
  AtomRegistry_exports,
4
4
  queryCommitted
5
- } from "./chunk-6ZJ2H6P4.js";
6
- import "./chunk-DASNNAP4.js";
5
+ } from "./chunk-A4O72Z3A.js";
6
+ import "./chunk-HDAQBRT5.js";
7
7
  import {
8
8
  Option_exports
9
- } from "./chunk-EXGKN554.js";
9
+ } from "./chunk-IJQ5LE74.js";
10
10
  import "./chunk-CZ7CSFO4.js";
11
11
 
12
12
  // src/react.ts
@@ -1,11 +1,12 @@
1
1
  import {
2
2
  folderSkillsEffect,
3
3
  skillFromFiles
4
- } from "../chunk-OX233L7N.js";
5
- import "../chunk-HW3DPBZR.js";
6
- import "../chunk-QYM4STZW.js";
7
- import "../chunk-CJY5X26R.js";
8
- import "../chunk-EXGKN554.js";
4
+ } from "../chunk-4U2VUDET.js";
5
+ import "../chunk-556EWA6P.js";
6
+ import "../chunk-PHO7HXTC.js";
7
+ import "../chunk-V5DWGYRK.js";
8
+ import "../chunk-KOOJUMLR.js";
9
+ import "../chunk-IJQ5LE74.js";
9
10
  import "../chunk-CZ7CSFO4.js";
10
11
  export {
11
12
  folderSkillsEffect,
package/js/skills.js CHANGED
@@ -1,24 +1,25 @@
1
1
  import {
2
2
  catalogCache,
3
3
  catalogScope
4
- } from "./chunk-UKMIHP2G.js";
5
- import "./chunk-Q7Q5JTRW.js";
4
+ } from "./chunk-YW333DH3.js";
5
+ import "./chunk-JU7F4PRK.js";
6
6
  import {
7
7
  failOnNetworkRefusal
8
- } from "./chunk-EPUWF4ZG.js";
8
+ } from "./chunk-SRB2WDU7.js";
9
9
  import {
10
10
  folderSkillsEffect,
11
11
  skillFromFiles
12
- } from "./chunk-OX233L7N.js";
12
+ } from "./chunk-4U2VUDET.js";
13
13
  import {
14
14
  accountProviderError,
15
15
  httpProviderError
16
- } from "./chunk-IU6OK5G2.js";
16
+ } from "./chunk-ENJCQWVF.js";
17
+ import "./chunk-NHUHTWAF.js";
17
18
  import {
18
19
  NetworkRefused,
19
20
  ProviderError,
20
21
  networkRefusalStatus
21
- } from "./chunk-DXGWKNTQ.js";
22
+ } from "./chunk-BI6R577B.js";
22
23
  import {
23
24
  AppSkillMetadata,
24
25
  AppSkillSource,
@@ -28,27 +29,28 @@ import {
28
29
  SkillLoadFailed,
29
30
  SkillServiceName,
30
31
  skillLoadLimits
31
- } from "./chunk-HW3DPBZR.js";
32
- import "./chunk-ETLILMHY.js";
32
+ } from "./chunk-556EWA6P.js";
33
+ import "./chunk-KZFV3WCJ.js";
33
34
  import {
34
35
  FetchHttpClient_exports
35
- } from "./chunk-MFHUR5SB.js";
36
+ } from "./chunk-TADLIUEU.js";
36
37
  import {
37
38
  wrap
38
- } from "./chunk-O3OAFU7Q.js";
39
- import "./chunk-FBBXFFFJ.js";
40
- import "./chunk-QYM4STZW.js";
39
+ } from "./chunk-POOIHRPF.js";
40
+ import "./chunk-BI45HZWM.js";
41
+ import "./chunk-PHO7HXTC.js";
42
+ import "./chunk-V5DWGYRK.js";
41
43
  import {
42
44
  HttpBody_exports,
43
45
  HttpClient_exports
44
- } from "./chunk-CJY5X26R.js";
46
+ } from "./chunk-KOOJUMLR.js";
45
47
  import {
48
+ Base64_exports,
46
49
  Effect_exports,
47
- Encoding_exports,
48
50
  Ref_exports,
49
51
  Schema_exports,
50
52
  Stream_exports
51
- } from "./chunk-EXGKN554.js";
53
+ } from "./chunk-IJQ5LE74.js";
52
54
  import "./chunk-CZ7CSFO4.js";
53
55
 
54
56
  // src/implementation/inflate.ts
@@ -604,18 +606,15 @@ var describe = (service, { reason, status }) => {
604
606
  };
605
607
  var withService = (service) => (effect) => service === void 0 || !Schema_exports.is(SkillServiceName)(service) ? effect : effect.pipe(
606
608
  Effect_exports.mapError(
607
- (error) => !error.message ? new SkillLoadFailed({
609
+ (error) => Schema_exports.is(SkillLoadFailed)(error) && !error.message ? new SkillLoadFailed({
608
610
  reason: error.reason,
609
611
  message: describe(service, error),
610
- ...error.status === void 0 ? {} : { status: error.status }
612
+ ...error.status === void 0 ? {} : { status: error.status },
613
+ ...error.missing === void 0 ? {} : { missing: error.missing }
611
614
  }) : error
612
615
  )
613
616
  );
614
- var refusedRequest = (refused) => new SkillLoadFailed({
615
- reason: "source",
616
- status: networkRefusalStatus,
617
- message: refused.message.slice(0, 500)
618
- });
617
+ var loaderFailure = (error, otherwise) => Schema_exports.is(SkillLoadFailed)(error) || Schema_exports.is(NetworkRefused)(error) ? error : otherwise();
619
618
  var parse = (schema, input) => Schema_exports.decodeUnknownEffect(schema)(input).pipe(Effect_exports.mapError(() => failed("document")));
620
619
  var resourcePath = (path) => {
621
620
  if (!Schema_exports.is(SkillFilePath)(path)) return false;
@@ -638,7 +637,7 @@ var reader = (transport) => Effect_exports.gen(function* () {
638
637
  });
639
638
  if (!["https:", "http:"].includes(parsed.protocol) || parsed.username || parsed.password || parsed.hash)
640
639
  return yield* failed("source");
641
- const refused = request.refused ?? refusedRequest;
640
+ const refusal = request.refused ?? ((refused) => refused);
642
641
  const client = HttpClient_exports.withScope(yield* HttpClient_exports.HttpClient);
643
642
  const headers = {
644
643
  "User-Agent": "executor-skills",
@@ -650,12 +649,12 @@ var reader = (transport) => Effect_exports.gen(function* () {
650
649
  headers,
651
650
  body: HttpBody_exports.uint8Array(request.body, request.headers?.["Content-Type"])
652
651
  })).pipe(
653
- // `ctx.fetch` rejects a request Executor's app network refused.
652
+ // `ctx.fetch` rejects with a network refusal; any other failed request got no answer.
654
653
  Effect_exports.mapError(
655
- (error) => Schema_exports.is(NetworkRefused)(error.cause) ? refused(error.cause) : failed("request")
654
+ (error) => Schema_exports.is(NetworkRefused)(error.cause) ? refusal(error.cause) : failed("request")
656
655
  )
657
656
  );
658
- yield* failOnNetworkRefusal(response).pipe(Effect_exports.mapError(refused));
657
+ yield* failOnNetworkRefusal(response).pipe(Effect_exports.mapError(refusal));
659
658
  if (response.status < 200 || response.status >= 300)
660
659
  return yield* rejected(response.status, response.headers);
661
660
  const chunks = [];
@@ -709,13 +708,13 @@ var githubRequests = (remote, repo, token) => {
709
708
  const refused = (host) => (refusal) => refusal.refusal.reason === "credential_host" ? new SkillLoadFailed({
710
709
  reason: "source",
711
710
  status: networkRefusalStatus,
712
- message: `Executor did not send the GitHub token to ${host}. The account's provider must declare hosts ${githubHosts.join(" and ")}; reconnect an account connected with other hosts.`
713
- }) : refusedRequest(refusal);
711
+ message: `A request with the GitHub token to ${host} was refused because the account's provider does not declare that host. The provider must declare hosts ${githubHosts.join(" and ")}; reconnect an account connected with other hosts.`
712
+ }) : refusal;
714
713
  const upload = (body) => remote.fetchBytes(`https://${githubHosts[0]}/${repo}.git/git-upload-pack`, {
715
714
  body,
716
715
  headers: {
717
716
  ...gitRequestHeaders,
718
- ...token === void 0 ? {} : { Authorization: `Basic ${Encoding_exports.encodeBase64(`x-access-token:${token}`)}` }
717
+ ...token === void 0 ? {} : { Authorization: `Basic ${Base64_exports.encode(`x-access-token:${token}`)}` }
719
718
  },
720
719
  refused: refused(githubHosts[0])
721
720
  });
@@ -731,12 +730,21 @@ var resolveCommit = (github, ref) => Effect_exports.gen(function* () {
731
730
  const names = refCandidates(ref);
732
731
  const response = yield* github.upload(lsRefsRequest(names)).pipe(
733
732
  Effect_exports.mapError((error) => {
734
- const hidden = error.reason === "request" && (error.status === 404 || error.status === 401 && !github.authenticated);
735
- return hidden ? new SkillLoadFailed({
736
- reason: "source",
737
- message: github.authenticated ? `GitHub has no repository named ${repo} that the account's token can read.` : `GitHub has no public repository named ${repo}. To read a private repository, pass a GitHub account and its token.`,
738
- status: error.status
739
- }) : error;
733
+ if (!Schema_exports.is(SkillLoadFailed)(error) || error.reason !== "request") return error;
734
+ if (!github.authenticated && (error.status === 404 || error.status === 401))
735
+ return new SkillLoadFailed({
736
+ reason: "source",
737
+ message: `Reading GitHub repository ${repo} without credentials returned HTTP ${error.status}: it may not exist, or it may be private. To read a private repository, pass a GitHub account and its token.`,
738
+ status: error.status,
739
+ missing: "repository"
740
+ });
741
+ if (github.authenticated && error.status === 404)
742
+ return new SkillLoadFailed({
743
+ reason: "request",
744
+ message: `GitHub repository ${repo} is not available with the account's token (HTTP 404). Check the repository name and that the token can read it.`,
745
+ status: error.status
746
+ });
747
+ return error;
740
748
  })
741
749
  );
742
750
  const refs = yield* git(() => parseLsRefs(response));
@@ -744,7 +752,8 @@ var resolveCommit = (github, ref) => Effect_exports.gen(function* () {
744
752
  if (commit === void 0)
745
753
  return yield* new SkillLoadFailed({
746
754
  reason: "source",
747
- message: `GitHub repository ${repo} has no branch or tag named ${ref}.`
755
+ message: `The refs read from GitHub repository ${repo} include no branch or tag named ${ref}.`,
756
+ missing: "ref"
748
757
  });
749
758
  return commit;
750
759
  });
@@ -793,10 +802,13 @@ var cachedSkillDirectories = (cache, transport, options, commit) => Effect_expor
793
802
  { signal: context.signal }
794
803
  )
795
804
  }),
796
- catch: (error) => Schema_exports.is(SkillLoadFailed)(error) ? error : new SkillLoadFailed({
797
- reason: "request",
798
- message: "Executor could not read or update the app cache for skills."
799
- })
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
+ )
800
812
  });
801
813
  var cachedCatalog = (options, prefix, load) => options.cache === void 0 ? load(options, void 0) : catalogCache({
802
814
  cache: options.cache,
@@ -809,10 +821,13 @@ var cachedCatalog = (options, prefix, load) => options.cache === void 0 ? load(o
809
821
  }).pipe(
810
822
  Effect_exports.flatMap((catalog) => catalog.list()),
811
823
  Effect_exports.mapError(
812
- (error) => Schema_exports.is(SkillLoadFailed)(error) ? error : new SkillLoadFailed({
813
- reason: "request",
814
- message: "Executor could not read or update the app cache for skills."
815
- })
824
+ (error) => loaderFailure(
825
+ error,
826
+ () => new SkillLoadFailed({
827
+ reason: "request",
828
+ message: "Executor could not read or update the app cache for skills."
829
+ })
830
+ )
816
831
  )
817
832
  );
818
833
  var GitHubToken = Schema_exports.String.check(Schema_exports.isPattern(/^[\x21-\x7e]+$/));
@@ -830,7 +845,7 @@ var githubCache = (options) => options.account !== void 0 && !Schema_exports.is(
830
845
  options.token,
831
846
  (problem) => new SkillLoadFailed({ reason: "source", message: scopeMessages[problem] })
832
847
  );
833
- var attributed = (account) => (error) => account !== void 0 && error.reason === "request" && (error.status === 401 || error.status === 403) ? accountProviderError(
848
+ var attributed = (account) => (error) => account !== void 0 && Schema_exports.is(SkillLoadFailed)(error) && error.reason === "request" && (error.status === 401 || error.status === 403) ? accountProviderError(
834
849
  new ProviderError({
835
850
  reason: error.status === 401 ? "unauthorized" : "rejected",
836
851
  status: error.status