@stigmer/protos 0.0.76 → 0.0.78

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 (43) hide show
  1. package/ai/stigmer/agentic/mcpserver/v1/command_connect.d.ts +60 -0
  2. package/ai/stigmer/agentic/mcpserver/v1/command_connect.js +60 -0
  3. package/ai/stigmer/agentic/mcpserver/v1/command_connect.js.map +1 -1
  4. package/ai/stigmer/agentic/mcpserver/v1/command_pb.d.ts +59 -1
  5. package/ai/stigmer/agentic/mcpserver/v1/command_pb.js +1 -1
  6. package/ai/stigmer/agentic/mcpserver/v1/command_pb.js.map +1 -1
  7. package/ai/stigmer/agentic/mcpserver/v1/io_pb.d.ts +156 -0
  8. package/ai/stigmer/agentic/mcpserver/v1/io_pb.js +21 -1
  9. package/ai/stigmer/agentic/mcpserver/v1/io_pb.js.map +1 -1
  10. package/ai/stigmer/agentic/mcpserver/v1/oauth_pb.d.ts +102 -0
  11. package/ai/stigmer/agentic/mcpserver/v1/oauth_pb.js +14 -0
  12. package/ai/stigmer/agentic/mcpserver/v1/oauth_pb.js.map +1 -0
  13. package/ai/stigmer/agentic/mcpserver/v1/spec_pb.d.ts +87 -51
  14. package/ai/stigmer/agentic/mcpserver/v1/spec_pb.js +5 -5
  15. package/ai/stigmer/agentic/mcpserver/v1/spec_pb.js.map +1 -1
  16. package/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb.d.ts +6 -0
  17. package/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb.js +7 -1
  18. package/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb.js.map +1 -1
  19. package/ai/stigmer/iam/oauthapp/v1/api_pb.d.ts +82 -0
  20. package/ai/stigmer/iam/oauthapp/v1/api_pb.js +18 -0
  21. package/ai/stigmer/iam/oauthapp/v1/api_pb.js.map +1 -0
  22. package/ai/stigmer/iam/oauthapp/v1/command_connect.d.ts +82 -0
  23. package/ai/stigmer/iam/oauthapp/v1/command_connect.js +88 -0
  24. package/ai/stigmer/iam/oauthapp/v1/command_connect.js.map +1 -0
  25. package/ai/stigmer/iam/oauthapp/v1/command_pb.d.ts +82 -0
  26. package/ai/stigmer/iam/oauthapp/v1/command_pb.js +24 -0
  27. package/ai/stigmer/iam/oauthapp/v1/command_pb.js.map +1 -0
  28. package/ai/stigmer/iam/oauthapp/v1/io_pb.d.ts +62 -0
  29. package/ai/stigmer/iam/oauthapp/v1/io_pb.js +26 -0
  30. package/ai/stigmer/iam/oauthapp/v1/io_pb.js.map +1 -0
  31. package/ai/stigmer/iam/oauthapp/v1/query_connect.d.ts +59 -0
  32. package/ai/stigmer/iam/oauthapp/v1/query_connect.js +65 -0
  33. package/ai/stigmer/iam/oauthapp/v1/query_connect.js.map +1 -0
  34. package/ai/stigmer/iam/oauthapp/v1/query_pb.d.ts +61 -0
  35. package/ai/stigmer/iam/oauthapp/v1/query_pb.js +20 -0
  36. package/ai/stigmer/iam/oauthapp/v1/query_pb.js.map +1 -0
  37. package/ai/stigmer/iam/oauthapp/v1/spec_pb.d.ts +108 -0
  38. package/ai/stigmer/iam/oauthapp/v1/spec_pb.js +15 -0
  39. package/ai/stigmer/iam/oauthapp/v1/spec_pb.js.map +1 -0
  40. package/ai/stigmer/iam/v1/enum_pb.d.ts +4 -0
  41. package/ai/stigmer/iam/v1/enum_pb.js +5 -1
  42. package/ai/stigmer/iam/v1/enum_pb.js.map +1 -1
  43. package/package.json +1 -1
@@ -145,5 +145,65 @@ export declare const McpServerCommandController: {
145
145
  readonly O: any;
146
146
  readonly kind: any;
147
147
  };
148
+ /**
149
+ * Start the OAuth authorization flow for an MCP server.
150
+ *
151
+ * Performs setup (DCR registration or OAuthApp credential lookup, PKCE
152
+ * generation) and returns an authorization URL for the frontend to
153
+ * redirect the user to. The frontend calls completeOAuthConnect after
154
+ * the user authorizes.
155
+ *
156
+ * @internal
157
+ * Two auth modes determined by the MCP server's spec.auth block:
158
+ * - No oauth_app_ref: MCP Authorization spec (DCR + PKCE). Backend
159
+ * discovers the authorization server, registers a client via DCR,
160
+ * and builds the auth URL automatically.
161
+ * - oauth_app_ref set: Vendor OAuth. Backend loads the referenced
162
+ * OAuthApp for client credentials and endpoint URLs.
163
+ *
164
+ * Errors:
165
+ * - FAILED_PRECONDITION: MCP server has no auth block, or is stdio
166
+ * without oauth_app_ref (DCR requires HTTP transport)
167
+ * - NOT_FOUND: MCP server or referenced OAuthApp does not exist
168
+ *
169
+ * Authorization: Requires can_connect permission on the mcp_server resource.
170
+ *
171
+ * @generated from rpc ai.stigmer.agentic.mcpserver.v1.McpServerCommandController.initiateOAuthConnect
172
+ */
173
+ readonly initiateOAuthConnect: {
174
+ readonly name: "initiateOAuthConnect";
175
+ readonly I: any;
176
+ readonly O: any;
177
+ readonly kind: any;
178
+ };
179
+ /**
180
+ * Complete the OAuth authorization flow by exchanging the authorization
181
+ * code for tokens.
182
+ *
183
+ * Called by the frontend after the user is redirected back from the
184
+ * OAuth authorization server. Exchanges the code for tokens, stores
185
+ * them in the user's personal environment, and creates an OAuthGrant
186
+ * record for pre-flight expiry checks.
187
+ *
188
+ * After success, the frontend should call connect() to trigger tool
189
+ * discovery using the freshly acquired token.
190
+ *
191
+ * @internal
192
+ * Errors:
193
+ * - FAILED_PRECONDITION: State parameter is invalid, expired, or does
194
+ * not match the mcp_server_id
195
+ * - UNAVAILABLE: Token exchange with the authorization server failed
196
+ * - NOT_FOUND: No pending OAuth state found for the given state param
197
+ *
198
+ * Authorization: Requires can_connect permission on the mcp_server resource.
199
+ *
200
+ * @generated from rpc ai.stigmer.agentic.mcpserver.v1.McpServerCommandController.completeOAuthConnect
201
+ */
202
+ readonly completeOAuthConnect: {
203
+ readonly name: "completeOAuthConnect";
204
+ readonly I: any;
205
+ readonly O: any;
206
+ readonly kind: any;
207
+ };
148
208
  };
149
209
  };
@@ -150,6 +150,66 @@ export const McpServerCommandController = {
150
150
  O: McpServer,
151
151
  kind: MethodKind.Unary,
152
152
  },
153
+ /**
154
+ * Start the OAuth authorization flow for an MCP server.
155
+ *
156
+ * Performs setup (DCR registration or OAuthApp credential lookup, PKCE
157
+ * generation) and returns an authorization URL for the frontend to
158
+ * redirect the user to. The frontend calls completeOAuthConnect after
159
+ * the user authorizes.
160
+ *
161
+ * @internal
162
+ * Two auth modes determined by the MCP server's spec.auth block:
163
+ * - No oauth_app_ref: MCP Authorization spec (DCR + PKCE). Backend
164
+ * discovers the authorization server, registers a client via DCR,
165
+ * and builds the auth URL automatically.
166
+ * - oauth_app_ref set: Vendor OAuth. Backend loads the referenced
167
+ * OAuthApp for client credentials and endpoint URLs.
168
+ *
169
+ * Errors:
170
+ * - FAILED_PRECONDITION: MCP server has no auth block, or is stdio
171
+ * without oauth_app_ref (DCR requires HTTP transport)
172
+ * - NOT_FOUND: MCP server or referenced OAuthApp does not exist
173
+ *
174
+ * Authorization: Requires can_connect permission on the mcp_server resource.
175
+ *
176
+ * @generated from rpc ai.stigmer.agentic.mcpserver.v1.McpServerCommandController.initiateOAuthConnect
177
+ */
178
+ initiateOAuthConnect: {
179
+ name: "initiateOAuthConnect",
180
+ I: InitiateOAuthConnectInput,
181
+ O: InitiateOAuthConnectOutput,
182
+ kind: MethodKind.Unary,
183
+ },
184
+ /**
185
+ * Complete the OAuth authorization flow by exchanging the authorization
186
+ * code for tokens.
187
+ *
188
+ * Called by the frontend after the user is redirected back from the
189
+ * OAuth authorization server. Exchanges the code for tokens, stores
190
+ * them in the user's personal environment, and creates an OAuthGrant
191
+ * record for pre-flight expiry checks.
192
+ *
193
+ * After success, the frontend should call connect() to trigger tool
194
+ * discovery using the freshly acquired token.
195
+ *
196
+ * @internal
197
+ * Errors:
198
+ * - FAILED_PRECONDITION: State parameter is invalid, expired, or does
199
+ * not match the mcp_server_id
200
+ * - UNAVAILABLE: Token exchange with the authorization server failed
201
+ * - NOT_FOUND: No pending OAuth state found for the given state param
202
+ *
203
+ * Authorization: Requires can_connect permission on the mcp_server resource.
204
+ *
205
+ * @generated from rpc ai.stigmer.agentic.mcpserver.v1.McpServerCommandController.completeOAuthConnect
206
+ */
207
+ completeOAuthConnect: {
208
+ name: "completeOAuthConnect",
209
+ I: CompleteOAuthConnectInput,
210
+ O: CompleteOAuthConnectOutput,
211
+ kind: MethodKind.Unary,
212
+ },
153
213
  }
154
214
  };
155
215
  //# sourceMappingURL=command_connect.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"command_connect.js","sourceRoot":"","sources":["../../../../../../ai/stigmer/agentic/mcpserver/v1/command_connect.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,8HAA8H;AAC9H,oBAAoB;AACpB,cAAc;AAGd,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAIhD;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,QAAQ,EAAE,4DAA4D;IACtE,OAAO,EAAE;QACP;;;;;;;;;;;;;WAaG;QACH,KAAK,EAAE;YACL,IAAI,EAAE,OAAO;YACb,CAAC,EAAE,SAAS;YACZ,CAAC,EAAE,SAAS;YACZ,IAAI,EAAE,UAAU,CAAC,KAAK;SACvB;QACD;;;;;;;;;;;;;;WAcG;QACH,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,CAAC,EAAE,SAAS;YACZ,CAAC,EAAE,SAAS;YACZ,IAAI,EAAE,UAAU,CAAC,KAAK;SACvB;QACD;;;;;;;;;;;WAWG;QACH,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,CAAC,EAAE,SAAS;YACZ,CAAC,EAAE,SAAS;YACZ,IAAI,EAAE,UAAU,CAAC,KAAK;SACvB;QACD;;;;;;;;;;;;;;WAcG;QACH,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,CAAC,EAAE,sBAAsB;YACzB,CAAC,EAAE,SAAS;YACZ,IAAI,EAAE,UAAU,CAAC,KAAK;SACvB;QACD;;;;;;;;;;WAUG;QACH,gBAAgB,EAAE;YAChB,IAAI,EAAE,kBAAkB;YACxB,CAAC,EAAE,qBAAqB;YACxB,CAAC,EAAE,SAAS;YACZ,IAAI,EAAE,UAAU,CAAC,KAAK;SACvB;QACD;;;;;;;;;;;;;;;;;;;;;;;;;;WA0BG;QACH,OAAO,EAAE;YACP,IAAI,EAAE,SAAS;YACf,CAAC,EAAE,YAAY;YACf,CAAC,EAAE,SAAS;YACZ,IAAI,EAAE,UAAU,CAAC,KAAK;SACvB;KACF;CACO,CAAC"}
1
+ {"version":3,"file":"command_connect.js","sourceRoot":"","sources":["../../../../../../ai/stigmer/agentic/mcpserver/v1/command_connect.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,8HAA8H;AAC9H,oBAAoB;AACpB,cAAc;AAGd,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAIhD;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,QAAQ,EAAE,4DAA4D;IACtE,OAAO,EAAE;QACP;;;;;;;;;;;;;WAaG;QACH,KAAK,EAAE;YACL,IAAI,EAAE,OAAO;YACb,CAAC,EAAE,SAAS;YACZ,CAAC,EAAE,SAAS;YACZ,IAAI,EAAE,UAAU,CAAC,KAAK;SACvB;QACD;;;;;;;;;;;;;;WAcG;QACH,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,CAAC,EAAE,SAAS;YACZ,CAAC,EAAE,SAAS;YACZ,IAAI,EAAE,UAAU,CAAC,KAAK;SACvB;QACD;;;;;;;;;;;WAWG;QACH,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,CAAC,EAAE,SAAS;YACZ,CAAC,EAAE,SAAS;YACZ,IAAI,EAAE,UAAU,CAAC,KAAK;SACvB;QACD;;;;;;;;;;;;;;WAcG;QACH,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,CAAC,EAAE,sBAAsB;YACzB,CAAC,EAAE,SAAS;YACZ,IAAI,EAAE,UAAU,CAAC,KAAK;SACvB;QACD;;;;;;;;;;WAUG;QACH,gBAAgB,EAAE;YAChB,IAAI,EAAE,kBAAkB;YACxB,CAAC,EAAE,qBAAqB;YACxB,CAAC,EAAE,SAAS;YACZ,IAAI,EAAE,UAAU,CAAC,KAAK;SACvB;QACD;;;;;;;;;;;;;;;;;;;;;;;;;;WA0BG;QACH,OAAO,EAAE;YACP,IAAI,EAAE,SAAS;YACf,CAAC,EAAE,YAAY;YACf,CAAC,EAAE,SAAS;YACZ,IAAI,EAAE,UAAU,CAAC,KAAK;SACvB;QACD;;;;;;;;;;;;;;;;;;;;;;;;WAwBG;QACH,oBAAoB,EAAE;YACpB,IAAI,EAAE,sBAAsB;YAC5B,CAAC,EAAE,yBAAyB;YAC5B,CAAC,EAAE,0BAA0B;YAC7B,IAAI,EAAE,UAAU,CAAC,KAAK;SACvB;QACD;;;;;;;;;;;;;;;;;;;;;;WAsBG;QACH,oBAAoB,EAAE;YACpB,IAAI,EAAE,sBAAsB;YAC5B,CAAC,EAAE,yBAAyB;YAC5B,CAAC,EAAE,0BAA0B;YAC7B,IAAI,EAAE,UAAU,CAAC,KAAK;SACvB;KACF;CACO,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import type { GenFile, GenService } from "@bufbuild/protobuf/codegenv1";
2
2
  import type { McpServerSchema } from "./api_pb";
3
- import type { ConnectInputSchema } from "./io_pb";
3
+ import type { CompleteOAuthConnectInputSchema, CompleteOAuthConnectOutputSchema, ConnectInputSchema, InitiateOAuthConnectInputSchema, InitiateOAuthConnectOutputSchema } from "./io_pb";
4
4
  import type { ApiResourceDeleteInputSchema, UpdateVisibilityInputSchema } from "../../../commons/apiresource/io_pb";
5
5
  /**
6
6
  * Describes the file ai/stigmer/agentic/mcpserver/v1/command.proto.
@@ -145,4 +145,62 @@ export declare const McpServerCommandController: GenService<{
145
145
  input: typeof ConnectInputSchema;
146
146
  output: typeof McpServerSchema;
147
147
  };
148
+ /**
149
+ * Start the OAuth authorization flow for an MCP server.
150
+ *
151
+ * Performs setup (DCR registration or OAuthApp credential lookup, PKCE
152
+ * generation) and returns an authorization URL for the frontend to
153
+ * redirect the user to. The frontend calls completeOAuthConnect after
154
+ * the user authorizes.
155
+ *
156
+ * @internal
157
+ * Two auth modes determined by the MCP server's spec.auth block:
158
+ * - No oauth_app_ref: MCP Authorization spec (DCR + PKCE). Backend
159
+ * discovers the authorization server, registers a client via DCR,
160
+ * and builds the auth URL automatically.
161
+ * - oauth_app_ref set: Vendor OAuth. Backend loads the referenced
162
+ * OAuthApp for client credentials and endpoint URLs.
163
+ *
164
+ * Errors:
165
+ * - FAILED_PRECONDITION: MCP server has no auth block, or is stdio
166
+ * without oauth_app_ref (DCR requires HTTP transport)
167
+ * - NOT_FOUND: MCP server or referenced OAuthApp does not exist
168
+ *
169
+ * Authorization: Requires can_connect permission on the mcp_server resource.
170
+ *
171
+ * @generated from rpc ai.stigmer.agentic.mcpserver.v1.McpServerCommandController.initiateOAuthConnect
172
+ */
173
+ initiateOAuthConnect: {
174
+ methodKind: "unary";
175
+ input: typeof InitiateOAuthConnectInputSchema;
176
+ output: typeof InitiateOAuthConnectOutputSchema;
177
+ };
178
+ /**
179
+ * Complete the OAuth authorization flow by exchanging the authorization
180
+ * code for tokens.
181
+ *
182
+ * Called by the frontend after the user is redirected back from the
183
+ * OAuth authorization server. Exchanges the code for tokens, stores
184
+ * them in the user's personal environment, and creates an OAuthGrant
185
+ * record for pre-flight expiry checks.
186
+ *
187
+ * After success, the frontend should call connect() to trigger tool
188
+ * discovery using the freshly acquired token.
189
+ *
190
+ * @internal
191
+ * Errors:
192
+ * - FAILED_PRECONDITION: State parameter is invalid, expired, or does
193
+ * not match the mcp_server_id
194
+ * - UNAVAILABLE: Token exchange with the authorization server failed
195
+ * - NOT_FOUND: No pending OAuth state found for the given state param
196
+ *
197
+ * Authorization: Requires can_connect permission on the mcp_server resource.
198
+ *
199
+ * @generated from rpc ai.stigmer.agentic.mcpserver.v1.McpServerCommandController.completeOAuthConnect
200
+ */
201
+ completeOAuthConnect: {
202
+ methodKind: "unary";
203
+ input: typeof CompleteOAuthConnectInputSchema;
204
+ output: typeof CompleteOAuthConnectOutputSchema;
205
+ };
148
206
  }>;
@@ -10,7 +10,7 @@ import { file_ai_stigmer_commons_rpc_method_options } from "../../../commons/rpc
10
10
  /**
11
11
  * Describes the file ai/stigmer/agentic/mcpserver/v1/command.proto.
12
12
  */
13
- export const file_ai_stigmer_agentic_mcpserver_v1_command = /*@__PURE__*/ fileDesc("Ci1haS9zdGlnbWVyL2FnZW50aWMvbWNwc2VydmVyL3YxL2NvbW1hbmQucHJvdG8SH2FpLnN0aWdtZXIuYWdlbnRpYy5tY3BzZXJ2ZXIudjEylQcKGk1jcFNlcnZlckNvbW1hbmRDb250cm9sbGVyEl8KBWFwcGx5EiouYWkuc3RpZ21lci5hZ2VudGljLm1jcHNlcnZlci52MS5NY3BTZXJ2ZXIaKi5haS5zdGlnbWVyLmFnZW50aWMubWNwc2VydmVyLnYxLk1jcFNlcnZlchJmCgZjcmVhdGUSKi5haS5zdGlnbWVyLmFnZW50aWMubWNwc2VydmVyLnYxLk1jcFNlcnZlchoqLmFpLnN0aWdtZXIuYWdlbnRpYy5tY3BzZXJ2ZXIudjEuTWNwU2VydmVyIgTQuBgBEpoBCgZ1cGRhdGUSKi5haS5zdGlnbWVyLmFnZW50aWMubWNwc2VydmVyLnYxLk1jcFNlcnZlchoqLmFpLnN0aWdtZXIuYWdlbnRpYy5tY3BzZXJ2ZXIudjEuTWNwU2VydmVyIjjCuBg0CAIQLCILbWV0YWRhdGEuaWQqIXVuYXV0aG9yaXplZCB0byB1cGRhdGUgbWNwIHNlcnZlchKmAQoGZGVsZXRlEjYuYWkuc3RpZ21lci5jb21tb25zLmFwaXJlc291cmNlLkFwaVJlc291cmNlRGVsZXRlSW5wdXQaKi5haS5zdGlnbWVyLmFnZW50aWMubWNwc2VydmVyLnYxLk1jcFNlcnZlciI4wrgYNAgDECwiC3Jlc291cmNlX2lkKiF1bmF1dGhvcml6ZWQgdG8gZGVsZXRlIG1jcCBzZXJ2ZXISugEKEHVwZGF0ZVZpc2liaWxpdHkSNS5haS5zdGlnbWVyLmNvbW1vbnMuYXBpcmVzb3VyY2UuVXBkYXRlVmlzaWJpbGl0eUlucHV0GiouYWkuc3RpZ21lci5hZ2VudGljLm1jcHNlcnZlci52MS5NY3BTZXJ2ZXIiQ8K4GD8IAhAsIgtyZXNvdXJjZV9pZCosdW5hdXRob3JpemVkIHRvIHVwZGF0ZSBtY3Agc2VydmVyIHZpc2liaWxpdHkSpAEKB2Nvbm5lY3QSLS5haS5zdGlnbWVyLmFnZW50aWMubWNwc2VydmVyLnYxLkNvbm5lY3RJbnB1dBoqLmFpLnN0aWdtZXIuYWdlbnRpYy5tY3BzZXJ2ZXIudjEuTWNwU2VydmVyIj7CuBg6CBYQLCINbWNwX3NlcnZlcl9pZColdW5hdXRob3JpemVkIHRvIGNvbm5lY3QgdG8gbWNwIHNlcnZlchoEoP8rLGIGcHJvdG8z", [file_ai_stigmer_agentic_mcpserver_v1_api, file_ai_stigmer_agentic_mcpserver_v1_io, file_ai_stigmer_commons_apiresource_io, file_ai_stigmer_commons_apiresource_rpc_service_options, file_ai_stigmer_commons_rpc_method_options]);
13
+ export const file_ai_stigmer_agentic_mcpserver_v1_command = /*@__PURE__*/ fileDesc("Ci1haS9zdGlnbWVyL2FnZW50aWMvbWNwc2VydmVyL3YxL2NvbW1hbmQucHJvdG8SH2FpLnN0aWdtZXIuYWdlbnRpYy5tY3BzZXJ2ZXIudjEy2QoKGk1jcFNlcnZlckNvbW1hbmRDb250cm9sbGVyEl8KBWFwcGx5EiouYWkuc3RpZ21lci5hZ2VudGljLm1jcHNlcnZlci52MS5NY3BTZXJ2ZXIaKi5haS5zdGlnbWVyLmFnZW50aWMubWNwc2VydmVyLnYxLk1jcFNlcnZlchJmCgZjcmVhdGUSKi5haS5zdGlnbWVyLmFnZW50aWMubWNwc2VydmVyLnYxLk1jcFNlcnZlchoqLmFpLnN0aWdtZXIuYWdlbnRpYy5tY3BzZXJ2ZXIudjEuTWNwU2VydmVyIgTQuBgBEpoBCgZ1cGRhdGUSKi5haS5zdGlnbWVyLmFnZW50aWMubWNwc2VydmVyLnYxLk1jcFNlcnZlchoqLmFpLnN0aWdtZXIuYWdlbnRpYy5tY3BzZXJ2ZXIudjEuTWNwU2VydmVyIjjCuBg0CAIQLCILbWV0YWRhdGEuaWQqIXVuYXV0aG9yaXplZCB0byB1cGRhdGUgbWNwIHNlcnZlchKmAQoGZGVsZXRlEjYuYWkuc3RpZ21lci5jb21tb25zLmFwaXJlc291cmNlLkFwaVJlc291cmNlRGVsZXRlSW5wdXQaKi5haS5zdGlnbWVyLmFnZW50aWMubWNwc2VydmVyLnYxLk1jcFNlcnZlciI4wrgYNAgDECwiC3Jlc291cmNlX2lkKiF1bmF1dGhvcml6ZWQgdG8gZGVsZXRlIG1jcCBzZXJ2ZXISugEKEHVwZGF0ZVZpc2liaWxpdHkSNS5haS5zdGlnbWVyLmNvbW1vbnMuYXBpcmVzb3VyY2UuVXBkYXRlVmlzaWJpbGl0eUlucHV0GiouYWkuc3RpZ21lci5hZ2VudGljLm1jcHNlcnZlci52MS5NY3BTZXJ2ZXIiQ8K4GD8IAhAsIgtyZXNvdXJjZV9pZCosdW5hdXRob3JpemVkIHRvIHVwZGF0ZSBtY3Agc2VydmVyIHZpc2liaWxpdHkSpAEKB2Nvbm5lY3QSLS5haS5zdGlnbWVyLmFnZW50aWMubWNwc2VydmVyLnYxLkNvbm5lY3RJbnB1dBoqLmFpLnN0aWdtZXIuYWdlbnRpYy5tY3BzZXJ2ZXIudjEuTWNwU2VydmVyIj7CuBg6CBYQLCINbWNwX3NlcnZlcl9pZColdW5hdXRob3JpemVkIHRvIGNvbm5lY3QgdG8gbWNwIHNlcnZlchLfAQoUaW5pdGlhdGVPQXV0aENvbm5lY3QSOi5haS5zdGlnbWVyLmFnZW50aWMubWNwc2VydmVyLnYxLkluaXRpYXRlT0F1dGhDb25uZWN0SW5wdXQaOy5haS5zdGlnbWVyLmFnZW50aWMubWNwc2VydmVyLnYxLkluaXRpYXRlT0F1dGhDb25uZWN0T3V0cHV0Ik7CuBhKCBYQLCINbWNwX3NlcnZlcl9pZCo1dW5hdXRob3JpemVkIHRvIGluaXRpYXRlIG9hdXRoIGNvbm5lY3QgZm9yIG1jcCBzZXJ2ZXIS3wEKFGNvbXBsZXRlT0F1dGhDb25uZWN0EjouYWkuc3RpZ21lci5hZ2VudGljLm1jcHNlcnZlci52MS5Db21wbGV0ZU9BdXRoQ29ubmVjdElucHV0GjsuYWkuc3RpZ21lci5hZ2VudGljLm1jcHNlcnZlci52MS5Db21wbGV0ZU9BdXRoQ29ubmVjdE91dHB1dCJOwrgYSggWECwiDW1jcF9zZXJ2ZXJfaWQqNXVuYXV0aG9yaXplZCB0byBjb21wbGV0ZSBvYXV0aCBjb25uZWN0IGZvciBtY3Agc2VydmVyGgSg/yssYgZwcm90bzM", [file_ai_stigmer_agentic_mcpserver_v1_api, file_ai_stigmer_agentic_mcpserver_v1_io, file_ai_stigmer_commons_apiresource_io, file_ai_stigmer_commons_apiresource_rpc_service_options, file_ai_stigmer_commons_rpc_method_options]);
14
14
  /**
15
15
  * McpServerCommandController provides write operations for MCP server resources.
16
16
  *
@@ -1 +1 @@
1
- {"version":3,"file":"command_pb.js","sourceRoot":"","sources":["../../../../../../ai/stigmer/agentic/mcpserver/v1/command_pb.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,8HAA8H;AAC9H,oBAAoB;AAGpB,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,EAAE,wCAAwC,EAAE,MAAM,UAAU,CAAC;AAEpE,OAAO,EAAE,uCAAuC,EAAE,MAAM,SAAS,CAAC;AAElE,OAAO,EAAE,sCAAsC,EAAE,MAAM,oCAAoC,CAAC;AAC5F,OAAO,EAAE,uDAAuD,EAAE,MAAM,qDAAqD,CAAC;AAC9H,OAAO,EAAE,0CAA0C,EAAE,MAAM,wCAAwC,CAAC;AAEpG;;GAEG;AACH,MAAM,CAAC,MAAM,4CAA4C,GAAY,aAAa,CAChF,QAAQ,CAAC,k0CAAk0C,EAAE,CAAC,wCAAwC,EAAE,uCAAuC,EAAE,sCAAsC,EAAE,uDAAuD,EAAE,0CAA0C,CAAC,CAAC,CAAC;AAEjjD;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,0BAA0B,GA6HlC,aAAa,CAChB,WAAW,CAAC,4CAA4C,EAAE,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"command_pb.js","sourceRoot":"","sources":["../../../../../../ai/stigmer/agentic/mcpserver/v1/command_pb.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,8HAA8H;AAC9H,oBAAoB;AAGpB,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,EAAE,wCAAwC,EAAE,MAAM,UAAU,CAAC;AAEpE,OAAO,EAAE,uCAAuC,EAAE,MAAM,SAAS,CAAC;AAElE,OAAO,EAAE,sCAAsC,EAAE,MAAM,oCAAoC,CAAC;AAC5F,OAAO,EAAE,uDAAuD,EAAE,MAAM,qDAAqD,CAAC;AAC9H,OAAO,EAAE,0CAA0C,EAAE,MAAM,wCAAwC,CAAC;AAEpG;;GAEG;AACH,MAAM,CAAC,MAAM,4CAA4C,GAAY,aAAa,CAChF,QAAQ,CAAC,65DAA65D,EAAE,CAAC,wCAAwC,EAAE,uCAAuC,EAAE,sCAAsC,EAAE,uDAAuD,EAAE,0CAA0C,CAAC,CAAC,CAAC;AAE5oE;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAuLlC,aAAa,CAChB,WAAW,CAAC,4CAA4C,EAAE,CAAC,CAAC,CAAC"}
@@ -80,3 +80,159 @@ export type ConnectInput = Message<"ai.stigmer.agentic.mcpserver.v1.ConnectInput
80
80
  * Use `create(ConnectInputSchema)` to create a new message.
81
81
  */
82
82
  export declare const ConnectInputSchema: GenMessage<ConnectInput>;
83
+ /**
84
+ * InitiateOAuthConnectInput starts the OAuth authorization flow for an
85
+ * MCP server that has an auth block in its spec.
86
+ *
87
+ * @internal
88
+ * Returns an authorization URL that the frontend redirects the user to.
89
+ * The backend performs all setup (DCR registration for MCP OAuth servers,
90
+ * OAuthApp credential lookup for vendor OAuth servers, PKCE pair generation)
91
+ * and stores the pending state for the subsequent completeOAuthConnect call.
92
+ *
93
+ * Prerequisites:
94
+ * - The MCP server must exist and have spec.auth configured
95
+ * - For DCR: the server must use HTTP transport (discovery requires a URL)
96
+ * - For vendor OAuth: the referenced OAuthApp must exist and be accessible
97
+ *
98
+ * @generated from message ai.stigmer.agentic.mcpserver.v1.InitiateOAuthConnectInput
99
+ */
100
+ export type InitiateOAuthConnectInput = Message<"ai.stigmer.agentic.mcpserver.v1.InitiateOAuthConnectInput"> & {
101
+ /**
102
+ * System-generated ID of the MCP server to initiate OAuth for.
103
+ *
104
+ * @generated from field: string mcp_server_id = 1;
105
+ */
106
+ mcpServerId: string;
107
+ };
108
+ /**
109
+ * Describes the message ai.stigmer.agentic.mcpserver.v1.InitiateOAuthConnectInput.
110
+ * Use `create(InitiateOAuthConnectInputSchema)` to create a new message.
111
+ */
112
+ export declare const InitiateOAuthConnectInputSchema: GenMessage<InitiateOAuthConnectInput>;
113
+ /**
114
+ * InitiateOAuthConnectOutput contains the authorization URL and metadata
115
+ * the frontend needs to redirect the user to the OAuth authorization server.
116
+ *
117
+ * @generated from message ai.stigmer.agentic.mcpserver.v1.InitiateOAuthConnectOutput
118
+ */
119
+ export type InitiateOAuthConnectOutput = Message<"ai.stigmer.agentic.mcpserver.v1.InitiateOAuthConnectOutput"> & {
120
+ /**
121
+ * Full authorization URL to redirect the user to.
122
+ * Includes client_id, redirect_uri, code_challenge, state, and scopes.
123
+ *
124
+ * @generated from field: string authorization_url = 1;
125
+ */
126
+ authorizationUrl: string;
127
+ /**
128
+ * Opaque state parameter for CSRF protection.
129
+ * The frontend must pass this back in completeOAuthConnect to correlate
130
+ * the callback with this initiation.
131
+ *
132
+ * @generated from field: string state = 2;
133
+ */
134
+ state: string;
135
+ /**
136
+ * OAuth scopes that will be requested.
137
+ * For DCR: discovered from authorization server metadata or scope_hints.
138
+ * For vendor OAuth: from the OAuthApp spec.
139
+ *
140
+ * @generated from field: repeated string scopes = 3;
141
+ */
142
+ scopes: string[];
143
+ /**
144
+ * Human-readable provider name for UI display during the redirect.
145
+ * For DCR: derived from the MCP server name.
146
+ * For vendor OAuth: from OAuthApp.spec.provider.
147
+ *
148
+ * @generated from field: string provider_name = 4;
149
+ */
150
+ providerName: string;
151
+ };
152
+ /**
153
+ * Describes the message ai.stigmer.agentic.mcpserver.v1.InitiateOAuthConnectOutput.
154
+ * Use `create(InitiateOAuthConnectOutputSchema)` to create a new message.
155
+ */
156
+ export declare const InitiateOAuthConnectOutputSchema: GenMessage<InitiateOAuthConnectOutput>;
157
+ /**
158
+ * CompleteOAuthConnectInput finishes the OAuth flow by exchanging the
159
+ * authorization code for tokens.
160
+ *
161
+ * @internal
162
+ * Called by the frontend after the user is redirected back from the
163
+ * OAuth authorization server. The frontend extracts the authorization
164
+ * code and state from the callback URL and passes them here.
165
+ *
166
+ * The backend:
167
+ * 1. Validates the state parameter against the stored PendingOAuthState
168
+ * 2. Exchanges the authorization code for tokens (using PKCE code_verifier)
169
+ * 3. Stores the access token in the user's personal environment
170
+ * 4. Stores the refresh token (if present) in the personal environment
171
+ * 5. Creates an OAuthGrant record for pre-flight expiry checks
172
+ *
173
+ * After this succeeds, the frontend should call the regular connect RPC
174
+ * to trigger tool discovery (which will find the fresh token in the
175
+ * personal environment).
176
+ *
177
+ * @generated from message ai.stigmer.agentic.mcpserver.v1.CompleteOAuthConnectInput
178
+ */
179
+ export type CompleteOAuthConnectInput = Message<"ai.stigmer.agentic.mcpserver.v1.CompleteOAuthConnectInput"> & {
180
+ /**
181
+ * System-generated ID of the MCP server.
182
+ * Must match the mcp_server_id used in the preceding initiateOAuthConnect.
183
+ *
184
+ * @generated from field: string mcp_server_id = 1;
185
+ */
186
+ mcpServerId: string;
187
+ /**
188
+ * Authorization code from the OAuth callback redirect.
189
+ *
190
+ * @generated from field: string authorization_code = 2;
191
+ */
192
+ authorizationCode: string;
193
+ /**
194
+ * State parameter from the OAuth callback redirect.
195
+ * Must match the state returned by initiateOAuthConnect.
196
+ *
197
+ * @generated from field: string state = 3;
198
+ */
199
+ state: string;
200
+ };
201
+ /**
202
+ * Describes the message ai.stigmer.agentic.mcpserver.v1.CompleteOAuthConnectInput.
203
+ * Use `create(CompleteOAuthConnectInputSchema)` to create a new message.
204
+ */
205
+ export declare const CompleteOAuthConnectInputSchema: GenMessage<CompleteOAuthConnectInput>;
206
+ /**
207
+ * CompleteOAuthConnectOutput confirms that tokens were successfully
208
+ * acquired and stored.
209
+ *
210
+ * @generated from message ai.stigmer.agentic.mcpserver.v1.CompleteOAuthConnectOutput
211
+ */
212
+ export type CompleteOAuthConnectOutput = Message<"ai.stigmer.agentic.mcpserver.v1.CompleteOAuthConnectOutput"> & {
213
+ /**
214
+ * Whether the OAuth flow completed successfully and tokens are stored.
215
+ *
216
+ * @generated from field: bool connected = 1;
217
+ */
218
+ connected: boolean;
219
+ /**
220
+ * The environment variable name where the access token was stored.
221
+ * Matches McpServerAuth.target_env_var on the MCP server spec.
222
+ *
223
+ * @generated from field: string target_env_var = 2;
224
+ */
225
+ targetEnvVar: string;
226
+ /**
227
+ * Informational hint about expected token lifetime.
228
+ * Echoed from McpServerAuth.token_lifetime_hint for UI display.
229
+ *
230
+ * @generated from field: string token_lifetime_hint = 3;
231
+ */
232
+ tokenLifetimeHint: string;
233
+ };
234
+ /**
235
+ * Describes the message ai.stigmer.agentic.mcpserver.v1.CompleteOAuthConnectOutput.
236
+ * Use `create(CompleteOAuthConnectOutputSchema)` to create a new message.
237
+ */
238
+ export declare const CompleteOAuthConnectOutputSchema: GenMessage<CompleteOAuthConnectOutput>;
@@ -7,7 +7,7 @@ import { file_buf_validate_validate } from "../../../../../buf/validate/validate
7
7
  /**
8
8
  * Describes the file ai/stigmer/agentic/mcpserver/v1/io.proto.
9
9
  */
10
- export const file_ai_stigmer_agentic_mcpserver_v1_io = /*@__PURE__*/ fileDesc("CihhaS9zdGlnbWVyL2FnZW50aWMvbWNwc2VydmVyL3YxL2lvLnByb3RvEh9haS5zdGlnbWVyLmFnZW50aWMubWNwc2VydmVyLnYxIiQKC01jcFNlcnZlcklkEhUKBXZhbHVlGAEgASgJQga6SAPIAQEi7AEKDENvbm5lY3RJbnB1dBIdCg1tY3Bfc2VydmVyX2lkGAEgASgJQga6SAPIAQESUgoLcnVudGltZV9lbnYYAiADKAsyPS5haS5zdGlnbWVyLmFnZW50aWMubWNwc2VydmVyLnYxLkNvbm5lY3RJbnB1dC5SdW50aW1lRW52RW50cnkaaQoPUnVudGltZUVudkVudHJ5EgsKA2tleRgBIAEoCRJFCgV2YWx1ZRgCIAEoCzI2LmFpLnN0aWdtZXIuYWdlbnRpYy5leGVjdXRpb25jb250ZXh0LnYxLkV4ZWN1dGlvblZhbHVlOgI4AWIGcHJvdG8z", [file_ai_stigmer_agentic_executioncontext_v1_spec, file_buf_validate_validate]);
10
+ export const file_ai_stigmer_agentic_mcpserver_v1_io = /*@__PURE__*/ fileDesc("CihhaS9zdGlnbWVyL2FnZW50aWMvbWNwc2VydmVyL3YxL2lvLnByb3RvEh9haS5zdGlnbWVyLmFnZW50aWMubWNwc2VydmVyLnYxIiQKC01jcFNlcnZlcklkEhUKBXZhbHVlGAEgASgJQga6SAPIAQEi7AEKDENvbm5lY3RJbnB1dBIdCg1tY3Bfc2VydmVyX2lkGAEgASgJQga6SAPIAQESUgoLcnVudGltZV9lbnYYAiADKAsyPS5haS5zdGlnbWVyLmFnZW50aWMubWNwc2VydmVyLnYxLkNvbm5lY3RJbnB1dC5SdW50aW1lRW52RW50cnkaaQoPUnVudGltZUVudkVudHJ5EgsKA2tleRgBIAEoCRJFCgV2YWx1ZRgCIAEoCzI2LmFpLnN0aWdtZXIuYWdlbnRpYy5leGVjdXRpb25jb250ZXh0LnYxLkV4ZWN1dGlvblZhbHVlOgI4ASI6ChlJbml0aWF0ZU9BdXRoQ29ubmVjdElucHV0Eh0KDW1jcF9zZXJ2ZXJfaWQYASABKAlCBrpIA8gBASJtChpJbml0aWF0ZU9BdXRoQ29ubmVjdE91dHB1dBIZChFhdXRob3JpemF0aW9uX3VybBgBIAEoCRINCgVzdGF0ZRgCIAEoCRIOCgZzY29wZXMYAyADKAkSFQoNcHJvdmlkZXJfbmFtZRgEIAEoCSJ3ChlDb21wbGV0ZU9BdXRoQ29ubmVjdElucHV0Eh0KDW1jcF9zZXJ2ZXJfaWQYASABKAlCBrpIA8gBARIjChJhdXRob3JpemF0aW9uX2NvZGUYAiABKAlCB7pIBHICEAESFgoFc3RhdGUYAyABKAlCB7pIBHICEAEiZAoaQ29tcGxldGVPQXV0aENvbm5lY3RPdXRwdXQSEQoJY29ubmVjdGVkGAEgASgIEhYKDnRhcmdldF9lbnZfdmFyGAIgASgJEhsKE3Rva2VuX2xpZmV0aW1lX2hpbnQYAyABKAliBnByb3RvMw", [file_ai_stigmer_agentic_executioncontext_v1_spec, file_buf_validate_validate]);
11
11
  /**
12
12
  * Describes the message ai.stigmer.agentic.mcpserver.v1.McpServerId.
13
13
  * Use `create(McpServerIdSchema)` to create a new message.
@@ -18,4 +18,24 @@ export const McpServerIdSchema = /*@__PURE__*/ messageDesc(file_ai_stigmer_agent
18
18
  * Use `create(ConnectInputSchema)` to create a new message.
19
19
  */
20
20
  export const ConnectInputSchema = /*@__PURE__*/ messageDesc(file_ai_stigmer_agentic_mcpserver_v1_io, 1);
21
+ /**
22
+ * Describes the message ai.stigmer.agentic.mcpserver.v1.InitiateOAuthConnectInput.
23
+ * Use `create(InitiateOAuthConnectInputSchema)` to create a new message.
24
+ */
25
+ export const InitiateOAuthConnectInputSchema = /*@__PURE__*/ messageDesc(file_ai_stigmer_agentic_mcpserver_v1_io, 2);
26
+ /**
27
+ * Describes the message ai.stigmer.agentic.mcpserver.v1.InitiateOAuthConnectOutput.
28
+ * Use `create(InitiateOAuthConnectOutputSchema)` to create a new message.
29
+ */
30
+ export const InitiateOAuthConnectOutputSchema = /*@__PURE__*/ messageDesc(file_ai_stigmer_agentic_mcpserver_v1_io, 3);
31
+ /**
32
+ * Describes the message ai.stigmer.agentic.mcpserver.v1.CompleteOAuthConnectInput.
33
+ * Use `create(CompleteOAuthConnectInputSchema)` to create a new message.
34
+ */
35
+ export const CompleteOAuthConnectInputSchema = /*@__PURE__*/ messageDesc(file_ai_stigmer_agentic_mcpserver_v1_io, 4);
36
+ /**
37
+ * Describes the message ai.stigmer.agentic.mcpserver.v1.CompleteOAuthConnectOutput.
38
+ * Use `create(CompleteOAuthConnectOutputSchema)` to create a new message.
39
+ */
40
+ export const CompleteOAuthConnectOutputSchema = /*@__PURE__*/ messageDesc(file_ai_stigmer_agentic_mcpserver_v1_io, 5);
21
41
  //# sourceMappingURL=io_pb.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"io_pb.js","sourceRoot":"","sources":["../../../../../../ai/stigmer/agentic/mcpserver/v1/io_pb.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yHAAyH;AACzH,oBAAoB;AAGpB,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,EAAE,gDAAgD,EAAE,MAAM,mCAAmC,CAAC;AACrG,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAGrF;;GAEG;AACH,MAAM,CAAC,MAAM,uCAAuC,GAAY,aAAa,CAC3E,QAAQ,CAAC,keAAke,EAAE,CAAC,gDAAgD,EAAE,0BAA0B,CAAC,CAAC,CAAC;AAoB/jB;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAA4B,aAAa,CACrE,WAAW,CAAC,uCAAuC,EAAE,CAAC,CAAC,CAAC;AAkD1D;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAA6B,aAAa,CACvE,WAAW,CAAC,uCAAuC,EAAE,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"io_pb.js","sourceRoot":"","sources":["../../../../../../ai/stigmer/agentic/mcpserver/v1/io_pb.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yHAAyH;AACzH,oBAAoB;AAGpB,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,EAAE,gDAAgD,EAAE,MAAM,mCAAmC,CAAC;AACrG,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAGrF;;GAEG;AACH,MAAM,CAAC,MAAM,uCAAuC,GAAY,aAAa,CAC3E,QAAQ,CAAC,g/BAAg/B,EAAE,CAAC,gDAAgD,EAAE,0BAA0B,CAAC,CAAC,CAAC;AAoB7kC;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAA4B,aAAa,CACrE,WAAW,CAAC,uCAAuC,EAAE,CAAC,CAAC,CAAC;AAkD1D;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAA6B,aAAa,CACvE,WAAW,CAAC,uCAAuC,EAAE,CAAC,CAAC,CAAC;AA4B1D;;;GAGG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAA0C,aAAa,CACjG,WAAW,CAAC,uCAAuC,EAAE,CAAC,CAAC,CAAC;AA6C1D;;;GAGG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAA2C,aAAa,CACnG,WAAW,CAAC,uCAAuC,EAAE,CAAC,CAAC,CAAC;AAiD1D;;;GAGG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAA0C,aAAa,CACjG,WAAW,CAAC,uCAAuC,EAAE,CAAC,CAAC,CAAC;AAiC1D;;;GAGG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAA2C,aAAa,CACnG,WAAW,CAAC,uCAAuC,EAAE,CAAC,CAAC,CAAC"}
@@ -0,0 +1,102 @@
1
+ import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1";
2
+ import type { Message } from "@bufbuild/protobuf";
3
+ /**
4
+ * Describes the file ai/stigmer/agentic/mcpserver/v1/oauth.proto.
5
+ */
6
+ export declare const file_ai_stigmer_agentic_mcpserver_v1_oauth: GenFile;
7
+ /**
8
+ * OAuthGrant tracks OAuth metadata for a user's MCP server connection.
9
+ *
10
+ * @internal
11
+ * Infrastructure-only. Not a public API resource — no kind, no apiVersion,
12
+ * no CRUD RPCs. Stored in the backend's database, keyed by the composite
13
+ * of (identity_account_id, mcp_server_id).
14
+ *
15
+ * Actual tokens (access + refresh) live in the user's personal environment
16
+ * as secret env vars. OAuthGrant only holds non-secret metadata needed
17
+ * by the refresh mechanism and pre-flight expiry checks.
18
+ *
19
+ * Storage split rationale:
20
+ * - Personal environment: access token (target_env_var), refresh token
21
+ * ({target_env_var}_REFRESH_TOKEN). These are secrets, encrypted at rest,
22
+ * subject to Environment access control.
23
+ * - OAuthGrant: expiry timestamp, client_id, token_endpoint, env var names.
24
+ * These are non-secret metadata that the backend reads during pre-flight
25
+ * checks without needing secret-read permissions on the Environment.
26
+ *
27
+ * @generated from message ai.stigmer.agentic.mcpserver.v1.OAuthGrant
28
+ */
29
+ export type OAuthGrant = Message<"ai.stigmer.agentic.mcpserver.v1.OAuthGrant"> & {
30
+ /**
31
+ * Which user owns this grant.
32
+ *
33
+ * @generated from field: string identity_account_id = 1;
34
+ */
35
+ identityAccountId: string;
36
+ /**
37
+ * Which MCP server this grant is for.
38
+ *
39
+ * @generated from field: string mcp_server_id = 2;
40
+ */
41
+ mcpServerId: string;
42
+ /**
43
+ * When the current access token expires (Unix timestamp seconds).
44
+ * 0 means the token does not expire (e.g., long-lived tokens from
45
+ * Notion or Slack user tokens).
46
+ *
47
+ * @generated from field: int64 access_token_expires_at = 3;
48
+ */
49
+ accessTokenExpiresAt: bigint;
50
+ /**
51
+ * OAuth client ID used for this grant.
52
+ * For mcp_oauth: obtained via Dynamic Client Registration.
53
+ * For vendor_oauth: copied from the referenced OAuthApp.spec.client_id.
54
+ *
55
+ * @generated from field: string client_id = 4;
56
+ */
57
+ clientId: string;
58
+ /**
59
+ * Which auth method was used to obtain this grant.
60
+ * Values: "mcp_oauth" or "vendor_oauth".
61
+ * Determines how token refresh is performed (DCR client vs. OAuthApp credentials).
62
+ *
63
+ * @generated from field: string auth_method = 5;
64
+ */
65
+ authMethod: string;
66
+ /**
67
+ * Token endpoint URL for refresh requests.
68
+ * For mcp_oauth: discovered via .well-known/oauth-authorization-server.
69
+ * For vendor_oauth: copied from OAuthApp.spec.token_url.
70
+ *
71
+ * @generated from field: string token_endpoint = 6;
72
+ */
73
+ tokenEndpoint: string;
74
+ /**
75
+ * Env var name where the access token is stored in the personal environment.
76
+ * Matches McpServerAuth.target_env_var on the McpServer spec.
77
+ *
78
+ * @generated from field: string access_token_env_var = 7;
79
+ */
80
+ accessTokenEnvVar: string;
81
+ /**
82
+ * Env var name where the refresh token is stored in the personal environment.
83
+ * Convention: {target_env_var}_REFRESH_TOKEN.
84
+ *
85
+ * @generated from field: string refresh_token_env_var = 8;
86
+ */
87
+ refreshTokenEnvVar: string;
88
+ /**
89
+ * Which Environment resource holds the tokens.
90
+ * The refresh mechanism reads/writes tokens in this environment.
91
+ * Default: the user's personal environment (stigmer.ai/personal=true label).
92
+ * Stored explicitly to allow future flexibility for team or project environments.
93
+ *
94
+ * @generated from field: string environment_id = 9;
95
+ */
96
+ environmentId: string;
97
+ };
98
+ /**
99
+ * Describes the message ai.stigmer.agentic.mcpserver.v1.OAuthGrant.
100
+ * Use `create(OAuthGrantSchema)` to create a new message.
101
+ */
102
+ export declare const OAuthGrantSchema: GenMessage<OAuthGrant>;
@@ -0,0 +1,14 @@
1
+ // @generated by protoc-gen-es v2.2.2 with parameter "target=ts"
2
+ // @generated from file ai/stigmer/agentic/mcpserver/v1/oauth.proto (package ai.stigmer.agentic.mcpserver.v1, syntax proto3)
3
+ /* eslint-disable */
4
+ import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1";
5
+ /**
6
+ * Describes the file ai/stigmer/agentic/mcpserver/v1/oauth.proto.
7
+ */
8
+ export const file_ai_stigmer_agentic_mcpserver_v1_oauth = /*@__PURE__*/ fileDesc("CithaS9zdGlnbWVyL2FnZW50aWMvbWNwc2VydmVyL3YxL29hdXRoLnByb3RvEh9haS5zdGlnbWVyLmFnZW50aWMubWNwc2VydmVyLnYxIvYBCgpPQXV0aEdyYW50EhsKE2lkZW50aXR5X2FjY291bnRfaWQYASABKAkSFQoNbWNwX3NlcnZlcl9pZBgCIAEoCRIfChdhY2Nlc3NfdG9rZW5fZXhwaXJlc19hdBgDIAEoAxIRCgljbGllbnRfaWQYBCABKAkSEwoLYXV0aF9tZXRob2QYBSABKAkSFgoOdG9rZW5fZW5kcG9pbnQYBiABKAkSHAoUYWNjZXNzX3Rva2VuX2Vudl92YXIYByABKAkSHQoVcmVmcmVzaF90b2tlbl9lbnZfdmFyGAggASgJEhYKDmVudmlyb25tZW50X2lkGAkgASgJYgZwcm90bzM");
9
+ /**
10
+ * Describes the message ai.stigmer.agentic.mcpserver.v1.OAuthGrant.
11
+ * Use `create(OAuthGrantSchema)` to create a new message.
12
+ */
13
+ export const OAuthGrantSchema = /*@__PURE__*/ messageDesc(file_ai_stigmer_agentic_mcpserver_v1_oauth, 0);
14
+ //# sourceMappingURL=oauth_pb.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oauth_pb.js","sourceRoot":"","sources":["../../../../../../ai/stigmer/agentic/mcpserver/v1/oauth_pb.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,4HAA4H;AAC5H,oBAAoB;AAGpB,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAGrE;;GAEG;AACH,MAAM,CAAC,MAAM,0CAA0C,GAAY,aAAa,CAC9E,QAAQ,CAAC,icAAic,CAAC,CAAC;AAsG9c;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAA2B,aAAa,CACnE,WAAW,CAAC,0CAA0C,EAAE,CAAC,CAAC,CAAC"}