@opengeni/contracts 3.1.0-canary.2 → 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 +0 -2
- 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-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-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 +138 -0
- package/dist/external-identities.js +9 -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 +5 -0
- package/dist/host-mcp-bindings.js +233 -170
- package/dist/host-mcp-bindings.js.map +1 -1
- package/dist/image-generation.d.ts +1 -0
- package/dist/index.d.ts +16761 -5946
- package/dist/index.js +1973 -260
- 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 +81 -2
- 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-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/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-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/xai-provider-account-authority.js +2 -1
- package/package.json +93 -5
- package/src/agent-authored-durable-text.ts +14 -11
- package/src/agent-config.ts +1698 -0
- package/src/agent-instruction-changes.ts +91 -74
- package/src/agent-learning.ts +94 -67
- 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 +249 -176
- 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 +252 -198
- package/src/image-generation.ts +104 -95
- package/src/index.ts +13235 -8687
- package/src/insights-usage.ts +727 -0
- package/src/interaction.ts +3070 -2326
- package/src/knowledge-entries.ts +361 -276
- 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 -276
- 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 +250 -220
- package/src/xai-provider-account-authority.ts +22 -17
- package/dist/chunk-2AC63F4S.js +0 -171
- package/dist/chunk-2AC63F4S.js.map +0 -1
- 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-OVFORMPW.js +0 -348
- package/dist/chunk-OVFORMPW.js.map +0 -1
- package/dist/chunk-P3HLDT77.js +0 -59
- package/dist/chunk-P3HLDT77.js.map +0 -1
- package/dist/chunk-QQUJ6NPW.js +0 -23093
- package/dist/chunk-QQUJ6NPW.js.map +0 -1
- package/dist/chunk-TXTQIYCV.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/host-mcp-resolvers.d.ts +0 -32
- package/dist/host-mcp-resolvers.js +0 -34
- package/dist/host-mcp-resolvers.js.map +0 -1
- package/src/host-mcp-resolvers.ts +0 -50
- /package/dist/{chunk-5LYFSZ7O.js.map → chunk-352X6ENP.js.map} +0 -0
- /package/dist/{chunk-O5LEQHDM.js.map → chunk-Z7WEVGCL.js.map} +0 -0
package/src/knowledge-entries.ts
CHANGED
|
@@ -1,321 +1,404 @@
|
|
|
1
|
+
import { defineSchema } from "./define-schema";
|
|
1
2
|
import { z } from "zod";
|
|
2
3
|
import { AgentLearningMode } from "./agent-learning";
|
|
3
4
|
|
|
4
|
-
export const KnowledgeEntryKind =
|
|
5
|
-
"source",
|
|
6
|
-
|
|
7
|
-
"decision",
|
|
8
|
-
"requirement",
|
|
9
|
-
"incident",
|
|
10
|
-
"note",
|
|
11
|
-
"group",
|
|
12
|
-
]);
|
|
5
|
+
export const KnowledgeEntryKind = /* @__PURE__ */ defineSchema(() =>
|
|
6
|
+
z.enum(["source", "fact", "decision", "requirement", "incident", "note", "group"]),
|
|
7
|
+
);
|
|
13
8
|
export type KnowledgeEntryKind = z.infer<typeof KnowledgeEntryKind>;
|
|
14
9
|
|
|
15
|
-
export const KnowledgeEntryScope =
|
|
10
|
+
export const KnowledgeEntryScope = /* @__PURE__ */ defineSchema(() =>
|
|
11
|
+
z.enum(["organization", "workspace", "personal"]),
|
|
12
|
+
);
|
|
16
13
|
export type KnowledgeEntryScope = z.infer<typeof KnowledgeEntryScope>;
|
|
17
14
|
|
|
18
15
|
/** Source-shaped location, not a second copy of the source body. */
|
|
19
|
-
export const KnowledgeEvidenceLocation =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
(
|
|
32
|
-
value
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
16
|
+
export const KnowledgeEvidenceLocation = /* @__PURE__ */ defineSchema(() =>
|
|
17
|
+
z
|
|
18
|
+
.object({
|
|
19
|
+
page: z.number().int().positive().optional(),
|
|
20
|
+
passage: z.string().max(2048).optional(),
|
|
21
|
+
messageIds: z.array(z.string().min(1).max(1024)).max(256).optional(),
|
|
22
|
+
path: z.string().min(1).max(4096).optional(),
|
|
23
|
+
commit: z.string().min(1).max(256).optional(),
|
|
24
|
+
lineStart: z.number().int().positive().optional(),
|
|
25
|
+
lineEnd: z.number().int().positive().optional(),
|
|
26
|
+
})
|
|
27
|
+
.strict()
|
|
28
|
+
.refine(
|
|
29
|
+
(value) =>
|
|
30
|
+
value.lineEnd === undefined ||
|
|
31
|
+
(value.lineStart !== undefined && value.lineEnd >= value.lineStart),
|
|
32
|
+
"an ending line requires a starting line and cannot precede it",
|
|
33
|
+
),
|
|
34
|
+
);
|
|
36
35
|
export type KnowledgeEvidenceLocation = z.infer<typeof KnowledgeEvidenceLocation>;
|
|
37
36
|
|
|
38
|
-
export const KnowledgeEntryEvidence =
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
37
|
+
export const KnowledgeEntryEvidence = /* @__PURE__ */ defineSchema(() =>
|
|
38
|
+
z
|
|
39
|
+
.object({
|
|
40
|
+
entryId: z.uuid(),
|
|
41
|
+
revisionId: z.uuid(),
|
|
42
|
+
location: KnowledgeEvidenceLocation.default({}),
|
|
43
|
+
quote: z.string().optional(),
|
|
44
|
+
})
|
|
45
|
+
.strict(),
|
|
46
|
+
);
|
|
46
47
|
export type KnowledgeEntryEvidence = z.infer<typeof KnowledgeEntryEvidence>;
|
|
47
48
|
|
|
48
|
-
export const KnowledgeEntrySource =
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
49
|
+
export const KnowledgeEntrySource = /* @__PURE__ */ defineSchema(() =>
|
|
50
|
+
z
|
|
51
|
+
.object({
|
|
52
|
+
kind: z.enum([
|
|
53
|
+
"file",
|
|
54
|
+
"slack",
|
|
55
|
+
"conversation",
|
|
56
|
+
"repository",
|
|
57
|
+
"web",
|
|
58
|
+
"connector",
|
|
59
|
+
"manual",
|
|
60
|
+
"task_note",
|
|
61
|
+
]),
|
|
62
|
+
noteId: z.uuid().optional(),
|
|
63
|
+
fileId: z.uuid().optional(),
|
|
64
|
+
documentId: z.uuid().optional(),
|
|
65
|
+
sessionId: z.uuid().optional(),
|
|
66
|
+
uri: z.string().min(1).max(8192).optional(),
|
|
67
|
+
externalId: z.string().min(1).max(2048).optional(),
|
|
68
|
+
version: z.string().min(1).max(2048).optional(),
|
|
69
|
+
capturedAt: z.string().datetime({ offset: true }).optional(),
|
|
70
|
+
retention: z.enum(["full_text", "passages", "reference"]).optional(),
|
|
71
|
+
/** Supporting evidence stays retrievable by ID without entering default discovery. */
|
|
72
|
+
purpose: z.enum(["evidence", "reference"]).optional(),
|
|
73
|
+
})
|
|
74
|
+
.strict(),
|
|
75
|
+
);
|
|
71
76
|
export type KnowledgeEntrySource = z.infer<typeof KnowledgeEntrySource>;
|
|
72
77
|
|
|
73
|
-
export const KnowledgeEntryRelationship =
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
78
|
+
export const KnowledgeEntryRelationship = /* @__PURE__ */ defineSchema(() =>
|
|
79
|
+
z
|
|
80
|
+
.object({
|
|
81
|
+
entryId: z.uuid(),
|
|
82
|
+
relation: z.enum(["related_to", "depends_on", "applies_to", "conflicts_with", "supersedes"]),
|
|
83
|
+
})
|
|
84
|
+
.strict(),
|
|
85
|
+
);
|
|
79
86
|
export type KnowledgeEntryRelationship = z.infer<typeof KnowledgeEntryRelationship>;
|
|
80
87
|
|
|
81
|
-
export const KnowledgeEntryContent =
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
88
|
+
export const KnowledgeEntryContent = /* @__PURE__ */ defineSchema(() =>
|
|
89
|
+
z
|
|
90
|
+
.object({
|
|
91
|
+
title: z.string().min(1),
|
|
92
|
+
kind: KnowledgeEntryKind,
|
|
93
|
+
// Exact accepted content. Request admission and paginated reads own size;
|
|
94
|
+
// source text is not truncated to the former 4,000-character Memory cap.
|
|
95
|
+
content: z.string(),
|
|
96
|
+
source: KnowledgeEntrySource.optional(),
|
|
97
|
+
evidence: z.array(KnowledgeEntryEvidence).max(256).default([]),
|
|
98
|
+
groupIds: z.array(z.uuid()).max(256).default([]),
|
|
99
|
+
relationships: z.array(KnowledgeEntryRelationship).max(256).default([]),
|
|
100
|
+
})
|
|
101
|
+
.strict()
|
|
102
|
+
.superRefine((value, context) => {
|
|
103
|
+
if (value.kind !== "group" && value.kind !== "source" && !value.content.trim()) {
|
|
104
|
+
context.addIssue({
|
|
105
|
+
code: "custom",
|
|
106
|
+
path: ["content"],
|
|
107
|
+
message: "knowledge content is empty",
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
if (value.kind === "source" && !value.source) {
|
|
111
|
+
context.addIssue({
|
|
112
|
+
code: "custom",
|
|
113
|
+
path: ["source"],
|
|
114
|
+
message: "source entries require source identity",
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
if (new Set(value.groupIds).size !== value.groupIds.length) {
|
|
118
|
+
context.addIssue({
|
|
119
|
+
code: "custom",
|
|
120
|
+
path: ["groupIds"],
|
|
121
|
+
message: "group membership contains duplicate IDs",
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}),
|
|
125
|
+
);
|
|
117
126
|
export type KnowledgeEntryContent = z.infer<typeof KnowledgeEntryContent>;
|
|
118
127
|
/** Historical relationships are lossless. Admission limits apply to new writes. */
|
|
119
|
-
export const StoredKnowledgeEntryContent =
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
128
|
+
export const StoredKnowledgeEntryContent = /* @__PURE__ */ defineSchema(() =>
|
|
129
|
+
KnowledgeEntryContent.safeExtend({
|
|
130
|
+
evidence: z.array(KnowledgeEntryEvidence).default([]),
|
|
131
|
+
groupIds: z.array(z.uuid()).default([]),
|
|
132
|
+
relationships: z.array(KnowledgeEntryRelationship).default([]),
|
|
133
|
+
}),
|
|
134
|
+
);
|
|
135
|
+
|
|
136
|
+
const NIL_UUID = "00000000-0000-0000-0000-000000000000";
|
|
137
|
+
/**
|
|
138
|
+
* Omit on create: the host derives the entry id from the operation, so an exact
|
|
139
|
+
* retry replays the same entry. Required to correct an existing entry.
|
|
140
|
+
*/
|
|
141
|
+
const KnowledgeWriteEntryId = /* @__PURE__ */ defineSchema(() =>
|
|
142
|
+
z
|
|
143
|
+
.uuid()
|
|
144
|
+
.refine((value) => value !== NIL_UUID, {
|
|
145
|
+
message: "entryId must be a real entry id; omit it to create a new entry",
|
|
146
|
+
})
|
|
147
|
+
.optional(),
|
|
148
|
+
);
|
|
124
149
|
|
|
125
150
|
/** Scope identity and agent policy are resolved by the host, never supplied by the model. */
|
|
126
|
-
export const KnowledgeEntrySaveRequest =
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
151
|
+
export const KnowledgeEntrySaveRequest = /* @__PURE__ */ defineSchema(() =>
|
|
152
|
+
z
|
|
153
|
+
.object({
|
|
154
|
+
operationId: z.uuid(),
|
|
155
|
+
entryId: KnowledgeWriteEntryId,
|
|
156
|
+
expectedVersion: z.number().int().nonnegative(),
|
|
157
|
+
scope: KnowledgeEntryScope.optional(),
|
|
158
|
+
entry: KnowledgeEntryContent.safeExtend({ title: z.string().min(1).max(1024) }),
|
|
159
|
+
})
|
|
160
|
+
.strict(),
|
|
161
|
+
);
|
|
135
162
|
export type KnowledgeEntrySaveRequest = z.input<typeof KnowledgeEntrySaveRequest>;
|
|
136
163
|
|
|
137
|
-
export const KnowledgeTaskNotePromotionRequest =
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
164
|
+
export const KnowledgeTaskNotePromotionRequest = /* @__PURE__ */ defineSchema(() =>
|
|
165
|
+
z
|
|
166
|
+
.object({
|
|
167
|
+
operationId: z.uuid(),
|
|
168
|
+
entryId: KnowledgeWriteEntryId,
|
|
169
|
+
expectedVersion: z.literal(0),
|
|
170
|
+
noteId: z.uuid(),
|
|
171
|
+
expectedNoteVersion: z.literal(1),
|
|
172
|
+
title: z.string().min(1).max(1024),
|
|
173
|
+
groupIds: z.array(z.uuid()).max(256).default([]),
|
|
174
|
+
})
|
|
175
|
+
.strict(),
|
|
176
|
+
);
|
|
148
177
|
export type KnowledgeTaskNotePromotionRequest = z.input<typeof KnowledgeTaskNotePromotionRequest>;
|
|
149
178
|
|
|
150
|
-
export const KnowledgeEntryReviewRequest =
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
(
|
|
162
|
-
|
|
163
|
-
|
|
179
|
+
export const KnowledgeEntryReviewRequest = /* @__PURE__ */ defineSchema(() =>
|
|
180
|
+
z
|
|
181
|
+
.object({
|
|
182
|
+
operationId: z.uuid(),
|
|
183
|
+
entryId: z.uuid(),
|
|
184
|
+
revisionId: z.uuid(),
|
|
185
|
+
expectedVersion: z.number().int().positive(),
|
|
186
|
+
decision: z.enum(["approve", "reject"]),
|
|
187
|
+
entry: KnowledgeEntryContent.safeExtend({ title: z.string().min(1).max(1024) }).optional(),
|
|
188
|
+
})
|
|
189
|
+
.strict()
|
|
190
|
+
.refine(
|
|
191
|
+
(value) => !value.entry || value.decision === "approve",
|
|
192
|
+
"Only approval can include an edited entry",
|
|
193
|
+
),
|
|
194
|
+
);
|
|
164
195
|
export type KnowledgeEntryReviewRequest = z.input<typeof KnowledgeEntryReviewRequest>;
|
|
165
196
|
|
|
166
|
-
export const KnowledgeEntryBatchReviewRequest =
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
197
|
+
export const KnowledgeEntryBatchReviewRequest = /* @__PURE__ */ defineSchema(() =>
|
|
198
|
+
z
|
|
199
|
+
.object({
|
|
200
|
+
entries: z.array(KnowledgeEntryReviewRequest).min(1).max(100),
|
|
201
|
+
})
|
|
202
|
+
.strict()
|
|
203
|
+
.refine(
|
|
204
|
+
(value) => new Set(value.entries.map((entry) => entry.entryId)).size === value.entries.length,
|
|
205
|
+
"A review batch cannot repeat an entry",
|
|
206
|
+
),
|
|
207
|
+
);
|
|
175
208
|
export type KnowledgeEntryBatchReviewRequest = z.input<typeof KnowledgeEntryBatchReviewRequest>;
|
|
176
209
|
|
|
177
|
-
export const KnowledgeEntryRestoreRequest =
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
210
|
+
export const KnowledgeEntryRestoreRequest = /* @__PURE__ */ defineSchema(() =>
|
|
211
|
+
z
|
|
212
|
+
.object({
|
|
213
|
+
operationId: z.uuid(),
|
|
214
|
+
entryId: z.uuid(),
|
|
215
|
+
revisionId: z.uuid(),
|
|
216
|
+
expectedVersion: z.number().int().positive(),
|
|
217
|
+
})
|
|
218
|
+
.strict(),
|
|
219
|
+
);
|
|
185
220
|
export type KnowledgeEntryRestoreRequest = z.infer<typeof KnowledgeEntryRestoreRequest>;
|
|
186
221
|
|
|
187
|
-
export const KnowledgeEntryWriteReceipt =
|
|
188
|
-
.object({
|
|
189
|
-
operationId: z.uuid(),
|
|
190
|
-
entryId: z.uuid(),
|
|
191
|
-
revisionId: z.uuid(),
|
|
192
|
-
version: z.number().int().positive(),
|
|
193
|
-
outcome: z.enum(["published", "pending", "rejected", "archived"]),
|
|
194
|
-
reviewBatchId: z.uuid().nullable(),
|
|
195
|
-
replayed: z.boolean(),
|
|
196
|
-
})
|
|
197
|
-
.strict();
|
|
198
|
-
export type KnowledgeEntryWriteReceipt = z.infer<typeof KnowledgeEntryWriteReceipt>;
|
|
199
|
-
|
|
200
|
-
export const KnowledgeFilePreparationResult = z.discriminatedUnion("status", [
|
|
222
|
+
export const KnowledgeEntryWriteReceipt = /* @__PURE__ */ defineSchema(() =>
|
|
201
223
|
z
|
|
202
224
|
.object({
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
225
|
+
operationId: z.uuid(),
|
|
226
|
+
entryId: z.uuid(),
|
|
227
|
+
revisionId: z.uuid(),
|
|
228
|
+
version: z.number().int().positive(),
|
|
229
|
+
outcome: z.enum(["published", "pending", "rejected", "archived"]),
|
|
230
|
+
reviewBatchId: z.uuid().nullable(),
|
|
231
|
+
replayed: z.boolean(),
|
|
207
232
|
})
|
|
208
233
|
.strict(),
|
|
209
|
-
|
|
210
|
-
|
|
234
|
+
);
|
|
235
|
+
export type KnowledgeEntryWriteReceipt = z.infer<typeof KnowledgeEntryWriteReceipt>;
|
|
236
|
+
|
|
237
|
+
export const KnowledgeFilePreparationResult = /* @__PURE__ */ defineSchema(() =>
|
|
238
|
+
z.discriminatedUnion("status", [
|
|
239
|
+
z
|
|
240
|
+
.object({
|
|
241
|
+
status: z.literal("retained"),
|
|
242
|
+
fileId: z.uuid(),
|
|
243
|
+
filename: z.string(),
|
|
244
|
+
receipt: KnowledgeEntryWriteReceipt,
|
|
245
|
+
})
|
|
246
|
+
.strict(),
|
|
247
|
+
z.object({ status: z.literal("disabled"), fileId: z.uuid() }).strict(),
|
|
248
|
+
]),
|
|
249
|
+
);
|
|
211
250
|
export type KnowledgeFilePreparationResult = z.infer<typeof KnowledgeFilePreparationResult>;
|
|
212
251
|
|
|
213
|
-
export const KnowledgeEntryRevision =
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
252
|
+
export const KnowledgeEntryRevision = /* @__PURE__ */ defineSchema(() =>
|
|
253
|
+
z
|
|
254
|
+
.object({
|
|
255
|
+
id: z.uuid(),
|
|
256
|
+
entryId: z.uuid(),
|
|
257
|
+
number: z.number().int().positive(),
|
|
258
|
+
change: z.enum(["upsert", "archive"]),
|
|
259
|
+
entry: StoredKnowledgeEntryContent,
|
|
260
|
+
previousRevisionId: z.uuid().nullable(),
|
|
261
|
+
restoredFromRevisionId: z.uuid().nullable(),
|
|
262
|
+
createdAt: z.string().datetime({ offset: true }),
|
|
263
|
+
createdBySessionId: z.uuid().nullable(),
|
|
264
|
+
reviewBatchId: z.uuid().nullable(),
|
|
265
|
+
outcome: z.enum(["published", "pending", "rejected", "superseded"]),
|
|
266
|
+
})
|
|
267
|
+
.strict(),
|
|
268
|
+
);
|
|
228
269
|
export type KnowledgeEntryRevision = z.infer<typeof KnowledgeEntryRevision>;
|
|
229
270
|
|
|
271
|
+
/** Search/index progress is independent of saved source and keyword access. */
|
|
272
|
+
export const KnowledgeIndexStatus = /* @__PURE__ */ defineSchema(() =>
|
|
273
|
+
z.enum([
|
|
274
|
+
"saved",
|
|
275
|
+
"queued",
|
|
276
|
+
"indexing",
|
|
277
|
+
"awaiting_funding",
|
|
278
|
+
"indexed",
|
|
279
|
+
"source_unavailable",
|
|
280
|
+
"provider_failed",
|
|
281
|
+
]),
|
|
282
|
+
);
|
|
283
|
+
export type KnowledgeIndexStatus = z.infer<typeof KnowledgeIndexStatus>;
|
|
284
|
+
|
|
230
285
|
/** Private owner IDs are not part of a content-discovery projection. */
|
|
231
|
-
export const KnowledgeEntryRecord =
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
286
|
+
export const KnowledgeEntryRecord = /* @__PURE__ */ defineSchema(() =>
|
|
287
|
+
z
|
|
288
|
+
.object({
|
|
289
|
+
id: z.uuid(),
|
|
290
|
+
scope: KnowledgeEntryScope,
|
|
291
|
+
version: z.number().int().positive(),
|
|
292
|
+
publishedRevisionId: z.uuid().nullable(),
|
|
293
|
+
latestRevisionId: z.uuid(),
|
|
294
|
+
revision: KnowledgeEntryRevision,
|
|
295
|
+
archived: z.boolean(),
|
|
296
|
+
createdAt: z.string().datetime({ offset: true }),
|
|
297
|
+
updatedAt: z.string().datetime({ offset: true }),
|
|
298
|
+
indexStatus: KnowledgeIndexStatus.optional(),
|
|
299
|
+
})
|
|
300
|
+
.strict(),
|
|
301
|
+
);
|
|
244
302
|
export type KnowledgeEntryRecord = z.infer<typeof KnowledgeEntryRecord>;
|
|
245
303
|
|
|
246
|
-
export const KnowledgeEntryListRequest =
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
304
|
+
export const KnowledgeEntryListRequest = /* @__PURE__ */ defineSchema(() =>
|
|
305
|
+
z
|
|
306
|
+
.object({
|
|
307
|
+
query: z.string().max(4096).optional(),
|
|
308
|
+
mode: z.enum(["hybrid", "keyword", "vector"]).default("hybrid"),
|
|
309
|
+
scope: KnowledgeEntryScope.optional(),
|
|
310
|
+
groupId: z.uuid().optional(),
|
|
311
|
+
/** Top-level entries with no visible collection in the selected scope. */
|
|
312
|
+
rootOnly: z.boolean().optional(),
|
|
313
|
+
fileId: z.uuid().optional(),
|
|
314
|
+
/** Include supporting sources in published discovery; never changes access. */
|
|
315
|
+
includeEvidence: z.boolean().optional(),
|
|
316
|
+
kind: KnowledgeEntryKind.optional(),
|
|
317
|
+
/** Inclusive original entry creation time; revisions and updates do not reset it. */
|
|
318
|
+
createdSince: z.string().datetime({ offset: true }).optional(),
|
|
319
|
+
view: z.enum(["published", "needs_review", "archived", "rejected"]).default("published"),
|
|
320
|
+
sessionId: z.uuid().optional(),
|
|
321
|
+
reviewBatchId: z.uuid().optional(),
|
|
322
|
+
cursor: z.string().min(1).max(2048).optional(),
|
|
323
|
+
limit: z.number().int().positive().max(50).default(20),
|
|
324
|
+
})
|
|
325
|
+
.strict(),
|
|
326
|
+
);
|
|
263
327
|
export type KnowledgeEntryListRequest = z.input<typeof KnowledgeEntryListRequest>;
|
|
264
328
|
|
|
265
329
|
/** Lists never transfer whole source texts or evidence quotations. */
|
|
266
|
-
export const KnowledgeEntrySummary =
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
330
|
+
export const KnowledgeEntrySummary = /* @__PURE__ */ defineSchema(() =>
|
|
331
|
+
KnowledgeEntryRecord.omit({ revision: true }).extend({
|
|
332
|
+
score: z.number().finite().optional(),
|
|
333
|
+
excerpts: z
|
|
334
|
+
.array(
|
|
335
|
+
z.object({
|
|
336
|
+
field: z.enum(["title", "content"]),
|
|
337
|
+
start: z.number().int().nonnegative(),
|
|
338
|
+
end: z.number().int().nonnegative(),
|
|
339
|
+
text: z.string(),
|
|
340
|
+
}),
|
|
341
|
+
)
|
|
342
|
+
.default([]),
|
|
343
|
+
revision: KnowledgeEntryRevision.omit({ entry: true }).extend({
|
|
344
|
+
title: z.string(),
|
|
345
|
+
kind: KnowledgeEntryKind,
|
|
346
|
+
preview: z.string(),
|
|
347
|
+
groupIds: z.array(z.uuid()),
|
|
348
|
+
sourceKind: KnowledgeEntrySource.shape.kind.nullable(),
|
|
349
|
+
}),
|
|
284
350
|
}),
|
|
285
|
-
|
|
351
|
+
);
|
|
286
352
|
export type KnowledgeEntrySummary = z.infer<typeof KnowledgeEntrySummary>;
|
|
287
353
|
|
|
288
|
-
export const KnowledgeEntryListResponse =
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
354
|
+
export const KnowledgeEntryListResponse = /* @__PURE__ */ defineSchema(() =>
|
|
355
|
+
z.object({
|
|
356
|
+
entries: z.array(KnowledgeEntrySummary),
|
|
357
|
+
nextCursor: z.string().nullable(),
|
|
358
|
+
searchMode: z.enum(["keyword", "hybrid", "vector"]).optional(),
|
|
359
|
+
fallbackReason: z
|
|
360
|
+
.enum([
|
|
361
|
+
"awaiting_funding",
|
|
362
|
+
"credits_disabled",
|
|
363
|
+
"quota",
|
|
364
|
+
"provider_unavailable",
|
|
365
|
+
"query_limit",
|
|
366
|
+
])
|
|
367
|
+
.optional(),
|
|
368
|
+
}),
|
|
369
|
+
);
|
|
293
370
|
export type KnowledgeEntryListResponse = z.infer<typeof KnowledgeEntryListResponse>;
|
|
294
371
|
|
|
295
|
-
export const KnowledgeReviewBatch =
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
})
|
|
372
|
+
export const KnowledgeReviewBatch = /* @__PURE__ */ defineSchema(() =>
|
|
373
|
+
z.object({
|
|
374
|
+
id: z.uuid(),
|
|
375
|
+
sessionId: z.uuid().nullable(),
|
|
376
|
+
scheduledTaskId: z.uuid().nullable(),
|
|
377
|
+
scheduledTaskRunId: z.uuid().nullable(),
|
|
378
|
+
title: z.string().nullable(),
|
|
379
|
+
scope: KnowledgeEntryScope,
|
|
380
|
+
pendingCount: z.number().int().nonnegative(),
|
|
381
|
+
createdAt: z.string().datetime({ offset: true }),
|
|
382
|
+
}),
|
|
383
|
+
);
|
|
305
384
|
export type KnowledgeReviewBatch = z.infer<typeof KnowledgeReviewBatch>;
|
|
306
385
|
|
|
307
|
-
export const KnowledgeReviewBatchListRequest =
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
386
|
+
export const KnowledgeReviewBatchListRequest = /* @__PURE__ */ defineSchema(() =>
|
|
387
|
+
z
|
|
388
|
+
.object({
|
|
389
|
+
scope: KnowledgeEntryScope.optional(),
|
|
390
|
+
cursor: z.string().min(1).max(2048).optional(),
|
|
391
|
+
limit: z.number().int().positive().max(50).default(20),
|
|
392
|
+
})
|
|
393
|
+
.strict(),
|
|
394
|
+
);
|
|
314
395
|
export type KnowledgeReviewBatchListRequest = z.input<typeof KnowledgeReviewBatchListRequest>;
|
|
315
|
-
export const KnowledgeReviewBatchListResponse =
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
396
|
+
export const KnowledgeReviewBatchListResponse = /* @__PURE__ */ defineSchema(() =>
|
|
397
|
+
z.object({
|
|
398
|
+
batches: z.array(KnowledgeReviewBatch),
|
|
399
|
+
nextCursor: z.string().nullable(),
|
|
400
|
+
}),
|
|
401
|
+
);
|
|
319
402
|
export type KnowledgeReviewBatchListResponse = z.infer<typeof KnowledgeReviewBatchListResponse>;
|
|
320
403
|
|
|
321
404
|
/** All policy outcomes are nonblocking; Off refuses authoring, not task execution. */
|
|
@@ -330,14 +413,16 @@ export function knowledgeWriteDisposition(mode: z.infer<typeof AgentLearningMode
|
|
|
330
413
|
}
|
|
331
414
|
}
|
|
332
415
|
|
|
333
|
-
export const KnowledgeOriginalFileDownload =
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
416
|
+
export const KnowledgeOriginalFileDownload = /* @__PURE__ */ defineSchema(() =>
|
|
417
|
+
z
|
|
418
|
+
.object({
|
|
419
|
+
url: z.string().url(),
|
|
420
|
+
expiresAt: z.string(),
|
|
421
|
+
fileId: z.uuid(),
|
|
422
|
+
filename: z.string(),
|
|
423
|
+
contentType: z.string(),
|
|
424
|
+
sizeBytes: z.number().int().nonnegative(),
|
|
425
|
+
})
|
|
426
|
+
.strict(),
|
|
427
|
+
);
|
|
343
428
|
export type KnowledgeOriginalFileDownload = z.infer<typeof KnowledgeOriginalFileDownload>;
|