@executor-js/sdk 0.1.0 → 0.2.1

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 (76) hide show
  1. package/README.md +21 -29
  2. package/dist/api-errors.d.ts +10 -0
  3. package/dist/api-errors.d.ts.map +1 -0
  4. package/dist/blob.d.ts.map +1 -1
  5. package/dist/chunk-6SQWMOM4.js +51 -0
  6. package/dist/chunk-6SQWMOM4.js.map +1 -0
  7. package/dist/chunk-NPWV4R3N.js +5563 -0
  8. package/dist/chunk-NPWV4R3N.js.map +1 -0
  9. package/dist/chunk-QQK7X3DM.js +103 -0
  10. package/dist/chunk-QQK7X3DM.js.map +1 -0
  11. package/dist/client.d.ts +2 -5
  12. package/dist/client.d.ts.map +1 -1
  13. package/dist/client.js +12 -18
  14. package/dist/client.js.map +1 -1
  15. package/dist/connections.d.ts +7 -0
  16. package/dist/connections.d.ts.map +1 -1
  17. package/dist/core-schema.d.ts +83 -3
  18. package/dist/core-schema.d.ts.map +1 -1
  19. package/dist/core.js +94 -52
  20. package/dist/core.js.map +1 -1
  21. package/dist/credential-bindings.d.ts +173 -0
  22. package/dist/credential-bindings.d.ts.map +1 -0
  23. package/dist/credential-bindings.test.d.ts +2 -0
  24. package/dist/credential-bindings.test.d.ts.map +1 -0
  25. package/dist/errors.d.ts +27 -5
  26. package/dist/errors.d.ts.map +1 -1
  27. package/dist/executor.d.ts +47 -13
  28. package/dist/executor.d.ts.map +1 -1
  29. package/dist/hosted-http-client.d.ts +17 -0
  30. package/dist/hosted-http-client.d.ts.map +1 -0
  31. package/dist/hosted-http-client.test.d.ts +2 -0
  32. package/dist/hosted-http-client.test.d.ts.map +1 -0
  33. package/dist/ids.d.ts +2 -0
  34. package/dist/ids.d.ts.map +1 -1
  35. package/dist/index.d.ts +15 -10
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +16 -18
  38. package/dist/index.js.map +1 -1
  39. package/dist/oauth-discovery.d.ts +19 -4
  40. package/dist/oauth-discovery.d.ts.map +1 -1
  41. package/dist/oauth-helpers.d.ts +21 -0
  42. package/dist/oauth-helpers.d.ts.map +1 -1
  43. package/dist/oauth-popup-types.d.ts.map +1 -1
  44. package/dist/oauth-service.d.ts +16 -5
  45. package/dist/oauth-service.d.ts.map +1 -1
  46. package/dist/oauth.d.ts +19 -16
  47. package/dist/oauth.d.ts.map +1 -1
  48. package/dist/oxlint-plugin-executor.test.d.ts +2 -0
  49. package/dist/oxlint-plugin-executor.test.d.ts.map +1 -0
  50. package/dist/plugin.d.ts +84 -19
  51. package/dist/plugin.d.ts.map +1 -1
  52. package/dist/policies.d.ts +10 -15
  53. package/dist/policies.d.ts.map +1 -1
  54. package/dist/promise-executor.d.ts.map +1 -1
  55. package/dist/promise.d.ts +5 -3
  56. package/dist/promise.d.ts.map +1 -1
  57. package/dist/schema-types.d.ts.map +1 -1
  58. package/dist/scoped-adapter.d.ts +17 -2
  59. package/dist/scoped-adapter.d.ts.map +1 -1
  60. package/dist/secrets.d.ts +12 -0
  61. package/dist/secrets.d.ts.map +1 -1
  62. package/dist/test-config.d.ts +10 -0
  63. package/dist/test-config.d.ts.map +1 -0
  64. package/dist/testing.d.ts +30 -8
  65. package/dist/testing.d.ts.map +1 -1
  66. package/dist/testing.js +56 -0
  67. package/dist/testing.js.map +1 -0
  68. package/dist/types.d.ts +11 -3
  69. package/dist/types.d.ts.map +1 -1
  70. package/dist/usage-visibility.test.d.ts +2 -0
  71. package/dist/usage-visibility.test.d.ts.map +1 -0
  72. package/dist/usages.d.ts +20 -0
  73. package/dist/usages.d.ts.map +1 -0
  74. package/package.json +26 -14
  75. package/dist/chunk-2WV7VSNL.js +0 -4440
  76. package/dist/chunk-2WV7VSNL.js.map +0 -1
package/dist/errors.d.ts CHANGED
@@ -51,9 +51,10 @@ export declare class SourceNotFoundError extends SourceNotFoundError_base {
51
51
  declare const SourceRemovalNotAllowedError_base: Schema.Class<SourceRemovalNotAllowedError, Schema.TaggedStruct<"SourceRemovalNotAllowedError", {
52
52
  readonly sourceId: Schema.String;
53
53
  }>, import("effect/Cause").YieldableError>;
54
- /** `executor.sources.remove(id)` was called on a source with
55
- * `canRemove: false` — typically a static source declared by a plugin
56
- * at startup. Removing static sources is a bug in the caller. */
54
+ /** `executor.sources.remove({ id, targetScope })` was called on a
55
+ * source with `canRemove: false` — typically a static source declared
56
+ * by a plugin at startup. Removing static sources is a bug in the
57
+ * caller. */
57
58
  export declare class SourceRemovalNotAllowedError extends SourceRemovalNotAllowedError_base {
58
59
  }
59
60
  declare const SecretNotFoundError_base: Schema.Class<SecretNotFoundError, Schema.TaggedStruct<"SecretNotFoundError", {
@@ -71,12 +72,25 @@ declare const SecretOwnedByConnectionError_base: Schema.Class<SecretOwnedByConne
71
72
  readonly secretId: Schema.brand<Schema.String, "SecretId">;
72
73
  readonly connectionId: Schema.brand<Schema.String, "ConnectionId">;
73
74
  }>, import("effect/Cause").YieldableError>;
74
- /** Raised when `secrets.remove(id)` is called on a secret whose row has
75
+ /** Raised when `secrets.remove({ id, targetScope })` is called on a secret whose row has
75
76
  * `owned_by_connection_id` set. The connection owns the lifecycle —
76
77
  * callers must go through `connections.remove(connectionId)` to
77
78
  * delete it along with its siblings. */
78
79
  export declare class SecretOwnedByConnectionError extends SecretOwnedByConnectionError_base {
79
80
  }
81
+ declare const SecretInUseError_base: Schema.Class<SecretInUseError, Schema.TaggedStruct<"SecretInUseError", {
82
+ readonly secretId: Schema.brand<Schema.String, "SecretId">;
83
+ readonly usageCount: Schema.Number;
84
+ }>, import("effect/Cause").YieldableError>;
85
+ /** Raised when `secrets.remove({ id, targetScope })` is called on a secret that's still
86
+ * referenced by one or more sources / bindings across plugins. The UI's
87
+ * "Used by" list tells the user which sources to detach first. App-
88
+ * level RESTRICT — the codebase doesn't enforce DB-level FKs because
89
+ * composite `(scope_id, id)` PKs make single-column references
90
+ * impossible to constrain in sqlite. `usageCount` is a hint for the
91
+ * caller; the full list is queryable via `secrets.usages(id)`. */
92
+ export declare class SecretInUseError extends SecretInUseError_base {
93
+ }
80
94
  declare const ConnectionNotFoundError_base: Schema.Class<ConnectionNotFoundError, Schema.TaggedStruct<"ConnectionNotFoundError", {
81
95
  readonly connectionId: Schema.brand<Schema.String, "ConnectionId">;
82
96
  }>, import("effect/Cause").YieldableError>;
@@ -110,6 +124,14 @@ declare const ConnectionReauthRequiredError_base: Schema.Class<ConnectionReauthR
110
124
  */
111
125
  export declare class ConnectionReauthRequiredError extends ConnectionReauthRequiredError_base {
112
126
  }
113
- export type ExecutorError = ToolNotFoundError | ToolInvocationError | PluginNotLoadedError | NoHandlerError | ToolBlockedError | SourceNotFoundError | SourceRemovalNotAllowedError | SecretNotFoundError | SecretResolutionError | SecretOwnedByConnectionError | ConnectionNotFoundError | ConnectionProviderNotRegisteredError | ConnectionRefreshNotSupportedError | ConnectionReauthRequiredError;
127
+ declare const ConnectionInUseError_base: Schema.Class<ConnectionInUseError, Schema.TaggedStruct<"ConnectionInUseError", {
128
+ readonly connectionId: Schema.brand<Schema.String, "ConnectionId">;
129
+ readonly usageCount: Schema.Number;
130
+ }>, import("effect/Cause").YieldableError>;
131
+ /** Raised when `connections.remove(id)` is called on a connection that's
132
+ * still referenced by sources / bindings. Mirrors `SecretInUseError`. */
133
+ export declare class ConnectionInUseError extends ConnectionInUseError_base {
134
+ }
135
+ export type ExecutorError = ToolNotFoundError | ToolInvocationError | PluginNotLoadedError | NoHandlerError | ToolBlockedError | SourceNotFoundError | SourceRemovalNotAllowedError | SecretNotFoundError | SecretResolutionError | SecretOwnedByConnectionError | SecretInUseError | ConnectionNotFoundError | ConnectionProviderNotRegisteredError | ConnectionRefreshNotSupportedError | ConnectionReauthRequiredError | ConnectionInUseError;
114
136
  export {};
115
137
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,MAAM,EAAE,MAAM,QAAQ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MJ,MAAM,MAAM,aAAa,GACrB,iBAAiB,GACjB,mBAAmB,GACnB,oBAAoB,GACpB,cAAc,GACd,gBAAgB,GAChB,mBAAmB,GACnB,4BAA4B,GAC5B,mBAAmB,GACnB,qBAAqB,GACrB,4BAA4B,GAC5B,gBAAgB,GAChB,uBAAuB,GACvB,oCAAoC,GACpC,kCAAkC,GAClC,6BAA6B,GAC7B,oBAAoB,CAAC"}
@@ -1,15 +1,19 @@
1
- import { Effect } from "effect";
1
+ import { Duration, Effect, Layer } from "effect";
2
+ import { type HttpClient } from "effect/unstable/http";
3
+ import type { OAuthEndpointUrlPolicy } from "./oauth-helpers";
2
4
  import { type DBAdapter, type DBSchema, type StorageFailure } from "@executor-js/storage-core";
3
5
  import { type BlobStore } from "./blob";
4
- import { ConnectionRef, ConnectionRefreshError, type CreateConnectionInput, type UpdateConnectionTokensInput } from "./connections";
6
+ import { ConnectionRef, ConnectionRefreshError, type CreateConnectionInput, type RemoveConnectionInput, type UpdateConnectionTokensInput } from "./connections";
7
+ import { type CredentialBindingsFacade } from "./credential-bindings";
5
8
  import { ElicitationDeclinedError, type ElicitationHandler } from "./elicitation";
6
- import { ConnectionNotFoundError, ConnectionProviderNotRegisteredError, ConnectionReauthRequiredError, ConnectionRefreshNotSupportedError, NoHandlerError, PluginNotLoadedError, SecretOwnedByConnectionError, SourceRemovalNotAllowedError, ToolBlockedError, ToolInvocationError, ToolNotFoundError } from "./errors";
9
+ import { ConnectionInUseError, ConnectionNotFoundError, ConnectionProviderNotRegisteredError, ConnectionReauthRequiredError, ConnectionRefreshNotSupportedError, NoHandlerError, PluginNotLoadedError, SecretInUseError, SecretOwnedByConnectionError, SourceRemovalNotAllowedError, ToolBlockedError, ToolInvocationError, ToolNotFoundError } from "./errors";
7
10
  import type { OAuthService } from "./oauth";
8
- import { type CreateToolPolicyInput, type PolicyMatch, type ToolPolicy, type UpdateToolPolicyInput } from "./policies";
11
+ import { type CreateToolPolicyInput, type PolicyMatch, type RemoveToolPolicyInput, type ToolPolicy, type UpdateToolPolicyInput } from "./policies";
9
12
  import type { AnyPlugin, PluginExtensions } from "./plugin";
10
13
  import type { Scope } from "./scope";
11
- import { SecretRef, SetSecretInput } from "./secrets";
12
- import { ToolSchema, type Source, type SourceDetectionResult, type Tool, type ToolListFilter } from "./types";
14
+ import { RemoveSecretInput, SecretRef, SetSecretInput } from "./secrets";
15
+ import { Usage } from "./usages";
16
+ import { ToolSchema, type RefreshSourceInput, type RemoveSourceInput, type Source, type SourceDetectionResult, type Tool, type ToolListFilter } from "./types";
13
17
  export type OnElicitation = ElicitationHandler | "accept-all";
14
18
  export interface InvokeOptions {
15
19
  /** Override the executor-level handler for this single call. */
@@ -38,8 +42,8 @@ export type Executor<TPlugins extends readonly AnyPlugin[] = []> = {
38
42
  };
39
43
  readonly sources: {
40
44
  readonly list: () => Effect.Effect<readonly Source[], StorageFailure>;
41
- readonly remove: (sourceId: string) => Effect.Effect<void, SourceRemovalNotAllowedError | StorageFailure>;
42
- readonly refresh: (sourceId: string) => Effect.Effect<void, StorageFailure>;
45
+ readonly remove: (input: RemoveSourceInput) => Effect.Effect<void, SourceRemovalNotAllowedError | StorageFailure>;
46
+ readonly refresh: (input: RefreshSourceInput) => Effect.Effect<void, StorageFailure>;
43
47
  /** URL autodetection — fans out to every plugin's `detect` hook
44
48
  * (if declared), returns every high/medium/low-confidence match.
45
49
  * UI picks a winner from the list. */
@@ -49,6 +53,7 @@ export type Executor<TPlugins extends readonly AnyPlugin[] = []> = {
49
53
  };
50
54
  readonly secrets: {
51
55
  readonly get: (id: string) => Effect.Effect<string | null, SecretOwnedByConnectionError | StorageFailure>;
56
+ readonly getAtScope: (id: string, scope: string) => Effect.Effect<string | null, SecretOwnedByConnectionError | StorageFailure>;
52
57
  /** Fast-path existence check — hits the core `secret` routing table
53
58
  * only, never calls the provider. Use this for UI state ("secret
54
59
  * missing, prompt to add") to avoid keychain permission prompts
@@ -57,21 +62,41 @@ export type Executor<TPlugins extends readonly AnyPlugin[] = []> = {
57
62
  readonly set: (input: SetSecretInput) => Effect.Effect<SecretRef, StorageFailure>;
58
63
  /** Delete a bare (non-connection-owned) secret. Connection-owned
59
64
  * secrets are rejected with `SecretOwnedByConnectionError` — use
60
- * `connections.remove` instead. */
61
- readonly remove: (id: string) => Effect.Effect<void, SecretOwnedByConnectionError | StorageFailure>;
65
+ * `connections.remove` instead. Refuses with `SecretInUseError`
66
+ * if any plugin reports the secret as in use; the caller should
67
+ * show the `usages(id)` list and ask the user to detach first. */
68
+ readonly remove: (input: RemoveSecretInput) => Effect.Effect<void, SecretOwnedByConnectionError | SecretInUseError | StorageFailure>;
62
69
  readonly list: () => Effect.Effect<readonly SecretRef[], StorageFailure>;
70
+ /** Management view of visible secret rows. Unlike `list`, this does
71
+ * not collapse same-id rows across scopes, so UI that writes exact
72
+ * credential targets can show both personal and shared rows. */
73
+ readonly listAll: () => Effect.Effect<readonly SecretRef[], StorageFailure>;
74
+ /** All places this secret is referenced — fans out across every
75
+ * plugin's `usagesForSecret`. Used by the Secrets-tab "Used by"
76
+ * list and by `remove` for its RESTRICT check. */
77
+ readonly usages: (id: string) => Effect.Effect<readonly Usage[], StorageFailure>;
63
78
  readonly providers: () => Effect.Effect<readonly string[]>;
64
79
  };
65
80
  readonly connections: {
66
81
  readonly get: (id: string) => Effect.Effect<ConnectionRef | null, StorageFailure>;
82
+ readonly getAtScope: (id: string, scope: string) => Effect.Effect<ConnectionRef | null, StorageFailure>;
67
83
  readonly list: () => Effect.Effect<readonly ConnectionRef[], StorageFailure>;
68
84
  readonly create: (input: CreateConnectionInput) => Effect.Effect<ConnectionRef, ConnectionProviderNotRegisteredError | StorageFailure>;
69
85
  readonly updateTokens: (input: UpdateConnectionTokensInput) => Effect.Effect<ConnectionRef, ConnectionNotFoundError | StorageFailure>;
70
86
  readonly setIdentityLabel: (id: string, label: string | null) => Effect.Effect<void, ConnectionNotFoundError | StorageFailure>;
71
87
  readonly accessToken: (id: string) => Effect.Effect<string, ConnectionNotFoundError | ConnectionProviderNotRegisteredError | ConnectionRefreshNotSupportedError | ConnectionReauthRequiredError | ConnectionRefreshError | StorageFailure>;
72
- readonly remove: (id: string) => Effect.Effect<void, StorageFailure>;
88
+ readonly accessTokenAtScope: (id: string, scope: string) => Effect.Effect<string, ConnectionNotFoundError | ConnectionProviderNotRegisteredError | ConnectionRefreshNotSupportedError | ConnectionReauthRequiredError | ConnectionRefreshError | StorageFailure>;
89
+ /** Refuses with `ConnectionInUseError` if any plugin reports the
90
+ * connection as in use. */
91
+ readonly remove: (input: RemoveConnectionInput) => Effect.Effect<void, ConnectionInUseError | StorageFailure>;
92
+ /** All places this connection is referenced — fans out across every
93
+ * plugin's `usagesForConnection`. */
94
+ readonly usages: (id: string) => Effect.Effect<readonly Usage[], StorageFailure>;
73
95
  readonly providers: () => Effect.Effect<readonly string[]>;
74
96
  };
97
+ /** Shared credential slot bindings. Plugins decide what slot keys mean;
98
+ * core owns scoped storage, resolution status, and usage visibility. */
99
+ readonly credentialBindings: CredentialBindingsFacade;
75
100
  /** Shared OAuth service. Hosts use this through the core HTTP OAuth group;
76
101
  * plugins see the same service as `ctx.oauth`. */
77
102
  readonly oauth: OAuthService;
@@ -84,7 +109,7 @@ export type Executor<TPlugins extends readonly AnyPlugin[] = []> = {
84
109
  * list (highest precedence) when `position` is omitted. */
85
110
  readonly create: (input: CreateToolPolicyInput) => Effect.Effect<ToolPolicy, StorageFailure>;
86
111
  readonly update: (input: UpdateToolPolicyInput) => Effect.Effect<ToolPolicy, StorageFailure>;
87
- readonly remove: (id: string) => Effect.Effect<void, StorageFailure>;
112
+ readonly remove: (input: RemoveToolPolicyInput) => Effect.Effect<void, StorageFailure>;
88
113
  /** Resolve the effective policy for a tool id by walking the scope-
89
114
  * stacked policy list with first-match-wins semantics. Returns
90
115
  * `undefined` when no rule matches (caller falls back to the
@@ -113,7 +138,16 @@ export interface ExecutorConfig<TPlugins extends readonly AnyPlugin[] = []> {
113
138
  * an options arg.
114
139
  */
115
140
  readonly onElicitation: OnElicitation;
141
+ readonly httpClientLayer?: Layer.Layer<HttpClient.HttpClient>;
142
+ readonly oauthEndpointUrlPolicy?: OAuthEndpointUrlPolicy;
143
+ readonly sourceDetection?: {
144
+ readonly maxUrlLength?: number;
145
+ readonly maxDetectors?: number;
146
+ readonly maxResults?: number;
147
+ readonly timeout?: Duration.Input;
148
+ readonly hostedOutboundPolicy?: boolean;
149
+ };
116
150
  }
117
151
  export declare const collectSchemas: (plugins: readonly AnyPlugin[]) => DBSchema;
118
- export declare const createExecutor: <const TPlugins extends readonly AnyPlugin[] = []>(config: ExecutorConfig<TPlugins>) => Effect.Effect<Executor<TPlugins>, Error>;
152
+ export declare const createExecutor: <const TPlugins extends readonly AnyPlugin[] = []>(config: ExecutorConfig<TPlugins>) => Effect.Effect<Executor<TPlugins>, StorageFailure>;
119
153
  //# sourceMappingURL=executor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../src/executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,MAAM,EAAqC,MAAM,QAAQ,CAAC;AAEtF,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,QAAQ,EAEb,KAAK,cAAc,EAEpB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAEL,KAAK,SAAS,EACf,MAAM,QAAQ,CAAC;AAChB,OAAO,EAEL,aAAa,EACb,sBAAsB,EAGtB,KAAK,qBAAqB,EAC1B,KAAK,2BAA2B,EACjC,MAAM,eAAe,CAAC;AAcvB,OAAO,EACL,wBAAwB,EAGxB,KAAK,kBAAkB,EAExB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,uBAAuB,EACvB,oCAAoC,EACpC,6BAA6B,EAC7B,kCAAkC,EAClC,cAAc,EACd,oBAAoB,EACpB,4BAA4B,EAC5B,4BAA4B,EAC5B,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAGlB,OAAO,KAAK,EAAE,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AAS,SAAS,SAAS,EAAE,GAAG,EAAE,EAC7E,QAAQ,cAAc,CAAC,QAAQ,CAAC,KAC/B,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,cAAc,CAy4F/C,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { Effect, Layer, Schema } from "effect";
2
+ import { HttpClient } from "effect/unstable/http";
3
+ declare const HostedOutboundRequestBlocked_base: Schema.Class<HostedOutboundRequestBlocked, Schema.TaggedStruct<"HostedOutboundRequestBlocked", {
4
+ readonly url: Schema.String;
5
+ readonly reason: Schema.String;
6
+ }>, import("effect/Cause").YieldableError>;
7
+ export declare class HostedOutboundRequestBlocked extends HostedOutboundRequestBlocked_base {
8
+ }
9
+ export interface HostedHttpClientOptions {
10
+ readonly allowLocalNetwork?: boolean;
11
+ readonly maxRedirects?: number;
12
+ readonly fetch?: typeof globalThis.fetch;
13
+ }
14
+ export declare const validateHostedOutboundUrl: (value: string, options?: HostedHttpClientOptions) => Effect.Effect<void, HostedOutboundRequestBlocked>;
15
+ export declare const makeHostedHttpClientLayer: (options?: HostedHttpClientOptions) => Layer.Layer<HttpClient.HttpClient>;
16
+ export {};
17
+ //# sourceMappingURL=hosted-http-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hosted-http-client.d.ts","sourceRoot":"","sources":["../src/hosted-http-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,EAAmB,UAAU,EAAE,MAAM,sBAAsB,CAAC;;;;;AAEnE,qBAAa,4BAA6B,SAAQ,iCAMjD;CAAG;AAEJ,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IACrC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;CAC1C;AA8ED,eAAO,MAAM,yBAAyB,GACpC,OAAO,MAAM,EACb,UAAS,uBAA4B,KACpC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,4BAA4B,CA+B/C,CAAC;AAmCL,eAAO,MAAM,yBAAyB,GACpC,UAAS,uBAA4B,KACpC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,UAAU,CAYjC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=hosted-http-client.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hosted-http-client.test.d.ts","sourceRoot":"","sources":["../src/hosted-http-client.test.ts"],"names":[],"mappings":""}
package/dist/ids.d.ts CHANGED
@@ -9,4 +9,6 @@ export declare const PolicyId: Schema.brand<Schema.String, "PolicyId">;
9
9
  export type PolicyId = typeof PolicyId.Type;
10
10
  export declare const ConnectionId: Schema.brand<Schema.String, "ConnectionId">;
11
11
  export type ConnectionId = typeof ConnectionId.Type;
12
+ export declare const CredentialBindingId: Schema.brand<Schema.String, "CredentialBindingId">;
13
+ export type CredentialBindingId = typeof CredentialBindingId.Type;
12
14
  //# sourceMappingURL=ids.d.ts.map
package/dist/ids.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../src/ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,eAAO,MAAM,OAAO,wCAA8C,CAAC;AACnE,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAC;AAE1C,eAAO,MAAM,MAAM,uCAA6C,CAAC;AACjE,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,IAAI,CAAC;AAExC,eAAO,MAAM,QAAQ,yCAA+C,CAAC;AACrE,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC,IAAI,CAAC;AAE5C,eAAO,MAAM,QAAQ,yCAA+C,CAAC;AACrE,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC,IAAI,CAAC;AAE5C,eAAO,MAAM,YAAY,6CAAmD,CAAC;AAC7E,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC,IAAI,CAAC"}
1
+ {"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../src/ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,eAAO,MAAM,OAAO,wCAA8C,CAAC;AACnE,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAC;AAE1C,eAAO,MAAM,MAAM,uCAA6C,CAAC;AACjE,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,IAAI,CAAC;AAExC,eAAO,MAAM,QAAQ,yCAA+C,CAAC;AACrE,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC,IAAI,CAAC;AAE5C,eAAO,MAAM,QAAQ,yCAA+C,CAAC;AACrE,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC,IAAI,CAAC;AAE5C,eAAO,MAAM,YAAY,6CAAmD,CAAC;AAC7E,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC,IAAI,CAAC;AAEpD,eAAO,MAAM,mBAAmB,oDAA0D,CAAC;AAC3F,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC,IAAI,CAAC"}
package/dist/index.d.ts CHANGED
@@ -3,26 +3,31 @@ export { HttpApi, HttpApiBuilder, HttpApiClient, HttpApiEndpoint, HttpApiGroup,
3
3
  export type { DBAdapter, DBSchema, DBFieldAttribute, DBFieldType, StorageFailure, TypedAdapter, Where, WhereOperator, } from "@executor-js/storage-core";
4
4
  export { typedAdapter } from "@executor-js/storage-core";
5
5
  export { StorageError, UniqueViolationError } from "@executor-js/storage-core";
6
- export { ScopeId, ToolId, SecretId, PolicyId, ConnectionId } from "./ids";
6
+ export { ScopeId, ToolId, SecretId, PolicyId, ConnectionId, CredentialBindingId } from "./ids";
7
7
  export { Scope } from "./scope";
8
- export { ToolNotFoundError, ToolInvocationError, ToolBlockedError, NoHandlerError, SourceNotFoundError, SourceRemovalNotAllowedError, PluginNotLoadedError, SecretNotFoundError, SecretResolutionError, SecretOwnedByConnectionError, ConnectionNotFoundError, ConnectionProviderNotRegisteredError, ConnectionRefreshNotSupportedError, ConnectionReauthRequiredError, type ExecutorError, } from "./errors";
9
- export { ToolSchema, SourceDetectionResult, type Source, type Tool, type ToolListFilter, } from "./types";
10
- export { coreSchema, isToolPolicyAction, TOOL_POLICY_ACTIONS, type CoreSchema, type SourceInput, type SourceInputTool, type SourceRow, type ToolRow, type DefinitionRow, type SecretRow, type ConnectionRow, type ToolPolicyRow, type ToolPolicyAction, type DefinitionsInput, type ToolAnnotations, } from "./core-schema";
11
- export { matchPattern, isValidPattern, resolveToolPolicy, resolveEffectivePolicy, effectivePolicyFromSorted, rowToToolPolicy, ToolPolicyActionSchema, type ToolPolicy, type CreateToolPolicyInput, type UpdateToolPolicyInput, type PolicyMatch, type EffectivePolicy, type PolicySource, } from "./policies";
12
- export { SecretRef, SetSecretInput, type SecretProvider } from "./secrets";
8
+ export { ToolNotFoundError, ToolInvocationError, ToolBlockedError, NoHandlerError, SourceNotFoundError, SourceRemovalNotAllowedError, PluginNotLoadedError, SecretNotFoundError, SecretResolutionError, SecretOwnedByConnectionError, SecretInUseError, ConnectionNotFoundError, ConnectionProviderNotRegisteredError, ConnectionRefreshNotSupportedError, ConnectionReauthRequiredError, ConnectionInUseError, type ExecutorError, } from "./errors";
9
+ export { ToolSchema, SourceDetectionResult, type RefreshSourceInput, type RemoveSourceInput, type Source, type Tool, type ToolListFilter, } from "./types";
10
+ export { coreSchema, isToolPolicyAction, TOOL_POLICY_ACTIONS, type CoreSchema, type SourceInput, type SourceInputTool, type SourceRow, type ToolRow, type DefinitionRow, type SecretRow, type ConnectionRow, type CredentialBindingRow, type ToolPolicyRow, type ToolPolicyAction, type DefinitionsInput, type ToolAnnotations, } from "./core-schema";
11
+ export { matchPattern, isValidPattern, resolveToolPolicy, resolveEffectivePolicy, effectivePolicyFromSorted, rowToToolPolicy, ToolPolicyActionSchema, type ToolPolicy, type CreateToolPolicyInput, type UpdateToolPolicyInput, type RemoveToolPolicyInput, type PolicyMatch, type EffectivePolicy, type PolicySource, } from "./policies";
12
+ export { SecretRef, SetSecretInput, RemoveSecretInput, type SecretProvider } from "./secrets";
13
13
  export { SecretBackedMap, SecretBackedValue, isSecretBackedRef, resolveSecretBackedMap, type ResolveSecretBackedMapOptions, } from "./secret-backed-value";
14
- export { ConnectionRef, ConnectionProviderState, CreateConnectionInput, UpdateConnectionTokensInput, TokenMaterial, ConnectionRefreshError, type ConnectionProvider, type ConnectionRefreshInput, type ConnectionRefreshResult, } from "./connections";
14
+ export { CredentialBindingKind, CredentialBindingValue, ConfiguredCredentialBinding, ConfiguredCredentialValue, ConfiguredCredentialValueSchema, ScopedSecretCredentialInput, CredentialBindingRef, SetCredentialBindingInput, CredentialBindingSourceInput, CredentialBindingSlotInput, RemoveCredentialBindingInput, ReplaceCredentialBindingValue, ReplaceCredentialBindingsInput, CredentialBindingResolutionStatus, ResolvedCredentialSlot, credentialBindingId, credentialSlotKey, credentialSlotPart, credentialBindingRowToRef, credentialBindingValueFromRow, type CredentialBindingsFacade, } from "./credential-bindings";
15
+ export { Usage, type UsagesForSecretInput, type UsagesForConnectionInput } from "./usages";
16
+ export { ConnectionRef, ConnectionProviderState, CreateConnectionInput, RemoveConnectionInput, UpdateConnectionTokensInput, TokenMaterial, ConnectionRefreshError, type ConnectionProvider, type ConnectionRefreshInput, type ConnectionRefreshResult, } from "./connections";
15
17
  export { FormElicitation, UrlElicitation, ElicitationAction, ElicitationResponse, ElicitationDeclinedError, type ElicitationRequest, type ElicitationHandler, type ElicitationContext, } from "./elicitation";
16
18
  export { type BlobStore, type PluginBlobStore, pluginBlobStore, makeInMemoryBlobStore, } from "./blob";
17
19
  export { type OAuthService, type OAuthStrategy, type OAuthDynamicDcrStrategy, type OAuthAuthorizationCodeStrategy, type OAuthClientCredentialsStrategy, type OAuthProviderState, type OAuthProbeInput, type OAuthProbeResult, type OAuthStartInput, type OAuthStartResult, type OAuthCompleteInput, type OAuthCompleteResult, OAuthProbeError, OAuthStartError, OAuthCompleteError, OAuthSessionNotFoundError, OAUTH2_PROVIDER_KEY, OAUTH2_SESSION_TTL_MS, OAuthStrategy as OAuthStrategySchema, OAuthProviderState as OAuthProviderStateSchema, OAuthDynamicDcrStrategy as OAuthDynamicDcrStrategySchema, OAuthAuthorizationCodeStrategy as OAuthAuthorizationCodeStrategySchema, OAuthClientCredentialsStrategy as OAuthClientCredentialsStrategySchema, } from "./oauth";
18
- export { OAuth2Error, OAUTH2_DEFAULT_TIMEOUT_MS, OAUTH2_REFRESH_SKEW_MS, buildAuthorizationUrl, createPkceCodeChallenge, createPkceCodeVerifier, exchangeAuthorizationCode, exchangeClientCredentials, refreshAccessToken, shouldRefreshToken, type OAuth2TokenResponse, type BuildAuthorizationUrlInput, type ClientAuthMethod, type ExchangeAuthorizationCodeInput, type ExchangeClientCredentialsInput, type RefreshAccessTokenInput, } from "./oauth-helpers";
20
+ export { OAuth2Error, OAUTH2_DEFAULT_TIMEOUT_MS, OAUTH2_REFRESH_SKEW_MS, assertSupportedOAuthEndpointUrl, buildAuthorizationUrl, createPkceCodeChallenge, createPkceCodeVerifier, exchangeAuthorizationCode, exchangeClientCredentials, isSupportedOAuthEndpointUrl, refreshAccessToken, shouldRefreshToken, type OAuth2TokenResponse, type BuildAuthorizationUrlInput, type ClientAuthMethod, type ExchangeAuthorizationCodeInput, type ExchangeClientCredentialsInput, type RefreshAccessTokenInput, } from "./oauth-helpers";
19
21
  export { makeOAuth2Service, type OAuthServiceDeps } from "./oauth-service";
22
+ export type { ScopedDBAdapter, ScopedTypedAdapter } from "./scoped-adapter";
23
+ export { HostedOutboundRequestBlocked, makeHostedHttpClientLayer, validateHostedOutboundUrl, type HostedHttpClientOptions, } from "./hosted-http-client";
20
24
  export { OAuthDiscoveryError, OAuthAuthorizationServerMetadataSchema, OAuthClientInformationSchema, OAuthProtectedResourceMetadataSchema, beginDynamicAuthorization, discoverAuthorizationServerMetadata, discoverProtectedResourceMetadata, registerDynamicClient, type BeginDynamicAuthorizationInput, type DiscoveryRequestOptions, type DynamicAuthorizationState, type DynamicAuthorizationStartResult, type DynamicClientMetadata, type OAuthAuthorizationServerMetadata, type OAuthClientInformation, type OAuthProtectedResourceMetadata, type RegisterDynamicClientInput, } from "./oauth-discovery";
21
25
  export { OAUTH_POPUP_MESSAGE_TYPE, type OAuthPopupResult, isOAuthPopupResult, } from "./oauth-popup-types";
22
- export { type Plugin, type PluginSpec, type PluginCtx, type PluginExtensions, type ConfiguredPlugin, type AnyPlugin, type StorageDeps, type StaticSourceDecl, type StaticToolDecl, type StaticToolHandlerInput, type InvokeToolInput, type SourceLifecycleInput, type SecretListEntry, type Elicit, definePlugin, defineSchema, } from "./plugin";
26
+ export { type Plugin, type PluginSpec, type PluginCtx, type PluginExtensions, type ConfiguredPlugin, type AnyPlugin, type StorageDeps, type StaticSourceDecl, type StaticToolDecl, type StaticToolExecuteContext, type StaticToolHandlerInput, type StaticToolInput, type InvokeToolInput, type SourceLifecycleInput, type SecretListEntry, type Elicit, definePlugin, defineSchema, tool, } from "./plugin";
23
27
  export { type Executor, type ExecutorConfig, type OnElicitation, type InvokeOptions, createExecutor, collectSchemas, } from "./executor";
24
28
  export { defineExecutorConfig, type ExecutorCliConfig, type ExecutorDialect, type ExecutorPluginsFactory, } from "./config";
25
- export { makeTestConfig } from "./testing";
29
+ export { makeTestConfig } from "./test-config";
26
30
  export { hoistDefinitions, collectRefs, reattachDefs, normalizeRefs } from "./schema-refs";
27
31
  export { schemaToTypeScriptPreview, schemaToTypeScriptPreviewWithDefs, buildToolTypeScriptPreview, type TypeScriptRenderOptions, type TypeScriptSchemaPreview, } from "./schema-types";
32
+ export { InternalError } from "./api-errors";
28
33
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACtE,OAAO,EACL,OAAO,EACP,cAAc,EACd,aAAa,EACb,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,aAAa,GACd,MAAM,yBAAyB,CAAC;AAKjC,YAAY,EACV,SAAS,EACT,QAAQ,EACR,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,YAAY,EACZ,KAAK,EACL,aAAa,GACd,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAIzD,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAG/E,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAG1E,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,4BAA4B,EAC5B,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACrB,4BAA4B,EAC5B,uBAAuB,EACvB,oCAAoC,EACpC,kCAAkC,EAClC,6BAA6B,EAC7B,KAAK,aAAa,GACnB,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,UAAU,EACV,qBAAqB,EACrB,KAAK,MAAM,EACX,KAAK,IAAI,EACT,KAAK,cAAc,GACpB,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,UAAU,EACV,kBAAkB,EAClB,mBAAmB,EACnB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,SAAS,E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AK,0BAA0B,GAChC,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,wBAAwB,EACxB,KAAK,gBAAgB,EACrB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,KAAK,MAAM,EACX,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,MAAM,EACX,YAAY,EACZ,YAAY,EACZ,IAAI,GACL,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,cAAc,EACd,cAAc,GACf,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,oBAAoB,EACpB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,sBAAsB,GAC5B,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAG/C,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAG3F,OAAO,EACL,yBAAyB,EACzB,iCAAiC,EACjC,0BAA0B,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,GAC7B,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC"}
package/dist/index.js CHANGED
@@ -1,3 +1,10 @@
1
+ import {
2
+ SecretBackedMap,
3
+ SecretBackedValue,
4
+ defineExecutorConfig,
5
+ isSecretBackedRef,
6
+ resolveSecretBackedMap
7
+ } from "./chunk-6SQWMOM4.js";
1
8
  import {
2
9
  ElicitationAction,
3
10
  ElicitationResponse,
@@ -5,10 +12,10 @@ import {
5
12
  NoHandlerError,
6
13
  PluginNotLoadedError,
7
14
  PolicyId,
15
+ RemoveConnectionInput,
16
+ RemoveSecretInput,
8
17
  Scope,
9
18
  ScopeId,
10
- SecretBackedMap,
11
- SecretBackedValue,
12
19
  SecretId,
13
20
  SecretNotFoundError,
14
21
  SecretRef,
@@ -24,11 +31,8 @@ import {
24
31
  UrlElicitation,
25
32
  collectSchemas,
26
33
  createExecutor,
27
- defineExecutorConfig,
28
- isSecretBackedRef,
29
- makeInMemoryBlobStore,
30
- resolveSecretBackedMap
31
- } from "./chunk-2WV7VSNL.js";
34
+ makeInMemoryBlobStore
35
+ } from "./chunk-NPWV4R3N.js";
32
36
 
33
37
  // src/promise-executor.ts
34
38
  import { Effect } from "effect";
@@ -37,10 +41,7 @@ var isPlainObject = (v) => v !== null && typeof v === "object" && !Array.isArray
37
41
  var promisifyDeep = (value) => {
38
42
  if (typeof value === "function") {
39
43
  return ((...args) => {
40
- const result = value.apply(
41
- void 0,
42
- args
43
- );
44
+ const result = value.apply(void 0, args);
44
45
  if (Effect.isEffect(result)) {
45
46
  return Effect.runPromise(result);
46
47
  }
@@ -53,10 +54,7 @@ var promisifyDeep = (value) => {
53
54
  const v = Reflect.get(target, prop, receiver);
54
55
  if (typeof v === "function") {
55
56
  return (...args) => {
56
- const result = v.apply(
57
- target,
58
- args
59
- );
57
+ const result = v.apply(target, args);
60
58
  if (Effect.isEffect(result)) {
61
59
  return Effect.runPromise(result);
62
60
  }
@@ -91,9 +89,7 @@ var createExecutor2 = async (config) => {
91
89
  plugins,
92
90
  onElicitation: config.onElicitation
93
91
  };
94
- const effectExecutor = await Effect.runPromise(
95
- createExecutor(effectConfig)
96
- );
92
+ const effectExecutor = await Effect.runPromise(createExecutor(effectConfig));
97
93
  return promisifyDeep(effectExecutor);
98
94
  };
99
95
  export {
@@ -103,6 +99,8 @@ export {
103
99
  NoHandlerError,
104
100
  PluginNotLoadedError,
105
101
  PolicyId,
102
+ RemoveConnectionInput,
103
+ RemoveSecretInput,
106
104
  Scope,
107
105
  ScopeId,
108
106
  SecretBackedMap,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/promise-executor.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// @executor-js/sdk/promise — thin Promise façade over the Effect SDK.\n//\n// Consumer goal: use executors + plugins without touching Effect. The\n// façade wraps `createExecutor` so it returns a Promise, and proxies\n// every method on the returned executor to unwrap its Effect into a\n// Promise. Plugin factories are Effect-native but consumers never see\n// that — the proxy flattens plugin extension methods too.\n//\n// Not a goal: authoring plugins in Promise style. The plugin model\n// (storage, schema, staticSources, Effect ctx) is Effect-only. Bring\n// your own `@executor-js/plugin-*` from the Effect side.\n// ---------------------------------------------------------------------------\n\nimport { Brand, Effect } from \"effect\";\n\nimport { makeMemoryAdapter } from \"@executor-js/storage-core/testing/memory\";\n\nimport { makeInMemoryBlobStore } from \"./blob\";\nimport {\n createExecutor as createEffectExecutor,\n collectSchemas,\n type Executor as EffectExecutor,\n type OnElicitation,\n} from \"./executor\";\nimport { ScopeId } from \"./ids\";\nimport type { AnyPlugin } from \"./plugin\";\nimport { Scope } from \"./scope\";\n\n// ---------------------------------------------------------------------------\n// Types\n//\n// Promise consumers shouldn't need to construct Effect `Brand`s to call into\n// the executor — branded ids (`SecretId`, `ScopeId`, `ToolId`, `PolicyId`,\n// `ConnectionId`) are typed as `string & Brand<...>` on the Effect side, but\n// at runtime they're plain strings. `Unbrand` strips brand tags from\n// parameter types (recursively, so it walks into object fields like\n// `secrets.set({ id, scope })`) so consumers can pass plain strings. Return\n// types are passed through unchanged — caller code that reads `.id` etc.\n// off a returned ref still gets the branded type for use as an opaque token.\n// ---------------------------------------------------------------------------\n\ntype Unbrand<T> = T extends Brand.Brand<string>\n ? string\n : T extends readonly (infer U)[]\n ? readonly Unbrand<U>[]\n : T extends ReadonlyMap<infer K, infer V>\n ? ReadonlyMap<Unbrand<K>, Unbrand<V>>\n : T extends ReadonlySet<infer U>\n ? ReadonlySet<Unbrand<U>>\n : T extends Date\n ? T\n : T extends (...args: infer A) => infer R\n ? (...args: { [I in keyof A]: Unbrand<A[I]> }) => Unbrand<R>\n : T extends object\n ? { readonly [K in keyof T]: Unbrand<T[K]> }\n : T;\n\nexport type Promisified<T> = T extends (\n ...args: infer A\n) => Effect.Effect<infer R, infer _E>\n ? (...args: { [I in keyof A]: Unbrand<A[I]> }) => Promise<R>\n : T extends readonly unknown[]\n ? T\n : T extends object\n ? { readonly [K in keyof T]: Promisified<T[K]> }\n : T;\n\nexport type Executor<TPlugins extends readonly AnyPlugin[] = []> = Promisified<\n EffectExecutor<TPlugins>\n>;\n\nexport interface ExecutorConfig<TPlugins extends readonly AnyPlugin[] = []> {\n /**\n * Precedence-ordered scope stack (innermost first). Optional — defaults\n * to a single-element stack with id \"default-scope\". Pass an array of\n * `{ id, name }` partials to build a multi-scope executor.\n */\n readonly scopes?: readonly { readonly id?: string; readonly name?: string }[];\n readonly plugins?: TPlugins;\n /**\n * How to respond when a tool requests user input mid-invocation. Pass\n * `\"accept-all\"` for tests / non-interactive hosts, or a handler\n * `(ctx) => Promise<ElicitationResponse>` for interactive ones.\n * Required at construction so per-invoke calls don't have to thread\n * an options arg.\n */\n readonly onElicitation: OnElicitation;\n}\n\n// ---------------------------------------------------------------------------\n// Promisify proxy — walks nested objects, converts Effect-returning methods\n// into Promise-returning methods. Non-Effect return values pass through.\n// ---------------------------------------------------------------------------\n\nconst isPlainObject = (v: unknown): v is Record<string | symbol, unknown> =>\n v !== null &&\n typeof v === \"object\" &&\n !Array.isArray(v) &&\n !(v instanceof Date) &&\n !(v instanceof Promise);\n\nconst promisifyDeep = <T>(value: T): Promisified<T> => {\n if (typeof value === \"function\") {\n return ((...args: unknown[]) => {\n const result = (value as (...a: unknown[]) => unknown).apply(\n undefined,\n args,\n );\n if (Effect.isEffect(result)) {\n return Effect.runPromise(result as Effect.Effect<unknown, unknown>);\n }\n return result;\n }) as Promisified<T>;\n }\n\n if (!isPlainObject(value)) return value as Promisified<T>;\n\n return new Proxy(value, {\n get(target, prop, receiver) {\n const v = Reflect.get(target, prop, receiver);\n if (typeof v === \"function\") {\n return (...args: unknown[]) => {\n const result = (v as (...a: unknown[]) => unknown).apply(\n target,\n args,\n );\n if (Effect.isEffect(result)) {\n return Effect.runPromise(result as Effect.Effect<unknown, unknown>);\n }\n return result;\n };\n }\n if (isPlainObject(v)) return promisifyDeep(v);\n return v;\n },\n }) as Promisified<T>;\n};\n\n// ---------------------------------------------------------------------------\n// createExecutor — Promise wrapper over the Effect createExecutor.\n// Defaults to an in-memory adapter + blob store, so a consumer can\n// construct an executor with just `{ plugins: [...] }`.\n// ---------------------------------------------------------------------------\n\nexport const createExecutor = async <\n const TPlugins extends readonly AnyPlugin[] = [],\n>(\n config: ExecutorConfig<TPlugins>,\n): Promise<Executor<TPlugins>> => {\n const plugins = (config?.plugins ?? []) as TPlugins;\n const schema = collectSchemas(plugins);\n\n const scopes =\n config.scopes && config.scopes.length > 0\n ? config.scopes.map(\n (s, i) =>\n new Scope({\n id: ScopeId.make(s.id ?? (i === 0 ? \"default-scope\" : `scope-${i}`)),\n name: s.name ?? (i === 0 ? \"default\" : `scope-${i}`),\n createdAt: new Date(),\n }),\n )\n : [\n new Scope({\n id: ScopeId.make(\"default-scope\"),\n name: \"default\",\n createdAt: new Date(),\n }),\n ];\n\n const effectConfig = {\n scopes,\n adapter: makeMemoryAdapter({ schema }),\n blobs: makeInMemoryBlobStore(),\n plugins,\n onElicitation: config.onElicitation,\n };\n\n // The SDK has no observability requirement; storage failures surface\n // as raw `StorageError` / `UniqueViolationError` in the typed channel.\n // `Effect.runPromise` turns them into Promise rejections — consumers\n // get the tagged error as the rejected value. See\n // notes/promise-sdk-typed-errors.md for the planned `runPromiseExit`\n // rewrite that exposes the full error union to consumers.\n const effectExecutor = await Effect.runPromise(\n createEffectExecutor(effectConfig),\n );\n\n return promisifyDeep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K,EAAE,OAAO,MAAM,IAAI,kBAAkB,SAAS,CAAC,GAAG;AAAA,MACnE,MAAM,EAAE,SAAS,MAAM,IAAI,YAAY,SAAS,CAAC;AAAA,MACjD,WAAW,oBAAI,KAAK;AAAA,IACtB,CAAC;AAAA,EACL,IACA;AAAA,IACE,IAAI,MAAM;AAAA,MACR,IAAI,QAAQ,KAAK,eAAe;AAAA,MAChC,MAAM;AAAA,MACN,WAAW,oBAAI,KAAK;AAAA,IACtB,CAAC;AAAA,EACH;AAEN,QAAM,eAAe;AAAA,IACnB;AAAA,IACA,SAAS,kBAAkB,EAAE,OAAO,CAAC;AAAA,IACrC,OAAO,sBAAsB;AAAA,IAC7B;AAAA,IACA,eAAe,OAAO;AAAA,EACxB;AAQA,QAAM,iBAAiB,MAAM,OAAO;AAAA,IAClC,eAAqB,YAAY;AAAA,EACnC;AAEA,SAAO,cAAc,cAAc;AACrC;","names":["createExecutor"]}
1
+ {"version":3,"sources":["../src/promise-executor.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// @executor-js/sdk/promise — thin Promise façade over the Effect SDK.\n//\n// Consumer goal: use executors + plugins without touching Effect. The\n// façade wraps `createExecutor` so it returns a Promise, and proxies\n// every method on the returned executor to unwrap its Effect into a\n// Promise. Plugin factories are Effect-native but consumers never see\n// that — the proxy flattens plugin extension methods too.\n//\n// Not a goal: authoring plugins in Promise style. The plugin model\n// (storage, schema, staticSources, Effect ctx) is Effect-only. Bring\n// your own `@executor-js/plugin-*` from the Effect side.\n// ---------------------------------------------------------------------------\n\nimport { Brand, Effect } from \"effect\";\n\nimport { makeMemoryAdapter } from \"@executor-js/storage-core/testing/memory\";\n\nimport { makeInMemoryBlobStore } from \"./blob\";\nimport {\n createExecutor as createEffectExecutor,\n collectSchemas,\n type Executor as EffectExecutor,\n type OnElicitation,\n} from \"./executor\";\nimport { ScopeId } from \"./ids\";\nimport type { AnyPlugin } from \"./plugin\";\nimport { Scope } from \"./scope\";\n\n// ---------------------------------------------------------------------------\n// Types\n//\n// Promise consumers shouldn't need to construct Effect `Brand`s to call into\n// the executor — branded ids (`SecretId`, `ScopeId`, `ToolId`, `PolicyId`,\n// `ConnectionId`) are typed as `string & Brand<...>` on the Effect side, but\n// at runtime they're plain strings. `Unbrand` strips brand tags from\n// parameter types (recursively, so it walks into object fields like\n// `secrets.set({ id, scope })`) so consumers can pass plain strings. Return\n// types are passed through unchanged — caller code that reads `.id` etc.\n// off a returned ref still gets the branded type for use as an opaque token.\n// ---------------------------------------------------------------------------\n\ntype Unbrand<T> =\n T extends Brand.Brand<string>\n ? string\n : T extends readonly (infer U)[]\n ? readonly Unbrand<U>[]\n : T extends ReadonlyMap<infer K, infer V>\n ? ReadonlyMap<Unbrand<K>, Unbrand<V>>\n : T extends ReadonlySet<infer U>\n ? ReadonlySet<Unbrand<U>>\n : T extends Date\n ? T\n : T extends (...args: infer A) => infer R\n ? (...args: { [I in keyof A]: Unbrand<A[I]> }) => Unbrand<R>\n : T extends object\n ? { readonly [K in keyof T]: Unbrand<T[K]> }\n : T;\n\nexport type Promisified<T> = T extends (...args: infer A) => Effect.Effect<infer R, infer _E>\n ? (...args: { [I in keyof A]: Unbrand<A[I]> }) => Promise<R>\n : T extends readonly unknown[]\n ? T\n : T extends object\n ? { readonly [K in keyof T]: Promisified<T[K]> }\n : T;\n\nexport type Executor<TPlugins extends readonly AnyPlugin[] = []> = Promisified<\n EffectExecutor<TPlugins>\n>;\n\nexport interface ExecutorConfig<TPlugins extends readonly AnyPlugin[] = []> {\n /**\n * Precedence-ordered scope stack (innermost first). Optional — defaults\n * to a single-element stack with id \"default-scope\". Pass an array of\n * `{ id, name }` partials to build a multi-scope executor.\n */\n readonly scopes?: readonly { readonly id?: string; readonly name?: string }[];\n readonly plugins?: TPlugins;\n /**\n * How to respond when a tool requests user input mid-invocation. Pass\n * `\"accept-all\"` for tests / non-interactive hosts, or a handler\n * `(ctx) => Promise<ElicitationResponse>` for interactive ones.\n * Required at construction so per-invoke calls don't have to thread\n * an options arg.\n */\n readonly onElicitation: OnElicitation;\n}\n\n// ---------------------------------------------------------------------------\n// Promisify proxy — walks nested objects, converts Effect-returning methods\n// into Promise-returning methods. Non-Effect return values pass through.\n// ---------------------------------------------------------------------------\n\nconst isPlainObject = (v: unknown): v is Record<string | symbol, unknown> =>\n v !== null &&\n typeof v === \"object\" &&\n !Array.isArray(v) &&\n !(v instanceof Date) &&\n !(v instanceof Promise);\n\nconst promisifyDeep = <T>(value: T): Promisified<T> => {\n if (typeof value === \"function\") {\n return ((...args: unknown[]) => {\n const result = (value as (...a: unknown[]) => unknown).apply(undefined, args);\n if (Effect.isEffect(result)) {\n return Effect.runPromise(result as Effect.Effect<unknown, unknown>);\n }\n return result;\n }) as Promisified<T>;\n }\n\n if (!isPlainObject(value)) return value as Promisified<T>;\n\n return new Proxy(value, {\n get(target, prop, receiver) {\n const v = Reflect.get(target, prop, receiver);\n if (typeof v === \"function\") {\n return (...args: unknown[]) => {\n const result = (v as (...a: unknown[]) => unknown).apply(target, args);\n if (Effect.isEffect(result)) {\n return Effect.runPromise(result as Effect.Effect<unknown, unknown>);\n }\n return result;\n };\n }\n if (isPlainObject(v)) return promisifyDeep(v);\n return v;\n },\n }) as Promisified<T>;\n};\n\n// ---------------------------------------------------------------------------\n// createExecutor — Promise wrapper over the Effect createExecutor.\n// Defaults to an in-memory adapter + blob store, so a consumer can\n// construct an executor with just `{ plugins: [...] }`.\n// ---------------------------------------------------------------------------\n\nexport const createExecutor = async <const TPlugins extends readonly AnyPlugin[] = []>(\n config: ExecutorConfig<TPlugins>,\n): Promise<Executor<TPlugins>> => {\n const plugins = (config?.plugins ?? []) as TPlugins;\n const schema = collectSchemas(plugins);\n\n const scopes =\n config.scopes && config.scopes.length > 0\n ? config.scopes.map(\n (s, i) =>\n new Scope({\n id: ScopeId.make(s.id ?? (i === 0 ? \"default-scope\" : `scope-${i}`)),\n name: s.name ?? (i === 0 ? \"default\" : `scope-${i}`),\n createdAt: new Date(),\n }),\n )\n : [\n new Scope({\n id: ScopeId.make(\"default-scope\"),\n name: \"default\",\n createdAt: new Date(),\n }),\n ];\n\n const effectConfig = {\n scopes,\n adapter: makeMemoryAdapter({ schema }),\n blobs: makeInMemoryBlobStore(),\n plugins,\n onElicitation: config.onElicitation,\n };\n\n // The SDK has no observability requirement; storage failures surface\n // as raw `StorageError` / `UniqueViolationError` in the typed channel.\n // `Effect.runPromise` turns them into Promise rejections — consumers\n // get the tagged error as the rejected value. See\n // notes/promise-sdk-typed-errors.md for the planned `runPromiseExit`\n // rewrite that exposes the full error union to consumers.\n const effectExecutor = await Effect.runPromise(createEffectExecutor(effectConfig));\n\n return promisifyDeep(effectExecutor) as Executor<TPlugins>;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,SAAgB,cAAc;AAE9B,SAAS,yBAAyB;AA8ElC,IAAM,gBAAgB,CAAC,MACrB,MAAM,QACN,OAAO,MAAM,YACb,CAAC,MAAM,QAAQ,CAAC,KAChB,EAAE,aAAa,SACf,EAAE,aAAa;AAEjB,IAAM,gBAAgB,CAAI,UAA6B;AACrD,MAAI,OAAO,UAAU,YAAY;AAC/B,YAAQ,IAAI,SAAoB;AAC9B,YAAM,SAAU,MAAuC,MAAM,QAAW,IAAI;AAC5E,UAAI,OAAO,SAAS,MAAM,GAAG;AAC3B,eAAO,OAAO,WAAW,MAAyC;AAAA,MACpE;AACA,aAAO;AAAA,IACT;AAAA,EACF;AAEA,MAAI,CAAC,cAAc,KAAK,EAAG,QAAO;AAElC,SAAO,IAAI,MAAM,OAAO;AAAA,IACtB,IAAI,QAAQ,MAAM,UAAU;AAC1B,YAAM,IAAI,QAAQ,IAAI,QAAQ,MAAM,QAAQ;AAC5C,UAAI,OAAO,MAAM,YAAY;AAC3B,eAAO,IAAI,SAAoB;AAC7B,gBAAM,SAAU,EAAmC,MAAM,QAAQ,IAAI;AACrE,cAAI,OAAO,SAAS,MAAM,GAAG;AAC3B,mBAAO,OAAO,WAAW,MAAyC;AAAA,UACpE;AACA,iBAAO;AAAA,QACT;AAAA,MACF;AACA,UAAI,cAAc,CAAC,EAAG,QAAO,cAAc,CAAC;AAC5C,aAAO;AAAA,IACT;AAAA,EACF,CAAC;AACH;AAQO,IAAMA,kBAAiB,OAC5B,WACgC;AAChC,QAAM,UAAW,QAAQ,WAAW,CAAC;AACrC,QAAM,SAAS,eAAe,OAAO;AAErC,QAAM,SACJ,OAAO,UAAU,OAAO,OAAO,SAAS,IACpC,OAAO,OAAO;AAAA,IACZ,CAAC,GAAG,MACF,IAAI,MAAM;AAAA,MACR,IAAI,QAAQ,KAAK,EAAE,OAAO,MAAM,IAAI,kBAAkB,SAAS,CAAC,GAAG;AAAA,MACnE,MAAM,EAAE,SAAS,MAAM,IAAI,YAAY,SAAS,CAAC;AAAA,MACjD,WAAW,oBAAI,KAAK;AAAA,IACtB,CAAC;AAAA,EACL,IACA;AAAA,IACE,IAAI,MAAM;AAAA,MACR,IAAI,QAAQ,KAAK,eAAe;AAAA,MAChC,MAAM;AAAA,MACN,WAAW,oBAAI,KAAK;AAAA,IACtB,CAAC;AAAA,EACH;AAEN,QAAM,eAAe;AAAA,IACnB;AAAA,IACA,SAAS,kBAAkB,EAAE,OAAO,CAAC;AAAA,IACrC,OAAO,sBAAsB;AAAA,IAC7B;AAAA,IACA,eAAe,OAAO;AAAA,EACxB;AAQA,QAAM,iBAAiB,MAAM,OAAO,WAAW,eAAqB,YAAY,CAAC;AAEjF,SAAO,cAAc,cAAc;AACrC;","names":["createExecutor"]}
@@ -1,5 +1,6 @@
1
- import { Effect, Schema } from "effect";
2
- import { createPkceCodeChallenge } from "./oauth-helpers";
1
+ import { Effect, Layer, Schema } from "effect";
2
+ import { HttpClient } from "effect/unstable/http";
3
+ import { createPkceCodeChallenge, type OAuthEndpointUrlPolicy } from "./oauth-helpers";
3
4
  declare const OAuthDiscoveryError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
4
5
  readonly _tag: "OAuthDiscoveryError";
5
6
  } & Readonly<A>;
@@ -11,6 +12,12 @@ declare const OAuthDiscoveryError_base: new <A extends Record<string, any> = {}>
11
12
  export declare class OAuthDiscoveryError extends OAuthDiscoveryError_base<{
12
13
  readonly message: string;
13
14
  readonly status?: number;
15
+ /** RFC 6749 §5.2 / RFC 7591 §3.2.2 error code, when the AS returned
16
+ * one (`invalid_client_metadata`, `invalid_redirect_uri`, ...). Lets
17
+ * the HTTP edge surface a structured error to the UI rather than
18
+ * swallow the AS's response into a generic message string. */
19
+ readonly error?: string;
20
+ readonly errorDescription?: string;
14
21
  readonly cause?: unknown;
15
22
  }> {
16
23
  }
@@ -70,8 +77,8 @@ export declare const OAuthClientInformationSchema: Schema.Struct<{
70
77
  }>;
71
78
  export type OAuthClientInformation = typeof OAuthClientInformationSchema.Type;
72
79
  export interface DiscoveryRequestOptions {
73
- /** Injected for tests. Defaults to the global `fetch`. */
74
- readonly fetch?: typeof fetch;
80
+ /** Injected for tests. Defaults to the platform fetch-backed HttpClient. */
81
+ readonly httpClientLayer?: Layer.Layer<HttpClient.HttpClient>;
75
82
  /** Abort the request after this many ms. Default 20000. */
76
83
  readonly timeoutMs?: number;
77
84
  /** Send `MCP-Protocol-Version: <value>` on every request. Harmless
@@ -82,6 +89,7 @@ export interface DiscoveryRequestOptions {
82
89
  * authorization-server metadata, DCR, authorization, or token calls. */
83
90
  readonly resourceHeaders?: Readonly<Record<string, string>>;
84
91
  readonly resourceQueryParams?: Readonly<Record<string, string>>;
92
+ readonly endpointUrlPolicy?: OAuthEndpointUrlPolicy;
85
93
  }
86
94
  export declare const discoverProtectedResourceMetadata: (resourceUrl: string, options?: DiscoveryRequestOptions) => Effect.Effect<{
87
95
  readonly metadataUrl: string;
@@ -97,6 +105,7 @@ export interface RegisterDynamicClientInput {
97
105
  readonly initialAccessToken?: string | null;
98
106
  }
99
107
  export declare const registerDynamicClient: (input: RegisterDynamicClientInput, options?: DiscoveryRequestOptions) => Effect.Effect<OAuthClientInformation, OAuthDiscoveryError>;
108
+ export declare const canonicalResourceUrl: (value: string) => string;
100
109
  export interface DynamicAuthorizationState {
101
110
  readonly resourceMetadata: OAuthProtectedResourceMetadata | null;
102
111
  readonly resourceMetadataUrl: string | null;
@@ -104,6 +113,12 @@ export interface DynamicAuthorizationState {
104
113
  readonly authorizationServerMetadataUrl: string;
105
114
  readonly authorizationServerMetadata: OAuthAuthorizationServerMetadata;
106
115
  readonly clientInformation: OAuthClientInformation;
116
+ /** RFC 8707 canonical resource URL passed on /authorize and persisted
117
+ * for the matching /token + refresh calls. */
118
+ readonly resource: string;
119
+ /** Scopes ultimately requested at /authorize. Persisted so refresh
120
+ * can replay the same set. */
121
+ readonly scopes: readonly string[];
107
122
  }
108
123
  export interface DynamicAuthorizationStartResult {
109
124
  readonly authorizationUrl: string;
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-discovery.d.ts","sourceRoot":"","sources":["../src/oauth-discovery.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAQ,MAAM,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGtD,OAAO,EAGL,uBAAuB,EAExB,MAAM,iBAAiB,CAAC;;;;AAMzB;;;;wDAIwD;AACxD,qBAAa,mBAAoB,SAAQ,yBAEvC;IACA,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;CAAG;AAmBL,eAAO,MAAM,oCAAoC;;;;;;EAMY,CAAC;AAC9D,MAAM,MAAM,8BAA8B,GACxC,OAAO,oCAAoC,CAAC,IAAI,CAAC;AAEnD,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;EAcY,CAAC;AAChE,MAAM,MAAM,gCAAgC,GAC1C,OAAO,sCAAsC,CAAC,IAAI,C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