diff --git a/src/cli/dev/handlers/index.ts b/src/cli/dev/handlers/index.ts index 2efde7b..dc6b9af 100644 --- a/src/cli/dev/handlers/index.ts +++ b/src/cli/dev/handlers/index.ts @@ -174,6 +174,7 @@ export class DevServerHandlers implements IRequestHandlers { region: "local", }, session: session, + secrets: {}, }; // Always use the created session diff --git a/src/runtime/loop.test.ts b/src/runtime/loop.test.ts index eb99620..82f243e 100644 --- a/src/runtime/loop.test.ts +++ b/src/runtime/loop.test.ts @@ -33,6 +33,7 @@ describe("waitForAndHandleInvocation", () => { params: {}, context: { session: { id: "session-123", connectUrl: "ws://test" }, + secrets: {}, }, }, }; @@ -120,6 +121,7 @@ describe("waitForAndHandleInvocation", () => { params: {}, context: { session: { id: "session-456", connectUrl: "ws://test" }, + secrets: {}, }, }, }; @@ -196,6 +198,7 @@ describe("waitForAndHandleInvocation", () => { params: {}, context: { session: { id: "session-789", connectUrl: "ws://test" }, + secrets: {}, }, }, }; @@ -329,6 +332,7 @@ describe("waitForAndHandleInvocation", () => { params: {}, context: { session: { id: "session-321", connectUrl: "ws://test" }, + secrets: {}, }, }, }; @@ -393,6 +397,7 @@ describe("waitForAndHandleInvocation", () => { params: {}, context: { session: { id: "session-654", connectUrl: "ws://test" }, + secrets: {}, }, }, }; diff --git a/src/runtime/registry.test.ts b/src/runtime/registry.test.ts index 5c8e4fa..fccd8c8 100644 --- a/src/runtime/registry.test.ts +++ b/src/runtime/registry.test.ts @@ -12,6 +12,7 @@ const defaultMockContext: FunctionInvocationContext = { id: "session-456", connectUrl: "https://example.com/connect", }, + secrets: {}, }; describe("FunctionRegistry", () => { diff --git a/src/schemas/invocation.ts b/src/schemas/invocation.ts index 3fd4f90..8ea57d3 100644 --- a/src/schemas/invocation.ts +++ b/src/schemas/invocation.ts @@ -13,6 +13,7 @@ export type FunctionInvocationContextSessionDetails = z.infer< // Allow in additional fields without needing to update the SDK version export const FunctionInvocationContext = z.looseObject({ session: FunctionInvocationContextSessionDetails, + secrets: z.record(z.string().min(1), z.string()).default({}), }); export type FunctionInvocationContext = z.infer<