apps 0.0.1-beta.67 → 0.0.1-beta.69

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 (38) hide show
  1. package/framework-reference.json +1 -1
  2. package/js/{chunk-5NQDJMLY.js → chunk-3R3KFCDU.js} +172 -12
  3. package/js/{chunk-MWKHKOTL.js → chunk-7LMU3ER3.js} +35 -1
  4. package/js/{chunk-WFPDJ4R3.js → chunk-CXDAEGXB.js} +3 -3
  5. package/js/{chunk-ZA6YCHLZ.js → chunk-CY4MT7PI.js} +5 -5
  6. package/js/{chunk-524HNOCY.js → chunk-DZN5TQ53.js} +83 -16
  7. package/js/{chunk-AZIV4XRH.js → chunk-ECCWT5GJ.js} +2 -2
  8. package/js/{chunk-5EOB55ID.js → chunk-FZB6D6ZD.js} +20 -10
  9. package/js/{chunk-6RH2UYRB.js → chunk-GJSNQSR7.js} +2 -2
  10. package/js/{chunk-TLWLJ7PD.js → chunk-JW5LYSER.js} +94 -3
  11. package/js/{chunk-T3FPHPJJ.js → chunk-MHB7IFG7.js} +1 -1
  12. package/js/{chunk-AQU56EPI.js → chunk-RUP4JMKO.js} +17 -10
  13. package/js/{chunk-X36WUWBJ.js → chunk-ZEJ3IKEC.js} +2 -2
  14. package/js/{chunk-K2VZ3O27.js → chunk-ZR7QAG67.js} +1 -1
  15. package/js/contracts.js +34 -2
  16. package/js/effect.js +9 -9
  17. package/js/graphql.js +11 -11
  18. package/js/host.js +9 -9
  19. package/js/index.js +59 -12
  20. package/js/mcp/effect.js +11 -11
  21. package/js/mcp/stdio.js +11 -11
  22. package/js/mcp.js +13 -13
  23. package/js/openapi.js +7 -7
  24. package/js/skills.js +5 -5
  25. package/package.json +1 -1
  26. package/runtime.json +1 -1
  27. package/types/app-cache/src/contracts/cache.d.ts +2 -0
  28. package/types/apps/src/contracts/host.d.ts +600 -2
  29. package/types/apps/src/contracts/network.d.ts +36 -0
  30. package/types/apps/src/contracts/placement.d.ts +102 -0
  31. package/types/apps/src/contracts/protocol-version.d.ts +1 -1
  32. package/types/apps/src/contracts/protocols/current.d.ts +1368 -2
  33. package/types/apps/src/contracts/provider.d.ts +25 -0
  34. package/types/apps/src/contracts/sql.d.ts +5 -0
  35. package/types/apps/src/implementation/openapi-compile.d.ts +3 -3
  36. package/types/apps/src/implementation/placement.d.ts +60 -0
  37. package/types/apps/src/implementation/provider.d.ts +8 -2
  38. package/types/apps/src/index.d.ts +27 -3
@@ -12,6 +12,14 @@ import { Schema } from "effect";
12
12
  * the destination host.
13
13
  * - `credential_app`: the request carries a credential handle that is not valid for this app.
14
14
  * - `credential_expired`: the request carries an expired credential handle.
15
+ * - `credential_placement`: the request carries a credential handle somewhere its method does not
16
+ * place it, such as a body, the URL path or another header, or in a value that does not match
17
+ * the method's template exactly.
18
+ * - `credential_transport`: the request would send a placed credential over plain HTTP. Placed
19
+ * credentials go only over HTTPS, except to a loopback address on an instance whose operator
20
+ * lets apps reach private addresses, for local development.
21
+ * - `credential_method`: the request carries a credential handle and uses a method that asks the
22
+ * service to echo the request back, such as `TRACE`.
15
23
  */
16
24
  export declare const NetworkRefusal: Schema.Union<readonly [Schema.Struct<{
17
25
  readonly reason: Schema.Literal<"private_address">;
@@ -27,6 +35,20 @@ export declare const NetworkRefusal: Schema.Union<readonly [Schema.Struct<{
27
35
  readonly reason: Schema.Literal<"credential_expired">;
28
36
  /** The provider of the expired credential handle. */
29
37
  readonly provider: Schema.String;
38
+ }>, Schema.Struct<{
39
+ readonly reason: Schema.Literal<"credential_placement">;
40
+ /** The provider of the misplaced credential handle. */
41
+ readonly provider: Schema.String;
42
+ /** Where the handle was found, such as `body` or `header x-note`. */
43
+ readonly location: Schema.String;
44
+ }>, Schema.Struct<{
45
+ readonly reason: Schema.Literal<"credential_transport">;
46
+ /** The provider of the credential handle the request carried. */
47
+ readonly provider: Schema.String;
48
+ }>, Schema.Struct<{
49
+ readonly reason: Schema.Literal<"credential_method">;
50
+ /** The refused HTTP method. */
51
+ readonly method: Schema.String;
30
52
  }>]>;
31
53
  export type NetworkRefusal = typeof NetworkRefusal.Type;
32
54
  declare const NetworkRefused_base: Schema.Class<NetworkRefused, Schema.TaggedStruct<"NetworkRefused", {
@@ -46,6 +68,20 @@ declare const NetworkRefused_base: Schema.Class<NetworkRefused, Schema.TaggedStr
46
68
  readonly reason: Schema.Literal<"credential_expired">;
47
69
  /** The provider of the expired credential handle. */
48
70
  readonly provider: Schema.String;
71
+ }>, Schema.Struct<{
72
+ readonly reason: Schema.Literal<"credential_placement">;
73
+ /** The provider of the misplaced credential handle. */
74
+ readonly provider: Schema.String;
75
+ /** Where the handle was found, such as `body` or `header x-note`. */
76
+ readonly location: Schema.String;
77
+ }>, Schema.Struct<{
78
+ readonly reason: Schema.Literal<"credential_transport">;
79
+ /** The provider of the credential handle the request carried. */
80
+ readonly provider: Schema.String;
81
+ }>, Schema.Struct<{
82
+ readonly reason: Schema.Literal<"credential_method">;
83
+ /** The refused HTTP method. */
84
+ readonly method: Schema.String;
49
85
  }>]>;
50
86
  }>, import("effect/Cause").YieldableError>;
51
87
  /** Executor's app network refused a request before it reached the service. */
@@ -0,0 +1,102 @@
1
+ /**
2
+ * Credential placement: where an auth method's secret fields may be sent. A placement is a
3
+ * location in the request, a header or a query parameter, and a value template built from
4
+ * literal text, references to the method's own account fields, and base64 of those. Executor's
5
+ * outbound network substitutes a placed credential handle only where a request matches one of
6
+ * its method's placements exactly, and refuses the request when the handle is anywhere else.
7
+ */
8
+ import { Result, Schema } from "effect";
9
+ /** A reference to one of the method's own account fields. */
10
+ export declare const PlacementField: Schema.Struct<{
11
+ readonly field: Schema.NonEmptyString;
12
+ }>;
13
+ export type PlacementField = typeof PlacementField.Type;
14
+ /** Literal text or a field reference: what base64 may encode. Base64 never nests. */
15
+ export declare const PlacementText: Schema.Union<readonly [Schema.String, Schema.Struct<{
16
+ readonly field: Schema.NonEmptyString;
17
+ }>]>;
18
+ export type PlacementText = typeof PlacementText.Type;
19
+ /** Base64 (RFC 4648, padded) of the UTF-8 bytes of its parts, such as Basic credentials. */
20
+ export declare const PlacementBase64: Schema.Struct<{
21
+ readonly base64: Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
22
+ readonly field: Schema.NonEmptyString;
23
+ }>]>>;
24
+ }>;
25
+ export type PlacementBase64 = typeof PlacementBase64.Type;
26
+ /** One part of a value template. Parts concatenate. */
27
+ export declare const PlacementPart: Schema.Union<readonly [Schema.String, Schema.Struct<{
28
+ readonly field: Schema.NonEmptyString;
29
+ }>, Schema.Struct<{
30
+ readonly base64: Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
31
+ readonly field: Schema.NonEmptyString;
32
+ }>]>>;
33
+ }>]>;
34
+ export type PlacementPart = typeof PlacementPart.Type;
35
+ /** A lowercase HTTP header name (RFC 9110 token). */
36
+ export declare const PlacementHeaderName: Schema.String;
37
+ /**
38
+ * Where a credential may be sent and the exact value it is sent as. A header placement is the
39
+ * header's whole value; a query placement is the whole value of the named query parameter.
40
+ */
41
+ export declare const Placement: Schema.Union<readonly [Schema.Struct<{
42
+ readonly in: Schema.Literal<"header">;
43
+ readonly name: Schema.String;
44
+ readonly value: Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
45
+ readonly field: Schema.NonEmptyString;
46
+ }>, Schema.Struct<{
47
+ readonly base64: Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
48
+ readonly field: Schema.NonEmptyString;
49
+ }>]>>;
50
+ }>]>>;
51
+ }>, Schema.Struct<{
52
+ readonly in: Schema.Literal<"query">;
53
+ readonly name: Schema.NonEmptyString;
54
+ readonly value: Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
55
+ readonly field: Schema.NonEmptyString;
56
+ }>, Schema.Struct<{
57
+ readonly base64: Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
58
+ readonly field: Schema.NonEmptyString;
59
+ }>]>>;
60
+ }>]>>;
61
+ }>]>;
62
+ export type Placement = typeof Placement.Type;
63
+ /** An auth method's placements. */
64
+ export declare const Placements: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
65
+ readonly in: Schema.Literal<"header">;
66
+ readonly name: Schema.String;
67
+ readonly value: Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
68
+ readonly field: Schema.NonEmptyString;
69
+ }>, Schema.Struct<{
70
+ readonly base64: Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
71
+ readonly field: Schema.NonEmptyString;
72
+ }>]>>;
73
+ }>]>>;
74
+ }>, Schema.Struct<{
75
+ readonly in: Schema.Literal<"query">;
76
+ readonly name: Schema.NonEmptyString;
77
+ readonly value: Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
78
+ readonly field: Schema.NonEmptyString;
79
+ }>, Schema.Struct<{
80
+ readonly base64: Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
81
+ readonly field: Schema.NonEmptyString;
82
+ }>]>>;
83
+ }>]>>;
84
+ }>]>>;
85
+ /** Whether a part references a field. */
86
+ export declare const isPlacementField: (part: PlacementPart) => part is PlacementField;
87
+ /** The field names a template references, base64 parts included. */
88
+ export declare const placementFields: (placement: Placement) => ReadonlySet<string>;
89
+ /** Placements are equal when their JSON is: same location, name and template. */
90
+ export declare const placementKey: (placement: Placement) => string;
91
+ /** Placements in a stable order without repeats, so their order never changes an identity. */
92
+ export declare const normalizePlacements: (placements: readonly Placement[]) => readonly Placement[];
93
+ declare const PlacementFieldMissing_base: Schema.Class<PlacementFieldMissing, Schema.TaggedStruct<"PlacementFieldMissing", {
94
+ readonly field: Schema.String;
95
+ }>, import("effect/Cause").YieldableError>;
96
+ /** A field the template references has no string value. */
97
+ export declare class PlacementFieldMissing extends PlacementFieldMissing_base {
98
+ get message(): string;
99
+ }
100
+ /** Render a template with field values. A referenced field without a string value fails. */
101
+ export declare const renderPlacement: (placement: Placement, fields: Readonly<Record<string, unknown>>) => Result.Result<string, PlacementFieldMissing>;
102
+ export {};
@@ -3,4 +3,4 @@
3
3
  * snapshot. Its schemas are `protocols/current.ts`; released protocols are frozen. See notes/apps-publishing.md.
4
4
  * This file has no imports so the package build script can read it directly.
5
5
  */
6
- export declare const frameworkProtocol = 11;
6
+ export declare const frameworkProtocol = 12;