@executor-js/sdk 1.5.5 → 1.5.7
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 +4 -0
- package/dist/blob.d.ts.map +1 -1
- package/dist/{chunk-VAJYYP2A.js → chunk-ARH4MAGG.js} +2 -2
- package/dist/{chunk-777N6JVG.js → chunk-I3X6242Q.js} +1 -1
- package/dist/chunk-I3X6242Q.js.map +1 -0
- package/dist/{chunk-3RRMGXEN.js → chunk-UKOTOKXM.js} +1 -1
- package/dist/{chunk-3RRMGXEN.js.map → chunk-UKOTOKXM.js.map} +1 -1
- package/dist/{chunk-WN6EB76P.js → chunk-YPVKRUZV.js} +50 -16
- package/dist/chunk-YPVKRUZV.js.map +1 -0
- package/dist/core-schema.d.ts +7 -0
- package/dist/core-schema.d.ts.map +1 -1
- package/dist/core.js +175 -9
- package/dist/core.js.map +1 -1
- package/dist/executor-fuma-db.d.ts +8 -0
- package/dist/executor-fuma-db.d.ts.map +1 -1
- package/dist/executor.d.ts +8 -0
- package/dist/executor.d.ts.map +1 -1
- package/dist/host-internal.js +3 -3
- package/dist/http-auth/auth-method.d.ts +81 -0
- package/dist/http-auth/auth-method.d.ts.map +1 -0
- package/dist/http-auth/auth-method.test.d.ts +2 -0
- package/dist/http-auth/auth-method.test.d.ts.map +1 -0
- package/dist/http-auth/authoring.d.ts +52 -0
- package/dist/http-auth/authoring.d.ts.map +1 -0
- package/dist/http-auth/authoring.test.d.ts +2 -0
- package/dist/http-auth/authoring.test.d.ts.map +1 -0
- package/dist/http-auth/index.d.ts +5 -0
- package/dist/http-auth/index.d.ts.map +1 -0
- package/dist/http-auth/legacy.d.ts +42 -0
- package/dist/http-auth/legacy.d.ts.map +1 -0
- package/dist/http-auth/migrate.d.ts +30 -0
- package/dist/http-auth/migrate.d.ts.map +1 -0
- package/dist/http-auth/migrate.test.d.ts +2 -0
- package/dist/http-auth/migrate.test.d.ts.map +1 -0
- package/dist/http-auth.js +288 -0
- package/dist/http-auth.js.map +1 -0
- package/dist/index.d.ts +7 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -4
- package/dist/index.js.map +1 -1
- package/dist/integration.d.ts +8 -0
- package/dist/integration.d.ts.map +1 -1
- package/dist/oauth-client.d.ts +3 -2
- package/dist/oauth-client.d.ts.map +1 -1
- package/dist/plugin.d.ts +18 -5
- package/dist/plugin.d.ts.map +1 -1
- package/dist/promise.d.ts +1 -1
- package/dist/promise.d.ts.map +1 -1
- package/dist/shared.js +1 -1
- package/dist/sqlite-config-blob-migration.d.ts +23 -0
- package/dist/sqlite-config-blob-migration.d.ts.map +1 -0
- package/dist/sqlite-config-blob-migration.test.d.ts +2 -0
- package/dist/sqlite-config-blob-migration.test.d.ts.map +1 -0
- package/dist/sqlite-data-migrations.d.ts +50 -0
- package/dist/sqlite-data-migrations.d.ts.map +1 -0
- package/dist/sqlite-data-migrations.test.d.ts +2 -0
- package/dist/sqlite-data-migrations.test.d.ts.map +1 -0
- package/dist/sqlite-test-db-KBW52UM6.js +9 -0
- package/dist/testing.js +7 -7
- package/dist/tool-result.d.ts +15 -1
- package/dist/tool-result.d.ts.map +1 -1
- package/package.json +8 -2
- package/dist/chunk-777N6JVG.js.map +0 -1
- package/dist/chunk-WN6EB76P.js.map +0 -1
- package/dist/sqlite-test-db-AMRR6VZ6.js +0 -9
- /package/dist/{chunk-VAJYYP2A.js.map → chunk-ARH4MAGG.js.map} +0 -0
- /package/dist/{sqlite-test-db-AMRR6VZ6.js.map → sqlite-test-db-KBW52UM6.js.map} +0 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { type ApiKeyAuthMethod, type AuthPlacement } from "./auth-method";
|
|
3
|
+
export interface AuthTemplateVariable {
|
|
4
|
+
readonly type: "variable";
|
|
5
|
+
readonly name: string;
|
|
6
|
+
}
|
|
7
|
+
/** Mark where a credential input renders inside a template value:
|
|
8
|
+
* `["Bearer ", variable("token")]`. */
|
|
9
|
+
export declare const variable: (name: string) => AuthTemplateVariable;
|
|
10
|
+
/** `string` (a static literal) or `prefix literals… + one variable, last`. */
|
|
11
|
+
export declare const AuthTemplateValue: Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
12
|
+
readonly type: Schema.Literal<"variable">;
|
|
13
|
+
readonly name: Schema.String;
|
|
14
|
+
}>]>>]>;
|
|
15
|
+
export type AuthTemplateValue = typeof AuthTemplateValue.Type;
|
|
16
|
+
/** The request-shaped apikey authoring dialect. `slug` optional (backfilled
|
|
17
|
+
* like every other input); `label` optional. */
|
|
18
|
+
export declare const ApiKeyAuthTemplate: Schema.Struct<{
|
|
19
|
+
readonly slug: Schema.optional<Schema.String>;
|
|
20
|
+
readonly type: Schema.Literal<"apiKey">;
|
|
21
|
+
readonly label: Schema.optional<Schema.String>;
|
|
22
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
23
|
+
readonly type: Schema.Literal<"variable">;
|
|
24
|
+
readonly name: Schema.String;
|
|
25
|
+
}>]>>]>>>;
|
|
26
|
+
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
27
|
+
readonly type: Schema.Literal<"variable">;
|
|
28
|
+
readonly name: Schema.String;
|
|
29
|
+
}>]>>]>>>;
|
|
30
|
+
}>;
|
|
31
|
+
export type ApiKeyAuthTemplate = typeof ApiKeyAuthTemplate.Type;
|
|
32
|
+
/** Normalize the request-shaped dialect into the canonical apikey method
|
|
33
|
+
* (sans slug backfill — the caller's normalize pass owns slugs). */
|
|
34
|
+
export declare const apiKeyMethodFromAuthTemplate: (template: ApiKeyAuthTemplate) => Omit<ApiKeyAuthMethod, "slug"> & {
|
|
35
|
+
readonly slug?: string;
|
|
36
|
+
};
|
|
37
|
+
/** Serialize a canonical method back into the request-shaped dialect — the
|
|
38
|
+
* write side of read-modify-write flows (stored configs and the catalog
|
|
39
|
+
* read as placements; auth INPUTS accept only this dialect). Same-named
|
|
40
|
+
* same-carrier placements collapse, exactly as the renderer's header/query
|
|
41
|
+
* records do. */
|
|
42
|
+
export declare const apiKeyAuthTemplateFromMethod: (method: {
|
|
43
|
+
readonly slug?: string;
|
|
44
|
+
readonly label?: string;
|
|
45
|
+
readonly placements: readonly AuthPlacement[];
|
|
46
|
+
}) => ApiKeyAuthTemplate;
|
|
47
|
+
/** Whether an input union member is the request-shaped dialect. */
|
|
48
|
+
export declare const isApiKeyAuthTemplate: (input: {
|
|
49
|
+
readonly kind?: string;
|
|
50
|
+
readonly type?: string;
|
|
51
|
+
}) => input is ApiKeyAuthTemplate;
|
|
52
|
+
//# sourceMappingURL=authoring.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authoring.d.ts","sourceRoot":"","sources":["../../src/http-auth/authoring.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAkB,KAAK,gBAAgB,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAE1F,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;wCACwC;AACxC,eAAO,MAAM,QAAQ,GAAI,MAAM,MAAM,KAAG,oBAAoD,CAAC;AAU7F,8EAA8E;AAC9E,eAAO,MAAM,iBAAiB;;;OAc5B,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAC,IAAI,CAAC;AAE9D;iDACiD;AACjD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;EAM7B,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,kBAAkB,CAAC,IAAI,CAAC;AAqBhE;qEACqE;AACrE,eAAO,MAAM,4BAA4B,GACvC,UAAU,kBAAkB,KAC3B,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC,GAAG;IAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAc3D,CAAC;AAEF;;;;kBAIkB;AAClB,eAAO,MAAM,4BAA4B,GAAI,QAAQ;IACnD,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,SAAS,aAAa,EAAE,CAAC;CAC/C,KAAG,kBAmBH,CAAC;AAEF,mEAAmE;AACnE,eAAO,MAAM,oBAAoB,GAAI,OAAO;IAC1C,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB,KAAG,KAAK,IAAI,kBAA6C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authoring.test.d.ts","sourceRoot":"","sources":["../../src/http-auth/authoring.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { ApiKeyAuthMethod, AuthCarrier, AuthPlacement, NoneAuthMethod, TOKEN_VARIABLE, apiKeyMethodLabel, describeApiKeyAuthMethod, describeNoneAuthMethod, normalizeAuthMethodSlugs, oauthBearerPlacement, renderAuthPlacements, requiredPlacementVariables, type RenderedAuthPlacements, } from "./auth-method";
|
|
2
|
+
export { ApiKeyAuthTemplate, AuthTemplateValue, apiKeyAuthTemplateFromMethod, apiKeyMethodFromAuthTemplate, isApiKeyAuthTemplate, variable, type AuthTemplateVariable, } from "./authoring";
|
|
3
|
+
export { LegacyApiKeyTemplate, LegacyTemplateValue, apiKeyMethodFromLegacyTemplate, decodeLegacyApiKeyTemplate, } from "./legacy";
|
|
4
|
+
export { planAuthConfigMigration, runSqliteAuthConfigMigration, type AuthConfigMigrationRow, type AuthConfigMigrationUpdate, type AuthConfigTransform, type SqliteAuthConfigClient, } from "./migrate";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/http-auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,oBAAoB,EACpB,0BAA0B,EAC1B,KAAK,sBAAsB,GAC5B,MAAM,eAAe,CAAC;AAIvB,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,4BAA4B,EAC5B,4BAA4B,EAC5B,oBAAoB,EACpB,QAAQ,EACR,KAAK,oBAAoB,GAC1B,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,8BAA8B,EAC9B,0BAA0B,GAC3B,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,uBAAuB,EACvB,4BAA4B,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,GAC5B,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { type ApiKeyAuthMethod } from "./auth-method";
|
|
3
|
+
export declare const LegacyTemplateValue: Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
4
|
+
readonly type: Schema.Literal<"variable">;
|
|
5
|
+
readonly name: Schema.String;
|
|
6
|
+
}>]>>]>;
|
|
7
|
+
export type LegacyTemplateValue = typeof LegacyTemplateValue.Type;
|
|
8
|
+
/** The pre-canonical apiKey template shape (OpenAPI native + what the v1→v2
|
|
9
|
+
* migration wrote into MCP/GraphQL configs). */
|
|
10
|
+
export declare const LegacyApiKeyTemplate: Schema.Struct<{
|
|
11
|
+
readonly slug: Schema.String;
|
|
12
|
+
readonly type: Schema.Literal<"apiKey">;
|
|
13
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
14
|
+
readonly type: Schema.Literal<"variable">;
|
|
15
|
+
readonly name: Schema.String;
|
|
16
|
+
}>]>>]>>>;
|
|
17
|
+
readonly queryParams: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
18
|
+
readonly type: Schema.Literal<"variable">;
|
|
19
|
+
readonly name: Schema.String;
|
|
20
|
+
}>]>>]>>>;
|
|
21
|
+
}>;
|
|
22
|
+
export type LegacyApiKeyTemplate = typeof LegacyApiKeyTemplate.Type;
|
|
23
|
+
export declare const decodeLegacyApiKeyTemplate: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => import("effect/Option").Option<{
|
|
24
|
+
readonly type: "apiKey";
|
|
25
|
+
readonly slug: string;
|
|
26
|
+
readonly headers?: {
|
|
27
|
+
readonly [x: string]: string | readonly (string | {
|
|
28
|
+
readonly name: string;
|
|
29
|
+
readonly type: "variable";
|
|
30
|
+
})[];
|
|
31
|
+
} | undefined;
|
|
32
|
+
readonly queryParams?: {
|
|
33
|
+
readonly [x: string]: string | readonly (string | {
|
|
34
|
+
readonly name: string;
|
|
35
|
+
readonly type: "variable";
|
|
36
|
+
})[];
|
|
37
|
+
} | undefined;
|
|
38
|
+
}>;
|
|
39
|
+
/** Rewrite a legacy apiKey template into the canonical placements method.
|
|
40
|
+
* Slug and variable names are preserved verbatim. */
|
|
41
|
+
export declare const apiKeyMethodFromLegacyTemplate: (template: LegacyApiKeyTemplate) => ApiKeyAuthMethod;
|
|
42
|
+
//# sourceMappingURL=legacy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacy.d.ts","sourceRoot":"","sources":["../../src/http-auth/legacy.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAkB,KAAK,gBAAgB,EAAsB,MAAM,eAAe,CAAC;AAO1F,eAAO,MAAM,mBAAmB;;;OAG9B,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC,IAAI,CAAC;AAElE;iDACiD;AACjD,eAAO,MAAM,oBAAoB;;;;;;;;;;;EAK/B,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,oBAAoB,CAAC,IAAI,CAAC;AAEpE,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;EAAmD,CAAC;AAyB3F;sDACsD;AACtD,eAAO,MAAM,8BAA8B,GACzC,UAAU,oBAAoB,KAC7B,gBASF,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type AuthConfigTransform = (config: unknown) => unknown | null;
|
|
2
|
+
export interface AuthConfigMigrationRow {
|
|
3
|
+
/** The integration row's primary key (`row_id`). */
|
|
4
|
+
readonly rowId: string;
|
|
5
|
+
readonly pluginId: string;
|
|
6
|
+
readonly config: unknown;
|
|
7
|
+
}
|
|
8
|
+
export interface AuthConfigMigrationUpdate {
|
|
9
|
+
readonly rowId: string;
|
|
10
|
+
readonly config: unknown;
|
|
11
|
+
}
|
|
12
|
+
/** Plan the config rewrites for a set of integration rows. `transforms` maps
|
|
13
|
+
* plugin ids (`mcp` / `graphql` / `openapi`) to their migration functions;
|
|
14
|
+
* rows of other plugins, and rows whose transform returns null, are left
|
|
15
|
+
* untouched. */
|
|
16
|
+
export declare const planAuthConfigMigration: (rows: readonly AuthConfigMigrationRow[], transforms: Record<string, AuthConfigTransform>) => readonly AuthConfigMigrationUpdate[];
|
|
17
|
+
export interface SqliteAuthConfigClient {
|
|
18
|
+
execute(stmt: string | {
|
|
19
|
+
readonly sql: string;
|
|
20
|
+
readonly args: readonly unknown[];
|
|
21
|
+
}): Promise<{
|
|
22
|
+
readonly rows: readonly Record<string, unknown>[];
|
|
23
|
+
}>;
|
|
24
|
+
}
|
|
25
|
+
/** Rewrite pre-canonical integration `config` blobs in a SQLite database.
|
|
26
|
+
* Idempotent (canonical rows plan no updates); returns the number of rows
|
|
27
|
+
* rewritten. The `integration` table may not exist yet on a fresh database —
|
|
28
|
+
* that counts as nothing to migrate. */
|
|
29
|
+
export declare const runSqliteAuthConfigMigration: (client: SqliteAuthConfigClient, transforms: Record<string, AuthConfigTransform>) => Promise<number>;
|
|
30
|
+
//# sourceMappingURL=migrate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../src/http-auth/migrate.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,mBAAmB,GAAG,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,GAAG,IAAI,CAAC;AAEtE,MAAM,WAAW,sBAAsB;IACrC,oDAAoD;IACpD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAC1B;AAED;;;iBAGiB;AACjB,eAAO,MAAM,uBAAuB,GAClC,MAAM,SAAS,sBAAsB,EAAE,EACvC,YAAY,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,KAC9C,SAAS,yBAAyB,EASpC,CAAC;AASF,MAAM,WAAW,sBAAsB;IACrC,OAAO,CACL,IAAI,EAAE,MAAM,GAAG;QAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,OAAO,EAAE,CAAA;KAAE,GACzE,OAAO,CAAC;QAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;KAAE,CAAC,CAAC;CACnE;AAED;;;yCAGyC;AACzC,eAAO,MAAM,4BAA4B,GACvC,QAAQ,sBAAsB,EAC9B,YAAY,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,KAC9C,OAAO,CAAC,MAAM,CAqChB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate.test.d.ts","sourceRoot":"","sources":["../../src/http-auth/migrate.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import "./chunk-7D4SUZUM.js";
|
|
2
|
+
|
|
3
|
+
// src/http-auth/auth-method.ts
|
|
4
|
+
import { Schema } from "effect";
|
|
5
|
+
var TOKEN_VARIABLE = "token";
|
|
6
|
+
var AuthCarrier = Schema.Literals(["header", "query"]);
|
|
7
|
+
var AuthPlacement = Schema.Struct({
|
|
8
|
+
carrier: AuthCarrier,
|
|
9
|
+
/** Header name (e.g. `Authorization`) or query-param name (e.g. `token`). */
|
|
10
|
+
name: Schema.String,
|
|
11
|
+
/** Literal prepended to the credential value, e.g. `Bearer `. */
|
|
12
|
+
prefix: Schema.optional(Schema.String),
|
|
13
|
+
/** The credential input this placement renders from. Absent ⇒ `token`. */
|
|
14
|
+
variable: Schema.optional(Schema.String),
|
|
15
|
+
/** Render this exact value instead of a credential. */
|
|
16
|
+
literal: Schema.optional(Schema.String)
|
|
17
|
+
});
|
|
18
|
+
var ApiKeyAuthMethod = Schema.Struct({
|
|
19
|
+
slug: Schema.String,
|
|
20
|
+
kind: Schema.Literal("apikey"),
|
|
21
|
+
/** Display label; derived from the first placement when absent. */
|
|
22
|
+
label: Schema.optional(Schema.String),
|
|
23
|
+
placements: Schema.Array(AuthPlacement)
|
|
24
|
+
});
|
|
25
|
+
var NoneAuthMethod = Schema.Struct({
|
|
26
|
+
slug: Schema.String,
|
|
27
|
+
kind: Schema.Literal("none")
|
|
28
|
+
});
|
|
29
|
+
var renderPlacementValue = (placement, values) => {
|
|
30
|
+
if (placement.literal !== void 0) return placement.literal;
|
|
31
|
+
const value = values[placement.variable ?? TOKEN_VARIABLE];
|
|
32
|
+
if (value == null) return null;
|
|
33
|
+
return placement.prefix ? `${placement.prefix}${value}` : value;
|
|
34
|
+
};
|
|
35
|
+
var renderAuthPlacements = (placements, values) => {
|
|
36
|
+
const headers = {};
|
|
37
|
+
const queryParams = {};
|
|
38
|
+
for (const placement of placements) {
|
|
39
|
+
const rendered = renderPlacementValue(placement, values);
|
|
40
|
+
if (rendered === null) continue;
|
|
41
|
+
if (placement.carrier === "header") headers[placement.name] = rendered;
|
|
42
|
+
else queryParams[placement.name] = rendered;
|
|
43
|
+
}
|
|
44
|
+
return { headers, queryParams };
|
|
45
|
+
};
|
|
46
|
+
var requiredPlacementVariables = (placements) => {
|
|
47
|
+
const names = /* @__PURE__ */ new Set();
|
|
48
|
+
for (const placement of placements) {
|
|
49
|
+
if (placement.literal !== void 0) continue;
|
|
50
|
+
names.add(placement.variable ?? TOKEN_VARIABLE);
|
|
51
|
+
}
|
|
52
|
+
return [...names];
|
|
53
|
+
};
|
|
54
|
+
var oauthBearerPlacement = (header, prefix) => ({
|
|
55
|
+
carrier: "header",
|
|
56
|
+
name: header ?? "Authorization",
|
|
57
|
+
prefix: prefix ?? "Bearer "
|
|
58
|
+
});
|
|
59
|
+
var normalizeAuthMethodSlugs = (methods, defaultSlugFor) => {
|
|
60
|
+
const taken = /* @__PURE__ */ new Set();
|
|
61
|
+
return methods.map((method) => {
|
|
62
|
+
const requested = method.slug?.trim() || defaultSlugFor(method);
|
|
63
|
+
let slug = requested;
|
|
64
|
+
for (let n = 2; taken.has(slug); n += 1) slug = `${requested}_${n}`;
|
|
65
|
+
taken.add(slug);
|
|
66
|
+
return { ...method, slug };
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
var apiKeyMethodLabel = (method) => {
|
|
70
|
+
if (method.label !== void 0 && method.label.trim().length > 0) return method.label;
|
|
71
|
+
const first = method.placements.find(
|
|
72
|
+
(placement) => placement.name.trim().length > 0
|
|
73
|
+
);
|
|
74
|
+
return first ? `API key (${first.name})` : `API key (${method.slug})`;
|
|
75
|
+
};
|
|
76
|
+
var describePlacement = (placement) => ({
|
|
77
|
+
carrier: placement.carrier,
|
|
78
|
+
name: placement.name,
|
|
79
|
+
prefix: placement.prefix ?? "",
|
|
80
|
+
...placement.variable !== void 0 ? { variable: placement.variable } : {},
|
|
81
|
+
...placement.literal !== void 0 ? { literal: placement.literal } : {}
|
|
82
|
+
});
|
|
83
|
+
var describeApiKeyAuthMethod = (method) => ({
|
|
84
|
+
id: method.slug,
|
|
85
|
+
label: apiKeyMethodLabel(method),
|
|
86
|
+
kind: "apikey",
|
|
87
|
+
template: method.slug,
|
|
88
|
+
placements: method.placements.map(describePlacement)
|
|
89
|
+
});
|
|
90
|
+
var describeNoneAuthMethod = (slug) => ({
|
|
91
|
+
id: slug,
|
|
92
|
+
label: "No authentication",
|
|
93
|
+
kind: "none",
|
|
94
|
+
template: slug
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
// src/http-auth/authoring.ts
|
|
98
|
+
import { Schema as Schema2 } from "effect";
|
|
99
|
+
var variable = (name) => ({ type: "variable", name });
|
|
100
|
+
var VariablePart = Schema2.Struct({
|
|
101
|
+
type: Schema2.Literal("variable"),
|
|
102
|
+
name: Schema2.String
|
|
103
|
+
});
|
|
104
|
+
var isVariablePart = (part) => typeof part !== "string";
|
|
105
|
+
var AuthTemplateValue = Schema2.Union([
|
|
106
|
+
Schema2.String,
|
|
107
|
+
Schema2.Array(Schema2.Union([Schema2.String, VariablePart])).check(
|
|
108
|
+
Schema2.makeFilter((parts) => {
|
|
109
|
+
const variableIndexes = parts.flatMap((part, index) => isVariablePart(part) ? [index] : []);
|
|
110
|
+
if (variableIndexes.length > 1 || variableIndexes.length === 1 && variableIndexes[0] !== parts.length - 1) {
|
|
111
|
+
return "a template value renders at most ONE variable, as the FINAL part \u2014 split extra variables/suffixes into separate header or query entries";
|
|
112
|
+
}
|
|
113
|
+
return void 0;
|
|
114
|
+
})
|
|
115
|
+
)
|
|
116
|
+
]);
|
|
117
|
+
var ApiKeyAuthTemplate = Schema2.Struct({
|
|
118
|
+
slug: Schema2.optional(Schema2.String),
|
|
119
|
+
type: Schema2.Literal("apiKey"),
|
|
120
|
+
label: Schema2.optional(Schema2.String),
|
|
121
|
+
headers: Schema2.optional(Schema2.Record(Schema2.String, AuthTemplateValue)),
|
|
122
|
+
queryParams: Schema2.optional(Schema2.Record(Schema2.String, AuthTemplateValue))
|
|
123
|
+
});
|
|
124
|
+
var placementFromValue = (carrier, name, value) => {
|
|
125
|
+
if (typeof value === "string") return { carrier, name, literal: value };
|
|
126
|
+
const variablePart = value.find(isVariablePart);
|
|
127
|
+
if (variablePart === void 0) {
|
|
128
|
+
return { carrier, name, literal: value.filter((p) => typeof p === "string").join("") };
|
|
129
|
+
}
|
|
130
|
+
const prefix = value.filter((part) => typeof part === "string").join("");
|
|
131
|
+
return {
|
|
132
|
+
carrier,
|
|
133
|
+
name,
|
|
134
|
+
...prefix ? { prefix } : {},
|
|
135
|
+
...variablePart.name !== TOKEN_VARIABLE ? { variable: variablePart.name } : {}
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
var apiKeyMethodFromAuthTemplate = (template) => {
|
|
139
|
+
const placements = [];
|
|
140
|
+
for (const [name, value] of Object.entries(template.headers ?? {})) {
|
|
141
|
+
placements.push(placementFromValue("header", name, value));
|
|
142
|
+
}
|
|
143
|
+
for (const [name, value] of Object.entries(template.queryParams ?? {})) {
|
|
144
|
+
placements.push(placementFromValue("query", name, value));
|
|
145
|
+
}
|
|
146
|
+
return {
|
|
147
|
+
...template.slug !== void 0 ? { slug: template.slug } : {},
|
|
148
|
+
kind: "apikey",
|
|
149
|
+
...template.label !== void 0 ? { label: template.label } : {},
|
|
150
|
+
placements
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
var apiKeyAuthTemplateFromMethod = (method) => {
|
|
154
|
+
const headers = {};
|
|
155
|
+
const queryParams = {};
|
|
156
|
+
for (const placement of method.placements) {
|
|
157
|
+
const target = placement.carrier === "header" ? headers : queryParams;
|
|
158
|
+
target[placement.name] = placement.literal !== void 0 ? placement.literal : placement.prefix ? [placement.prefix, variable(placement.variable ?? TOKEN_VARIABLE)] : [variable(placement.variable ?? TOKEN_VARIABLE)];
|
|
159
|
+
}
|
|
160
|
+
return {
|
|
161
|
+
...method.slug !== void 0 ? { slug: method.slug } : {},
|
|
162
|
+
type: "apiKey",
|
|
163
|
+
...method.label !== void 0 ? { label: method.label } : {},
|
|
164
|
+
...Object.keys(headers).length > 0 ? { headers } : {},
|
|
165
|
+
...Object.keys(queryParams).length > 0 ? { queryParams } : {}
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
var isApiKeyAuthTemplate = (input) => input.type === "apiKey";
|
|
169
|
+
|
|
170
|
+
// src/http-auth/legacy.ts
|
|
171
|
+
import { Schema as Schema3 } from "effect";
|
|
172
|
+
var LegacyVariablePart = Schema3.Struct({
|
|
173
|
+
type: Schema3.Literal("variable"),
|
|
174
|
+
name: Schema3.String
|
|
175
|
+
});
|
|
176
|
+
var LegacyTemplateValue = Schema3.Union([
|
|
177
|
+
Schema3.String,
|
|
178
|
+
Schema3.Array(Schema3.Union([Schema3.String, LegacyVariablePart]))
|
|
179
|
+
]);
|
|
180
|
+
var LegacyApiKeyTemplate = Schema3.Struct({
|
|
181
|
+
slug: Schema3.String,
|
|
182
|
+
type: Schema3.Literal("apiKey"),
|
|
183
|
+
headers: Schema3.optional(Schema3.Record(Schema3.String, LegacyTemplateValue)),
|
|
184
|
+
queryParams: Schema3.optional(Schema3.Record(Schema3.String, LegacyTemplateValue))
|
|
185
|
+
});
|
|
186
|
+
var decodeLegacyApiKeyTemplate = Schema3.decodeUnknownOption(LegacyApiKeyTemplate);
|
|
187
|
+
var placementFromTemplateValue = (carrier, name, value) => {
|
|
188
|
+
if (typeof value === "string") return { carrier, name, literal: value };
|
|
189
|
+
const literals = [];
|
|
190
|
+
for (const part of value) {
|
|
191
|
+
if (typeof part === "string") {
|
|
192
|
+
literals.push(part);
|
|
193
|
+
continue;
|
|
194
|
+
}
|
|
195
|
+
const prefix = literals.join("");
|
|
196
|
+
return {
|
|
197
|
+
carrier,
|
|
198
|
+
name,
|
|
199
|
+
...prefix ? { prefix } : {},
|
|
200
|
+
...part.name !== TOKEN_VARIABLE ? { variable: part.name } : {}
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
return { carrier, name, literal: literals.join("") };
|
|
204
|
+
};
|
|
205
|
+
var apiKeyMethodFromLegacyTemplate = (template) => {
|
|
206
|
+
const placements = [];
|
|
207
|
+
for (const [name, value] of Object.entries(template.headers ?? {})) {
|
|
208
|
+
placements.push(placementFromTemplateValue("header", name, value));
|
|
209
|
+
}
|
|
210
|
+
for (const [name, value] of Object.entries(template.queryParams ?? {})) {
|
|
211
|
+
placements.push(placementFromTemplateValue("query", name, value));
|
|
212
|
+
}
|
|
213
|
+
return { slug: template.slug, kind: "apikey", placements };
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
// src/http-auth/migrate.ts
|
|
217
|
+
var planAuthConfigMigration = (rows, transforms) => {
|
|
218
|
+
const updates = [];
|
|
219
|
+
for (const row of rows) {
|
|
220
|
+
const transform = transforms[row.pluginId];
|
|
221
|
+
if (!transform) continue;
|
|
222
|
+
const migrated = transform(row.config);
|
|
223
|
+
if (migrated !== null) updates.push({ rowId: row.rowId, config: migrated });
|
|
224
|
+
}
|
|
225
|
+
return updates;
|
|
226
|
+
};
|
|
227
|
+
var runSqliteAuthConfigMigration = async (client, transforms) => {
|
|
228
|
+
const exists = await client.execute(
|
|
229
|
+
"SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'integration'"
|
|
230
|
+
);
|
|
231
|
+
if (exists.rows.length === 0) return 0;
|
|
232
|
+
const result = await client.execute("SELECT row_id, plugin_id, config FROM integration");
|
|
233
|
+
const rows = [];
|
|
234
|
+
for (const row of result.rows) {
|
|
235
|
+
if (typeof row.row_id !== "string" || typeof row.plugin_id !== "string") continue;
|
|
236
|
+
if (typeof row.config !== "string") continue;
|
|
237
|
+
let config;
|
|
238
|
+
try {
|
|
239
|
+
config = JSON.parse(row.config);
|
|
240
|
+
} catch {
|
|
241
|
+
continue;
|
|
242
|
+
}
|
|
243
|
+
rows.push({ rowId: row.row_id, pluginId: row.plugin_id, config });
|
|
244
|
+
}
|
|
245
|
+
const updates = planAuthConfigMigration(rows, transforms);
|
|
246
|
+
if (updates.length === 0) return 0;
|
|
247
|
+
await client.execute("BEGIN");
|
|
248
|
+
try {
|
|
249
|
+
for (const update of updates) {
|
|
250
|
+
await client.execute({
|
|
251
|
+
sql: "UPDATE integration SET config = ? WHERE row_id = ?",
|
|
252
|
+
args: [JSON.stringify(update.config), update.rowId]
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
await client.execute("COMMIT");
|
|
256
|
+
} catch (cause) {
|
|
257
|
+
await client.execute("ROLLBACK");
|
|
258
|
+
throw cause;
|
|
259
|
+
}
|
|
260
|
+
return updates.length;
|
|
261
|
+
};
|
|
262
|
+
export {
|
|
263
|
+
ApiKeyAuthMethod,
|
|
264
|
+
ApiKeyAuthTemplate,
|
|
265
|
+
AuthCarrier,
|
|
266
|
+
AuthPlacement,
|
|
267
|
+
AuthTemplateValue,
|
|
268
|
+
LegacyApiKeyTemplate,
|
|
269
|
+
LegacyTemplateValue,
|
|
270
|
+
NoneAuthMethod,
|
|
271
|
+
TOKEN_VARIABLE,
|
|
272
|
+
apiKeyAuthTemplateFromMethod,
|
|
273
|
+
apiKeyMethodFromAuthTemplate,
|
|
274
|
+
apiKeyMethodFromLegacyTemplate,
|
|
275
|
+
apiKeyMethodLabel,
|
|
276
|
+
decodeLegacyApiKeyTemplate,
|
|
277
|
+
describeApiKeyAuthMethod,
|
|
278
|
+
describeNoneAuthMethod,
|
|
279
|
+
isApiKeyAuthTemplate,
|
|
280
|
+
normalizeAuthMethodSlugs,
|
|
281
|
+
oauthBearerPlacement,
|
|
282
|
+
planAuthConfigMigration,
|
|
283
|
+
renderAuthPlacements,
|
|
284
|
+
requiredPlacementVariables,
|
|
285
|
+
runSqliteAuthConfigMigration,
|
|
286
|
+
variable
|
|
287
|
+
};
|
|
288
|
+
//# sourceMappingURL=http-auth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/http-auth/auth-method.ts","../src/http-auth/authoring.ts","../src/http-auth/legacy.ts","../src/http-auth/migrate.ts"],"sourcesContent":["import { Schema } from \"effect\";\nimport type { AuthMethodDescriptor, AuthPlacementDescriptor } from \"../integration\";\n\n// ---------------------------------------------------------------------------\n// The shared HTTP auth-method vocabulary for protocol plugins (openapi,\n// graphql, mcp). An integration declares a LIST of auth methods; a connection\n// binds one by its `slug` (`connection.template`) and supplies one credential\n// value per `variable` the method's placements reference (D11: core resolves\n// `values: Record<variable, string|null>`, the plugin renders them onto the\n// request).\n//\n// Core itself never imports this module — core stays carrier-agnostic (a\n// connection could be a CLI login or a DB URL). It ships as the\n// `@executor-js/sdk/http-auth` subpath purely as a home: composition, not\n// location, is what keeps headers/query params an HTTP-plugin concern.\n//\n// OAuth methods are NOT modeled here — their config genuinely differs per\n// plugin (openapi stores endpoints+scopes, graphql an optional header\n// override, mcp discovers everything at connect time). Each plugin's method\n// union is `NoneAuthMethod | ApiKeyAuthMethod | <its own oauth variant>`.\n// OAuth-refreshed connections resolve only the `token` input, so oauth\n// values must never be mixed into a placements method.\n// ---------------------------------------------------------------------------\n\n/** The canonical input variable of single-credential methods. A placement\n * with no `variable` renders from it, and core resolves a connection created\n * with a bare `{ value }` into `{ token: value }`. */\nexport const TOKEN_VARIABLE = \"token\";\n\nexport const AuthCarrier = Schema.Literals([\"header\", \"query\"]);\nexport type AuthCarrier = typeof AuthCarrier.Type;\n\n/** One spot on the outbound request a method writes to.\n *\n * Credential placement: renders `prefix + values[variable ?? \"token\"]`.\n * Two placements naming the same variable share one credential input; a\n * placement naming its own variable gets its own input (e.g. Datadog's two\n * keys).\n *\n * Literal placement (`literal` set): renders the literal verbatim and\n * references no credential — static values a method carries alongside its\n * credential (e.g. a fixed version header). */\nexport const AuthPlacement = Schema.Struct({\n carrier: AuthCarrier,\n /** Header name (e.g. `Authorization`) or query-param name (e.g. `token`). */\n name: Schema.String,\n /** Literal prepended to the credential value, e.g. `Bearer `. */\n prefix: Schema.optional(Schema.String),\n /** The credential input this placement renders from. Absent ⇒ `token`. */\n variable: Schema.optional(Schema.String),\n /** Render this exact value instead of a credential. */\n literal: Schema.optional(Schema.String),\n});\nexport type AuthPlacement = typeof AuthPlacement.Type;\n\nexport const ApiKeyAuthMethod = Schema.Struct({\n slug: Schema.String,\n kind: Schema.Literal(\"apikey\"),\n /** Display label; derived from the first placement when absent. */\n label: Schema.optional(Schema.String),\n placements: Schema.Array(AuthPlacement),\n});\nexport type ApiKeyAuthMethod = typeof ApiKeyAuthMethod.Type;\n\n/** An open integration — connections carry no credential. */\nexport const NoneAuthMethod = Schema.Struct({\n slug: Schema.String,\n kind: Schema.Literal(\"none\"),\n});\nexport type NoneAuthMethod = typeof NoneAuthMethod.Type;\n\n// ---------------------------------------------------------------------------\n// Rendering\n// ---------------------------------------------------------------------------\n\nexport interface RenderedAuthPlacements {\n readonly headers: Record<string, string>;\n readonly queryParams: Record<string, string>;\n}\n\nconst renderPlacementValue = (\n placement: AuthPlacement,\n values: Record<string, string | null>,\n): string | null => {\n if (placement.literal !== undefined) return placement.literal;\n const value = values[placement.variable ?? TOKEN_VARIABLE];\n if (value == null) return null;\n return placement.prefix ? `${placement.prefix}${value}` : value;\n};\n\n/** Render a method's placements with a connection's resolved values. Total:\n * a credential placement whose variable resolved to nothing is skipped —\n * callers own their missing-value policy (fail the invocation, dial\n * unauthenticated, …) and should gate on `requiredPlacementVariables`. */\nexport const renderAuthPlacements = (\n placements: readonly AuthPlacement[],\n values: Record<string, string | null>,\n): RenderedAuthPlacements => {\n const headers: Record<string, string> = {};\n const queryParams: Record<string, string> = {};\n for (const placement of placements) {\n const rendered = renderPlacementValue(placement, values);\n if (rendered === null) continue;\n if (placement.carrier === \"header\") headers[placement.name] = rendered;\n else queryParams[placement.name] = rendered;\n }\n return { headers, queryParams };\n};\n\n/** The distinct credential inputs a method's placements reference — what a\n * connection must supply. Literal placements reference none. */\nexport const requiredPlacementVariables = (\n placements: readonly AuthPlacement[],\n): readonly string[] => {\n const names = new Set<string>();\n for (const placement of placements) {\n if (placement.literal !== undefined) continue;\n names.add(placement.variable ?? TOKEN_VARIABLE);\n }\n return [...names];\n};\n\n/** The conventional rendering of an OAuth access token, as a placement — for\n * plugins whose oauth method applies the token as a plain (possibly\n * customized) header. The token is always the `token` input. */\nexport const oauthBearerPlacement = (header?: string, prefix?: string): AuthPlacement => ({\n carrier: \"header\",\n name: header ?? \"Authorization\",\n prefix: prefix ?? \"Bearer \",\n});\n\n// ---------------------------------------------------------------------------\n// Slug normalization — methods are input without slugs from UIs/agents; every\n// stored method needs a stable one (`connection.template` binds by it).\n// ---------------------------------------------------------------------------\n\n/** Assign each method a stable slug: a caller-provided one wins, otherwise\n * `defaultSlugFor(method)`, suffixed `_2`, `_3`, … on collision. */\nexport const normalizeAuthMethodSlugs = <T extends { readonly slug?: string | undefined }>(\n methods: readonly T[],\n defaultSlugFor: (method: T) => string,\n): readonly (T & { readonly slug: string })[] => {\n const taken = new Set<string>();\n return methods.map((method: T): T & { readonly slug: string } => {\n const requested = method.slug?.trim() || defaultSlugFor(method);\n let slug = requested;\n for (let n = 2; taken.has(slug); n += 1) slug = `${requested}_${n}`;\n taken.add(slug);\n return { ...method, slug };\n });\n};\n\n// ---------------------------------------------------------------------------\n// Catalog projection — the plugin-agnostic `AuthMethodDescriptor` every\n// plugin's `describeAuthMethods` emits (the descriptor TYPE stays in\n// @executor-js/sdk: core carries it as opaque catalog metadata).\n// ---------------------------------------------------------------------------\n\nexport const apiKeyMethodLabel = (method: ApiKeyAuthMethod): string => {\n if (method.label !== undefined && method.label.trim().length > 0) return method.label;\n const first = method.placements.find(\n (placement: AuthPlacement) => placement.name.trim().length > 0,\n );\n return first ? `API key (${first.name})` : `API key (${method.slug})`;\n};\n\nconst describePlacement = (placement: AuthPlacement): AuthPlacementDescriptor => ({\n carrier: placement.carrier,\n name: placement.name,\n prefix: placement.prefix ?? \"\",\n ...(placement.variable !== undefined ? { variable: placement.variable } : {}),\n ...(placement.literal !== undefined ? { literal: placement.literal } : {}),\n});\n\nexport const describeApiKeyAuthMethod = (method: ApiKeyAuthMethod): AuthMethodDescriptor => ({\n id: method.slug,\n label: apiKeyMethodLabel(method),\n kind: \"apikey\",\n template: method.slug,\n placements: method.placements.map(describePlacement),\n});\n\nexport const describeNoneAuthMethod = (slug: string): AuthMethodDescriptor => ({\n id: slug,\n label: \"No authentication\",\n kind: \"none\",\n template: slug,\n});\n","// ---------------------------------------------------------------------------\n// Request-shaped authoring — the second accepted INPUT dialect for apikey\n// methods, alongside canonical placements. It reads like the HTTP request it\n// produces:\n//\n// {\n// slug: \"bearer\",\n// type: \"apiKey\",\n// headers: { Authorization: [\"Bearer \", variable(\"token\")] },\n// queryParams: { team_id: [variable(\"team_id\")] },\n// }\n//\n// A record value is either a parts-array (`prefix literals… + one variable,\n// last`) rendering a credential input, or a plain string rendering a static\n// literal. Normalized to canonical placements at the boundary — STORED\n// configs carry only the canonical shape.\n//\n// Authoring is strict where the migration is tolerant: a parts-array with a\n// variable anywhere but last, or with more than one variable, is rejected at\n// decode time with a pointed message (the renderer and UI honor exactly\n// prefix+variable, so accepting more would silently lose information —\n// `migrate-config` only flattens that way for pre-existing stored data).\n// ---------------------------------------------------------------------------\n\nimport { Schema } from \"effect\";\n\nimport { TOKEN_VARIABLE, type ApiKeyAuthMethod, type AuthPlacement } from \"./auth-method\";\n\nexport interface AuthTemplateVariable {\n readonly type: \"variable\";\n readonly name: string;\n}\n\n/** Mark where a credential input renders inside a template value:\n * `[\"Bearer \", variable(\"token\")]`. */\nexport const variable = (name: string): AuthTemplateVariable => ({ type: \"variable\", name });\n\nconst VariablePart = Schema.Struct({\n type: Schema.Literal(\"variable\"),\n name: Schema.String,\n});\n\nconst isVariablePart = (part: string | AuthTemplateVariable): part is AuthTemplateVariable =>\n typeof part !== \"string\";\n\n/** `string` (a static literal) or `prefix literals… + one variable, last`. */\nexport const AuthTemplateValue = Schema.Union([\n Schema.String,\n Schema.Array(Schema.Union([Schema.String, VariablePart])).check(\n Schema.makeFilter((parts) => {\n const variableIndexes = parts.flatMap((part, index) => (isVariablePart(part) ? [index] : []));\n if (\n variableIndexes.length > 1 ||\n (variableIndexes.length === 1 && variableIndexes[0] !== parts.length - 1)\n ) {\n return \"a template value renders at most ONE variable, as the FINAL part — split extra variables/suffixes into separate header or query entries\";\n }\n return undefined;\n }),\n ),\n]);\nexport type AuthTemplateValue = typeof AuthTemplateValue.Type;\n\n/** The request-shaped apikey authoring dialect. `slug` optional (backfilled\n * like every other input); `label` optional. */\nexport const ApiKeyAuthTemplate = Schema.Struct({\n slug: Schema.optional(Schema.String),\n type: Schema.Literal(\"apiKey\"),\n label: Schema.optional(Schema.String),\n headers: Schema.optional(Schema.Record(Schema.String, AuthTemplateValue)),\n queryParams: Schema.optional(Schema.Record(Schema.String, AuthTemplateValue)),\n});\nexport type ApiKeyAuthTemplate = typeof ApiKeyAuthTemplate.Type;\n\nconst placementFromValue = (\n carrier: \"header\" | \"query\",\n name: string,\n value: AuthTemplateValue,\n): AuthPlacement => {\n if (typeof value === \"string\") return { carrier, name, literal: value };\n const variablePart = value.find(isVariablePart);\n if (variablePart === undefined) {\n return { carrier, name, literal: value.filter((p) => typeof p === \"string\").join(\"\") };\n }\n const prefix = value.filter((part): part is string => typeof part === \"string\").join(\"\");\n return {\n carrier,\n name,\n ...(prefix ? { prefix } : {}),\n ...(variablePart.name !== TOKEN_VARIABLE ? { variable: variablePart.name } : {}),\n };\n};\n\n/** Normalize the request-shaped dialect into the canonical apikey method\n * (sans slug backfill — the caller's normalize pass owns slugs). */\nexport const apiKeyMethodFromAuthTemplate = (\n template: ApiKeyAuthTemplate,\n): Omit<ApiKeyAuthMethod, \"slug\"> & { readonly slug?: string } => {\n const placements: AuthPlacement[] = [];\n for (const [name, value] of Object.entries(template.headers ?? {})) {\n placements.push(placementFromValue(\"header\", name, value));\n }\n for (const [name, value] of Object.entries(template.queryParams ?? {})) {\n placements.push(placementFromValue(\"query\", name, value));\n }\n return {\n ...(template.slug !== undefined ? { slug: template.slug } : {}),\n kind: \"apikey\",\n ...(template.label !== undefined ? { label: template.label } : {}),\n placements,\n };\n};\n\n/** Serialize a canonical method back into the request-shaped dialect — the\n * write side of read-modify-write flows (stored configs and the catalog\n * read as placements; auth INPUTS accept only this dialect). Same-named\n * same-carrier placements collapse, exactly as the renderer's header/query\n * records do. */\nexport const apiKeyAuthTemplateFromMethod = (method: {\n readonly slug?: string;\n readonly label?: string;\n readonly placements: readonly AuthPlacement[];\n}): ApiKeyAuthTemplate => {\n const headers: Record<string, AuthTemplateValue> = {};\n const queryParams: Record<string, AuthTemplateValue> = {};\n for (const placement of method.placements) {\n const target = placement.carrier === \"header\" ? headers : queryParams;\n target[placement.name] =\n placement.literal !== undefined\n ? placement.literal\n : placement.prefix\n ? [placement.prefix, variable(placement.variable ?? TOKEN_VARIABLE)]\n : [variable(placement.variable ?? TOKEN_VARIABLE)];\n }\n return {\n ...(method.slug !== undefined ? { slug: method.slug } : {}),\n type: \"apiKey\",\n ...(method.label !== undefined ? { label: method.label } : {}),\n ...(Object.keys(headers).length > 0 ? { headers } : {}),\n ...(Object.keys(queryParams).length > 0 ? { queryParams } : {}),\n };\n};\n\n/** Whether an input union member is the request-shaped dialect. */\nexport const isApiKeyAuthTemplate = (input: {\n readonly kind?: string;\n readonly type?: string;\n}): input is ApiKeyAuthTemplate => input.type === \"apiKey\";\n","// ---------------------------------------------------------------------------\n// FROZEN legacy shapes — input vocabulary for the one-off config migrations.\n//\n// Before the canonical placements model, the OpenAPI plugin (and the v1→v2\n// migration, which wrote this shape into MCP and GraphQL configs too) stored\n// apiKey methods as header/query records of TEMPLATE VALUES: a string literal\n// or a part-array interleaving literals with `{ type: \"variable\", name }`\n// references.\n//\n// Runtime code must not import this module — it exists so every plugin's\n// `migrate-config` rewrites stored blobs the same way, and the rules below are\n// the contract: variable names are preserved VERBATIM (they key the\n// connections' stored `item_ids`), the placement prefix is the literal run\n// before the first variable, a literal-only value becomes a `literal`\n// placement, and anything after the first variable is dropped (matching what\n// the descriptor projection has always shown).\n// ---------------------------------------------------------------------------\n\nimport { Schema } from \"effect\";\n\nimport { TOKEN_VARIABLE, type ApiKeyAuthMethod, type AuthPlacement } from \"./auth-method\";\n\nconst LegacyVariablePart = Schema.Struct({\n type: Schema.Literal(\"variable\"),\n name: Schema.String,\n});\n\nexport const LegacyTemplateValue = Schema.Union([\n Schema.String,\n Schema.Array(Schema.Union([Schema.String, LegacyVariablePart])),\n]);\nexport type LegacyTemplateValue = typeof LegacyTemplateValue.Type;\n\n/** The pre-canonical apiKey template shape (OpenAPI native + what the v1→v2\n * migration wrote into MCP/GraphQL configs). */\nexport const LegacyApiKeyTemplate = Schema.Struct({\n slug: Schema.String,\n type: Schema.Literal(\"apiKey\"),\n headers: Schema.optional(Schema.Record(Schema.String, LegacyTemplateValue)),\n queryParams: Schema.optional(Schema.Record(Schema.String, LegacyTemplateValue)),\n});\nexport type LegacyApiKeyTemplate = typeof LegacyApiKeyTemplate.Type;\n\nexport const decodeLegacyApiKeyTemplate = Schema.decodeUnknownOption(LegacyApiKeyTemplate);\n\nconst placementFromTemplateValue = (\n carrier: \"header\" | \"query\",\n name: string,\n value: LegacyTemplateValue,\n): AuthPlacement => {\n if (typeof value === \"string\") return { carrier, name, literal: value };\n const literals: string[] = [];\n for (const part of value) {\n if (typeof part === \"string\") {\n literals.push(part);\n continue;\n }\n const prefix = literals.join(\"\");\n return {\n carrier,\n name,\n ...(prefix ? { prefix } : {}),\n ...(part.name !== TOKEN_VARIABLE ? { variable: part.name } : {}),\n };\n }\n return { carrier, name, literal: literals.join(\"\") };\n};\n\n/** Rewrite a legacy apiKey template into the canonical placements method.\n * Slug and variable names are preserved verbatim. */\nexport const apiKeyMethodFromLegacyTemplate = (\n template: LegacyApiKeyTemplate,\n): ApiKeyAuthMethod => {\n const placements: AuthPlacement[] = [];\n for (const [name, value] of Object.entries(template.headers ?? {})) {\n placements.push(placementFromTemplateValue(\"header\", name, value));\n }\n for (const [name, value] of Object.entries(template.queryParams ?? {})) {\n placements.push(placementFromTemplateValue(\"query\", name, value));\n }\n return { slug: template.slug, kind: \"apikey\", placements };\n};\n","/* oxlint-disable executor/no-try-catch-or-throw, executor/no-json-parse -- boundary: one-shot config migration drives a raw SQL client (JSON text columns, transaction + rollback) */\n// ---------------------------------------------------------------------------\n// One-off auth-config migration planner — the driver-agnostic core every app\n// wires its own SQL around. Each protocol plugin exports a pure\n// `migrate<Plugin>AuthConfig(config) → config | null` (null = leave the row\n// untouched); this plans which integration rows to rewrite. Idempotent by\n// construction: re-running over migrated rows plans zero updates.\n// ---------------------------------------------------------------------------\n\nexport type AuthConfigTransform = (config: unknown) => unknown | null;\n\nexport interface AuthConfigMigrationRow {\n /** The integration row's primary key (`row_id`). */\n readonly rowId: string;\n readonly pluginId: string;\n readonly config: unknown;\n}\n\nexport interface AuthConfigMigrationUpdate {\n readonly rowId: string;\n readonly config: unknown;\n}\n\n/** Plan the config rewrites for a set of integration rows. `transforms` maps\n * plugin ids (`mcp` / `graphql` / `openapi`) to their migration functions;\n * rows of other plugins, and rows whose transform returns null, are left\n * untouched. */\nexport const planAuthConfigMigration = (\n rows: readonly AuthConfigMigrationRow[],\n transforms: Record<string, AuthConfigTransform>,\n): readonly AuthConfigMigrationUpdate[] => {\n const updates: AuthConfigMigrationUpdate[] = [];\n for (const row of rows) {\n const transform = transforms[row.pluginId];\n if (!transform) continue;\n const migrated = transform(row.config);\n if (migrated !== null) updates.push({ rowId: row.rowId, config: migrated });\n }\n return updates;\n};\n\n// ---------------------------------------------------------------------------\n// SQLite runner — shared by the libSQL-backed apps (local boot, selfhost\n// boot). Structural client interface so this package stays dependency-free;\n// `@libsql/client` satisfies it. Postgres apps (cloud) wire their own SQL\n// around `planAuthConfigMigration`.\n// ---------------------------------------------------------------------------\n\nexport interface SqliteAuthConfigClient {\n execute(\n stmt: string | { readonly sql: string; readonly args: readonly unknown[] },\n ): Promise<{ readonly rows: readonly Record<string, unknown>[] }>;\n}\n\n/** Rewrite pre-canonical integration `config` blobs in a SQLite database.\n * Idempotent (canonical rows plan no updates); returns the number of rows\n * rewritten. The `integration` table may not exist yet on a fresh database —\n * that counts as nothing to migrate. */\nexport const runSqliteAuthConfigMigration = async (\n client: SqliteAuthConfigClient,\n transforms: Record<string, AuthConfigTransform>,\n): Promise<number> => {\n const exists = await client.execute(\n \"SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'integration'\",\n );\n if (exists.rows.length === 0) return 0;\n\n const result = await client.execute(\"SELECT row_id, plugin_id, config FROM integration\");\n const rows: AuthConfigMigrationRow[] = [];\n for (const row of result.rows) {\n if (typeof row.row_id !== \"string\" || typeof row.plugin_id !== \"string\") continue;\n if (typeof row.config !== \"string\") continue;\n let config: unknown;\n try {\n config = JSON.parse(row.config);\n } catch {\n continue;\n }\n rows.push({ rowId: row.row_id, pluginId: row.plugin_id, config });\n }\n\n const updates = planAuthConfigMigration(rows, transforms);\n if (updates.length === 0) return 0;\n\n await client.execute(\"BEGIN\");\n try {\n for (const update of updates) {\n await client.execute({\n sql: \"UPDATE integration SET config = ? WHERE row_id = ?\",\n args: [JSON.stringify(update.config), update.rowId],\n });\n }\n await client.execute(\"COMMIT\");\n } catch (cause) {\n await client.execute(\"ROLLBACK\");\n throw cause;\n }\n return updates.length;\n};\n"],"mappings":";;;AAAA,SAAS,cAAc;AA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G,QAAO;AAErC,QAAM,SAAS,MAAM,OAAO,QAAQ,mDAAmD;AACvF,QAAM,OAAiC,CAAC;AACxC,aAAW,OAAO,OAAO,MAAM;AAC7B,QAAI,OAAO,IAAI,WAAW,YAAY,OAAO,IAAI,cAAc,SAAU;AACzE,QAAI,OAAO,IAAI,WAAW,SAAU;AACpC,QAAI;AACJ,QAAI;AACF,eAAS,KAAK,MAAM,IAAI,MAAM;AAAA,IAChC,QAAQ;AACN;AAAA,IACF;AACA,SAAK,KAAK,EAAE,OAAO,IAAI,QAAQ,UAAU,IAAI,WAAW,OAAO,CAAC;AAAA,EAClE;AAEA,QAAM,UAAU,wBAAwB,MAAM,UAAU;AACxD,MAAI,QAAQ,WAAW,EAAG,QAAO;AAEjC,QAAM,OAAO,QAAQ,OAAO;AAC5B,MAAI;AACF,eAAW,UAAU,SAAS;AAC5B,YAAM,OAAO,QAAQ;AAAA,QACnB,KAAK;AAAA,QACL,MAAM,CAAC,KAAK,UAAU,OAAO,MAAM,GAAG,OAAO,KAAK;AAAA,MACpD,CAAC;AAAA,IACH;AACA,UAAM,OAAO,QAAQ,QAAQ;AAAA,EAC/B,SAAS,OAAO;AACd,UAAM,OAAO,QAAQ,UAAU;AAC/B,UAAM;AAAA,EACR;AACA,SAAO,QAAQ;AACjB;","names":["Schema","Schema","Schema","Schema"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,22 +4,23 @@ export { fumadb } from "@executor-js/fumadb";
|
|
|
4
4
|
export type { FumaDB } from "@executor-js/fumadb";
|
|
5
5
|
export type { AbstractQuery, Condition, ConditionBuilder } from "@executor-js/fumadb/query";
|
|
6
6
|
export { column, idColumn, schema as fumaSchema, table } from "@executor-js/fumadb/schema";
|
|
7
|
-
export type { AnyColumn, AnySchema, AnyTable, Column, Schema as FumaSchema } from "@executor-js/fumadb/schema";
|
|
7
|
+
export type { AnyColumn, AnySchema, AnyTable, Column, Schema as FumaSchema, } from "@executor-js/fumadb/schema";
|
|
8
8
|
export type { FumaDb, FumaQuery, FumaRow, FumaTables, IFumaClient, StorageFailure, } from "./fuma-runtime";
|
|
9
9
|
export { StorageError, UniqueViolationError, isStorageFailure } from "./fuma-runtime";
|
|
10
10
|
export { IntegrationSlug, AuthTemplateSlug, ConnectionName, OAuthClientSlug, OAuthState, ProviderKey, ProviderItemId, ConnectionAddress, ToolAddress, ToolName, ElicitationId, PolicyId, Tenant, Subject, Owner, } from "./ids";
|
|
11
11
|
export { connectionIdentifier, isConnectionIdentifier } from "./connection-name-identifier";
|
|
12
12
|
export { ToolNotFoundError, ToolInvocationError, ToolBlockedError, NoHandlerError, PluginNotLoadedError, IntegrationNotFoundError, IntegrationAlreadyExistsError, IntegrationRemovalNotAllowedError, ConnectionNotFoundError, CredentialProviderNotRegisteredError, CredentialResolutionError, type ExecuteError, type ExecutorError, } from "./errors";
|
|
13
13
|
export type { AuthMethodDescriptor, AuthMethodOAuthDescriptor, AuthPlacementDescriptor, Integration, IntegrationConfig, IntegrationDisplayDescriptor, RegisterIntegrationInput, } from "./integration";
|
|
14
|
+
export { freshCustomAuthSlug, mergeAuthTemplates } from "./integration";
|
|
14
15
|
export type { Connection, ConnectionRef, ConnectionValueInput, CreateConnectionInput, } from "./connection";
|
|
15
16
|
export type { Tool, ToolDef, ToolListFilter, ToolAnnotations } from "./tool";
|
|
16
17
|
export type { CredentialProvider, ProviderEntry } from "./provider";
|
|
17
18
|
export { ToolSchemaView, IntegrationDetectionResult } from "./types";
|
|
18
|
-
export { bigintColumn, boolColumn, coreSchema, coreTables, dateColumn, isToolPolicyAction, jsonColumn, keyColumn, nullableBigintColumn, nullableJsonColumn, nullableKeyColumn, nullableTextColumn, textColumn, TOOL_POLICY_ACTIONS, type CoreSchema, type IntegrationRow, type ConnectionRow, type OAuthClientRow, type OAuthSessionRow, type ToolRow, type DefinitionRow, type ToolPolicyRow, type PluginStorageRow, type BlobRow, type ToolPolicyAction, } from "./core-schema";
|
|
19
|
+
export { bigintColumn, boolColumn, coreSchema, coreTables, dateColumn, isToolPolicyAction, jsonColumn, keyColumn, nullableBigintColumn, nullableJsonColumn, nullableKeyColumn, nullableTextColumn, textColumn, TOOL_POLICY_ACTIONS, type CoreSchema, type IntegrationRow, type ConnectionRow, type OAuthClientRow, type OAuthSessionRow, type ToolRow, type ToolInvocationRow, type DefinitionRow, type ToolPolicyRow, type PluginStorageRow, type BlobRow, type ToolPolicyAction, } from "./core-schema";
|
|
19
20
|
export { ORG_SUBJECT, executorOwnerPolicyName, executorUnscopedPolicyName, type ExecutorOwnerPolicyContext, } from "./owner-policy";
|
|
20
21
|
export { matchPattern, isValidPattern, effectivePolicyFromSorted, ToolPolicyActionSchema, type ToolPolicy, type CreateToolPolicyInput, type UpdateToolPolicyInput, type RemoveToolPolicyInput, type PolicyMatch, type EffectivePolicy, type PolicySource, } from "./policies";
|
|
21
22
|
export { FormElicitation, UrlElicitation, ElicitationAction, ElicitationResponse, ElicitationDeclinedError, type ElicitationRequest, type ElicitationHandler, type ElicitationContext, type OnElicitation, type InvokeOptions, } from "./elicitation";
|
|
22
|
-
export { pluginBlobStore, makeInMemoryBlobStore, makeFumaBlobStore, type BlobStore, type PluginBlobStore, type OwnerPartitions, } from "./blob";
|
|
23
|
+
export { pluginBlobStore, makeInMemoryBlobStore, makeFumaBlobStore, sha256Hex, type BlobStore, type PluginBlobStore, type OwnerPartitions, } from "./blob";
|
|
23
24
|
export { definePluginStorageCollection, pluginStorageId, type PluginStorageCollectionDefinition, type PluginStorageCollectionFacade, type PluginStorageCollectionIndexedField, type PluginStorageCollectionKeyInput, type PluginStorageCollectionListInput, type PluginStorageCollectionOrderBy, type PluginStorageCollectionPutInput, type PluginStorageCollectionQueryInput, type PluginStorageCollectionScopedKeyInput, type PluginStorageCollectionWhere, type PluginStorageConfig, type PluginStorageEntry, type PluginStorageFacade, type PluginStorageIndexField, type PluginStorageIndexSpec, type PluginStorageKeyInput, type PluginStorageListInput, type PluginStoragePutInput, type PluginStorageRuntimeCollectionDefinition, type PluginStorageRuntimeIndexSpec, type PluginStorageSchema, type PluginStorageSchemaType, type PluginStorageScopedKeyInput, type PluginStorageWhereFilter, type PluginStorageWhereValue, } from "./plugin-storage";
|
|
24
25
|
export { OAUTH2_PROVIDER_KEY, OAUTH2_SESSION_TTL_MS } from "./oauth";
|
|
25
26
|
export { OAuthStartError, OAuthCompleteError, OAuthProbeError, OAuthRegisterDynamicError, OAuthSessionNotFoundError, type OAuthGrant, type OAuthAuthentication, type OAuthClient, type OAuthClientSummary, type CreateOAuthClientInput, type RegisterDynamicClientInput, type ConnectResult, type OAuthStartInput, type OAuthCompleteInput, type OAuthProbeInput, type OAuthProbeResult, type OAuthService, } from "./oauth-client";
|
|
@@ -30,6 +31,8 @@ export { type Executor, type ExecutorConfig, type ExecutorDb, type ExecutorDbFac
|
|
|
30
31
|
export { defineExecutorConfig, type ExecutorCliConfig, type ExecutorPluginsFactory, } from "./config";
|
|
31
32
|
export { buildToolTypeScriptPreview } from "./schema-types";
|
|
32
33
|
export { InternalError } from "./api-errors";
|
|
33
|
-
export { ToolResult, isToolResult, type ToolError } from "./tool-result";
|
|
34
|
+
export { ToolResult, isToolResult, type ToolError, type ToolHttpMeta } from "./tool-result";
|
|
35
|
+
export { DataMigrationError, DuplicateDataMigrationError, runSqliteDataMigrations, sqliteDataMigration, type SqliteDataMigration, type SqliteDataMigrationClient, } from "./sqlite-data-migrations";
|
|
36
|
+
export { runSqliteConfigBlobMigration, type SqliteConfigBlobMigrationOptions, } from "./sqlite-config-blob-migration";
|
|
34
37
|
export { authToolFailure, type AuthToolFailureCode, type AuthToolFailureInput, } from "./auth-tool-failure";
|
|
35
38
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,M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
5
5
|
collectTables,
|
|
6
6
|
createExecutor
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YPVKRUZV.js";
|
|
8
8
|
import {
|
|
9
9
|
ConnectionNotFoundError,
|
|
10
10
|
CredentialProviderNotRegisteredError,
|
|
@@ -22,12 +22,11 @@ import {
|
|
|
22
22
|
ToolNotFoundError,
|
|
23
23
|
ToolSchemaView,
|
|
24
24
|
UrlElicitation
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-UKOTOKXM.js";
|
|
26
26
|
import "./chunk-EIHWBY6T.js";
|
|
27
27
|
import {
|
|
28
28
|
AuthTemplateSlug,
|
|
29
29
|
ConnectionName,
|
|
30
|
-
ElicitationId,
|
|
31
30
|
IntegrationSlug,
|
|
32
31
|
Owner,
|
|
33
32
|
PolicyId,
|
|
@@ -113,7 +112,6 @@ export {
|
|
|
113
112
|
CredentialProviderNotRegisteredError,
|
|
114
113
|
CredentialResolutionError,
|
|
115
114
|
ElicitationAction,
|
|
116
|
-
ElicitationId,
|
|
117
115
|
ElicitationResponse,
|
|
118
116
|
FormElicitation,
|
|
119
117
|
IntegrationDetectionResult,
|