@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
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
import type { Settings } from "@opengeni/config";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
declare const intent: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4
|
+
protocol: z.ZodLiteral<"opengeni-modal-native-worker-host-proof">;
|
|
5
|
+
version: z.ZodLiteral<2>;
|
|
6
|
+
principalKind: z.ZodLiteral<"worker_host">;
|
|
7
|
+
purpose: z.ZodLiteral<"original-native-custody-proof">;
|
|
8
|
+
scope: z.ZodObject<{
|
|
9
|
+
version: z.ZodLiteral<2>;
|
|
10
|
+
declarationId: z.ZodString;
|
|
11
|
+
planId: z.ZodString;
|
|
12
|
+
creatorId: z.ZodString;
|
|
13
|
+
accountId: z.ZodString;
|
|
14
|
+
workspaceId: z.ZodString;
|
|
15
|
+
sessionId: z.ZodString;
|
|
16
|
+
turnId: z.ZodString;
|
|
17
|
+
attemptId: z.ZodString;
|
|
18
|
+
executionGeneration: z.ZodNumber;
|
|
19
|
+
triggerEventId: z.ZodString;
|
|
20
|
+
sandboxGroupId: z.ZodString;
|
|
21
|
+
routeKind: z.ZodLiteral<"home">;
|
|
22
|
+
routeTargetId: z.ZodNull;
|
|
23
|
+
routeEpoch: z.ZodNumber;
|
|
24
|
+
}, z.core.$strict>;
|
|
25
|
+
configurationCaptureRef: z.ZodObject<{
|
|
26
|
+
id: z.ZodString;
|
|
27
|
+
revision: z.ZodNumber;
|
|
28
|
+
}, z.core.$strict>;
|
|
29
|
+
proofGrantRef: z.ZodObject<{
|
|
30
|
+
id: z.ZodString;
|
|
31
|
+
epoch: z.ZodNumber;
|
|
32
|
+
}, z.core.$strict>;
|
|
33
|
+
requestId: z.ZodString;
|
|
34
|
+
action: z.ZodLiteral<"declare_preparation">;
|
|
35
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
36
|
+
protocol: z.ZodLiteral<"opengeni-modal-native-worker-host-proof">;
|
|
37
|
+
version: z.ZodLiteral<2>;
|
|
38
|
+
principalKind: z.ZodLiteral<"worker_host">;
|
|
39
|
+
purpose: z.ZodLiteral<"original-native-custody-proof">;
|
|
40
|
+
scope: z.ZodObject<{
|
|
41
|
+
version: z.ZodLiteral<2>;
|
|
42
|
+
declarationId: z.ZodString;
|
|
43
|
+
planId: z.ZodString;
|
|
44
|
+
creatorId: z.ZodString;
|
|
45
|
+
accountId: z.ZodString;
|
|
46
|
+
workspaceId: z.ZodString;
|
|
47
|
+
sessionId: z.ZodString;
|
|
48
|
+
turnId: z.ZodString;
|
|
49
|
+
attemptId: z.ZodString;
|
|
50
|
+
executionGeneration: z.ZodNumber;
|
|
51
|
+
triggerEventId: z.ZodString;
|
|
52
|
+
sandboxGroupId: z.ZodString;
|
|
53
|
+
routeKind: z.ZodLiteral<"home">;
|
|
54
|
+
routeTargetId: z.ZodNull;
|
|
55
|
+
routeEpoch: z.ZodNumber;
|
|
56
|
+
}, z.core.$strict>;
|
|
57
|
+
configurationCaptureRef: z.ZodObject<{
|
|
58
|
+
id: z.ZodString;
|
|
59
|
+
revision: z.ZodNumber;
|
|
60
|
+
}, z.core.$strict>;
|
|
61
|
+
proofGrantRef: z.ZodObject<{
|
|
62
|
+
id: z.ZodString;
|
|
63
|
+
epoch: z.ZodNumber;
|
|
64
|
+
}, z.core.$strict>;
|
|
65
|
+
requestId: z.ZodString;
|
|
66
|
+
action: z.ZodLiteral<"claim_namespace_read">;
|
|
67
|
+
recordRevision: z.ZodNumber;
|
|
68
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
69
|
+
protocol: z.ZodLiteral<"opengeni-modal-native-worker-host-proof">;
|
|
70
|
+
version: z.ZodLiteral<2>;
|
|
71
|
+
principalKind: z.ZodLiteral<"worker_host">;
|
|
72
|
+
purpose: z.ZodLiteral<"original-native-custody-proof">;
|
|
73
|
+
scope: z.ZodObject<{
|
|
74
|
+
version: z.ZodLiteral<2>;
|
|
75
|
+
declarationId: z.ZodString;
|
|
76
|
+
planId: z.ZodString;
|
|
77
|
+
creatorId: z.ZodString;
|
|
78
|
+
accountId: z.ZodString;
|
|
79
|
+
workspaceId: z.ZodString;
|
|
80
|
+
sessionId: z.ZodString;
|
|
81
|
+
turnId: z.ZodString;
|
|
82
|
+
attemptId: z.ZodString;
|
|
83
|
+
executionGeneration: z.ZodNumber;
|
|
84
|
+
triggerEventId: z.ZodString;
|
|
85
|
+
sandboxGroupId: z.ZodString;
|
|
86
|
+
routeKind: z.ZodLiteral<"home">;
|
|
87
|
+
routeTargetId: z.ZodNull;
|
|
88
|
+
routeEpoch: z.ZodNumber;
|
|
89
|
+
}, z.core.$strict>;
|
|
90
|
+
configurationCaptureRef: z.ZodObject<{
|
|
91
|
+
id: z.ZodString;
|
|
92
|
+
revision: z.ZodNumber;
|
|
93
|
+
}, z.core.$strict>;
|
|
94
|
+
proofGrantRef: z.ZodObject<{
|
|
95
|
+
id: z.ZodString;
|
|
96
|
+
epoch: z.ZodNumber;
|
|
97
|
+
}, z.core.$strict>;
|
|
98
|
+
requestId: z.ZodString;
|
|
99
|
+
action: z.ZodLiteral<"claim_original_command_read">;
|
|
100
|
+
recordRevision: z.ZodNumber;
|
|
101
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
102
|
+
protocol: z.ZodLiteral<"opengeni-modal-native-worker-host-proof">;
|
|
103
|
+
version: z.ZodLiteral<2>;
|
|
104
|
+
principalKind: z.ZodLiteral<"worker_host">;
|
|
105
|
+
purpose: z.ZodLiteral<"original-native-custody-proof">;
|
|
106
|
+
scope: z.ZodObject<{
|
|
107
|
+
version: z.ZodLiteral<2>;
|
|
108
|
+
declarationId: z.ZodString;
|
|
109
|
+
planId: z.ZodString;
|
|
110
|
+
creatorId: z.ZodString;
|
|
111
|
+
accountId: z.ZodString;
|
|
112
|
+
workspaceId: z.ZodString;
|
|
113
|
+
sessionId: z.ZodString;
|
|
114
|
+
turnId: z.ZodString;
|
|
115
|
+
attemptId: z.ZodString;
|
|
116
|
+
executionGeneration: z.ZodNumber;
|
|
117
|
+
triggerEventId: z.ZodString;
|
|
118
|
+
sandboxGroupId: z.ZodString;
|
|
119
|
+
routeKind: z.ZodLiteral<"home">;
|
|
120
|
+
routeTargetId: z.ZodNull;
|
|
121
|
+
routeEpoch: z.ZodNumber;
|
|
122
|
+
}, z.core.$strict>;
|
|
123
|
+
configurationCaptureRef: z.ZodObject<{
|
|
124
|
+
id: z.ZodString;
|
|
125
|
+
revision: z.ZodNumber;
|
|
126
|
+
}, z.core.$strict>;
|
|
127
|
+
proofGrantRef: z.ZodObject<{
|
|
128
|
+
id: z.ZodString;
|
|
129
|
+
epoch: z.ZodNumber;
|
|
130
|
+
}, z.core.$strict>;
|
|
131
|
+
requestId: z.ZodString;
|
|
132
|
+
action: z.ZodLiteral<"capture_namespace_binding">;
|
|
133
|
+
acquisition: z.ZodObject<{
|
|
134
|
+
claimId: z.ZodString;
|
|
135
|
+
nonce: z.ZodString;
|
|
136
|
+
claimRevision: z.ZodNumber;
|
|
137
|
+
recordRevision: z.ZodNumber;
|
|
138
|
+
captureId: z.ZodString;
|
|
139
|
+
acquisitionId: z.ZodString;
|
|
140
|
+
}, z.core.$strict>;
|
|
141
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
142
|
+
protocol: z.ZodLiteral<"opengeni-modal-native-worker-host-proof">;
|
|
143
|
+
version: z.ZodLiteral<2>;
|
|
144
|
+
principalKind: z.ZodLiteral<"worker_host">;
|
|
145
|
+
purpose: z.ZodLiteral<"original-native-custody-proof">;
|
|
146
|
+
scope: z.ZodObject<{
|
|
147
|
+
version: z.ZodLiteral<2>;
|
|
148
|
+
declarationId: z.ZodString;
|
|
149
|
+
planId: z.ZodString;
|
|
150
|
+
creatorId: z.ZodString;
|
|
151
|
+
accountId: z.ZodString;
|
|
152
|
+
workspaceId: z.ZodString;
|
|
153
|
+
sessionId: z.ZodString;
|
|
154
|
+
turnId: z.ZodString;
|
|
155
|
+
attemptId: z.ZodString;
|
|
156
|
+
executionGeneration: z.ZodNumber;
|
|
157
|
+
triggerEventId: z.ZodString;
|
|
158
|
+
sandboxGroupId: z.ZodString;
|
|
159
|
+
routeKind: z.ZodLiteral<"home">;
|
|
160
|
+
routeTargetId: z.ZodNull;
|
|
161
|
+
routeEpoch: z.ZodNumber;
|
|
162
|
+
}, z.core.$strict>;
|
|
163
|
+
configurationCaptureRef: z.ZodObject<{
|
|
164
|
+
id: z.ZodString;
|
|
165
|
+
revision: z.ZodNumber;
|
|
166
|
+
}, z.core.$strict>;
|
|
167
|
+
proofGrantRef: z.ZodObject<{
|
|
168
|
+
id: z.ZodString;
|
|
169
|
+
epoch: z.ZodNumber;
|
|
170
|
+
}, z.core.$strict>;
|
|
171
|
+
requestId: z.ZodString;
|
|
172
|
+
action: z.ZodLiteral<"capture_original_page">;
|
|
173
|
+
acquisition: z.ZodObject<{
|
|
174
|
+
claimId: z.ZodString;
|
|
175
|
+
nonce: z.ZodString;
|
|
176
|
+
claimRevision: z.ZodNumber;
|
|
177
|
+
recordRevision: z.ZodNumber;
|
|
178
|
+
captureId: z.ZodString;
|
|
179
|
+
acquisitionId: z.ZodString;
|
|
180
|
+
}, z.core.$strict>;
|
|
181
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
182
|
+
protocol: z.ZodLiteral<"opengeni-modal-native-worker-host-proof">;
|
|
183
|
+
version: z.ZodLiteral<2>;
|
|
184
|
+
principalKind: z.ZodLiteral<"worker_host">;
|
|
185
|
+
purpose: z.ZodLiteral<"original-native-custody-proof">;
|
|
186
|
+
scope: z.ZodObject<{
|
|
187
|
+
version: z.ZodLiteral<2>;
|
|
188
|
+
declarationId: z.ZodString;
|
|
189
|
+
planId: z.ZodString;
|
|
190
|
+
creatorId: z.ZodString;
|
|
191
|
+
accountId: z.ZodString;
|
|
192
|
+
workspaceId: z.ZodString;
|
|
193
|
+
sessionId: z.ZodString;
|
|
194
|
+
turnId: z.ZodString;
|
|
195
|
+
attemptId: z.ZodString;
|
|
196
|
+
executionGeneration: z.ZodNumber;
|
|
197
|
+
triggerEventId: z.ZodString;
|
|
198
|
+
sandboxGroupId: z.ZodString;
|
|
199
|
+
routeKind: z.ZodLiteral<"home">;
|
|
200
|
+
routeTargetId: z.ZodNull;
|
|
201
|
+
routeEpoch: z.ZodNumber;
|
|
202
|
+
}, z.core.$strict>;
|
|
203
|
+
configurationCaptureRef: z.ZodObject<{
|
|
204
|
+
id: z.ZodString;
|
|
205
|
+
revision: z.ZodNumber;
|
|
206
|
+
}, z.core.$strict>;
|
|
207
|
+
proofGrantRef: z.ZodObject<{
|
|
208
|
+
id: z.ZodString;
|
|
209
|
+
epoch: z.ZodNumber;
|
|
210
|
+
}, z.core.$strict>;
|
|
211
|
+
requestId: z.ZodString;
|
|
212
|
+
action: z.ZodLiteral<"reconcile_same_capture">;
|
|
213
|
+
acquisition: z.ZodObject<{
|
|
214
|
+
claimId: z.ZodString;
|
|
215
|
+
nonce: z.ZodString;
|
|
216
|
+
claimRevision: z.ZodNumber;
|
|
217
|
+
recordRevision: z.ZodNumber;
|
|
218
|
+
captureId: z.ZodString;
|
|
219
|
+
acquisitionId: z.ZodString;
|
|
220
|
+
}, z.core.$strict>;
|
|
221
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
222
|
+
protocol: z.ZodLiteral<"opengeni-modal-native-worker-host-proof">;
|
|
223
|
+
version: z.ZodLiteral<2>;
|
|
224
|
+
principalKind: z.ZodLiteral<"worker_host">;
|
|
225
|
+
purpose: z.ZodLiteral<"original-native-custody-proof">;
|
|
226
|
+
scope: z.ZodObject<{
|
|
227
|
+
version: z.ZodLiteral<2>;
|
|
228
|
+
declarationId: z.ZodString;
|
|
229
|
+
planId: z.ZodString;
|
|
230
|
+
creatorId: z.ZodString;
|
|
231
|
+
accountId: z.ZodString;
|
|
232
|
+
workspaceId: z.ZodString;
|
|
233
|
+
sessionId: z.ZodString;
|
|
234
|
+
turnId: z.ZodString;
|
|
235
|
+
attemptId: z.ZodString;
|
|
236
|
+
executionGeneration: z.ZodNumber;
|
|
237
|
+
triggerEventId: z.ZodString;
|
|
238
|
+
sandboxGroupId: z.ZodString;
|
|
239
|
+
routeKind: z.ZodLiteral<"home">;
|
|
240
|
+
routeTargetId: z.ZodNull;
|
|
241
|
+
routeEpoch: z.ZodNumber;
|
|
242
|
+
}, z.core.$strict>;
|
|
243
|
+
configurationCaptureRef: z.ZodObject<{
|
|
244
|
+
id: z.ZodString;
|
|
245
|
+
revision: z.ZodNumber;
|
|
246
|
+
}, z.core.$strict>;
|
|
247
|
+
proofGrantRef: z.ZodObject<{
|
|
248
|
+
id: z.ZodString;
|
|
249
|
+
epoch: z.ZodNumber;
|
|
250
|
+
}, z.core.$strict>;
|
|
251
|
+
requestId: z.ZodString;
|
|
252
|
+
action: z.ZodLiteral<"settle_original_acquisition">;
|
|
253
|
+
acquisition: z.ZodObject<{
|
|
254
|
+
claimId: z.ZodString;
|
|
255
|
+
nonce: z.ZodString;
|
|
256
|
+
claimRevision: z.ZodNumber;
|
|
257
|
+
recordRevision: z.ZodNumber;
|
|
258
|
+
captureId: z.ZodString;
|
|
259
|
+
acquisitionId: z.ZodString;
|
|
260
|
+
}, z.core.$strict>;
|
|
261
|
+
}, z.core.$strict>], "action">;
|
|
262
|
+
declare const timing: z.ZodObject<{
|
|
263
|
+
bodySha256: z.ZodString;
|
|
264
|
+
issuedAt: z.ZodNumber;
|
|
265
|
+
expiresAt: z.ZodNumber;
|
|
266
|
+
}, z.core.$strict>;
|
|
267
|
+
type Intent = z.infer<typeof intent>;
|
|
268
|
+
export type NativeWorkerHostTransportDescriptionV2 = Intent & z.infer<typeof timing>;
|
|
269
|
+
declare const transportBrand: unique symbol;
|
|
270
|
+
export type NativeWorkerHostTransport = Readonly<{
|
|
271
|
+
[transportBrand]: true;
|
|
272
|
+
}>;
|
|
273
|
+
declare const verifiedBrand: unique symbol;
|
|
274
|
+
export type VerifiedNativeWorkerHostTransport = Readonly<{
|
|
275
|
+
[verifiedBrand]: true;
|
|
276
|
+
}>;
|
|
277
|
+
/** Host startup only. Deliberately DOES NOT call resolveFirstPartyDelegationSecret:
|
|
278
|
+
* neither configured access-key substitution nor the public local/test fallback
|
|
279
|
+
* can select this new purpose root. Missing explicit deployment secret is OFF.
|
|
280
|
+
* No variable lookup, provider request, config mutation or persistence occurs. */
|
|
281
|
+
export declare function configuredNativeWorkerHostTransport(settings: Pick<Settings, "delegationSecret">): NativeWorkerHostTransport | null;
|
|
282
|
+
/** Release only this transport's derived-key copy, not a config/grant/custody
|
|
283
|
+
* lifecycle or observation slot. Outstanding native I/O needs its own join. */
|
|
284
|
+
export declare function disposeNativeWorkerHostTransport(transport: NativeWorkerHostTransport): void;
|
|
285
|
+
/** Private worker/core transport serialization. The caller MUST first establish
|
|
286
|
+
* canonical original-host admission. This helper cannot establish that admission
|
|
287
|
+
* and is intentionally not exported from the core package's public entrypoints. */
|
|
288
|
+
export declare function signNativeWorkerHostTransport(transport: NativeWorkerHostTransport, input: Intent, body: Uint8Array, nowSeconds?: number): string;
|
|
289
|
+
/** Only host transport authenticity is verified. A later narrow authorizer must
|
|
290
|
+
* independently source-join original live/maintenance authority, configuration,
|
|
291
|
+
* grant, claim, acquisition, body fields/cursors and exact action-specific CAS. */
|
|
292
|
+
export declare function verifyNativeWorkerHostTransport(transport: NativeWorkerHostTransport, envelope: string, body: Uint8Array, nowSeconds?: number): VerifiedNativeWorkerHostTransport | null;
|
|
293
|
+
/** Request-local inspection of a previously verified MAC, NOT current admission.
|
|
294
|
+
* The narrow host authorizer must still recheck expiry and current authority/CAS.
|
|
295
|
+
* Copying a description, token or ref cannot mint grant or native-I/O authority. */
|
|
296
|
+
export declare function nativeWorkerHostTransportDescription(transport: NativeWorkerHostTransport, proof: VerifiedNativeWorkerHostTransport): NativeWorkerHostTransportDescriptionV2;
|
|
297
|
+
export {};
|
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
import { type AccessGrant, type NewSessionDraft as NewSessionDraftValue } from "@opengeni/contracts";
|
|
2
2
|
import type { AppDependencies } from "../dependencies.js";
|
|
3
|
+
import { type AccessGrantAuthorization } from "../access/index.js";
|
|
4
|
+
import { type Settings } from "@opengeni/config";
|
|
3
5
|
type NewSessionDraftDependencies = Pick<AppDependencies, "settings" | "db" | "objectStorage">;
|
|
6
|
+
/**
|
|
7
|
+
* Whether a stored draft's model policy was the person's choice. A row written
|
|
8
|
+
* before the marker existed (or by an older client) counts as a choice unless
|
|
9
|
+
* it is exactly the deployment default policy (model, reasoning, standard
|
|
10
|
+
* speed), which is what an untouched composer used to save.
|
|
11
|
+
*/
|
|
12
|
+
export declare function draftModelProvided(settings: Settings, draft: Pick<NewSessionDraftValue, "model" | "reasoningEffort" | "latencyMode" | "modelProvided">): boolean;
|
|
13
|
+
type NewSessionDraftReadOptions = {
|
|
14
|
+
/**
|
|
15
|
+
* Project a draft that follows the default onto today's resolved default.
|
|
16
|
+
* Callers that only reuse a chosen model (Slack defaults) skip the
|
|
17
|
+
* resolution; session creation resolves the default itself.
|
|
18
|
+
*/
|
|
19
|
+
projectDefaultModel?: boolean;
|
|
20
|
+
};
|
|
4
21
|
/** Read the authenticated actor's server-authoritative pre-session composer state. */
|
|
5
|
-
|
|
22
|
+
declare function getActorNewSessionDraftInFileScope(deps: Pick<NewSessionDraftDependencies, "settings" | "db">, grant: AccessGrant, workspaceId: string, readOptions?: NewSessionDraftReadOptions): Promise<NewSessionDraftValue>;
|
|
6
23
|
/**
|
|
7
24
|
* Validate and save one exact actor-private draft revision. Create-time-only
|
|
8
25
|
* checks (live machine target, rig/variable-set state, and permission
|
|
@@ -10,5 +27,25 @@ export declare function getActorNewSessionDraft(deps: Pick<NewSessionDraftDepend
|
|
|
10
27
|
* draft may represent incomplete options, while no invalid option can become a
|
|
11
28
|
* session without passing that single canonical create boundary.
|
|
12
29
|
*/
|
|
13
|
-
|
|
30
|
+
declare function saveActorNewSessionDraftInFileScope(deps: NewSessionDraftDependencies, grant: AccessGrant, workspaceId: string, rawInput: unknown,
|
|
31
|
+
/**
|
|
32
|
+
* `AccessGrantAuthorization.canonicalManagedHumanSession` — did this request
|
|
33
|
+
* authenticate as the canonical managed cookie that owns `grant.subjectId`?
|
|
34
|
+
* Defaults to false so every caller that has not proven it fails closed onto
|
|
35
|
+
* the historical bare-membership fence.
|
|
36
|
+
*/
|
|
37
|
+
canonicalManagedHumanSession?: boolean, externalAuthorization?: AccessGrantAuthorization): Promise<NewSessionDraftValue>;
|
|
38
|
+
export declare function getActorNewSessionDraft(deps: Parameters<typeof getActorNewSessionDraftInFileScope>[0], grant: AccessGrant, workspaceId: string, authorization?: AccessGrantAuthorization, readOptions?: NewSessionDraftReadOptions): Promise<NewSessionDraftValue>;
|
|
39
|
+
export declare function saveActorNewSessionDraft(...args: Parameters<typeof saveActorNewSessionDraftInFileScope>): Promise<NewSessionDraftValue>;
|
|
40
|
+
/**
|
|
41
|
+
* The model policy the person explicitly chose in the website composer, or an
|
|
42
|
+
* empty object when their draft follows the default.
|
|
43
|
+
*
|
|
44
|
+
* Only the model policy is reused. Connectors, repositories, Variable Sets,
|
|
45
|
+
* Sandbox Environment and compute target in the draft are the person's last
|
|
46
|
+
* explicit narrowing of one website chat, so surfaces that start work without
|
|
47
|
+
* the composer (Slack) resolve those from workspace defaults instead of
|
|
48
|
+
* silently inheriting that narrowing.
|
|
49
|
+
*/
|
|
50
|
+
export declare function getActorNewSessionModelChoice(deps: Parameters<typeof getActorNewSessionDraft>[0], grant: AccessGrant, workspaceId: string): Promise<Pick<NewSessionDraftValue, "model" | "reasoningEffort" | "latencyMode"> | Record<string, never>>;
|
|
14
51
|
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { SandboxRecoveryRequest } from "@opengeni/contracts";
|
|
2
|
+
import { type AccessGrantAuthorization } from "../access/index.js";
|
|
3
|
+
import type { AppDependencies } from "../dependencies.js";
|
|
4
|
+
type Dependencies = Pick<AppDependencies, "db" | "sessionAuthorization">;
|
|
5
|
+
/** The read-only projection also serves the exact built-in local human. Its
|
|
6
|
+
* provenance stamp is set only by the local resolver, never a bearer claim. */
|
|
7
|
+
export declare function requireSandboxRecoveryPreviewHuman(authorization: AccessGrantAuthorization, workspaceId: string): void;
|
|
8
|
+
export declare function getManagedHumanSandboxRecovery(deps: Dependencies, authorization: AccessGrantAuthorization, workspaceId: string, sessionId: string): Promise<{
|
|
9
|
+
version: 1;
|
|
10
|
+
status: "blocked" | "consent_accepted" | "eligible" | "restored" | "restoring" | "unsupported";
|
|
11
|
+
reason: string | null;
|
|
12
|
+
checkpoint: {
|
|
13
|
+
version: 1;
|
|
14
|
+
sessionId: string;
|
|
15
|
+
sandboxGroupId: string;
|
|
16
|
+
leaseId: string;
|
|
17
|
+
routeEpoch: number;
|
|
18
|
+
authorityEpoch: number;
|
|
19
|
+
leaseEpoch: number;
|
|
20
|
+
workspaceGeneration: number;
|
|
21
|
+
archiveGeneration: number;
|
|
22
|
+
artifactId: string;
|
|
23
|
+
revision: string;
|
|
24
|
+
capturedAt: string;
|
|
25
|
+
} | null;
|
|
26
|
+
operationId: string | null;
|
|
27
|
+
automaticAvailable?: boolean | undefined;
|
|
28
|
+
automaticLane?: "checkpoint" | "fresh_workspace" | undefined;
|
|
29
|
+
availableAt?: string | undefined;
|
|
30
|
+
}>;
|
|
31
|
+
export declare function consentManagedHumanSandboxRecovery(deps: Dependencies, authorization: AccessGrantAuthorization, workspaceId: string, sessionId: string, request: SandboxRecoveryRequest): Promise<{
|
|
32
|
+
outcome: "accepted" | "replayed";
|
|
33
|
+
operationId: string;
|
|
34
|
+
recovery: {
|
|
35
|
+
version: 1;
|
|
36
|
+
status: "blocked" | "consent_accepted" | "eligible" | "restored" | "restoring" | "unsupported";
|
|
37
|
+
reason: string | null;
|
|
38
|
+
checkpoint: {
|
|
39
|
+
version: 1;
|
|
40
|
+
sessionId: string;
|
|
41
|
+
sandboxGroupId: string;
|
|
42
|
+
leaseId: string;
|
|
43
|
+
routeEpoch: number;
|
|
44
|
+
authorityEpoch: number;
|
|
45
|
+
leaseEpoch: number;
|
|
46
|
+
workspaceGeneration: number;
|
|
47
|
+
archiveGeneration: number;
|
|
48
|
+
artifactId: string;
|
|
49
|
+
revision: string;
|
|
50
|
+
capturedAt: string;
|
|
51
|
+
} | null;
|
|
52
|
+
operationId: string | null;
|
|
53
|
+
automaticAvailable?: boolean | undefined;
|
|
54
|
+
automaticLane?: "checkpoint" | "fresh_workspace" | undefined;
|
|
55
|
+
availableAt?: string | undefined;
|
|
56
|
+
};
|
|
57
|
+
}>;
|
|
58
|
+
export {};
|
|
@@ -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";
|
|
@@ -31,22 +32,28 @@ type SessionAuthorizationCommandDeps = {
|
|
|
31
32
|
db: Database;
|
|
32
33
|
sessionAuthorization?: SessionAuthorizationPort | null;
|
|
33
34
|
};
|
|
35
|
+
type SessionCommandPostCommitDeps = {
|
|
36
|
+
/** Historical name; now schedules replayable follow-up for every interactive session command. */
|
|
37
|
+
schedulePromptPostCommit?: ((task: () => Promise<void>) => void) | undefined;
|
|
38
|
+
};
|
|
34
39
|
export declare function sendAgentSessionMessage(deps: {
|
|
35
40
|
db: Database;
|
|
41
|
+
settings?: Settings;
|
|
36
42
|
bus: EventBus;
|
|
37
43
|
workflowClient: Pick<SessionWorkflowClient, "wakeSessionWorkflow">;
|
|
38
44
|
sessionAuthorization?: SessionAuthorizationPort | null;
|
|
39
|
-
}, context: AgentSessionCommandContext, input: {
|
|
45
|
+
} & SessionCommandPostCommitDeps, context: AgentSessionCommandContext, input: {
|
|
40
46
|
targetSessionId: string;
|
|
41
47
|
text: string;
|
|
42
48
|
idempotencyKey: string;
|
|
43
49
|
}): Promise<import("@opengeni/db").AgentInternalUpdateCommandResult>;
|
|
44
50
|
export declare function steerAgentSession(deps: {
|
|
45
51
|
db: Database;
|
|
52
|
+
settings?: Settings;
|
|
46
53
|
bus: EventBus;
|
|
47
54
|
workflowClient: Pick<SessionWorkflowClient, "wakeSessionWorkflow">;
|
|
48
55
|
sessionAuthorization?: SessionAuthorizationPort | null;
|
|
49
|
-
}, context: AgentSessionCommandContext, input: {
|
|
56
|
+
} & SessionCommandPostCommitDeps, context: AgentSessionCommandContext, input: {
|
|
50
57
|
targetSessionId: string;
|
|
51
58
|
instruction: string;
|
|
52
59
|
idempotencyKey: string;
|
|
@@ -54,9 +61,9 @@ export declare function steerAgentSession(deps: {
|
|
|
54
61
|
export declare function controlAgentSessionWorkstream(deps: {
|
|
55
62
|
db: Database;
|
|
56
63
|
bus: EventBus;
|
|
57
|
-
workflowClient: Pick<SessionWorkflowClient, "requestSessionWorkflowWakeDispatch">;
|
|
64
|
+
workflowClient: Pick<SessionWorkflowClient, "requestSessionWorkflowWakeDispatch" | "wakeSessionWorkflow">;
|
|
58
65
|
sessionAuthorization?: SessionAuthorizationPort | null;
|
|
59
|
-
}, context: AgentSessionCommandContext, input: {
|
|
66
|
+
} & SessionCommandPostCommitDeps, context: AgentSessionCommandContext, input: {
|
|
60
67
|
targetSessionId: string;
|
|
61
68
|
action: "pause" | "resume";
|
|
62
69
|
idempotencyKey: string;
|
|
@@ -64,9 +71,10 @@ export declare function controlAgentSessionWorkstream(deps: {
|
|
|
64
71
|
}): Promise<{
|
|
65
72
|
receipt: SessionCommandReceiptRow;
|
|
66
73
|
control: import("@opengeni/db").EffectiveSessionControl;
|
|
67
|
-
sessionControlEventId: string;
|
|
68
|
-
workspaceControlEventId: string;
|
|
74
|
+
sessionControlEventId: string | null;
|
|
75
|
+
workspaceControlEventId: string | null;
|
|
69
76
|
interruptionCount: number;
|
|
77
|
+
backgroundCommandCount: number;
|
|
70
78
|
wakeCount: number;
|
|
71
79
|
cancelledSessionCount: number;
|
|
72
80
|
cancelledTurnCount: number;
|
|
@@ -74,6 +82,8 @@ export declare function controlAgentSessionWorkstream(deps: {
|
|
|
74
82
|
sessionId: string;
|
|
75
83
|
eventIds: string[];
|
|
76
84
|
}>;
|
|
85
|
+
workflowWake: import("@opengeni/db").SessionControlWorkflowWake | null;
|
|
86
|
+
outcome: "changed" | "unchanged" | "replayed";
|
|
77
87
|
replay: boolean;
|
|
78
88
|
authorization: ResolvedSessionAuthorization | null;
|
|
79
89
|
}>;
|
|
@@ -81,29 +91,31 @@ export declare function moveHumanQueuePrompt(deps: {
|
|
|
81
91
|
db: Database;
|
|
82
92
|
bus: EventBus;
|
|
83
93
|
sessionAuthorization?: SessionAuthorizationPort | null;
|
|
84
|
-
}, context: HumanSessionCommandContext, turnId: string, input: MoveSessionQueueItemRequest): Promise<SessionQueueMutationResponse>;
|
|
94
|
+
} & SessionCommandPostCommitDeps, context: HumanSessionCommandContext, turnId: string, input: MoveSessionQueueItemRequest): Promise<SessionQueueMutationResponse>;
|
|
85
95
|
export declare function deleteHumanQueuePrompt(deps: {
|
|
86
96
|
db: Database;
|
|
87
97
|
bus: EventBus;
|
|
88
98
|
sessionAuthorization?: SessionAuthorizationPort | null;
|
|
89
|
-
}, context: HumanSessionCommandContext, turnId: string, input: DeleteSessionQueueItemRequest): Promise<SessionQueueMutationResponse>;
|
|
99
|
+
} & SessionCommandPostCommitDeps, context: HumanSessionCommandContext, turnId: string, input: DeleteSessionQueueItemRequest): Promise<SessionQueueMutationResponse>;
|
|
90
100
|
export declare function editHumanQueuePrompt(deps: {
|
|
91
101
|
db: Database;
|
|
92
102
|
bus: EventBus;
|
|
93
103
|
sessionAuthorization?: SessionAuthorizationPort | null;
|
|
94
|
-
}, context: HumanSessionCommandContext, turnId: string, input: EditSessionQueueItemRequest): Promise<SessionQueueMutationResponse>;
|
|
104
|
+
} & SessionCommandPostCommitDeps, context: HumanSessionCommandContext, turnId: string, input: EditSessionQueueItemRequest): Promise<SessionQueueMutationResponse>;
|
|
95
105
|
export declare function steerHumanQueuePrompt(deps: {
|
|
96
106
|
db: Database;
|
|
97
107
|
bus: EventBus;
|
|
108
|
+
workflowClient: Pick<SessionWorkflowClient, "wakeSessionWorkflow">;
|
|
98
109
|
sessionAuthorization?: SessionAuthorizationPort | null;
|
|
99
|
-
}, context: HumanSessionCommandContext, turnId: string, input: SteerSessionQueueItemRequest): Promise<SessionQueueMutationResponse>;
|
|
110
|
+
} & SessionCommandPostCommitDeps, context: HumanSessionCommandContext, turnId: string, input: SteerSessionQueueItemRequest): Promise<SessionQueueMutationResponse>;
|
|
100
111
|
export declare function controlHumanSessionWorkstreamWithOutcome(deps: {
|
|
101
112
|
db: Database;
|
|
102
113
|
bus: EventBus;
|
|
103
|
-
workflowClient: Pick<SessionWorkflowClient, "requestSessionWorkflowWakeDispatch">;
|
|
114
|
+
workflowClient: Pick<SessionWorkflowClient, "requestSessionWorkflowWakeDispatch" | "wakeSessionWorkflow">;
|
|
104
115
|
sessionAuthorization?: SessionAuthorizationPort | null;
|
|
105
|
-
}, context: HumanSessionCommandContext, input: SessionControlRequest): Promise<{
|
|
116
|
+
} & SessionCommandPostCommitDeps, context: HumanSessionCommandContext, input: SessionControlRequest): Promise<{
|
|
106
117
|
response: SessionControlResponse;
|
|
118
|
+
outcome: "changed" | "unchanged" | "replayed";
|
|
107
119
|
replay: boolean;
|
|
108
120
|
}>;
|
|
109
121
|
/** Backward-compatible response path used by the REST control route. */
|
|
@@ -112,7 +124,8 @@ export declare function controlHumanWorkspace(deps: {
|
|
|
112
124
|
db: Database;
|
|
113
125
|
bus: EventBus;
|
|
114
126
|
workflowClient: Pick<SessionWorkflowClient, "requestSessionWorkflowWakeDispatch">;
|
|
115
|
-
}, context: Omit<HumanSessionCommandContext, "sessionId">, input: WorkspaceInferenceControlRequest): Promise<WorkspaceInferenceControlResponse>;
|
|
127
|
+
} & SessionCommandPostCommitDeps, context: Omit<HumanSessionCommandContext, "sessionId">, input: WorkspaceInferenceControlRequest): Promise<WorkspaceInferenceControlResponse>;
|
|
116
128
|
export declare function getHumanComposerDraft(deps: SessionAuthorizationCommandDeps, context: HumanSessionCommandContext): Promise<ComposerDraft>;
|
|
117
129
|
export declare function saveHumanComposerDraft(deps: SessionAuthorizationCommandDeps, context: HumanSessionCommandContext, input: SaveComposerDraftRequest): Promise<ComposerDraft>;
|
|
130
|
+
export declare function controlHumanWorkspaceTimer(deps: Parameters<typeof controlHumanWorkspace>[0], context: Parameters<typeof controlHumanWorkspace>[1], input: import("@opengeni/contracts").WorkspacePauseTimerRequest): Promise<void>;
|
|
118
131
|
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { RotateSessionMcpCredentialsRequest, type AccessGrant } from "@opengeni/contracts";
|
|
2
|
+
import { type Database } from "@opengeni/db";
|
|
3
|
+
import type { Settings } from "@opengeni/config";
|
|
4
|
+
import { type AccessGrantAuthorization } from "../access/index.js";
|
|
5
|
+
import { type SessionAuthorizationDependencies } from "../session-authorization.js";
|
|
6
|
+
/** HMAC domains separate request identity from key availability. The key tag
|
|
7
|
+
* carries no request material and neither fingerprint is returned publicly. */
|
|
8
|
+
export declare function sessionMcpRotationFingerprint(key: Uint8Array, scope: {
|
|
9
|
+
accountId: string;
|
|
10
|
+
workspaceId: string;
|
|
11
|
+
sessionId: string;
|
|
12
|
+
subjectId: string;
|
|
13
|
+
}, request: RotateSessionMcpCredentialsRequest): {
|
|
14
|
+
digestKeyTag: string;
|
|
15
|
+
requestDigest: string;
|
|
16
|
+
};
|
|
17
|
+
/** HTTP/SDK host boundary only. The mandatory callback re-resolves request
|
|
18
|
+
* authentication with the transaction handle, not a cached route-time grant. */
|
|
19
|
+
export declare function rotateSessionMcpCredentialsForRequest(deps: SessionAuthorizationDependencies & {
|
|
20
|
+
settings: Settings;
|
|
21
|
+
}, authorization: AccessGrantAuthorization, sessionId: string, raw: unknown, reauthorize: (tx: Database) => Promise<AccessGrant>): Promise<{
|
|
22
|
+
operationKey: string;
|
|
23
|
+
sessionId: string;
|
|
24
|
+
servers: {
|
|
25
|
+
id: string;
|
|
26
|
+
credentialVersion: number;
|
|
27
|
+
}[];
|
|
28
|
+
appliedAt: string;
|
|
29
|
+
}>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ForkSessionResponse, SessionTenancyCreateCapabilities, UpdateSessionVisibilityResponse, type ForkSessionRequest, type SessionAuthorizationSurface, type UpdateSessionVisibilityRequest } from "@opengeni/contracts";
|
|
2
|
+
import { type AccessGrantAuthorization } from "../access/index.js";
|
|
3
|
+
import type { AppDependencies } from "../dependencies.js";
|
|
4
|
+
type SessionTenancyDependencies = Pick<AppDependencies, "db" | "bus" | "sessionAuthorization" | "settings">;
|
|
5
|
+
export declare class SessionTenancyManagedHumanRequiredError extends Error {
|
|
6
|
+
readonly name = "SessionTenancyManagedHumanRequiredError";
|
|
7
|
+
constructor();
|
|
8
|
+
}
|
|
9
|
+
export declare class SessionTenancyPersistenceOutcomeUnknownError extends Error {
|
|
10
|
+
readonly name = "SessionTenancyPersistenceOutcomeUnknownError";
|
|
11
|
+
constructor(options?: ErrorOptions);
|
|
12
|
+
}
|
|
13
|
+
export declare function requireCanonicalManagedHuman(authorization: AccessGrantAuthorization, workspaceId: string): void;
|
|
14
|
+
export declare function requireVerifiedOwningUser(authorization: AccessGrantAuthorization, workspaceId: string): void;
|
|
15
|
+
export declare function getManagedHumanSessionCreateCapabilities(deps: Pick<SessionTenancyDependencies, "db">, authorization: AccessGrantAuthorization, workspaceId: string): Promise<SessionTenancyCreateCapabilities>;
|
|
16
|
+
export declare function requireManagedHumanPrivateSessionCreate(deps: Pick<SessionTenancyDependencies, "db">, authorization: AccessGrantAuthorization, workspaceId: string): Promise<void>;
|
|
17
|
+
export declare function updateManagedHumanSessionVisibility(deps: SessionTenancyDependencies, authorization: AccessGrantAuthorization, workspaceId: string, sessionId: string, request: UpdateSessionVisibilityRequest, authorizationSurface?: SessionAuthorizationSurface): Promise<UpdateSessionVisibilityResponse>;
|
|
18
|
+
export declare function forkManagedHumanSession(deps: SessionTenancyDependencies, authorization: AccessGrantAuthorization, workspaceId: string, sourceSessionId: string, request: ForkSessionRequest, authorizationSurface?: SessionAuthorizationSurface): Promise<ForkSessionResponse>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { IssueUserResourceGrantRequest, SessionAuthorizationSurface, UserResourceKind } from "@opengeni/contracts";
|
|
2
|
+
import { type AccessGrantAuthorization } from "../access/index.js";
|
|
3
|
+
import type { AppDependencies } from "../dependencies.js";
|
|
4
|
+
type UserResourceGrantDependencies = Pick<AppDependencies, "db" | "sessionAuthorization">;
|
|
5
|
+
export declare function listManagedHumanUserResourceAuthorities(deps: Pick<UserResourceGrantDependencies, "db">, authorization: AccessGrantAuthorization, workspaceId: string, input: {
|
|
6
|
+
resourceKind: UserResourceKind;
|
|
7
|
+
cursor?: string | undefined;
|
|
8
|
+
limit: number;
|
|
9
|
+
}): Promise<{
|
|
10
|
+
authorities: import("@opengeni/db").UserResourceAuthoritySummary[];
|
|
11
|
+
nextCursor: string | null;
|
|
12
|
+
}>;
|
|
13
|
+
export declare function issueManagedHumanUserResourceGrant(deps: UserResourceGrantDependencies, authorization: AccessGrantAuthorization, workspaceId: string, authorityId: string, request: IssueUserResourceGrantRequest, authorizationSurface?: SessionAuthorizationSurface): Promise<import("@opengeni/db").UserResourceAuthorityGrant>;
|
|
14
|
+
export declare function revokeManagedHumanUserResourceGrant(deps: Pick<UserResourceGrantDependencies, "db">, authorization: AccessGrantAuthorization, workspaceId: string, grantId: string): Promise<{
|
|
15
|
+
grantId: string;
|
|
16
|
+
generation: number;
|
|
17
|
+
status: "revoked";
|
|
18
|
+
revokedAt: string;
|
|
19
|
+
}>;
|
|
20
|
+
export {};
|
package/dist/billing/limits.d.ts
CHANGED
|
@@ -1,13 +1,24 @@
|
|
|
1
|
+
import { type Settings } from "@opengeni/config";
|
|
1
2
|
import type { LimitAction, LimitDecision, SessionTurnSource, TurnInitiator, TurnInitiatorContext } from "@opengeni/contracts";
|
|
2
3
|
import type { ApiRouteDeps } from "../dependencies.js";
|
|
3
4
|
export type LimitDependencies = Pick<ApiRouteDeps, "db" | "settings">;
|
|
5
|
+
/** Deterministic/local embeddings never debit credits, even in paid mode. */
|
|
6
|
+
export declare function paidDocumentEmbedding(settings: Settings): boolean;
|
|
7
|
+
/** Round up each provider request so a positive input cannot become a free debit. */
|
|
8
|
+
export declare function documentEmbeddingCostMicros(settings: Settings, inputBytes: number): number;
|
|
4
9
|
export type LimitCheckInput = {
|
|
5
10
|
accountId: string;
|
|
6
11
|
workspaceId?: string;
|
|
12
|
+
/** Frozen causal human, never the API key or service admitting the work. */
|
|
13
|
+
initiatingHumanSubjectId?: string | null;
|
|
7
14
|
action: LimitAction;
|
|
8
15
|
quantity?: number;
|
|
9
16
|
model?: string | null;
|
|
10
17
|
};
|
|
18
|
+
export declare function modelFundingForAdmission(settings: Settings, model: string | null | undefined, codexBilled: boolean): {
|
|
19
|
+
fundedWithoutCredits: boolean;
|
|
20
|
+
countsTowardTokenCap: boolean;
|
|
21
|
+
};
|
|
11
22
|
export declare function requireLimit(deps: LimitDependencies, input: LimitCheckInput): Promise<void>;
|
|
12
23
|
export declare function checkLimit(deps: LimitDependencies, input: LimitCheckInput): Promise<LimitDecision>;
|
|
13
24
|
export declare function recordWorkspaceUsage(deps: LimitDependencies, input: {
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import type { Database } from "@opengeni/db";
|
|
2
2
|
import type { Context } from "hono";
|
|
3
3
|
import type { ManagedAuth } from "./managed-auth-type.js";
|
|
4
|
+
export { getManagedAuthRequestActorAdmissionStamp, getManagedAuthRequestActorLeaseStamp, markManagedAuthRequestActorTransitionApplied, } from "./managed-session.js";
|
|
5
|
+
import type { ManagedAuthSessionAdapter } from "./managed-auth-session-sets.js";
|
|
6
|
+
import type { ManagedAuthSessionSetMode } from "@opengeni/contracts/managed-auth-session-sets";
|
|
4
7
|
export type CanonicalHumanRequestIdentity = {
|
|
5
8
|
authUserId: string;
|
|
6
9
|
authSessionId: string;
|
|
7
10
|
};
|
|
8
11
|
export declare function requireCanonicalHumanRequestIdentity(context: Context, input: {
|
|
9
12
|
db: Database;
|
|
10
|
-
managedAuth?: ManagedAuth | null;
|
|
11
|
-
|
|
13
|
+
managedAuth?: ManagedAuth | null | undefined;
|
|
14
|
+
managedAuthSessionAdapter?: ManagedAuthSessionAdapter | null | undefined;
|
|
15
|
+
managedAuthSessionSetMode?: ManagedAuthSessionSetMode | undefined;
|
|
16
|
+
allowRecovery?: boolean | undefined;
|
|
12
17
|
}): Promise<CanonicalHumanRequestIdentity>;
|