@executor-js/sdk 1.4.29 → 1.4.31
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.
- package/dist/blob.d.ts +2 -1
- package/dist/blob.d.ts.map +1 -1
- package/dist/chunk-2LU3SC64.js +7 -0
- package/dist/chunk-2LU3SC64.js.map +1 -0
- package/dist/chunk-7D4SUZUM.js +38 -0
- package/dist/chunk-7D4SUZUM.js.map +1 -0
- package/dist/chunk-B4YGTZF6.js +22 -0
- package/dist/chunk-B4YGTZF6.js.map +1 -0
- package/dist/chunk-BZNIRSMG.js +7873 -0
- package/dist/chunk-BZNIRSMG.js.map +1 -0
- package/dist/chunk-ECMCGZYE.js +5814 -0
- package/dist/chunk-ECMCGZYE.js.map +1 -0
- package/dist/{chunk-6SQWMOM4.js → chunk-MLNVNVRI.js} +2 -6
- package/dist/chunk-MLNVNVRI.js.map +1 -0
- package/dist/chunk-P2WKYAC5.js +1 -0
- package/dist/chunk-P2WKYAC5.js.map +1 -0
- package/dist/chunk-ZANQD7E2.js +1035 -0
- package/dist/chunk-ZANQD7E2.js.map +1 -0
- package/dist/client.d.ts +3 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +2 -0
- package/dist/client.js.map +1 -1
- package/dist/config.d.ts +3 -7
- package/dist/config.d.ts.map +1 -1
- package/dist/core-schema.d.ts +283 -408
- package/dist/core-schema.d.ts.map +1 -1
- package/dist/core-tools.d.ts +6 -0
- package/dist/core-tools.d.ts.map +1 -0
- package/dist/core.js +120 -168
- package/dist/core.js.map +1 -1
- package/dist/credential-bindings.d.ts +86 -24
- package/dist/credential-bindings.d.ts.map +1 -1
- package/dist/errors.d.ts +1 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/executor.d.ts +46 -12
- package/dist/executor.d.ts.map +1 -1
- package/dist/fuma-runtime.d.ts +50 -0
- package/dist/fuma-runtime.d.ts.map +1 -0
- package/dist/http-source.d.ts +109 -0
- package/dist/http-source.d.ts.map +1 -0
- package/dist/http-source.js +155 -0
- package/dist/http-source.js.map +1 -0
- package/dist/index.d.ts +17 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +44 -21
- package/dist/index.js.map +1 -1
- package/dist/oauth-service.d.ts +2 -10
- package/dist/oauth-service.d.ts.map +1 -1
- package/dist/oauth.d.ts +9 -1
- package/dist/oauth.d.ts.map +1 -1
- package/dist/plugin-storage.d.ts +40 -0
- package/dist/plugin-storage.d.ts.map +1 -0
- package/dist/plugin.d.ts +110 -34
- package/dist/plugin.d.ts.map +1 -1
- package/dist/promise-executor.d.ts +33 -8
- package/dist/promise-executor.d.ts.map +1 -1
- package/dist/promise.d.ts +3 -3
- package/dist/promise.d.ts.map +1 -1
- package/dist/schema-refs.d.ts +1 -0
- package/dist/schema-refs.d.ts.map +1 -1
- package/dist/schema-refs.test.d.ts +2 -0
- package/dist/schema-refs.test.d.ts.map +1 -0
- package/dist/schema-types.d.ts +22 -8
- package/dist/schema-types.d.ts.map +1 -1
- package/dist/scope-policy.d.ts +23 -0
- package/dist/scope-policy.d.ts.map +1 -0
- package/dist/scope-policy.test.d.ts +2 -0
- package/dist/scope-policy.test.d.ts.map +1 -0
- package/dist/scope.d.ts +10 -0
- package/dist/scope.d.ts.map +1 -1
- package/dist/secrets.d.ts +1 -1
- package/dist/secrets.d.ts.map +1 -1
- package/dist/shared.d.ts +13 -0
- package/dist/shared.d.ts.map +1 -0
- package/dist/shared.js +103 -0
- package/dist/shared.js.map +1 -0
- package/dist/sqlite-test-db-OK2WQNR5.js +8 -0
- package/dist/sqlite-test-db-OK2WQNR5.js.map +1 -0
- package/dist/sqlite-test-db.d.ts +22 -0
- package/dist/sqlite-test-db.d.ts.map +1 -0
- package/dist/test-config.d.ts +45 -4
- package/dist/test-config.d.ts.map +1 -1
- package/dist/testing/oauth-test-server.d.ts +80 -0
- package/dist/testing/oauth-test-server.d.ts.map +1 -0
- package/dist/testing.d.ts +4 -1
- package/dist/testing.d.ts.map +1 -1
- package/dist/testing.js +706 -18
- package/dist/testing.js.map +1 -1
- package/dist/testing.test.d.ts +2 -0
- package/dist/testing.test.d.ts.map +1 -0
- package/dist/tool-result.d.ts +22 -0
- package/dist/tool-result.d.ts.map +1 -0
- package/dist/tool-result.test.d.ts +2 -0
- package/dist/tool-result.test.d.ts.map +1 -0
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/vendor/json-schema-to-typescript/applySchemaTyping.d.ts +3 -0
- package/dist/vendor/json-schema-to-typescript/applySchemaTyping.d.ts.map +1 -0
- package/dist/vendor/json-schema-to-typescript/compat.d.ts +10 -0
- package/dist/vendor/json-schema-to-typescript/compat.d.ts.map +1 -0
- package/dist/vendor/json-schema-to-typescript/formatter.d.ts +3 -0
- package/dist/vendor/json-schema-to-typescript/formatter.d.ts.map +1 -0
- package/dist/vendor/json-schema-to-typescript/generator.d.ts +7 -0
- package/dist/vendor/json-schema-to-typescript/generator.d.ts.map +1 -0
- package/dist/vendor/json-schema-to-typescript/index.d.ts +93 -0
- package/dist/vendor/json-schema-to-typescript/index.d.ts.map +1 -0
- package/dist/vendor/json-schema-to-typescript/linker.d.ts +8 -0
- package/dist/vendor/json-schema-to-typescript/linker.d.ts.map +1 -0
- package/dist/vendor/json-schema-to-typescript/normalizer.d.ts +5 -0
- package/dist/vendor/json-schema-to-typescript/normalizer.d.ts.map +1 -0
- package/dist/vendor/json-schema-to-typescript/optimizer.d.ts +4 -0
- package/dist/vendor/json-schema-to-typescript/optimizer.d.ts.map +1 -0
- package/dist/vendor/json-schema-to-typescript/optionValidator.d.ts +3 -0
- package/dist/vendor/json-schema-to-typescript/optionValidator.d.ts.map +1 -0
- package/dist/vendor/json-schema-to-typescript/parser.d.ts +8 -0
- package/dist/vendor/json-schema-to-typescript/parser.d.ts.map +1 -0
- package/dist/vendor/json-schema-to-typescript/resolver.d.ts +7 -0
- package/dist/vendor/json-schema-to-typescript/resolver.d.ts.map +1 -0
- package/dist/vendor/json-schema-to-typescript/types/AST.d.ts +108 -0
- package/dist/vendor/json-schema-to-typescript/types/AST.d.ts.map +1 -0
- package/dist/vendor/json-schema-to-typescript/types/JSONSchema.d.ts +103 -0
- package/dist/vendor/json-schema-to-typescript/types/JSONSchema.d.ts.map +1 -0
- package/dist/vendor/json-schema-to-typescript/types/json-schema.d.ts +34 -0
- package/dist/vendor/json-schema-to-typescript/types/json-schema.d.ts.map +1 -0
- package/dist/vendor/json-schema-to-typescript/typesOfSchema.d.ts +11 -0
- package/dist/vendor/json-schema-to-typescript/typesOfSchema.d.ts.map +1 -0
- package/dist/vendor/json-schema-to-typescript/utils.d.ts +30 -0
- package/dist/vendor/json-schema-to-typescript/utils.d.ts.map +1 -0
- package/dist/vendor/json-schema-to-typescript/validator.d.ts +3 -0
- package/dist/vendor/json-schema-to-typescript/validator.d.ts.map +1 -0
- package/package.json +17 -2
- package/dist/chunk-6SQWMOM4.js.map +0 -1
- package/dist/chunk-I2OEQ2GJ.js +0 -103
- package/dist/chunk-I2OEQ2GJ.js.map +0 -1
- package/dist/chunk-OIJL6F6M.js +0 -5507
- package/dist/chunk-OIJL6F6M.js.map +0 -1
- package/dist/error-handling.test.d.ts +0 -2
- package/dist/error-handling.test.d.ts.map +0 -1
- package/dist/scoped-adapter.d.ts +0 -28
- package/dist/scoped-adapter.d.ts.map +0 -1
- package/dist/scoped-adapter.test.d.ts +0 -2
- package/dist/scoped-adapter.test.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-schema.d.ts","sourceRoot":"","sources":["../src/core-schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"core-schema.d.ts","sourceRoot":"","sources":["../src/core-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,SAAS,EAAiB,MAAM,eAAe,CAAC;AACvF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAW9C,KAAK,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,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AC,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,SAAS,eAAe,EAAE,CAAC;CAC5C;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/C"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface CoreToolsPluginOptions {
|
|
2
|
+
readonly webBaseUrl?: string;
|
|
3
|
+
}
|
|
4
|
+
export declare const coreToolsPlugin: import("./plugin").ConfiguredPlugin<"core-tools", {}, {}, CoreToolsPluginOptions, undefined, undefined, import("effect/Layer").Layer<unknown, never, never>, import("effect/unstable/httpapi/HttpApiGroup").Any>;
|
|
5
|
+
export default coreToolsPlugin;
|
|
6
|
+
//# sourceMappingURL=core-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-tools.d.ts","sourceRoot":"","sources":["../src/core-tools.ts"],"names":[],"mappings":"AA6YA,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AAmGD,eAAO,MAAM,eAAe,kNA6ezB,CAAC;AAEJ,eAAe,eAAe,CAAC"}
|
package/dist/core.js
CHANGED
|
@@ -1,16 +1,77 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defineExecutorConfig
|
|
3
|
+
} from "./chunk-2LU3SC64.js";
|
|
4
|
+
import {
|
|
5
|
+
InternalError,
|
|
6
|
+
OAUTH_POPUP_MESSAGE_TYPE,
|
|
7
|
+
isOAuthPopupResult
|
|
8
|
+
} from "./chunk-B4YGTZF6.js";
|
|
1
9
|
import {
|
|
2
10
|
SecretBackedMap,
|
|
3
11
|
SecretBackedValue,
|
|
4
|
-
defineExecutorConfig,
|
|
5
12
|
isSecretBackedRef,
|
|
6
13
|
resolveSecretBackedMap
|
|
7
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-MLNVNVRI.js";
|
|
8
15
|
import {
|
|
16
|
+
ConnectionProviderState,
|
|
17
|
+
ConnectionRef,
|
|
18
|
+
ConnectionRefreshError,
|
|
19
|
+
CreateConnectionInput,
|
|
20
|
+
ElicitationAction,
|
|
21
|
+
ElicitationDeclinedError,
|
|
22
|
+
ElicitationResponse,
|
|
23
|
+
FormElicitation,
|
|
24
|
+
HostedOutboundRequestBlocked,
|
|
25
|
+
OAUTH2_DEFAULT_TIMEOUT_MS,
|
|
26
|
+
OAUTH2_REFRESH_SKEW_MS,
|
|
27
|
+
OAuth2Error,
|
|
28
|
+
OAuthAuthorizationServerMetadataSchema,
|
|
29
|
+
OAuthClientInformationSchema,
|
|
30
|
+
OAuthDiscoveryError,
|
|
31
|
+
OAuthProtectedResourceMetadataSchema,
|
|
32
|
+
RemoveConnectionInput,
|
|
33
|
+
RemoveSecretInput,
|
|
34
|
+
Scope,
|
|
35
|
+
SecretRef,
|
|
36
|
+
SetSecretInput,
|
|
37
|
+
TokenMaterial,
|
|
38
|
+
ToolResult,
|
|
39
|
+
UpdateConnectionTokensInput,
|
|
40
|
+
UrlElicitation,
|
|
41
|
+
assertSupportedOAuthEndpointUrl,
|
|
42
|
+
beginDynamicAuthorization,
|
|
43
|
+
buildAuthorizationUrl,
|
|
44
|
+
buildToolTypeScriptPreview,
|
|
45
|
+
collectRefs,
|
|
46
|
+
collectTables,
|
|
47
|
+
coreToolsPlugin,
|
|
48
|
+
createExecutor,
|
|
49
|
+
createPkceCodeChallenge,
|
|
50
|
+
createPkceCodeVerifier,
|
|
51
|
+
defaultSourceInstallScopeId,
|
|
9
52
|
definePlugin,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
53
|
+
discoverAuthorizationServerMetadata,
|
|
54
|
+
discoverProtectedResourceMetadata,
|
|
55
|
+
exchangeAuthorizationCode,
|
|
56
|
+
exchangeClientCredentials,
|
|
57
|
+
hoistDefinitions,
|
|
58
|
+
isSupportedOAuthEndpointUrl,
|
|
59
|
+
isToolResult,
|
|
60
|
+
makeFumaBlobStore,
|
|
61
|
+
makeHostedHttpClientLayer,
|
|
62
|
+
makeInMemoryBlobStore,
|
|
63
|
+
makeOAuth2Service,
|
|
64
|
+
normalizeRefs,
|
|
65
|
+
pluginBlobStore,
|
|
66
|
+
reattachDefs,
|
|
67
|
+
refreshAccessToken,
|
|
68
|
+
registerDynamicClient,
|
|
69
|
+
schemaToTypeScriptPreview,
|
|
70
|
+
schemaToTypeScriptPreviewWithDefs,
|
|
71
|
+
shouldRefreshToken,
|
|
72
|
+
tool,
|
|
73
|
+
validateHostedOutboundUrl
|
|
74
|
+
} from "./chunk-BZNIRSMG.js";
|
|
14
75
|
import {
|
|
15
76
|
ConfiguredCredentialBinding,
|
|
16
77
|
ConfiguredCredentialValue,
|
|
@@ -18,116 +79,87 @@ import {
|
|
|
18
79
|
ConnectionInUseError,
|
|
19
80
|
ConnectionNotFoundError,
|
|
20
81
|
ConnectionProviderNotRegisteredError,
|
|
21
|
-
ConnectionProviderState,
|
|
22
82
|
ConnectionReauthRequiredError,
|
|
23
|
-
ConnectionRef,
|
|
24
|
-
ConnectionRefreshError,
|
|
25
83
|
ConnectionRefreshNotSupportedError,
|
|
26
|
-
CreateConnectionInput,
|
|
27
84
|
CredentialBindingId,
|
|
28
85
|
CredentialBindingKind,
|
|
29
86
|
CredentialBindingRef,
|
|
30
87
|
CredentialBindingResolutionStatus,
|
|
31
88
|
CredentialBindingSlotInput,
|
|
32
|
-
CredentialBindingSourceInput,
|
|
33
89
|
CredentialBindingValue,
|
|
34
|
-
ElicitationAction,
|
|
35
|
-
ElicitationDeclinedError,
|
|
36
|
-
ElicitationResponse,
|
|
37
|
-
FormElicitation,
|
|
38
|
-
HostedOutboundRequestBlocked,
|
|
39
90
|
NoHandlerError,
|
|
40
|
-
OAUTH2_DEFAULT_TIMEOUT_MS,
|
|
41
91
|
OAUTH2_PROVIDER_KEY,
|
|
42
|
-
OAUTH2_REFRESH_SKEW_MS,
|
|
43
92
|
OAUTH2_SESSION_TTL_MS,
|
|
44
|
-
OAuth2Error,
|
|
45
93
|
OAuthAuthorizationCodeStrategy,
|
|
46
|
-
OAuthAuthorizationServerMetadataSchema,
|
|
47
94
|
OAuthClientCredentialsStrategy,
|
|
48
|
-
OAuthClientInformationSchema,
|
|
49
95
|
OAuthCompleteError,
|
|
50
|
-
OAuthDiscoveryError,
|
|
51
96
|
OAuthDynamicDcrStrategy,
|
|
52
97
|
OAuthProbeError,
|
|
53
|
-
OAuthProtectedResourceMetadataSchema,
|
|
54
98
|
OAuthProviderState,
|
|
55
99
|
OAuthSessionNotFoundError,
|
|
56
100
|
OAuthStartError,
|
|
57
101
|
OAuthStrategy,
|
|
58
102
|
PluginNotLoadedError,
|
|
59
103
|
PolicyId,
|
|
60
|
-
RemoveConnectionInput,
|
|
61
104
|
RemoveCredentialBindingInput,
|
|
62
|
-
|
|
105
|
+
RemoveSourceCredentialBindingInput,
|
|
63
106
|
ReplaceCredentialBindingValue,
|
|
64
107
|
ReplaceCredentialBindingsInput,
|
|
108
|
+
ReplaceSourceCredentialBindingsInput,
|
|
65
109
|
ResolvedCredentialSlot,
|
|
66
|
-
Scope,
|
|
67
110
|
ScopeId,
|
|
68
111
|
ScopedSecretCredentialInput,
|
|
69
112
|
SecretId,
|
|
70
113
|
SecretInUseError,
|
|
71
114
|
SecretNotFoundError,
|
|
72
115
|
SecretOwnedByConnectionError,
|
|
73
|
-
SecretRef,
|
|
74
116
|
SecretResolutionError,
|
|
75
|
-
|
|
76
|
-
|
|
117
|
+
SetSourceCredentialBindingInput,
|
|
118
|
+
SourceCredentialBindingSlotInput,
|
|
119
|
+
SourceCredentialBindingSource,
|
|
120
|
+
SourceCredentialBindingSourceInput,
|
|
77
121
|
SourceDetectionResult,
|
|
78
122
|
SourceNotFoundError,
|
|
79
123
|
SourceRemovalNotAllowedError,
|
|
124
|
+
StorageError,
|
|
80
125
|
TOOL_POLICY_ACTIONS,
|
|
81
|
-
TokenMaterial,
|
|
82
126
|
ToolBlockedError,
|
|
83
127
|
ToolId,
|
|
84
128
|
ToolInvocationError,
|
|
85
129
|
ToolNotFoundError,
|
|
86
130
|
ToolPolicyActionSchema,
|
|
87
131
|
ToolSchema,
|
|
88
|
-
|
|
89
|
-
UrlElicitation,
|
|
132
|
+
UniqueViolationError,
|
|
90
133
|
Usage,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
buildAuthorizationUrl,
|
|
94
|
-
buildToolTypeScriptPreview,
|
|
95
|
-
collectSchemas,
|
|
134
|
+
bigintColumn,
|
|
135
|
+
boolColumn,
|
|
96
136
|
coreSchema,
|
|
97
|
-
createExecutor,
|
|
98
|
-
createPkceCodeChallenge,
|
|
99
|
-
createPkceCodeVerifier,
|
|
100
137
|
credentialBindingId,
|
|
101
138
|
credentialBindingRowToRef,
|
|
102
139
|
credentialBindingValueFromRow,
|
|
103
140
|
credentialSlotKey,
|
|
104
141
|
credentialSlotPart,
|
|
105
|
-
|
|
106
|
-
discoverProtectedResourceMetadata,
|
|
142
|
+
dateColumn,
|
|
107
143
|
effectivePolicyFromSorted,
|
|
108
|
-
|
|
109
|
-
exchangeClientCredentials,
|
|
110
|
-
isSupportedOAuthEndpointUrl,
|
|
144
|
+
isStorageFailure,
|
|
111
145
|
isToolPolicyAction,
|
|
112
146
|
isValidPattern,
|
|
113
|
-
|
|
114
|
-
makeInMemoryBlobStore,
|
|
115
|
-
makeOAuth2Service,
|
|
147
|
+
jsonColumn,
|
|
116
148
|
matchPattern,
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
149
|
+
nullableBigintColumn,
|
|
150
|
+
nullableJsonColumn,
|
|
151
|
+
nullableTextColumn,
|
|
152
|
+
pluginStorageId,
|
|
120
153
|
resolveEffectivePolicy,
|
|
121
154
|
resolveToolPolicy,
|
|
122
155
|
rowToToolPolicy,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
} from "./chunk-OIJL6F6M.js";
|
|
156
|
+
scopedExecutorTable,
|
|
157
|
+
textColumn
|
|
158
|
+
} from "./chunk-ZANQD7E2.js";
|
|
159
|
+
import "./chunk-7D4SUZUM.js";
|
|
128
160
|
|
|
129
161
|
// src/index.ts
|
|
130
|
-
import { Context, Effect, Layer, Schema
|
|
162
|
+
import { Context, Effect, Layer, Schema, Data, Option } from "effect";
|
|
131
163
|
import {
|
|
132
164
|
HttpApi,
|
|
133
165
|
HttpApiBuilder,
|
|
@@ -137,110 +169,8 @@ import {
|
|
|
137
169
|
HttpApiMiddleware,
|
|
138
170
|
HttpApiSchema
|
|
139
171
|
} from "effect/unstable/httpapi";
|
|
140
|
-
import {
|
|
141
|
-
import {
|
|
142
|
-
|
|
143
|
-
// src/oauth-popup-types.ts
|
|
144
|
-
var OAUTH_POPUP_MESSAGE_TYPE = "executor:oauth-result";
|
|
145
|
-
var isOAuthPopupResult = (value) => typeof value === "object" && value !== null && value.type === OAUTH_POPUP_MESSAGE_TYPE;
|
|
146
|
-
|
|
147
|
-
// src/schema-refs.ts
|
|
148
|
-
var REF_PATTERN = /^#\/(?:\$defs|definitions)\/(.+)$/;
|
|
149
|
-
var parseRefName = (ref) => ref.match(REF_PATTERN)?.[1];
|
|
150
|
-
var normalizeRefs = (node) => {
|
|
151
|
-
if (node == null || typeof node !== "object") return node;
|
|
152
|
-
if (Array.isArray(node)) {
|
|
153
|
-
let changed2 = false;
|
|
154
|
-
const out = node.map((item) => {
|
|
155
|
-
const n = normalizeRefs(item);
|
|
156
|
-
if (n !== item) changed2 = true;
|
|
157
|
-
return n;
|
|
158
|
-
});
|
|
159
|
-
return changed2 ? out : node;
|
|
160
|
-
}
|
|
161
|
-
const obj = node;
|
|
162
|
-
if (typeof obj.$ref === "string") {
|
|
163
|
-
const name = parseRefName(obj.$ref);
|
|
164
|
-
if (name) {
|
|
165
|
-
const canonical = `#/$defs/${name}`;
|
|
166
|
-
return canonical !== obj.$ref ? { ...obj, $ref: canonical } : obj;
|
|
167
|
-
}
|
|
168
|
-
return obj;
|
|
169
|
-
}
|
|
170
|
-
let changed = false;
|
|
171
|
-
const result = {};
|
|
172
|
-
for (const [k, v] of Object.entries(obj)) {
|
|
173
|
-
const n = normalizeRefs(v);
|
|
174
|
-
if (n !== v) changed = true;
|
|
175
|
-
result[k] = n;
|
|
176
|
-
}
|
|
177
|
-
return changed ? result : obj;
|
|
178
|
-
};
|
|
179
|
-
var hoistDefinitions = (schema) => {
|
|
180
|
-
if (schema == null || typeof schema !== "object") {
|
|
181
|
-
return { stripped: schema, defs: {} };
|
|
182
|
-
}
|
|
183
|
-
const obj = schema;
|
|
184
|
-
const defs = {};
|
|
185
|
-
if (obj.$defs && typeof obj.$defs === "object") {
|
|
186
|
-
for (const [k, v] of Object.entries(obj.$defs)) {
|
|
187
|
-
defs[k] = v;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
if (obj.definitions && typeof obj.definitions === "object") {
|
|
191
|
-
for (const [k, v] of Object.entries(obj.definitions)) {
|
|
192
|
-
defs[k] = v;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
const { $defs: _a, definitions: _b, ...rest } = obj;
|
|
196
|
-
return { stripped: rest, defs };
|
|
197
|
-
};
|
|
198
|
-
var collectRefs = (node, defs, found = /* @__PURE__ */ new Set()) => {
|
|
199
|
-
if (node == null || typeof node !== "object") return found;
|
|
200
|
-
const obj = node;
|
|
201
|
-
if (typeof obj.$ref === "string") {
|
|
202
|
-
const name = parseRefName(obj.$ref);
|
|
203
|
-
if (name && !found.has(name)) {
|
|
204
|
-
found.add(name);
|
|
205
|
-
const def = defs.get(name);
|
|
206
|
-
if (def) collectRefs(def, defs, found);
|
|
207
|
-
}
|
|
208
|
-
return found;
|
|
209
|
-
}
|
|
210
|
-
for (const v of Object.values(obj)) {
|
|
211
|
-
if (v && typeof v === "object") {
|
|
212
|
-
if (Array.isArray(v)) {
|
|
213
|
-
for (const item of v) collectRefs(item, defs, found);
|
|
214
|
-
} else {
|
|
215
|
-
collectRefs(v, defs, found);
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
return found;
|
|
220
|
-
};
|
|
221
|
-
var reattachDefs = (schema, defs) => {
|
|
222
|
-
if (schema == null || typeof schema !== "object") return schema;
|
|
223
|
-
const refs = collectRefs(schema, defs);
|
|
224
|
-
if (refs.size === 0) return schema;
|
|
225
|
-
const attached = {};
|
|
226
|
-
for (const name of refs) {
|
|
227
|
-
const def = defs.get(name);
|
|
228
|
-
if (def) attached[name] = def;
|
|
229
|
-
}
|
|
230
|
-
return { ...schema, $defs: attached };
|
|
231
|
-
};
|
|
232
|
-
|
|
233
|
-
// src/api-errors.ts
|
|
234
|
-
import { Schema } from "effect";
|
|
235
|
-
var InternalError = class extends Schema.TaggedErrorClass()(
|
|
236
|
-
"InternalError",
|
|
237
|
-
{
|
|
238
|
-
/** Opaque correlation id for backend lookup (Sentry event id, log line, etc.). */
|
|
239
|
-
traceId: Schema.String
|
|
240
|
-
},
|
|
241
|
-
{ httpApiStatus: 500 }
|
|
242
|
-
) {
|
|
243
|
-
};
|
|
172
|
+
import { fumadb } from "fumadb";
|
|
173
|
+
import { column, idColumn, schema, table } from "fumadb/schema";
|
|
244
174
|
export {
|
|
245
175
|
ConfiguredCredentialBinding,
|
|
246
176
|
ConfiguredCredentialValue,
|
|
@@ -260,7 +190,6 @@ export {
|
|
|
260
190
|
CredentialBindingRef,
|
|
261
191
|
CredentialBindingResolutionStatus,
|
|
262
192
|
CredentialBindingSlotInput,
|
|
263
|
-
CredentialBindingSourceInput,
|
|
264
193
|
CredentialBindingValue,
|
|
265
194
|
Data,
|
|
266
195
|
Effect,
|
|
@@ -304,10 +233,12 @@ export {
|
|
|
304
233
|
RemoveConnectionInput,
|
|
305
234
|
RemoveCredentialBindingInput,
|
|
306
235
|
RemoveSecretInput,
|
|
236
|
+
RemoveSourceCredentialBindingInput,
|
|
307
237
|
ReplaceCredentialBindingValue,
|
|
308
238
|
ReplaceCredentialBindingsInput,
|
|
239
|
+
ReplaceSourceCredentialBindingsInput,
|
|
309
240
|
ResolvedCredentialSlot,
|
|
310
|
-
|
|
241
|
+
Schema,
|
|
311
242
|
Scope,
|
|
312
243
|
ScopeId,
|
|
313
244
|
ScopedSecretCredentialInput,
|
|
@@ -319,8 +250,11 @@ export {
|
|
|
319
250
|
SecretOwnedByConnectionError,
|
|
320
251
|
SecretRef,
|
|
321
252
|
SecretResolutionError,
|
|
322
|
-
SetCredentialBindingInput,
|
|
323
253
|
SetSecretInput,
|
|
254
|
+
SetSourceCredentialBindingInput,
|
|
255
|
+
SourceCredentialBindingSlotInput,
|
|
256
|
+
SourceCredentialBindingSource,
|
|
257
|
+
SourceCredentialBindingSourceInput,
|
|
324
258
|
SourceDetectionResult,
|
|
325
259
|
SourceNotFoundError,
|
|
326
260
|
SourceRemovalNotAllowedError,
|
|
@@ -332,6 +266,7 @@ export {
|
|
|
332
266
|
ToolInvocationError,
|
|
333
267
|
ToolNotFoundError,
|
|
334
268
|
ToolPolicyActionSchema,
|
|
269
|
+
ToolResult,
|
|
335
270
|
ToolSchema,
|
|
336
271
|
UniqueViolationError,
|
|
337
272
|
UpdateConnectionTokensInput,
|
|
@@ -339,11 +274,15 @@ export {
|
|
|
339
274
|
Usage,
|
|
340
275
|
assertSupportedOAuthEndpointUrl,
|
|
341
276
|
beginDynamicAuthorization,
|
|
277
|
+
bigintColumn,
|
|
278
|
+
boolColumn,
|
|
342
279
|
buildAuthorizationUrl,
|
|
343
280
|
buildToolTypeScriptPreview,
|
|
344
281
|
collectRefs,
|
|
345
|
-
|
|
282
|
+
collectTables,
|
|
283
|
+
column,
|
|
346
284
|
coreSchema,
|
|
285
|
+
coreToolsPlugin,
|
|
347
286
|
createExecutor,
|
|
348
287
|
createPkceCodeChallenge,
|
|
349
288
|
createPkceCodeVerifier,
|
|
@@ -352,27 +291,38 @@ export {
|
|
|
352
291
|
credentialBindingValueFromRow,
|
|
353
292
|
credentialSlotKey,
|
|
354
293
|
credentialSlotPart,
|
|
294
|
+
dateColumn,
|
|
295
|
+
defaultSourceInstallScopeId,
|
|
355
296
|
defineExecutorConfig,
|
|
356
297
|
definePlugin,
|
|
357
|
-
defineSchema,
|
|
358
298
|
discoverAuthorizationServerMetadata,
|
|
359
299
|
discoverProtectedResourceMetadata,
|
|
360
300
|
effectivePolicyFromSorted,
|
|
361
301
|
exchangeAuthorizationCode,
|
|
362
302
|
exchangeClientCredentials,
|
|
303
|
+
schema as fumaSchema,
|
|
304
|
+
fumadb,
|
|
363
305
|
hoistDefinitions,
|
|
306
|
+
idColumn,
|
|
364
307
|
isOAuthPopupResult,
|
|
365
308
|
isSecretBackedRef,
|
|
309
|
+
isStorageFailure,
|
|
366
310
|
isSupportedOAuthEndpointUrl,
|
|
367
311
|
isToolPolicyAction,
|
|
312
|
+
isToolResult,
|
|
368
313
|
isValidPattern,
|
|
314
|
+
jsonColumn,
|
|
315
|
+
makeFumaBlobStore,
|
|
369
316
|
makeHostedHttpClientLayer,
|
|
370
317
|
makeInMemoryBlobStore,
|
|
371
318
|
makeOAuth2Service,
|
|
372
|
-
makeTestConfig,
|
|
373
319
|
matchPattern,
|
|
374
320
|
normalizeRefs,
|
|
321
|
+
nullableBigintColumn,
|
|
322
|
+
nullableJsonColumn,
|
|
323
|
+
nullableTextColumn,
|
|
375
324
|
pluginBlobStore,
|
|
325
|
+
pluginStorageId,
|
|
376
326
|
reattachDefs,
|
|
377
327
|
refreshAccessToken,
|
|
378
328
|
registerDynamicClient,
|
|
@@ -382,9 +332,11 @@ export {
|
|
|
382
332
|
rowToToolPolicy,
|
|
383
333
|
schemaToTypeScriptPreview,
|
|
384
334
|
schemaToTypeScriptPreviewWithDefs,
|
|
335
|
+
scopedExecutorTable,
|
|
385
336
|
shouldRefreshToken,
|
|
337
|
+
table,
|
|
338
|
+
textColumn,
|
|
386
339
|
tool,
|
|
387
|
-
typedAdapter,
|
|
388
340
|
validateHostedOutboundUrl
|
|
389
341
|
};
|
|
390
342
|
//# sourceMappingURL=core.js.map
|
package/dist/core.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/oauth-popup-types.ts","../src/schema-refs.ts","../src/api-errors.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// @executor-js/sdk — public surface\n// ---------------------------------------------------------------------------\n\n// Re-export the Effect/Schema/HttpApi primitives plugin authors need so a\n// plugin can be written importing only from `@executor-js/sdk`. Authors who\n// want to reach for additional Effect APIs keep importing from `effect/*`\n// directly — these re-exports are the curated minimum.\nexport { Context, Effect, Layer, Schema, Data, Option } from \"effect\";\nexport {\n HttpApi,\n HttpApiBuilder,\n HttpApiClient,\n HttpApiEndpoint,\n HttpApiGroup,\n HttpApiMiddleware,\n HttpApiSchema,\n} from \"effect/unstable/httpapi\";\n\n// Storage adapter interface types (re-exported from @executor-js/storage-core\n// so plugin authors can write adapters against a single public surface\n// without depending on storage-core directly).\nexport type {\n DBAdapter,\n DBSchema,\n DBFieldAttribute,\n DBFieldType,\n StorageFailure,\n TypedAdapter,\n Where,\n WhereOperator,\n} from \"@executor-js/storage-core\";\n\nexport { typedAdapter } from \"@executor-js/storage-core\";\n\n// Storage-layer typed errors (re-exported so plugin code can catchTag\n// `UniqueViolationError` without importing storage-core directly).\nexport { StorageError, UniqueViolationError } from \"@executor-js/storage-core\";\n\n// IDs (branded)\nexport { ScopeId, ToolId, SecretId, PolicyId, ConnectionId, CredentialBindingId } from \"./ids\";\n\n// Scope\nexport { Scope } from \"./scope\";\n\n// Errors (tagged)\nexport {\n ToolNotFoundError,\n ToolInvocationError,\n ToolBlockedError,\n NoHandlerError,\n SourceNotFoundError,\n SourceRemovalNotAllowedError,\n PluginNotLoadedError,\n SecretNotFoundError,\n SecretResolutionError,\n SecretOwnedByConnectionError,\n SecretInUseError,\n ConnectionNotFoundError,\n ConnectionProviderNotRegisteredError,\n ConnectionRefreshNotSupportedError,\n ConnectionReauthRequiredError,\n ConnectionInUseError,\n type ExecutorError,\n} from \"./errors\";\n\n// Public projections\nexport {\n ToolSchema,\n SourceDetectionResult,\n type RefreshSourceInput,\n type RemoveSourceInput,\n type Source,\n type Tool,\n type ToolListFilter,\n} from \"./types\";\n\n// Core schema\nexport {\n coreSchema,\n isToolPolicyAction,\n TOOL_POLICY_ACTIONS,\n type CoreSchema,\n type SourceInput,\n type SourceInputTool,\n type SourceRow,\n type ToolRow,\n type DefinitionRow,\n type SecretRow,\n type ConnectionRow,\n type CredentialBindingRow,\n type ToolPolicyRow,\n type ToolPolicyAction,\n type DefinitionsInput,\n type ToolAnnotations,\n} from \"./core-schema\";\n\n// Tool policies\nexport {\n matchPattern,\n isValidPattern,\n resolveToolPolicy,\n resolveEffectivePolicy,\n effectivePolicyFromSorted,\n rowToToolPolicy,\n ToolPolicyActionSchema,\n type ToolPolicy,\n type CreateToolPolicyInput,\n type UpdateToolPolicyInput,\n type RemoveToolPolicyInput,\n type PolicyMatch,\n type EffectivePolicy,\n type PolicySource,\n} from \"./policies\";\n\n// Secrets\nexport { SecretRef, SetSecretInput, RemoveSecretInput, type SecretProvider } from \"./secrets\";\n\nexport {\n SecretBackedMap,\n SecretBackedValue,\n isSecretBackedRef,\n resolveSecretBackedMap,\n type ResolveSecretBackedMapOptions,\n} from \"./secret-backed-value\";\n\nexport {\n CredentialBindingKind,\n CredentialBindingValue,\n ConfiguredCredentialBinding,\n ConfiguredCredentialValue,\n ScopedSecretCredentialInput,\n CredentialBindingRef,\n SetCredentialBindingInput,\n CredentialBindingSourceInput,\n CredentialBindingSlotInput,\n RemoveCredentialBindingInput,\n ReplaceCredentialBindingValue,\n ReplaceCredentialBindingsInput,\n CredentialBindingResolutionStatus,\n ResolvedCredentialSlot,\n credentialBindingId,\n credentialSlotKey,\n credentialSlotPart,\n credentialBindingRowToRef,\n credentialBindingValueFromRow,\n type CredentialBindingsFacade,\n} from \"./credential-bindings\";\n\n// Usage tracking — secret/connection refs across plugins\nexport { Usage, type UsagesForSecretInput, type UsagesForConnectionInput } from \"./usages\";\n\n// Connections\nexport {\n ConnectionRef,\n ConnectionProviderState,\n CreateConnectionInput,\n RemoveConnectionInput,\n UpdateConnectionTokensInput,\n TokenMaterial,\n ConnectionRefreshError,\n type ConnectionProvider,\n type ConnectionRefreshInput,\n type ConnectionRefreshResult,\n} from \"./connections\";\n\n// Elicitation\nexport {\n FormElicitation,\n UrlElicitation,\n ElicitationAction,\n ElicitationResponse,\n ElicitationDeclinedError,\n type ElicitationRequest,\n type ElicitationHandler,\n type ElicitationContext,\n} from \"./elicitation\";\n\n// Blob store\nexport {\n type BlobStore,\n type PluginBlobStore,\n pluginBlobStore,\n makeInMemoryBlobStore,\n} from \"./blob\";\n\n// OAuth 2.1\nexport {\n type OAuthService,\n type OAuthStrategy,\n type OAuthDynamicDcrStrategy,\n type OAuthAuthorizationCodeStrategy,\n type OAuthClientCredentialsStrategy,\n type OAuthProviderState,\n type OAuthProbeInput,\n type OAuthProbeResult,\n type OAuthStartInput,\n type OAuthStartResult,\n type OAuthCompleteInput,\n type OAuthCompleteResult,\n OAuthProbeError,\n OAuthStartError,\n OAuthCompleteError,\n OAuthSessionNotFoundError,\n OAUTH2_PROVIDER_KEY,\n OAUTH2_SESSION_TTL_MS,\n OAuthStrategy as OAuthStrategySchema,\n OAuthProviderState as OAuthProviderStateSchema,\n OAuthDynamicDcrStrategy as OAuthDynamicDcrStrategySchema,\n OAuthAuthorizationCodeStrategy as OAuthAuthorizationCodeStrategySchema,\n OAuthClientCredentialsStrategy as OAuthClientCredentialsStrategySchema,\n} from \"./oauth\";\n\nexport {\n OAuth2Error,\n OAUTH2_DEFAULT_TIMEOUT_MS,\n OAUTH2_REFRESH_SKEW_MS,\n assertSupportedOAuthEndpointUrl,\n buildAuthorizationUrl,\n createPkceCodeChallenge,\n createPkceCodeVerifier,\n exchangeAuthorizationCode,\n exchangeClientCredentials,\n isSupportedOAuthEndpointUrl,\n refreshAccessToken,\n shouldRefreshToken,\n type OAuth2TokenResponse,\n type BuildAuthorizationUrlInput,\n type ClientAuthMethod,\n type ExchangeAuthorizationCodeInput,\n type ExchangeClientCredentialsInput,\n type RefreshAccessTokenInput,\n} from \"./oauth-helpers\";\n\nexport { makeOAuth2Service, type OAuthServiceDeps } from \"./oauth-service\";\nexport type { ScopedDBAdapter, ScopedTypedAdapter } from \"./scoped-adapter\";\n\nexport {\n HostedOutboundRequestBlocked,\n makeHostedHttpClientLayer,\n validateHostedOutboundUrl,\n type HostedHttpClientOptions,\n} from \"./hosted-http-client\";\n\nexport {\n OAuthDiscoveryError,\n OAuthAuthorizationServerMetadataSchema,\n OAuthClientInformationSchema,\n OAuthProtectedResourceMetadataSchema,\n beginDynamicAuthorization,\n discoverAuthorizationServerMetadata,\n discoverProtectedResourceMetadata,\n registerDynamicClient,\n type BeginDynamicAuthorizationInput,\n type DiscoveryRequestOptions,\n type DynamicAuthorizationState,\n type DynamicAuthorizationStartResult,\n type DynamicClientMetadata,\n type OAuthAuthorizationServerMetadata,\n type OAuthClientInformation,\n type OAuthProtectedResourceMetadata,\n type RegisterDynamicClientInput,\n} from \"./oauth-discovery\";\n\nexport {\n OAUTH_POPUP_MESSAGE_TYPE,\n type OAuthPopupResult,\n isOAuthPopupResult,\n} from \"./oauth-popup-types\";\n\n// Plugin definition\nexport {\n type Plugin,\n type PluginSpec,\n type PluginCtx,\n type PluginExtensions,\n type ConfiguredPlugin,\n type AnyPlugin,\n type StorageDeps,\n type StaticSourceDecl,\n type StaticToolDecl,\n type StaticToolExecuteContext,\n type StaticToolHandlerInput,\n type StaticToolInput,\n type InvokeToolInput,\n type SourceLifecycleInput,\n type SecretListEntry,\n type Elicit,\n definePlugin,\n defineSchema,\n tool,\n} from \"./plugin\";\n\n// Executor\nexport {\n type Executor,\n type ExecutorConfig,\n type OnElicitation,\n type InvokeOptions,\n createExecutor,\n collectSchemas,\n} from \"./executor\";\n\n// CLI / runtime config\nexport {\n defineExecutorConfig,\n type ExecutorCliConfig,\n type ExecutorDialect,\n type ExecutorPluginsFactory,\n} from \"./config\";\n\n// Test helper\nexport { makeTestConfig } from \"./test-config\";\n\n// JSON schema $ref helpers (used by openapi for $defs handling)\nexport { hoistDefinitions, collectRefs, reattachDefs, normalizeRefs } from \"./schema-refs\";\n\n// TypeScript preview generation from JSON schemas\nexport {\n schemaToTypeScriptPreview,\n schemaToTypeScriptPreviewWithDefs,\n buildToolTypeScriptPreview,\n type TypeScriptRenderOptions,\n type TypeScriptSchemaPreview,\n} from \"./schema-types\";\n\n// Wire-level HTTP error schemas usable by plugin HttpApiGroup definitions.\nexport { InternalError } from \"./api-errors\";\n","// ---------------------------------------------------------------------------\n// OAuth popup result — the message shape exchanged between the popup window\n// (opened during authorization) and the opener (the onboarding UI). Both the\n// server-side HTML generator and the client-side popup opener agree on this\n// shape so that success / failure can be communicated reliably via both\n// `postMessage` and `BroadcastChannel`.\n// ---------------------------------------------------------------------------\n\n/** Message type literal used to identify our popup results. */\nexport const OAUTH_POPUP_MESSAGE_TYPE = \"executor:oauth-result\" as const;\n\nexport type OAuthPopupResult<TAuth> =\n | ({\n readonly type: typeof OAUTH_POPUP_MESSAGE_TYPE;\n readonly ok: true;\n readonly sessionId: string;\n } & TAuth)\n | {\n readonly type: typeof OAUTH_POPUP_MESSAGE_TYPE;\n readonly ok: false;\n readonly sessionId: string | null;\n /** Short user-facing summary. */\n readonly error: string;\n /** Full technical detail. Omitted when identical to `error`. */\n readonly errorDetails?: string;\n };\n\nexport const isOAuthPopupResult = <TAuth>(value: unknown): value is OAuthPopupResult<TAuth> =>\n typeof value === \"object\" &&\n value !== null &&\n (value as { type?: unknown }).type === OAUTH_POPUP_MESSAGE_TYPE;\n","// ---------------------------------------------------------------------------\n// JSON Schema $ref hoisting and re-attachment\n//\n// Core logic for deduplicating shared definitions across tools.\n// Used by any ToolRegistry implementation (in-memory, database-backed, etc.)\n//\n// Only handles standard JSON Schema formats ($defs, definitions).\n// Plugin-specific formats (e.g. OpenAPI components/schemas) must be\n// normalized by the plugin before calling registerDefinitions/register.\n// ---------------------------------------------------------------------------\n\ntype Obj = Record<string, unknown>;\n\n/** Standard JSON Schema $ref patterns. */\nconst REF_PATTERN = /^#\\/(?:\\$defs|definitions)\\/(.+)$/;\n\n/** Extract the definition name from a standard $ref pointer. */\nconst parseRefName = (ref: string): string | undefined => ref.match(REF_PATTERN)?.[1];\n\n/**\n * Recursively rewrite `#/definitions/<name>` pointers to `#/$defs/<name>`.\n * Returns the input unchanged if no rewrites are needed.\n */\nexport const normalizeRefs = (node: unknown): unknown => {\n if (node == null || typeof node !== \"object\") return node;\n if (Array.isArray(node)) {\n let changed = false;\n const out = node.map((item) => {\n const n = normalizeRefs(item);\n if (n !== item) changed = true;\n return n;\n });\n return changed ? out : node;\n }\n\n const obj = node as Obj;\n\n if (typeof obj.$ref === \"string\") {\n const name = parseRefName(obj.$ref);\n if (name) {\n const canonical = `#/$defs/${name}`;\n return canonical !== obj.$ref ? { ...obj, $ref: canonical } : obj;\n }\n return obj;\n }\n\n let changed = false;\n const result: Obj = {};\n for (const [k, v] of Object.entries(obj)) {\n const n = normalizeRefs(v);\n if (n !== v) changed = true;\n result[k] = n;\n }\n return changed ? result : obj;\n};\n\n/**\n * Extract `$defs` and `definitions` from a JSON Schema,\n * returning { stripped, defs } where `stripped` is the schema without local\n * definitions and `defs` is a flat map of definition name → schema.\n */\nexport const hoistDefinitions = (\n schema: unknown,\n): { stripped: unknown; defs: Record<string, unknown> } => {\n if (schema == null || typeof schema !== \"object\") {\n return { stripped: schema, defs: {} };\n }\n const obj = schema as Obj;\n const defs: Record<string, unknown> = {};\n\n if (obj.$defs && typeof obj.$defs === \"object\") {\n for (const [k, v] of Object.entries(obj.$defs as Obj)) {\n defs[k] = v;\n }\n }\n\n if (obj.definitions && typeof obj.definitions === \"object\") {\n for (const [k, v] of Object.entries(obj.definitions as Obj)) {\n defs[k] = v;\n }\n }\n\n const { $defs: _a, definitions: _b, ...rest } = obj;\n return { stripped: rest, defs };\n};\n\n/**\n * Walk a schema and collect all $ref target names transitively.\n * e.g. \"#/$defs/Address\" → \"Address\", and if Address references City, both.\n */\nexport const collectRefs = (\n node: unknown,\n defs: ReadonlyMap<string, unknown>,\n found: Set<string> = new Set(),\n): Set<string> => {\n if (node == null || typeof node !== \"object\") return found;\n const obj = node as Obj;\n\n if (typeof obj.$ref === \"string\") {\n const name = parseRefName(obj.$ref);\n if (name && !found.has(name)) {\n found.add(name);\n const def = defs.get(name);\n if (def) collectRefs(def, defs, found);\n }\n return found;\n }\n\n for (const v of Object.values(obj)) {\n if (v && typeof v === \"object\") {\n if (Array.isArray(v)) {\n for (const item of v) collectRefs(item, defs, found);\n } else {\n collectRefs(v, defs, found);\n }\n }\n }\n return found;\n};\n\n/**\n * Re-attach only the referenced shared definitions into a schema,\n * so the caller gets a self-contained, usable JSON Schema.\n *\n * Assumes all `$ref` pointers and definitions have already been normalized\n * to `#/$defs/<name>` form at registration time.\n */\nexport const reattachDefs = (schema: unknown, defs: ReadonlyMap<string, unknown>): unknown => {\n if (schema == null || typeof schema !== \"object\") return schema;\n const refs = collectRefs(schema, defs);\n if (refs.size === 0) return schema;\n\n const attached: Record<string, unknown> = {};\n for (const name of refs) {\n const def = defs.get(name);\n if (def) attached[name] = def;\n }\n\n return { ...(schema as Record<string, unknown>), $defs: attached };\n};\n","// ---------------------------------------------------------------------------\n// Wire-level HTTP errors. Lives in the SDK so plugin `HttpApiGroup`\n// definitions (which sit on the SDK side of the dependency graph and\n// must stay publishable) can declare them without dragging in the\n// server-only `@executor-js/api` package. The HTTP edge in\n// `@executor-js/api` re-exports these and pairs them with the\n// translation/capture helpers used by handlers.\n// ---------------------------------------------------------------------------\n\nimport { Schema } from \"effect\";\n\n/** Public 500 surface. Opaque by schema — only `traceId` crosses the wire. */\nexport class InternalError extends Schema.TaggedErrorClass<InternalError>()(\n \"InternalError\",\n {\n /** Opaque correlation id for backend lookup (Sentry event id, log line, etc.). */\n traceId: Schema.String,\n },\n { httpApiStatus: 500 },\n) {}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,SAAS,SAAS,QAAQ,OAAO,UAAAA,SAAQ,MAAM,cAAc;AAC7D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAgBP,SAAS,oBAAoB;AAI7B,SAAS,cAAc,4BAA4B;;;AC5B5C,IAAM,2BAA2B;AAkBjC,IAAM,qBAAqB,CAAQ,UACxC,OAAO,UAAU,YACjB,UAAU,QACT,MAA6B,SAAS;;;AChBzC,IAAM,cAAc;AAGpB,IAAM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S,cAAc;AAGhB,IAAM,gBAAN,cAA4B,OAAO,iBAAgC;AAAA,EACxE;AAAA,EACA;AAAA;AAAA,IAEE,SAAS,OAAO;AAAA,EAClB;AAAA,EACA,EAAE,eAAe,IAAI;AACvB,EAAE;AAAC;","names":["Schema","changed"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// @executor-js/sdk — public surface\n// ---------------------------------------------------------------------------\n\n// Re-export the Effect/Schema/HttpApi primitives plugin authors need so a\n// plugin can be written importing only from `@executor-js/sdk`. Authors who\n// want to reach for additional Effect APIs keep importing from `effect/*`\n// directly — these re-exports are the curated minimum.\nexport { Context, Effect, Layer, Schema, Data, Option } from \"effect\";\nexport {\n HttpApi,\n HttpApiBuilder,\n HttpApiClient,\n HttpApiEndpoint,\n HttpApiGroup,\n HttpApiMiddleware,\n HttpApiSchema,\n} from \"effect/unstable/httpapi\";\n\n// FumaDB integration.\nexport { fumadb } from \"fumadb\";\nexport type { FumaDB } from \"fumadb\";\nexport type { AbstractQuery, Condition, ConditionBuilder } from \"fumadb/query\";\nexport { column, idColumn, schema as fumaSchema, table } from \"fumadb/schema\";\nexport type { AnyColumn, AnySchema, AnyTable, Column, Schema as FumaSchema } from \"fumadb/schema\";\n\nexport type {\n FumaDb,\n FumaQuery,\n FumaRow,\n FumaTables,\n IFumaClient,\n StorageFailure,\n} from \"./fuma-runtime\";\nexport { StorageError, UniqueViolationError, isStorageFailure } from \"./fuma-runtime\";\n\n// Storage-layer typed errors are still exported so plugin code can catchTag\n// `UniqueViolationError`, but FumaDB itself is the storage API.\n\n// IDs (branded)\nexport { ScopeId, ToolId, SecretId, PolicyId, ConnectionId, CredentialBindingId } from \"./ids\";\n\n// Scope\nexport { Scope, defaultSourceInstallScopeId } from \"./scope\";\n\n// Errors (tagged)\nexport {\n ToolNotFoundError,\n ToolInvocationError,\n ToolBlockedError,\n NoHandlerError,\n SourceNotFoundError,\n SourceRemovalNotAllowedError,\n PluginNotLoadedError,\n SecretNotFoundError,\n SecretResolutionError,\n SecretOwnedByConnectionError,\n SecretInUseError,\n ConnectionNotFoundError,\n ConnectionProviderNotRegisteredError,\n ConnectionRefreshNotSupportedError,\n ConnectionReauthRequiredError,\n ConnectionInUseError,\n type ExecutorError,\n} from \"./errors\";\n\n// Public projections\nexport {\n ToolSchema,\n SourceDetectionResult,\n type RefreshSourceInput,\n type RemoveSourceInput,\n type Source,\n type Tool,\n type ToolListFilter,\n} from \"./types\";\n\n// Core schema\nexport {\n bigintColumn,\n boolColumn,\n coreSchema,\n dateColumn,\n isToolPolicyAction,\n jsonColumn,\n nullableBigintColumn,\n nullableJsonColumn,\n nullableTextColumn,\n scopedExecutorTable,\n textColumn,\n TOOL_POLICY_ACTIONS,\n type CoreSchema,\n type SourceInput,\n type SourceInputTool,\n type SourceRow,\n type ToolRow,\n type DefinitionRow,\n type SecretRow,\n type ConnectionRow,\n type PluginStorageRow,\n type CredentialBindingRow,\n type ToolPolicyRow,\n type ToolPolicyAction,\n type DefinitionsInput,\n type ToolAnnotations,\n} from \"./core-schema\";\n\n// Tool policies\nexport {\n matchPattern,\n isValidPattern,\n resolveToolPolicy,\n resolveEffectivePolicy,\n effectivePolicyFromSorted,\n rowToToolPolicy,\n ToolPolicyActionSchema,\n type ToolPolicy,\n type CreateToolPolicyInput,\n type UpdateToolPolicyInput,\n type RemoveToolPolicyInput,\n type PolicyMatch,\n type EffectivePolicy,\n type PolicySource,\n} from \"./policies\";\n\n// Secrets\nexport { SecretRef, SetSecretInput, RemoveSecretInput, type SecretProvider } from \"./secrets\";\n\nexport {\n SecretBackedMap,\n SecretBackedValue,\n isSecretBackedRef,\n resolveSecretBackedMap,\n type ResolveSecretBackedMapOptions,\n} from \"./secret-backed-value\";\n\nexport {\n CredentialBindingKind,\n CredentialBindingValue,\n ConfiguredCredentialBinding,\n ConfiguredCredentialValue,\n ScopedSecretCredentialInput,\n CredentialBindingRef,\n CredentialBindingSlotInput,\n RemoveCredentialBindingInput,\n RemoveSourceCredentialBindingInput,\n ReplaceCredentialBindingValue,\n ReplaceCredentialBindingsInput,\n ReplaceSourceCredentialBindingsInput,\n CredentialBindingResolutionStatus,\n ResolvedCredentialSlot,\n SetSourceCredentialBindingInput,\n SourceCredentialBindingSource,\n SourceCredentialBindingSourceInput,\n SourceCredentialBindingSlotInput,\n credentialBindingId,\n credentialSlotKey,\n credentialSlotPart,\n credentialBindingRowToRef,\n credentialBindingValueFromRow,\n type CredentialBindingsFacade,\n} from \"./credential-bindings\";\n\n// Usage tracking — secret/connection refs across plugins\nexport { Usage, type UsagesForSecretInput, type UsagesForConnectionInput } from \"./usages\";\n\n// Connections\nexport {\n ConnectionRef,\n ConnectionProviderState,\n CreateConnectionInput,\n RemoveConnectionInput,\n UpdateConnectionTokensInput,\n TokenMaterial,\n ConnectionRefreshError,\n type ConnectionProvider,\n type ConnectionRefreshInput,\n type ConnectionRefreshResult,\n} from \"./connections\";\n\n// Elicitation\nexport {\n FormElicitation,\n UrlElicitation,\n ElicitationAction,\n ElicitationResponse,\n ElicitationDeclinedError,\n type ElicitationRequest,\n type ElicitationHandler,\n type ElicitationContext,\n} from \"./elicitation\";\n\n// Blob store\nexport {\n type BlobStore,\n type PluginBlobStore,\n pluginBlobStore,\n makeFumaBlobStore,\n makeInMemoryBlobStore,\n} from \"./blob\";\n\n// OAuth 2.1\nexport {\n type OAuthService,\n type OAuthStrategy,\n type OAuthDynamicDcrStrategy,\n type OAuthAuthorizationCodeStrategy,\n type OAuthClientCredentialsStrategy,\n type OAuthProviderState,\n type OAuthProbeInput,\n type OAuthProbeResult,\n type OAuthStartInput,\n type OAuthStartResult,\n type OAuthCompleteInput,\n type OAuthCompleteResult,\n OAuthProbeError,\n OAuthStartError,\n OAuthCompleteError,\n OAuthSessionNotFoundError,\n OAUTH2_PROVIDER_KEY,\n OAUTH2_SESSION_TTL_MS,\n OAuthStrategy as OAuthStrategySchema,\n OAuthProviderState as OAuthProviderStateSchema,\n OAuthDynamicDcrStrategy as OAuthDynamicDcrStrategySchema,\n OAuthAuthorizationCodeStrategy as OAuthAuthorizationCodeStrategySchema,\n OAuthClientCredentialsStrategy as OAuthClientCredentialsStrategySchema,\n} from \"./oauth\";\n\nexport {\n OAuth2Error,\n OAUTH2_DEFAULT_TIMEOUT_MS,\n OAUTH2_REFRESH_SKEW_MS,\n assertSupportedOAuthEndpointUrl,\n buildAuthorizationUrl,\n createPkceCodeChallenge,\n createPkceCodeVerifier,\n exchangeAuthorizationCode,\n exchangeClientCredentials,\n isSupportedOAuthEndpointUrl,\n refreshAccessToken,\n shouldRefreshToken,\n type OAuth2TokenResponse,\n type BuildAuthorizationUrlInput,\n type ClientAuthMethod,\n type ExchangeAuthorizationCodeInput,\n type ExchangeClientCredentialsInput,\n type RefreshAccessTokenInput,\n} from \"./oauth-helpers\";\n\nexport { makeOAuth2Service, type OAuthServiceDeps } from \"./oauth-service\";\n\nexport {\n HostedOutboundRequestBlocked,\n makeHostedHttpClientLayer,\n validateHostedOutboundUrl,\n type HostedHttpClientOptions,\n} from \"./hosted-http-client\";\n\nexport {\n OAuthDiscoveryError,\n OAuthAuthorizationServerMetadataSchema,\n OAuthClientInformationSchema,\n OAuthProtectedResourceMetadataSchema,\n beginDynamicAuthorization,\n discoverAuthorizationServerMetadata,\n discoverProtectedResourceMetadata,\n registerDynamicClient,\n type BeginDynamicAuthorizationInput,\n type DiscoveryRequestOptions,\n type DynamicAuthorizationState,\n type DynamicAuthorizationStartResult,\n type DynamicClientMetadata,\n type OAuthAuthorizationServerMetadata,\n type OAuthClientInformation,\n type OAuthProtectedResourceMetadata,\n type RegisterDynamicClientInput,\n} from \"./oauth-discovery\";\n\nexport {\n OAUTH_POPUP_MESSAGE_TYPE,\n type OAuthPopupResult,\n isOAuthPopupResult,\n} from \"./oauth-popup-types\";\n\n// Plugin definition\nexport {\n type Plugin,\n type PluginSpec,\n type PluginCtx,\n type PluginExtensions,\n type ConfiguredPlugin,\n type AnyPlugin,\n type StorageDeps,\n type StaticSourceDecl,\n type StaticToolDecl,\n type StaticToolSchema,\n type StaticToolExecuteContext,\n type StaticToolHandlerInput,\n type StaticToolInput,\n type ConfigureSourceHandlerInput,\n type InvokeToolInput,\n type SourceLifecycleInput,\n type SourceConfigureDecl,\n type SecretListEntry,\n type Elicit,\n definePlugin,\n tool,\n} from \"./plugin\";\nexport {\n pluginStorageId,\n type PluginStorageEntry,\n type PluginStorageFacade,\n type PluginStorageKeyInput,\n type PluginStorageListInput,\n type PluginStoragePutInput,\n type PluginStorageScopedKeyInput,\n} from \"./plugin-storage\";\n\n// Executor\nexport {\n type Executor,\n type ExecutorConfig,\n type ExecutorDb,\n type ExecutorDbFactory,\n type ExecutorDbInput,\n type OnElicitation,\n type InvokeOptions,\n createExecutor,\n collectTables,\n} from \"./executor\";\n\n// Built-in core-tools plugin (scopes.list, secrets.list, secrets.create\n// with URL elicitation). Auto-registered by createExecutor when\n// `coreTools` is set on the config; also exportable for callers who\n// want to register it manually.\nexport { coreToolsPlugin, type CoreToolsPluginOptions } from \"./core-tools\";\n\n// CLI / runtime config\nexport {\n defineExecutorConfig,\n type ExecutorCliConfig,\n type ExecutorPluginsFactory,\n} from \"./config\";\n\n// JSON schema $ref helpers (used by openapi for $defs handling)\nexport { hoistDefinitions, collectRefs, reattachDefs, normalizeRefs } from \"./schema-refs\";\n\n// TypeScript preview generation from JSON schemas\nexport {\n schemaToTypeScriptPreview,\n schemaToTypeScriptPreviewWithDefs,\n buildToolTypeScriptPreview,\n type TypeScriptRenderOptions,\n type TypeScriptSchemaPreview,\n} from \"./schema-types\";\n\n// Wire-level HTTP error schemas usable by plugin HttpApiGroup definitions.\nexport { InternalError } from \"./api-errors\";\n\n// ToolResult — typed value-based discriminated union for tool outcomes.\n// The `Tool` value namespace exposes `Tool.ok` / `Tool.fail` constructors;\n// the `Tool` type alias from `./types` is a separate row projection.\n// TypeScript permits the two to share a name because one is purely a\n// value and the other purely a type.\nexport { ToolResult, isToolResult, type ToolError } from \"./tool-result\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,SAAS,SAAS,QAAQ,OAAO,QAAQ,MAAM,cAAc;AAC7D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP,SAAS,cAAc;AAGvB,SAAS,QAAQ,UAAoB,QAAY,aAAa;","names":[]}
|