@opengeni/api-router 2.6.4 → 2.8.1-canary.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.
- package/dist/app.d.ts +2 -1
- package/dist/app.js +3 -1
- package/dist/{chunk-XTLI3CBH.js → chunk-HHKQMVY7.js} +3009 -1699
- package/dist/chunk-HHKQMVY7.js.map +1 -0
- package/dist/github-access.d.ts +25 -2
- package/dist/index.js +14 -2
- package/dist/index.js.map +1 -1
- package/dist/integrations/personal-github-repositories.d.ts +41 -2
- package/dist/mcp/scheduled-task-view.d.ts +3 -3
- package/dist/model-catalog.d.ts +5 -31
- package/dist/routes/codex.d.ts +8 -1
- package/dist/routes/github.d.ts +2 -0
- package/dist/routes/organization-model-providers.d.ts +3 -0
- package/dist/workspace-deletion.d.ts +6 -0
- package/package.json +18 -18
- package/src/app.ts +55 -9
- package/src/auth/organization-user-setup.ts +3 -3
- package/src/github-access.ts +117 -1
- package/src/http/sse.ts +15 -7
- package/src/index.ts +13 -1
- package/src/integrations/personal-github-repositories.ts +238 -9
- package/src/integrations/slack-app-home.ts +2 -2
- package/src/integrations/slack-interactions.ts +77 -37
- package/src/mcp/company-brain-governed-writes.ts +2 -2
- package/src/mcp/company-profile-agent-admin.ts +1 -1
- package/src/mcp/remember.ts +1 -1
- package/src/mcp/server.ts +11 -2
- package/src/model-catalog.ts +45 -337
- package/src/routes/automations.ts +178 -19
- package/src/routes/codex.ts +136 -32
- package/src/routes/connections.ts +271 -16
- package/src/routes/github.ts +116 -15
- package/src/routes/organization-memberships.ts +50 -3
- package/src/routes/organization-model-providers.ts +231 -0
- package/src/routes/packs.ts +1 -0
- package/src/routes/personal-github.ts +39 -0
- package/src/routes/pr-review.ts +72 -4
- package/src/routes/scheduled-tasks.ts +40 -13
- package/src/routes/sessions.ts +88 -52
- package/src/routes/supergrok.ts +3 -2
- package/src/routes/workspaces.ts +405 -62
- package/src/workspace-deletion.ts +64 -0
- package/dist/chunk-XTLI3CBH.js.map +0 -1
package/dist/github-access.d.ts
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
|
-
import type { GitHubBindingStatus, GitHubInstallationBinding, GitHubRepository } from "@opengeni/contracts";
|
|
2
|
-
import {
|
|
1
|
+
import type { GitHubAppRepositoryBranchPage, GitHubBindingStatus, GitHubInstallationBinding, GitHubRepository } from "@opengeni/contracts";
|
|
2
|
+
import { type GitHubRepositoryBranchesResponse, type ListGitHubRepositoryBranchesQuery } from "@opengeni/contracts/github-repository-contracts";
|
|
3
|
+
import { areGitHubRepositoriesAllowedForWorkspace, listGitHubInstallationAccessForWorkspace } from "@opengeni/db";
|
|
3
4
|
import type { ApiRouteDeps } from "@opengeni/core";
|
|
5
|
+
export type GitHubRepositoryBranchAuthorityErrorCode = "changed" | "not_authorized";
|
|
6
|
+
export declare class GitHubRepositoryBranchAuthorityError extends Error {
|
|
7
|
+
readonly code: GitHubRepositoryBranchAuthorityErrorCode;
|
|
8
|
+
constructor(code: GitHubRepositoryBranchAuthorityErrorCode);
|
|
9
|
+
}
|
|
10
|
+
export type WorkspaceGitHubRepositoryBranchServices = {
|
|
11
|
+
listInstallationAccess: typeof listGitHubInstallationAccessForWorkspace;
|
|
12
|
+
areRepositoriesAllowed: typeof areGitHubRepositoriesAllowedForWorkspace;
|
|
13
|
+
listProviderBranches: (deps: ApiRouteDeps, input: {
|
|
14
|
+
installationId: number;
|
|
15
|
+
repositoryId: number;
|
|
16
|
+
page: number;
|
|
17
|
+
limit: number;
|
|
18
|
+
}) => Promise<GitHubAppRepositoryBranchPage | null>;
|
|
19
|
+
};
|
|
4
20
|
export declare function listWorkspaceGitHubInstallationBindings(deps: ApiRouteDeps, workspaceId: string): Promise<GitHubInstallationBinding[]>;
|
|
5
21
|
export declare function githubBindingStatus(configured: boolean, installations: GitHubInstallationBinding[]): GitHubBindingStatus;
|
|
6
22
|
export type LiveGitHubInstallation = {
|
|
@@ -10,3 +26,10 @@ export type LiveGitHubInstallation = {
|
|
|
10
26
|
};
|
|
11
27
|
export declare function githubInstallationBindingLifecycle(stored: Awaited<ReturnType<typeof listGitHubInstallationAccessForWorkspace>>[number], liveById: Map<number, LiveGitHubInstallation | null>, installationId: number, lifecycleVerified: boolean): GitHubInstallationBinding["lifecycle"];
|
|
12
28
|
export declare function listWorkspaceGitHubRepositories(deps: ApiRouteDeps, workspaceId: string): Promise<GitHubRepository[]>;
|
|
29
|
+
export declare function listWorkspaceGitHubRepositoryBranches(deps: ApiRouteDeps, input: {
|
|
30
|
+
accountId: string;
|
|
31
|
+
workspaceId: string;
|
|
32
|
+
installationId: number;
|
|
33
|
+
repositoryId: number;
|
|
34
|
+
query: ListGitHubRepositoryBranchesQuery;
|
|
35
|
+
}, services?: WorkspaceGitHubRepositoryBranchServices): Promise<GitHubRepositoryBranchesResponse>;
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
createOpenGeniSlackBotInteractionClient,
|
|
7
7
|
startSlackInteractionPump,
|
|
8
8
|
startTemporalScheduleCleanupPump
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HHKQMVY7.js";
|
|
10
10
|
|
|
11
11
|
// src/index.ts
|
|
12
12
|
import {
|
|
@@ -32,7 +32,10 @@ import {
|
|
|
32
32
|
} from "@opengeni/observability";
|
|
33
33
|
import { createObjectStorage } from "@opengeni/storage";
|
|
34
34
|
import { isArtifactRuntimeConfigured } from "@opengeni/artifact-tool/runtime/development";
|
|
35
|
-
import {
|
|
35
|
+
import {
|
|
36
|
+
resolveCatalogSettings,
|
|
37
|
+
SESSION_WORKFLOW_WAKE_DISPATCHER_SCHEDULE_ID
|
|
38
|
+
} from "@opengeni/core";
|
|
36
39
|
import {
|
|
37
40
|
Connection,
|
|
38
41
|
Client as TemporalClient,
|
|
@@ -2905,6 +2908,15 @@ async function startApi(options = {}) {
|
|
|
2905
2908
|
() => assertRuntimeDatabasePosture(dbClient.db, databasePosture),
|
|
2906
2909
|
{ ...retryOptions, onRetry }
|
|
2907
2910
|
);
|
|
2911
|
+
const resolvedCatalog = await retryStartupDependency(
|
|
2912
|
+
"model catalog",
|
|
2913
|
+
() => resolveCatalogSettings(dbClient.db, settings),
|
|
2914
|
+
{ ...retryOptions, onRetry }
|
|
2915
|
+
);
|
|
2916
|
+
observability.info("OpenGeni model catalog resolved", {
|
|
2917
|
+
catalogSource: resolvedCatalog.source,
|
|
2918
|
+
catalogVersion: resolvedCatalog.version
|
|
2919
|
+
});
|
|
2908
2920
|
bus = await retryStartupDependency(
|
|
2909
2921
|
"NATS",
|
|
2910
2922
|
() => createNatsEventBus(
|