apps 0.0.1-beta.26 → 0.0.1-beta.28

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 (72) hide show
  1. package/README.md +6 -6
  2. package/framework-reference.json +1 -1
  3. package/js/{chunk-AAAMPT6F.js → chunk-65SZ23BK.js} +2 -2
  4. package/js/{chunk-XBG3M64K.js → chunk-6JBTHTI5.js} +1 -1
  5. package/js/{chunk-OBXHLFGQ.js → chunk-B5YJQU45.js} +1 -1
  6. package/js/{chunk-T7WRQJUF.js → chunk-BRGF7VFN.js} +2 -2
  7. package/js/{chunk-HQKIPKM5.js → chunk-BTJMXW4I.js} +1 -1
  8. package/js/{chunk-BTRBOOTD.js → chunk-GLIAMV2R.js} +29 -23
  9. package/js/{chunk-WPKXOTKM.js → chunk-GQ7GCZ4J.js} +3 -3
  10. package/js/{chunk-EXDR4HVM.js → chunk-JN3PEGMW.js} +109 -12
  11. package/js/{chunk-DAIW2WM3.js → chunk-KQCMHI3K.js} +3 -3
  12. package/js/{chunk-HIYRKEWP.js → chunk-L76NWXM5.js} +74 -22
  13. package/js/{chunk-GH6PY5BQ.js → chunk-M2KEEOIQ.js} +1 -1
  14. package/js/{chunk-OI7OI2U3.js → chunk-MWCLJQRI.js} +2 -2
  15. package/js/{chunk-TACLXEAE.js → chunk-NSBRV4FJ.js} +1 -1
  16. package/js/{chunk-DM5U7G7V.js → chunk-NXTXZ635.js} +1842 -1840
  17. package/js/{chunk-3YN4UDPB.js → chunk-PTUZSCEV.js} +2 -2
  18. package/js/{chunk-KKGRSXUK.js → chunk-PWF2DRJ3.js} +1 -1
  19. package/js/{chunk-2TP7C25K.js → chunk-SDLIDQXG.js} +3 -3
  20. package/js/{chunk-VGEPL4BV.js → chunk-TE2HPDZG.js} +110 -5
  21. package/js/{chunk-PC5RHPUP.js → chunk-TSLG2WPA.js} +2 -2
  22. package/js/{chunk-KNJAOYV4.js → chunk-V2I3MMPM.js} +2 -2
  23. package/js/{chunk-NXO2GN2T.js → chunk-VF3X26ZO.js} +8 -8
  24. package/js/{chunk-4CMJD7AB.js → chunk-VIQQ52V7.js} +24 -8
  25. package/js/{chunk-ZVMZWXVF.js → chunk-VUVBMNKC.js} +2 -2
  26. package/js/{chunk-SUY33XAY.js → chunk-WQ5MVBTP.js} +1 -1
  27. package/js/{chunk-LPN4ONWW.js → chunk-XBQTJP76.js} +2 -2
  28. package/js/{chunk-IE6W5RNN.js → chunk-YML53Z7H.js} +2 -2
  29. package/js/{chunk-DUEZ2XCO.js → chunk-YXKXKGN6.js} +3 -3
  30. package/js/{chunk-XIRAIB3P.js → chunk-ZZOCEUTB.js} +4 -4
  31. package/js/client.js +10 -10
  32. package/js/contracts.js +19 -7
  33. package/js/effect.js +19 -19
  34. package/js/graphql.js +28 -23
  35. package/js/host.js +19 -19
  36. package/js/index.js +16 -12
  37. package/js/mcp/effect.js +23 -21
  38. package/js/mcp/stdio.js +21 -21
  39. package/js/mcp.js +29 -24
  40. package/js/openapi.js +20 -16
  41. package/js/react.js +3 -3
  42. package/js/skills/effect.js +3 -3
  43. package/js/skills.js +11 -11
  44. package/js/storage/facet.js +4 -4
  45. package/js/ui/auth/contracts.js +2 -2
  46. package/js/ui/auth.js +5 -5
  47. package/js/ui/contracts.js +4 -4
  48. package/js/ui/serving.js +8 -8
  49. package/package.json +1 -1
  50. package/runtime.json +1 -1
  51. package/types/apps/src/contracts/graphql.d.ts +2 -1
  52. package/types/apps/src/contracts/host.d.ts +1 -0
  53. package/types/apps/src/contracts/mcp.d.ts +51 -4
  54. package/types/apps/src/contracts/network.d.ts +84 -0
  55. package/types/apps/src/contracts/openapi.d.ts +2 -1
  56. package/types/apps/src/contracts/provider.d.ts +6 -0
  57. package/types/apps/src/implementation/elicitation.d.ts +8 -8
  58. package/types/apps/src/implementation/failure-detail.d.ts +3 -2
  59. package/types/apps/src/implementation/graphql.d.ts +4 -3
  60. package/types/apps/src/implementation/mcp-call.d.ts +3 -2
  61. package/types/apps/src/implementation/mcp-client.d.ts +7 -5
  62. package/types/apps/src/implementation/mcp-stdio.d.ts +1 -1
  63. package/types/apps/src/implementation/mcp-tools.d.ts +2 -1
  64. package/types/apps/src/implementation/mcp.d.ts +16 -5
  65. package/types/apps/src/implementation/network.d.ts +16 -0
  66. package/types/apps/src/implementation/openapi-compile.d.ts +1 -1
  67. package/types/apps/src/implementation/openapi-request.d.ts +2 -1
  68. package/types/apps/src/implementation/router-catalog.d.ts +6 -6
  69. package/types/apps/src/implementation/skills.d.ts +2 -2
  70. package/types/apps/src/index.d.ts +1 -0
  71. package/types/apps/src/mcp.d.ts +20 -1
  72. package/types/apps/src/skills.d.ts +4 -4
@@ -1,11 +1,30 @@
1
1
  /** HTTP MCP helpers. Requires the optional @modelcontextprotocol/sdk peer. */
2
2
  import type { OperationKinds } from "./implementation/protocol-operations.js";
3
+ import type { McpHealthOptions } from "./contracts/mcp.js";
4
+ import type { AccountCheckContext, AuthMethods } from "./contracts/provider.js";
3
5
  import { type McpCatalogOptions } from "./implementation/mcp-catalog.js";
4
6
  export type { McpCatalogOptions } from "./implementation/mcp-catalog.js";
5
- export { McpError, type McpToolContext, type McpToolsOptions, type McpToolResult, } from "./contracts/mcp.js";
7
+ export { McpCredentialsUnverified, McpError, type McpHealthOptions, type McpToolContext, type McpToolsOptions, type McpToolResult, } from "./contracts/mcp.js";
6
8
  /**
7
9
  * A router over a server's tools for the selected account. Its title, description and
8
10
  * instructions come from the server. Kinds override uncertain upstream read-only hints.
9
11
  */
10
12
  export declare const mcpRouter: (options: McpCatalogOptions, kinds?: OperationKinds) => Promise<import("./index.js").RouterDeclaration<unknown, unknown>>;
13
+ /**
14
+ * A provider `health` check for an MCP server. Pass the check context `health` receives, then the
15
+ * server's `url` and the `headers` that send the account's credentials:
16
+ * `health: (check) => mcpHealth(check, { url, headers: headers(check.account) })`.
17
+ *
18
+ * It connects with those headers, initializes, and reads the first page of tools, then does the
19
+ * same without any headers. No tool runs. The check passes only when the server accepts the account
20
+ * and refuses the attempt without credentials. A refused account throws `ProviderError`, as HTTP
21
+ * helpers do. An unreachable or unusable server throws `McpError`, and a request Executor's network
22
+ * refuses throws `NetworkRefused`. A server that also answers without credentials, or whose answer
23
+ * to that attempt is not a refusal, throws `McpCredentialsUnverified`. Each of these errors means
24
+ * the check could not verify the account, and the account form explains why. Send credentials only
25
+ * in `headers`; the attempt without them uses the same `url`. The check context's `signal` cancels
26
+ * both attempts, and they share one budget that ends early enough before its `deadline` to report a
27
+ * server that did not answer in time. `timeoutMs` can only shorten that budget.
28
+ */
29
+ export declare const mcpHealth: <Auth extends AuthMethods>(check: AccountCheckContext<Auth>, options: McpHealthOptions) => Promise<void>;
11
30
  export type { OperationKinds } from "./implementation/protocol-operations.js";
@@ -5,8 +5,8 @@ export { SkillLoadFailed, SkillDefinitionInvalid, SkillServiceName, type SkillRe
5
5
  * the catalog; without it, mutable refs resolve again on each call.
6
6
  */
7
7
  export declare const githubSkills: (options: GitHubSkillsOptions) => Promise<readonly {
8
- readonly name: string;
9
8
  readonly description: string;
9
+ readonly name: string;
10
10
  readonly files: readonly {
11
11
  readonly path: string;
12
12
  readonly content: string;
@@ -20,8 +20,8 @@ export declare const githubSkills: (options: GitHubSkillsOptions) => Promise<rea
20
20
  }[]>;
21
21
  /** Fetch a published skill index and its text files. Pass `cache: ctx.cache` to reuse the catalog. */
22
22
  export declare const wellKnownSkills: (options: WellKnownSkillsOptions) => Promise<readonly {
23
- readonly name: string;
24
23
  readonly description: string;
24
+ readonly name: string;
25
25
  readonly files: readonly {
26
26
  readonly path: string;
27
27
  readonly content: string;
@@ -35,8 +35,8 @@ export declare const wellKnownSkills: (options: WellKnownSkillsOptions) => Promi
35
35
  }[]>;
36
36
  /** Parse a bundled standard skill directory into an app capability. */
37
37
  export declare const fileSkill: (files: readonly SkillFile[]) => Promise<{
38
- readonly name: string;
39
38
  readonly description: string;
39
+ readonly name: string;
40
40
  readonly files: readonly {
41
41
  readonly path: string;
42
42
  readonly content: string;
@@ -50,8 +50,8 @@ export declare const fileSkill: (files: readonly SkillFile[]) => Promise<{
50
50
  }>;
51
51
  /** Read skill directories from ctx.files. Omitted path selects skills/; missing folders return []. */
52
52
  export declare const folderSkills: (options: FolderSkillsOptions) => Promise<readonly {
53
- readonly name: string;
54
53
  readonly description: string;
54
+ readonly name: string;
55
55
  readonly files: readonly {
56
56
  readonly path: string;
57
57
  readonly content: string;