@opengeni/core 0.28.1 → 1.0.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/README.md +1 -1
- package/dist/access/external-actor-authority.d.ts +47 -0
- package/dist/access/index.d.ts +182 -3
- package/dist/access/service-initiator.d.ts +3 -0
- package/dist/application/api-integration-servers.d.ts +20 -0
- package/dist/application/archived-session-imports.d.ts +6 -0
- package/dist/application/composer-submit.d.ts +24 -0
- package/dist/application/connect-authority.d.ts +13 -0
- package/dist/application/connect-operation.d.ts +31 -0
- package/dist/application/external-continuation.d.ts +15 -0
- package/dist/application/external-identity-lifecycle.d.ts +20 -0
- package/dist/application/external-link-work-admission.d.ts +12 -0
- package/dist/application/external-workspace-members.d.ts +34 -0
- package/dist/application/modal-native-worker-host-transport.d.ts +297 -0
- package/dist/application/new-session-drafts.d.ts +39 -2
- package/dist/application/sandbox-recovery.d.ts +58 -0
- package/dist/application/session-commands.d.ts +26 -13
- package/dist/application/session-mcp-credential-rotation.d.ts +29 -0
- package/dist/application/session-tenancy.d.ts +19 -0
- package/dist/application/user-resource-grants.d.ts +20 -0
- package/dist/billing/limits.d.ts +11 -0
- package/dist/canonical-human-identities.d.ts +7 -2
- package/dist/canonical-human-identities.js +17 -4
- package/dist/canonical-human-identities.js.map +1 -1
- package/dist/{chunk-6WKPWE5S.js → chunk-2MKMRGSY.js} +108 -24
- package/dist/chunk-2MKMRGSY.js.map +1 -0
- package/dist/{chunk-NYPMQ7NO.js → chunk-GVO3N37G.js} +205 -37
- package/dist/chunk-GVO3N37G.js.map +1 -0
- package/dist/{chunk-JJU6I5XD.js → chunk-LCQXNR62.js} +36 -10
- package/dist/chunk-LCQXNR62.js.map +1 -0
- package/dist/chunk-MM6N7CTO.js +387 -0
- package/dist/chunk-MM6N7CTO.js.map +1 -0
- package/dist/chunk-QO5GVFFO.js +235 -0
- package/dist/chunk-QO5GVFFO.js.map +1 -0
- package/dist/codex-model-availability.d.ts +14 -0
- package/dist/default-session-model.d.ts +139 -0
- package/dist/dependencies.d.ts +87 -4
- package/dist/developer-setup-credential-ceiling.d.ts +10 -0
- package/dist/domain/agent-config-resolution.d.ts +49 -0
- package/dist/domain/automations.d.ts +58 -0
- package/dist/domain/capabilities.d.ts +22 -4
- package/dist/domain/company-profile-agent-admin.d.ts +25 -0
- package/dist/domain/connection-account-selection-error.d.ts +8 -0
- package/dist/domain/connector-tool-permissions.d.ts +36 -0
- package/dist/domain/direct-model-provider.d.ts +3 -0
- package/dist/domain/editable-artifacts/agent-application.d.ts +10 -1
- package/dist/domain/editable-artifacts/durable-export.d.ts +22 -1
- package/dist/domain/editable-artifacts/ports.d.ts +10 -0
- package/dist/domain/editable-artifacts/service.d.ts +4 -3
- package/dist/domain/environments.d.ts +5 -9
- package/dist/domain/external-creation-attribution.d.ts +6 -0
- package/dist/domain/file-owner.d.ts +8 -0
- package/dist/domain/github-action-policies.d.ts +36 -0
- package/dist/domain/github-repository-bindings.d.ts +117 -0
- package/dist/domain/github-skill-source.d.ts +5 -0
- package/dist/domain/governed-learning-slack-publication.d.ts +45 -0
- package/dist/domain/insights-timing.d.ts +16 -0
- package/dist/domain/insights-usage.d.ts +27 -0
- package/dist/domain/insights.d.ts +28 -1
- package/dist/domain/knowledge-files.d.ts +20 -0
- package/dist/domain/knowledge-messages.d.ts +39 -0
- package/dist/domain/knowledge-messages.test.d.ts +1 -0
- package/dist/domain/knowledge-preparation.d.ts +10 -0
- package/dist/domain/knowledge-preparation.test.d.ts +1 -0
- package/dist/domain/knowledge-search.d.ts +15 -0
- package/dist/domain/knowledge-search.test.d.ts +1 -0
- package/dist/domain/knowledge.d.ts +9 -0
- package/dist/domain/mcp-account-bindings.d.ts +19 -0
- package/dist/domain/mcp-account-routes.d.ts +21 -0
- package/dist/domain/native-mcp-connection-admission.d.ts +3 -0
- package/dist/domain/organization-integration-catalog.d.ts +15 -0
- package/dist/domain/organization-membership-lifecycle.d.ts +1 -0
- package/dist/domain/personal-connection-delegations.d.ts +87 -4
- package/dist/domain/pr-review.d.ts +249 -0
- package/dist/domain/resources.d.ts +24 -3
- package/dist/domain/scheduled-task-access.d.ts +247 -0
- package/dist/domain/scheduled-tasks.d.ts +103 -6
- package/dist/domain/session-connection-accounts.d.ts +16 -0
- package/dist/domain/session-file-access.d.ts +4 -0
- package/dist/domain/session-native-connection-replacement.d.ts +14 -0
- package/dist/domain/session-start-timing.d.ts +7 -0
- package/dist/domain/session-tool-policy.d.ts +93 -4
- package/dist/domain/sessions.d.ts +275 -28
- package/dist/domain/skill-imports.d.ts +1 -0
- package/dist/domain/skill-search.d.ts +30 -0
- package/dist/domain/skills.d.ts +117 -0
- package/dist/domain/slack-bot.d.ts +46 -1
- package/dist/domain/workspace-members.d.ts +8 -1
- package/dist/editable-artifact-live/application.d.ts +12 -3
- package/dist/editable-artifact-live/ports.d.ts +0 -1
- package/dist/editable-artifact-live/server.d.ts +5 -2
- package/dist/editable-artifact-live/ticket.d.ts +2 -2
- package/dist/editable-artifact-live/types.d.ts +14 -2
- package/dist/editable-artifact-live.js +2 -2
- package/dist/editable-artifacts.js +10 -4
- package/dist/index.d.ts +49 -3
- package/dist/index.js +18812 -6833
- package/dist/index.js.map +1 -1
- package/dist/managed-auth-session-sets.d.ts +131 -0
- package/dist/managed-auth-session-sets.js +51 -0
- package/dist/managed-auth-session-sets.js.map +1 -0
- package/dist/managed-session.d.ts +98 -11
- package/dist/model-catalog.d.ts +117 -0
- package/dist/product-usage-metrics.d.ts +30 -0
- package/dist/rigs/index.d.ts +22 -5
- package/dist/rigs/provider-images.d.ts +1 -1
- package/dist/sandbox/fleet.d.ts +59 -10
- package/dist/sandbox/routing.d.ts +22 -2
- package/dist/sandbox/runtime-settings.d.ts +56 -0
- package/dist/session-authorization.d.ts +38 -1
- package/dist/site-session-origin.d.ts +9 -0
- package/dist/transcription.d.ts +12 -1
- package/dist/turn-surface.d.ts +18 -0
- package/dist/user-presence.d.ts +32 -0
- package/package.json +18 -11
- package/src/access/external-actor-authority.ts +94 -0
- package/src/access/index.ts +1386 -44
- package/src/access/service-initiator.ts +50 -0
- package/src/application/api-integration-servers.ts +215 -0
- package/src/application/archived-session-imports.ts +161 -0
- package/src/application/composer-submit.ts +77 -0
- package/src/application/connect-authority.ts +77 -0
- package/src/application/connect-operation.ts +80 -0
- package/src/application/external-continuation.ts +129 -0
- package/src/application/external-identity-lifecycle.ts +48 -0
- package/src/application/external-link-work-admission.ts +90 -0
- package/src/application/external-workspace-members.ts +232 -0
- package/src/application/modal-native-worker-host-transport.ts +263 -0
- package/src/application/new-session-drafts.ts +222 -29
- package/src/application/sandbox-recovery.ts +78 -0
- package/src/application/session-commands.ts +430 -73
- package/src/application/session-mcp-credential-rotation.ts +217 -0
- package/src/application/session-tenancy.ts +445 -0
- package/src/application/user-resource-grants.ts +154 -0
- package/src/billing/limits.ts +103 -24
- package/src/canonical-human-identities.ts +22 -3
- package/src/codex-model-availability.ts +136 -0
- package/src/default-session-model.ts +656 -0
- package/src/dependencies.ts +97 -5
- package/src/developer-setup-credential-ceiling.ts +60 -0
- package/src/domain/agent-config-resolution.ts +148 -0
- package/src/domain/automations.ts +270 -0
- package/src/domain/capabilities.ts +244 -151
- package/src/domain/company-profile-agent-admin.ts +56 -0
- package/src/domain/connection-account-selection-error.ts +19 -0
- package/src/domain/connector-tool-permissions.ts +371 -0
- package/src/domain/direct-model-provider.ts +62 -0
- package/src/domain/editable-artifacts/agent-application.ts +61 -15
- package/src/domain/editable-artifacts/durable-export.ts +100 -5
- 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 +32 -1
- package/src/domain/editable-artifacts/snapshot-compaction.ts +9 -5
- package/src/domain/editable-artifacts/snapshot-verifier-genesis.ts +10 -8
- package/src/domain/editable-artifacts/snapshot-verifier.ts +10 -3
- package/src/domain/environments.ts +25 -45
- package/src/domain/external-creation-attribution.ts +22 -0
- package/src/domain/file-owner.ts +67 -0
- package/src/domain/github-action-policies.ts +169 -0
- package/src/domain/github-repository-bindings.ts +295 -0
- package/src/domain/github-skill-source.ts +233 -0
- package/src/domain/governed-learning-slack-publication.ts +157 -0
- package/src/domain/insights-timing.ts +95 -0
- package/src/domain/insights-usage.ts +67 -0
- package/src/domain/insights.ts +270 -169
- package/src/domain/knowledge-files.ts +46 -0
- package/src/domain/knowledge-messages.test.ts +91 -0
- package/src/domain/knowledge-messages.ts +106 -0
- package/src/domain/knowledge-preparation.test.ts +276 -0
- package/src/domain/knowledge-preparation.ts +147 -0
- package/src/domain/knowledge-search.test.ts +561 -0
- package/src/domain/knowledge-search.ts +256 -0
- package/src/domain/knowledge.ts +133 -0
- package/src/domain/mcp-account-bindings.ts +171 -0
- package/src/domain/mcp-account-routes.ts +121 -0
- package/src/domain/native-mcp-connection-admission.ts +14 -0
- package/src/domain/organization-integration-catalog.ts +88 -0
- package/src/domain/organization-membership-lifecycle.ts +10 -0
- package/src/domain/personal-connection-delegations.ts +758 -115
- package/src/domain/pr-review.ts +687 -0
- package/src/domain/resources.ts +182 -25
- package/src/domain/scheduled-task-access.ts +1052 -0
- package/src/domain/scheduled-tasks.ts +1952 -215
- package/src/domain/session-connection-accounts.ts +67 -0
- package/src/domain/session-file-access.ts +47 -0
- package/src/domain/session-native-connection-replacement.ts +64 -0
- package/src/domain/session-start-timing.ts +55 -0
- package/src/domain/session-tool-policy.ts +443 -19
- package/src/domain/sessions.ts +3417 -619
- package/src/domain/skill-imports.ts +137 -17
- package/src/domain/skill-search.ts +221 -0
- package/src/domain/skills.ts +104 -0
- package/src/domain/slack-bot.ts +128 -3
- package/src/domain/workspace-members.ts +34 -2
- package/src/editable-artifact-live/application.ts +29 -4
- package/src/editable-artifact-live/ports.ts +0 -1
- package/src/editable-artifact-live/server.ts +167 -13
- package/src/editable-artifact-live/ticket.ts +87 -6
- package/src/editable-artifact-live/types.ts +16 -2
- package/src/editable-artifact-live/wire.ts +0 -10
- package/src/index.ts +69 -4
- package/src/managed-auth-session-sets.ts +371 -0
- package/src/managed-session.ts +520 -2
- package/src/model-catalog.ts +873 -0
- package/src/product-usage-metrics.ts +101 -0
- package/src/rigs/index.ts +179 -63
- package/src/rigs/provider-images.ts +2 -3
- package/src/sandbox/fleet.ts +471 -59
- package/src/sandbox/routing.ts +160 -33
- package/src/sandbox/runtime-settings.ts +281 -0
- package/src/session-authorization.ts +262 -78
- package/src/site-session-origin.ts +22 -0
- package/src/transcription.ts +13 -1
- package/src/turn-surface.ts +45 -0
- package/src/user-presence.ts +134 -0
- package/dist/chunk-6WKPWE5S.js.map +0 -1
- package/dist/chunk-IBOEYG6N.js +0 -34
- package/dist/chunk-IBOEYG6N.js.map +0 -1
- package/dist/chunk-JJU6I5XD.js.map +0 -1
- package/dist/chunk-NYPMQ7NO.js.map +0 -1
- package/dist/domain/durable-learning-slack-publication.d.ts +0 -72
- package/dist/domain/packs.d.ts +0 -55
- package/src/domain/durable-learning-slack-publication.ts +0 -202
- package/src/domain/packs.ts +0 -556
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { AccessGrant } from "@opengeni/contracts";
|
|
2
|
+
import { ExternalActorContinuation } from "@opengeni/contracts/external-identities";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { deflateRawSync, inflateRawSync } from "node:zlib";
|
|
1
5
|
import type { EditableArtifactAuthorizationPort } from "../domain/editable-artifacts/ports";
|
|
2
6
|
import {
|
|
3
7
|
assertIsoTimestamp,
|
|
@@ -19,11 +23,22 @@ import {
|
|
|
19
23
|
EDITABLE_ARTIFACT_LIVE_PROTOCOL_VERSION,
|
|
20
24
|
type EditableArtifactLiveTicket,
|
|
21
25
|
type EditableArtifactLiveTicketRecord,
|
|
26
|
+
type EditableArtifactLiveSourceSessionAuthority,
|
|
22
27
|
} from "./types";
|
|
23
28
|
|
|
24
29
|
const DEFAULT_TTL_MS = 30_000;
|
|
25
30
|
const MAX_TTL_MS = 60_000;
|
|
26
31
|
const MAX_TOKEN_BYTES = 4_096;
|
|
32
|
+
const SOURCE_AUTHORITY_MARKER = ".ogs1.";
|
|
33
|
+
const COMPRESSED_SOURCE_AUTHORITY_MARKER = ".ogs2.";
|
|
34
|
+
const MAX_SOURCE_AUTHORITY_BYTES = 16 * 1024;
|
|
35
|
+
const SourceSessionAuthority = z
|
|
36
|
+
.object({
|
|
37
|
+
sessionId: z.string().uuid(),
|
|
38
|
+
grant: AccessGrant,
|
|
39
|
+
externalContinuation: ExternalActorContinuation.optional(),
|
|
40
|
+
})
|
|
41
|
+
.strict();
|
|
27
42
|
|
|
28
43
|
export type EditableArtifactLiveTicketAuthorityDependencies = Readonly<{
|
|
29
44
|
authorization: EditableArtifactAuthorizationPort;
|
|
@@ -31,7 +46,6 @@ export type EditableArtifactLiveTicketAuthorityDependencies = Readonly<{
|
|
|
31
46
|
tokens: EditableArtifactLiveTokenPort;
|
|
32
47
|
clock: EditableArtifactLiveClockPort;
|
|
33
48
|
ttlMs?: number;
|
|
34
|
-
protocolVersion?: number;
|
|
35
49
|
}>;
|
|
36
50
|
|
|
37
51
|
export class EditableArtifactLiveTicketAuthority {
|
|
@@ -43,10 +57,7 @@ export class EditableArtifactLiveTicketAuthority {
|
|
|
43
57
|
if (!Number.isSafeInteger(this.ttlMs) || this.ttlMs < 1_000 || this.ttlMs > MAX_TTL_MS) {
|
|
44
58
|
throw new TypeError(`ticket ttl must be 1000-${MAX_TTL_MS} milliseconds`);
|
|
45
59
|
}
|
|
46
|
-
this.protocolVersion =
|
|
47
|
-
if (!Number.isSafeInteger(this.protocolVersion) || this.protocolVersion < 1) {
|
|
48
|
-
throw new TypeError("protocol version must be a positive safe integer");
|
|
49
|
-
}
|
|
60
|
+
this.protocolVersion = EDITABLE_ARTIFACT_LIVE_PROTOCOL_VERSION;
|
|
50
61
|
}
|
|
51
62
|
|
|
52
63
|
async mint(
|
|
@@ -56,6 +67,7 @@ export class EditableArtifactLiveTicketAuthority {
|
|
|
56
67
|
modality: EditableArtifactModality;
|
|
57
68
|
actor: EditableArtifactActor;
|
|
58
69
|
allowEdit: boolean;
|
|
70
|
+
sourceSessionAuthority?: EditableArtifactLiveSourceSessionAuthority;
|
|
59
71
|
}>,
|
|
60
72
|
): Promise<EditableArtifactLiveTicket> {
|
|
61
73
|
const scope = editableArtifactScope(input.scope);
|
|
@@ -78,7 +90,28 @@ export class EditableArtifactLiveTicketAuthority {
|
|
|
78
90
|
"Editable artifact read permission denied",
|
|
79
91
|
);
|
|
80
92
|
}
|
|
81
|
-
const
|
|
93
|
+
const sourceSessionAuthority = input.sourceSessionAuthority
|
|
94
|
+
? SourceSessionAuthority.parse(input.sourceSessionAuthority)
|
|
95
|
+
: undefined;
|
|
96
|
+
if (sourceSessionAuthority) {
|
|
97
|
+
assertSourceSessionAuthority(sourceSessionAuthority, scope, actor);
|
|
98
|
+
}
|
|
99
|
+
const sourceBytes = sourceSessionAuthority
|
|
100
|
+
? Buffer.from(JSON.stringify(sourceSessionAuthority))
|
|
101
|
+
: null;
|
|
102
|
+
if (sourceBytes && sourceBytes.byteLength > MAX_SOURCE_AUTHORITY_BYTES) {
|
|
103
|
+
throw new EditableArtifactLiveError(
|
|
104
|
+
"invalid_ticket",
|
|
105
|
+
"Live ticket source authority is too large",
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
const nonce = this.dependencies.tokens.randomOpaqueToken();
|
|
109
|
+
// The execute-only PG store persists the digest of this COMPLETE token.
|
|
110
|
+
// Changing/removing the suffix cannot consume its record. Decode only after
|
|
111
|
+
// atomic consume authenticates it, keeping the existing fixed SQL DTO intact.
|
|
112
|
+
const token = sourceBytes
|
|
113
|
+
? `${nonce}${COMPRESSED_SOURCE_AUTHORITY_MARKER}${deflateRawSync(sourceBytes).toString("base64url")}`
|
|
114
|
+
: nonce;
|
|
82
115
|
assertToken(token);
|
|
83
116
|
const tokenDigest = await this.dependencies.tokens.digestOpaqueToken(token);
|
|
84
117
|
assertDigest(tokenDigest);
|
|
@@ -128,6 +161,10 @@ export class EditableArtifactLiveTicketAuthority {
|
|
|
128
161
|
);
|
|
129
162
|
}
|
|
130
163
|
validateTicketRecord(record);
|
|
164
|
+
const sourceSessionAuthority = decodeSourceSessionAuthority(input.token);
|
|
165
|
+
if (sourceSessionAuthority) {
|
|
166
|
+
assertSourceSessionAuthority(sourceSessionAuthority, record.scope, record.actor);
|
|
167
|
+
}
|
|
131
168
|
if (Date.parse(record.expiresAt) <= this.dependencies.clock.now().getTime()) {
|
|
132
169
|
throw new EditableArtifactLiveError("ticket_expired", "Live ticket has expired", {
|
|
133
170
|
retryable: true,
|
|
@@ -149,6 +186,7 @@ export class EditableArtifactLiveTicketAuthority {
|
|
|
149
186
|
...record,
|
|
150
187
|
scope: editableArtifactScope(record.scope),
|
|
151
188
|
actor: Object.freeze({ ...record.actor }) as EditableArtifactActor,
|
|
189
|
+
...(sourceSessionAuthority ? { sourceSessionAuthority } : {}),
|
|
152
190
|
});
|
|
153
191
|
}
|
|
154
192
|
}
|
|
@@ -198,6 +236,49 @@ function validateTicketRecord(record: EditableArtifactLiveTicketRecord): void {
|
|
|
198
236
|
assertIsoTimestamp(record.expiresAt, "ticket expiresAt");
|
|
199
237
|
}
|
|
200
238
|
|
|
239
|
+
function decodeSourceSessionAuthority(
|
|
240
|
+
token: string,
|
|
241
|
+
): EditableArtifactLiveSourceSessionAuthority | undefined {
|
|
242
|
+
const compressed = token.includes(COMPRESSED_SOURCE_AUTHORITY_MARKER);
|
|
243
|
+
const marker = compressed ? COMPRESSED_SOURCE_AUTHORITY_MARKER : SOURCE_AUTHORITY_MARKER;
|
|
244
|
+
const separator = token.lastIndexOf(marker);
|
|
245
|
+
if (separator === -1) return undefined;
|
|
246
|
+
try {
|
|
247
|
+
return SourceSessionAuthority.parse(
|
|
248
|
+
JSON.parse(
|
|
249
|
+
(compressed
|
|
250
|
+
? inflateRawSync(Buffer.from(token.slice(separator + marker.length), "base64url"), {
|
|
251
|
+
maxOutputLength: MAX_SOURCE_AUTHORITY_BYTES,
|
|
252
|
+
})
|
|
253
|
+
: Buffer.from(token.slice(separator + marker.length), "base64url")
|
|
254
|
+
).toString("utf8"),
|
|
255
|
+
),
|
|
256
|
+
);
|
|
257
|
+
} catch {
|
|
258
|
+
throw new EditableArtifactLiveError(
|
|
259
|
+
"invalid_ticket",
|
|
260
|
+
"Live ticket source authority is invalid",
|
|
261
|
+
);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
function assertSourceSessionAuthority(
|
|
266
|
+
authority: EditableArtifactLiveSourceSessionAuthority,
|
|
267
|
+
scope: EditableArtifactScope,
|
|
268
|
+
actor: EditableArtifactActor,
|
|
269
|
+
): void {
|
|
270
|
+
if (
|
|
271
|
+
authority.grant.accountId !== scope.accountId ||
|
|
272
|
+
authority.grant.workspaceId !== scope.workspaceId ||
|
|
273
|
+
authority.grant.subjectId !== actor.subjectId
|
|
274
|
+
) {
|
|
275
|
+
throw new EditableArtifactLiveError(
|
|
276
|
+
"invalid_ticket",
|
|
277
|
+
"Live ticket source scope does not match",
|
|
278
|
+
);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
201
282
|
function assertModality(value: EditableArtifactModality): EditableArtifactModality {
|
|
202
283
|
if (value !== "document" && value !== "spreadsheet" && value !== "presentation") {
|
|
203
284
|
throw new TypeError("ticket modality is invalid");
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { EDITABLE_ARTIFACT_LIVE_WIRE_VERSION } from "@opengeni/contracts/editable-artifact-live";
|
|
2
|
+
import type { AccessGrant } from "@opengeni/contracts";
|
|
3
|
+
import type { ExternalActorContinuation } from "@opengeni/contracts/external-identities";
|
|
1
4
|
import type {
|
|
2
5
|
EditableArtifactActor,
|
|
3
6
|
EditableArtifactCausalFrontier,
|
|
@@ -11,7 +14,14 @@ import type {
|
|
|
11
14
|
EditableArtifactTransactionId,
|
|
12
15
|
} from "../domain/editable-artifacts/types";
|
|
13
16
|
|
|
14
|
-
export const EDITABLE_ARTIFACT_LIVE_PROTOCOL_VERSION =
|
|
17
|
+
export const EDITABLE_ARTIFACT_LIVE_PROTOCOL_VERSION = EDITABLE_ARTIFACT_LIVE_WIRE_VERSION;
|
|
18
|
+
|
|
19
|
+
/** Authenticated by the digest of the complete one-use token, never client claims. */
|
|
20
|
+
export type EditableArtifactLiveSourceSessionAuthority = Readonly<{
|
|
21
|
+
sessionId: string;
|
|
22
|
+
grant: AccessGrant;
|
|
23
|
+
externalContinuation?: ExternalActorContinuation | undefined;
|
|
24
|
+
}>;
|
|
15
25
|
|
|
16
26
|
export type EditableArtifactLiveTicket = Readonly<{
|
|
17
27
|
artifactId: EditableArtifactId;
|
|
@@ -29,6 +39,7 @@ export type EditableArtifactLiveTicketRecord = Readonly<{
|
|
|
29
39
|
artifactId: EditableArtifactId;
|
|
30
40
|
modality: EditableArtifactModality;
|
|
31
41
|
actor: EditableArtifactActor;
|
|
42
|
+
sourceSessionAuthority?: EditableArtifactLiveSourceSessionAuthority;
|
|
32
43
|
/** Delegated ceiling captured by the authenticated ticket-minting request. */
|
|
33
44
|
allowEdit: boolean;
|
|
34
45
|
protocolVersion: number;
|
|
@@ -52,6 +63,7 @@ export type EditableArtifactLiveSnapshot =
|
|
|
52
63
|
modality: "spreadsheet";
|
|
53
64
|
causalFrontier: EditableArtifactCausalFrontier;
|
|
54
65
|
operationProtocolVersion: number;
|
|
66
|
+
snapshotVersion: number;
|
|
55
67
|
}>)
|
|
56
68
|
| (EditableArtifactLiveSnapshotCommon &
|
|
57
69
|
Readonly<{
|
|
@@ -120,7 +132,7 @@ type EditableArtifactLiveResumeCommon = Readonly<{
|
|
|
120
132
|
export type EditableArtifactLiveResume =
|
|
121
133
|
| (EditableArtifactLiveResumeCommon &
|
|
122
134
|
Readonly<{
|
|
123
|
-
modality
|
|
135
|
+
modality: "spreadsheet";
|
|
124
136
|
localCausalFrontier: EditableArtifactCausalFrontier;
|
|
125
137
|
}>)
|
|
126
138
|
| (EditableArtifactLiveResumeCommon &
|
|
@@ -166,6 +178,8 @@ export type EditableArtifactLiveServerFrame =
|
|
|
166
178
|
| Readonly<{
|
|
167
179
|
modality: "spreadsheet";
|
|
168
180
|
causalFrontier: EditableArtifactCausalFrontier;
|
|
181
|
+
operationProtocolVersion: number;
|
|
182
|
+
snapshotVersion: number;
|
|
169
183
|
}>
|
|
170
184
|
| Readonly<{
|
|
171
185
|
modality: "document" | "presentation";
|
|
@@ -81,15 +81,5 @@ export function encodeEditableArtifactLiveMutationWireFrame(
|
|
|
81
81
|
export function encodeEditableArtifactLiveServerWireFrame(
|
|
82
82
|
frame: EditableArtifactLiveServerFrame,
|
|
83
83
|
): Uint8Array {
|
|
84
|
-
if (frame.type === "transaction" && frame.transaction.modality === "spreadsheet") {
|
|
85
|
-
const { operationProtocolVersion, modality: _modality, ...transaction } = frame.transaction;
|
|
86
|
-
return encodeContractServerFrame({
|
|
87
|
-
...frame,
|
|
88
|
-
transaction: {
|
|
89
|
-
...transaction,
|
|
90
|
-
protocolVersion: operationProtocolVersion,
|
|
91
|
-
},
|
|
92
|
-
} as unknown as ContractServerFrame);
|
|
93
|
-
}
|
|
94
84
|
return encodeContractServerFrame(frame as unknown as ContractServerFrame);
|
|
95
85
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
export { readSessionAttachmentFiles } from "./domain/session-file-access";
|
|
2
|
+
export { verifyDirectModelAccess } from "./domain/direct-model-provider";
|
|
3
|
+
export * from "./domain/skills";
|
|
4
|
+
export * from "./domain/mcp-account-bindings";
|
|
5
|
+
export * from "./domain/mcp-account-routes";
|
|
6
|
+
export * from "./domain/session-connection-accounts";
|
|
7
|
+
export * from "./domain/organization-integration-catalog";
|
|
8
|
+
export * from "./domain/knowledge";
|
|
9
|
+
export * from "./domain/knowledge-search";
|
|
1
10
|
// @opengeni/core — the framework-agnostic OpenGeni core.
|
|
2
11
|
//
|
|
3
12
|
// WHAT THIS PACKAGE IS: the OpenGeni domain, access, and billing layers carved
|
|
@@ -28,6 +37,8 @@
|
|
|
28
37
|
// SessionWorkflowClient, DocumentIndexClient, ObjectStorageDependency).
|
|
29
38
|
export * from "./dependencies";
|
|
30
39
|
export * from "./workflow-wake-contract";
|
|
40
|
+
export * from "./user-presence";
|
|
41
|
+
export * from "./product-usage-metrics";
|
|
31
42
|
|
|
32
43
|
// Boundary type slots referenced by dependencies.ts. The IMPLEMENTATIONS that
|
|
33
44
|
// construct these (the real sandbox client / Better Auth instance) stay in
|
|
@@ -35,52 +46,106 @@ export * from "./workflow-wake-contract";
|
|
|
35
46
|
// structural TYPES live here.
|
|
36
47
|
export * from "./sandbox-types";
|
|
37
48
|
export * from "./managed-auth-type";
|
|
38
|
-
export
|
|
49
|
+
export {
|
|
50
|
+
getManagedAuthRequestActorAbortSignal,
|
|
51
|
+
getManagedAuthRequestActorAdmissionStamp,
|
|
52
|
+
getManagedAuthRequestActorEpoch,
|
|
53
|
+
getManagedAuthRequestActorLeaseStamp,
|
|
54
|
+
getManagedSession,
|
|
55
|
+
configureManagedUserAdmission,
|
|
56
|
+
assertManagedUserAdmission,
|
|
57
|
+
ManagedAuthActorLeaseOutcomeUnknownError,
|
|
58
|
+
markManagedAuthRequestActorTransitionApplied,
|
|
59
|
+
releaseManagedAuthRequestActorLease,
|
|
60
|
+
validateManagedAuthRequestActorLease,
|
|
61
|
+
type ManagedAuthActorAdmissionStamp,
|
|
62
|
+
type ManagedAuthActorMutationLeaseStamp,
|
|
63
|
+
} from "./managed-session";
|
|
39
64
|
export * from "./transcription";
|
|
65
|
+
export * from "./model-catalog";
|
|
66
|
+
export * from "./codex-model-availability";
|
|
67
|
+
export * from "./default-session-model";
|
|
40
68
|
|
|
41
69
|
// Sandbox fleet/routing service — the closure of `domain/sessions.ts`
|
|
42
70
|
// (`swapActiveSandbox` + `FleetContext`). apps/api re-imports these for its MCP
|
|
43
71
|
// fleet tools, the machines REST route, and the rest of the sandbox layer.
|
|
44
72
|
export * from "./sandbox/fleet";
|
|
45
73
|
export * from "./sandbox/routing";
|
|
74
|
+
export * from "./sandbox/runtime-settings";
|
|
46
75
|
|
|
47
76
|
// Access layer (transport-neutral grant resolution + permission checks).
|
|
48
77
|
export * from "./access";
|
|
78
|
+
export * from "./application/external-workspace-members";
|
|
79
|
+
export * from "./application/external-identity-lifecycle";
|
|
80
|
+
export * from "./application/external-continuation";
|
|
81
|
+
export * from "./application/session-mcp-credential-rotation";
|
|
82
|
+
export * from "./application/external-link-work-admission";
|
|
83
|
+
export * from "./application/connect-authority";
|
|
84
|
+
export * from "./application/connect-operation";
|
|
49
85
|
export * from "./session-authorization";
|
|
50
86
|
|
|
51
87
|
// Billing / usage-limit admission (checkLimit / requireLimit / recordWorkspaceUsage).
|
|
52
88
|
export * from "./billing/limits";
|
|
53
89
|
|
|
54
90
|
// Domain layer — the off-HTTP V2 surface (createSessionForRequest,
|
|
55
|
-
|
|
91
|
+
|
|
56
92
|
// scheduled-task/workspace-member logic, …).
|
|
57
93
|
export * from "./domain/capabilities";
|
|
94
|
+
export * from "./domain/native-mcp-connection-admission";
|
|
58
95
|
export * from "./domain/skill-imports";
|
|
96
|
+
export * from "./domain/skill-search";
|
|
97
|
+
export * from "./domain/github-skill-source";
|
|
59
98
|
export * from "./domain/environments";
|
|
60
99
|
export * from "./rigs";
|
|
61
|
-
export * from "./domain/
|
|
100
|
+
export * from "./domain/automations";
|
|
101
|
+
export * from "./domain/pr-review";
|
|
102
|
+
|
|
62
103
|
export * from "./domain/personal-connection-delegations";
|
|
63
104
|
export * from "./domain/resources";
|
|
105
|
+
export * from "./domain/github-repository-bindings";
|
|
106
|
+
export * from "./domain/github-action-policies";
|
|
64
107
|
export * from "./domain/session-tool-policy";
|
|
108
|
+
export * from "./domain/agent-config-resolution";
|
|
65
109
|
export * from "./domain/scheduled-tasks";
|
|
110
|
+
export * from "./domain/scheduled-task-access";
|
|
66
111
|
export * from "./domain/sessions";
|
|
67
112
|
export * from "./domain/insights";
|
|
113
|
+
export * from "./domain/insights-usage";
|
|
68
114
|
export * from "./domain/memory-slack-publication";
|
|
69
115
|
export * from "./domain/memory-slack-delivery";
|
|
70
|
-
export * from "./domain/
|
|
116
|
+
export * from "./domain/governed-learning-slack-publication";
|
|
71
117
|
export * from "./domain/slack-publication-secret-safety";
|
|
72
118
|
export * from "./domain/company-profile-durable-learning-adapter";
|
|
119
|
+
export * from "./domain/company-profile-agent-admin";
|
|
73
120
|
export * from "./domain/slack-bot";
|
|
74
121
|
export * from "./domain/conversation-integrations";
|
|
75
122
|
export * from "./domain/fiken";
|
|
76
123
|
export * from "./domain/workspace-members";
|
|
77
124
|
export * from "./domain/video-generation";
|
|
78
125
|
export * from "./domain/video-generation-capabilities";
|
|
126
|
+
export * from "./domain/organization-membership-lifecycle";
|
|
79
127
|
export * from "./application/new-session-drafts";
|
|
128
|
+
export * from "./application/composer-submit";
|
|
80
129
|
export * from "./application/session-commands";
|
|
130
|
+
export * from "./application/archived-session-imports";
|
|
131
|
+
export * from "./application/session-tenancy";
|
|
132
|
+
export * from "./application/sandbox-recovery";
|
|
133
|
+
export * from "./application/user-resource-grants";
|
|
134
|
+
export * from "./application/api-integration-servers";
|
|
81
135
|
|
|
82
136
|
// Durable editable-artifact live broker, ticket, ports, and projection types.
|
|
83
137
|
export * from "./editable-artifact-live";
|
|
84
138
|
|
|
85
139
|
// Transport-neutral editable-artifact domain service, ports, and contracts.
|
|
86
140
|
export * from "./editable-artifacts";
|
|
141
|
+
export { withSiteSessionOrigin } from "./site-session-origin";
|
|
142
|
+
export { resolveTurnSurface } from "./turn-surface";
|
|
143
|
+
|
|
144
|
+
export { fileOwnerContextForAccess, fileOwnerContextForAgent } from "./domain/file-owner";
|
|
145
|
+
|
|
146
|
+
export { prepareKnowledgeFile } from "./domain/knowledge-files";
|
|
147
|
+
export { prepareKnowledgeSave } from "./domain/knowledge-preparation";
|
|
148
|
+
|
|
149
|
+
export { retainKnowledgeMessage } from "./domain/knowledge-messages";
|
|
150
|
+
|
|
151
|
+
export * from "./domain/connector-tool-permissions";
|