@opengeni/api-router 2.5.0 → 2.6.4-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/auth/managed-auth-attempt-context.d.ts +5 -1
- package/dist/auth/managed-auth.d.ts +24 -1
- package/dist/{chunk-QESX7HDK.js → chunk-UOI7KAP3.js} +3240 -791
- package/dist/chunk-UOI7KAP3.js.map +1 -0
- package/dist/http/sse.d.ts +9 -0
- package/dist/index.js +117 -5
- package/dist/index.js.map +1 -1
- package/dist/interaction-metrics.d.ts +2 -0
- package/dist/mcp/company-brain-governed-writes.d.ts +1 -1
- package/dist/mcp/company-profile-agent-admin.d.ts +6 -6
- package/dist/mcp/remember.d.ts +2 -2
- package/dist/mcp/scheduled-task-view.d.ts +3 -3
- package/dist/mcp/server.d.ts +1 -0
- package/dist/mcp/session-view.d.ts +1 -0
- package/dist/mcp/session-wait.d.ts +19 -0
- package/dist/model-catalog.d.ts +5 -31
- package/dist/routes/api-keys.d.ts +2 -0
- package/dist/routes/browser-sessions.d.ts +1 -0
- package/dist/routes/computer-sessions.d.ts +12 -0
- package/dist/routes/managed-auth-session-sets.d.ts +7 -0
- package/dist/routes/workspaces.d.ts +1 -1
- package/dist/sandbox/metrics-ingestion.d.ts +16 -0
- package/dist/workspace-delete-observability.d.ts +10 -0
- package/package.json +19 -19
- package/src/app.ts +206 -29
- package/src/auth/managed-auth-attempt-context.ts +40 -3
- package/src/auth/managed-auth-session-adapter.ts +1 -0
- package/src/auth/managed-auth.ts +164 -4
- package/src/http/sse.ts +279 -45
- package/src/index.ts +13 -1
- package/src/integrations/oauth-client.ts +8 -1
- package/src/integrations/provider-oauth.ts +12 -2
- package/src/integrations/slack-interactions.ts +77 -37
- package/src/interaction-metrics.ts +30 -0
- package/src/mcp/company-brain-governed-writes.ts +38 -23
- package/src/mcp/company-profile-agent-admin.ts +7 -7
- package/src/mcp/remember.ts +19 -8
- package/src/mcp/server.ts +328 -27
- package/src/mcp/session-wait.ts +56 -8
- package/src/model-catalog.ts +45 -337
- package/src/routes/api-integrations.ts +2 -2
- package/src/routes/api-keys.ts +149 -7
- package/src/routes/automations.ts +186 -19
- package/src/routes/browser-sessions.ts +10 -2
- package/src/routes/capabilities.ts +3 -3
- package/src/routes/codex.ts +483 -74
- package/src/routes/company-profile.ts +64 -0
- package/src/routes/computer-sessions.ts +103 -1
- package/src/routes/connections.ts +271 -16
- package/src/routes/github.ts +0 -8
- package/src/routes/integration-facets.ts +8 -5
- package/src/routes/interaction-resources.ts +7 -1
- package/src/routes/managed-auth-session-sets.ts +199 -2
- package/src/routes/organization-memberships.ts +28 -8
- package/src/routes/packs.ts +5 -5
- package/src/routes/plugins.ts +2 -2
- package/src/routes/pr-review.ts +80 -4
- package/src/routes/scheduled-tasks.ts +47 -11
- package/src/routes/sessions.ts +75 -53
- package/src/routes/skills.ts +3 -3
- package/src/routes/supergrok.ts +3 -2
- package/src/routes/workspaces.ts +665 -56
- package/src/sandbox/channel-a.ts +10 -4
- package/src/sandbox/machines.ts +13 -6
- package/src/sandbox/metrics-ingestion.ts +157 -3
- package/src/sandbox/viewer.ts +20 -1
- package/src/workspace-delete-observability.ts +75 -0
- package/dist/chunk-QESX7HDK.js.map +0 -1
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { AuthRunMutationResponse, BrowserActionReceipt, BrowserActionRequest, PublishBrowserRevisionResponse, BrowserSessionMutationResponse, ComputerActionReceipt, ComputerActionRequest, ComputerSessionMutationResponse, InteractionInterventionMutationResponse, ProtectedAuthFillResponse } from "@opengeni/contracts";
|
|
2
2
|
import { type Observability } from "@opengeni/observability";
|
|
3
|
+
import type { ComputerFrameEvidenceMismatchReason } from "@opengeni/runtime/sandbox";
|
|
3
4
|
type InteractionLifecycleMutation = BrowserSessionMutationResponse | ComputerSessionMutationResponse;
|
|
4
5
|
type AuthMutation = AuthRunMutationResponse | ProtectedAuthFillResponse;
|
|
5
6
|
export declare function observeBrowserActionResult(observability: Observability | null | undefined, startedAtMs: number, request: BrowserActionRequest, receipt: BrowserActionReceipt): void;
|
|
6
7
|
export declare function observeComputerActionResult(observability: Observability | null | undefined, startedAtMs: number, request: ComputerActionRequest, receipt: ComputerActionReceipt): void;
|
|
8
|
+
export declare function observeComputerFrameEvidenceMismatch(observability: Observability | null | undefined, reason: ComputerFrameEvidenceMismatchReason): void;
|
|
7
9
|
export declare function observeLifecycleResult(observability: Observability | null | undefined, startedAtMs: number, response: InteractionLifecycleMutation): void;
|
|
8
10
|
export declare function observeBrowserRevisionPublication(observability: Observability | null | undefined, startedAtMs: number, response: PublishBrowserRevisionResponse): void;
|
|
9
11
|
export declare function observeAuthMutation(observability: Observability | null | undefined, startedAtMs: number, response: AuthMutation): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type CompanyBrainGovernedWriteAttempt } from "@opengeni/contracts";
|
|
2
2
|
import { createCompanyBrainLearningPolicyRouter } from "@opengeni/core";
|
|
3
|
-
import type
|
|
3
|
+
import { type Database } from "@opengeni/db";
|
|
4
4
|
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
5
5
|
type JsonResult = (value: unknown) => {
|
|
6
6
|
content: {
|
|
@@ -33,12 +33,12 @@ export declare function deriveCompanyProfileStableKey(content: string): string;
|
|
|
33
33
|
*/
|
|
34
34
|
export declare function resolveCompanyProfileEntries(input: readonly EntryInput[]): CompanyProfileEntry[];
|
|
35
35
|
/**
|
|
36
|
-
* Register the
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
36
|
+
* Register the organization profile administration path. This is not derived
|
|
37
|
+
* workspace learning: the initiating human must be the organization's active
|
|
38
|
+
* owner (the same authority as the manual `account:admin` route). The separate
|
|
39
|
+
* organization policy either blocks the proposal, keeps the exact bound
|
|
40
|
+
* human-confirmation path, or permits immediate activation through the native
|
|
41
|
+
* company-profile lifecycle.
|
|
42
42
|
*/
|
|
43
43
|
export declare function registerCompanyProfileAgentAdminTools(input: RegisterCompanyProfileAgentAdminToolsInput): void;
|
|
44
44
|
export {};
|
package/dist/mcp/remember.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type CompanyBrainGovernedWriteAttempt } from "@opengeni/contracts";
|
|
2
2
|
import { createRememberRouter } from "@opengeni/core";
|
|
3
|
-
import type
|
|
3
|
+
import { type Database } from "@opengeni/db";
|
|
4
4
|
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
5
5
|
type JsonResult = (value: unknown) => {
|
|
6
6
|
content: {
|
|
@@ -19,7 +19,7 @@ export type RegisterRememberToolsInput = {
|
|
|
19
19
|
/**
|
|
20
20
|
* Explicit user-directed remember. Content becomes exact task-note evidence,
|
|
21
21
|
* promotion runs through the frozen workspace learning policy, and activation
|
|
22
|
-
* is either automatic (
|
|
22
|
+
* is either automatic (Skill or instruction under Automatic mode) or requires exactly one
|
|
23
23
|
* bound human confirmation through the built-in `request_human_input` tool.
|
|
24
24
|
* Tool input cannot select scope beyond the workspace, active authority, or
|
|
25
25
|
* another learning-policy source.
|
|
@@ -82,8 +82,8 @@ export declare function scheduledTaskMcpSummary(task: ScheduledTask): {
|
|
|
82
82
|
runMode: "existing_session" | "new_session_per_run" | "reusable_session";
|
|
83
83
|
overlapPolicy: "allow_concurrent" | "buffer_one" | "skip";
|
|
84
84
|
action: {
|
|
85
|
+
readonly sourceId?: never;
|
|
85
86
|
kind: "agent_turn";
|
|
86
|
-
sourceId?: never;
|
|
87
87
|
sourceGeneration?: never;
|
|
88
88
|
sourceLifecycleGeneration?: never;
|
|
89
89
|
destination?: never;
|
|
@@ -205,8 +205,8 @@ export declare function boundScheduledTaskDetailMcp(task: ScheduledTask): {
|
|
|
205
205
|
runMode: "existing_session" | "new_session_per_run" | "reusable_session";
|
|
206
206
|
overlapPolicy: "allow_concurrent" | "buffer_one" | "skip";
|
|
207
207
|
action: {
|
|
208
|
+
readonly sourceId?: never;
|
|
208
209
|
kind: "agent_turn";
|
|
209
|
-
sourceId?: never;
|
|
210
210
|
sourceGeneration?: never;
|
|
211
211
|
sourceLifecycleGeneration?: never;
|
|
212
212
|
destination?: never;
|
|
@@ -389,8 +389,8 @@ export declare function boundScheduledTaskMcpPage(input: {
|
|
|
389
389
|
runMode: "existing_session" | "new_session_per_run" | "reusable_session";
|
|
390
390
|
overlapPolicy: "allow_concurrent" | "buffer_one" | "skip";
|
|
391
391
|
action: {
|
|
392
|
+
readonly sourceId?: never;
|
|
392
393
|
kind: "agent_turn";
|
|
393
|
-
sourceId?: never;
|
|
394
394
|
sourceGeneration?: never;
|
|
395
395
|
sourceLifecycleGeneration?: never;
|
|
396
396
|
destination?: never;
|
package/dist/mcp/server.d.ts
CHANGED
|
@@ -90,6 +90,7 @@ export declare function capSessionDiscoveryPage(page: Awaited<ReturnType<typeof
|
|
|
90
90
|
pausedDescendants: number;
|
|
91
91
|
failedDescendants: number;
|
|
92
92
|
unreadDescendants?: number | undefined;
|
|
93
|
+
unreadFailedDescendants?: number | undefined;
|
|
93
94
|
activelyWorkingDescendants?: number | undefined;
|
|
94
95
|
attentionSince?: string | null | undefined;
|
|
95
96
|
truncated: boolean;
|
|
@@ -121,6 +121,7 @@ export declare function boundSessionDetailMcp(session: Session, effectiveControl
|
|
|
121
121
|
pausedDescendants: number;
|
|
122
122
|
failedDescendants: number;
|
|
123
123
|
unreadDescendants?: number | undefined;
|
|
124
|
+
unreadFailedDescendants?: number | undefined;
|
|
124
125
|
activelyWorkingDescendants?: number | undefined;
|
|
125
126
|
attentionSince?: string | null | undefined;
|
|
126
127
|
truncated: boolean;
|
|
@@ -40,6 +40,21 @@ export declare const SESSION_WAIT_EVENTS_PER_TARGET = 20;
|
|
|
40
40
|
* noise never wake a waiter; `session_events` remains the drill-down for them.
|
|
41
41
|
*/
|
|
42
42
|
export declare const SESSION_WAIT_EVENT_TYPES: readonly ["turn.started", "turn.completed", "turn.failed", "turn.cancelled", "turn.superseded", "turn.capacity_waiting", "agent.message.completed", "session.status.changed", "session.requiresAction", "session.humanInput.requested", "session.control.paused", "session.control.resumed", "tool.auth_needed", "credential.auth_needed", "rig.setup.failed", "goal.set", "goal.updated", "goal.progress", "goal.rewrite.proposed", "goal.rewrite.rejected", "goal.completed", "goal.paused", "goal.resumed", "goal.cleared", "goal.continuation"];
|
|
43
|
+
/**
|
|
44
|
+
* Settlement and blocking events that make a child result usable.
|
|
45
|
+
* Goal facts are deliberately absent: an agent can complete its durable goal
|
|
46
|
+
* before it emits the final assistant message and settles the turn. Completed
|
|
47
|
+
* agent messages are also absent because commentary messages use the same
|
|
48
|
+
* event type; an ordinary result-bearing `turn.completed` carries the
|
|
49
|
+
* authoritative final output.
|
|
50
|
+
*/
|
|
51
|
+
export declare const SESSION_WAIT_COMPLETION_EVENT_TYPES: readonly ["turn.completed", "turn.failed", "turn.cancelled", "turn.superseded", "turn.capacity_waiting", "session.requiresAction", "session.humanInput.requested", "session.control.paused", "tool.auth_needed", "credential.auth_needed", "rig.setup.failed", "goal.paused"];
|
|
52
|
+
/**
|
|
53
|
+
* A completed turn is result-bearing only when it carries the ordinary final
|
|
54
|
+
* output. Segment-limit and maintenance turns settle one execution segment
|
|
55
|
+
* while the session still has work to do, so they must not release a parent.
|
|
56
|
+
*/
|
|
57
|
+
export declare function sessionWaitCompletionEventMatches(event: SessionEvent): boolean;
|
|
43
58
|
/** The self-session event that announces a newly pending machine input. */
|
|
44
59
|
export declare const SESSION_WAIT_OWN_PENDING_EVENT_TYPE = "system.update.pending";
|
|
45
60
|
/**
|
|
@@ -120,6 +135,10 @@ export type SessionWaitInput = {
|
|
|
120
135
|
targets: readonly SessionWaitTarget[];
|
|
121
136
|
ownSessionId: string | null;
|
|
122
137
|
maxWaitMs: number;
|
|
138
|
+
/** Target events that end the wait. Defaults to the ordinary activity set. */
|
|
139
|
+
targetEventTypes?: readonly SessionEventType[] | undefined;
|
|
140
|
+
/** Optional payload-aware refinement applied after the event-type filter. */
|
|
141
|
+
targetEventMatches?: ((event: SessionEvent) => boolean) | undefined;
|
|
123
142
|
source: SessionWaitSource;
|
|
124
143
|
signal?: AbortSignal | undefined;
|
|
125
144
|
now?: (() => number) | undefined;
|
package/dist/model-catalog.d.ts
CHANGED
|
@@ -1,23 +1,7 @@
|
|
|
1
|
-
import { type ConfiguredModel
|
|
2
|
-
import { ClientModel, type WorkspaceModelCatalogResponse as WorkspaceModelCatalogResponseType
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
reason: "not_entitled" | "provider_unhealthy" | null;
|
|
6
|
-
checkedAt: string;
|
|
7
|
-
};
|
|
8
|
-
export type ModelCredentialReadinessObservation = {
|
|
9
|
-
status: "ready";
|
|
10
|
-
checkedAt: string;
|
|
11
|
-
} | {
|
|
12
|
-
status: "not_ready";
|
|
13
|
-
reason: "prerequisites_missing" | "needs_reauth";
|
|
14
|
-
checkedAt: string;
|
|
15
|
-
} | {
|
|
16
|
-
status: "error";
|
|
17
|
-
reason: "resolver_error";
|
|
18
|
-
checkedAt: string;
|
|
19
|
-
};
|
|
20
|
-
export declare const MODEL_CREDENTIAL_READINESS_OBSERVATION_MAX_AGE_MS: number;
|
|
1
|
+
import { type ConfiguredModel } from "@opengeni/config";
|
|
2
|
+
import { ClientModel, type WorkspaceModelCatalogResponse as WorkspaceModelCatalogResponseType } from "@opengeni/contracts";
|
|
3
|
+
import { type WorkspaceModelSelectionInput } from "@opengeni/core";
|
|
4
|
+
export { MODEL_CREDENTIAL_READINESS_OBSERVATION_MAX_AGE_MS, type ModelAvailabilityObservation, type ModelCredentialReadinessObservation, } from "@opengeni/core";
|
|
21
5
|
/** Static, client-safe definition projection. No provider secret is reachable. */
|
|
22
6
|
export declare function projectClientModel(model: ConfiguredModel): ClientModel;
|
|
23
7
|
/**
|
|
@@ -28,14 +12,4 @@ export declare function projectClientModel(model: ConfiguredModel): ClientModel;
|
|
|
28
12
|
* successful typed resolver observation; credential health and provider health
|
|
29
13
|
* are separate inputs and neither is fabricated.
|
|
30
14
|
*/
|
|
31
|
-
export declare function buildWorkspaceModelCatalog(input:
|
|
32
|
-
settings: Settings;
|
|
33
|
-
policy: WorkspaceModelPolicyContract | null;
|
|
34
|
-
codexSubscriptionActive: boolean;
|
|
35
|
-
xaiSubscriptionActive?: boolean;
|
|
36
|
-
workspaceGatewayConnectionActive?: boolean;
|
|
37
|
-
credentialReadinessObservations?: Readonly<Record<string, ModelCredentialReadinessObservation>> | undefined;
|
|
38
|
-
observations?: Readonly<Record<string, ModelAvailabilityObservation>> | undefined;
|
|
39
|
-
now?: Date | undefined;
|
|
40
|
-
credentialReadinessMaxAgeMs?: number | undefined;
|
|
41
|
-
}): WorkspaceModelCatalogResponseType;
|
|
15
|
+
export declare function buildWorkspaceModelCatalog(input: WorkspaceModelSelectionInput): WorkspaceModelCatalogResponseType;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { Permission } from "@opengeni/contracts";
|
|
1
2
|
import type { Hono } from "hono";
|
|
2
3
|
import type { ApiRouteDeps } from "@opengeni/core";
|
|
4
|
+
export declare const organizationApiKeyPermissions: Permission[];
|
|
3
5
|
export declare function registerApiKeyRoutes(app: Hono, deps: ApiRouteDeps): void;
|
|
@@ -5,6 +5,7 @@ export declare function registerBrowserSessionRoutes(app: Hono, deps: ApiRouteDe
|
|
|
5
5
|
export declare function browserNeedsStandaloneDisplayStack(input: {
|
|
6
6
|
headless: boolean;
|
|
7
7
|
linkedComputer: boolean;
|
|
8
|
+
nativeBrowserControl: boolean;
|
|
8
9
|
}): boolean;
|
|
9
10
|
export declare function interactionActorForGrant(grant: AccessGrant): ReturnType<typeof InteractionActor.parse>;
|
|
10
11
|
/** Resolve Drive authority from the same immutable session authorization that
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { type ApiRouteDeps } from "@opengeni/core";
|
|
2
|
+
import { type ComputerControlFrame, type ExpectedComputerFrameEvidence } from "@opengeni/runtime/sandbox";
|
|
2
3
|
import type { Hono } from "hono";
|
|
4
|
+
type ComputerFrameCaptureClient = {
|
|
5
|
+
capture(targetId: string, options: {
|
|
6
|
+
format?: "jpeg" | "png";
|
|
7
|
+
quality?: number;
|
|
8
|
+
maxWidth?: number;
|
|
9
|
+
maxHeight?: number;
|
|
10
|
+
}): Promise<ComputerControlFrame>;
|
|
11
|
+
};
|
|
12
|
+
export declare function validateComputerFrameForApi(frame: Pick<ComputerControlFrame, "data" | "mediaType" | "metadataHeader">, expected: ExpectedComputerFrameEvidence): ComputerControlFrame;
|
|
13
|
+
export declare function captureModelComputerFrame(sessionClient: ComputerFrameCaptureClient, expected: ExpectedComputerFrameEvidence): Promise<ComputerControlFrame>;
|
|
3
14
|
/** Public ComputerSession resource surface. Physical app/window authority stays
|
|
4
15
|
* in the same placement controller used by BrowserSession; this route owns only
|
|
5
16
|
* durable authorization, placement fencing, lifecycle receipts, and routing. */
|
|
6
17
|
export declare function registerComputerSessionRoutes(app: Hono, deps: ApiRouteDeps): void;
|
|
18
|
+
export {};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { type ApiRouteDeps } from "@opengeni/core";
|
|
2
2
|
import type { Hono } from "hono";
|
|
3
3
|
export declare function registerManagedAuthSessionSetRoutes(app: Hono, deps: ApiRouteDeps): void;
|
|
4
|
+
export declare function validatedManagedAuthSocialAuthorizationUrl(input: {
|
|
5
|
+
provider: "google" | "github";
|
|
6
|
+
rawUrl: unknown;
|
|
7
|
+
expectedClientId: string;
|
|
8
|
+
expectedCallbackUrl: string;
|
|
9
|
+
}): string;
|
|
4
10
|
/**
|
|
5
11
|
* Better Auth 1.6.26 provider lifecycle routes retained while session-set mode
|
|
6
12
|
* owns all selected-session reads, enumeration, revocation, and user mutation.
|
|
@@ -11,6 +17,7 @@ export declare function requireManagedAuthProviderRouteAllowed(method: string, p
|
|
|
11
17
|
/** Remove provider bearer/session material and enforce browser-auth cache/cookie policy. */
|
|
12
18
|
export declare function scrubManagedAuthProviderResponse(response: Response, options?: {
|
|
13
19
|
replacementCookies?: readonly string[] | undefined;
|
|
20
|
+
preserveCookieNames?: readonly string[] | undefined;
|
|
14
21
|
}): Promise<Response>;
|
|
15
22
|
export declare function parseSupportedDeepLink(path: string): {
|
|
16
23
|
workspaceId: string | null;
|
|
@@ -16,7 +16,7 @@ export declare function workspaceMembersResponse(members: readonly WorkspaceMemb
|
|
|
16
16
|
subjectId: string;
|
|
17
17
|
subjectLabel: string | null;
|
|
18
18
|
role: string;
|
|
19
|
-
permissions: ("account:admin" | "account:read" | "api_keys:manage" | "artifacts:publish" | "artifacts:read" | "billing:manage" | "billing:read" | "codemode:call" | "connections:read" | "connections:write" | "documents:manage" | "documents:search" | "enrollments:manage" | "enrollments:read" | "environments:manage" | "environments:use" | "files:read" | "files:upload" | "files:write" | "github:manage" | "github:use" | "goals:manage" | "mcp_servers:attach" | "members:manage" | "rigs:manage" | "rigs:use" | "scheduled_tasks:manage" | "scheduled_tasks:run" | "secrets:list" | "secrets:read" | "secrets:write" | "sessions:control" | "sessions:create" | "sessions:read" | "stream:acknowledge" | "stream:control" | "stream:view" | "terminal:attach" | "variable-sets:attach" | "variable-sets:list" | "variable-sets:manage" | "variable-sets:read" | "variable-sets:use" | "variable-sets:write" | "workspace:admin" | "workspace:create" | "workspace:read")[];
|
|
19
|
+
permissions: ("account:admin" | "account:read" | "api_keys:manage" | "artifacts:publish" | "artifacts:read" | "billing:manage" | "billing:read" | "capabilities:manage" | "codemode:call" | "connections:read" | "connections:write" | "documents:manage" | "documents:search" | "enrollments:manage" | "enrollments:read" | "environments:manage" | "environments:use" | "files:read" | "files:upload" | "files:write" | "github:manage" | "github:use" | "goals:manage" | "mcp_servers:attach" | "members:manage" | "rigs:manage" | "rigs:use" | "scheduled_tasks:manage" | "scheduled_tasks:run" | "secrets:list" | "secrets:read" | "secrets:write" | "sessions:control" | "sessions:create" | "sessions:read" | "stream:acknowledge" | "stream:control" | "stream:view" | "terminal:attach" | "variable-sets:attach" | "variable-sets:list" | "variable-sets:manage" | "variable-sets:read" | "variable-sets:use" | "variable-sets:write" | "workspace:admin" | "workspace:create" | "workspace:read")[];
|
|
20
20
|
createdAt: string;
|
|
21
21
|
}[];
|
|
22
22
|
};
|
|
@@ -7,6 +7,22 @@ import { Hello, type AttachedBrowserInventorySnapshot as WireAttachedBrowserInve
|
|
|
7
7
|
export declare const AGENT_EVENTS_SUBJECT = "agent.*.*.connection.*.events";
|
|
8
8
|
/** The wildcard subject the agent publishes its connect Hello on. */
|
|
9
9
|
export declare const AGENT_HELLO_SUBJECT = "agent.*.*.connection.*.hello";
|
|
10
|
+
export type AgentEventIngestionScheduler = {
|
|
11
|
+
enqueue: (payload: Uint8Array, subject: string) => void;
|
|
12
|
+
whenIdle: () => Promise<void>;
|
|
13
|
+
close: () => void;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Drain agent events without making every Connected Machine wait behind one
|
|
17
|
+
* deployment-wide serial DB queue. Each exact process subject retains FIFO order;
|
|
18
|
+
* separate subjects drain concurrently. Consecutive pending heartbeats for one
|
|
19
|
+
* subject are latest-wins because they are point-in-time liveness/metrics samples,
|
|
20
|
+
* while GoingOffline and update-progress events remain ordered barriers.
|
|
21
|
+
*/
|
|
22
|
+
export declare function createAgentEventIngestionScheduler(handler: (payload: Uint8Array, subject: string) => void | Promise<void>, options?: {
|
|
23
|
+
maxConcurrentSubjects?: number;
|
|
24
|
+
onHeartbeatCoalesced?: () => void;
|
|
25
|
+
}): AgentEventIngestionScheduler;
|
|
10
26
|
/** Parse the exact process events subject (heartbeat plane). */
|
|
11
27
|
export declare function parseAgentEventSubject(subject: string): {
|
|
12
28
|
workspaceId: string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { WorkspaceDeleteObserver } from "@opengeni/db";
|
|
2
|
+
import type { Observability } from "@opengeni/observability";
|
|
3
|
+
/**
|
|
4
|
+
* Retain exact workspace deletion timing and inventory without putting tenant
|
|
5
|
+
* identifiers in metric labels. Observer failures never change deletion truth.
|
|
6
|
+
*/
|
|
7
|
+
export declare function workspaceDeleteObserver(observability: Observability | null | undefined, identity: {
|
|
8
|
+
accountId: string;
|
|
9
|
+
workspaceId: string;
|
|
10
|
+
}): WorkspaceDeleteObserver | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeni/api-router",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.4-canary.0",
|
|
4
4
|
"description": "OpenGeni HTTP surface: the Hono adapter/router (createApp), routes, MCP HTTP transport, and HTTP access adapters over @opengeni/core. An engine-distribution surface — its runtime closure includes engine-internal packages.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -41,25 +41,25 @@
|
|
|
41
41
|
"@aws-sdk/client-s3": "^3.1044.0",
|
|
42
42
|
"@aws-sdk/s3-request-presigner": "^3.1044.0",
|
|
43
43
|
"@hono/zod-validator": "^0.7.6",
|
|
44
|
-
"@llamaindex/liteparse": "
|
|
44
|
+
"@llamaindex/liteparse": "2.14.2",
|
|
45
45
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
46
|
-
"@opengeni/agent-proto": "^0.5.1",
|
|
47
|
-
"@opengeni/artifact-tool": "^0.3.
|
|
48
|
-
"@opengeni/capabilities": "^0.3.1",
|
|
49
|
-
"@opengeni/codemode": "^0.4.
|
|
50
|
-
"@opengeni/codex": "^0.2.
|
|
51
|
-
"@opengeni/config": "^0.22.
|
|
52
|
-
"@opengeni/contracts": "^2.
|
|
53
|
-
"@opengeni/core": "^2.
|
|
54
|
-
"@opengeni/db": "^3.
|
|
55
|
-
"@opengeni/documents": "^0.8.
|
|
56
|
-
"@opengeni/events": "^0.4.
|
|
57
|
-
"@opengeni/github": "^0.6.1",
|
|
58
|
-
"@opengeni/network": "^0.2.3",
|
|
59
|
-
"@opengeni/observability": "^0.8.
|
|
60
|
-
"@opengeni/runtime": "^1.
|
|
61
|
-
"@opengeni/storage": "^0.2.
|
|
62
|
-
"@opengeni/xai-subscription": "^0.1.2",
|
|
46
|
+
"@opengeni/agent-proto": "^0.5.1-canary.7",
|
|
47
|
+
"@opengeni/artifact-tool": "^0.3.14-canary.1",
|
|
48
|
+
"@opengeni/capabilities": "^0.3.1-canary.6",
|
|
49
|
+
"@opengeni/codemode": "^0.4.22-canary.1",
|
|
50
|
+
"@opengeni/codex": "^0.2.20-canary.1",
|
|
51
|
+
"@opengeni/config": "^0.22.5-canary.1",
|
|
52
|
+
"@opengeni/contracts": "^2.9.2-canary.1",
|
|
53
|
+
"@opengeni/core": "^2.6.4-canary.0",
|
|
54
|
+
"@opengeni/db": "^3.7.4-canary.0",
|
|
55
|
+
"@opengeni/documents": "^0.8.14-canary.0",
|
|
56
|
+
"@opengeni/events": "^0.4.12-canary.0",
|
|
57
|
+
"@opengeni/github": "^0.6.7-canary.1",
|
|
58
|
+
"@opengeni/network": "^0.2.3-canary.6",
|
|
59
|
+
"@opengeni/observability": "^0.8.14-canary.1",
|
|
60
|
+
"@opengeni/runtime": "^2.0.1-canary.1",
|
|
61
|
+
"@opengeni/storage": "^0.2.115-canary.1",
|
|
62
|
+
"@opengeni/xai-subscription": "^0.1.2-canary.6",
|
|
63
63
|
"@temporalio/client": "^1.17.0",
|
|
64
64
|
"better-auth": "^1.6.14",
|
|
65
65
|
"hono": "^4.12.18",
|