@opengeni/core 5.0.0 → 5.0.1-canary.36919050519001
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/access/index.d.ts +3 -1
- package/dist/application/archived-session-imports.d.ts +6 -0
- package/dist/application/session-commands.d.ts +3 -0
- package/dist/billing/limits.d.ts +2 -0
- package/dist/{chunk-2JXLQTMR.js → chunk-2MKMRGSY.js} +8 -2
- package/dist/chunk-2MKMRGSY.js.map +1 -0
- package/dist/{chunk-ZYCNLYGH.js → chunk-GVO3N37G.js} +178 -12
- package/dist/chunk-GVO3N37G.js.map +1 -0
- package/dist/{chunk-VCZFFEPB.js → chunk-LCQXNR62.js} +16 -2
- package/dist/chunk-LCQXNR62.js.map +1 -0
- package/dist/codex-model-availability.d.ts +14 -0
- package/dist/default-session-model.d.ts +19 -2
- package/dist/domain/agent-config-resolution.d.ts +64 -0
- package/dist/domain/editable-artifacts/ports.d.ts +10 -0
- package/dist/domain/editable-artifacts/service.d.ts +3 -1
- package/dist/domain/knowledge-messages.d.ts +2 -2
- package/dist/domain/organization-integration-catalog.d.ts +2 -2
- package/dist/domain/pr-review.d.ts +42 -0
- package/dist/domain/session-connection-accounts.d.ts +16 -0
- package/dist/domain/session-tool-policy.d.ts +78 -3
- package/dist/domain/sessions.d.ts +41 -1
- package/dist/editable-artifact-live/application.d.ts +2 -1
- package/dist/editable-artifact-live/server.d.ts +5 -1
- package/dist/editable-artifact-live/ticket.d.ts +2 -1
- package/dist/editable-artifact-live/types.d.ts +9 -0
- package/dist/editable-artifact-live.js +2 -2
- package/dist/editable-artifacts.js +2 -2
- package/dist/index.d.ts +4 -0
- package/dist/index.js +7734 -6515
- package/dist/index.js.map +1 -1
- package/dist/model-catalog.d.ts +7 -0
- package/package.json +12 -12
- package/src/access/index.ts +32 -2
- package/src/application/archived-session-imports.ts +161 -0
- package/src/application/session-commands.ts +59 -0
- package/src/application/session-tenancy.ts +9 -0
- package/src/billing/limits.ts +18 -3
- package/src/codex-model-availability.ts +136 -0
- package/src/default-session-model.ts +93 -8
- package/src/domain/agent-config-resolution.ts +193 -0
- package/src/domain/connector-tool-permissions.ts +8 -0
- package/src/domain/editable-artifacts/in-memory.ts +6 -0
- package/src/domain/editable-artifacts/ports.ts +11 -0
- package/src/domain/editable-artifacts/service.ts +20 -0
- package/src/domain/knowledge-search.test.ts +199 -9
- package/src/domain/knowledge-search.ts +53 -1
- package/src/domain/organization-integration-catalog.ts +8 -3
- package/src/domain/session-connection-accounts.ts +67 -0
- package/src/domain/session-tool-policy.ts +379 -8
- package/src/domain/sessions.ts +591 -33
- package/src/editable-artifact-live/application.ts +8 -1
- package/src/editable-artifact-live/server.ts +154 -6
- package/src/editable-artifact-live/ticket.ts +86 -1
- package/src/editable-artifact-live/types.ts +10 -0
- package/src/index.ts +4 -0
- package/src/model-catalog.ts +17 -0
- package/src/sandbox/routing.ts +6 -2
- package/dist/chunk-2JXLQTMR.js.map +0 -1
- package/dist/chunk-VCZFFEPB.js.map +0 -1
- package/dist/chunk-ZYCNLYGH.js.map +0 -1
package/dist/access/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Settings } from "@opengeni/config";
|
|
2
2
|
import { ExternalActorAttribution, type ExternalActorContinuation } from "@opengeni/contracts/external-identities";
|
|
3
|
-
import { type AccountGrant, type AccessContext, type AccessGrant, Permission, type Workspace } from "@opengeni/contracts";
|
|
3
|
+
import { type AccountGrant, type AccessContext, type AccessGrant, type OrganizationApiKeyAccess, Permission, type Workspace } from "@opengeni/contracts";
|
|
4
4
|
import { type Database } from "@opengeni/db";
|
|
5
5
|
import type { Context } from "hono";
|
|
6
6
|
import type { ManagedAuth } from "../managed-auth-type.js";
|
|
@@ -24,6 +24,8 @@ export type AccountScopedApiKeyWorkspaceAuthority = Readonly<{
|
|
|
24
24
|
* shape alone is deliberately insufficient.
|
|
25
25
|
*/
|
|
26
26
|
export declare function accountScopedApiKeyWorkspaceAuthority(context: AccessContext): AccountScopedApiKeyWorkspaceAuthority | null;
|
|
27
|
+
/** The organization access tier is derived from the stored workspace-admin wildcard. */
|
|
28
|
+
export declare function organizationApiKeyAccess(permissions: Permission[]): OrganizationApiKeyAccess;
|
|
27
29
|
/**
|
|
28
30
|
* Opaque, request-local proof that the canonical access resolver authorized the
|
|
29
31
|
* exact account administrator named by the stamp. The random id is audit and
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AppendArchivedSessionEventsResponse, ImportArchivedSessionResponse } from "@opengeni/contracts";
|
|
2
|
+
import { type AccessGrantAuthorization } from "../access/index.js";
|
|
3
|
+
import type { ApiRouteDeps } from "../dependencies.js";
|
|
4
|
+
export { ArchivedSessionImportError } from "@opengeni/db";
|
|
5
|
+
export declare function importArchivedSessionForRequest(deps: ApiRouteDeps, authorization: AccessGrantAuthorization, workspaceId: string, rawPayload: unknown): Promise<ImportArchivedSessionResponse>;
|
|
6
|
+
export declare function appendArchivedSessionEventsForRequest(deps: ApiRouteDeps, authorization: AccessGrantAuthorization, workspaceId: string, importId: string, rawPayload: unknown): Promise<AppendArchivedSessionEventsResponse>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ComposerDraft, DeleteSessionQueueItemRequest, EditSessionQueueItemRequest, MoveSessionQueueItemRequest, SaveComposerDraftRequest, SessionAuthorizationPort, SessionAuthorizationSurface, SessionControlRequest, SessionControlResponse, SessionQueueMutationResponse, SteerSessionQueueItemRequest, WorkspaceInferenceControlRequest, WorkspaceInferenceControlResponse } from "@opengeni/contracts";
|
|
2
|
+
import type { Settings } from "@opengeni/config";
|
|
2
3
|
import { type Database, type SessionCommandReceiptRow } from "@opengeni/db";
|
|
3
4
|
import { type EventBus } from "@opengeni/events";
|
|
4
5
|
import type { SessionWorkflowClient } from "../dependencies.js";
|
|
@@ -37,6 +38,7 @@ type SessionCommandPostCommitDeps = {
|
|
|
37
38
|
};
|
|
38
39
|
export declare function sendAgentSessionMessage(deps: {
|
|
39
40
|
db: Database;
|
|
41
|
+
settings?: Settings;
|
|
40
42
|
bus: EventBus;
|
|
41
43
|
workflowClient: Pick<SessionWorkflowClient, "wakeSessionWorkflow">;
|
|
42
44
|
sessionAuthorization?: SessionAuthorizationPort | null;
|
|
@@ -47,6 +49,7 @@ export declare function sendAgentSessionMessage(deps: {
|
|
|
47
49
|
}): Promise<import("@opengeni/db").AgentInternalUpdateCommandResult>;
|
|
48
50
|
export declare function steerAgentSession(deps: {
|
|
49
51
|
db: Database;
|
|
52
|
+
settings?: Settings;
|
|
50
53
|
bus: EventBus;
|
|
51
54
|
workflowClient: Pick<SessionWorkflowClient, "wakeSessionWorkflow">;
|
|
52
55
|
sessionAuthorization?: SessionAuthorizationPort | null;
|
package/dist/billing/limits.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ export declare function documentEmbeddingCostMicros(settings: Settings, inputByt
|
|
|
9
9
|
export type LimitCheckInput = {
|
|
10
10
|
accountId: string;
|
|
11
11
|
workspaceId?: string;
|
|
12
|
+
/** Frozen causal human, never the API key or service admitting the work. */
|
|
13
|
+
initiatingHumanSubjectId?: string | null;
|
|
12
14
|
action: LimitAction;
|
|
13
15
|
quantity?: number;
|
|
14
16
|
model?: string | null;
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
editableArtifactSnapshotId,
|
|
26
26
|
editableArtifactStateHash,
|
|
27
27
|
validateEditableArtifactActor
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-LCQXNR62.js";
|
|
29
29
|
|
|
30
30
|
// src/domain/editable-artifacts/durable-export.ts
|
|
31
31
|
import { createHash } from "crypto";
|
|
@@ -1288,6 +1288,9 @@ var InMemoryEditableArtifactStore = class {
|
|
|
1288
1288
|
});
|
|
1289
1289
|
}
|
|
1290
1290
|
async readTransactionBasis(scope, artifactId, request) {
|
|
1291
|
+
if (request.authorizeCommit) {
|
|
1292
|
+
throw new TypeError("Transactional artifact authority requires a PostgreSQL store");
|
|
1293
|
+
}
|
|
1291
1294
|
const normalizedScope = editableArtifactScope(scope);
|
|
1292
1295
|
const normalizedArtifactId = editableArtifactId(artifactId);
|
|
1293
1296
|
const key = aggregateKey(normalizedScope, normalizedArtifactId);
|
|
@@ -1337,6 +1340,9 @@ var InMemoryEditableArtifactStore = class {
|
|
|
1337
1340
|
});
|
|
1338
1341
|
}
|
|
1339
1342
|
async tryCommitAppliedTransaction(request) {
|
|
1343
|
+
if (request.authorizeCommit) {
|
|
1344
|
+
throw new TypeError("Transactional artifact authority requires a PostgreSQL store");
|
|
1345
|
+
}
|
|
1340
1346
|
const scope = editableArtifactScope(request.scope);
|
|
1341
1347
|
const artifactId = editableArtifactId(request.artifactId);
|
|
1342
1348
|
const key = aggregateKey(scope, artifactId);
|
|
@@ -2455,4 +2461,4 @@ export {
|
|
|
2455
2461
|
EditableArtifactGenesisPipeline,
|
|
2456
2462
|
editableArtifactMaterializationKey
|
|
2457
2463
|
};
|
|
2458
|
-
//# sourceMappingURL=chunk-
|
|
2464
|
+
//# sourceMappingURL=chunk-2MKMRGSY.js.map
|