@vantageos/agent-engine 0.1.0-alpha.8 → 0.3.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/README.md +33 -8
  2. package/dist/component/_generated/api.d.ts +14 -27
  3. package/dist/component/_generated/api.js +0 -25
  4. package/dist/component/_generated/component.d.ts +369 -92
  5. package/dist/component/_generated/component.js +0 -9
  6. package/dist/component/_generated/dataModel.d.ts +0 -38
  7. package/dist/component/_generated/dataModel.js +0 -9
  8. package/dist/component/_generated/server.d.ts +0 -106
  9. package/dist/component/_generated/server.js +0 -69
  10. package/dist/component/convex.config.js +0 -44
  11. package/dist/component/engine/agents.js +0 -7
  12. package/dist/component/engine/awaitEventTimeout.d.ts +1 -1
  13. package/dist/component/engine/awaitEventTimeout.js +18 -26
  14. package/dist/component/engine/connections.d.ts +74 -0
  15. package/dist/component/engine/connections.js +254 -0
  16. package/dist/component/engine/delegation.d.ts +1 -1
  17. package/dist/component/engine/delegation.js +0 -74
  18. package/dist/component/engine/directory.js +0 -18
  19. package/dist/component/engine/durableJob.d.ts +34 -4
  20. package/dist/component/engine/durableJob.js +333 -86
  21. package/dist/component/engine/mandates.js +0 -59
  22. package/dist/component/engine/queue.d.ts +97 -0
  23. package/dist/component/engine/queue.js +201 -0
  24. package/dist/component/engine/resolvers.d.ts +1 -1
  25. package/dist/component/engine/resolvers.js +6 -18
  26. package/dist/component/engine/sandboxCallback.d.ts +1 -1
  27. package/dist/component/engine/sandboxCallback.js +2 -79
  28. package/dist/component/engine/sandboxConfigProvider.d.ts +9 -0
  29. package/dist/component/engine/sandboxConfigProvider.js +32 -0
  30. package/dist/component/engine/sessions.d.ts +28 -10
  31. package/dist/component/engine/sessions.js +153 -165
  32. package/dist/component/engine/streams.d.ts +47 -0
  33. package/dist/component/engine/streams.js +162 -0
  34. package/dist/component/engine/toolApprovals.d.ts +1 -1
  35. package/dist/component/engine/toolApprovals.js +12 -37
  36. package/dist/component/engine/vpConnection.js +0 -40
  37. package/dist/component/engine/wakeup.d.ts +5 -7
  38. package/dist/component/engine/wakeup.js +54 -127
  39. package/dist/component/engine/workflows.d.ts +42 -0
  40. package/dist/component/engine/workflows.js +100 -41
  41. package/dist/component/engine/world.d.ts +249 -0
  42. package/dist/component/engine/world.js +665 -0
  43. package/dist/component/lib/auth.js +0 -26
  44. package/dist/component/lib/connectionSecret.d.ts +5 -0
  45. package/dist/component/lib/connectionSecret.js +32 -0
  46. package/dist/component/schema.d.ts +227 -77
  47. package/dist/component/schema.js +137 -250
  48. package/package.json +17 -3
  49. package/dist/component/engine/habits.d.ts +0 -70
  50. package/dist/component/engine/habits.js +0 -218
  51. package/dist/component/testFixtures/callerSteps.d.ts +0 -20
  52. package/dist/component/testFixtures/callerSteps.js +0 -90
  53. package/dist/component/testFixtures/delegationDemoWorkflow.d.ts +0 -18
  54. package/dist/component/testFixtures/delegationDemoWorkflow.js +0 -75
  55. package/dist/component/testFixtures/sandboxDemoWorkflow.d.ts +0 -19
  56. package/dist/component/testFixtures/sandboxDemoWorkflow.js +0 -69
  57. package/dist/component/testFixtures/vpTool.d.ts +0 -4
  58. package/dist/component/testFixtures/vpTool.js +0 -25
  59. package/dist/component/testFixtures/wakeupDemoWorkflow.d.ts +0 -19
  60. package/dist/component/testFixtures/wakeupDemoWorkflow.js +0 -77
  61. package/dist/component/testFixtures/wakeupWork.d.ts +0 -8
  62. package/dist/component/testFixtures/wakeupWork.js +0 -21
@@ -1,120 +1,14 @@
1
- /**
2
- * Generated utilities for implementing server-side Convex query and mutation functions.
3
- *
4
- * THIS CODE IS AUTOMATICALLY GENERATED.
5
- *
6
- * To regenerate, run `npx convex dev`.
7
- * @module
8
- */
9
1
  import type { ActionBuilder, HttpActionBuilder, MutationBuilder, QueryBuilder, GenericActionCtx, GenericMutationCtx, GenericQueryCtx, GenericDatabaseReader, GenericDatabaseWriter } from "convex/server";
10
2
  import type { DataModel } from "./dataModel.js";
11
- /**
12
- * Define a query in this Convex app's public API.
13
- *
14
- * This function will be allowed to read your Convex database and will be accessible from the client.
15
- *
16
- * @param func - The query function. It receives a {@link QueryCtx} as its first argument.
17
- * @returns The wrapped query. Include this as an `export` to name it and make it accessible.
18
- */
19
3
  export declare const query: QueryBuilder<DataModel, "public">;
20
- /**
21
- * Define a query that is only accessible from other Convex functions (but not from the client).
22
- *
23
- * This function will be allowed to read from your Convex database. It will not be accessible from the client.
24
- *
25
- * @param func - The query function. It receives a {@link QueryCtx} as its first argument.
26
- * @returns The wrapped query. Include this as an `export` to name it and make it accessible.
27
- */
28
4
  export declare const internalQuery: QueryBuilder<DataModel, "internal">;
29
- /**
30
- * Define a mutation in this Convex app's public API.
31
- *
32
- * This function will be allowed to modify your Convex database and will be accessible from the client.
33
- *
34
- * @param func - The mutation function. It receives a {@link MutationCtx} as its first argument.
35
- * @returns The wrapped mutation. Include this as an `export` to name it and make it accessible.
36
- */
37
5
  export declare const mutation: MutationBuilder<DataModel, "public">;
38
- /**
39
- * Define a mutation that is only accessible from other Convex functions (but not from the client).
40
- *
41
- * This function will be allowed to modify your Convex database. It will not be accessible from the client.
42
- *
43
- * @param func - The mutation function. It receives a {@link MutationCtx} as its first argument.
44
- * @returns The wrapped mutation. Include this as an `export` to name it and make it accessible.
45
- */
46
6
  export declare const internalMutation: MutationBuilder<DataModel, "internal">;
47
- /**
48
- * Define an action in this Convex app's public API.
49
- *
50
- * An action is a function which can execute any JavaScript code, including non-deterministic
51
- * code and code with side-effects, like calling third-party services.
52
- * They can be run in Convex's JavaScript environment or in Node.js using the "use node" directive.
53
- * They can interact with the database indirectly by calling queries and mutations using the {@link ActionCtx}.
54
- *
55
- * @param func - The action. It receives an {@link ActionCtx} as its first argument.
56
- * @returns The wrapped action. Include this as an `export` to name it and make it accessible.
57
- */
58
7
  export declare const action: ActionBuilder<DataModel, "public">;
59
- /**
60
- * Define an action that is only accessible from other Convex functions (but not from the client).
61
- *
62
- * @param func - The function. It receives an {@link ActionCtx} as its first argument.
63
- * @returns The wrapped function. Include this as an `export` to name it and make it accessible.
64
- */
65
8
  export declare const internalAction: ActionBuilder<DataModel, "internal">;
66
- /**
67
- * Define an HTTP action.
68
- *
69
- * The wrapped function will be used to respond to HTTP requests received
70
- * by a Convex deployment if the requests matches the path and method where
71
- * this action is routed. Be sure to route your httpAction in `convex/http.js`.
72
- *
73
- * @param func - The function. It receives an {@link ActionCtx} as its first argument
74
- * and a Fetch API `Request` object as its second.
75
- * @returns The wrapped function. Import this function from `convex/http.js` and route it to hook it up.
76
- */
77
9
  export declare const httpAction: HttpActionBuilder;
78
- /**
79
- * A set of services for use within Convex query functions.
80
- *
81
- * The query context is passed as the first argument to any Convex query
82
- * function run on the server.
83
- *
84
- * If you're using code generation, use the `QueryCtx` type in `convex/_generated/server.d.ts` instead.
85
- */
86
10
  export type QueryCtx = GenericQueryCtx<DataModel>;
87
- /**
88
- * A set of services for use within Convex mutation functions.
89
- *
90
- * The mutation context is passed as the first argument to any Convex mutation
91
- * function run on the server.
92
- *
93
- * If you're using code generation, use the `MutationCtx` type in `convex/_generated/server.d.ts` instead.
94
- */
95
11
  export type MutationCtx = GenericMutationCtx<DataModel>;
96
- /**
97
- * A set of services for use within Convex action functions.
98
- *
99
- * The action context is passed as the first argument to any Convex action
100
- * function run on the server.
101
- */
102
12
  export type ActionCtx = GenericActionCtx<DataModel>;
103
- /**
104
- * An interface to read from the database within Convex query functions.
105
- *
106
- * The two entry points are {@link DatabaseReader.get}, which fetches a single
107
- * document by its {@link Id}, or {@link DatabaseReader.query}, which starts
108
- * building a query.
109
- */
110
13
  export type DatabaseReader = GenericDatabaseReader<DataModel>;
111
- /**
112
- * An interface to read from and write to the database within Convex mutation
113
- * functions.
114
- *
115
- * Convex guarantees that all writes within a single mutation are
116
- * executed atomically, so you never have to worry about partial writes leaving
117
- * your data in an inconsistent state. See [the Convex Guide](https://docs.convex.dev/understanding/convex-fundamentals/functions#atomicity-and-optimistic-concurrency-control)
118
- * for the guarantees Convex provides your functions.
119
- */
120
14
  export type DatabaseWriter = GenericDatabaseWriter<DataModel>;
@@ -1,77 +1,8 @@
1
- /* eslint-disable */
2
- /**
3
- * Generated utilities for implementing server-side Convex query and mutation functions.
4
- *
5
- * THIS CODE IS AUTOMATICALLY GENERATED.
6
- *
7
- * To regenerate, run `npx convex dev`.
8
- * @module
9
- */
10
1
  import { actionGeneric, httpActionGeneric, queryGeneric, mutationGeneric, internalActionGeneric, internalMutationGeneric, internalQueryGeneric, } from "convex/server";
11
- /**
12
- * Define a query in this Convex app's public API.
13
- *
14
- * This function will be allowed to read your Convex database and will be accessible from the client.
15
- *
16
- * @param func - The query function. It receives a {@link QueryCtx} as its first argument.
17
- * @returns The wrapped query. Include this as an `export` to name it and make it accessible.
18
- */
19
2
  export const query = queryGeneric;
20
- /**
21
- * Define a query that is only accessible from other Convex functions (but not from the client).
22
- *
23
- * This function will be allowed to read from your Convex database. It will not be accessible from the client.
24
- *
25
- * @param func - The query function. It receives a {@link QueryCtx} as its first argument.
26
- * @returns The wrapped query. Include this as an `export` to name it and make it accessible.
27
- */
28
3
  export const internalQuery = internalQueryGeneric;
29
- /**
30
- * Define a mutation in this Convex app's public API.
31
- *
32
- * This function will be allowed to modify your Convex database and will be accessible from the client.
33
- *
34
- * @param func - The mutation function. It receives a {@link MutationCtx} as its first argument.
35
- * @returns The wrapped mutation. Include this as an `export` to name it and make it accessible.
36
- */
37
4
  export const mutation = mutationGeneric;
38
- /**
39
- * Define a mutation that is only accessible from other Convex functions (but not from the client).
40
- *
41
- * This function will be allowed to modify your Convex database. It will not be accessible from the client.
42
- *
43
- * @param func - The mutation function. It receives a {@link MutationCtx} as its first argument.
44
- * @returns The wrapped mutation. Include this as an `export` to name it and make it accessible.
45
- */
46
5
  export const internalMutation = internalMutationGeneric;
47
- /**
48
- * Define an action in this Convex app's public API.
49
- *
50
- * An action is a function which can execute any JavaScript code, including non-deterministic
51
- * code and code with side-effects, like calling third-party services.
52
- * They can be run in Convex's JavaScript environment or in Node.js using the "use node" directive.
53
- * They can interact with the database indirectly by calling queries and mutations using the {@link ActionCtx}.
54
- *
55
- * @param func - The action. It receives an {@link ActionCtx} as its first argument.
56
- * @returns The wrapped action. Include this as an `export` to name it and make it accessible.
57
- */
58
6
  export const action = actionGeneric;
59
- /**
60
- * Define an action that is only accessible from other Convex functions (but not from the client).
61
- *
62
- * @param func - The function. It receives an {@link ActionCtx} as its first argument.
63
- * @returns The wrapped function. Include this as an `export` to name it and make it accessible.
64
- */
65
7
  export const internalAction = internalActionGeneric;
66
- /**
67
- * Define an HTTP action.
68
- *
69
- * The wrapped function will be used to respond to HTTP requests received
70
- * by a Convex deployment if the requests matches the path and method where
71
- * this action is routed. Be sure to route your httpAction in `convex/http.js`.
72
- *
73
- * @param func - The function. It receives an {@link ActionCtx} as its first argument
74
- * and a Fetch API `Request` object as its second.
75
- * @returns The wrapped function. Import this function from `convex/http.js` and route it to hook it up.
76
- */
77
8
  export const httpAction = httpActionGeneric;
@@ -4,49 +4,6 @@ import workpool from "@convex-dev/workpool/convex.config";
4
4
  import agent from "@convex-dev/agent/convex.config";
5
5
  import rateLimiter from "@convex-dev/rate-limiter/convex.config";
6
6
  import shardedCounter from "@convex-dev/sharded-counter/convex.config";
7
- import crons from "@convex-dev/crons/convex.config";
8
- // @vantageos/agent-engine — Convex COMPONENT definition (pattern
9
- // `@convex-dev/*`, verified against the published shape of
10
- // `@convex-dev/workflow` — `defineComponent(name)` + a `convex.config.ts`
11
- // at the root of the *package that gets published*, not merely at the
12
- // root of the git repo).
13
- //
14
- // This is what a consumer registers via:
15
- // import agentEngine from "@vantageos/agent-engine/convex.config";
16
- // app.use(agentEngine);
17
- //
18
- // This file declares agent-engine's COMPONENT IDENTITY and its
19
- // sub-component composition (workflow + 2 named workpools + agent), which
20
- // is what makes the `@vantageos/agent-engine/convex.config` import
21
- // RESOLVE for a consumer and what makes `app.use(agentEngine)` build
22
- // without throwing.
23
- //
24
- // T2-QUATER (this pass): `convex/component/engine/durableJob.ts` +
25
- // `convex/component/schema.ts` (its `durableJobs` table) +
26
- // `convex/component/lib/auth.ts` (orgId isolation) are now CO-LOCATED in
27
- // this same directory tree, alongside this file — this is what a
28
- // consumer's `npx convex dev`/`deploy` actually bundles and deploys under
29
- // the component boundary, and what makes
30
- // `components.agentEngine.engine.durableJob.start(...)` resolve to a real
31
- // function instead of `undefined`. See README.md "What's callable" for
32
- // the exact, current boundary: durableJob is IN; the rest of the agent
33
- // aggregate (agents, skills, subagents, connections, habits,
34
- // sandboxConfig, toolApprovals, modelKeys, sessions, sessionEvents,
35
- // awaitEventTimeouts, wakeableWork) is deliberately NOT yet re-hosted
36
- // here — porting those without a working component-level test harness
37
- // behind each of them would violate Day 128 (never ship unverified).
38
- // Mandates (bounded, weighted spending authority per agent/org/scope) are
39
- // hosted under this component boundary, using official `@convex-dev/*`
40
- // libraries only -- no canary/alpha dependency for a guardrail:
41
- // `rate-limiter` for the fails-closed spend gate itself, `sharded-counter`
42
- // for the usage rollup. See component/engine/mandates.ts.
43
- // Habits (a dynamic, per-agent/org cron schedule editable at runtime) are
44
- // also hosted under this component boundary, ported byte-identical from the
45
- // repo-root prototype (convex/habits.ts). `crons` is a sub-component of
46
- // THIS component -- create/updateSchedule/enable/disable register or tear
47
- // down a runtime cron job via `@convex-dev/crons` inside the SAME Convex
48
- // mutation transaction that writes the `habits` row, so no habit schedule
49
- // change ever requires a redeploy. See component/engine/habits.ts.
50
7
  const component = defineComponent("agentEngine");
51
8
  component.use(workflow);
52
9
  component.use(workpool, { name: "agentTurnPool" });
@@ -54,5 +11,4 @@ component.use(workpool, { name: "wakeupPool" });
54
11
  component.use(agent);
55
12
  component.use(rateLimiter);
56
13
  component.use(shardedCounter);
57
- component.use(crons);
58
14
  export default component;
@@ -1,13 +1,6 @@
1
1
  import { v } from "convex/values";
2
2
  import { mutation, query } from "../_generated/server.js";
3
3
  import { requireOrgId } from "../lib/auth.js";
4
- // engine/agents — MINIMAL root-sheet bootstrap for the sessions surface
5
- // (T2-QUINQUIES). `sessions.start` needs an `agentId` it can read INSIDE
6
- // the component boundary (component isolation: it cannot reach into a
7
- // consumer app's own `agents` table). This is deliberately narrow: only
8
- // `create`/`get`, no `update`/`list`/skills/connections — the full agent
9
- // aggregate CRUD stays out of this component boundary for this pass (see
10
- // component/schema.ts SCOPE note).
11
4
  const reasoningEffort = v.union(v.literal("none"), v.literal("low"), v.literal("medium"), v.literal("high"));
12
5
  const modelProvider = v.union(v.literal("gateway"), v.literal("openrouter"));
13
6
  const maxInputTokensPerSession = v.union(v.number(), v.literal(false));
@@ -1,6 +1,6 @@
1
1
  export declare const schedule: import("convex/server").RegisteredMutation<"public", {
2
2
  orgId: string;
3
- sessionId: import("convex/values").GenericId<"sessions">;
3
+ sessionId: string;
4
4
  awaitedEventName: string;
5
5
  timeoutMs: number;
6
6
  }, Promise<import("convex/values").GenericId<"awaitEventTimeouts">>>;
@@ -2,41 +2,27 @@ import { v } from "convex/values";
2
2
  import { internal } from "../_generated/api.js";
3
3
  import { internalMutation, mutation } from "../_generated/server.js";
4
4
  import { assertSameOrg, requireOrgId } from "../lib/auth.js";
5
- // engine/awaitEventTimeout — self-built timeout for step.awaitEvent
6
- // (workflow#177: "Convex does not provide a native timeout for
7
- // awaitEvent"). We schedule a mutation that
8
- // fires a "blank" `sandbox.timeout` sessionEvent at the deadline; the
9
- // workflow's `awaitEvent` call is written to also accept this event name so
10
- // it wakes up even if the awaited event never arrives. Pattern:
11
- // maintainer's posted code in workflow#177, adapted to our sessionEvents
12
- // table.
13
- //
14
- // NOTE ("intentional divergence from Eve"): orgId is an EXPLICIT ARGUMENT on
15
- // every public function, never derived from `ctx.auth` -- auth does NOT
16
- // propagate across a component boundary (component/lib/auth.ts). Also:
17
- // `sessionEvents.name`'s union in component/schema.ts did not previously
18
- // include `sandbox.timeout` -- it has been added there (and mirrored in
19
- // `engine/sessions.listEvents`'s return validator) as part of this
20
- // migration, otherwise `fire`'s insert below would not compile under the
21
- // strict build.
5
+ import { insertEvent, loadSessionRun } from "./sessions.js";
6
+ import { findRunIdByCorrelation, legacyCorrelationId, legacySessionOf, loadRun, } from "./world.js";
22
7
  export const schedule = mutation({
23
8
  args: {
24
9
  orgId: v.string(),
25
- sessionId: v.id("sessions"),
10
+ sessionId: v.string(),
26
11
  awaitedEventName: v.string(),
27
12
  timeoutMs: v.number(),
28
13
  },
29
14
  returns: v.id("awaitEventTimeouts"),
30
15
  handler: async (ctx, args) => {
31
16
  const orgId = requireOrgId(args.orgId);
32
- const session = await ctx.db.get(args.sessionId);
33
- assertSameOrg(orgId, session, "Session not found");
17
+ const run = await loadSessionRun(ctx, orgId, args.sessionId);
18
+ const legacy = await legacySessionOf(ctx, run, orgId);
34
19
  if (args.timeoutMs <= 0) {
35
20
  throw new Error("Validation: timeoutMs must be > 0");
36
21
  }
37
22
  const timeoutRowId = await ctx.db.insert("awaitEventTimeouts", {
38
23
  orgId,
39
- sessionId: args.sessionId,
24
+ runId: run.runId,
25
+ sessionId: legacy?._id,
40
26
  awaitedEventName: args.awaitedEventName,
41
27
  deadlineAt: Date.now() + args.timeoutMs,
42
28
  });
@@ -59,22 +45,28 @@ export const cancel = mutation({
59
45
  return null;
60
46
  },
61
47
  });
62
- // internal — invoked only by the scheduler, never by a client.
63
48
  export const fire = internalMutation({
64
49
  args: { timeoutRowId: v.id("awaitEventTimeouts") },
65
50
  returns: v.null(),
66
51
  handler: async (ctx, args) => {
67
52
  const row = await ctx.db.get(args.timeoutRowId);
68
53
  if (!row || row.firedAt || row.cancelledAt) {
69
- return null; // already resolved by the real event or by a prior fire
54
+ return null;
70
55
  }
71
56
  await ctx.db.patch(args.timeoutRowId, { firedAt: Date.now() });
72
- await ctx.db.insert("sessionEvents", {
57
+ let runId = row.runId;
58
+ if (runId === undefined && row.sessionId !== undefined) {
59
+ runId =
60
+ (await findRunIdByCorrelation(ctx, row.orgId, legacyCorrelationId("sessions", row.sessionId))) ?? undefined;
61
+ }
62
+ if (runId === undefined)
63
+ return null;
64
+ const run = await loadRun(ctx, row.orgId, runId, "sessions", "Session not found");
65
+ await insertEvent(ctx, {
73
66
  orgId: row.orgId,
74
- sessionId: row.sessionId,
67
+ run,
75
68
  name: "sandbox.timeout",
76
69
  payload: JSON.stringify({ awaitedEventName: row.awaitedEventName }),
77
- createdAt: Date.now(),
78
70
  });
79
71
  return null;
80
72
  },
@@ -0,0 +1,74 @@
1
+ import type { Id } from "../_generated/dataModel.js";
2
+ export declare const create: import("convex/server").RegisteredMutation<"public", {
3
+ secretPlaintext?: string | undefined;
4
+ encryptionKeyBase64?: string | undefined;
5
+ name: string;
6
+ orgId: string;
7
+ type: "mcp" | "openapi";
8
+ agentId: import("convex/values").GenericId<"agents">;
9
+ serverConfig: string;
10
+ authMode: "none" | "app-token" | "user-oauth" | "header";
11
+ }, Promise<Id<"connections">>>;
12
+ export declare const get: import("convex/server").RegisteredQuery<"public", {
13
+ orgId: string;
14
+ connectionId: import("convex/values").GenericId<"connections">;
15
+ }, Promise<{
16
+ _id: Id<"connections">;
17
+ _creationTime: number;
18
+ orgId: string;
19
+ agentId: Id<"agents">;
20
+ type: "mcp" | "openapi";
21
+ name: string;
22
+ serverConfig: string;
23
+ authMode: "none" | "app-token" | "user-oauth" | "header";
24
+ principalType: "app" | "user";
25
+ status: "active" | "pending_authorization" | "error";
26
+ hasSecret: boolean;
27
+ createdAt: number;
28
+ updatedAt: number;
29
+ }>>;
30
+ export declare const listByAgent: import("convex/server").RegisteredQuery<"public", {
31
+ orgId: string;
32
+ agentId: import("convex/values").GenericId<"agents">;
33
+ }, Promise<{
34
+ _id: Id<"connections">;
35
+ _creationTime: number;
36
+ orgId: string;
37
+ agentId: Id<"agents">;
38
+ type: "mcp" | "openapi";
39
+ name: string;
40
+ serverConfig: string;
41
+ authMode: "none" | "app-token" | "user-oauth" | "header";
42
+ principalType: "app" | "user";
43
+ status: "active" | "pending_authorization" | "error";
44
+ hasSecret: boolean;
45
+ createdAt: number;
46
+ updatedAt: number;
47
+ }[]>>;
48
+ export declare const requestAuthorization: import("convex/server").RegisteredMutation<"public", {
49
+ orgId: string;
50
+ workflowId: string;
51
+ awaitedEventName: string;
52
+ connectionId: import("convex/values").GenericId<"connections">;
53
+ url: string;
54
+ userCode: string;
55
+ }, Promise<Id<"connectionAuthorizations">>>;
56
+ export declare const getAuthorizationStatus: import("convex/server").RegisteredQuery<"public", {
57
+ orgId: string;
58
+ connectionAuthorizationId: import("convex/values").GenericId<"connectionAuthorizations">;
59
+ }, Promise<{
60
+ status: "pending" | "denied" | "authorized";
61
+ url: string;
62
+ userCode: string;
63
+ resultSummary: string | undefined;
64
+ }>>;
65
+ export declare const completeAuthorization: import("convex/server").RegisteredMutation<"public", {
66
+ resultSummary?: string | undefined;
67
+ secretPlaintext?: string | undefined;
68
+ encryptionKeyBase64?: string | undefined;
69
+ orgId: string;
70
+ outcome: "denied" | "authorized";
71
+ connectionAuthorizationId: import("convex/values").GenericId<"connectionAuthorizations">;
72
+ }, Promise<{
73
+ outcome: "woke" | "already-resolved";
74
+ }>>;