@keystrokehq/keystroke 1.0.22 → 1.0.24
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/agent.cjs +35 -18
- package/dist/agent.cjs.map +1 -1
- package/dist/agent.d.cts +1 -1
- package/dist/agent.d.mts +1 -1
- package/dist/agent.mjs +35 -18
- package/dist/agent.mjs.map +1 -1
- package/dist/{dist-DN31JPna.mjs → dist-24hGLXP2.mjs} +103 -2
- package/dist/dist-24hGLXP2.mjs.map +1 -0
- package/dist/{dist-CwfjWo4B.cjs → dist-BJBiKPGz.cjs} +2 -2
- package/dist/{dist-CwfjWo4B.cjs.map → dist-BJBiKPGz.cjs.map} +1 -1
- package/dist/{dist-CYP5TXGO.mjs → dist-Cfj4uquz.mjs} +2 -2
- package/dist/{dist-CYP5TXGO.mjs.map → dist-Cfj4uquz.mjs.map} +1 -1
- package/dist/{dist-CbLrJ50M.cjs → dist-D1qsfZPC.cjs} +103 -2
- package/dist/dist-D1qsfZPC.cjs.map +1 -0
- package/dist/{index-C9qevi4R.d.cts → index-CRDakIp7.d.cts} +16 -24
- package/dist/index-CRDakIp7.d.cts.map +1 -0
- package/dist/{index-CGa7YLSI.d.mts → index-CwLz1Fhs.d.mts} +16 -24
- package/dist/index-CwLz1Fhs.d.mts.map +1 -0
- package/dist/{mistral-j9b3vM0i.mjs → mistral-DOQjM8xW.mjs} +2 -2
- package/dist/{mistral-j9b3vM0i.mjs.map → mistral-DOQjM8xW.mjs.map} +1 -1
- package/dist/{mistral-BrDQAJSw.cjs → mistral-valYIS-y.cjs} +2 -2
- package/dist/{mistral-BrDQAJSw.cjs.map → mistral-valYIS-y.cjs.map} +1 -1
- package/dist/{sse-DUu9Naud.mjs → sse-2x1Rj7T8.mjs} +2 -2
- package/dist/{sse-DUu9Naud.mjs.map → sse-2x1Rj7T8.mjs.map} +1 -1
- package/dist/{sse-DaIihZIC.cjs → sse-B0wWt4Vq.cjs} +2 -2
- package/dist/{sse-DaIihZIC.cjs.map → sse-B0wWt4Vq.cjs.map} +1 -1
- package/dist/trigger.cjs +1 -1
- package/dist/trigger.d.cts +1 -1
- package/dist/trigger.d.mts +1 -1
- package/dist/trigger.mjs +1 -1
- package/dist/workflow.cjs +1 -1
- package/dist/workflow.mjs +1 -1
- package/package.json +1 -1
- package/dist/dist-CbLrJ50M.cjs.map +0 -1
- package/dist/dist-DN31JPna.mjs.map +0 -1
- package/dist/index-C9qevi4R.d.cts.map +0 -1
- package/dist/index-CGa7YLSI.d.mts.map +0 -1
|
@@ -17286,7 +17286,7 @@ async function connectMcpServer(name, options) {
|
|
|
17286
17286
|
}
|
|
17287
17287
|
async function createTransport(url, transport, requestInit, fetchImpl) {
|
|
17288
17288
|
if (transport === "sse") {
|
|
17289
|
-
const { SSEClientTransport } = await import("./sse-
|
|
17289
|
+
const { SSEClientTransport } = await import("./sse-2x1Rj7T8.mjs");
|
|
17290
17290
|
return new SSEClientTransport(url, {
|
|
17291
17291
|
requestInit,
|
|
17292
17292
|
fetch: fetchImpl
|
|
@@ -17489,6 +17489,95 @@ const authVerificationsSqlite = sqliteTable("verification", {
|
|
|
17489
17489
|
createdAt: integer("created_at", { mode: "timestamp_ms" }).notNull(),
|
|
17490
17490
|
updatedAt: integer("updated_at", { mode: "timestamp_ms" }).notNull()
|
|
17491
17491
|
}, (table) => [index("verification_identifier_idx").on(table.identifier)]);
|
|
17492
|
+
/**
|
|
17493
|
+
* Tables backing keystroke as an OAuth 2.1 Authorization Server for the
|
|
17494
|
+
* Universal MCP server: dynamically-registered MCP/AI clients, their issued
|
|
17495
|
+
* access/refresh tokens, and consent records.
|
|
17496
|
+
*
|
|
17497
|
+
* NOT to be confused with `oauth_apps` / `oauth_connections`, which model the
|
|
17498
|
+
* inverse — keystroke as an OAuth *client* storing our users' connections to
|
|
17499
|
+
* third-party providers. These `mcp_oauth_*` tables are the provider side.
|
|
17500
|
+
*
|
|
17501
|
+
* Wired to Better Auth via the Drizzle adapter (`authSchemaFor`). Better Auth
|
|
17502
|
+
* addresses these by its fixed model names (`oauthApplication`,
|
|
17503
|
+
* `oauthAccessToken`, `oauthConsent`) and by field name (the JS property keys
|
|
17504
|
+
* below); the physical table/column names are ours to choose.
|
|
17505
|
+
*
|
|
17506
|
+
* Note: access/refresh tokens are stored as opaque plaintext bearer strings
|
|
17507
|
+
* (the Better Auth mcp plugin looks them up directly and cannot hash them),
|
|
17508
|
+
* consistent with how the `sessions` table stores session tokens. They are
|
|
17509
|
+
* short-lived; rely on DB access controls + at-rest encryption.
|
|
17510
|
+
*/
|
|
17511
|
+
const mcpOauthClient = pgTable("mcp_oauth_client", {
|
|
17512
|
+
id: text$1("id").primaryKey(),
|
|
17513
|
+
name: text$1("name").notNull(),
|
|
17514
|
+
icon: text$1("icon"),
|
|
17515
|
+
metadata: text$1("metadata"),
|
|
17516
|
+
clientId: text$1("client_id").notNull().unique(),
|
|
17517
|
+
clientSecret: text$1("client_secret"),
|
|
17518
|
+
redirectUrls: text$1("redirect_urls").notNull(),
|
|
17519
|
+
type: text$1("type").notNull(),
|
|
17520
|
+
disabled: boolean("disabled").notNull().default(false),
|
|
17521
|
+
userId: text$1("user_id").references(() => users.id, { onDelete: "cascade" }),
|
|
17522
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull(),
|
|
17523
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull()
|
|
17524
|
+
}, (table) => [index$1("mcp_oauth_client_user_id_idx").on(table.userId)]);
|
|
17525
|
+
const mcpOauthClientSqlite = sqliteTable("mcp_oauth_client", {
|
|
17526
|
+
id: text("id").primaryKey(),
|
|
17527
|
+
name: text("name").notNull(),
|
|
17528
|
+
icon: text("icon"),
|
|
17529
|
+
metadata: text("metadata"),
|
|
17530
|
+
clientId: text("client_id").notNull().unique(),
|
|
17531
|
+
clientSecret: text("client_secret"),
|
|
17532
|
+
redirectUrls: text("redirect_urls").notNull(),
|
|
17533
|
+
type: text("type").notNull(),
|
|
17534
|
+
disabled: integer("disabled", { mode: "boolean" }).notNull().default(false),
|
|
17535
|
+
userId: text("user_id").references(() => usersSqlite.id, { onDelete: "cascade" }),
|
|
17536
|
+
createdAt: integer("created_at", { mode: "timestamp_ms" }).notNull(),
|
|
17537
|
+
updatedAt: integer("updated_at", { mode: "timestamp_ms" }).notNull()
|
|
17538
|
+
}, (table) => [index("mcp_oauth_client_user_id_idx").on(table.userId)]);
|
|
17539
|
+
const mcpOauthAccessToken = pgTable("mcp_oauth_access_token", {
|
|
17540
|
+
id: text$1("id").primaryKey(),
|
|
17541
|
+
accessToken: text$1("access_token").notNull().unique(),
|
|
17542
|
+
refreshToken: text$1("refresh_token").unique(),
|
|
17543
|
+
accessTokenExpiresAt: timestamp("access_token_expires_at", { withTimezone: true }),
|
|
17544
|
+
refreshTokenExpiresAt: timestamp("refresh_token_expires_at", { withTimezone: true }),
|
|
17545
|
+
clientId: text$1("client_id").notNull(),
|
|
17546
|
+
userId: text$1("user_id").references(() => users.id, { onDelete: "cascade" }),
|
|
17547
|
+
scopes: text$1("scopes"),
|
|
17548
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull(),
|
|
17549
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull()
|
|
17550
|
+
}, (table) => [index$1("mcp_oauth_access_token_client_id_idx").on(table.clientId), index$1("mcp_oauth_access_token_user_id_idx").on(table.userId)]);
|
|
17551
|
+
const mcpOauthAccessTokenSqlite = sqliteTable("mcp_oauth_access_token", {
|
|
17552
|
+
id: text("id").primaryKey(),
|
|
17553
|
+
accessToken: text("access_token").notNull().unique(),
|
|
17554
|
+
refreshToken: text("refresh_token").unique(),
|
|
17555
|
+
accessTokenExpiresAt: integer("access_token_expires_at", { mode: "timestamp_ms" }),
|
|
17556
|
+
refreshTokenExpiresAt: integer("refresh_token_expires_at", { mode: "timestamp_ms" }),
|
|
17557
|
+
clientId: text("client_id").notNull(),
|
|
17558
|
+
userId: text("user_id").references(() => usersSqlite.id, { onDelete: "cascade" }),
|
|
17559
|
+
scopes: text("scopes"),
|
|
17560
|
+
createdAt: integer("created_at", { mode: "timestamp_ms" }).notNull(),
|
|
17561
|
+
updatedAt: integer("updated_at", { mode: "timestamp_ms" }).notNull()
|
|
17562
|
+
}, (table) => [index("mcp_oauth_access_token_client_id_idx").on(table.clientId), index("mcp_oauth_access_token_user_id_idx").on(table.userId)]);
|
|
17563
|
+
const mcpOauthConsent = pgTable("mcp_oauth_consent", {
|
|
17564
|
+
id: text$1("id").primaryKey(),
|
|
17565
|
+
clientId: text$1("client_id").notNull(),
|
|
17566
|
+
userId: text$1("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
|
|
17567
|
+
scopes: text$1("scopes"),
|
|
17568
|
+
consentGiven: boolean("consent_given").notNull().default(false),
|
|
17569
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull(),
|
|
17570
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull()
|
|
17571
|
+
}, (table) => [index$1("mcp_oauth_consent_client_id_idx").on(table.clientId), index$1("mcp_oauth_consent_user_id_idx").on(table.userId)]);
|
|
17572
|
+
const mcpOauthConsentSqlite = sqliteTable("mcp_oauth_consent", {
|
|
17573
|
+
id: text("id").primaryKey(),
|
|
17574
|
+
clientId: text("client_id").notNull(),
|
|
17575
|
+
userId: text("user_id").notNull().references(() => usersSqlite.id, { onDelete: "cascade" }),
|
|
17576
|
+
scopes: text("scopes"),
|
|
17577
|
+
consentGiven: integer("consent_given", { mode: "boolean" }).notNull().default(false),
|
|
17578
|
+
createdAt: integer("created_at", { mode: "timestamp_ms" }).notNull(),
|
|
17579
|
+
updatedAt: integer("updated_at", { mode: "timestamp_ms" }).notNull()
|
|
17580
|
+
}, (table) => [index("mcp_oauth_consent_client_id_idx").on(table.clientId), index("mcp_oauth_consent_user_id_idx").on(table.userId)]);
|
|
17492
17581
|
createRequire(import.meta.url);
|
|
17493
17582
|
function buildPgSchema(registry) {
|
|
17494
17583
|
return Object.fromEntries(Object.entries(registry).map(([name, { pg }]) => [name, pg]));
|
|
@@ -17918,6 +18007,18 @@ const tableRegistry = {
|
|
|
17918
18007
|
pg: oauthConnections,
|
|
17919
18008
|
sqlite: oauthConnectionsSqlite
|
|
17920
18009
|
},
|
|
18010
|
+
mcpOauthClient: {
|
|
18011
|
+
pg: mcpOauthClient,
|
|
18012
|
+
sqlite: mcpOauthClientSqlite
|
|
18013
|
+
},
|
|
18014
|
+
mcpOauthAccessToken: {
|
|
18015
|
+
pg: mcpOauthAccessToken,
|
|
18016
|
+
sqlite: mcpOauthAccessTokenSqlite
|
|
18017
|
+
},
|
|
18018
|
+
mcpOauthConsent: {
|
|
18019
|
+
pg: mcpOauthConsent,
|
|
18020
|
+
sqlite: mcpOauthConsentSqlite
|
|
18021
|
+
},
|
|
17921
18022
|
secretValues: {
|
|
17922
18023
|
pg: secretValues,
|
|
17923
18024
|
sqlite: secretValuesSqlite
|
|
@@ -18840,4 +18941,4 @@ async function resolveActionCredentials(requirements, options) {
|
|
|
18840
18941
|
//#endregion
|
|
18841
18942
|
export { recordLlmUsageFromAssistantMessage as A, appendEvent as C, getProjectScopeId as D, getAgentByRoute as E, captureConsole as F, getTraceContext as I, logSystem as L, setSessionLiveMessage as M, setSessionTitle as N, getSession as O, touchSession as P, withSpan as R, addAgentSessionDuration as S, createSession as T, createFetchWithInit as _, resolveActionCredentials as a, JSONRPCMessageSchema as b, connectMcpDefinition as c, defineMcp as d, isMcp as f, extractWWWAuthenticateParams as g, auth as h, isCredentialError as i, resolveRunSourceFromTraceContext as j, listMessageEvents as k, connectMcpServer as l, UnauthorizedError as m, captureCredentialToolErrors as n, resolveMcpTools as o, createParser as p, createCredentialResolver as r, withCredentialAssignments as s, buildCredentialRunContext as t, connectMcpStdio as u, normalizeHeaders as v, clearLiveMessage as w, MESSAGE_EVENT_TYPE as x, zodToJsonSchema as y };
|
|
18842
18943
|
|
|
18843
|
-
//# sourceMappingURL=dist-
|
|
18944
|
+
//# sourceMappingURL=dist-24hGLXP2.mjs.map
|