@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
package/src/mcp-receipts.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { defineSchema } from "./define-schema";
|
|
1
2
|
import { z } from "zod";
|
|
2
3
|
|
|
3
4
|
/**
|
|
@@ -28,254 +29,253 @@ function boundedUtf8String(maxBytes: number, minLength = 0) {
|
|
|
28
29
|
});
|
|
29
30
|
}
|
|
30
31
|
|
|
31
|
-
export const McpMutationReceiptOutcome =
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
32
|
+
export const McpMutationReceiptOutcome = /* @__PURE__ */ defineSchema(() =>
|
|
33
|
+
z.enum([
|
|
34
|
+
"created",
|
|
35
|
+
"updated",
|
|
36
|
+
"deleted",
|
|
37
|
+
"unchanged",
|
|
38
|
+
"accepted",
|
|
39
|
+
"triggered",
|
|
40
|
+
"repaired",
|
|
41
|
+
"replayed",
|
|
42
|
+
"partial_failure",
|
|
43
|
+
]),
|
|
44
|
+
);
|
|
42
45
|
export type McpMutationReceiptOutcome = z.infer<typeof McpMutationReceiptOutcome>;
|
|
43
46
|
|
|
44
|
-
export const McpMutationReceiptIdempotencyStatus =
|
|
45
|
-
"not_supported",
|
|
46
|
-
|
|
47
|
-
"applied",
|
|
48
|
-
"replayed",
|
|
49
|
-
"unknown",
|
|
50
|
-
]);
|
|
47
|
+
export const McpMutationReceiptIdempotencyStatus = /* @__PURE__ */ defineSchema(() =>
|
|
48
|
+
z.enum(["not_supported", "not_requested", "applied", "replayed", "unknown"]),
|
|
49
|
+
);
|
|
51
50
|
export type McpMutationReceiptIdempotencyStatus = z.infer<
|
|
52
51
|
typeof McpMutationReceiptIdempotencyStatus
|
|
53
52
|
>;
|
|
54
53
|
|
|
55
|
-
export const McpMutationResource =
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
54
|
+
export const McpMutationResource = /* @__PURE__ */ defineSchema(() =>
|
|
55
|
+
z
|
|
56
|
+
.object({
|
|
57
|
+
type: boundedUtf8String(128, 1),
|
|
58
|
+
id: boundedUtf8String(256, 1),
|
|
59
|
+
version: z.union([z.number().int().nonnegative(), boundedUtf8String(128, 1)]).optional(),
|
|
60
|
+
etag: boundedUtf8String(512, 1).optional(),
|
|
61
|
+
state: boundedUtf8String(128, 1).optional(),
|
|
62
|
+
})
|
|
63
|
+
.strict(),
|
|
64
|
+
);
|
|
64
65
|
export type McpMutationResource = z.infer<typeof McpMutationResource>;
|
|
65
66
|
|
|
66
|
-
const McpMutationReceiptFact =
|
|
67
|
-
boundedUtf8String(512),
|
|
68
|
-
|
|
69
|
-
z.boolean(),
|
|
70
|
-
z.null(),
|
|
71
|
-
]);
|
|
67
|
+
const McpMutationReceiptFact = /* @__PURE__ */ defineSchema(() =>
|
|
68
|
+
z.union([boundedUtf8String(512), z.number().finite(), z.boolean(), z.null()]),
|
|
69
|
+
);
|
|
72
70
|
|
|
73
|
-
const McpMutationReceiptFacts =
|
|
74
|
-
.record(boundedUtf8String(64, 1), McpMutationReceiptFact)
|
|
75
|
-
.superRefine((value, context) => {
|
|
71
|
+
const McpMutationReceiptFacts = /* @__PURE__ */ defineSchema(() =>
|
|
72
|
+
z.record(boundedUtf8String(64, 1), McpMutationReceiptFact).superRefine((value, context) => {
|
|
76
73
|
if (Object.keys(value).length > 16) {
|
|
77
74
|
context.addIssue({
|
|
78
75
|
code: "custom",
|
|
79
76
|
message: "receipt facts may contain at most 16 scalar entries",
|
|
80
77
|
});
|
|
81
78
|
}
|
|
82
|
-
})
|
|
79
|
+
}),
|
|
80
|
+
);
|
|
83
81
|
|
|
84
|
-
const McpMutationReceiptNextActionArguments =
|
|
85
|
-
.record(boundedUtf8String(64, 1), McpMutationReceiptFact)
|
|
86
|
-
.superRefine((value, context) => {
|
|
82
|
+
const McpMutationReceiptNextActionArguments = /* @__PURE__ */ defineSchema(() =>
|
|
83
|
+
z.record(boundedUtf8String(64, 1), McpMutationReceiptFact).superRefine((value, context) => {
|
|
87
84
|
if (Object.keys(value).length > 8) {
|
|
88
85
|
context.addIssue({
|
|
89
86
|
code: "custom",
|
|
90
87
|
message: "receipt nextAction arguments may contain at most 8 scalar entries",
|
|
91
88
|
});
|
|
92
89
|
}
|
|
93
|
-
})
|
|
90
|
+
}),
|
|
91
|
+
);
|
|
94
92
|
|
|
95
|
-
export const McpMutationReceipt =
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
[
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
93
|
+
export const McpMutationReceipt = /* @__PURE__ */ defineSchema(() =>
|
|
94
|
+
z
|
|
95
|
+
.object({
|
|
96
|
+
receiptVersion: z.literal(MCP_MUTATION_RECEIPT_VERSION),
|
|
97
|
+
operation: boundedUtf8String(128, 1),
|
|
98
|
+
// v1 receipts describe committed truth only. Validation/auth/conflict and
|
|
99
|
+
// fully compensated failures remain MCP errors rather than success-shaped
|
|
100
|
+
// committed=false results.
|
|
101
|
+
committed: z.literal(true),
|
|
102
|
+
outcome: McpMutationReceiptOutcome,
|
|
103
|
+
changed: z.boolean(),
|
|
104
|
+
resource: McpMutationResource,
|
|
105
|
+
relatedResources: z.array(McpMutationResource).max(8).optional(),
|
|
106
|
+
timestamp: z.string().datetime({ offset: true }),
|
|
107
|
+
idempotency: z
|
|
108
|
+
.object({
|
|
109
|
+
status: McpMutationReceiptIdempotencyStatus,
|
|
110
|
+
})
|
|
111
|
+
.strict(),
|
|
112
|
+
partialFailure: z
|
|
113
|
+
.object({
|
|
114
|
+
stage: boundedUtf8String(128, 1),
|
|
115
|
+
retryable: z.boolean(),
|
|
116
|
+
})
|
|
117
|
+
.strict()
|
|
118
|
+
.optional(),
|
|
119
|
+
warnings: z.array(boundedUtf8String(512, 1)).max(20),
|
|
120
|
+
nextAction: z
|
|
121
|
+
.object({
|
|
122
|
+
tool: boundedUtf8String(128, 1),
|
|
123
|
+
arguments: McpMutationReceiptNextActionArguments,
|
|
124
|
+
})
|
|
125
|
+
.strict()
|
|
126
|
+
.optional(),
|
|
127
|
+
/** Operation-specific outcome facts. Values are deliberately bounded scalars. */
|
|
128
|
+
facts: McpMutationReceiptFacts.optional(),
|
|
129
|
+
/**
|
|
130
|
+
* Bounded session_create compatibility aliases. Existing orchestration
|
|
131
|
+
* consumers use these server-authored lineage facts to spawn descendants
|
|
132
|
+
* without fetching the full session entity.
|
|
133
|
+
*/
|
|
134
|
+
id: boundedUtf8String(256, 1).optional(),
|
|
135
|
+
rootSessionId: boundedUtf8String(256, 1).optional(),
|
|
136
|
+
nestedAgentDepth: z.number().int().nonnegative().optional(),
|
|
137
|
+
effectiveMaxNestedAgentDepth: z.number().int().nonnegative().optional(),
|
|
138
|
+
/** Bounded session_steer compatibility alias for resource.id. */
|
|
139
|
+
updateId: boundedUtf8String(256, 1).optional(),
|
|
140
|
+
})
|
|
141
|
+
.strict()
|
|
142
|
+
.superRefine((receipt, context) => {
|
|
143
|
+
const sessionCreateCompatibility = [
|
|
144
|
+
["id", receipt.id],
|
|
145
|
+
["rootSessionId", receipt.rootSessionId],
|
|
146
|
+
["nestedAgentDepth", receipt.nestedAgentDepth],
|
|
147
|
+
["effectiveMaxNestedAgentDepth", receipt.effectiveMaxNestedAgentDepth],
|
|
148
|
+
] as const;
|
|
149
|
+
if (receipt.operation === "session_create") {
|
|
150
|
+
for (const [field, value] of sessionCreateCompatibility) {
|
|
151
|
+
if (value === undefined) {
|
|
152
|
+
context.addIssue({
|
|
153
|
+
code: "custom",
|
|
154
|
+
path: [field],
|
|
155
|
+
message: `session_create receipts require ${field}`,
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
if (receipt.id !== undefined && receipt.id !== receipt.resource.id) {
|
|
153
160
|
context.addIssue({
|
|
154
161
|
code: "custom",
|
|
155
|
-
path: [
|
|
156
|
-
message:
|
|
162
|
+
path: ["id"],
|
|
163
|
+
message: "session_create id must equal resource.id",
|
|
157
164
|
});
|
|
158
165
|
}
|
|
166
|
+
} else {
|
|
167
|
+
for (const [field, value] of sessionCreateCompatibility) {
|
|
168
|
+
if (value !== undefined) {
|
|
169
|
+
context.addIssue({
|
|
170
|
+
code: "custom",
|
|
171
|
+
path: [field],
|
|
172
|
+
message: `${field} is only valid for session_create receipts`,
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
}
|
|
159
176
|
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
if (value !== undefined) {
|
|
177
|
+
|
|
178
|
+
if (receipt.operation === "session_steer") {
|
|
179
|
+
if (receipt.updateId === undefined) {
|
|
180
|
+
context.addIssue({
|
|
181
|
+
code: "custom",
|
|
182
|
+
path: ["updateId"],
|
|
183
|
+
message: "session_steer receipts require updateId",
|
|
184
|
+
});
|
|
185
|
+
} else if (receipt.updateId !== receipt.resource.id) {
|
|
170
186
|
context.addIssue({
|
|
171
187
|
code: "custom",
|
|
172
|
-
path: [
|
|
173
|
-
message:
|
|
188
|
+
path: ["updateId"],
|
|
189
|
+
message: "session_steer updateId must equal resource.id",
|
|
174
190
|
});
|
|
175
191
|
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
if (receipt.operation === "session_steer") {
|
|
180
|
-
if (receipt.updateId === undefined) {
|
|
192
|
+
} else if (receipt.updateId !== undefined) {
|
|
181
193
|
context.addIssue({
|
|
182
194
|
code: "custom",
|
|
183
195
|
path: ["updateId"],
|
|
184
|
-
message: "session_steer receipts
|
|
185
|
-
});
|
|
186
|
-
} else if (receipt.updateId !== receipt.resource.id) {
|
|
187
|
-
context.addIssue({
|
|
188
|
-
code: "custom",
|
|
189
|
-
path: ["updateId"],
|
|
190
|
-
message: "session_steer updateId must equal resource.id",
|
|
196
|
+
message: "updateId is only valid for session_steer receipts",
|
|
191
197
|
});
|
|
192
198
|
}
|
|
193
|
-
} else if (receipt.updateId !== undefined) {
|
|
194
|
-
context.addIssue({
|
|
195
|
-
code: "custom",
|
|
196
|
-
path: ["updateId"],
|
|
197
|
-
message: "updateId is only valid for session_steer receipts",
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
199
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
200
|
+
if (receipt.outcome === "partial_failure") {
|
|
201
|
+
if (!receipt.committed) {
|
|
202
|
+
context.addIssue({
|
|
203
|
+
code: "custom",
|
|
204
|
+
path: ["committed"],
|
|
205
|
+
message: "partial-failure receipts describe a committed mutation",
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
if (!receipt.partialFailure) {
|
|
209
|
+
context.addIssue({
|
|
210
|
+
code: "custom",
|
|
211
|
+
path: ["partialFailure"],
|
|
212
|
+
message: "partial-failure receipts require stage and retryability",
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
} else if (receipt.partialFailure) {
|
|
210
216
|
context.addIssue({
|
|
211
217
|
code: "custom",
|
|
212
218
|
path: ["partialFailure"],
|
|
213
|
-
message: "
|
|
219
|
+
message: "partialFailure is only valid for a partial_failure outcome",
|
|
214
220
|
});
|
|
215
221
|
}
|
|
216
|
-
} else if (receipt.partialFailure) {
|
|
217
|
-
context.addIssue({
|
|
218
|
-
code: "custom",
|
|
219
|
-
path: ["partialFailure"],
|
|
220
|
-
message: "partialFailure is only valid for a partial_failure outcome",
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
222
|
|
|
224
|
-
|
|
225
|
-
context.addIssue({
|
|
226
|
-
code: "custom",
|
|
227
|
-
path: ["changed"],
|
|
228
|
-
message: "unchanged receipts cannot report changed=true",
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
if (receipt.outcome === "repaired") {
|
|
232
|
-
if (!receipt.changed) {
|
|
223
|
+
if (receipt.outcome === "unchanged" && receipt.changed) {
|
|
233
224
|
context.addIssue({
|
|
234
225
|
code: "custom",
|
|
235
226
|
path: ["changed"],
|
|
236
|
-
message: "
|
|
227
|
+
message: "unchanged receipts cannot report changed=true",
|
|
237
228
|
});
|
|
238
229
|
}
|
|
239
|
-
if (receipt.
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
230
|
+
if (receipt.outcome === "repaired") {
|
|
231
|
+
if (!receipt.changed) {
|
|
232
|
+
context.addIssue({
|
|
233
|
+
code: "custom",
|
|
234
|
+
path: ["changed"],
|
|
235
|
+
message: "a repair must report changed=true",
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
if (receipt.idempotency.status !== "applied") {
|
|
239
|
+
context.addIssue({
|
|
240
|
+
code: "custom",
|
|
241
|
+
path: ["idempotency", "status"],
|
|
242
|
+
message: "repaired outcomes require idempotency.status=applied",
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
245
|
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
246
|
+
if (receipt.outcome === "replayed") {
|
|
247
|
+
if (receipt.changed) {
|
|
248
|
+
context.addIssue({
|
|
249
|
+
code: "custom",
|
|
250
|
+
path: ["changed"],
|
|
251
|
+
message: "a replay does not apply a new mutation",
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
if (receipt.idempotency.status !== "replayed") {
|
|
255
|
+
context.addIssue({
|
|
256
|
+
code: "custom",
|
|
257
|
+
path: ["idempotency", "status"],
|
|
258
|
+
message: "replayed outcomes require idempotency.status=replayed",
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
} else if (
|
|
262
|
+
receipt.idempotency.status === "replayed" &&
|
|
263
|
+
!(receipt.outcome === "partial_failure" && !receipt.changed)
|
|
264
|
+
) {
|
|
249
265
|
context.addIssue({
|
|
250
266
|
code: "custom",
|
|
251
|
-
path: ["
|
|
252
|
-
message:
|
|
267
|
+
path: ["outcome"],
|
|
268
|
+
message:
|
|
269
|
+
"idempotency.status=replayed requires a replayed outcome or unchanged partial failure",
|
|
253
270
|
});
|
|
254
271
|
}
|
|
255
|
-
|
|
272
|
+
|
|
273
|
+
if (utf8ByteLength(JSON.stringify(receipt, null, 2)) > MCP_MUTATION_RECEIPT_MAX_BYTES) {
|
|
256
274
|
context.addIssue({
|
|
257
275
|
code: "custom",
|
|
258
|
-
|
|
259
|
-
message: "replayed outcomes require idempotency.status=replayed",
|
|
276
|
+
message: `receipt must contain at most ${MCP_MUTATION_RECEIPT_MAX_BYTES} UTF-8 bytes when serialized as pretty JSON`,
|
|
260
277
|
});
|
|
261
278
|
}
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
!(receipt.outcome === "partial_failure" && !receipt.changed)
|
|
265
|
-
) {
|
|
266
|
-
context.addIssue({
|
|
267
|
-
code: "custom",
|
|
268
|
-
path: ["outcome"],
|
|
269
|
-
message:
|
|
270
|
-
"idempotency.status=replayed requires a replayed outcome or unchanged partial failure",
|
|
271
|
-
});
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
if (utf8ByteLength(JSON.stringify(receipt, null, 2)) > MCP_MUTATION_RECEIPT_MAX_BYTES) {
|
|
275
|
-
context.addIssue({
|
|
276
|
-
code: "custom",
|
|
277
|
-
message: `receipt must contain at most ${MCP_MUTATION_RECEIPT_MAX_BYTES} UTF-8 bytes when serialized as pretty JSON`,
|
|
278
|
-
});
|
|
279
|
-
}
|
|
280
|
-
});
|
|
279
|
+
}),
|
|
280
|
+
);
|
|
281
281
|
export type McpMutationReceipt = z.infer<typeof McpMutationReceipt>;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { AttemptToolResult } from "./tool-catalog";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Remove the backwards-compatibility text copy of an MCP result's
|
|
5
|
+
* `structuredContent`.
|
|
6
|
+
*
|
|
7
|
+
* The MCP specification asks a server that returns `structuredContent` to also
|
|
8
|
+
* return the same value serialized in a text content block. Printing or sending
|
|
9
|
+
* both pays for the payload twice, and the text copy pays again for JSON string
|
|
10
|
+
* escaping inside the result envelope.
|
|
11
|
+
*
|
|
12
|
+
* The envelope (`content`, `structuredContent`, `_meta`, `isError`, extension
|
|
13
|
+
* fields) and its key order are kept. Only a plain `{type: "text", text}` block
|
|
14
|
+
* whose text parses as JSON to a value equal to `structuredContent` is removed.
|
|
15
|
+
* Prose, differing JSON, annotated text, images, resources, and every other
|
|
16
|
+
* block stay. A text block whose JSON carries an integer outside the IEEE-754
|
|
17
|
+
* safe range also stays, because its digits may be more precise than the
|
|
18
|
+
* parsed `structuredContent`. Numbers compare by IEEE-754 value.
|
|
19
|
+
*
|
|
20
|
+
* Results without a removable block are returned as the same object.
|
|
21
|
+
*
|
|
22
|
+
* Callers: the runtime's model-facing MCP projection, and the default
|
|
23
|
+
* `ogtool call` print. The native Connected Machine client implements the
|
|
24
|
+
* same rule in `agent/crates/opengeni-agent/src/codemode.rs`; keep them equal.
|
|
25
|
+
*/
|
|
26
|
+
export function omitStructuredContentTextDuplicates<T extends AttemptToolResult>(result: T): T {
|
|
27
|
+
const structured: unknown = result.structuredContent;
|
|
28
|
+
if (structured === undefined || structured === null) return result;
|
|
29
|
+
const content = result.content.filter(
|
|
30
|
+
(entry) => !isPlainTextBlock(entry) || !textDuplicatesStructuredContent(entry.text, structured),
|
|
31
|
+
);
|
|
32
|
+
if (content.length === result.content.length) return result;
|
|
33
|
+
return { ...result, content };
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function isPlainTextBlock(entry: unknown): entry is { type: "text"; text: string } {
|
|
37
|
+
if (!entry || typeof entry !== "object" || Array.isArray(entry)) return false;
|
|
38
|
+
const record = entry as Record<string, unknown>;
|
|
39
|
+
if (record.type !== "text" || typeof record.text !== "string") return false;
|
|
40
|
+
// Annotations or _meta are block-level facts the structured value lacks.
|
|
41
|
+
return Object.keys(record).every((key) => key === "type" || key === "text");
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function textDuplicatesStructuredContent(text: string, structured: unknown): boolean {
|
|
45
|
+
const trimmed = text.replace(/^[ \t\n\r]+/u, "");
|
|
46
|
+
if (!trimmed.startsWith("{") && !trimmed.startsWith("[")) return false;
|
|
47
|
+
let parsed: unknown;
|
|
48
|
+
try {
|
|
49
|
+
parsed = JSON.parse(text);
|
|
50
|
+
} catch {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
return !containsUnsafeInteger(parsed) && jsonValuesEqual(parsed, structured);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function containsUnsafeInteger(value: unknown): boolean {
|
|
57
|
+
if (typeof value === "number") return Number.isInteger(value) && !Number.isSafeInteger(value);
|
|
58
|
+
if (Array.isArray(value)) return value.some(containsUnsafeInteger);
|
|
59
|
+
if (value && typeof value === "object") return Object.values(value).some(containsUnsafeInteger);
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function jsonValuesEqual(left: unknown, right: unknown): boolean {
|
|
64
|
+
if (left === right) return true;
|
|
65
|
+
if (typeof left !== "object" || typeof right !== "object" || left === null || right === null) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
if (Array.isArray(left) || Array.isArray(right)) {
|
|
69
|
+
if (!Array.isArray(left) || !Array.isArray(right) || left.length !== right.length) {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
return left.every((entry, index) => jsonValuesEqual(entry, right[index]));
|
|
73
|
+
}
|
|
74
|
+
const leftRecord = left as Record<string, unknown>;
|
|
75
|
+
const rightRecord = right as Record<string, unknown>;
|
|
76
|
+
const leftKeys = Object.keys(leftRecord);
|
|
77
|
+
if (leftKeys.length !== Object.keys(rightRecord).length) return false;
|
|
78
|
+
return leftKeys.every(
|
|
79
|
+
(key) => Object.hasOwn(rightRecord, key) && jsonValuesEqual(leftRecord[key], rightRecord[key]),
|
|
80
|
+
);
|
|
81
|
+
}
|