@executor-js/sdk 0.0.1 → 0.1.0

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 (102) hide show
  1. package/README.md +125 -107
  2. package/dist/blob.d.ts +48 -0
  3. package/dist/blob.d.ts.map +1 -0
  4. package/dist/blob.test.d.ts +2 -0
  5. package/dist/blob.test.d.ts.map +1 -0
  6. package/dist/chunk-2WV7VSNL.js +4440 -0
  7. package/dist/chunk-2WV7VSNL.js.map +1 -0
  8. package/dist/client.d.ts +135 -0
  9. package/dist/client.d.ts.map +1 -0
  10. package/dist/client.js +87 -0
  11. package/dist/client.js.map +1 -0
  12. package/dist/client.test.d.ts +2 -0
  13. package/dist/client.test.d.ts.map +1 -0
  14. package/dist/config.d.ts +24 -0
  15. package/dist/config.d.ts.map +1 -0
  16. package/dist/connections.d.ts +107 -0
  17. package/dist/connections.d.ts.map +1 -0
  18. package/dist/connections.test.d.ts +2 -0
  19. package/dist/connections.test.d.ts.map +1 -0
  20. package/dist/core-schema.d.ts +372 -0
  21. package/dist/core-schema.d.ts.map +1 -0
  22. package/dist/core.js +296 -57
  23. package/dist/core.js.map +1 -1
  24. package/dist/elicitation.d.ts +18 -34
  25. package/dist/elicitation.d.ts.map +1 -1
  26. package/dist/error-handling.test.d.ts +2 -0
  27. package/dist/error-handling.test.d.ts.map +1 -0
  28. package/dist/errors.d.ts +95 -24
  29. package/dist/errors.d.ts.map +1 -1
  30. package/dist/executor.d.ts +107 -48
  31. package/dist/executor.d.ts.map +1 -1
  32. package/dist/executor.test.d.ts +2 -0
  33. package/dist/executor.test.d.ts.map +1 -0
  34. package/dist/ids.d.ts +6 -4
  35. package/dist/ids.d.ts.map +1 -1
  36. package/dist/index.d.ts +24 -16
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +80 -308
  39. package/dist/index.js.map +1 -1
  40. package/dist/oauth-discovery.d.ts +138 -0
  41. package/dist/oauth-discovery.d.ts.map +1 -0
  42. package/dist/oauth-discovery.test.d.ts +2 -0
  43. package/dist/oauth-discovery.test.d.ts.map +1 -0
  44. package/dist/oauth-helpers.d.ts +89 -0
  45. package/dist/oauth-helpers.d.ts.map +1 -0
  46. package/dist/oauth-helpers.test.d.ts +2 -0
  47. package/dist/oauth-helpers.test.d.ts.map +1 -0
  48. package/dist/oauth-popup-types.d.ts +14 -0
  49. package/dist/oauth-popup-types.d.ts.map +1 -0
  50. package/dist/oauth-service.d.ts +33 -0
  51. package/dist/oauth-service.d.ts.map +1 -0
  52. package/dist/oauth.d.ts +275 -0
  53. package/dist/oauth.d.ts.map +1 -0
  54. package/dist/plugin.d.ts +318 -28
  55. package/dist/plugin.d.ts.map +1 -1
  56. package/dist/policies.d.ts +56 -64
  57. package/dist/policies.d.ts.map +1 -1
  58. package/dist/policies.test.d.ts +2 -0
  59. package/dist/policies.test.d.ts.map +1 -0
  60. package/dist/promise-executor.d.ts +26 -128
  61. package/dist/promise-executor.d.ts.map +1 -1
  62. package/dist/promise.d.ts +12 -6
  63. package/dist/promise.d.ts.map +1 -1
  64. package/dist/promise.test.d.ts +2 -0
  65. package/dist/promise.test.d.ts.map +1 -0
  66. package/dist/schema-types.d.ts +6 -5
  67. package/dist/schema-types.d.ts.map +1 -1
  68. package/dist/scope.d.ts +5 -15
  69. package/dist/scope.d.ts.map +1 -1
  70. package/dist/scoped-adapter.d.ts +13 -0
  71. package/dist/scoped-adapter.d.ts.map +1 -0
  72. package/dist/scoped-adapter.test.d.ts +2 -0
  73. package/dist/scoped-adapter.test.d.ts.map +1 -0
  74. package/dist/secret-backed-value.d.ts +27 -0
  75. package/dist/secret-backed-value.d.ts.map +1 -0
  76. package/dist/secrets.d.ts +52 -106
  77. package/dist/secrets.d.ts.map +1 -1
  78. package/dist/testing.d.ts +5 -3
  79. package/dist/testing.d.ts.map +1 -1
  80. package/dist/types.d.ts +84 -0
  81. package/dist/types.d.ts.map +1 -0
  82. package/package.json +28 -4
  83. package/dist/chunk-D7CT3UMO.js +0 -1386
  84. package/dist/chunk-D7CT3UMO.js.map +0 -1
  85. package/dist/in-memory/policy-engine.d.ts +0 -10
  86. package/dist/in-memory/policy-engine.d.ts.map +0 -1
  87. package/dist/in-memory/secret-store.d.ts +0 -16
  88. package/dist/in-memory/secret-store.d.ts.map +0 -1
  89. package/dist/in-memory/tool-registry.d.ts +0 -35
  90. package/dist/in-memory/tool-registry.d.ts.map +0 -1
  91. package/dist/index.test.d.ts +0 -2
  92. package/dist/index.test.d.ts.map +0 -1
  93. package/dist/plugin-kv.d.ts +0 -48
  94. package/dist/plugin-kv.d.ts.map +0 -1
  95. package/dist/plugins/in-memory-tools.d.ts +0 -42
  96. package/dist/plugins/in-memory-tools.d.ts.map +0 -1
  97. package/dist/runtime-tools.d.ts +0 -41
  98. package/dist/runtime-tools.d.ts.map +0 -1
  99. package/dist/sources.d.ts +0 -130
  100. package/dist/sources.d.ts.map +0 -1
  101. package/dist/tools.d.ts +0 -219
  102. package/dist/tools.d.ts.map +0 -1
package/dist/errors.d.ts CHANGED
@@ -1,10 +1,8 @@
1
1
  import { Schema } from "effect";
2
2
  import { ToolId } from "./ids";
3
- declare const ToolNotFoundError_base: Schema.TaggedErrorClass<ToolNotFoundError, "ToolNotFoundError", {
4
- readonly _tag: Schema.tag<"ToolNotFoundError">;
5
- } & {
6
- toolId: Schema.brand<typeof Schema.String, "ToolId">;
7
- }>;
3
+ declare const ToolNotFoundError_base: Schema.Class<ToolNotFoundError, Schema.TaggedStruct<"ToolNotFoundError", {
4
+ readonly toolId: Schema.brand<Schema.String, "ToolId">;
5
+ }>, import("effect/Cause").YieldableError>;
8
6
  export declare class ToolNotFoundError extends ToolNotFoundError_base {
9
7
  }
10
8
  declare const ToolInvocationError_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 & {
@@ -16,29 +14,102 @@ export declare class ToolInvocationError extends ToolInvocationError_base<{
16
14
  readonly cause?: unknown;
17
15
  }> {
18
16
  }
19
- declare const SecretNotFoundError_base: Schema.TaggedErrorClass<SecretNotFoundError, "SecretNotFoundError", {
20
- readonly _tag: Schema.tag<"SecretNotFoundError">;
21
- } & {
22
- secretId: Schema.brand<typeof Schema.String, "SecretId">;
23
- }>;
17
+ declare const PluginNotLoadedError_base: Schema.Class<PluginNotLoadedError, Schema.TaggedStruct<"PluginNotLoadedError", {
18
+ readonly pluginId: Schema.String;
19
+ readonly toolId: Schema.brand<Schema.String, "ToolId">;
20
+ }>, import("effect/Cause").YieldableError>;
21
+ /** Tool row exists in the DB but its owning plugin isn't loaded. Means
22
+ * the tool was registered by a plugin that's no longer present in the
23
+ * current executor config — usually a stale row from an older session. */
24
+ export declare class PluginNotLoadedError extends PluginNotLoadedError_base {
25
+ }
26
+ declare const NoHandlerError_base: Schema.Class<NoHandlerError, Schema.TaggedStruct<"NoHandlerError", {
27
+ readonly toolId: Schema.brand<Schema.String, "ToolId">;
28
+ readonly pluginId: Schema.String;
29
+ }>, import("effect/Cause").YieldableError>;
30
+ /** Tool was found but its owning plugin has no `invokeTool` handler —
31
+ * the plugin only declares static tools and this one's id matched
32
+ * dynamically somehow. Shouldn't happen in practice; guards against
33
+ * programmer error. */
34
+ export declare class NoHandlerError extends NoHandlerError_base {
35
+ }
36
+ declare const ToolBlockedError_base: Schema.Class<ToolBlockedError, Schema.TaggedStruct<"ToolBlockedError", {
37
+ readonly toolId: Schema.brand<Schema.String, "ToolId">;
38
+ readonly pattern: Schema.String;
39
+ }>, import("effect/Cause").YieldableError>;
40
+ /** Tool invocation was rejected because a workspace `tool_policy` rule
41
+ * with `action: "block"` matched. `pattern` is the matched policy
42
+ * pattern so callers / agents can render a useful "this is blocked
43
+ * by your `vercel.dns.*` rule" message. */
44
+ export declare class ToolBlockedError extends ToolBlockedError_base {
45
+ }
46
+ declare const SourceNotFoundError_base: Schema.Class<SourceNotFoundError, Schema.TaggedStruct<"SourceNotFoundError", {
47
+ readonly sourceId: Schema.String;
48
+ }>, import("effect/Cause").YieldableError>;
49
+ export declare class SourceNotFoundError extends SourceNotFoundError_base {
50
+ }
51
+ declare const SourceRemovalNotAllowedError_base: Schema.Class<SourceRemovalNotAllowedError, Schema.TaggedStruct<"SourceRemovalNotAllowedError", {
52
+ readonly sourceId: Schema.String;
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. */
57
+ export declare class SourceRemovalNotAllowedError extends SourceRemovalNotAllowedError_base {
58
+ }
59
+ declare const SecretNotFoundError_base: Schema.Class<SecretNotFoundError, Schema.TaggedStruct<"SecretNotFoundError", {
60
+ readonly secretId: Schema.brand<Schema.String, "SecretId">;
61
+ }>, import("effect/Cause").YieldableError>;
24
62
  export declare class SecretNotFoundError extends SecretNotFoundError_base {
25
63
  }
26
- declare const SecretResolutionError_base: Schema.TaggedErrorClass<SecretResolutionError, "SecretResolutionError", {
27
- readonly _tag: Schema.tag<"SecretResolutionError">;
28
- } & {
29
- secretId: Schema.brand<typeof Schema.String, "SecretId">;
30
- message: typeof Schema.String;
31
- }>;
64
+ declare const SecretResolutionError_base: Schema.Class<SecretResolutionError, Schema.TaggedStruct<"SecretResolutionError", {
65
+ readonly secretId: Schema.brand<Schema.String, "SecretId">;
66
+ readonly message: Schema.String;
67
+ }>, import("effect/Cause").YieldableError>;
32
68
  export declare class SecretResolutionError extends SecretResolutionError_base {
33
69
  }
34
- declare const PolicyDeniedError_base: Schema.TaggedErrorClass<PolicyDeniedError, "PolicyDeniedError", {
35
- readonly _tag: Schema.tag<"PolicyDeniedError">;
36
- } & {
37
- policyId: Schema.brand<typeof Schema.String, "PolicyId">;
38
- toolId: Schema.brand<typeof Schema.String, "ToolId">;
39
- reason: typeof Schema.String;
40
- }>;
41
- export declare class PolicyDeniedError extends PolicyDeniedError_base {
70
+ declare const SecretOwnedByConnectionError_base: Schema.Class<SecretOwnedByConnectionError, Schema.TaggedStruct<"SecretOwnedByConnectionError", {
71
+ readonly secretId: Schema.brand<Schema.String, "SecretId">;
72
+ readonly connectionId: Schema.brand<Schema.String, "ConnectionId">;
73
+ }>, import("effect/Cause").YieldableError>;
74
+ /** Raised when `secrets.remove(id)` is called on a secret whose row has
75
+ * `owned_by_connection_id` set. The connection owns the lifecycle —
76
+ * callers must go through `connections.remove(connectionId)` to
77
+ * delete it along with its siblings. */
78
+ export declare class SecretOwnedByConnectionError extends SecretOwnedByConnectionError_base {
79
+ }
80
+ declare const ConnectionNotFoundError_base: Schema.Class<ConnectionNotFoundError, Schema.TaggedStruct<"ConnectionNotFoundError", {
81
+ readonly connectionId: Schema.brand<Schema.String, "ConnectionId">;
82
+ }>, import("effect/Cause").YieldableError>;
83
+ export declare class ConnectionNotFoundError extends ConnectionNotFoundError_base {
84
+ }
85
+ declare const ConnectionProviderNotRegisteredError_base: Schema.Class<ConnectionProviderNotRegisteredError, Schema.TaggedStruct<"ConnectionProviderNotRegisteredError", {
86
+ readonly provider: Schema.String;
87
+ readonly connectionId: Schema.optional<Schema.brand<Schema.String, "ConnectionId">>;
88
+ }>, import("effect/Cause").YieldableError>;
89
+ export declare class ConnectionProviderNotRegisteredError extends ConnectionProviderNotRegisteredError_base {
90
+ }
91
+ declare const ConnectionRefreshNotSupportedError_base: Schema.Class<ConnectionRefreshNotSupportedError, Schema.TaggedStruct<"ConnectionRefreshNotSupportedError", {
92
+ readonly connectionId: Schema.brand<Schema.String, "ConnectionId">;
93
+ readonly provider: Schema.String;
94
+ }>, import("effect/Cause").YieldableError>;
95
+ export declare class ConnectionRefreshNotSupportedError extends ConnectionRefreshNotSupportedError_base {
96
+ }
97
+ declare const ConnectionReauthRequiredError_base: Schema.Class<ConnectionReauthRequiredError, Schema.TaggedStruct<"ConnectionReauthRequiredError", {
98
+ readonly connectionId: Schema.brand<Schema.String, "ConnectionId">;
99
+ readonly provider: Schema.String;
100
+ readonly message: Schema.String;
101
+ }>, import("effect/Cause").YieldableError>;
102
+ /**
103
+ * Raised by `connections.accessToken(id)` when the provider's refresh
104
+ * handler reported that the stored refresh token is permanently
105
+ * invalid (RFC 6749 §5.2 `invalid_grant` and friends). The caller —
106
+ * typically a tool invocation — surfaces this so the UI can prompt the
107
+ * user to sign in again. Distinct from `ConnectionRefreshError` so
108
+ * "the network flaked, retry later" and "the grant is dead, re-auth"
109
+ * don't collapse into one error tag at the plugin boundary.
110
+ */
111
+ export declare class ConnectionReauthRequiredError extends ConnectionReauthRequiredError_base {
42
112
  }
113
+ export type ExecutorError = ToolNotFoundError | ToolInvocationError | PluginNotLoadedError | NoHandlerError | ToolBlockedError | SourceNotFoundError | SourceRemovalNotAllowedError | SecretNotFoundError | SecretResolutionError | SecretOwnedByConnectionError | ConnectionNotFoundError | ConnectionProviderNotRegisteredError | ConnectionRefreshNotSupportedError | ConnectionReauthRequiredError;
43
114
  export {};
44
115
  //# 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,CAAC;AAEtC,OAAO,EAAE,MAAM,EAAsB,MAAM,OAAO,CAAC;;;;;;AAEnD,qBAAa,iBAAkB,SAAQ,sBAGtC;CAAG;;;;AAEJ,qBAAa,mBAAoB,SAAQ,yBAAwC;IAC/E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;CAAG;;;;;;AAEL,qBAAa,mBAAoB,SAAQ,wBAGxC;CAAG;;;;;;;AAEJ,qBAAa,qBAAsB,SAAQ,0BAM1C;CAAG;;;;;;;;AAEJ,qBAAa,iBAAkB,SAAQ,sBAOtC;CAAG"}
1
+ {"version":3,"file":"errors.d.ts","sourceR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BAA4B,GAC5B,uBAAuB,GACvB,oCAAoC,GACpC,kCAAkC,GAClC,6BAA6B,CAAC"}
@@ -1,60 +1,119 @@
1
- import { Context, Effect } from "effect";
2
- import type { SecretId } from "./ids";
3
- import type { SecretProvider, SecretRef, SecretStore, SetSecretInput } from "./secrets";
4
- import type { ToolMetadata, ToolSchema, ToolInvocationResult, ToolRegistry, ToolListFilter, InvokeOptions } from "./tools";
5
- import type { Source, SourceDetectionResult, SourceRegistry } from "./sources";
6
- import type { Policy, PolicyEngine } from "./policies";
1
+ import { Effect } from "effect";
2
+ import { type DBAdapter, type DBSchema, type StorageFailure } from "@executor-js/storage-core";
3
+ import { type BlobStore } from "./blob";
4
+ import { ConnectionRef, ConnectionRefreshError, type CreateConnectionInput, type UpdateConnectionTokensInput } from "./connections";
5
+ import { ElicitationDeclinedError, type ElicitationHandler } from "./elicitation";
6
+ import { ConnectionNotFoundError, ConnectionProviderNotRegisteredError, ConnectionReauthRequiredError, ConnectionRefreshNotSupportedError, NoHandlerError, PluginNotLoadedError, SecretOwnedByConnectionError, SourceRemovalNotAllowedError, ToolBlockedError, ToolInvocationError, ToolNotFoundError } from "./errors";
7
+ import type { OAuthService } from "./oauth";
8
+ import { type CreateToolPolicyInput, type PolicyMatch, type ToolPolicy, type UpdateToolPolicyInput } from "./policies";
9
+ import type { AnyPlugin, PluginExtensions } from "./plugin";
7
10
  import type { Scope } from "./scope";
8
- import type { ExecutorPlugin, PluginExtensions } from "./plugin";
9
- import type { ToolNotFoundError, ToolInvocationError, SecretNotFoundError, SecretResolutionError, PolicyDeniedError } from "./errors";
10
- import { ElicitationDeclinedError } from "./elicitation";
11
- export type Executor<TPlugins extends readonly ExecutorPlugin<string, object>[] = []> = {
12
- readonly scope: Scope;
11
+ import { SecretRef, SetSecretInput } from "./secrets";
12
+ import { ToolSchema, type Source, type SourceDetectionResult, type Tool, type ToolListFilter } from "./types";
13
+ export type OnElicitation = ElicitationHandler | "accept-all";
14
+ export interface InvokeOptions {
15
+ /** Override the executor-level handler for this single call. */
16
+ readonly onElicitation?: OnElicitation;
17
+ }
18
+ export type Executor<TPlugins extends readonly AnyPlugin[] = []> = {
19
+ /**
20
+ * Precedence-ordered scope stack this executor was configured with.
21
+ * Innermost first. Consumers that need "the display scope" typically
22
+ * pick `scopes.at(-1)` (outermost, e.g. the organization) or
23
+ * `scopes[0]` (innermost, e.g. the current user-in-org) depending on
24
+ * what they're rendering.
25
+ */
26
+ readonly scopes: readonly Scope[];
13
27
  readonly tools: {
14
- readonly list: (filter?: ToolListFilter) => Effect.Effect<readonly ToolMetadata[]>;
15
- readonly schema: (toolId: string) => Effect.Effect<ToolSchema, ToolNotFoundError>;
16
- /** Shared schema definitions across all tools */
17
- readonly definitions: () => Effect.Effect<Record<string, unknown>>;
18
- readonly invoke: (toolId: string, args: unknown, options: InvokeOptions) => Effect.Effect<ToolInvocationResult, ToolNotFoundError | ToolInvocationError | PolicyDeniedError | ElicitationDeclinedError>;
28
+ readonly list: (filter?: ToolListFilter) => Effect.Effect<readonly Tool[], StorageFailure>;
29
+ /** Fetch a tool's full schema view: JSON schemas with `$defs`
30
+ * attached from the core `definition` table, plus TypeScript
31
+ * preview strings rendered from them. Returns `null` for unknown
32
+ * tool ids. */
33
+ readonly schema: (toolId: string) => Effect.Effect<ToolSchema | null, StorageFailure>;
34
+ /** Every `$defs` entry across every source, grouped by source id.
35
+ * Used for bulk schema export and downstream TypeScript rendering. */
36
+ readonly definitions: () => Effect.Effect<Record<string, Record<string, unknown>>, StorageFailure>;
37
+ readonly invoke: (toolId: string, args: unknown, options?: InvokeOptions) => Effect.Effect<unknown, ToolNotFoundError | ToolBlockedError | PluginNotLoadedError | NoHandlerError | ToolInvocationError | ElicitationDeclinedError | StorageFailure>;
19
38
  };
20
39
  readonly sources: {
21
- readonly list: () => Effect.Effect<readonly Source[]>;
22
- readonly remove: (sourceId: string) => Effect.Effect<void>;
23
- readonly refresh: (sourceId: string) => Effect.Effect<void>;
24
- readonly detect: (url: string) => Effect.Effect<readonly SourceDetectionResult[]>;
25
- };
26
- readonly policies: {
27
- readonly list: () => Effect.Effect<readonly Policy[]>;
28
- readonly add: (policy: Omit<Policy, "id" | "createdAt">) => Effect.Effect<Policy>;
29
- readonly remove: (policyId: string) => Effect.Effect<boolean>;
40
+ 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>;
43
+ /** URL autodetection fans out to every plugin's `detect` hook
44
+ * (if declared), returns every high/medium/low-confidence match.
45
+ * UI picks a winner from the list. */
46
+ readonly detect: (url: string) => Effect.Effect<readonly SourceDetectionResult[], StorageFailure>;
47
+ /** All `$defs` registered for a single source, keyed by def name. */
48
+ readonly definitions: (sourceId: string) => Effect.Effect<Record<string, unknown>, StorageFailure>;
30
49
  };
31
50
  readonly secrets: {
32
- readonly list: () => Effect.Effect<readonly SecretRef[]>;
33
- /** Resolve a secret value by id */
34
- readonly resolve: (secretId: SecretId) => Effect.Effect<string, SecretNotFoundError | SecretResolutionError>;
35
- /** Check if a secret can be resolved */
36
- readonly status: (secretId: SecretId) => Effect.Effect<"resolved" | "missing">;
37
- /** Store a secret value (creates ref + writes to provider) */
38
- readonly set: (input: Omit<SetSecretInput, "scopeId">) => Effect.Effect<SecretRef, SecretResolutionError>;
39
- readonly remove: (secretId: SecretId) => Effect.Effect<boolean, SecretNotFoundError>;
40
- /** Register a secret provider */
41
- readonly addProvider: (provider: SecretProvider) => Effect.Effect<void>;
42
- /** List registered provider keys */
51
+ readonly get: (id: string) => Effect.Effect<string | null, SecretOwnedByConnectionError | StorageFailure>;
52
+ /** Fast-path existence check hits the core `secret` routing table
53
+ * only, never calls the provider. Use this for UI state ("secret
54
+ * missing, prompt to add") to avoid keychain permission prompts
55
+ * or 1password IPC roundtrips on a pre-flight check. */
56
+ readonly status: (id: string) => Effect.Effect<"resolved" | "missing", StorageFailure>;
57
+ readonly set: (input: SetSecretInput) => Effect.Effect<SecretRef, StorageFailure>;
58
+ /** Delete a bare (non-connection-owned) secret. Connection-owned
59
+ * secrets are rejected with `SecretOwnedByConnectionError` — use
60
+ * `connections.remove` instead. */
61
+ readonly remove: (id: string) => Effect.Effect<void, SecretOwnedByConnectionError | StorageFailure>;
62
+ readonly list: () => Effect.Effect<readonly SecretRef[], StorageFailure>;
43
63
  readonly providers: () => Effect.Effect<readonly string[]>;
44
64
  };
45
- readonly close: () => Effect.Effect<void>;
65
+ readonly connections: {
66
+ readonly get: (id: string) => Effect.Effect<ConnectionRef | null, StorageFailure>;
67
+ readonly list: () => Effect.Effect<readonly ConnectionRef[], StorageFailure>;
68
+ readonly create: (input: CreateConnectionInput) => Effect.Effect<ConnectionRef, ConnectionProviderNotRegisteredError | StorageFailure>;
69
+ readonly updateTokens: (input: UpdateConnectionTokensInput) => Effect.Effect<ConnectionRef, ConnectionNotFoundError | StorageFailure>;
70
+ readonly setIdentityLabel: (id: string, label: string | null) => Effect.Effect<void, ConnectionNotFoundError | StorageFailure>;
71
+ readonly accessToken: (id: string) => Effect.Effect<string, ConnectionNotFoundError | ConnectionProviderNotRegisteredError | ConnectionRefreshNotSupportedError | ConnectionReauthRequiredError | ConnectionRefreshError | StorageFailure>;
72
+ readonly remove: (id: string) => Effect.Effect<void, StorageFailure>;
73
+ readonly providers: () => Effect.Effect<readonly string[]>;
74
+ };
75
+ /** Shared OAuth service. Hosts use this through the core HTTP OAuth group;
76
+ * plugins see the same service as `ctx.oauth`. */
77
+ readonly oauth: OAuthService;
78
+ readonly policies: {
79
+ /** All policies visible across the executor's scope stack, sorted
80
+ * by (innermost-scope-first, position ascending) — i.e. the order
81
+ * in which they're evaluated by first-match-wins. */
82
+ readonly list: () => Effect.Effect<readonly ToolPolicy[], StorageFailure>;
83
+ /** Create a new policy. Defaults to the top of the target scope's
84
+ * list (highest precedence) when `position` is omitted. */
85
+ readonly create: (input: CreateToolPolicyInput) => Effect.Effect<ToolPolicy, StorageFailure>;
86
+ readonly update: (input: UpdateToolPolicyInput) => Effect.Effect<ToolPolicy, StorageFailure>;
87
+ readonly remove: (id: string) => Effect.Effect<void, StorageFailure>;
88
+ /** Resolve the effective policy for a tool id by walking the scope-
89
+ * stacked policy list with first-match-wins semantics. Returns
90
+ * `undefined` when no rule matches (caller falls back to the
91
+ * plugin's `resolveAnnotations` output). */
92
+ readonly resolve: (toolId: string) => Effect.Effect<PolicyMatch | undefined, StorageFailure>;
93
+ };
94
+ readonly close: () => Effect.Effect<void, StorageFailure>;
46
95
  } & PluginExtensions<TPlugins>;
47
- export type ToolRegistryService = Context.Tag.Service<typeof ToolRegistry>;
48
- export type SourceRegistryService = Context.Tag.Service<typeof SourceRegistry>;
49
- export type SecretStoreService = Context.Tag.Service<typeof SecretStore>;
50
- export type PolicyEngineService = Context.Tag.Service<typeof PolicyEngine>;
51
- export interface ExecutorConfig<TPlugins extends readonly ExecutorPlugin<string, object>[] = []> {
52
- readonly scope: Scope;
53
- readonly tools: ToolRegistryService;
54
- readonly sources: SourceRegistryService;
55
- readonly secrets: SecretStoreService;
56
- readonly policies: PolicyEngineService;
96
+ export interface ExecutorConfig<TPlugins extends readonly AnyPlugin[] = []> {
97
+ /**
98
+ * Precedence-ordered scope stack. Innermost first; typical shape is
99
+ * `[userInOrgScope, orgScope]`. Reads on scoped tables walk the
100
+ * stack (first hit wins for shadow-by-id consumers like secrets and
101
+ * blobs); writes require callers to name an explicit target scope.
102
+ * Must be non-empty.
103
+ */
104
+ readonly scopes: readonly Scope[];
105
+ readonly adapter: DBAdapter;
106
+ readonly blobs: BlobStore;
57
107
  readonly plugins?: TPlugins;
108
+ /**
109
+ * How to respond when a tool requests user input mid-invocation. Pass
110
+ * `"accept-all"` for tests / non-interactive hosts, or a handler
111
+ * `(ctx) => Effect<ElicitationResponse>` for interactive ones.
112
+ * Required at construction so per-invoke calls don't have to thread
113
+ * an options arg.
114
+ */
115
+ readonly onElicitation: OnElicitation;
58
116
  }
59
- export declare const createExecutor: <const TPlugins extends readonly ExecutorPlugin<string, object>[] = []>(config: ExecutorConfig<TPlugins>) => Effect.Effect<Executor<TPlugins>, Error>;
117
+ 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>;
60
119
  //# sourceMappingURL=executor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../src/executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEzC,OAAO,KAAK,EAAU,QAAQ,EAAY,MAAM,OAAO,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACxF,OAAO,KAAK,EACV,YAAY,EACZ,UAAU,EACV,oBAAoB,EACpB,YAAY,EACZ,cAAc,EACd,aAAa,EACd,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,MAAM,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC/E,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAgB,MAAM,UAAU,CAAC;AAC/E,OAAO,KAAK,EACV,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,EAEL,wBAAwB,EAGzB,MAAM,eAAe,CAAC;AAWvB,MAAM,MAAM,QAAQ,CAAC,QAAQ,SAAS,SAAS,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE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+ //# sourceMappingURL=executor.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executor.test.d.ts","sourceRoot":"","sources":["../src/executor.test.ts"],"names":[],"mappings":""}
package/dist/ids.d.ts CHANGED
@@ -1,10 +1,12 @@
1
1
  import { Schema } from "effect";
2
- export declare const ScopeId: Schema.brand<typeof Schema.String, "ScopeId">;
2
+ export declare const ScopeId: Schema.brand<Schema.String, "ScopeId">;
3
3
  export type ScopeId = typeof ScopeId.Type;
4
- export declare const ToolId: Schema.brand<typeof Schema.String, "ToolId">;
4
+ export declare const ToolId: Schema.brand<Schema.String, "ToolId">;
5
5
  export type ToolId = typeof ToolId.Type;
6
- export declare const SecretId: Schema.brand<typeof Schema.String, "SecretId">;
6
+ export declare const SecretId: Schema.brand<Schema.String, "SecretId">;
7
7
  export type SecretId = typeof SecretId.Type;
8
- export declare const PolicyId: Schema.brand<typeof Schema.String, "PolicyId">;
8
+ export declare const PolicyId: Schema.brand<Schema.String, "PolicyId">;
9
9
  export type PolicyId = typeof PolicyId.Type;
10
+ export declare const ConnectionId: Schema.brand<Schema.String, "ConnectionId">;
11
+ export type ConnectionId = typeof ConnectionId.Type;
10
12
  //# 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,+CAA8C,CAAC;AACnE,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAC;AAE1C,eAAO,MAAM,MAAM,8CAA6C,CAAC;AACjE,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,IAAI,CAAC;AAExC,eAAO,MAAM,QAAQ,gDAA+C,CAAC;AACrE,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC,IAAI,CAAC;AAE5C,eAAO,MAAM,QAAQ,gDAA+C,CAAC;AACrE,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,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"}
package/dist/index.d.ts CHANGED
@@ -1,20 +1,28 @@
1
- export { ScopeId, ToolId, SecretId, PolicyId } from "./ids";
2
- export { ToolNotFoundError, ToolInvocationError, SecretNotFoundError, SecretResolutionError, PolicyDeniedError, } from "./errors";
3
- export { ToolMetadata, ToolSchema, ToolInvocationResult, ToolRegistry, ToolRegistration, ToolAnnotations, ToolListFilter, type ToolInvoker, type RuntimeToolHandler, type InvokeOptions, } from "./tools";
4
- export { Source, SourceDetectionResult, SourceRegistry, makeInMemorySourceRegistry, type SourceManager, } from "./sources";
5
- export { FormElicitation, UrlElicitation, ElicitationAction, ElicitationResponse, ElicitationDeclinedError, type ElicitationRequest, type ElicitationHandler, type ElicitationContext, } from "./elicitation";
6
- export { SecretRef, SetSecretInput, SecretStore, type SecretProvider } from "./secrets";
7
- export { Policy, PolicyAction, PolicyCheckInput, PolicyEngine } from "./policies";
1
+ export { Context, Effect, Layer, Schema, Data, Option } from "effect";
2
+ export { HttpApi, HttpApiBuilder, HttpApiClient, HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema, } from "effect/unstable/httpapi";
3
+ export type { DBAdapter, DBSchema, DBFieldAttribute, DBFieldType, StorageFailure, TypedAdapter, Where, WhereOperator, } from "@executor-js/storage-core";
4
+ export { typedAdapter } from "@executor-js/storage-core";
5
+ export { StorageError, UniqueViolationError } from "@executor-js/storage-core";
6
+ export { ScopeId, ToolId, SecretId, PolicyId, ConnectionId } from "./ids";
8
7
  export { Scope } from "./scope";
9
- export { definePlugin, type ExecutorPlugin, type PluginContext, type PluginHandle, type PluginExtensions, } from "./plugin";
10
- export { createExecutor, type Executor, type ExecutorConfig } from "./executor";
11
- export { inMemoryToolsPlugin, tool, type MemoryToolDefinition, type MemoryToolContext, type MemoryToolSdkAccess, type InMemoryToolsPluginExtension, } from "./plugins/in-memory-tools";
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";
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";
15
+ export { FormElicitation, UrlElicitation, ElicitationAction, ElicitationResponse, ElicitationDeclinedError, type ElicitationRequest, type ElicitationHandler, type ElicitationContext, } from "./elicitation";
16
+ export { type BlobStore, type PluginBlobStore, pluginBlobStore, makeInMemoryBlobStore, } from "./blob";
17
+ 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";
19
+ export { makeOAuth2Service, type OAuthServiceDeps } from "./oauth-service";
20
+ 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
+ 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";
23
+ export { type Executor, type ExecutorConfig, type OnElicitation, type InvokeOptions, createExecutor, collectSchemas, } from "./executor";
24
+ export { defineExecutorConfig, type ExecutorCliConfig, type ExecutorDialect, type ExecutorPluginsFactory, } from "./config";
25
+ export { makeTestConfig } from "./testing";
12
26
  export { hoistDefinitions, collectRefs, reattachDefs, normalizeRefs } from "./schema-refs";
13
27
  export { schemaToTypeScriptPreview, schemaToTypeScriptPreviewWithDefs, buildToolTypeScriptPreview, type TypeScriptRenderOptions, type TypeScriptSchemaPreview, } from "./schema-types";
14
- export { registerRuntimeTools, runtimeTool, type RuntimeSourceDefinition, type RuntimeToolDefinition, } from "./runtime-tools";
15
- export { makeInMemoryToolRegistry } from "./in-memory/tool-registry";
16
- export { makeInMemorySecretStore, makeInMemorySecretProvider } from "./in-memory/secret-store";
17
- export { makeInMemoryPolicyEngine } from "./in-memory/policy-engine";
18
- export { makeTestConfig } from "./testing";
19
- export { type Kv, type KvEntry, type ScopedKv, scopeKv, makeInMemoryScopedKv } from "./plugin-kv";
20
28
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG5D,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,YAAY,EACZ,UAAU,EACV,oBAAoB,EACpB,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,aAAa,GACnB,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,MAAM,EACN,qBAAqB,EACrB,cAAc,EACd,0BAA0B,EAC1B,KAAK,aAAa,GACnB,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,wBAAwB,EACxB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,GACxB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAGxF,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAGlF,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC,OAAO,EACL,YAAY,EACZ,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,gBAAgB,GACtB,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,cAAc,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAGhF,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