@opengeni/api-router 0.23.1 → 0.26.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/app.d.ts +2 -2
- package/dist/app.js +1 -1
- package/dist/browser-controller-authority.d.ts +43 -0
- package/dist/browser-state-authority.d.ts +27 -0
- package/dist/{chunk-T4T2PGU4.js → chunk-JIKNR5YL.js} +26181 -14408
- package/dist/chunk-JIKNR5YL.js.map +1 -0
- package/dist/codemode.d.ts +23 -0
- package/dist/editable-artifact-live-hints.d.ts +11 -0
- package/dist/editable-artifact-native-kernel.d.ts +37 -0
- package/dist/editable-artifact-office-import.d.ts +22 -0
- package/dist/editable-artifact-production.d.ts +29 -0
- package/dist/editable-artifact-websocket.d.ts +49 -0
- package/dist/editable-artifact-workspace-files.d.ts +23 -0
- package/dist/github-browser-flow.d.ts +6 -0
- package/dist/http/cors.d.ts +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1796 -22
- package/dist/index.js.map +1 -1
- package/dist/integrations/api-integrations.d.ts +24 -0
- package/dist/integrations/atlassian.d.ts +176 -0
- package/dist/integrations/github-skill-source.d.ts +5 -0
- package/dist/integrations/google-drive.d.ts +85 -0
- package/dist/integrations/oauth-client.d.ts +22 -1
- package/dist/integrations/provider-oauth.d.ts +19 -0
- package/dist/integrations/slack-bot.d.ts +4 -0
- package/dist/integrations/slack-interactions.d.ts +8 -2
- package/dist/integrations/social-api.d.ts +2 -1
- package/dist/mcp/editable-artifact-query-schema.d.ts +4 -0
- package/dist/mcp/editable-artifacts.d.ts +13 -0
- package/dist/mcp/scheduled-task-view.d.ts +168 -0
- package/dist/mcp/server.d.ts +14 -3
- package/dist/memory-slack-delivery.d.ts +9 -0
- package/dist/routes/api-integrations.d.ts +8 -0
- package/dist/routes/browser-identities.d.ts +5 -0
- package/dist/routes/browser-sessions.d.ts +6 -0
- package/dist/routes/company-profile.d.ts +3 -0
- package/dist/routes/computer-sessions.d.ts +6 -0
- package/dist/routes/editable-artifacts.d.ts +44 -0
- package/dist/routes/integration-features.d.ts +3 -0
- package/dist/routes/memory-slack-publications.d.ts +6 -0
- package/dist/routes/plugins.d.ts +8 -0
- package/dist/routes/sessions.d.ts +17 -2
- package/dist/routes/skills.d.ts +6 -0
- package/dist/routes/video-generation.d.ts +3 -0
- package/dist/sandbox/channel-a.d.ts +55 -2
- package/dist/sandbox/metrics-ingestion.d.ts +6 -1
- package/dist/sandbox/viewer.d.ts +4 -2
- package/dist/temporal-schedule-cleanup.d.ts +26 -0
- package/package.json +19 -14
- package/src/app.ts +274 -37
- package/src/browser-controller-authority.ts +137 -0
- package/src/browser-state-authority.ts +236 -0
- package/src/codemode.ts +186 -0
- package/src/editable-artifact-live-hints.ts +64 -0
- package/src/editable-artifact-native-kernel.ts +659 -0
- package/src/editable-artifact-office-import.ts +230 -0
- package/src/editable-artifact-production.ts +419 -0
- package/src/editable-artifact-websocket.ts +311 -0
- package/src/editable-artifact-workspace-files.ts +186 -0
- package/src/github-browser-flow.ts +35 -6
- package/src/http/auth.ts +2 -0
- package/src/http/cors.ts +3 -0
- package/src/index.ts +119 -20
- package/src/integrations/api-integrations.ts +350 -0
- package/src/integrations/atlassian.ts +1621 -0
- package/src/integrations/github-skill-source.ts +142 -0
- package/src/integrations/google-drive.ts +1000 -64
- package/src/integrations/oauth-client.ts +123 -33
- package/src/integrations/provider-oauth.ts +777 -0
- package/src/integrations/slack-bot.ts +31 -2
- package/src/integrations/slack-interactions.ts +487 -27
- package/src/integrations/social-api.ts +11 -0
- package/src/mcp/documents.ts +32 -1
- package/src/mcp/editable-artifact-query-schema.ts +236 -0
- package/src/mcp/editable-artifacts.ts +448 -0
- package/src/mcp/scheduled-task-view.ts +34 -0
- package/src/mcp/server.ts +923 -145
- package/src/memory-slack-delivery.ts +209 -0
- package/src/routes/api-integrations.ts +407 -0
- package/src/routes/browser-identities.ts +136 -0
- package/src/routes/browser-sessions.ts +2543 -0
- package/src/routes/company-profile.ts +255 -0
- package/src/routes/computer-sessions.ts +1247 -0
- package/src/routes/connections.ts +284 -99
- package/src/routes/documents.ts +22 -3
- package/src/routes/editable-artifacts.ts +1159 -0
- package/src/routes/files.ts +106 -4
- package/src/routes/github.ts +18 -2
- package/src/routes/install.ts +7 -1
- package/src/routes/integration-features.ts +258 -0
- package/src/routes/memory-slack-publications.ts +216 -0
- package/src/routes/packs.ts +437 -7
- package/src/routes/plugins.ts +751 -0
- package/src/routes/rigs.ts +77 -20
- package/src/routes/scheduled-tasks.ts +67 -40
- package/src/routes/sessions.ts +421 -245
- package/src/routes/skills.ts +174 -0
- package/src/routes/video-generation.ts +132 -0
- package/src/routes/workspaces.ts +46 -24
- package/src/sandbox/channel-a.ts +723 -116
- package/src/sandbox/metrics-ingestion.ts +121 -3
- package/src/sandbox/rematerialize.ts +35 -47
- package/src/sandbox/viewer.ts +29 -9
- package/src/temporal-schedule-cleanup.ts +135 -0
- package/dist/chunk-T4T2PGU4.js.map +0 -1
- package/dist/mcp/toolspace.d.ts +0 -71
- package/src/mcp/toolspace.ts +0 -1190
|
@@ -407,13 +407,21 @@ export class OpenGeniSlackBotClient {
|
|
|
407
407
|
return await this.requireMemberChannel(headers, channelId);
|
|
408
408
|
}
|
|
409
409
|
|
|
410
|
-
async channelHistory(input: {
|
|
410
|
+
async channelHistory(input: {
|
|
411
|
+
channelId: string;
|
|
412
|
+
limit?: number;
|
|
413
|
+
cursor?: string;
|
|
414
|
+
latest?: string;
|
|
415
|
+
inclusive?: boolean;
|
|
416
|
+
}) {
|
|
411
417
|
return await this.withAudit("channel_history.read", async (headers) => {
|
|
412
418
|
const info = await this.requireMemberChannel(headers, input.channelId);
|
|
413
419
|
const payload = await this.call(headers, "conversations.history", {
|
|
414
420
|
channel: input.channelId,
|
|
415
421
|
limit: String(boundedInt(input.limit, MAX_HISTORY_PAGE, 50)),
|
|
416
422
|
...(input.cursor ? { cursor: input.cursor } : {}),
|
|
423
|
+
...(input.latest ? { latest: input.latest } : {}),
|
|
424
|
+
...(input.latest && input.inclusive ? { inclusive: "true" } : {}),
|
|
417
425
|
});
|
|
418
426
|
return {
|
|
419
427
|
channel: info,
|
|
@@ -651,6 +659,7 @@ export class OpenGeniSlackBotClient {
|
|
|
651
659
|
userId?: string;
|
|
652
660
|
threadTimestamp?: string;
|
|
653
661
|
text: string;
|
|
662
|
+
requireActiveNonSharedChannel?: boolean;
|
|
654
663
|
}) {
|
|
655
664
|
const operation = "message.post" as const;
|
|
656
665
|
const claimHolderId = crypto.randomUUID();
|
|
@@ -664,7 +673,7 @@ export class OpenGeniSlackBotClient {
|
|
|
664
673
|
users: input.userId,
|
|
665
674
|
});
|
|
666
675
|
channelId = requiredSlackString(slackRecord(opened.channel)?.id, "channel.id");
|
|
667
|
-
} else if (channelId) {
|
|
676
|
+
} else if (channelId && !input.requireActiveNonSharedChannel) {
|
|
668
677
|
await this.requireMemberChannel(headers, channelId);
|
|
669
678
|
}
|
|
670
679
|
if (!channelId) {
|
|
@@ -703,6 +712,12 @@ export class OpenGeniSlackBotClient {
|
|
|
703
712
|
return this.completedPostResult(claim.operation, input.operationId, input.threadTimestamp);
|
|
704
713
|
}
|
|
705
714
|
claimAcquired = true;
|
|
715
|
+
if (input.requireActiveNonSharedChannel) {
|
|
716
|
+
if (input.userId || !input.channelId) {
|
|
717
|
+
throw new Error("active non-shared channel validation requires channelId");
|
|
718
|
+
}
|
|
719
|
+
await this.requireActiveNonSharedMemberChannel(headers, channelId);
|
|
720
|
+
}
|
|
706
721
|
providerCallStarted = true;
|
|
707
722
|
const posted = await this.call(headers, "chat.postMessage", {
|
|
708
723
|
channel: channelId,
|
|
@@ -909,6 +924,20 @@ export class OpenGeniSlackBotClient {
|
|
|
909
924
|
return projected;
|
|
910
925
|
}
|
|
911
926
|
|
|
927
|
+
private async requireActiveNonSharedMemberChannel(
|
|
928
|
+
headers: Record<string, string>,
|
|
929
|
+
channelId: string,
|
|
930
|
+
) {
|
|
931
|
+
const projected = await this.requireMemberChannel(headers, channelId);
|
|
932
|
+
if (projected.isArchived) {
|
|
933
|
+
throw new SlackBotProviderError("is_archived");
|
|
934
|
+
}
|
|
935
|
+
if (projected.isShared || projected.isExternallyShared || projected.isOrgShared) {
|
|
936
|
+
throw new SlackBotProviderError("slack_connect_unsupported");
|
|
937
|
+
}
|
|
938
|
+
return projected;
|
|
939
|
+
}
|
|
940
|
+
|
|
912
941
|
private async requireFileForChannel(
|
|
913
942
|
headers: Record<string, string>,
|
|
914
943
|
operation: "file.info" | "file.content.read",
|