@opengeni/contracts 0.27.0 → 0.28.1
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/{chunk-S4F2GZPD.js → chunk-3Q5FLMOD.js} +81 -5
- package/dist/chunk-3Q5FLMOD.js.map +1 -0
- package/dist/google-drive.js +1 -1
- package/dist/index.d.ts +108 -6
- package/dist/index.js +9 -1
- package/package.json +1 -1
- package/src/index.ts +126 -8
- package/dist/chunk-S4F2GZPD.js.map +0 -1
package/dist/google-drive.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -249,7 +249,7 @@ export type Permission = z.infer<typeof Permission>;
|
|
|
249
249
|
* child whose parent was narrowed must inherit the parent's effective subset,
|
|
250
250
|
* never fall back to a different runtime-local default.
|
|
251
251
|
*/
|
|
252
|
-
export declare const DEFAULT_FIRST_PARTY_MCP_PERMISSIONS: readonly ["workspace:read", "files:read", "documents:search", "scheduled_tasks:manage", "scheduled_tasks:run", "goals:manage", "sessions:read", "sessions:create", "sessions:control", "variable-sets:use", "variable-sets:manage", "rigs:use", "github:use", "artifacts:read", "artifacts:publish"];
|
|
252
|
+
export declare const DEFAULT_FIRST_PARTY_MCP_PERMISSIONS: readonly ["workspace:read", "files:read", "documents:search", "scheduled_tasks:manage", "scheduled_tasks:run", "goals:manage", "sessions:read", "sessions:create", "sessions:control", "connections:read", "variable-sets:use", "variable-sets:manage", "rigs:use", "github:use", "artifacts:read", "artifacts:publish"];
|
|
253
253
|
/**
|
|
254
254
|
* Exact public catalog for tools served by the broad first-party `opengeni`
|
|
255
255
|
* MCP server. Adding a registration does not make it model-visible: the name
|
|
@@ -258,7 +258,7 @@ export declare const DEFAULT_FIRST_PARTY_MCP_PERMISSIONS: readonly ["workspace:r
|
|
|
258
258
|
* `files_get_download_url` intentionally is not in this catalog. It belongs to
|
|
259
259
|
* the dedicated `files` MCP server.
|
|
260
260
|
*/
|
|
261
|
-
export declare const FIRST_PARTY_MCP_TOOL_NAMES: readonly ["set_session_title", "goal_set", "goal_update", "goal_complete", "goal_pause", "memory_search", "memory_save", "memory_correct", "preference_registry_summary", "preference_registry_get", "sandboxes_list", "sandbox_attach", "sandbox_swap", "run_on", "sandbox_provision", "rig_list", "rig_get", "rig_propose_change", "rig_verify", "rig_promote", "sessions_list", "session_get", "session_events", "session_create", "session_send_message", "session_pause", "session_resume", "session_steer", "set_other_session_title", "variable_set_list", "environment_list", "variable_set_set_variable", "environment_set_variable", "github_connect_link", "github_token", "github_repositories_list", "social_connections_list", "social_posts_recent", "social_daily_analysis_context", "scheduled_tasks_list", "scheduled_tasks_get", "scheduled_tasks_create", "scheduled_tasks_update", "scheduled_tasks_pause", "scheduled_tasks_resume", "scheduled_tasks_trigger", "scheduled_tasks_delete", "scheduled_task_runs_list", "slack_bot_list_channels", "slack_bot_channel_history", "slack_bot_thread_replies", "slack_bot_list_users", "slack_bot_list_files", "slack_bot_file_info", "slack_bot_file_content", "slack_bot_post_message", "slack_bot_delete_message", "artifacts_list", "artifacts_get_source", "artifacts_create", "artifacts_publish", "artifacts_rollback"];
|
|
261
|
+
export declare const FIRST_PARTY_MCP_TOOL_NAMES: readonly ["set_session_title", "goal_set", "goal_update", "goal_complete", "goal_pause", "memory_search", "memory_save", "memory_correct", "preference_registry_summary", "preference_registry_get", "sandboxes_list", "sandbox_attach", "sandbox_swap", "run_on", "sandbox_provision", "rig_list", "rig_get", "rig_propose_change", "rig_verify", "rig_promote", "sessions_list", "session_get", "session_events", "session_create", "session_send_message", "session_pause", "session_resume", "session_steer", "set_other_session_title", "variable_set_list", "environment_list", "variable_set_set_variable", "environment_set_variable", "github_connect_link", "github_token", "github_repositories_list", "social_connections_list", "social_posts_recent", "social_daily_analysis_context", "social_search_live", "social_mentions_live", "social_thread_fetch", "social_posts_sync", "social_post_reply", "scheduled_tasks_list", "scheduled_tasks_get", "scheduled_tasks_create", "scheduled_tasks_update", "scheduled_tasks_pause", "scheduled_tasks_resume", "scheduled_tasks_trigger", "scheduled_tasks_delete", "scheduled_task_runs_list", "slack_bot_list_channels", "slack_bot_channel_history", "slack_bot_thread_replies", "slack_bot_list_users", "slack_bot_list_files", "slack_bot_file_info", "slack_bot_file_content", "slack_bot_post_message", "slack_bot_delete_message", "artifacts_list", "artifacts_get_source", "artifacts_create", "artifacts_publish", "artifacts_rollback"];
|
|
262
262
|
export declare const FirstPartyMcpToolName: z.ZodEnum<{
|
|
263
263
|
artifacts_create: "artifacts_create";
|
|
264
264
|
artifacts_get_source: "artifacts_get_source";
|
|
@@ -319,17 +319,22 @@ export declare const FirstPartyMcpToolName: z.ZodEnum<{
|
|
|
319
319
|
slack_bot_thread_replies: "slack_bot_thread_replies";
|
|
320
320
|
social_connections_list: "social_connections_list";
|
|
321
321
|
social_daily_analysis_context: "social_daily_analysis_context";
|
|
322
|
+
social_mentions_live: "social_mentions_live";
|
|
323
|
+
social_post_reply: "social_post_reply";
|
|
322
324
|
social_posts_recent: "social_posts_recent";
|
|
325
|
+
social_posts_sync: "social_posts_sync";
|
|
326
|
+
social_search_live: "social_search_live";
|
|
327
|
+
social_thread_fetch: "social_thread_fetch";
|
|
323
328
|
variable_set_list: "variable_set_list";
|
|
324
329
|
variable_set_set_variable: "variable_set_set_variable";
|
|
325
330
|
}>;
|
|
326
331
|
export type FirstPartyMcpToolName = z.infer<typeof FirstPartyMcpToolName>;
|
|
327
332
|
/**
|
|
328
|
-
*
|
|
329
|
-
*
|
|
330
|
-
*
|
|
333
|
+
* Connector-wide tools are explicit-only. Ordinary session omission selects
|
|
334
|
+
* the non-connector catalog, while an explicit session policy may still select
|
|
335
|
+
* any catalogued connector tool and remains independently permission-gated.
|
|
331
336
|
*/
|
|
332
|
-
export declare const DEFAULT_FIRST_PARTY_MCP_TOOLS:
|
|
337
|
+
export declare const DEFAULT_FIRST_PARTY_MCP_TOOLS: ("artifacts_create" | "artifacts_get_source" | "artifacts_list" | "artifacts_publish" | "artifacts_rollback" | "environment_list" | "environment_set_variable" | "github_connect_link" | "github_repositories_list" | "github_token" | "goal_complete" | "goal_pause" | "goal_set" | "goal_update" | "memory_correct" | "memory_save" | "memory_search" | "preference_registry_get" | "preference_registry_summary" | "rig_get" | "rig_list" | "rig_promote" | "rig_propose_change" | "rig_verify" | "run_on" | "sandbox_attach" | "sandbox_provision" | "sandbox_swap" | "sandboxes_list" | "scheduled_task_runs_list" | "scheduled_tasks_create" | "scheduled_tasks_delete" | "scheduled_tasks_get" | "scheduled_tasks_list" | "scheduled_tasks_pause" | "scheduled_tasks_resume" | "scheduled_tasks_trigger" | "scheduled_tasks_update" | "session_create" | "session_events" | "session_get" | "session_pause" | "session_resume" | "session_send_message" | "session_steer" | "sessions_list" | "set_other_session_title" | "set_session_title" | "slack_bot_channel_history" | "slack_bot_delete_message" | "slack_bot_file_content" | "slack_bot_file_info" | "slack_bot_list_channels" | "slack_bot_list_files" | "slack_bot_list_users" | "slack_bot_post_message" | "slack_bot_thread_replies" | "social_connections_list" | "social_daily_analysis_context" | "social_mentions_live" | "social_post_reply" | "social_posts_recent" | "social_posts_sync" | "social_search_live" | "social_thread_fetch" | "variable_set_list" | "variable_set_set_variable")[];
|
|
333
338
|
export declare function prefixedMcpToolName(registryId: string, toolName: string): string;
|
|
334
339
|
export declare const ProductAccessMode: z.ZodEnum<{
|
|
335
340
|
configured: "configured";
|
|
@@ -1247,7 +1252,12 @@ export declare const DelegatedAccessTokenPayload: z.ZodObject<{
|
|
|
1247
1252
|
slack_bot_thread_replies: "slack_bot_thread_replies";
|
|
1248
1253
|
social_connections_list: "social_connections_list";
|
|
1249
1254
|
social_daily_analysis_context: "social_daily_analysis_context";
|
|
1255
|
+
social_mentions_live: "social_mentions_live";
|
|
1256
|
+
social_post_reply: "social_post_reply";
|
|
1250
1257
|
social_posts_recent: "social_posts_recent";
|
|
1258
|
+
social_posts_sync: "social_posts_sync";
|
|
1259
|
+
social_search_live: "social_search_live";
|
|
1260
|
+
social_thread_fetch: "social_thread_fetch";
|
|
1251
1261
|
variable_set_list: "variable_set_list";
|
|
1252
1262
|
variable_set_set_variable: "variable_set_set_variable";
|
|
1253
1263
|
}>>>;
|
|
@@ -3691,7 +3701,12 @@ export declare const UpdateSessionToolPolicyRequest: z.ZodUnion<readonly [z.ZodO
|
|
|
3691
3701
|
slack_bot_thread_replies: "slack_bot_thread_replies";
|
|
3692
3702
|
social_connections_list: "social_connections_list";
|
|
3693
3703
|
social_daily_analysis_context: "social_daily_analysis_context";
|
|
3704
|
+
social_mentions_live: "social_mentions_live";
|
|
3705
|
+
social_post_reply: "social_post_reply";
|
|
3694
3706
|
social_posts_recent: "social_posts_recent";
|
|
3707
|
+
social_posts_sync: "social_posts_sync";
|
|
3708
|
+
social_search_live: "social_search_live";
|
|
3709
|
+
social_thread_fetch: "social_thread_fetch";
|
|
3695
3710
|
variable_set_list: "variable_set_list";
|
|
3696
3711
|
variable_set_set_variable: "variable_set_set_variable";
|
|
3697
3712
|
}>>;
|
|
@@ -4386,7 +4401,12 @@ export declare const NewSessionDraftOptions: z.ZodObject<{
|
|
|
4386
4401
|
slack_bot_thread_replies: "slack_bot_thread_replies";
|
|
4387
4402
|
social_connections_list: "social_connections_list";
|
|
4388
4403
|
social_daily_analysis_context: "social_daily_analysis_context";
|
|
4404
|
+
social_mentions_live: "social_mentions_live";
|
|
4405
|
+
social_post_reply: "social_post_reply";
|
|
4389
4406
|
social_posts_recent: "social_posts_recent";
|
|
4407
|
+
social_posts_sync: "social_posts_sync";
|
|
4408
|
+
social_search_live: "social_search_live";
|
|
4409
|
+
social_thread_fetch: "social_thread_fetch";
|
|
4390
4410
|
variable_set_list: "variable_set_list";
|
|
4391
4411
|
variable_set_set_variable: "variable_set_set_variable";
|
|
4392
4412
|
}>>>;
|
|
@@ -4568,7 +4588,12 @@ export declare const NewSessionDraft: z.ZodObject<{
|
|
|
4568
4588
|
slack_bot_thread_replies: "slack_bot_thread_replies";
|
|
4569
4589
|
social_connections_list: "social_connections_list";
|
|
4570
4590
|
social_daily_analysis_context: "social_daily_analysis_context";
|
|
4591
|
+
social_mentions_live: "social_mentions_live";
|
|
4592
|
+
social_post_reply: "social_post_reply";
|
|
4571
4593
|
social_posts_recent: "social_posts_recent";
|
|
4594
|
+
social_posts_sync: "social_posts_sync";
|
|
4595
|
+
social_search_live: "social_search_live";
|
|
4596
|
+
social_thread_fetch: "social_thread_fetch";
|
|
4572
4597
|
variable_set_list: "variable_set_list";
|
|
4573
4598
|
variable_set_set_variable: "variable_set_set_variable";
|
|
4574
4599
|
}>>>;
|
|
@@ -4750,7 +4775,12 @@ export declare const SaveNewSessionDraftRequest: z.ZodObject<{
|
|
|
4750
4775
|
slack_bot_thread_replies: "slack_bot_thread_replies";
|
|
4751
4776
|
social_connections_list: "social_connections_list";
|
|
4752
4777
|
social_daily_analysis_context: "social_daily_analysis_context";
|
|
4778
|
+
social_mentions_live: "social_mentions_live";
|
|
4779
|
+
social_post_reply: "social_post_reply";
|
|
4753
4780
|
social_posts_recent: "social_posts_recent";
|
|
4781
|
+
social_posts_sync: "social_posts_sync";
|
|
4782
|
+
social_search_live: "social_search_live";
|
|
4783
|
+
social_thread_fetch: "social_thread_fetch";
|
|
4754
4784
|
variable_set_list: "variable_set_list";
|
|
4755
4785
|
variable_set_set_variable: "variable_set_set_variable";
|
|
4756
4786
|
}>>>;
|
|
@@ -6512,6 +6542,7 @@ export declare const SocialProvider: z.ZodEnum<{
|
|
|
6512
6542
|
facebook: "facebook";
|
|
6513
6543
|
instagram: "instagram";
|
|
6514
6544
|
linkedin: "linkedin";
|
|
6545
|
+
reddit: "reddit";
|
|
6515
6546
|
tiktok: "tiktok";
|
|
6516
6547
|
x: "x";
|
|
6517
6548
|
youtube: "youtube";
|
|
@@ -6532,6 +6563,7 @@ export declare const SocialConnection: z.ZodObject<{
|
|
|
6532
6563
|
facebook: "facebook";
|
|
6533
6564
|
instagram: "instagram";
|
|
6534
6565
|
linkedin: "linkedin";
|
|
6566
|
+
reddit: "reddit";
|
|
6535
6567
|
tiktok: "tiktok";
|
|
6536
6568
|
x: "x";
|
|
6537
6569
|
youtube: "youtube";
|
|
@@ -6558,6 +6590,7 @@ export declare const CreateSocialConnectionRequest: z.ZodObject<{
|
|
|
6558
6590
|
facebook: "facebook";
|
|
6559
6591
|
instagram: "instagram";
|
|
6560
6592
|
linkedin: "linkedin";
|
|
6593
|
+
reddit: "reddit";
|
|
6561
6594
|
tiktok: "tiktok";
|
|
6562
6595
|
x: "x";
|
|
6563
6596
|
youtube: "youtube";
|
|
@@ -6586,6 +6619,7 @@ export declare const SocialPost: z.ZodObject<{
|
|
|
6586
6619
|
facebook: "facebook";
|
|
6587
6620
|
instagram: "instagram";
|
|
6588
6621
|
linkedin: "linkedin";
|
|
6622
|
+
reddit: "reddit";
|
|
6589
6623
|
tiktok: "tiktok";
|
|
6590
6624
|
x: "x";
|
|
6591
6625
|
youtube: "youtube";
|
|
@@ -6611,6 +6645,20 @@ export declare const CreateSocialPostRequest: z.ZodObject<{
|
|
|
6611
6645
|
raw: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
6612
6646
|
}, z.core.$strip>;
|
|
6613
6647
|
export type CreateSocialPostRequest = z.infer<typeof CreateSocialPostRequest>;
|
|
6648
|
+
export declare const SocialOAuthProviderId: z.ZodEnum<{
|
|
6649
|
+
reddit: "reddit";
|
|
6650
|
+
x: "x";
|
|
6651
|
+
}>;
|
|
6652
|
+
export type SocialOAuthProviderId = z.infer<typeof SocialOAuthProviderId>;
|
|
6653
|
+
export declare const SocialOAuthStartRequest: z.ZodObject<{
|
|
6654
|
+
provider: z.ZodEnum<{
|
|
6655
|
+
reddit: "reddit";
|
|
6656
|
+
x: "x";
|
|
6657
|
+
}>;
|
|
6658
|
+
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6659
|
+
returnPath: z.ZodOptional<z.ZodString>;
|
|
6660
|
+
}, z.core.$strip>;
|
|
6661
|
+
export type SocialOAuthStartRequest = z.infer<typeof SocialOAuthStartRequest>;
|
|
6614
6662
|
export declare const ConnectionKind: z.ZodEnum<{
|
|
6615
6663
|
api_key: "api_key";
|
|
6616
6664
|
app_install: "app_install";
|
|
@@ -6673,6 +6721,15 @@ export declare const ConnectionMetadata: z.ZodObject<{
|
|
|
6673
6721
|
updatedAt: z.ZodString;
|
|
6674
6722
|
}, z.core.$strip>;
|
|
6675
6723
|
export type ConnectionMetadata = z.infer<typeof ConnectionMetadata>;
|
|
6724
|
+
type PersonalSlackCanonicalConnection = Pick<ConnectionMetadata, "id" | "status" | "createdAt" | "updatedAt">;
|
|
6725
|
+
/**
|
|
6726
|
+
* Canonical ordering for duplicate subject-owned Personal Slack rows.
|
|
6727
|
+
*
|
|
6728
|
+
* PostgreSQL broker lookup mirrors this exact sequence: usable status first,
|
|
6729
|
+
* then newest update, newest creation, and immutable UUID descending.
|
|
6730
|
+
*/
|
|
6731
|
+
export declare function comparePersonalSlackCanonicalConnections(left: PersonalSlackCanonicalConnection, right: PersonalSlackCanonicalConnection): number;
|
|
6732
|
+
export declare function selectCanonicalPersonalSlackConnection<T extends PersonalSlackCanonicalConnection>(connections: readonly T[]): T | null;
|
|
6676
6733
|
export declare const ConnectionCredentialBundle: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
6677
6734
|
export type ConnectionCredentialBundle = z.infer<typeof ConnectionCredentialBundle>;
|
|
6678
6735
|
export declare const CreateConnectionRequest: z.ZodObject<{
|
|
@@ -7528,7 +7585,12 @@ export declare const Session: z.ZodObject<{
|
|
|
7528
7585
|
slack_bot_thread_replies: "slack_bot_thread_replies";
|
|
7529
7586
|
social_connections_list: "social_connections_list";
|
|
7530
7587
|
social_daily_analysis_context: "social_daily_analysis_context";
|
|
7588
|
+
social_mentions_live: "social_mentions_live";
|
|
7589
|
+
social_post_reply: "social_post_reply";
|
|
7531
7590
|
social_posts_recent: "social_posts_recent";
|
|
7591
|
+
social_posts_sync: "social_posts_sync";
|
|
7592
|
+
social_search_live: "social_search_live";
|
|
7593
|
+
social_thread_fetch: "social_thread_fetch";
|
|
7532
7594
|
variable_set_list: "variable_set_list";
|
|
7533
7595
|
variable_set_set_variable: "variable_set_set_variable";
|
|
7534
7596
|
}>>;
|
|
@@ -7932,7 +7994,12 @@ export declare const CreateSessionResponse: z.ZodObject<{
|
|
|
7932
7994
|
slack_bot_thread_replies: "slack_bot_thread_replies";
|
|
7933
7995
|
social_connections_list: "social_connections_list";
|
|
7934
7996
|
social_daily_analysis_context: "social_daily_analysis_context";
|
|
7997
|
+
social_mentions_live: "social_mentions_live";
|
|
7998
|
+
social_post_reply: "social_post_reply";
|
|
7935
7999
|
social_posts_recent: "social_posts_recent";
|
|
8000
|
+
social_posts_sync: "social_posts_sync";
|
|
8001
|
+
social_search_live: "social_search_live";
|
|
8002
|
+
social_thread_fetch: "social_thread_fetch";
|
|
7936
8003
|
variable_set_list: "variable_set_list";
|
|
7937
8004
|
variable_set_set_variable: "variable_set_set_variable";
|
|
7938
8005
|
}>>;
|
|
@@ -8342,7 +8409,12 @@ export declare const SessionListResponse: z.ZodObject<{
|
|
|
8342
8409
|
slack_bot_thread_replies: "slack_bot_thread_replies";
|
|
8343
8410
|
social_connections_list: "social_connections_list";
|
|
8344
8411
|
social_daily_analysis_context: "social_daily_analysis_context";
|
|
8412
|
+
social_mentions_live: "social_mentions_live";
|
|
8413
|
+
social_post_reply: "social_post_reply";
|
|
8345
8414
|
social_posts_recent: "social_posts_recent";
|
|
8415
|
+
social_posts_sync: "social_posts_sync";
|
|
8416
|
+
social_search_live: "social_search_live";
|
|
8417
|
+
social_thread_fetch: "social_thread_fetch";
|
|
8346
8418
|
variable_set_list: "variable_set_list";
|
|
8347
8419
|
variable_set_set_variable: "variable_set_set_variable";
|
|
8348
8420
|
}>>;
|
|
@@ -8741,7 +8813,12 @@ export declare const SessionListResponse: z.ZodObject<{
|
|
|
8741
8813
|
slack_bot_thread_replies: "slack_bot_thread_replies";
|
|
8742
8814
|
social_connections_list: "social_connections_list";
|
|
8743
8815
|
social_daily_analysis_context: "social_daily_analysis_context";
|
|
8816
|
+
social_mentions_live: "social_mentions_live";
|
|
8817
|
+
social_post_reply: "social_post_reply";
|
|
8744
8818
|
social_posts_recent: "social_posts_recent";
|
|
8819
|
+
social_posts_sync: "social_posts_sync";
|
|
8820
|
+
social_search_live: "social_search_live";
|
|
8821
|
+
social_thread_fetch: "social_thread_fetch";
|
|
8745
8822
|
variable_set_list: "variable_set_list";
|
|
8746
8823
|
variable_set_set_variable: "variable_set_set_variable";
|
|
8747
8824
|
}>>;
|
|
@@ -9148,7 +9225,12 @@ export declare const SessionLineageResponse: z.ZodObject<{
|
|
|
9148
9225
|
slack_bot_thread_replies: "slack_bot_thread_replies";
|
|
9149
9226
|
social_connections_list: "social_connections_list";
|
|
9150
9227
|
social_daily_analysis_context: "social_daily_analysis_context";
|
|
9228
|
+
social_mentions_live: "social_mentions_live";
|
|
9229
|
+
social_post_reply: "social_post_reply";
|
|
9151
9230
|
social_posts_recent: "social_posts_recent";
|
|
9231
|
+
social_posts_sync: "social_posts_sync";
|
|
9232
|
+
social_search_live: "social_search_live";
|
|
9233
|
+
social_thread_fetch: "social_thread_fetch";
|
|
9152
9234
|
variable_set_list: "variable_set_list";
|
|
9153
9235
|
variable_set_set_variable: "variable_set_set_variable";
|
|
9154
9236
|
}>>;
|
|
@@ -11705,7 +11787,12 @@ export declare const CreateSessionRequest: z.ZodPreprocess<z.ZodObject<{
|
|
|
11705
11787
|
slack_bot_thread_replies: "slack_bot_thread_replies";
|
|
11706
11788
|
social_connections_list: "social_connections_list";
|
|
11707
11789
|
social_daily_analysis_context: "social_daily_analysis_context";
|
|
11790
|
+
social_mentions_live: "social_mentions_live";
|
|
11791
|
+
social_post_reply: "social_post_reply";
|
|
11708
11792
|
social_posts_recent: "social_posts_recent";
|
|
11793
|
+
social_posts_sync: "social_posts_sync";
|
|
11794
|
+
social_search_live: "social_search_live";
|
|
11795
|
+
social_thread_fetch: "social_thread_fetch";
|
|
11709
11796
|
variable_set_list: "variable_set_list";
|
|
11710
11797
|
variable_set_set_variable: "variable_set_set_variable";
|
|
11711
11798
|
}>>>;
|
|
@@ -14461,6 +14548,21 @@ export declare const ClientConfig: z.ZodObject<{
|
|
|
14461
14548
|
mode: z.ZodLiteral<"managedSession">;
|
|
14462
14549
|
session: z.ZodLiteral<"cookie">;
|
|
14463
14550
|
}, z.core.$strip>], "mode">>;
|
|
14551
|
+
analytics: z.ZodDefault<z.ZodObject<{
|
|
14552
|
+
consentRequired: z.ZodBoolean;
|
|
14553
|
+
providers: z.ZodObject<{
|
|
14554
|
+
reo: z.ZodOptional<z.ZodObject<{
|
|
14555
|
+
clientId: z.ZodString;
|
|
14556
|
+
}, z.core.$strip>>;
|
|
14557
|
+
posthog: z.ZodOptional<z.ZodObject<{
|
|
14558
|
+
projectKey: z.ZodString;
|
|
14559
|
+
host: z.ZodString;
|
|
14560
|
+
}, z.core.$strip>>;
|
|
14561
|
+
ga4: z.ZodOptional<z.ZodObject<{
|
|
14562
|
+
measurementId: z.ZodString;
|
|
14563
|
+
}, z.core.$strip>>;
|
|
14564
|
+
}, z.core.$strip>;
|
|
14565
|
+
}, z.core.$strip>>;
|
|
14464
14566
|
structuredServices: z.ZodDefault<z.ZodObject<{
|
|
14465
14567
|
fileSystem: z.ZodBoolean;
|
|
14466
14568
|
git: z.ZodBoolean;
|
package/dist/index.js
CHANGED
|
@@ -443,6 +443,8 @@ import {
|
|
|
443
443
|
SetWorkspaceEnvironmentVariableRequest,
|
|
444
444
|
SocialConnection,
|
|
445
445
|
SocialConnectionStatus,
|
|
446
|
+
SocialOAuthProviderId,
|
|
447
|
+
SocialOAuthStartRequest,
|
|
446
448
|
SocialPost,
|
|
447
449
|
SocialProvider,
|
|
448
450
|
StaticUsageLimits,
|
|
@@ -620,6 +622,7 @@ import {
|
|
|
620
622
|
capabilityCatalogItemIsTrustedForExposure,
|
|
621
623
|
compactSessionEventResult,
|
|
622
624
|
compareCodexFleetCanonicalStringsV1,
|
|
625
|
+
comparePersonalSlackCanonicalConnections,
|
|
623
626
|
createCodexFleetReplayRecordV1,
|
|
624
627
|
createSecretRedactor,
|
|
625
628
|
decodeNativeSnapshotRef,
|
|
@@ -664,6 +667,7 @@ import {
|
|
|
664
667
|
resourceMountPathCollisionKey,
|
|
665
668
|
retainedArtifactReferenceFromFile,
|
|
666
669
|
retainedOutputUnavailable,
|
|
670
|
+
selectCanonicalPersonalSlackConnection,
|
|
667
671
|
sessionEventJsonBytes,
|
|
668
672
|
sessionEventLatestClassToSemanticClass,
|
|
669
673
|
sessionEventMediaPreview,
|
|
@@ -684,7 +688,7 @@ import {
|
|
|
684
688
|
verifyRelayToken,
|
|
685
689
|
verifyStreamToken,
|
|
686
690
|
workspaceControlUtf8Bytes
|
|
687
|
-
} from "./chunk-
|
|
691
|
+
} from "./chunk-3Q5FLMOD.js";
|
|
688
692
|
import {
|
|
689
693
|
OPENGENI_SLACK_BOT_FORBIDDEN_SCOPES,
|
|
690
694
|
OPENGENI_SLACK_BOT_REQUIRED_SCOPES,
|
|
@@ -1140,6 +1144,8 @@ export {
|
|
|
1140
1144
|
SetWorkspaceEnvironmentVariableRequest,
|
|
1141
1145
|
SocialConnection,
|
|
1142
1146
|
SocialConnectionStatus,
|
|
1147
|
+
SocialOAuthProviderId,
|
|
1148
|
+
SocialOAuthStartRequest,
|
|
1143
1149
|
SocialPost,
|
|
1144
1150
|
SocialProvider,
|
|
1145
1151
|
StaticUsageLimits,
|
|
@@ -1318,6 +1324,7 @@ export {
|
|
|
1318
1324
|
capabilityCatalogItemIsTrustedForExposure,
|
|
1319
1325
|
compactSessionEventResult,
|
|
1320
1326
|
compareCodexFleetCanonicalStringsV1,
|
|
1327
|
+
comparePersonalSlackCanonicalConnections,
|
|
1321
1328
|
createCodexFleetReplayRecordV1,
|
|
1322
1329
|
createSecretRedactor,
|
|
1323
1330
|
decodeNativeSnapshotRef,
|
|
@@ -1363,6 +1370,7 @@ export {
|
|
|
1363
1370
|
resourceMountPathCollisionKey,
|
|
1364
1371
|
retainedArtifactReferenceFromFile,
|
|
1365
1372
|
retainedOutputUnavailable,
|
|
1373
|
+
selectCanonicalPersonalSlackConnection,
|
|
1366
1374
|
sessionEventJsonBytes,
|
|
1367
1375
|
sessionEventLatestClassToSemanticClass,
|
|
1368
1376
|
sessionEventMediaPreview,
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -676,6 +676,10 @@ export const DEFAULT_FIRST_PARTY_MCP_PERMISSIONS = [
|
|
|
676
676
|
"sessions:read",
|
|
677
677
|
"sessions:create",
|
|
678
678
|
"sessions:control",
|
|
679
|
+
// Read-only connection discovery lets the selected first-party connector
|
|
680
|
+
// tools resolve an already-installed workspace principal. Credentials stay
|
|
681
|
+
// inside the broker and remain subject to each tool's own authorization.
|
|
682
|
+
"connections:read",
|
|
679
683
|
"variable-sets:use",
|
|
680
684
|
"variable-sets:manage",
|
|
681
685
|
"rigs:use",
|
|
@@ -732,6 +736,11 @@ export const FIRST_PARTY_MCP_TOOL_NAMES = [
|
|
|
732
736
|
"social_connections_list",
|
|
733
737
|
"social_posts_recent",
|
|
734
738
|
"social_daily_analysis_context",
|
|
739
|
+
"social_search_live",
|
|
740
|
+
"social_mentions_live",
|
|
741
|
+
"social_thread_fetch",
|
|
742
|
+
"social_posts_sync",
|
|
743
|
+
"social_post_reply",
|
|
735
744
|
"scheduled_tasks_list",
|
|
736
745
|
"scheduled_tasks_get",
|
|
737
746
|
"scheduled_tasks_create",
|
|
@@ -760,12 +769,13 @@ export const FirstPartyMcpToolName = z.enum(FIRST_PARTY_MCP_TOOL_NAMES);
|
|
|
760
769
|
export type FirstPartyMcpToolName = z.infer<typeof FirstPartyMcpToolName>;
|
|
761
770
|
|
|
762
771
|
/**
|
|
763
|
-
*
|
|
764
|
-
*
|
|
765
|
-
*
|
|
772
|
+
* Connector-wide tools are explicit-only. Ordinary session omission selects
|
|
773
|
+
* the non-connector catalog, while an explicit session policy may still select
|
|
774
|
+
* any catalogued connector tool and remains independently permission-gated.
|
|
766
775
|
*/
|
|
767
|
-
export const DEFAULT_FIRST_PARTY_MCP_TOOLS =
|
|
768
|
-
|
|
776
|
+
export const DEFAULT_FIRST_PARTY_MCP_TOOLS = FIRST_PARTY_MCP_TOOL_NAMES.filter(
|
|
777
|
+
(name) => !name.startsWith("social_") && !name.startsWith("slack_bot_"),
|
|
778
|
+
) satisfies readonly FirstPartyMcpToolName[];
|
|
769
779
|
|
|
770
780
|
export function prefixedMcpToolName(registryId: string, toolName: string): string {
|
|
771
781
|
return `${registryId}__${toolName}`;
|
|
@@ -5185,6 +5195,7 @@ export type EnablePackRequest = z.infer<typeof EnablePackRequest>;
|
|
|
5185
5195
|
|
|
5186
5196
|
export const SocialProvider = z.enum([
|
|
5187
5197
|
"x",
|
|
5198
|
+
"reddit",
|
|
5188
5199
|
"linkedin",
|
|
5189
5200
|
"instagram",
|
|
5190
5201
|
"facebook",
|
|
@@ -5257,6 +5268,19 @@ export const CreateSocialPostRequest = z.object({
|
|
|
5257
5268
|
});
|
|
5258
5269
|
export type CreateSocialPostRequest = z.infer<typeof CreateSocialPostRequest>;
|
|
5259
5270
|
|
|
5271
|
+
// Social OAuth is first-party (X / Reddit REST APIs), distinct from the MCP
|
|
5272
|
+
// integrations OAuth flow: these providers have no MCP resource metadata, so
|
|
5273
|
+
// endpoints are pinned per provider and tokens live in social_connections.
|
|
5274
|
+
export const SocialOAuthProviderId = z.enum(["x", "reddit"]);
|
|
5275
|
+
export type SocialOAuthProviderId = z.infer<typeof SocialOAuthProviderId>;
|
|
5276
|
+
|
|
5277
|
+
export const SocialOAuthStartRequest = z.object({
|
|
5278
|
+
provider: SocialOAuthProviderId,
|
|
5279
|
+
scopes: z.array(z.string().min(1)).optional(),
|
|
5280
|
+
returnPath: z.string().optional(),
|
|
5281
|
+
});
|
|
5282
|
+
export type SocialOAuthStartRequest = z.infer<typeof SocialOAuthStartRequest>;
|
|
5283
|
+
|
|
5260
5284
|
export const ConnectionKind = z.enum(["oauth2", "api_key", "app_install", "delegated"]);
|
|
5261
5285
|
export type ConnectionKind = z.infer<typeof ConnectionKind>;
|
|
5262
5286
|
|
|
@@ -5306,6 +5330,70 @@ export const ConnectionMetadata = z.object({
|
|
|
5306
5330
|
});
|
|
5307
5331
|
export type ConnectionMetadata = z.infer<typeof ConnectionMetadata>;
|
|
5308
5332
|
|
|
5333
|
+
type PersonalSlackCanonicalConnection = Pick<
|
|
5334
|
+
ConnectionMetadata,
|
|
5335
|
+
"id" | "status" | "createdAt" | "updatedAt"
|
|
5336
|
+
>;
|
|
5337
|
+
|
|
5338
|
+
const PERSONAL_SLACK_CONNECTION_STATUS_RANK = {
|
|
5339
|
+
active: 0,
|
|
5340
|
+
needs_reauth: 1,
|
|
5341
|
+
error: 2,
|
|
5342
|
+
revoked: 3,
|
|
5343
|
+
} as const satisfies Record<ConnectionStatus, number>;
|
|
5344
|
+
|
|
5345
|
+
/**
|
|
5346
|
+
* Canonical ordering for duplicate subject-owned Personal Slack rows.
|
|
5347
|
+
*
|
|
5348
|
+
* PostgreSQL broker lookup mirrors this exact sequence: usable status first,
|
|
5349
|
+
* then newest update, newest creation, and immutable UUID descending.
|
|
5350
|
+
*/
|
|
5351
|
+
export function comparePersonalSlackCanonicalConnections(
|
|
5352
|
+
left: PersonalSlackCanonicalConnection,
|
|
5353
|
+
right: PersonalSlackCanonicalConnection,
|
|
5354
|
+
): number {
|
|
5355
|
+
const statusDelta =
|
|
5356
|
+
PERSONAL_SLACK_CONNECTION_STATUS_RANK[left.status] -
|
|
5357
|
+
PERSONAL_SLACK_CONNECTION_STATUS_RANK[right.status];
|
|
5358
|
+
if (statusDelta !== 0) return statusDelta;
|
|
5359
|
+
|
|
5360
|
+
const updatedAtDelta = compareDescending(
|
|
5361
|
+
canonicalConnectionTimestamp(left.updatedAt),
|
|
5362
|
+
canonicalConnectionTimestamp(right.updatedAt),
|
|
5363
|
+
);
|
|
5364
|
+
if (updatedAtDelta !== 0) return updatedAtDelta;
|
|
5365
|
+
|
|
5366
|
+
const createdAtDelta = compareDescending(
|
|
5367
|
+
canonicalConnectionTimestamp(left.createdAt),
|
|
5368
|
+
canonicalConnectionTimestamp(right.createdAt),
|
|
5369
|
+
);
|
|
5370
|
+
if (createdAtDelta !== 0) return createdAtDelta;
|
|
5371
|
+
|
|
5372
|
+
return compareDescending(left.id, right.id);
|
|
5373
|
+
}
|
|
5374
|
+
|
|
5375
|
+
export function selectCanonicalPersonalSlackConnection<T extends PersonalSlackCanonicalConnection>(
|
|
5376
|
+
connections: readonly T[],
|
|
5377
|
+
): T | null {
|
|
5378
|
+
let selected: T | null = null;
|
|
5379
|
+
for (const connection of connections) {
|
|
5380
|
+
if (!selected || comparePersonalSlackCanonicalConnections(connection, selected) < 0) {
|
|
5381
|
+
selected = connection;
|
|
5382
|
+
}
|
|
5383
|
+
}
|
|
5384
|
+
return selected;
|
|
5385
|
+
}
|
|
5386
|
+
|
|
5387
|
+
function canonicalConnectionTimestamp(value: string): number {
|
|
5388
|
+
const timestamp = Date.parse(value);
|
|
5389
|
+
return Number.isFinite(timestamp) ? timestamp : Number.NEGATIVE_INFINITY;
|
|
5390
|
+
}
|
|
5391
|
+
|
|
5392
|
+
function compareDescending(left: number | string, right: number | string): number {
|
|
5393
|
+
if (left === right) return 0;
|
|
5394
|
+
return left > right ? -1 : 1;
|
|
5395
|
+
}
|
|
5396
|
+
|
|
5309
5397
|
export const ConnectionCredentialBundle = z.record(z.string(), z.unknown());
|
|
5310
5398
|
export type ConnectionCredentialBundle = z.infer<typeof ConnectionCredentialBundle>;
|
|
5311
5399
|
|
|
@@ -5646,8 +5734,8 @@ export const Session = z.object({
|
|
|
5646
5734
|
// Non-default first-party MCP token permissions (manager-style sessions);
|
|
5647
5735
|
// null means the fixed worker default set.
|
|
5648
5736
|
firstPartyMcpPermissions: z.array(Permission).nullable(),
|
|
5649
|
-
// Exact model-visible OpenGeni selection.
|
|
5650
|
-
//
|
|
5737
|
+
// Exact model-visible OpenGeni selection. The default omits connector-wide
|
|
5738
|
+
// tools; [] intentionally selects none.
|
|
5651
5739
|
firstPartyMcpTools: z.array(FirstPartyMcpToolName),
|
|
5652
5740
|
// Per-session third-party MCP servers, metadata only. Credential values are
|
|
5653
5741
|
// write-only and never appear here.
|
|
@@ -7948,7 +8036,8 @@ export const CreateSessionRequest = withVariableSetIdAlias({
|
|
|
7948
8036
|
// rejected; creation never silently expands a child beyond that set.
|
|
7949
8037
|
firstPartyMcpPermissions: z.array(Permission).optional(),
|
|
7950
8038
|
// Exact model-visible selection from the broad first-party OpenGeni MCP
|
|
7951
|
-
// catalog. Omission selects the
|
|
8039
|
+
// catalog. Omission selects the safe non-connector default; [] intentionally
|
|
8040
|
+
// exposes none.
|
|
7952
8041
|
// This does not grant authority: every registered tool is permission-gated.
|
|
7953
8042
|
firstPartyMcpTools: z.array(FirstPartyMcpToolName).optional(),
|
|
7954
8043
|
// Third-party MCP servers attached only to this session. For an agent-created
|
|
@@ -9326,6 +9415,35 @@ export const ClientConfig = /* @__PURE__ */ defineModelContractSchema(() =>
|
|
|
9326
9415
|
}),
|
|
9327
9416
|
productAccessMode: ProductAccessMode,
|
|
9328
9417
|
auth: ClientAuthConfig.default({ mode: "none" }),
|
|
9418
|
+
analytics: z
|
|
9419
|
+
.object({
|
|
9420
|
+
consentRequired: z.boolean(),
|
|
9421
|
+
providers: z.object({
|
|
9422
|
+
reo: z
|
|
9423
|
+
.object({
|
|
9424
|
+
clientId: z
|
|
9425
|
+
.string()
|
|
9426
|
+
.max(128)
|
|
9427
|
+
.regex(/^[A-Za-z0-9_-]+$/u),
|
|
9428
|
+
})
|
|
9429
|
+
.optional(),
|
|
9430
|
+
posthog: z
|
|
9431
|
+
.object({
|
|
9432
|
+
projectKey: z.string().min(1).max(256),
|
|
9433
|
+
host: z.string().url().max(2_048),
|
|
9434
|
+
})
|
|
9435
|
+
.optional(),
|
|
9436
|
+
ga4: z
|
|
9437
|
+
.object({
|
|
9438
|
+
measurementId: z
|
|
9439
|
+
.string()
|
|
9440
|
+
.max(32)
|
|
9441
|
+
.regex(/^G-[A-Z0-9]+$/u),
|
|
9442
|
+
})
|
|
9443
|
+
.optional(),
|
|
9444
|
+
}),
|
|
9445
|
+
})
|
|
9446
|
+
.default({ consentRequired: true, providers: {} }),
|
|
9329
9447
|
// Server-wide hint: does this deployment support Channel-A structured services
|
|
9330
9448
|
// at all (P4.4). Per-session availability is negotiated on /stream-capabilities
|
|
9331
9449
|
// (it depends on the session's pinned backend); this is the coarse on/off the
|