@opengeni/contracts 0.44.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-authored-durable-text.d.ts +70 -0
- package/dist/agent-config.d.ts +869 -0
- package/dist/agent-instruction-changes.d.ts +110 -0
- package/dist/agent-learning.d.ts +243 -0
- package/dist/agent-topology.d.ts +292 -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 +161 -0
- package/dist/artifacts.d.ts +135 -11
- 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 +2 -0
- package/dist/atlassian.js +27 -11
- 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 +40 -0
- package/dist/canonical-human-identities.d.ts +157 -0
- package/dist/canonical-human-identities.js +23 -0
- package/dist/canonical-human-identities.js.map +1 -0
- package/dist/chunk-2ACYHZFB.js +292 -0
- package/dist/chunk-2ACYHZFB.js.map +1 -0
- package/dist/chunk-2VORLN2R.js +353 -0
- package/dist/chunk-2VORLN2R.js.map +1 -0
- package/dist/{chunk-Y3MLSLB4.js → chunk-3SIZGL3O.js} +42 -30
- package/dist/chunk-3SIZGL3O.js.map +1 -0
- package/dist/chunk-46KLD2UH.js +186 -0
- package/dist/chunk-46KLD2UH.js.map +1 -0
- package/dist/chunk-4JGHSSB7.js +11 -0
- package/dist/chunk-4JGHSSB7.js.map +1 -0
- package/dist/{chunk-52SGB2QO.js → chunk-5IXYF6XN.js} +50 -10
- package/dist/chunk-5IXYF6XN.js.map +1 -0
- package/dist/chunk-BCS7WHCK.js +139 -0
- package/dist/chunk-BCS7WHCK.js.map +1 -0
- package/dist/chunk-EK7NDGFR.js +128 -0
- package/dist/chunk-EK7NDGFR.js.map +1 -0
- package/dist/{chunk-5UDNP7AO.js → chunk-FZ6BXQHL.js} +78 -38
- package/dist/chunk-FZ6BXQHL.js.map +1 -0
- package/dist/chunk-GRG7PHWQ.js +25 -0
- package/dist/chunk-GRG7PHWQ.js.map +1 -0
- package/dist/chunk-JUFK3T4Q.js +80 -0
- package/dist/chunk-JUFK3T4Q.js.map +1 -0
- package/dist/chunk-KHHZTBP7.js +11 -0
- package/dist/chunk-KHHZTBP7.js.map +1 -0
- package/dist/chunk-KR2V42UZ.js +187 -0
- package/dist/chunk-KR2V42UZ.js.map +1 -0
- package/dist/chunk-MZLBPKFE.js +168 -0
- package/dist/chunk-MZLBPKFE.js.map +1 -0
- package/dist/{chunk-H5BVCZKF.js → chunk-NRMCVHAU.js} +6 -5
- package/dist/chunk-NRMCVHAU.js.map +1 -0
- package/dist/{chunk-TZ6YEYN4.js → chunk-NVJMJWLL.js} +3 -1
- package/dist/chunk-NVJMJWLL.js.map +1 -0
- package/dist/chunk-O77VSFYZ.js +70 -0
- package/dist/chunk-O77VSFYZ.js.map +1 -0
- package/dist/chunk-PX3VCKAU.js +29 -0
- package/dist/chunk-PX3VCKAU.js.map +1 -0
- package/dist/chunk-QR5D2IQC.js +61 -0
- package/dist/chunk-QR5D2IQC.js.map +1 -0
- package/dist/chunk-RJ76DRPO.js +117 -0
- package/dist/chunk-RJ76DRPO.js.map +1 -0
- package/dist/chunk-RKX3NQYS.js +28 -0
- package/dist/chunk-RKX3NQYS.js.map +1 -0
- package/dist/{chunk-FJBG5E4O.js → chunk-SIOU2K4U.js} +45 -22
- package/dist/chunk-SIOU2K4U.js.map +1 -0
- package/dist/chunk-TSCDAGET.js +75 -0
- package/dist/chunk-TSCDAGET.js.map +1 -0
- package/dist/{chunk-LSB7GRLG.js → chunk-TXTQIYCV.js} +15 -11
- package/dist/chunk-TXTQIYCV.js.map +1 -0
- package/dist/chunk-X7ETVO4P.js +26544 -0
- package/dist/chunk-X7ETVO4P.js.map +1 -0
- package/dist/{chunk-CADSX6UN.js → chunk-Y3KNXVTD.js} +2 -2
- package/dist/chunk-YBW5JSA3.js +251 -0
- package/dist/chunk-YBW5JSA3.js.map +1 -0
- package/dist/chunk-YRXAWWCU.js +45 -0
- package/dist/chunk-YRXAWWCU.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 +109 -0
- package/dist/client-error-report.js +87 -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.d.ts +23 -0
- package/dist/codex-provider-account-authority.js +23 -0
- package/dist/codex-provider-account-authority.js.map +1 -0
- package/dist/company-brain-governed-writes.d.ts +475 -0
- package/dist/company-brain.d.ts +336 -0
- package/dist/company-profile.d.ts +566 -0
- package/dist/connect.d.ts +325 -0
- package/dist/connect.js +191 -0
- package/dist/connect.js.map +1 -0
- 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 +193 -0
- package/dist/connection-authority.js +50 -0
- package/dist/connection-authority.js.map +1 -0
- package/dist/connector-attachments.d.ts +95 -0
- package/dist/connector-attachments.js +51 -0
- package/dist/connector-attachments.js.map +1 -0
- package/dist/connector-tool-permissions.d.ts +73 -0
- package/dist/direct-model-provider.d.ts +36 -0
- package/dist/editable-artifact-codec-registry.d.ts +16 -7
- package/dist/editable-artifact-codec-registry.js +19 -9
- package/dist/editable-artifact-committed-transaction.d.ts +2 -2
- package/dist/editable-artifact-committed-transaction.js +2 -2
- package/dist/editable-artifact-live.d.ts +11 -12
- package/dist/editable-artifact-live.js +110 -45
- package/dist/editable-artifact-live.js.map +1 -1
- package/dist/editable-artifact-serialized-commit.d.ts +2 -1
- package/dist/editable-artifact-serialized-commit.js +8 -7
- package/dist/editable-artifact-versions.d.ts +20 -5
- package/dist/editable-artifact-versions.js +23 -5
- package/dist/editable-artifacts.d.ts +2 -0
- package/dist/editable-artifacts.js +48 -36
- package/dist/external-identities.d.ts +784 -0
- package/dist/external-identities.js +44 -0
- package/dist/external-identities.js.map +1 -0
- package/dist/feedback.d.ts +51 -0
- package/dist/github-repository-contracts.d.ts +36 -0
- package/dist/github-repository-contracts.js +59 -0
- package/dist/github-repository-contracts.js.map +1 -0
- package/dist/github-repository.d.ts +14 -0
- package/dist/github-repository.js +36 -0
- package/dist/github-repository.js.map +1 -0
- package/dist/google-drive.d.ts +90 -1
- package/dist/google-drive.js +91 -15
- package/dist/google-drive.js.map +1 -1
- package/dist/governed-learning-activation.d.ts +154 -0
- package/dist/governed-learning-evaluator.d.ts +152 -0
- package/dist/host-mcp-bindings.d.ts +326 -0
- package/dist/host-mcp-bindings.js +252 -0
- package/dist/host-mcp-bindings.js.map +1 -0
- package/dist/image-generation.d.ts +1 -0
- package/dist/index.d.ts +27574 -5374
- package/dist/index.js +2531 -177
- package/dist/insights-usage.d.ts +877 -0
- package/dist/insights-usage.js +509 -0
- package/dist/insights-usage.js.map +1 -0
- package/dist/interaction.d.ts +1752 -13
- package/dist/knowledge-entries.d.ts +982 -0
- package/dist/knowledge-preparation.d.ts +237 -0
- package/dist/knowledge.d.ts +740 -0
- package/dist/managed-auth-session-sets.d.ts +241 -0
- package/dist/managed-auth-session-sets.js +191 -0
- package/dist/managed-auth-session-sets.js.map +1 -0
- package/dist/managed-sign-in-methods.d.ts +56 -0
- package/dist/managed-sign-in-methods.js +46 -0
- package/dist/managed-sign-in-methods.js.map +1 -0
- package/dist/mcp-catalog-limits.d.ts +2 -0
- package/dist/mcp-endpoint.d.ts +7 -0
- package/dist/mcp-endpoint.js +9 -0
- package/dist/mcp-endpoint.js.map +1 -0
- package/dist/mcp-oauth.d.ts +71 -0
- package/dist/modal-native-proof-v2.d.ts +587 -0
- package/dist/modal-native-proof-v2.js +37 -0
- package/dist/modal-native-proof-v2.js.map +1 -0
- package/dist/model-availability.d.ts +15 -0
- package/dist/model-connection-access.d.ts +24 -0
- package/dist/model-context-inspector.d.ts +329 -0
- package/dist/model-display.d.ts +38 -0
- package/dist/model-display.js +134 -0
- package/dist/model-display.js.map +1 -0
- package/dist/model-picker-order.d.ts +25 -0
- package/dist/model-picker-order.js +42 -0
- package/dist/model-picker-order.js.map +1 -0
- package/dist/organization-access.d.ts +231 -0
- package/dist/organization-access.js +34 -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 +1022 -0
- package/dist/organization-model-usage.d.ts +146 -0
- package/dist/organization-model-usage.js +67 -0
- package/dist/organization-model-usage.js.map +1 -0
- package/dist/organization-recovery.d.ts +337 -0
- package/dist/organization-recovery.js +37 -0
- package/dist/organization-recovery.js.map +1 -0
- package/dist/organization-usage.d.ts +138 -0
- package/dist/permissions.d.ts +54 -0
- package/dist/personal-github.d.ts +320 -0
- package/dist/personal-github.js +222 -0
- package/dist/personal-github.js.map +1 -0
- package/dist/plugin-discovery.d.ts +35 -0
- package/dist/plugin-discovery.js +7 -0
- package/dist/plugin-discovery.js.map +1 -0
- package/dist/preference-registry.d.ts +44 -1
- package/dist/product-analytics.d.ts +113 -0
- package/dist/product-lifecycle-facts.d.ts +73 -0
- package/dist/remember.d.ts +350 -0
- package/dist/retained-output.d.ts +8 -0
- package/dist/sandbox-file-artifacts.d.ts +57 -0
- package/dist/sandbox-provider-command.d.ts +113 -0
- package/dist/sandbox-recovery.d.ts +146 -0
- package/dist/sandbox-snapshots.d.ts +39 -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 +947 -0
- package/dist/session-list-entries.d.ts +4 -0
- package/dist/session-list-entries.js +51 -0
- package/dist/session-list-entries.js.map +1 -0
- package/dist/session-mcp-projections.d.ts +215 -0
- package/dist/session-message-search.d.ts +68 -0
- package/dist/session-titles.d.ts +68 -0
- package/dist/session-titles.js +25 -0
- package/dist/session-titles.js.map +1 -0
- package/dist/session-topology-primitives.d.ts +22 -0
- package/dist/signup-attribution.d.ts +39 -0
- package/dist/site-request-headers.test.d.ts +1 -0
- package/dist/site-session-http.d.ts +11 -0
- package/dist/site-session-http.js +11 -0
- package/dist/site-session-http.js.map +1 -0
- package/dist/skill-catalog-context.d.ts +7 -0
- package/dist/skill-files.d.ts +12 -0
- package/dist/skill-metadata.d.ts +9 -0
- package/dist/skill-use.d.ts +61 -0
- package/dist/skills.d.ts +185 -0
- package/dist/slack-bot-scopes.d.ts +46 -21
- package/dist/slack-bot-scopes.js +14 -3
- package/dist/slack-rest-mcp.d.ts +31 -0
- package/dist/slack-rest-mcp.js +19 -0
- package/dist/slack-rest-mcp.js.map +1 -0
- package/dist/slack-task-policy.d.ts +294 -0
- package/dist/spreadsheet-artifact-commands.d.ts +2 -3
- package/dist/spreadsheet-artifact-commands.js +4 -2
- package/dist/spreadsheet-artifact-query.js +3 -2
- package/dist/subscription-account-pools.d.ts +292 -0
- package/dist/task-notes.d.ts +169 -0
- package/dist/tool-catalog.d.ts +286 -0
- package/dist/tool-result-spill.d.ts +16 -0
- package/dist/usage-allowances.d.ts +285 -0
- package/dist/usage-allowances.js +49 -0
- package/dist/usage-allowances.js.map +1 -0
- package/dist/video-generation.d.ts +51 -0
- package/dist/video-generation.js +9 -1
- package/dist/work-claims.d.ts +411 -0
- package/dist/workspace-instruction-policies.d.ts +94 -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 +948 -0
- package/dist/workspace-learning-administration.d.ts +289 -0
- package/dist/workspace-learning-policy.d.ts +1 -1
- package/dist/workspace-state.d.ts +85 -416
- package/dist/xai-provider-account-authority.d.ts +26 -0
- package/dist/xai-provider-account-authority.js +9 -0
- package/dist/xai-provider-account-authority.js.map +1 -0
- package/package.json +146 -1
- package/src/agent-authored-durable-text.ts +116 -0
- package/src/agent-config.ts +1527 -0
- package/src/agent-instruction-changes.ts +98 -0
- package/src/agent-learning.ts +161 -0
- package/src/agent-topology.ts +69 -0
- package/src/allowance-refusal.ts +81 -0
- package/src/analytics-consent-report.ts +20 -0
- package/src/api-key-presets.ts +25 -0
- package/src/artifact-catalog.ts +60 -0
- package/src/artifacts.ts +146 -18
- package/src/atlassian-native-retirement.ts +33 -0
- package/src/browser-storage.ts +10 -0
- package/src/bundled-skills.ts +73 -0
- package/src/canonical-human-identities.ts +93 -0
- package/src/claude-provider-account-authority.ts +12 -0
- package/src/claude-subscription-oauth.ts +62 -0
- package/src/claude-subscription-usage.ts +59 -0
- package/src/client-error-report.ts +184 -0
- package/src/code-search.ts +105 -0
- package/src/codex-provider-account-authority.ts +37 -0
- package/src/company-brain-governed-writes.ts +356 -0
- package/src/company-brain.ts +201 -0
- package/src/company-profile.ts +167 -1
- package/src/connect.ts +202 -0
- package/src/connection-account-label.ts +46 -0
- package/src/connection-authority.ts +213 -0
- package/src/connector-attachments.ts +327 -0
- package/src/connector-tool-permissions.ts +60 -0
- package/src/direct-model-provider.ts +98 -0
- package/src/editable-artifact-codec-registry.ts +55 -17
- package/src/editable-artifact-committed-transaction.ts +44 -31
- package/src/editable-artifact-live.ts +123 -57
- package/src/editable-artifact-serialized-commit.ts +2 -1
- package/src/editable-artifact-versions.ts +26 -5
- package/src/editable-artifacts.ts +2 -0
- package/src/external-identities.ts +285 -0
- package/src/feedback.ts +39 -0
- package/src/github-repository-contracts.ts +85 -0
- package/src/github-repository.ts +59 -0
- package/src/google-drive.ts +76 -4
- package/src/governed-learning-activation.ts +191 -0
- package/src/governed-learning-evaluator.ts +176 -0
- package/src/host-mcp-bindings.ts +298 -0
- package/src/image-generation.ts +8 -2
- package/src/index.ts +8019 -1799
- package/src/insights-usage.ts +679 -0
- package/src/interaction.ts +1102 -6
- package/src/knowledge-entries.ts +375 -0
- package/src/knowledge-preparation.ts +50 -0
- package/src/knowledge.ts +335 -0
- package/src/managed-auth-session-sets.ts +253 -0
- package/src/managed-sign-in-methods.ts +37 -0
- package/src/mcp-catalog-limits.ts +2 -0
- package/src/mcp-endpoint.ts +30 -0
- package/src/mcp-oauth.ts +66 -0
- package/src/modal-native-proof-v2.ts +398 -0
- package/src/model-availability.ts +22 -0
- package/src/model-connection-access.ts +17 -0
- package/src/model-context-inspector.ts +139 -0
- package/src/model-display.ts +195 -0
- package/src/model-picker-order.ts +97 -0
- package/src/organization-access.ts +176 -0
- package/src/organization-integration-policy.ts +54 -0
- package/src/organization-membership-lifecycle.ts +559 -0
- package/src/organization-model-usage.ts +72 -0
- package/src/organization-recovery.ts +186 -0
- package/src/organization-usage.ts +79 -0
- package/src/permissions.ts +58 -0
- package/src/personal-github.ts +267 -0
- package/src/plugin-discovery.ts +33 -0
- package/src/preference-registry.ts +20 -1
- package/src/product-analytics.ts +253 -0
- package/src/product-lifecycle-facts.ts +121 -0
- package/src/remember.ts +243 -0
- package/src/retained-output.ts +20 -3
- package/src/sandbox-file-artifacts.ts +73 -0
- package/src/sandbox-provider-command.ts +82 -0
- package/src/sandbox-recovery.ts +116 -0
- package/src/sandbox-snapshots.ts +142 -0
- package/src/session-final-reply.ts +16 -0
- package/src/session-goal-reports.ts +55 -0
- package/src/session-history-import.ts +159 -0
- package/src/session-list-entries.ts +91 -0
- package/src/session-mcp-projections.ts +273 -0
- package/src/session-message-search.ts +54 -0
- package/src/session-titles.ts +467 -0
- package/src/session-topology-primitives.ts +21 -0
- package/src/signup-attribution.ts +81 -0
- package/src/site-request-headers.test.ts +28 -0
- package/src/site-session-http.ts +63 -0
- package/src/skill-catalog-context.ts +50 -0
- package/src/skill-files.ts +52 -0
- package/src/skill-metadata.ts +40 -0
- package/src/skill-use.ts +77 -0
- package/src/skills.ts +136 -0
- package/src/slack-bot-scopes.ts +106 -42
- package/src/slack-rest-mcp.ts +194 -0
- package/src/slack-task-policy.ts +215 -0
- package/src/spreadsheet-artifact-commands.ts +12 -13
- package/src/subscription-account-pools.ts +44 -0
- package/src/task-notes.ts +105 -0
- package/src/tool-catalog.ts +155 -0
- package/src/tool-result-spill.ts +35 -0
- package/src/usage-allowances.ts +187 -0
- package/src/video-generation.ts +43 -6
- package/src/work-claims.ts +266 -0
- package/src/workspace-instruction-policies.ts +31 -0
- package/src/workspace-integration-wire.ts +99 -0
- package/src/workspace-integrations.ts +640 -0
- package/src/workspace-learning-administration.ts +88 -0
- package/src/workspace-learning-policy.ts +4 -3
- package/src/workspace-state.ts +16 -126
- package/src/xai-provider-account-authority.ts +38 -0
- package/dist/chunk-52SGB2QO.js.map +0 -1
- package/dist/chunk-5UDNP7AO.js.map +0 -1
- package/dist/chunk-BVGIYW7D.js +0 -11
- package/dist/chunk-BVGIYW7D.js.map +0 -1
- package/dist/chunk-FJBG5E4O.js.map +0 -1
- package/dist/chunk-H5BVCZKF.js.map +0 -1
- package/dist/chunk-LSB7GRLG.js.map +0 -1
- package/dist/chunk-TZ6YEYN4.js.map +0 -1
- package/dist/chunk-VA22KRHS.js +0 -15177
- package/dist/chunk-VA22KRHS.js.map +0 -1
- package/dist/chunk-Y3MLSLB4.js.map +0 -1
- /package/dist/{chunk-CADSX6UN.js.map → chunk-Y3KNXVTD.js.map} +0 -0
|
@@ -54,13 +54,24 @@ import {
|
|
|
54
54
|
encodeSpreadsheetArtifactKernelQuery,
|
|
55
55
|
} from "./spreadsheet-artifact-query";
|
|
56
56
|
import {
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
DOCUMENT_ARTIFACT_MODEL_SCHEMA_VERSION,
|
|
58
|
+
DOCUMENT_ARTIFACT_SNAPSHOT_VERSION,
|
|
59
|
+
EDITABLE_ARTIFACT_LIVE_WIRE_VERSION,
|
|
60
|
+
EDITABLE_ARTIFACT_SERIALIZED_COMMIT_VERSION,
|
|
61
|
+
PRESENTATION_ARTIFACT_MODEL_SCHEMA_VERSION,
|
|
62
|
+
PRESENTATION_ARTIFACT_SNAPSHOT_VERSION,
|
|
63
|
+
COMMITTED_TRANSACTION_PROTOCOL_VERSION,
|
|
64
|
+
SPREADSHEET_COLLABORATION_SNAPSHOT_VERSION,
|
|
65
|
+
SPREADSHEET_ARTIFACT_MODEL_SCHEMA_VERSION,
|
|
59
66
|
} from "./editable-artifact-versions";
|
|
60
67
|
|
|
61
68
|
export {
|
|
62
|
-
|
|
63
|
-
|
|
69
|
+
DOCUMENT_ARTIFACT_MODEL_SCHEMA_VERSION,
|
|
70
|
+
DOCUMENT_ARTIFACT_SNAPSHOT_VERSION,
|
|
71
|
+
PRESENTATION_ARTIFACT_MODEL_SCHEMA_VERSION,
|
|
72
|
+
PRESENTATION_ARTIFACT_SNAPSHOT_VERSION,
|
|
73
|
+
SPREADSHEET_COLLABORATION_SNAPSHOT_VERSION,
|
|
74
|
+
SPREADSHEET_ARTIFACT_MODEL_SCHEMA_VERSION,
|
|
64
75
|
} from "./editable-artifact-versions";
|
|
65
76
|
|
|
66
77
|
export type EditableArtifactModality = "spreadsheet" | "document" | "presentation";
|
|
@@ -68,13 +79,22 @@ export type EditableArtifactConcurrencySemantics =
|
|
|
68
79
|
| "causal-crdt-v1"
|
|
69
80
|
| "authoritative-serialized-stale-base-v1";
|
|
70
81
|
|
|
82
|
+
export type CurrentEditableArtifactCompatibility = Readonly<{
|
|
83
|
+
modality: EditableArtifactModality;
|
|
84
|
+
liveProtocolVersion: number;
|
|
85
|
+
modelSchemaVersion: number;
|
|
86
|
+
snapshotVersion: number;
|
|
87
|
+
commandProtocolVersion: number;
|
|
88
|
+
committedTransactionProtocolVersion: number;
|
|
89
|
+
}>;
|
|
90
|
+
|
|
71
91
|
export type EditableArtifactCodecDescriptor = Readonly<{
|
|
72
92
|
modality: EditableArtifactModality;
|
|
73
|
-
modelSchemaVersion:
|
|
74
|
-
snapshotVersion:
|
|
93
|
+
modelSchemaVersion: 1 | 2;
|
|
94
|
+
snapshotVersion: 1 | 2;
|
|
75
95
|
command: Readonly<{
|
|
76
|
-
magic: "
|
|
77
|
-
version: 1;
|
|
96
|
+
magic: "OGASC002" | "OGADC001" | "OGAPC001";
|
|
97
|
+
version: 1 | 2;
|
|
78
98
|
maximumBytes: number;
|
|
79
99
|
maximumCommands: number;
|
|
80
100
|
encode: (value: unknown) => Uint8Array;
|
|
@@ -97,17 +117,17 @@ export type EditableArtifactCodecDescriptor = Readonly<{
|
|
|
97
117
|
}>;
|
|
98
118
|
concurrency: Readonly<{
|
|
99
119
|
semantics: EditableArtifactConcurrencySemantics;
|
|
100
|
-
collaborationEnvelope: "
|
|
120
|
+
collaborationEnvelope: "OGACO002" | null;
|
|
101
121
|
staleBaseMustBeRejected: boolean;
|
|
102
122
|
}>;
|
|
103
123
|
}>;
|
|
104
124
|
|
|
105
125
|
const spreadsheet = Object.freeze({
|
|
106
126
|
modality: "spreadsheet",
|
|
107
|
-
modelSchemaVersion:
|
|
108
|
-
snapshotVersion:
|
|
127
|
+
modelSchemaVersion: SPREADSHEET_ARTIFACT_MODEL_SCHEMA_VERSION,
|
|
128
|
+
snapshotVersion: SPREADSHEET_COLLABORATION_SNAPSHOT_VERSION,
|
|
109
129
|
command: Object.freeze({
|
|
110
|
-
magic: "
|
|
130
|
+
magic: "OGASC002",
|
|
111
131
|
version: SPREADSHEET_ARTIFACT_COMMAND_VERSION,
|
|
112
132
|
maximumBytes: SPREADSHEET_ARTIFACT_COMMAND_MAX_BYTES,
|
|
113
133
|
maximumCommands: SPREADSHEET_ARTIFACT_COMMAND_MAX_COMMANDS,
|
|
@@ -140,15 +160,15 @@ const spreadsheet = Object.freeze({
|
|
|
140
160
|
}),
|
|
141
161
|
concurrency: Object.freeze({
|
|
142
162
|
semantics: "causal-crdt-v1",
|
|
143
|
-
collaborationEnvelope: "
|
|
163
|
+
collaborationEnvelope: "OGACO002",
|
|
144
164
|
staleBaseMustBeRejected: false,
|
|
145
165
|
}),
|
|
146
166
|
}) satisfies EditableArtifactCodecDescriptor;
|
|
147
167
|
|
|
148
168
|
const document = Object.freeze({
|
|
149
169
|
modality: "document",
|
|
150
|
-
modelSchemaVersion:
|
|
151
|
-
snapshotVersion:
|
|
170
|
+
modelSchemaVersion: DOCUMENT_ARTIFACT_MODEL_SCHEMA_VERSION,
|
|
171
|
+
snapshotVersion: DOCUMENT_ARTIFACT_SNAPSHOT_VERSION,
|
|
152
172
|
command: Object.freeze({
|
|
153
173
|
magic: "OGADC001",
|
|
154
174
|
version: DOCUMENT_ARTIFACT_COMMAND_VERSION,
|
|
@@ -188,8 +208,8 @@ const document = Object.freeze({
|
|
|
188
208
|
|
|
189
209
|
const presentation = Object.freeze({
|
|
190
210
|
modality: "presentation",
|
|
191
|
-
modelSchemaVersion:
|
|
192
|
-
snapshotVersion:
|
|
211
|
+
modelSchemaVersion: PRESENTATION_ARTIFACT_MODEL_SCHEMA_VERSION,
|
|
212
|
+
snapshotVersion: PRESENTATION_ARTIFACT_SNAPSHOT_VERSION,
|
|
193
213
|
command: Object.freeze({
|
|
194
214
|
magic: "OGAPC001",
|
|
195
215
|
version: PRESENTATION_ARTIFACT_COMMAND_VERSION,
|
|
@@ -233,6 +253,24 @@ export const EDITABLE_ARTIFACT_CODEC_REGISTRY: Readonly<
|
|
|
233
253
|
Record<EditableArtifactModality, EditableArtifactCodecDescriptor>
|
|
234
254
|
> = Object.freeze({ spreadsheet, document, presentation });
|
|
235
255
|
|
|
256
|
+
/** One exact current compatibility tuple per durable modality. */
|
|
257
|
+
export function currentEditableArtifactCompatibility(
|
|
258
|
+
modality: EditableArtifactModality,
|
|
259
|
+
): CurrentEditableArtifactCompatibility {
|
|
260
|
+
const descriptor = EDITABLE_ARTIFACT_CODEC_REGISTRY[modality];
|
|
261
|
+
return Object.freeze({
|
|
262
|
+
modality,
|
|
263
|
+
liveProtocolVersion: EDITABLE_ARTIFACT_LIVE_WIRE_VERSION,
|
|
264
|
+
modelSchemaVersion: descriptor.modelSchemaVersion,
|
|
265
|
+
snapshotVersion: descriptor.snapshotVersion,
|
|
266
|
+
commandProtocolVersion: descriptor.command.version,
|
|
267
|
+
committedTransactionProtocolVersion:
|
|
268
|
+
modality === "spreadsheet"
|
|
269
|
+
? COMMITTED_TRANSACTION_PROTOCOL_VERSION
|
|
270
|
+
: EDITABLE_ARTIFACT_SERIALIZED_COMMIT_VERSION,
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
|
|
236
274
|
/**
|
|
237
275
|
* Selects solely from the durable artifact modality plus persisted versions.
|
|
238
276
|
* Modality intentionally never enters OGATX001: the durable artifact row is
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Strict, allocation-bounded inspection of canonical
|
|
2
|
+
* Strict, allocation-bounded inspection of canonical OGACO002 transactions.
|
|
3
3
|
*
|
|
4
4
|
* The Rust kernel remains the authority for applying operations. This decoder
|
|
5
5
|
* validates the complete envelope and every typed operation so metadata after
|
|
@@ -15,7 +15,7 @@ export const MAX_COMMITTED_TRANSACTION_OPERATIONS = 4_096;
|
|
|
15
15
|
export const MAX_COMMITTED_TRANSACTION_CAUSAL_REPLICAS = 100_000;
|
|
16
16
|
export const MAX_COMMITTED_TRANSACTION_CELLS = 1_000_000;
|
|
17
17
|
|
|
18
|
-
const MAGIC = new Uint8Array([0x4f, 0x47, 0x41, 0x43, 0x4f, 0x30, 0x30,
|
|
18
|
+
const MAGIC = new Uint8Array([0x4f, 0x47, 0x41, 0x43, 0x4f, 0x30, 0x30, 0x32]); // OGACO002
|
|
19
19
|
const HEADER_BYTES = 24;
|
|
20
20
|
const CHECKSUM_BYTES = 8;
|
|
21
21
|
const HASH_BYTES = 32;
|
|
@@ -24,6 +24,7 @@ const MAX_OPERATION_STRING_BYTES = 4 * 1024 * 1024;
|
|
|
24
24
|
const MAX_SAFE_U64_HIGH = 0x1f_ffff;
|
|
25
25
|
const U32_SIZE = 0x1_0000_0000;
|
|
26
26
|
const U32_MAX = 0xffff_ffff;
|
|
27
|
+
const MAX_DATE_MILLISECONDS = 8_640_000_000_000_000n;
|
|
27
28
|
const FNV_OFFSET_LOW = 0x8422_2325;
|
|
28
29
|
const FNV_OFFSET_HIGH = 0xcbf2_9ce4;
|
|
29
30
|
const FNV_PRIME_LOW = 0x01b3;
|
|
@@ -47,7 +48,7 @@ export type CommittedTransactionSummary = Readonly<{
|
|
|
47
48
|
}>;
|
|
48
49
|
|
|
49
50
|
/**
|
|
50
|
-
* Decodes only the metadata of one exact canonical
|
|
51
|
+
* Decodes only the metadata of one exact canonical OGACO002 byte envelope.
|
|
51
52
|
*
|
|
52
53
|
* This function is synchronous and never mutates or retains `bytes`. The
|
|
53
54
|
* caller remains the owner of the exact canonical envelope.
|
|
@@ -55,38 +56,38 @@ export type CommittedTransactionSummary = Readonly<{
|
|
|
55
56
|
export function decodeCommittedTransactionSummary(bytes: Uint8Array): CommittedTransactionSummary {
|
|
56
57
|
assertInput(bytes);
|
|
57
58
|
if (bytes.byteLength > MAX_COMMITTED_TRANSACTION_BYTES) {
|
|
58
|
-
throw new RangeError("
|
|
59
|
+
throw new RangeError("OGACO002 envelope exceeds its byte limit");
|
|
59
60
|
}
|
|
60
61
|
if (bytes.byteLength < HEADER_BYTES + CHECKSUM_BYTES) {
|
|
61
|
-
throw new TypeError("truncated
|
|
62
|
+
throw new TypeError("truncated OGACO002 envelope");
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
65
66
|
for (let index = 0; index < MAGIC.byteLength; index += 1) {
|
|
66
|
-
if (bytes[index] !== MAGIC[index]) throw new TypeError("invalid
|
|
67
|
+
if (bytes[index] !== MAGIC[index]) throw new TypeError("invalid OGACO002 magic");
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
const version = view.getUint16(8, true);
|
|
70
71
|
if (version !== COMMITTED_TRANSACTION_PROTOCOL_VERSION) {
|
|
71
|
-
throw new TypeError(`unsupported
|
|
72
|
+
throw new TypeError(`unsupported OGACO002 version: ${version}`);
|
|
72
73
|
}
|
|
73
74
|
if (view.getUint16(10, true) !== 0) {
|
|
74
|
-
throw new TypeError("reserved
|
|
75
|
+
throw new TypeError("reserved OGACO002 header bits are set");
|
|
75
76
|
}
|
|
76
77
|
|
|
77
78
|
const operationCount = view.getUint32(12, true);
|
|
78
79
|
if (operationCount === 0 || operationCount > MAX_COMMITTED_TRANSACTION_OPERATIONS) {
|
|
79
|
-
throw new RangeError("
|
|
80
|
+
throw new RangeError("OGACO002 operation count is outside its canonical bounds");
|
|
80
81
|
}
|
|
81
82
|
|
|
82
|
-
const payloadLength = safeU64At(view, 16, "
|
|
83
|
-
const payloadEnd = checkedAdd(HEADER_BYTES, payloadLength, "
|
|
84
|
-
const expectedLength = checkedAdd(payloadEnd, CHECKSUM_BYTES, "
|
|
83
|
+
const payloadLength = safeU64At(view, 16, "OGACO002 payload length", false);
|
|
84
|
+
const payloadEnd = checkedAdd(HEADER_BYTES, payloadLength, "OGACO002 payload length");
|
|
85
|
+
const expectedLength = checkedAdd(payloadEnd, CHECKSUM_BYTES, "OGACO002 envelope length");
|
|
85
86
|
if (bytes.byteLength !== expectedLength) {
|
|
86
87
|
throw new TypeError(
|
|
87
88
|
bytes.byteLength < expectedLength
|
|
88
|
-
? "truncated
|
|
89
|
-
: "trailing bytes after
|
|
89
|
+
? "truncated OGACO002 payload"
|
|
90
|
+
: "trailing bytes after OGACO002 envelope",
|
|
90
91
|
);
|
|
91
92
|
}
|
|
92
93
|
|
|
@@ -95,7 +96,7 @@ export function decodeCommittedTransactionSummary(bytes: Uint8Array): CommittedT
|
|
|
95
96
|
view.getUint32(payloadEnd, true) !== checksumLow ||
|
|
96
97
|
view.getUint32(payloadEnd + 4, true) !== checksumHigh
|
|
97
98
|
) {
|
|
98
|
-
throw new TypeError("
|
|
99
|
+
throw new TypeError("OGACO002 checksum mismatch");
|
|
99
100
|
}
|
|
100
101
|
|
|
101
102
|
const reader = new Reader(bytes, HEADER_BYTES, payloadEnd);
|
|
@@ -113,7 +114,7 @@ export function decodeCommittedTransactionSummary(bytes: Uint8Array): CommittedT
|
|
|
113
114
|
for (let index = 0; index < operationCount; index += 1) {
|
|
114
115
|
const operationId = reader.stableId(`operation ${index} id`);
|
|
115
116
|
if (seenOperationIds.has(operationId)) {
|
|
116
|
-
throw new TypeError("
|
|
117
|
+
throw new TypeError("OGACO002 operation ids must be unique");
|
|
117
118
|
}
|
|
118
119
|
seenOperationIds.add(operationId);
|
|
119
120
|
operationIds.push(operationId);
|
|
@@ -273,7 +274,7 @@ class Reader {
|
|
|
273
274
|
const endRow = this.u32("clear range end row");
|
|
274
275
|
const endColumn = this.u32("clear range end column");
|
|
275
276
|
if (startRow > endRow || startColumn > endColumn) {
|
|
276
|
-
throw new TypeError("
|
|
277
|
+
throw new TypeError("OGACO002 clear range is not normalized");
|
|
277
278
|
}
|
|
278
279
|
return totalCells;
|
|
279
280
|
}
|
|
@@ -281,7 +282,7 @@ class Reader {
|
|
|
281
282
|
this.stableId("selective undo target");
|
|
282
283
|
return totalCells;
|
|
283
284
|
default:
|
|
284
|
-
throw new TypeError(`invalid
|
|
285
|
+
throw new TypeError(`invalid OGACO002 collaboration command tag: ${tag}`);
|
|
285
286
|
}
|
|
286
287
|
}
|
|
287
288
|
|
|
@@ -292,18 +293,18 @@ class Reader {
|
|
|
292
293
|
const rows = this.u32("cell block rows");
|
|
293
294
|
const columns = this.u32("cell block columns");
|
|
294
295
|
if (rows === 0 || columns === 0) {
|
|
295
|
-
throw new TypeError("
|
|
296
|
+
throw new TypeError("OGACO002 cell block dimensions must be nonzero");
|
|
296
297
|
}
|
|
297
298
|
if (anchorRow > U32_MAX - (rows - 1) || anchorColumn > U32_MAX - (columns - 1)) {
|
|
298
|
-
throw new RangeError("
|
|
299
|
+
throw new RangeError("OGACO002 cell block coordinates overflow u32");
|
|
299
300
|
}
|
|
300
301
|
if (rows > Math.floor(MAX_COMMITTED_TRANSACTION_CELLS / columns)) {
|
|
301
|
-
throw new RangeError("
|
|
302
|
+
throw new RangeError("OGACO002 cell block exceeds its cell limit");
|
|
302
303
|
}
|
|
303
304
|
const cellCount = rows * columns;
|
|
304
305
|
const nextTotal = totalCells + cellCount;
|
|
305
306
|
if (nextTotal > MAX_COMMITTED_TRANSACTION_CELLS) {
|
|
306
|
-
throw new RangeError("
|
|
307
|
+
throw new RangeError("OGACO002 transaction exceeds its cell limit");
|
|
307
308
|
}
|
|
308
309
|
for (let index = 0; index < cellCount; index += 1) this.skipCell();
|
|
309
310
|
return nextTotal;
|
|
@@ -313,10 +314,11 @@ class Reader {
|
|
|
313
314
|
const formulaTag = this.u8("cell formula tag");
|
|
314
315
|
if (formulaTag === 1) {
|
|
315
316
|
if (this.skipString("cell formula") === 0) {
|
|
316
|
-
throw new TypeError("
|
|
317
|
+
throw new TypeError("OGACO002 formula must not be empty");
|
|
317
318
|
}
|
|
319
|
+
return;
|
|
318
320
|
} else if (formulaTag !== 0) {
|
|
319
|
-
throw new TypeError(`invalid
|
|
321
|
+
throw new TypeError(`invalid OGACO002 cell formula tag: ${formulaTag}`);
|
|
320
322
|
}
|
|
321
323
|
|
|
322
324
|
const valueTag = this.u8("cell value tag");
|
|
@@ -334,8 +336,11 @@ class Reader {
|
|
|
334
336
|
case 5:
|
|
335
337
|
this.skipFormulaError();
|
|
336
338
|
return;
|
|
339
|
+
case 6:
|
|
340
|
+
this.skipDate();
|
|
341
|
+
return;
|
|
337
342
|
default:
|
|
338
|
-
throw new TypeError(`invalid
|
|
343
|
+
throw new TypeError(`invalid OGACO002 cell value tag: ${valueTag}`);
|
|
339
344
|
}
|
|
340
345
|
}
|
|
341
346
|
|
|
@@ -344,10 +349,18 @@ class Reader {
|
|
|
344
349
|
const low = this.#view.getUint32(offset, true);
|
|
345
350
|
const high = this.#view.getUint32(offset + 4, true);
|
|
346
351
|
if (low === 0 && high === 0x8000_0000) {
|
|
347
|
-
throw new TypeError("
|
|
352
|
+
throw new TypeError("OGACO002 cell number uses negative zero");
|
|
348
353
|
}
|
|
349
354
|
if ((high & 0x7ff0_0000) === 0x7ff0_0000) {
|
|
350
|
-
throw new TypeError("
|
|
355
|
+
throw new TypeError("OGACO002 cell numbers must be finite");
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
skipDate(): void {
|
|
360
|
+
const offset = this.reserve(8, "cell date");
|
|
361
|
+
const milliseconds = this.#view.getBigInt64(offset, true);
|
|
362
|
+
if (milliseconds < -MAX_DATE_MILLISECONDS || milliseconds > MAX_DATE_MILLISECONDS) {
|
|
363
|
+
throw new TypeError("OGACO002 cell date is outside the ECMAScript range");
|
|
351
364
|
}
|
|
352
365
|
}
|
|
353
366
|
|
|
@@ -358,7 +371,7 @@ class Reader {
|
|
|
358
371
|
this.skipString("custom formula error");
|
|
359
372
|
return;
|
|
360
373
|
}
|
|
361
|
-
throw new TypeError(`invalid
|
|
374
|
+
throw new TypeError(`invalid OGACO002 formula error tag: ${tag}`);
|
|
362
375
|
}
|
|
363
376
|
|
|
364
377
|
skipGeneration(label: string): void {
|
|
@@ -377,16 +390,16 @@ class Reader {
|
|
|
377
390
|
}
|
|
378
391
|
|
|
379
392
|
done(): void {
|
|
380
|
-
if (this.#offset !== this.#end) throw new TypeError("trailing bytes in
|
|
393
|
+
if (this.#offset !== this.#end) throw new TypeError("trailing bytes in OGACO002 payload");
|
|
381
394
|
}
|
|
382
395
|
}
|
|
383
396
|
|
|
384
397
|
function assertInput(bytes: Uint8Array): void {
|
|
385
398
|
if (!(bytes instanceof Uint8Array)) {
|
|
386
|
-
throw new TypeError("
|
|
399
|
+
throw new TypeError("OGACO002 bytes must be a Uint8Array");
|
|
387
400
|
}
|
|
388
401
|
if (typeof SharedArrayBuffer !== "undefined" && bytes.buffer instanceof SharedArrayBuffer) {
|
|
389
|
-
throw new TypeError("
|
|
402
|
+
throw new TypeError("OGACO002 bytes must not use shared mutable memory");
|
|
390
403
|
}
|
|
391
404
|
}
|
|
392
405
|
|