@opengeni/contracts 3.1.0-canary.1 → 3.1.2
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/agent-authored-durable-text.d.ts +9 -9
- package/dist/agent-config.d.ts +971 -0
- package/dist/agent-instruction-changes.d.ts +110 -0
- package/dist/agent-learning.d.ts +243 -0
- package/dist/allowance-refusal.d.ts +9 -0
- package/dist/allowance-refusal.js +50 -0
- package/dist/allowance-refusal.js.map +1 -0
- package/dist/analytics-consent-report.d.ts +19 -0
- package/dist/analytics-consent-report.js +10 -0
- package/dist/analytics-consent-report.js.map +1 -0
- package/dist/api-key-presets.d.ts +19 -0
- package/dist/artifact-catalog.d.ts +188 -0
- package/dist/artifacts.d.ts +86 -0
- package/dist/atlassian-native-retirement.d.ts +16 -0
- package/dist/atlassian-native-retirement.js +30 -0
- package/dist/atlassian-native-retirement.js.map +1 -0
- package/dist/atlassian.d.ts +1 -0
- package/dist/atlassian.js +34 -19
- package/dist/browser-storage.d.ts +5 -0
- package/dist/browser-storage.js +9 -0
- package/dist/browser-storage.js.map +1 -0
- package/dist/bundled-skills.d.ts +24 -1
- package/dist/canonical-human-identities.js +2 -1
- package/dist/chunk-2ZIHHL72.js +153 -0
- package/dist/chunk-2ZIHHL72.js.map +1 -0
- package/dist/{chunk-5LYFSZ7O.js → chunk-352X6ENP.js} +31 -31
- package/dist/chunk-4JGHSSB7.js +11 -0
- package/dist/chunk-4JGHSSB7.js.map +1 -0
- package/dist/chunk-4QO6GJUX.js +85 -0
- package/dist/chunk-4QO6GJUX.js.map +1 -0
- package/dist/chunk-4VDMHLLL.js +49 -0
- package/dist/chunk-4VDMHLLL.js.map +1 -0
- package/dist/chunk-56SNIMDO.js +9 -0
- package/dist/chunk-56SNIMDO.js.map +1 -0
- package/dist/chunk-6C2HKFTU.js +207 -0
- package/dist/chunk-6C2HKFTU.js.map +1 -0
- package/dist/chunk-6IXO76Z6.js +72 -0
- package/dist/chunk-6IXO76Z6.js.map +1 -0
- package/dist/chunk-7272KVWZ.js +60 -0
- package/dist/chunk-7272KVWZ.js.map +1 -0
- package/dist/{chunk-7ABONTXE.js → chunk-E3GGUBHS.js} +49 -5
- package/dist/chunk-E3GGUBHS.js.map +1 -0
- package/dist/chunk-EFZYKUE2.js +767 -0
- package/dist/chunk-EFZYKUE2.js.map +1 -0
- package/dist/chunk-EKWNTOG3.js +154 -0
- package/dist/chunk-EKWNTOG3.js.map +1 -0
- package/dist/chunk-HABQ7ADB.js +234 -0
- package/dist/chunk-HABQ7ADB.js.map +1 -0
- package/dist/chunk-HRRU4QPI.js +91 -0
- package/dist/chunk-HRRU4QPI.js.map +1 -0
- package/dist/{chunk-3SIZGL3O.js → chunk-IK36LXKC.js} +18 -2
- package/dist/chunk-IK36LXKC.js.map +1 -0
- package/dist/{chunk-TXTQIYCV.js → chunk-ILJ72KPO.js} +56 -3
- package/dist/chunk-ILJ72KPO.js.map +1 -0
- package/dist/chunk-J4HQ3UKY.js +93 -0
- package/dist/chunk-J4HQ3UKY.js.map +1 -0
- package/dist/chunk-KHHZTBP7.js +11 -0
- package/dist/chunk-KHHZTBP7.js.map +1 -0
- package/dist/{chunk-WYBDERIY.js → chunk-LZ2LAHIX.js} +47 -41
- package/dist/chunk-LZ2LAHIX.js.map +1 -0
- package/dist/chunk-NDZHPTCL.js +400 -0
- package/dist/chunk-NDZHPTCL.js.map +1 -0
- package/dist/chunk-OF6OKOBF.js +54793 -0
- package/dist/chunk-OF6OKOBF.js.map +1 -0
- package/dist/chunk-OL23ARTF.js +94 -0
- package/dist/chunk-OL23ARTF.js.map +1 -0
- package/dist/chunk-PUIUXIOL.js +189 -0
- package/dist/chunk-PUIUXIOL.js.map +1 -0
- package/dist/{chunk-WBYTNVIW.js → chunk-RKX3NQYS.js} +1 -1
- package/dist/{chunk-Y3KNXVTD.js → chunk-RMWXDZEO.js} +128 -21
- package/dist/chunk-RMWXDZEO.js.map +1 -0
- package/dist/{chunk-MRWYRAS5.js → chunk-SHO4YO4B.js} +27 -35
- package/dist/chunk-SHO4YO4B.js.map +1 -0
- package/dist/chunk-SWRN2DJ3.js +153 -0
- package/dist/chunk-SWRN2DJ3.js.map +1 -0
- package/dist/chunk-TCXCRBPF.js +267 -0
- package/dist/chunk-TCXCRBPF.js.map +1 -0
- package/dist/chunk-TLU3UEMD.js +324 -0
- package/dist/chunk-TLU3UEMD.js.map +1 -0
- package/dist/chunk-TSWWZMUS.js +186 -0
- package/dist/chunk-TSWWZMUS.js.map +1 -0
- package/dist/{chunk-PX3VCKAU.js → chunk-WVCFSOUZ.js} +1 -1
- package/dist/{chunk-PX3VCKAU.js.map → chunk-WVCFSOUZ.js.map} +1 -1
- package/dist/chunk-XDLAGX66.js +127 -0
- package/dist/chunk-XDLAGX66.js.map +1 -0
- package/dist/chunk-YKZ4WU4P.js +33 -0
- package/dist/chunk-YKZ4WU4P.js.map +1 -0
- package/dist/{chunk-O5LEQHDM.js → chunk-Z7WEVGCL.js} +3 -3
- package/dist/{chunk-YBW5JSA3.js → chunk-ZDCRWCGZ.js} +119 -101
- package/dist/chunk-ZDCRWCGZ.js.map +1 -0
- package/dist/claude-provider-account-authority.d.ts +18 -0
- package/dist/claude-subscription-oauth.d.ts +42 -0
- package/dist/claude-subscription-usage.d.ts +159 -0
- package/dist/client-error-report.d.ts +158 -0
- package/dist/client-error-report.js +164 -0
- package/dist/client-error-report.js.map +1 -0
- package/dist/code-search.d.ts +52 -0
- package/dist/code-search.js +40 -0
- package/dist/code-search.js.map +1 -0
- package/dist/codex-provider-account-authority.js +20 -12
- package/dist/codex-provider-account-authority.js.map +1 -1
- package/dist/company-brain.d.ts +19 -81
- package/dist/company-profile.d.ts +144 -6
- package/dist/connect.d.ts +37 -0
- package/dist/connect.js +216 -159
- package/dist/connect.js.map +1 -1
- package/dist/connection-account-label.d.ts +2 -0
- package/dist/connection-account-label.js +35 -0
- package/dist/connection-account-label.js.map +1 -0
- package/dist/connection-authority.d.ts +9 -317
- package/dist/connection-authority.js +37 -42
- package/dist/connector-attachments.js +2 -1
- package/dist/connector-destinations.js +2 -1
- package/dist/connector-tool-permissions.d.ts +137 -0
- package/dist/cua-desktop-tools.d.ts +17 -0
- package/dist/define-schema.d.ts +8 -0
- package/dist/direct-model-provider.d.ts +36 -0
- package/dist/editable-artifact-codec-registry.js +5 -5
- package/dist/editable-artifact-committed-transaction.js +3 -2
- package/dist/editable-artifact-live.js +5 -5
- package/dist/editable-artifact-serialized-commit.js +6 -6
- package/dist/editable-artifact-versions.d.ts +7 -1
- package/dist/editable-artifact-versions.js +1 -1
- package/dist/editable-artifacts.js +62 -56
- package/dist/event-preview.d.ts +22 -0
- package/dist/external-identities.d.ts +174 -0
- package/dist/external-identities.js +15 -4
- package/dist/first-party-tool-authorization.d.ts +815 -0
- package/dist/github-repository-contracts.js +60 -43
- package/dist/github-repository-contracts.js.map +1 -1
- package/dist/google-drive.d.ts +2 -1
- package/dist/google-drive.js +305 -238
- package/dist/google-drive.js.map +1 -1
- package/dist/host-mcp-bindings.d.ts +39 -10
- package/dist/host-mcp-bindings.js +256 -171
- package/dist/host-mcp-bindings.js.map +1 -1
- package/dist/image-generation.d.ts +1 -0
- package/dist/index.d.ts +15715 -3850
- package/dist/index.js +2088 -289
- package/dist/insights-usage.d.ts +877 -0
- package/dist/insights-usage.js +559 -0
- package/dist/insights-usage.js.map +1 -0
- package/dist/interaction.d.ts +1176 -829
- package/dist/knowledge-entries.d.ts +984 -0
- package/dist/knowledge-preparation.d.ts +239 -0
- package/dist/managed-auth-session-sets.d.ts +7 -0
- package/dist/managed-auth-session-sets.js +198 -132
- package/dist/managed-auth-session-sets.js.map +1 -1
- package/dist/managed-sign-in-methods.d.ts +56 -0
- package/dist/managed-sign-in-methods.js +64 -0
- package/dist/managed-sign-in-methods.js.map +1 -0
- package/dist/mcp-catalog-limits.d.ts +2 -0
- package/dist/mcp-endpoint.js +9 -0
- package/dist/mcp-endpoint.js.map +1 -0
- package/dist/mcp-oauth.d.ts +2 -2
- package/dist/mcp-structured-content.d.ts +25 -0
- package/dist/modal-native-proof-v2.d.ts +587 -0
- package/dist/modal-native-proof-v2.js +38 -0
- package/dist/modal-native-proof-v2.js.map +1 -0
- package/dist/model-account-choice.d.ts +235 -0
- package/dist/model-account-settings.d.ts +422 -0
- package/dist/model-availability.d.ts +15 -0
- package/dist/model-connection-access.d.ts +13 -0
- package/dist/model-context-inspector.d.ts +98 -0
- package/dist/model-display.d.ts +43 -0
- package/dist/model-display.js +17 -0
- package/dist/model-display.js.map +1 -0
- package/dist/model-picker-order.d.ts +3 -1
- package/dist/model-picker-order.js +3 -0
- package/dist/model-picker-order.js.map +1 -1
- package/dist/organization-access.d.ts +412 -0
- package/dist/organization-access.js +39 -0
- package/dist/organization-access.js.map +1 -0
- package/dist/organization-integration-policy.d.ts +27 -0
- package/dist/organization-membership-lifecycle.d.ts +38 -0
- package/dist/organization-model-usage.d.ts +146 -0
- package/dist/organization-model-usage.js +78 -0
- package/dist/organization-model-usage.js.map +1 -0
- package/dist/organization-recovery.js +2 -1
- package/dist/organization-usage.d.ts +138 -0
- package/dist/permissions.d.ts +18 -0
- package/dist/personal-github.d.ts +1 -0
- package/dist/personal-github.js +199 -144
- package/dist/personal-github.js.map +1 -1
- package/dist/plugin-discovery.js +1 -1
- package/dist/prepared-mcp-setup.d.ts +54 -0
- package/dist/prepared-mcp-setup.js +12 -0
- package/dist/prepared-mcp-setup.js.map +1 -0
- package/dist/product-analytics.d.ts +116 -0
- package/dist/product-lifecycle-facts.d.ts +73 -0
- package/dist/remember.d.ts +98 -6
- package/dist/retained-output.d.ts +8 -0
- package/dist/sandbox-file-artifacts.d.ts +1 -0
- package/dist/sandbox-provider-command.d.ts +91 -1
- package/dist/sandbox-recovery.d.ts +146 -0
- package/dist/secret-generator.d.ts +44 -0
- package/dist/secret-references.d.ts +90 -0
- package/dist/secret-resolution.d.ts +111 -0
- package/dist/secret-totp.d.ts +41 -0
- package/dist/session-final-reply.d.ts +6 -0
- package/dist/session-final-reply.js +9 -0
- package/dist/session-final-reply.js.map +1 -0
- package/dist/session-goal-reports.d.ts +21 -0
- package/dist/session-history-import.d.ts +1272 -0
- package/dist/session-list-entries.d.ts +4 -0
- package/dist/session-list-entries.js +56 -0
- package/dist/session-list-entries.js.map +1 -0
- package/dist/session-mcp-projections.d.ts +6 -0
- package/dist/session-mcp-tool-permissions.d.ts +62 -0
- package/dist/session-message-search.d.ts +68 -0
- package/dist/session-target.d.ts +18 -0
- package/dist/session-titles.d.ts +8 -0
- package/dist/session-titles.js +5 -1
- package/dist/session-usage-limit-refusal.d.ts +34 -0
- package/dist/session-usage-limit-refusal.js +15 -0
- package/dist/session-usage-limit-refusal.js.map +1 -0
- package/dist/session-usage-limits.d.ts +127 -0
- package/dist/session-usage-limits.js +41 -0
- package/dist/session-usage-limits.js.map +1 -0
- package/dist/signup-attribution.d.ts +39 -0
- package/dist/site-data.d.ts +286 -0
- package/dist/site-operations.d.ts +39 -0
- package/dist/site-publishing.d.ts +778 -0
- package/dist/site-session-http.d.ts +89 -4
- package/dist/site-session-http.js +25 -1
- package/dist/site-sql.d.ts +421 -0
- package/dist/skill-catalog-context.d.ts +7 -0
- package/dist/skill-files.d.ts +1 -1
- package/dist/skill-use.d.ts +61 -0
- package/dist/skills.d.ts +15 -0
- package/dist/slack-bot-scopes.d.ts +17 -12
- package/dist/slack-bot-scopes.js +10 -3
- package/dist/slack-rest-mcp.d.ts +36 -0
- package/dist/slack-rest-mcp.js +25 -0
- package/dist/slack-rest-mcp.js.map +1 -0
- package/dist/spreadsheet-artifact-commands.d.ts +14 -1
- package/dist/spreadsheet-artifact-commands.js +8 -2
- package/dist/spreadsheet-artifact-query.d.ts +13 -6
- package/dist/spreadsheet-artifact-query.js +3 -3
- package/dist/subscription-account-actions.d.ts +64 -0
- package/dist/subscription-account-pools.d.ts +292 -0
- package/dist/subscription-personal-authority-v2.d.ts +28 -0
- package/dist/subscription-personal-authority-v2.js +12 -0
- package/dist/subscription-personal-authority-v2.js.map +1 -0
- package/dist/tool-action-review.d.ts +132 -0
- package/dist/tool-catalog.d.ts +408 -0
- package/dist/tool-policy.d.ts +5 -0
- package/dist/tool-review-presentation.d.ts +12 -0
- package/dist/tool-review-presentation.js +17 -0
- package/dist/tool-review-presentation.js.map +1 -0
- package/dist/transcription-recordings.d.ts +21 -0
- package/dist/turn-serving-policy.d.ts +221 -0
- package/dist/usage-allowances.d.ts +314 -0
- package/dist/usage-allowances.js +52 -0
- package/dist/usage-allowances.js.map +1 -0
- package/dist/vaults.d.ts +1286 -0
- package/dist/video-generation.d.ts +3 -0
- package/dist/video-generation.js +2 -1
- package/dist/workspace-instruction-policies.d.ts +13 -0
- package/dist/workspace-integration-wire.d.ts +36 -0
- package/dist/workspace-integration-wire.js +23 -0
- package/dist/workspace-integration-wire.js.map +1 -0
- package/dist/workspace-integrations.d.ts +1028 -0
- package/dist/workspace-state.d.ts +85 -416
- package/dist/xai-provider-account-authority.js +2 -1
- package/package.json +98 -2
- package/src/agent-authored-durable-text.ts +14 -11
- package/src/agent-config.ts +1698 -0
- package/src/agent-instruction-changes.ts +115 -0
- package/src/agent-learning.ts +188 -0
- package/src/agent-topology.ts +57 -52
- package/src/allowance-refusal.ts +81 -0
- package/src/analytics-consent-report.ts +20 -0
- package/src/api-key-presets.ts +28 -0
- package/src/artifact-catalog.ts +82 -0
- package/src/artifacts.ts +299 -227
- package/src/atlassian-native-retirement.ts +33 -0
- package/src/atlassian.ts +135 -108
- package/src/browser-storage.ts +10 -0
- package/src/bundled-skills.ts +60 -17
- package/src/canonical-human-identities.ts +60 -58
- package/src/claude-provider-account-authority.ts +12 -0
- package/src/claude-subscription-oauth.ts +73 -0
- package/src/claude-subscription-usage.ts +68 -0
- package/src/client-error-report.ts +343 -0
- package/src/code-search.ts +105 -0
- package/src/codex-provider-account-authority.ts +21 -16
- package/src/company-brain-governed-writes.ts +255 -233
- package/src/company-brain.ts +164 -153
- package/src/company-profile.ts +365 -292
- package/src/connect.ts +212 -173
- package/src/connection-account-label.ts +46 -0
- package/src/connection-authority.ts +183 -364
- package/src/connector-attachments.ts +137 -122
- package/src/connector-destinations.ts +46 -42
- package/src/connector-tool-permissions.ts +117 -0
- package/src/cua-desktop-tools.gen.json +6512 -0
- package/src/cua-desktop-tools.linux.gen.json +6600 -0
- package/src/cua-desktop-tools.ts +36 -0
- package/src/cua-desktop-tools.windows.gen.json +6353 -0
- package/src/define-schema.ts +10 -0
- package/src/direct-model-provider.ts +108 -0
- package/src/editable-artifact-committed-transaction.ts +17 -0
- package/src/editable-artifact-versions.ts +7 -1
- package/src/event-preview.ts +53 -3
- package/src/external-identities.ts +262 -145
- package/src/feedback.ts +43 -30
- package/src/first-party-tool-authorization.ts +356 -0
- package/src/github-repository-contracts.ts +78 -64
- package/src/google-drive.ts +285 -234
- package/src/governed-learning-activation.ts +152 -131
- package/src/governed-learning-evaluator.ts +140 -133
- package/src/host-mcp-bindings.ts +292 -198
- package/src/image-generation.ts +104 -95
- package/src/index.ts +13354 -8654
- package/src/insights-usage.ts +727 -0
- package/src/interaction.ts +3070 -2326
- package/src/knowledge-entries.ts +428 -0
- package/src/knowledge-preparation.ts +57 -0
- package/src/knowledge.ts +246 -213
- package/src/managed-auth-session-sets.ts +220 -144
- package/src/managed-sign-in-methods.ts +52 -0
- package/src/mcp-catalog-limits.ts +2 -0
- package/src/mcp-oauth.ts +43 -34
- package/src/mcp-receipts.ts +192 -192
- package/src/mcp-structured-content.ts +81 -0
- package/src/memory-slack-delivery.ts +171 -142
- package/src/modal-native-proof-v2.ts +429 -0
- package/src/model-account-choice.ts +177 -0
- package/src/model-account-settings.ts +210 -0
- package/src/model-availability.ts +22 -0
- package/src/model-connection-access.ts +61 -14
- package/src/model-context-inspector.ts +133 -99
- package/src/model-display.ts +221 -0
- package/src/model-picker-order.ts +12 -1
- package/src/organization-access.ts +217 -0
- package/src/organization-integration-policy.ts +63 -0
- package/src/organization-membership-lifecycle.ts +528 -382
- package/src/organization-model-usage.ts +81 -0
- package/src/organization-recovery.ts +147 -135
- package/src/organization-usage.ts +94 -0
- package/src/permissions.ts +88 -52
- package/src/personal-github.ts +210 -171
- package/src/preference-registry.ts +314 -258
- package/src/prepared-mcp-setup.ts +189 -0
- package/src/product-analytics.ts +261 -0
- package/src/product-lifecycle-facts.ts +122 -0
- package/src/remember.ts +181 -167
- package/src/retained-output.ts +194 -165
- package/src/sandbox-file-artifacts.ts +60 -47
- package/src/sandbox-provider-command.ts +88 -20
- package/src/sandbox-recovery.ts +129 -0
- package/src/scoped-knowledge.ts +61 -43
- package/src/secret-generator.ts +155 -0
- package/src/secret-references.ts +414 -0
- package/src/secret-resolution.ts +274 -0
- package/src/secret-totp.ts +188 -0
- package/src/session-final-reply.ts +16 -0
- package/src/session-goal-reports.ts +64 -0
- package/src/session-history-import.ts +177 -0
- package/src/session-list-entries.ts +96 -0
- package/src/session-mcp-projections.ts +11 -0
- package/src/session-mcp-tool-permissions.ts +108 -0
- package/src/session-message-search.ts +61 -0
- package/src/session-target.ts +57 -0
- package/src/session-titles.ts +80 -10
- package/src/session-topology-primitives.ts +19 -12
- package/src/session-usage-limit-refusal.ts +101 -0
- package/src/session-usage-limits.ts +171 -0
- package/src/signup-attribution.ts +86 -0
- package/src/site-data.ts +339 -0
- package/src/site-operations.ts +154 -0
- package/src/site-publishing.ts +876 -0
- package/src/site-session-http.ts +294 -16
- package/src/site-sql.ts +1123 -0
- package/src/skill-catalog-context.ts +50 -0
- package/src/skill-files.ts +3 -3
- package/src/skill-use.ts +80 -0
- package/src/skills.ts +82 -54
- package/src/slack-bot-scopes.ts +31 -39
- package/src/slack-rest-mcp.ts +222 -0
- package/src/slack-task-policy.ts +96 -73
- package/src/spreadsheet-artifact-commands.ts +73 -2
- package/src/spreadsheet-artifact-query.ts +187 -39
- package/src/subscription-account-actions.ts +84 -0
- package/src/subscription-account-pools.ts +53 -0
- package/src/subscription-personal-authority-v2.ts +66 -0
- package/src/task-notes.ts +55 -51
- package/src/tool-action-review.ts +258 -0
- package/src/tool-catalog.ts +609 -372
- package/src/tool-policy.ts +82 -0
- package/src/tool-result-spill.ts +12 -9
- package/src/tool-review-presentation.ts +385 -0
- package/src/transcription-recordings.ts +145 -131
- package/src/turn-serving-policy.ts +166 -0
- package/src/usage-allowances.ts +248 -0
- package/src/vaults.ts +850 -0
- package/src/video-generation.ts +385 -360
- package/src/work-claims.ts +173 -149
- package/src/workspace-instruction-policies.ts +349 -275
- package/src/workspace-integration-wire.ts +101 -0
- package/src/workspace-integrations.ts +724 -0
- package/src/workspace-learning-administration.ts +57 -44
- package/src/workspace-learning-policy.ts +127 -96
- package/src/workspace-state.ts +253 -333
- package/src/xai-provider-account-authority.ts +22 -17
- package/dist/chunk-3SIZGL3O.js.map +0 -1
- package/dist/chunk-7ABONTXE.js.map +0 -1
- package/dist/chunk-BCS7WHCK.js +0 -139
- package/dist/chunk-BCS7WHCK.js.map +0 -1
- package/dist/chunk-GRG7PHWQ.js +0 -25
- package/dist/chunk-GRG7PHWQ.js.map +0 -1
- package/dist/chunk-JUFK3T4Q.js +0 -80
- package/dist/chunk-JUFK3T4Q.js.map +0 -1
- package/dist/chunk-M5ZGRVIQ.js +0 -719
- package/dist/chunk-M5ZGRVIQ.js.map +0 -1
- package/dist/chunk-MRWYRAS5.js.map +0 -1
- package/dist/chunk-OSBYTE3O.js +0 -348
- package/dist/chunk-OSBYTE3O.js.map +0 -1
- package/dist/chunk-P3HLDT77.js +0 -59
- package/dist/chunk-P3HLDT77.js.map +0 -1
- package/dist/chunk-TEMFILR7.js +0 -143
- package/dist/chunk-TEMFILR7.js.map +0 -1
- package/dist/chunk-TXTQIYCV.js.map +0 -1
- package/dist/chunk-UR2GFYIE.js +0 -22598
- package/dist/chunk-UR2GFYIE.js.map +0 -1
- package/dist/chunk-WYBDERIY.js.map +0 -1
- package/dist/chunk-Y3KNXVTD.js.map +0 -1
- package/dist/chunk-YBW5JSA3.js.map +0 -1
- package/dist/chunk-YRXAWWCU.js +0 -45
- package/dist/chunk-YRXAWWCU.js.map +0 -1
- /package/dist/{chunk-5LYFSZ7O.js.map → chunk-352X6ENP.js.map} +0 -0
- /package/dist/{chunk-WBYTNVIW.js.map → chunk-RKX3NQYS.js.map} +0 -0
- /package/dist/{chunk-O5LEQHDM.js.map → chunk-Z7WEVGCL.js.map} +0 -0
|
@@ -1,11 +1,96 @@
|
|
|
1
|
+
import { type SiteOperation } from "./site-operations.js";
|
|
2
|
+
/** The list filter a frame without a published Site gets: it names no Site, so lists nothing. */
|
|
3
|
+
export declare const SITE_NO_ORIGIN_ID = "00000000-0000-0000-0000-000000000000";
|
|
4
|
+
/**
|
|
5
|
+
* The header a host sets on every request it forwards from a Site frame. The
|
|
6
|
+
* value names the host: `1` for the console bridge, `preview` for a Codemode
|
|
7
|
+
* local preview. The API treats a request carrying it (or the pinned Site id)
|
|
8
|
+
* as Site code: only `SITE_OPERATIONS`, only the frame's own sessions.
|
|
9
|
+
*/
|
|
10
|
+
export declare const SITE_FRAME_HEADER = "x-opengeni-site-frame";
|
|
11
|
+
/** SITE_FRAME_HEADER value a Codemode local preview sets. */
|
|
12
|
+
export declare const SITE_PREVIEW_FRAME = "preview";
|
|
13
|
+
/**
|
|
14
|
+
* A random id the host mints per mounted frame. A frame without a published
|
|
15
|
+
* Site (inline HTML, previews) records it on the sessions it starts and may
|
|
16
|
+
* reach only those sessions afterwards.
|
|
17
|
+
*/
|
|
18
|
+
export declare const SITE_FRAME_ID_HEADER = "x-opengeni-site-frame-id";
|
|
19
|
+
/** The published Site (artifact id) a host pinned the frame to. */
|
|
20
|
+
export declare const SITE_ID_HEADER = "x-opengeni-site-id";
|
|
21
|
+
/** The exact Site version the pinned frame runs. */
|
|
22
|
+
export declare const SITE_VERSION_HEADER = "x-opengeni-site-version";
|
|
1
23
|
/** A Site/Codemode SDK request named a route outside the proxied surface. */
|
|
2
24
|
export declare class SiteSessionPathError extends Error {
|
|
3
25
|
readonly code = "site_session_path_unsupported";
|
|
4
26
|
constructor();
|
|
5
27
|
}
|
|
6
|
-
/**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
28
|
+
/** The host serves no Site Data: it is not bound to a published Site (inline HTML, previews). */
|
|
29
|
+
export declare class SiteDataUnsupportedError extends Error {
|
|
30
|
+
readonly code = "site_data_unsupported";
|
|
31
|
+
constructor();
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Route a request from Site code (the in-Site SDK, the console bridge, a
|
|
35
|
+
* Codemode preview) to the host workspace. This is the `SITE_OPERATIONS`
|
|
36
|
+
* allowlist: anything else is refused with SiteSessionPathError before any
|
|
37
|
+
* request is made. Ordinary API handlers still authorize every allowed
|
|
38
|
+
* operation with the viewer's own authority, and the API independently
|
|
39
|
+
* refuses frame requests outside the allowlist or to another Site's sessions.
|
|
40
|
+
*
|
|
41
|
+
* `workspaceId` `site-host` checks a path inside the Site without rewriting
|
|
42
|
+
* it. A session list must name `originSiteId=current`; the host binds it to
|
|
43
|
+
* its pinned Site, or to no Site at all when the frame has none.
|
|
44
|
+
*/
|
|
45
|
+
export declare function siteSessionPath(path: string, workspaceId: string, method?: string, siteId?: string): string;
|
|
46
|
+
/**
|
|
47
|
+
* Route an agent's own SDK request through the Codemode SDK proxy to its
|
|
48
|
+
* workspace. Unlike `siteSessionPath` this is a URL prefix boundary, not an
|
|
49
|
+
* operation allowlist: the proxy signs a short-lived credential bounded by
|
|
50
|
+
* the agent's own permission ceiling and ordinary handlers authorize every
|
|
51
|
+
* operation. Site Data is not served here (an agent uses its tools).
|
|
52
|
+
* Requests a Codemode preview forwards from Site code carry the frame marker
|
|
53
|
+
* and use `siteSessionPath` instead.
|
|
54
|
+
*/
|
|
55
|
+
export declare function siteHostWorkspacePath(path: string, workspaceId: string): string;
|
|
56
|
+
/** The Site identity a host attached to a request, from its host-set headers. */
|
|
57
|
+
export type SiteFrameHeaders = {
|
|
58
|
+
/** The pinned published Site id, or null for a frame without one. */
|
|
59
|
+
siteId: string | null;
|
|
60
|
+
versionId: string | null;
|
|
61
|
+
/** The host's frame marker value (`1`, `preview`), or null when only the Site id was set. */
|
|
62
|
+
marker: string | null;
|
|
63
|
+
frameId: string | null;
|
|
64
|
+
};
|
|
65
|
+
/** Read the host-set frame headers. Null when the request did not come from a Site frame. */
|
|
66
|
+
export declare function siteFrameFromHeaders(header: (name: string) => string | null | undefined): SiteFrameHeaders | null;
|
|
67
|
+
/**
|
|
68
|
+
* Match a request that reached a workspace route from a Site frame against
|
|
69
|
+
* `SITE_OPERATIONS`. `pathname` is the raw request path
|
|
70
|
+
* (`/v1/workspaces/<id>/...` or `/v1/config/client`). The frame's own pinned
|
|
71
|
+
* Site id maps back to `current`; any other Site id does not match.
|
|
72
|
+
*/
|
|
73
|
+
export declare function siteFrameOperation(method: string, pathname: string, workspaceId: string, frameSiteId: string | null): {
|
|
74
|
+
operation: SiteOperation;
|
|
75
|
+
suffix: string;
|
|
76
|
+
sessionId: string | null;
|
|
77
|
+
} | null;
|
|
10
78
|
/** Preserve SDK request semantics while the host supplies identity and transport headers. */
|
|
11
79
|
export declare function siteRequestHeaders(input: HeadersInit): Headers;
|
|
80
|
+
/**
|
|
81
|
+
* Session create fields a Site frame may send. The API starts the session
|
|
82
|
+
* with a minimal Site profile: no tools, servers, connections, permissions,
|
|
83
|
+
* vaults, sandbox or environment choice, resources, Skills, agent overrides,
|
|
84
|
+
* hidden model context, learning overrides, goals, channels, visibility,
|
|
85
|
+
* usage limits or nesting. Metadata keeps only keys outside `_opengeni`.
|
|
86
|
+
*/
|
|
87
|
+
export declare const SITE_FRAME_SESSION_CREATE_FIELDS: readonly string[];
|
|
88
|
+
/**
|
|
89
|
+
* The first body field a Site frame may not send for this operation (for
|
|
90
|
+
* example `payload.resources` or `type`), or null when the body is allowed.
|
|
91
|
+
* `suffix` is the operation's site-host suffix (from `siteFrameOperation` or
|
|
92
|
+
* `matchSiteOperation`). A body that is not a JSON object is left to the
|
|
93
|
+
* route, which refuses it. Only `user.message` events are allowed:
|
|
94
|
+
* approvals and answers to questions happen in the console.
|
|
95
|
+
*/
|
|
96
|
+
export declare function siteFrameBodyRefusal(operationId: string, suffix: string, body: unknown): string | null;
|
|
@@ -1,10 +1,34 @@
|
|
|
1
1
|
import {
|
|
2
|
+
SITE_FRAME_HEADER,
|
|
3
|
+
SITE_FRAME_ID_HEADER,
|
|
4
|
+
SITE_FRAME_SESSION_CREATE_FIELDS,
|
|
5
|
+
SITE_ID_HEADER,
|
|
6
|
+
SITE_NO_ORIGIN_ID,
|
|
7
|
+
SITE_PREVIEW_FRAME,
|
|
8
|
+
SITE_VERSION_HEADER,
|
|
9
|
+
SiteDataUnsupportedError,
|
|
2
10
|
SiteSessionPathError,
|
|
11
|
+
siteFrameBodyRefusal,
|
|
12
|
+
siteFrameFromHeaders,
|
|
13
|
+
siteFrameOperation,
|
|
14
|
+
siteHostWorkspacePath,
|
|
3
15
|
siteRequestHeaders,
|
|
4
16
|
siteSessionPath
|
|
5
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-TLU3UEMD.js";
|
|
6
18
|
export {
|
|
19
|
+
SITE_FRAME_HEADER,
|
|
20
|
+
SITE_FRAME_ID_HEADER,
|
|
21
|
+
SITE_FRAME_SESSION_CREATE_FIELDS,
|
|
22
|
+
SITE_ID_HEADER,
|
|
23
|
+
SITE_NO_ORIGIN_ID,
|
|
24
|
+
SITE_PREVIEW_FRAME,
|
|
25
|
+
SITE_VERSION_HEADER,
|
|
26
|
+
SiteDataUnsupportedError,
|
|
7
27
|
SiteSessionPathError,
|
|
28
|
+
siteFrameBodyRefusal,
|
|
29
|
+
siteFrameFromHeaders,
|
|
30
|
+
siteFrameOperation,
|
|
31
|
+
siteHostWorkspacePath,
|
|
8
32
|
siteRequestHeaders,
|
|
9
33
|
siteSessionPath
|
|
10
34
|
};
|
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Site SQL: optional per-Site SQLite storage on Cloudflare (one SQLite-backed
|
|
4
|
+
* Durable Object per Site, `idFromName(siteId)`), offered next to Site Data.
|
|
5
|
+
* Postgres keeps the definitions (settings, migrations and named queries) so
|
|
6
|
+
* the database can always be rebuilt; the Durable Object holds the data.
|
|
7
|
+
* Shared by the API, the Site gateway Worker (which runs the Durable Object)
|
|
8
|
+
* and the SDK. See docs/design/published-sites-2026-10-14.md (PR B).
|
|
9
|
+
*
|
|
10
|
+
* Sites never send SQL: they call named, parameterized queries an owner
|
|
11
|
+
* defined (`site.sql.run(name, params)`). Every statement, whoever wrote it,
|
|
12
|
+
* passes `compileSiteSql` on the API and again in the Durable Object.
|
|
13
|
+
*/
|
|
14
|
+
/** A value a statement parameter may take. Booleans bind as 1 and 0. */
|
|
15
|
+
export type SiteSqlValue = string | number | boolean | null;
|
|
16
|
+
export type SiteSqlStatementKind = "read" | "write" | "schema";
|
|
17
|
+
/**
|
|
18
|
+
* Who wrote the SQL, which decides what it may do:
|
|
19
|
+
* - `named`: a named query Site pages call. One read or write statement; no
|
|
20
|
+
* schema changes, PRAGMA, EXPLAIN or recursive CTEs (no RECURSIVE keyword,
|
|
21
|
+
* no CTE that refers to itself and no UNION/INTERSECT/EXCEPT inside a CTE).
|
|
22
|
+
* - `agent`: one read or write statement an owner's agent runs (query,
|
|
23
|
+
* execute), plus read-only PRAGMA and EXPLAIN. Schema changes go through
|
|
24
|
+
* migrations so the database can always be rebuilt from Postgres.
|
|
25
|
+
* - `script`: migrations and SQL imports. Many statements, run together,
|
|
26
|
+
* schema changes included.
|
|
27
|
+
*/
|
|
28
|
+
export type SiteSqlProfile = "named" | "agent" | "script";
|
|
29
|
+
export type SiteSqlProblem = "empty" | "too_long" | "syntax" | "multiple_statements" | "too_many_statements" | "statement_not_allowed" | "attach" | "vacuum" | "transaction" | "pragma" | "load_extension" | "reserved_name" | "parameter_style" | "parameter_name" | "too_many_parameters" | "recursive";
|
|
30
|
+
export type SiteSqlStatement = {
|
|
31
|
+
/** The statement with every `:name` replaced by `?`, comments removed, no trailing semicolon. */
|
|
32
|
+
sql: string;
|
|
33
|
+
kind: SiteSqlStatementKind;
|
|
34
|
+
/** Parameter names in bind order (a name used twice appears twice). */
|
|
35
|
+
params: string[];
|
|
36
|
+
};
|
|
37
|
+
export type SiteSqlCompileResult = {
|
|
38
|
+
ok: true;
|
|
39
|
+
statements: SiteSqlStatement[];
|
|
40
|
+
/** Distinct parameter names in first-use order. */
|
|
41
|
+
paramNames: string[];
|
|
42
|
+
} | {
|
|
43
|
+
ok: false;
|
|
44
|
+
problem: SiteSqlProblem;
|
|
45
|
+
message: string;
|
|
46
|
+
};
|
|
47
|
+
/** Longest SQL text per profile, in UTF-16 code units. */
|
|
48
|
+
export declare const SITE_SQL_MAX_NAMED_LENGTH: number;
|
|
49
|
+
export declare const SITE_SQL_MAX_AGENT_LENGTH: number;
|
|
50
|
+
export declare const SITE_SQL_MAX_SCRIPT_LENGTH: number;
|
|
51
|
+
export declare const SITE_SQL_MAX_SCRIPT_STATEMENTS = 2000;
|
|
52
|
+
export declare const SITE_SQL_MAX_PARAMETERS = 100;
|
|
53
|
+
/** PRAGMAs that only read the schema. Anything else (and any `=` form) is refused. */
|
|
54
|
+
export declare const SITE_SQL_READ_PRAGMAS: readonly string[];
|
|
55
|
+
/**
|
|
56
|
+
* Identifier prefixes Site SQL may not name: Cloudflare's own tables
|
|
57
|
+
* (`_cf_`) and names kept for Opengeni (`_og_`). Quoted identifiers count,
|
|
58
|
+
* and so do string literals that start with one (SQLite accepts any string
|
|
59
|
+
* as a table name, as in `FROM '_cf_KV'`), so such a value must be passed as
|
|
60
|
+
* a parameter.
|
|
61
|
+
*/
|
|
62
|
+
export declare const SITE_SQL_RESERVED_PREFIXES: readonly string[];
|
|
63
|
+
/**
|
|
64
|
+
* Parameters the API binds from the verified viewer; a Site may never supply
|
|
65
|
+
* them. `:viewer` is the viewer's stable per-Site principal (`user:<id>`,
|
|
66
|
+
* `guest:<visitor>`, ...), `:viewer_kind` its kind, `:viewer_signed_in` 1 or 0.
|
|
67
|
+
*/
|
|
68
|
+
export declare const SITE_SQL_PRINCIPAL_PARAMS: readonly string[];
|
|
69
|
+
/** `viewer` and every `viewer_*` name are reserved for the API. */
|
|
70
|
+
export declare function isSiteSqlPrincipalParam(name: string): boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Check and compile Site SQL. Refuses ATTACH/DETACH, VACUUM, transaction
|
|
73
|
+
* control, PRAGMA writes, `pragma_*` functions outside the schema readers,
|
|
74
|
+
* load_extension, reserved table names, positional or `@`/`$`/`#`
|
|
75
|
+
* parameters and, per profile, more than one statement, schema changes and
|
|
76
|
+
* recursive CTEs. Parameters are `:name` only and are rewritten to `?` with
|
|
77
|
+
* their bind order, so values are always bound, never spliced.
|
|
78
|
+
*/
|
|
79
|
+
export declare function compileSiteSql(sql: string, profile: SiteSqlProfile): SiteSqlCompileResult;
|
|
80
|
+
/** Bind values for one compiled statement; a missing name binds null. Booleans become 1 or 0. */
|
|
81
|
+
export declare function siteSqlBindings(statement: SiteSqlStatement, params: Readonly<Record<string, SiteSqlValue | undefined>>): Array<string | number | null>;
|
|
82
|
+
/** A SQLite identifier quoted for splicing (table and column names only, never values). */
|
|
83
|
+
export declare function quoteSiteSqlIdentifier(name: string): string;
|
|
84
|
+
/** Table and column names Site SQL tools accept as arguments. */
|
|
85
|
+
export declare const SITE_SQL_IDENTIFIER: RegExp;
|
|
86
|
+
export declare function isSiteSqlTableName(name: string): boolean;
|
|
87
|
+
/** Hard ceilings that hold whatever the profile or settings say. */
|
|
88
|
+
export declare const SITE_SQL_HARD_LIMITS: Readonly<{
|
|
89
|
+
maxRowsPerCall: 5000;
|
|
90
|
+
maxResponseBytes: number;
|
|
91
|
+
storageBytesPerSite: number;
|
|
92
|
+
exportBytesPerCall: number;
|
|
93
|
+
importRowsPerCall: 5000;
|
|
94
|
+
/** UTF-8 bytes of SQL all of a Site's migrations hold together, so a rebuild fits in bounded calls. */
|
|
95
|
+
migrationBytesPerSite: number;
|
|
96
|
+
/** Bytes one export call returns at most; follow nextCursor for the rest. */
|
|
97
|
+
exportBytesPerResponse: number;
|
|
98
|
+
}>;
|
|
99
|
+
/** Response header of the HTTP export: the cursor of the next piece, when there is one. */
|
|
100
|
+
export declare const SITE_SQL_EXPORT_NEXT_CURSOR_HEADER = "X-OpenGeni-Export-Next-Cursor";
|
|
101
|
+
/**
|
|
102
|
+
* Effective Site SQL limits for one Site. Null means no Opengeni cap (the
|
|
103
|
+
* hard limits still hold).
|
|
104
|
+
*/
|
|
105
|
+
export type SiteSqlLimits = {
|
|
106
|
+
storageBytesPerSite: number;
|
|
107
|
+
rowsReadPerSitePerMonth: number | null;
|
|
108
|
+
rowsWrittenPerSitePerMonth: number | null;
|
|
109
|
+
callsPerMinutePerViewer: number | null;
|
|
110
|
+
callsPerMinutePerSite: number | null;
|
|
111
|
+
maxRowsPerCall: number;
|
|
112
|
+
maxResponseBytes: number;
|
|
113
|
+
};
|
|
114
|
+
export declare const SITE_SQL_NAME: RegExp;
|
|
115
|
+
export declare const SiteSqlValueSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
116
|
+
export declare const SiteSqlParams: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
|
|
117
|
+
export type SiteSqlParams = z.infer<typeof SiteSqlParams>;
|
|
118
|
+
/**
|
|
119
|
+
* Who may run a named query from a Site page:
|
|
120
|
+
* - everyone: every viewer, including anonymous guests of public Sites;
|
|
121
|
+
* - signed_in: viewers signed in as a person (workspace members, invited
|
|
122
|
+
* people and, on public Sites, any signed-in user). Callers with no person
|
|
123
|
+
* behind them (service keys, agents and schedules acting on their own) are
|
|
124
|
+
* refused unless they manage the Site;
|
|
125
|
+
* - managers: only the Site's managers, through agent tools and the console's
|
|
126
|
+
* Data view; Site pages cannot run it.
|
|
127
|
+
*/
|
|
128
|
+
export declare const SiteSqlQueryAudience: z.ZodEnum<{
|
|
129
|
+
everyone: "everyone";
|
|
130
|
+
managers: "managers";
|
|
131
|
+
signed_in: "signed_in";
|
|
132
|
+
}>;
|
|
133
|
+
export type SiteSqlQueryAudience = z.infer<typeof SiteSqlQueryAudience>;
|
|
134
|
+
/** site_sql_define_query and PUT .../sql/queries/:name. */
|
|
135
|
+
export declare const SiteSqlQueryDefinitionRequest: z.ZodObject<{
|
|
136
|
+
sql: z.ZodString;
|
|
137
|
+
audience: z.ZodOptional<z.ZodEnum<{
|
|
138
|
+
everyone: "everyone";
|
|
139
|
+
managers: "managers";
|
|
140
|
+
signed_in: "signed_in";
|
|
141
|
+
}>>;
|
|
142
|
+
description: z.ZodOptional<z.ZodString>;
|
|
143
|
+
maxRows: z.ZodOptional<z.ZodNumber>;
|
|
144
|
+
}, z.core.$strip>;
|
|
145
|
+
export type SiteSqlQueryDefinitionRequest = z.infer<typeof SiteSqlQueryDefinitionRequest>;
|
|
146
|
+
/** POST .../published-artifacts/current/sql/queries/:name (Site pages, `site.sql.run`). */
|
|
147
|
+
export declare const SiteSqlRunRequest: z.ZodObject<{
|
|
148
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
|
|
149
|
+
}, z.core.$strip>;
|
|
150
|
+
export type SiteSqlRunRequest = z.infer<typeof SiteSqlRunRequest>;
|
|
151
|
+
/** POST .../sql/query and .../sql/execute: one ad hoc statement from a manager. */
|
|
152
|
+
export declare const SiteSqlStatementRequest: z.ZodObject<{
|
|
153
|
+
sql: z.ZodString;
|
|
154
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
|
|
155
|
+
maxRows: z.ZodOptional<z.ZodNumber>;
|
|
156
|
+
}, z.core.$strip>;
|
|
157
|
+
export type SiteSqlStatementRequest = z.infer<typeof SiteSqlStatementRequest>;
|
|
158
|
+
/** POST .../sql/reset. */
|
|
159
|
+
export declare const SiteSqlResetRequest: z.ZodObject<{
|
|
160
|
+
confirm: z.ZodLiteral<true>;
|
|
161
|
+
schema: z.ZodOptional<z.ZodEnum<{
|
|
162
|
+
drop: "drop";
|
|
163
|
+
keep: "keep";
|
|
164
|
+
}>>;
|
|
165
|
+
}, z.core.$strip>;
|
|
166
|
+
export type SiteSqlResetRequest = z.infer<typeof SiteSqlResetRequest>;
|
|
167
|
+
export declare const SiteSqlMigrationRequest: z.ZodObject<{
|
|
168
|
+
name: z.ZodString;
|
|
169
|
+
sql: z.ZodString;
|
|
170
|
+
}, z.core.$strip>;
|
|
171
|
+
export type SiteSqlMigrationRequest = z.infer<typeof SiteSqlMigrationRequest>;
|
|
172
|
+
export declare const SiteSqlExportFormat: z.ZodEnum<{
|
|
173
|
+
csv: "csv";
|
|
174
|
+
json: "json";
|
|
175
|
+
sql: "sql";
|
|
176
|
+
}>;
|
|
177
|
+
export type SiteSqlExportFormat = z.infer<typeof SiteSqlExportFormat>;
|
|
178
|
+
export declare const SiteSqlImportRequest: z.ZodObject<{
|
|
179
|
+
format: z.ZodEnum<{
|
|
180
|
+
csv: "csv";
|
|
181
|
+
json: "json";
|
|
182
|
+
sql: "sql";
|
|
183
|
+
}>;
|
|
184
|
+
sql: z.ZodOptional<z.ZodString>;
|
|
185
|
+
table: z.ZodOptional<z.ZodString>;
|
|
186
|
+
csv: z.ZodOptional<z.ZodString>;
|
|
187
|
+
rows: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>>;
|
|
188
|
+
onConflict: z.ZodOptional<z.ZodEnum<{
|
|
189
|
+
fail: "fail";
|
|
190
|
+
ignore: "ignore";
|
|
191
|
+
replace: "replace";
|
|
192
|
+
}>>;
|
|
193
|
+
}, z.core.$strip>;
|
|
194
|
+
export type SiteSqlImportRequest = z.infer<typeof SiteSqlImportRequest>;
|
|
195
|
+
/** PUT .../sql/settings: the owner turns Site SQL on or off for one Site. */
|
|
196
|
+
export declare const SiteSqlSettingsRequest: z.ZodObject<{
|
|
197
|
+
enabled: z.ZodBoolean;
|
|
198
|
+
}, z.core.$strip>;
|
|
199
|
+
export type SiteSqlSettingsRequest = z.infer<typeof SiteSqlSettingsRequest>;
|
|
200
|
+
export declare const SiteSqlErrorCode: z.ZodEnum<{
|
|
201
|
+
conflict: "conflict";
|
|
202
|
+
disabled: "disabled";
|
|
203
|
+
forbidden: "forbidden";
|
|
204
|
+
not_found: "not_found";
|
|
205
|
+
quota_exceeded: "quota_exceeded";
|
|
206
|
+
rate_limited: "rate_limited";
|
|
207
|
+
sql_error: "sql_error";
|
|
208
|
+
unavailable: "unavailable";
|
|
209
|
+
validation: "validation";
|
|
210
|
+
}>;
|
|
211
|
+
export type SiteSqlErrorCode = z.infer<typeof SiteSqlErrorCode>;
|
|
212
|
+
export declare const SITE_SQL_ERROR_STATUS: Readonly<Record<SiteSqlErrorCode, number>>;
|
|
213
|
+
/** A row as a Site sees it. Blobs come back as `{ "$base64": "..." }`. */
|
|
214
|
+
export type SiteSqlRow = Record<string, unknown>;
|
|
215
|
+
export type SiteSqlRunResponse = {
|
|
216
|
+
columns: string[];
|
|
217
|
+
rows: SiteSqlRow[];
|
|
218
|
+
/** True when maxRows or the response size cut the result short. */
|
|
219
|
+
truncated: boolean;
|
|
220
|
+
rowsRead: number;
|
|
221
|
+
rowsWritten: number;
|
|
222
|
+
};
|
|
223
|
+
export type SiteSqlQueryResponse = {
|
|
224
|
+
name: string;
|
|
225
|
+
sql: string;
|
|
226
|
+
mode: "read" | "write";
|
|
227
|
+
params: string[];
|
|
228
|
+
audience: SiteSqlQueryAudience;
|
|
229
|
+
description: string | null;
|
|
230
|
+
maxRows: number | null;
|
|
231
|
+
createdAt: string;
|
|
232
|
+
updatedAt: string;
|
|
233
|
+
};
|
|
234
|
+
export type SiteSqlMigrationResponse = {
|
|
235
|
+
ordinal: number;
|
|
236
|
+
name: string;
|
|
237
|
+
sql: string;
|
|
238
|
+
checksum: string;
|
|
239
|
+
createdAt: string;
|
|
240
|
+
};
|
|
241
|
+
export type SiteSqlUsageResponse = {
|
|
242
|
+
storageBytes: number;
|
|
243
|
+
rowsReadThisMonth: number;
|
|
244
|
+
rowsWrittenThisMonth: number;
|
|
245
|
+
};
|
|
246
|
+
export type SiteSqlDescribeResponse = {
|
|
247
|
+
siteId: string;
|
|
248
|
+
/** Site SQL is configured on this deployment. */
|
|
249
|
+
available: boolean;
|
|
250
|
+
/** The owner turned Site SQL on for this Site. */
|
|
251
|
+
enabled: boolean;
|
|
252
|
+
migrations: SiteSqlMigrationResponse[];
|
|
253
|
+
queries: SiteSqlQueryResponse[];
|
|
254
|
+
usage: SiteSqlUsageResponse;
|
|
255
|
+
limits: SiteSqlLimits;
|
|
256
|
+
};
|
|
257
|
+
export type SiteSqlMigrateResponse = {
|
|
258
|
+
migration: SiteSqlMigrationResponse;
|
|
259
|
+
/** Migrations the database applied now (earlier ones it was missing, then this one). */
|
|
260
|
+
applied: string[];
|
|
261
|
+
};
|
|
262
|
+
export type SiteSqlImportResponse = {
|
|
263
|
+
/** Rows inserted (csv, json) or data statements run (sql). */
|
|
264
|
+
imported: number;
|
|
265
|
+
/** The migration a sql import recorded for its schema statements (before the data), if any. */
|
|
266
|
+
migration: string | null;
|
|
267
|
+
/**
|
|
268
|
+
* Every migration a sql import recorded, in order: its schema statements
|
|
269
|
+
* before the data, then its triggers after the data (so they do not fire
|
|
270
|
+
* on imported rows).
|
|
271
|
+
*/
|
|
272
|
+
migrations: string[];
|
|
273
|
+
rowsWritten: number;
|
|
274
|
+
};
|
|
275
|
+
export type SiteSqlResetResponse = {
|
|
276
|
+
applied: string[];
|
|
277
|
+
droppedSchema: boolean;
|
|
278
|
+
};
|
|
279
|
+
/**
|
|
280
|
+
* The gateway route the API calls for a Site's Durable Object:
|
|
281
|
+
* `POST <gateway internal origin>/_og/internal/site-db/<siteId>/<operation>`,
|
|
282
|
+
* signed like gateway -> API requests (`siteGatewayCanonicalString` over the
|
|
283
|
+
* internal path and the gateway's host, empty session, visitor, IP and human
|
|
284
|
+
* fields, the shared gateway secret, 30 s skew). The path prefix keeps these
|
|
285
|
+
* signatures distinct from any site-runtime request.
|
|
286
|
+
*/
|
|
287
|
+
export declare const SITE_DB_INTERNAL_PREFIX = "/_og/internal/site-db";
|
|
288
|
+
export declare const SITE_DB_OPERATIONS: readonly ["run", "script", "migrate", "insert", "export", "inspect", "reset"];
|
|
289
|
+
export type SiteDbOperation = (typeof SITE_DB_OPERATIONS)[number];
|
|
290
|
+
export declare function siteDbInternalPath(siteId: string, operation: SiteDbOperation): string;
|
|
291
|
+
/** Every internal request names a fresh id; the Durable Object refuses a replay within the skew window. */
|
|
292
|
+
type SiteDbBase = {
|
|
293
|
+
requestId: string;
|
|
294
|
+
};
|
|
295
|
+
export type SiteDbRunRequest = SiteDbBase & {
|
|
296
|
+
sql: string;
|
|
297
|
+
profile: "named" | "agent";
|
|
298
|
+
params: Record<string, SiteSqlValue>;
|
|
299
|
+
/** The mode a named query was defined with; a read that writes is rolled back. */
|
|
300
|
+
expect?: "read" | "write";
|
|
301
|
+
maxRows: number;
|
|
302
|
+
maxResponseBytes: number;
|
|
303
|
+
maxDatabaseBytes: number;
|
|
304
|
+
};
|
|
305
|
+
export type SiteDbScriptRequest = SiteDbBase & {
|
|
306
|
+
sql: string;
|
|
307
|
+
maxDatabaseBytes: number;
|
|
308
|
+
};
|
|
309
|
+
export type SiteDbMigrateRequest = SiteDbBase & {
|
|
310
|
+
/**
|
|
311
|
+
* Migrations to apply in order; ones already applied (same checksum) are
|
|
312
|
+
* skipped. `position` is the migration's ordinal in Postgres, so the
|
|
313
|
+
* database keeps the order when the API sends only the missing ones.
|
|
314
|
+
* `checksum` is the lowercase hex SHA-256 of `sql` (UTF-8); the Durable
|
|
315
|
+
* Object recomputes it and refuses a mismatch.
|
|
316
|
+
*/
|
|
317
|
+
migrations: Array<{
|
|
318
|
+
name: string;
|
|
319
|
+
sql: string;
|
|
320
|
+
checksum: string;
|
|
321
|
+
position?: number;
|
|
322
|
+
}>;
|
|
323
|
+
/**
|
|
324
|
+
* Delete everything first, then apply these migrations (the first call of
|
|
325
|
+
* a rebuild from Postgres; later calls send the rest without it).
|
|
326
|
+
*/
|
|
327
|
+
rebuild?: boolean;
|
|
328
|
+
maxDatabaseBytes: number;
|
|
329
|
+
};
|
|
330
|
+
/** Inspect; `migrationsOnly` skips the tables (and their row counts). */
|
|
331
|
+
export type SiteDbInspectRequest = SiteDbBase & {
|
|
332
|
+
migrationsOnly?: boolean;
|
|
333
|
+
};
|
|
334
|
+
export type SiteDbInsertRequest = SiteDbBase & {
|
|
335
|
+
table: string;
|
|
336
|
+
columns: string[];
|
|
337
|
+
rows: SiteSqlValue[][];
|
|
338
|
+
onConflict: "fail" | "replace" | "ignore";
|
|
339
|
+
maxDatabaseBytes: number;
|
|
340
|
+
};
|
|
341
|
+
export type SiteDbExportRequest = SiteDbBase & {
|
|
342
|
+
/** Tables to export; all user tables when omitted. */
|
|
343
|
+
tables?: string[];
|
|
344
|
+
/** nextCursor from the previous page. */
|
|
345
|
+
cursor?: string | null;
|
|
346
|
+
maxRows: number;
|
|
347
|
+
maxBytes: number;
|
|
348
|
+
};
|
|
349
|
+
export type SiteDbMeter = {
|
|
350
|
+
rowsRead: number;
|
|
351
|
+
rowsWritten: number;
|
|
352
|
+
/** Database size after the operation. */
|
|
353
|
+
databaseBytes: number;
|
|
354
|
+
};
|
|
355
|
+
export type SiteDbSchemaEntry = {
|
|
356
|
+
type: "table" | "index" | "view" | "trigger";
|
|
357
|
+
name: string;
|
|
358
|
+
table: string;
|
|
359
|
+
sql: string | null;
|
|
360
|
+
};
|
|
361
|
+
export type SiteDbRunResponse = SiteDbMeter & {
|
|
362
|
+
columns: string[];
|
|
363
|
+
rows: SiteSqlRow[];
|
|
364
|
+
truncated: boolean;
|
|
365
|
+
};
|
|
366
|
+
export type SiteDbMigrateResponse = SiteDbMeter & {
|
|
367
|
+
applied: string[];
|
|
368
|
+
};
|
|
369
|
+
export type SiteDbExportResponse = SiteDbMeter & {
|
|
370
|
+
/** The whole database schema, on every page. */
|
|
371
|
+
schema: SiteDbSchemaEntry[];
|
|
372
|
+
/** Row values in column order; blobs as `{ "$base64": "..." }`. */
|
|
373
|
+
tables: Array<{
|
|
374
|
+
name: string;
|
|
375
|
+
columns: string[];
|
|
376
|
+
rows: unknown[][];
|
|
377
|
+
}>;
|
|
378
|
+
nextCursor: string | null;
|
|
379
|
+
};
|
|
380
|
+
export type SiteDbInspectResponse = SiteDbMeter & {
|
|
381
|
+
tables: Array<{
|
|
382
|
+
name: string;
|
|
383
|
+
type: "table" | "view";
|
|
384
|
+
sql: string | null;
|
|
385
|
+
columns: Array<{
|
|
386
|
+
name: string;
|
|
387
|
+
type: string;
|
|
388
|
+
notNull: boolean;
|
|
389
|
+
primaryKey: boolean;
|
|
390
|
+
defaultValue: string | null;
|
|
391
|
+
}>;
|
|
392
|
+
/** Rows, counted up to 100,000 (rowCountCapped says the count stopped there). */
|
|
393
|
+
rowCount: number;
|
|
394
|
+
rowCountCapped: boolean;
|
|
395
|
+
}>;
|
|
396
|
+
indexes: SiteDbSchemaEntry[];
|
|
397
|
+
migrations: Array<{
|
|
398
|
+
name: string;
|
|
399
|
+
checksum: string;
|
|
400
|
+
appliedAt: string;
|
|
401
|
+
}>;
|
|
402
|
+
};
|
|
403
|
+
/** GET .../sql/inspect: the database as the Durable Object sees it. */
|
|
404
|
+
export type SiteSqlInspectResponse = Omit<SiteDbInspectResponse, "rowsRead" | "rowsWritten"> & {
|
|
405
|
+
/** Migrations Postgres has that the database has not applied (migrate or reset to apply). */
|
|
406
|
+
pendingMigrations: string[];
|
|
407
|
+
};
|
|
408
|
+
export type SiteDbErrorCode = "validation" | "sql_error" | "quota_exceeded" | "conflict" | "replayed" | "too_large" | "unauthorized" | "not_found"
|
|
409
|
+
/** SQLite or Durable Object failures that are not the caller's (busy, I/O, corruption); 500. */
|
|
410
|
+
| "internal";
|
|
411
|
+
export type SiteDbErrorBody = {
|
|
412
|
+
error: {
|
|
413
|
+
code: SiteDbErrorCode;
|
|
414
|
+
message: string;
|
|
415
|
+
};
|
|
416
|
+
};
|
|
417
|
+
/** Encode a SQLite blob for JSON. */
|
|
418
|
+
export declare function siteSqlBlobValue(bytes: Uint8Array): {
|
|
419
|
+
$base64: string;
|
|
420
|
+
};
|
|
421
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Durable, model-visible catalog context. Text markers survive SDK/provider replay. */
|
|
2
|
+
export declare const SKILL_CATALOG_CONTEXT_PREFIX = "<opengeni_skill_catalog>\n";
|
|
3
|
+
export declare const SKILL_CATALOG_CONTEXT_SUFFIX = "\n</opengeni_skill_catalog>";
|
|
4
|
+
export declare function skillCatalogContextItem(catalog: string): Record<string, unknown>;
|
|
5
|
+
/** Accept the Chat Completions projection and SDK text-part normalization too. */
|
|
6
|
+
export declare function readSkillCatalogContext(item: Record<string, unknown>): string | null;
|
|
7
|
+
export declare function latestSkillCatalogContext(items: readonly Record<string, unknown>[]): Record<string, unknown> | undefined;
|
package/dist/skill-files.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Shared text-folder limits for API admission, runtime imports and checkout. */
|
|
2
|
-
export declare const SKILL_MAX_FILES =
|
|
2
|
+
export declare const SKILL_MAX_FILES = 1024;
|
|
3
3
|
export declare const SKILL_MAX_FILE_BYTES: number;
|
|
4
4
|
export declare const SKILL_MAX_TOTAL_BYTES: number;
|
|
5
5
|
export declare function isSafeSkillRelativePath(path: string): boolean;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* `_meta` key of the content-free Skill-use fact on a model `skill_read`
|
|
4
|
+
* result. MCP `_meta` never reaches the model: it survives only into the
|
|
5
|
+
* `agent.toolCall.output` event projection, never into model history.
|
|
6
|
+
*/
|
|
7
|
+
export declare const SKILL_USE_META_KEY: "opengeni/skillUse";
|
|
8
|
+
/** Where the Skill a read resolved to comes from. `personal` is a user-scope Skill. */
|
|
9
|
+
export declare const SkillUseSource: z.ZodEnum<{
|
|
10
|
+
builtin: "builtin";
|
|
11
|
+
organization: "organization";
|
|
12
|
+
personal: "personal";
|
|
13
|
+
session: "session";
|
|
14
|
+
workspace: "workspace";
|
|
15
|
+
}>;
|
|
16
|
+
export type SkillUseSource = z.infer<typeof SkillUseSource>;
|
|
17
|
+
/**
|
|
18
|
+
* What a `skill_read` returned: `full` is the default SKILL.md read, `files`
|
|
19
|
+
* explicit paths, `list` a path inventory, and `already_in_context` the short
|
|
20
|
+
* repeat receipt. `refused` means the read returned an error instead of Skill
|
|
21
|
+
* text; it has no result, so it appears only in metrics.
|
|
22
|
+
*/
|
|
23
|
+
export declare const SkillReadKind: z.ZodEnum<{
|
|
24
|
+
already_in_context: "already_in_context";
|
|
25
|
+
files: "files";
|
|
26
|
+
full: "full";
|
|
27
|
+
list: "list";
|
|
28
|
+
refused: "refused";
|
|
29
|
+
}>;
|
|
30
|
+
export type SkillReadKind = z.infer<typeof SkillReadKind>;
|
|
31
|
+
/**
|
|
32
|
+
* Ids, digests, and counts only. Never Skill text, user text, or a Skill's
|
|
33
|
+
* title or description. `label` is reserved for a platform display label of a
|
|
34
|
+
* built-in; user-authored Skills never set it. This is the writer's closed
|
|
35
|
+
* shape: an unknown field fails the parse, so nothing else can be attached.
|
|
36
|
+
*/
|
|
37
|
+
export declare const SkillUse: z.ZodObject<{
|
|
38
|
+
id: z.ZodString;
|
|
39
|
+
source: z.ZodEnum<{
|
|
40
|
+
builtin: "builtin";
|
|
41
|
+
organization: "organization";
|
|
42
|
+
personal: "personal";
|
|
43
|
+
session: "session";
|
|
44
|
+
workspace: "workspace";
|
|
45
|
+
}>;
|
|
46
|
+
label: z.ZodOptional<z.ZodString>;
|
|
47
|
+
contentSha256: z.ZodOptional<z.ZodString>;
|
|
48
|
+
revisionId: z.ZodOptional<z.ZodString>;
|
|
49
|
+
kind: z.ZodEnum<{
|
|
50
|
+
already_in_context: "already_in_context";
|
|
51
|
+
files: "files";
|
|
52
|
+
full: "full";
|
|
53
|
+
list: "list";
|
|
54
|
+
}>;
|
|
55
|
+
bytes: z.ZodNumber;
|
|
56
|
+
inIndex: z.ZodBoolean;
|
|
57
|
+
searchedThisTurn: z.ZodBoolean;
|
|
58
|
+
}, z.core.$strict>;
|
|
59
|
+
export type SkillUse = z.infer<typeof SkillUse>;
|
|
60
|
+
/** The Skill-use fact on a tool result or its event projection, when present and valid. */
|
|
61
|
+
export declare function skillUseFromToolOutput(output: unknown): SkillUse | null;
|