pyric 0.1.0-alpha.21 → 0.1.0-alpha.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -4
- package/dist/ai/activity.d.ts +9 -0
- package/dist/ai/activity.d.ts.map +1 -0
- package/dist/ai/activity.js +45 -0
- package/dist/ai/activity.js.map +1 -0
- package/dist/ai/broker/broker.d.ts +25 -0
- package/dist/ai/broker/broker.d.ts.map +1 -1
- package/dist/ai/broker/broker.js +46 -42
- package/dist/ai/broker/broker.js.map +1 -1
- package/dist/ai/broker/gemini-engine.d.ts +7 -0
- package/dist/ai/broker/gemini-engine.d.ts.map +1 -1
- package/dist/ai/broker/gemini-engine.js +15 -0
- package/dist/ai/broker/gemini-engine.js.map +1 -1
- package/dist/ai/broker/index.d.ts +1 -1
- package/dist/ai/broker/index.d.ts.map +1 -1
- package/dist/ai/broker/index.js.map +1 -1
- package/dist/ai/broker/openai-engine.d.ts.map +1 -1
- package/dist/ai/broker/openai-engine.js +7 -3
- package/dist/ai/broker/openai-engine.js.map +1 -1
- package/dist/ai/broker/scripted-engine.d.ts +9 -1
- package/dist/ai/broker/scripted-engine.d.ts.map +1 -1
- package/dist/ai/broker/scripted-engine.js +14 -5
- package/dist/ai/broker/scripted-engine.js.map +1 -1
- package/dist/ai/broker/types.d.ts +6 -2
- package/dist/ai/broker/types.d.ts.map +1 -1
- package/dist/ai/events.d.ts +12 -0
- package/dist/ai/events.d.ts.map +1 -0
- package/dist/ai/events.js +17 -0
- package/dist/ai/events.js.map +1 -0
- package/dist/ai/generation-enums.d.ts +43 -0
- package/dist/ai/generation-enums.d.ts.map +1 -0
- package/dist/ai/generation-enums.js +37 -0
- package/dist/ai/generation-enums.js.map +1 -0
- package/dist/ai/index.d.ts +1 -0
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/index.js +1 -0
- package/dist/ai/index.js.map +1 -1
- package/dist/ai/instances.d.ts +6 -0
- package/dist/ai/instances.d.ts.map +1 -1
- package/dist/ai/instances.js +20 -2
- package/dist/ai/instances.js.map +1 -1
- package/dist/ai/internal.d.ts +3 -0
- package/dist/ai/internal.d.ts.map +1 -1
- package/dist/ai/internal.js +3 -0
- package/dist/ai/internal.js.map +1 -1
- package/dist/ai/sandbox-plane.d.ts.map +1 -1
- package/dist/ai/sandbox-plane.js +23 -8
- package/dist/ai/sandbox-plane.js.map +1 -1
- package/dist/ai/scripting.d.ts +20 -2
- package/dist/ai/scripting.d.ts.map +1 -1
- package/dist/ai/scripting.js +30 -3
- package/dist/ai/scripting.js.map +1 -1
- package/dist/app/internal.d.ts +1 -0
- package/dist/app/internal.d.ts.map +1 -1
- package/dist/app/internal.js +1 -0
- package/dist/app/internal.js.map +1 -1
- package/dist/auth/email-link.d.ts +8 -1
- package/dist/auth/email-link.d.ts.map +1 -1
- package/dist/auth/email-link.js +29 -20
- package/dist/auth/email-link.js.map +1 -1
- package/dist/auth/events.d.ts +12 -0
- package/dist/auth/events.d.ts.map +1 -0
- package/dist/auth/events.js +18 -0
- package/dist/auth/events.js.map +1 -0
- package/dist/auth/factor-id.d.ts +7 -0
- package/dist/auth/factor-id.d.ts.map +1 -0
- package/dist/auth/factor-id.js +6 -0
- package/dist/auth/factor-id.js.map +1 -0
- package/dist/auth/index.d.ts +1 -0
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +1 -0
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/instances.d.ts.map +1 -1
- package/dist/auth/instances.js +13 -1
- package/dist/auth/instances.js.map +1 -1
- package/dist/auth/internal.d.ts +20 -0
- package/dist/auth/internal.d.ts.map +1 -0
- package/dist/auth/internal.js +19 -0
- package/dist/auth/internal.js.map +1 -0
- package/dist/auth/modular.d.ts +9 -0
- package/dist/auth/modular.d.ts.map +1 -1
- package/dist/auth/modular.js +20 -0
- package/dist/auth/modular.js.map +1 -1
- package/dist/auth/reauth.js +3 -2
- package/dist/auth/reauth.js.map +1 -1
- package/dist/auth/sandbox/default-avatar.d.ts +64 -0
- package/dist/auth/sandbox/default-avatar.d.ts.map +1 -0
- package/dist/auth/sandbox/default-avatar.js +118 -0
- package/dist/auth/sandbox/default-avatar.js.map +1 -0
- package/dist/auth/sandbox/driver.d.ts +36 -0
- package/dist/auth/sandbox/driver.d.ts.map +1 -1
- package/dist/auth/sandbox/driver.js +47 -0
- package/dist/auth/sandbox/driver.js.map +1 -1
- package/dist/auth/sandbox/project-store.d.ts +0 -1
- package/dist/auth/sandbox/project-store.d.ts.map +1 -1
- package/dist/auth/sandbox/project-store.js +0 -1
- package/dist/auth/sandbox/project-store.js.map +1 -1
- package/dist/auth/sandbox-backend-types.d.ts +34 -20
- package/dist/auth/sandbox-backend-types.d.ts.map +1 -1
- package/dist/auth/sandbox-backend-types.js +2 -3
- package/dist/auth/sandbox-backend-types.js.map +1 -1
- package/dist/auth/sandbox-backend.d.ts +98 -20
- package/dist/auth/sandbox-backend.d.ts.map +1 -1
- package/dist/auth/sandbox-backend.js +403 -96
- package/dist/auth/sandbox-backend.js.map +1 -1
- package/dist/auth/seed-user.d.ts +38 -0
- package/dist/auth/seed-user.d.ts.map +1 -0
- package/dist/auth/seed-user.js +2 -0
- package/dist/auth/seed-user.js.map +1 -0
- package/dist/auth/tokens.d.ts +6 -1
- package/dist/auth/tokens.d.ts.map +1 -1
- package/dist/auth/tokens.js +19 -17
- package/dist/auth/tokens.js.map +1 -1
- package/dist/auth/types.d.ts +13 -1
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/auth/types.js.map +1 -1
- package/dist/database/activity-coverage.d.ts +9 -0
- package/dist/database/activity-coverage.d.ts.map +1 -0
- package/dist/database/activity-coverage.js +11 -0
- package/dist/database/activity-coverage.js.map +1 -0
- package/dist/database/connection-lifecycle.d.ts +3 -0
- package/dist/database/connection-lifecycle.d.ts.map +1 -1
- package/dist/database/connection-lifecycle.js +54 -23
- package/dist/database/connection-lifecycle.js.map +1 -1
- package/dist/database/events.d.ts +12 -0
- package/dist/database/events.d.ts.map +1 -0
- package/dist/database/events.js +10 -0
- package/dist/database/events.js.map +1 -0
- package/dist/database/instances.d.ts +7 -7
- package/dist/database/instances.d.ts.map +1 -1
- package/dist/database/instances.js +35 -13
- package/dist/database/instances.js.map +1 -1
- package/dist/database/internal/query-projection.d.ts +102 -0
- package/dist/database/internal/query-projection.d.ts.map +1 -0
- package/dist/database/internal/query-projection.js +293 -0
- package/dist/database/internal/query-projection.js.map +1 -0
- package/dist/database/internal.d.ts +2 -0
- package/dist/database/internal.d.ts.map +1 -1
- package/dist/database/internal.js +2 -0
- package/dist/database/internal.js.map +1 -1
- package/dist/database/listeners.d.ts.map +1 -1
- package/dist/database/listeners.js +165 -37
- package/dist/database/listeners.js.map +1 -1
- package/dist/database/operations.d.ts.map +1 -1
- package/dist/database/operations.js +77 -50
- package/dist/database/operations.js.map +1 -1
- package/dist/database/replay.d.ts.map +1 -1
- package/dist/database/replay.js +6 -2
- package/dist/database/replay.js.map +1 -1
- package/dist/database/routing.d.ts +4 -0
- package/dist/database/routing.d.ts.map +1 -1
- package/dist/database/routing.js.map +1 -1
- package/dist/database/sandbox/backend-for.d.ts +4 -3
- package/dist/database/sandbox/backend-for.d.ts.map +1 -1
- package/dist/database/sandbox/backend-for.js +130 -24
- package/dist/database/sandbox/backend-for.js.map +1 -1
- package/dist/database/sandbox/backend-state.d.ts +7 -0
- package/dist/database/sandbox/backend-state.d.ts.map +1 -1
- package/dist/database/sandbox/backend-state.js +15 -1
- package/dist/database/sandbox/backend-state.js.map +1 -1
- package/dist/database/sandbox/backend.d.ts +2 -1
- package/dist/database/sandbox/backend.d.ts.map +1 -1
- package/dist/database/sandbox/backend.js +3 -3
- package/dist/database/sandbox/backend.js.map +1 -1
- package/dist/database/sandbox/child-listeners.d.ts +5 -0
- package/dist/database/sandbox/child-listeners.d.ts.map +1 -1
- package/dist/database/sandbox/child-listeners.js +34 -14
- package/dist/database/sandbox/child-listeners.js.map +1 -1
- package/dist/database/sandbox/listener-types.d.ts +5 -0
- package/dist/database/sandbox/listener-types.d.ts.map +1 -1
- package/dist/database/sandbox/operation-events.d.ts +5 -0
- package/dist/database/sandbox/operation-events.d.ts.map +1 -1
- package/dist/database/sandbox/operation-events.js +18 -3
- package/dist/database/sandbox/operation-events.js.map +1 -1
- package/dist/database/sandbox/persistence-state.d.ts.map +1 -1
- package/dist/database/sandbox/persistence-state.js +1 -8
- package/dist/database/sandbox/persistence-state.js.map +1 -1
- package/dist/database/sandbox/priority-writes.js +2 -2
- package/dist/database/sandbox/priority-writes.js.map +1 -1
- package/dist/database/sandbox/query.d.ts +2 -101
- package/dist/database/sandbox/query.d.ts.map +1 -1
- package/dist/database/sandbox/query.js +1 -225
- package/dist/database/sandbox/query.js.map +1 -1
- package/dist/database/sandbox/rules-eval.d.ts +28 -0
- package/dist/database/sandbox/rules-eval.d.ts.map +1 -1
- package/dist/database/sandbox/rules-eval.js +136 -9
- package/dist/database/sandbox/rules-eval.js.map +1 -1
- package/dist/database/sandbox/transactions.d.ts.map +1 -1
- package/dist/database/sandbox/transactions.js +17 -38
- package/dist/database/sandbox/transactions.js.map +1 -1
- package/dist/database/sandbox/value-listeners.d.ts +11 -1
- package/dist/database/sandbox/value-listeners.d.ts.map +1 -1
- package/dist/database/sandbox/value-listeners.js +65 -27
- package/dist/database/sandbox/value-listeners.js.map +1 -1
- package/dist/database/sandbox/write-plane.d.ts.map +1 -1
- package/dist/database/sandbox/write-plane.js +30 -22
- package/dist/database/sandbox/write-plane.js.map +1 -1
- package/dist/database/sdk-activity.d.ts +5 -0
- package/dist/database/sdk-activity.d.ts.map +1 -0
- package/dist/database/sdk-activity.js +20 -0
- package/dist/database/sdk-activity.js.map +1 -0
- package/dist/database/transactions.d.ts.map +1 -1
- package/dist/database/transactions.js +7 -3
- package/dist/database/transactions.js.map +1 -1
- package/dist/database/types.d.ts +9 -1
- package/dist/database/types.d.ts.map +1 -1
- package/dist/database/types.js.map +1 -1
- package/dist/deferred/entry.d.ts +6 -3
- package/dist/deferred/entry.d.ts.map +1 -1
- package/dist/deferred/entry.js +13 -10
- package/dist/deferred/entry.js.map +1 -1
- package/dist/firestore/activity-coverage.d.ts +9 -0
- package/dist/firestore/activity-coverage.d.ts.map +1 -0
- package/dist/firestore/activity-coverage.js +9 -0
- package/dist/firestore/activity-coverage.js.map +1 -0
- package/dist/firestore/aggregates.d.ts.map +1 -1
- package/dist/firestore/aggregates.js +32 -10
- package/dist/firestore/aggregates.js.map +1 -1
- package/dist/firestore/bytes.d.ts +13 -0
- package/dist/firestore/bytes.d.ts.map +1 -0
- package/dist/firestore/bytes.js +51 -0
- package/dist/firestore/bytes.js.map +1 -0
- package/dist/firestore/converter-method.d.ts +11 -0
- package/dist/firestore/converter-method.d.ts.map +1 -0
- package/dist/firestore/converter-method.js +39 -0
- package/dist/firestore/converter-method.js.map +1 -0
- package/dist/firestore/errors.d.ts.map +1 -1
- package/dist/firestore/errors.js +4 -0
- package/dist/firestore/errors.js.map +1 -1
- package/dist/firestore/field-values.d.ts +3 -36
- package/dist/firestore/field-values.d.ts.map +1 -1
- package/dist/firestore/field-values.js +3 -136
- package/dist/firestore/field-values.js.map +1 -1
- package/dist/firestore/geo-point.d.ts +15 -0
- package/dist/firestore/geo-point.d.ts.map +1 -0
- package/dist/firestore/geo-point.js +50 -0
- package/dist/firestore/geo-point.js.map +1 -0
- package/dist/firestore/index.d.ts +1 -1
- package/dist/firestore/index.d.ts.map +1 -1
- package/dist/firestore/index.js +1 -1
- package/dist/firestore/index.js.map +1 -1
- package/dist/firestore/instances.d.ts.map +1 -1
- package/dist/firestore/instances.js +23 -2
- package/dist/firestore/instances.js.map +1 -1
- package/dist/firestore/internal/document-data.d.ts +3 -0
- package/dist/firestore/internal/document-data.d.ts.map +1 -0
- package/dist/firestore/internal/document-data.js +10 -0
- package/dist/firestore/internal/document-data.js.map +1 -0
- package/dist/firestore/internal/index.d.ts +3 -0
- package/dist/firestore/internal/index.d.ts.map +1 -1
- package/dist/firestore/internal/index.js +5 -0
- package/dist/firestore/internal/index.js.map +1 -1
- package/dist/firestore/internal/value-codec.d.ts +16 -61
- package/dist/firestore/internal/value-codec.d.ts.map +1 -1
- package/dist/firestore/internal/value-codec.js +137 -82
- package/dist/firestore/internal/value-codec.js.map +1 -1
- package/dist/firestore/internal/value-depth.d.ts +3 -0
- package/dist/firestore/internal/value-depth.d.ts.map +1 -0
- package/dist/firestore/internal/value-depth.js +19 -0
- package/dist/firestore/internal/value-depth.js.map +1 -0
- package/dist/firestore/listeners.d.ts +18 -1
- package/dist/firestore/listeners.d.ts.map +1 -1
- package/dist/firestore/listeners.js +60 -21
- package/dist/firestore/listeners.js.map +1 -1
- package/dist/firestore/persistence.d.ts +0 -9
- package/dist/firestore/persistence.d.ts.map +1 -1
- package/dist/firestore/persistence.js +23 -9
- package/dist/firestore/persistence.js.map +1 -1
- package/dist/firestore/plain-object.d.ts +3 -0
- package/dist/firestore/plain-object.d.ts.map +1 -0
- package/dist/firestore/plain-object.js +9 -0
- package/dist/firestore/plain-object.js.map +1 -0
- package/dist/firestore/query-constraints.d.ts.map +1 -1
- package/dist/firestore/query-constraints.js +4 -3
- package/dist/firestore/query-constraints.js.map +1 -1
- package/dist/firestore/reads.d.ts +9 -7
- package/dist/firestore/reads.d.ts.map +1 -1
- package/dist/firestore/reads.js +74 -36
- package/dist/firestore/reads.js.map +1 -1
- package/dist/firestore/refs.d.ts +2 -1
- package/dist/firestore/refs.d.ts.map +1 -1
- package/dist/firestore/refs.js +37 -24
- package/dist/firestore/refs.js.map +1 -1
- package/dist/firestore/sandbox/activity-query-display.d.ts +67 -0
- package/dist/firestore/sandbox/activity-query-display.d.ts.map +1 -0
- package/dist/firestore/sandbox/activity-query-display.js +119 -0
- package/dist/firestore/sandbox/activity-query-display.js.map +1 -0
- package/dist/firestore/sandbox/admin-compat/batch.d.ts +4 -8
- package/dist/firestore/sandbox/admin-compat/batch.d.ts.map +1 -1
- package/dist/firestore/sandbox/admin-compat/batch.js +27 -19
- package/dist/firestore/sandbox/admin-compat/batch.js.map +1 -1
- package/dist/firestore/sandbox/admin-compat/query-comparison.d.ts.map +1 -1
- package/dist/firestore/sandbox/admin-compat/query-comparison.js +8 -3
- package/dist/firestore/sandbox/admin-compat/query-comparison.js.map +1 -1
- package/dist/firestore/sandbox/admin-compat/query.d.ts +8 -0
- package/dist/firestore/sandbox/admin-compat/query.d.ts.map +1 -1
- package/dist/firestore/sandbox/admin-compat/query.js +44 -5
- package/dist/firestore/sandbox/admin-compat/query.js.map +1 -1
- package/dist/firestore/sandbox/admin-compat/read-translation.d.ts.map +1 -1
- package/dist/firestore/sandbox/admin-compat/read-translation.js +18 -9
- package/dist/firestore/sandbox/admin-compat/read-translation.js.map +1 -1
- package/dist/firestore/sandbox/admin-compat/transaction.d.ts +2 -2
- package/dist/firestore/sandbox/admin-compat/transaction.d.ts.map +1 -1
- package/dist/firestore/sandbox/admin-compat/transaction.js +13 -4
- package/dist/firestore/sandbox/admin-compat/transaction.js.map +1 -1
- package/dist/firestore/sandbox/admin-compat/types.d.ts +6 -33
- package/dist/firestore/sandbox/admin-compat/types.d.ts.map +1 -1
- package/dist/firestore/sandbox/admin-compat/types.js +1 -76
- package/dist/firestore/sandbox/admin-compat/types.js.map +1 -1
- package/dist/firestore/sandbox/atomic-state.d.ts +4 -0
- package/dist/firestore/sandbox/atomic-state.d.ts.map +1 -0
- package/dist/firestore/sandbox/atomic-state.js +105 -0
- package/dist/firestore/sandbox/atomic-state.js.map +1 -0
- package/dist/firestore/sandbox/atomic-write-pipeline.d.ts +3 -2
- package/dist/firestore/sandbox/atomic-write-pipeline.d.ts.map +1 -1
- package/dist/firestore/sandbox/atomic-write-pipeline.js +128 -58
- package/dist/firestore/sandbox/atomic-write-pipeline.js.map +1 -1
- package/dist/firestore/sandbox/batch-write-executor.d.ts.map +1 -1
- package/dist/firestore/sandbox/batch-write-executor.js +54 -28
- package/dist/firestore/sandbox/batch-write-executor.js.map +1 -1
- package/dist/firestore/sandbox/converters/user-timestamp.d.ts +6 -40
- package/dist/firestore/sandbox/converters/user-timestamp.d.ts.map +1 -1
- package/dist/firestore/sandbox/converters/user-timestamp.js +20 -43
- package/dist/firestore/sandbox/converters/user-timestamp.js.map +1 -1
- package/dist/firestore/sandbox/document-copy.d.ts +4 -0
- package/dist/firestore/sandbox/document-copy.d.ts.map +1 -0
- package/dist/firestore/sandbox/document-copy.js +28 -0
- package/dist/firestore/sandbox/document-copy.js.map +1 -0
- package/dist/firestore/sandbox/document-store.d.ts +99 -0
- package/dist/firestore/sandbox/document-store.d.ts.map +1 -0
- package/dist/firestore/sandbox/document-store.js +2 -0
- package/dist/firestore/sandbox/document-store.js.map +1 -0
- package/dist/firestore/sandbox/errors.d.ts +4 -1
- package/dist/firestore/sandbox/errors.d.ts.map +1 -1
- package/dist/firestore/sandbox/errors.js +2 -25
- package/dist/firestore/sandbox/errors.js.map +1 -1
- package/dist/firestore/sandbox/event-log.d.ts +22 -4
- package/dist/firestore/sandbox/event-log.d.ts.map +1 -1
- package/dist/firestore/sandbox/event-log.js +66 -6
- package/dist/firestore/sandbox/event-log.js.map +1 -1
- package/dist/firestore/sandbox/field-merge.d.ts.map +1 -1
- package/dist/firestore/sandbox/field-merge.js +10 -20
- package/dist/firestore/sandbox/field-merge.js.map +1 -1
- package/dist/firestore/sandbox/history-controls.d.ts +1 -1
- package/dist/firestore/sandbox/history-controls.d.ts.map +1 -1
- package/dist/firestore/sandbox/history-controls.js +1 -1
- package/dist/firestore/sandbox/history-controls.js.map +1 -1
- package/dist/firestore/sandbox/list-query-proof.d.ts +4 -1
- package/dist/firestore/sandbox/list-query-proof.d.ts.map +1 -1
- package/dist/firestore/sandbox/list-query-proof.js +32 -96
- package/dist/firestore/sandbox/list-query-proof.js.map +1 -1
- package/dist/firestore/sandbox/listener-dispatch.d.ts +26 -1
- package/dist/firestore/sandbox/listener-dispatch.d.ts.map +1 -1
- package/dist/firestore/sandbox/listener-dispatch.js +58 -5
- package/dist/firestore/sandbox/listener-dispatch.js.map +1 -1
- package/dist/firestore/sandbox/local-environment.d.ts +16 -2
- package/dist/firestore/sandbox/local-environment.d.ts.map +1 -1
- package/dist/firestore/sandbox/local-environment.js +33 -9
- package/dist/firestore/sandbox/local-environment.js.map +1 -1
- package/dist/firestore/sandbox/local-state.d.ts +5 -99
- package/dist/firestore/sandbox/local-state.d.ts.map +1 -1
- package/dist/firestore/sandbox/local-state.js +64 -117
- package/dist/firestore/sandbox/local-state.js.map +1 -1
- package/dist/firestore/sandbox/query-execution.d.ts +4 -1
- package/dist/firestore/sandbox/query-execution.d.ts.map +1 -1
- package/dist/firestore/sandbox/query-execution.js +51 -26
- package/dist/firestore/sandbox/query-execution.js.map +1 -1
- package/dist/firestore/sandbox/query-operand-equality.d.ts.map +1 -1
- package/dist/firestore/sandbox/query-operand-equality.js +50 -14
- package/dist/firestore/sandbox/query-operand-equality.js.map +1 -1
- package/dist/firestore/sandbox/query-operators.d.ts +4 -0
- package/dist/firestore/sandbox/query-operators.d.ts.map +1 -0
- package/dist/firestore/sandbox/query-operators.js +17 -0
- package/dist/firestore/sandbox/query-operators.js.map +1 -0
- package/dist/firestore/sandbox/query-value-registry.d.ts +1 -1
- package/dist/firestore/sandbox/query-value-registry.d.ts.map +1 -1
- package/dist/firestore/sandbox/query-value-registry.js +3 -1
- package/dist/firestore/sandbox/query-value-registry.js.map +1 -1
- package/dist/firestore/sandbox/request-events.d.ts +3 -0
- package/dist/firestore/sandbox/request-events.d.ts.map +1 -1
- package/dist/firestore/sandbox/request-events.js +4 -0
- package/dist/firestore/sandbox/request-events.js.map +1 -1
- package/dist/firestore/sandbox/rules-evidence.d.ts +7 -0
- package/dist/firestore/sandbox/rules-evidence.d.ts.map +1 -0
- package/dist/firestore/sandbox/rules-evidence.js +87 -0
- package/dist/firestore/sandbox/rules-evidence.js.map +1 -0
- package/dist/firestore/sandbox/rules-list-authorizer.d.ts +13 -1
- package/dist/firestore/sandbox/rules-list-authorizer.d.ts.map +1 -1
- package/dist/firestore/sandbox/rules-list-authorizer.js +53 -74
- package/dist/firestore/sandbox/rules-list-authorizer.js.map +1 -1
- package/dist/firestore/sandbox/rules-operation-reader.d.ts +8 -1
- package/dist/firestore/sandbox/rules-operation-reader.d.ts.map +1 -1
- package/dist/firestore/sandbox/rules-operation-reader.js +13 -5
- package/dist/firestore/sandbox/rules-operation-reader.js.map +1 -1
- package/dist/firestore/sandbox/rules-read-engine.d.ts +8 -1
- package/dist/firestore/sandbox/rules-read-engine.d.ts.map +1 -1
- package/dist/firestore/sandbox/rules-read-engine.js +21 -10
- package/dist/firestore/sandbox/rules-read-engine.js.map +1 -1
- package/dist/firestore/sandbox/rules-state.d.ts +5 -0
- package/dist/firestore/sandbox/rules-state.d.ts.map +1 -1
- package/dist/firestore/sandbox/rules-state.js +16 -0
- package/dist/firestore/sandbox/rules-state.js.map +1 -1
- package/dist/firestore/sandbox/snapshot-listeners.d.ts +9 -1
- package/dist/firestore/sandbox/snapshot-listeners.d.ts.map +1 -1
- package/dist/firestore/sandbox/snapshot-listeners.js.map +1 -1
- package/dist/firestore/sandbox/transaction-merge.d.ts +2 -33
- package/dist/firestore/sandbox/transaction-merge.d.ts.map +1 -1
- package/dist/firestore/sandbox/transaction-merge.js +19 -7
- package/dist/firestore/sandbox/transaction-merge.js.map +1 -1
- package/dist/firestore/sandbox/transaction-types.d.ts +11 -21
- package/dist/firestore/sandbox/transaction-types.d.ts.map +1 -1
- package/dist/firestore/sandbox/transaction-types.js.map +1 -1
- package/dist/firestore/sandbox/transaction-write-executor.d.ts +2 -1
- package/dist/firestore/sandbox/transaction-write-executor.d.ts.map +1 -1
- package/dist/firestore/sandbox/transaction-write-executor.js +110 -69
- package/dist/firestore/sandbox/transaction-write-executor.js.map +1 -1
- package/dist/firestore/sandbox/transaction.d.ts +3 -2
- package/dist/firestore/sandbox/transaction.d.ts.map +1 -1
- package/dist/firestore/sandbox/transaction.js +23 -6
- package/dist/firestore/sandbox/transaction.js.map +1 -1
- package/dist/firestore/sandbox/value-resolver.d.ts +1 -8
- package/dist/firestore/sandbox/value-resolver.d.ts.map +1 -1
- package/dist/firestore/sandbox/value-resolver.js +2 -13
- package/dist/firestore/sandbox/value-resolver.js.map +1 -1
- package/dist/firestore/sandbox/write-engine.d.ts +5 -1
- package/dist/firestore/sandbox/write-engine.d.ts.map +1 -1
- package/dist/firestore/sandbox/write-engine.js +14 -7
- package/dist/firestore/sandbox/write-engine.js.map +1 -1
- package/dist/firestore/sandbox/write-runtime.d.ts +12 -4
- package/dist/firestore/sandbox/write-runtime.d.ts.map +1 -1
- package/dist/firestore/sandbox/write-runtime.js +72 -38
- package/dist/firestore/sandbox/write-runtime.js.map +1 -1
- package/dist/firestore/sandbox/writes.d.ts +3 -1
- package/dist/firestore/sandbox/writes.d.ts.map +1 -1
- package/dist/firestore/sdk-activity.d.ts +8 -0
- package/dist/firestore/sdk-activity.d.ts.map +1 -0
- package/dist/firestore/sdk-activity.js +23 -0
- package/dist/firestore/sdk-activity.js.map +1 -0
- package/dist/firestore/snapshots.d.ts +18 -2
- package/dist/firestore/snapshots.d.ts.map +1 -1
- package/dist/firestore/snapshots.js +69 -16
- package/dist/firestore/snapshots.js.map +1 -1
- package/dist/firestore/state.d.ts +8 -3
- package/dist/firestore/state.d.ts.map +1 -1
- package/dist/firestore/state.js +30 -13
- package/dist/firestore/state.js.map +1 -1
- package/dist/firestore/timestamp.d.ts +28 -0
- package/dist/firestore/timestamp.d.ts.map +1 -0
- package/dist/firestore/timestamp.js +80 -0
- package/dist/firestore/timestamp.js.map +1 -0
- package/dist/firestore/tools.d.ts.map +1 -1
- package/dist/firestore/tools.js +2 -4
- package/dist/firestore/tools.js.map +1 -1
- package/dist/firestore/transactions.d.ts.map +1 -1
- package/dist/firestore/transactions.js +76 -3
- package/dist/firestore/transactions.js.map +1 -1
- package/dist/firestore/types.d.ts +26 -5
- package/dist/firestore/types.d.ts.map +1 -1
- package/dist/firestore/types.js.map +1 -1
- package/dist/firestore/vector-value.d.ts +11 -0
- package/dist/firestore/vector-value.d.ts.map +1 -0
- package/dist/firestore/vector-value.js +51 -0
- package/dist/firestore/vector-value.js.map +1 -0
- package/dist/firestore/writes.d.ts +0 -7
- package/dist/firestore/writes.d.ts.map +1 -1
- package/dist/firestore/writes.js +42 -25
- package/dist/firestore/writes.js.map +1 -1
- package/dist/functions/events.d.ts +12 -0
- package/dist/functions/events.d.ts.map +1 -0
- package/dist/functions/events.js +10 -0
- package/dist/functions/events.js.map +1 -0
- package/dist/messaging/broker/broker.d.ts +43 -30
- package/dist/messaging/broker/broker.d.ts.map +1 -1
- package/dist/messaging/broker/broker.js +148 -43
- package/dist/messaging/broker/broker.js.map +1 -1
- package/dist/messaging/broker/delivery-history.d.ts +5 -0
- package/dist/messaging/broker/delivery-history.d.ts.map +1 -0
- package/dist/messaging/broker/delivery-history.js +46 -0
- package/dist/messaging/broker/delivery-history.js.map +1 -0
- package/dist/messaging/broker/index.d.ts +2 -1
- package/dist/messaging/broker/index.d.ts.map +1 -1
- package/dist/messaging/broker/index.js +7 -0
- package/dist/messaging/broker/index.js.map +1 -1
- package/dist/messaging/broker/persistence.d.ts +12 -0
- package/dist/messaging/broker/persistence.d.ts.map +1 -0
- package/dist/messaging/broker/persistence.js +42 -0
- package/dist/messaging/broker/persistence.js.map +1 -0
- package/dist/messaging/broker/types.d.ts +44 -0
- package/dist/messaging/broker/types.d.ts.map +1 -1
- package/dist/messaging/broker/types.js +10 -1
- package/dist/messaging/broker/types.js.map +1 -1
- package/dist/messaging/events.d.ts +12 -0
- package/dist/messaging/events.d.ts.map +1 -0
- package/dist/messaging/events.js +19 -0
- package/dist/messaging/events.js.map +1 -0
- package/dist/rules/api/case-types.d.ts +7 -0
- package/dist/rules/api/case-types.d.ts.map +1 -1
- package/dist/rules/api/rtdb.d.ts.map +1 -1
- package/dist/rules/api/rtdb.js +20 -7
- package/dist/rules/api/rtdb.js.map +1 -1
- package/dist/rules/grammar/parse-error-wording.d.ts +31 -0
- package/dist/rules/grammar/parse-error-wording.d.ts.map +1 -0
- package/dist/rules/grammar/parse-error-wording.js +86 -0
- package/dist/rules/grammar/parse-error-wording.js.map +1 -0
- package/dist/rules/indexes/query-analysis.d.ts +33 -0
- package/dist/rules/indexes/query-analysis.d.ts.map +1 -0
- package/dist/rules/indexes/query-analysis.js +153 -0
- package/dist/rules/indexes/query-analysis.js.map +1 -0
- package/dist/rules/indexes/service-query.d.ts +48 -0
- package/dist/rules/indexes/service-query.d.ts.map +1 -0
- package/dist/rules/indexes/service-query.js +60 -0
- package/dist/rules/indexes/service-query.js.map +1 -0
- package/dist/rules/internal/index.d.ts +4 -0
- package/dist/rules/internal/index.d.ts.map +1 -1
- package/dist/rules/internal/index.js +10 -0
- package/dist/rules/internal/index.js.map +1 -1
- package/dist/rules/modules/rules-capabilities.generated.d.ts +1 -1
- package/dist/rules/modules/rules-capabilities.generated.js +1 -1
- package/dist/rules/modules/rules-capabilities.generated.js.map +1 -1
- package/dist/rules/rtdb/constraints/atoms.d.ts.map +1 -1
- package/dist/rules/rtdb/constraints/atoms.js +7 -7
- package/dist/rules/rtdb/constraints/atoms.js.map +1 -1
- package/dist/rules/rtdb/constraints/data.d.ts +2 -2
- package/dist/rules/rtdb/constraints/data.d.ts.map +1 -1
- package/dist/rules/rtdb/constraints/data.js +4 -4
- package/dist/rules/rtdb/constraints/data.js.map +1 -1
- package/dist/rules/rtdb/constraints/document.d.ts.map +1 -1
- package/dist/rules/rtdb/constraints/document.js +6 -2
- package/dist/rules/rtdb/constraints/document.js.map +1 -1
- package/dist/rules/rtdb/constraints/policies.d.ts +2 -2
- package/dist/rules/rtdb/constraints/policies.d.ts.map +1 -1
- package/dist/rules/rtdb/constraints/policies.js +3 -3
- package/dist/rules/rtdb/constraints/policies.js.map +1 -1
- package/dist/rules/rtdb/constraints/schema.js +3 -3
- package/dist/rules/rtdb/constraints/schema.js.map +1 -1
- package/dist/rules/rtdb/grammar/RtdbExpr.ohm +1 -3
- package/dist/rules/rtdb/grammar/RtdbExpr.ohm.generated.d.ts +1 -1
- package/dist/rules/rtdb/grammar/RtdbExpr.ohm.generated.d.ts.map +1 -1
- package/dist/rules/rtdb/grammar/RtdbExpr.ohm.generated.js +1 -3
- package/dist/rules/rtdb/grammar/RtdbExpr.ohm.generated.js.map +1 -1
- package/dist/rules/rtdb/grammar/linter.d.ts.map +1 -1
- package/dist/rules/rtdb/grammar/linter.js +28 -30
- package/dist/rules/rtdb/grammar/linter.js.map +1 -1
- package/dist/rules/rtdb/grammar/simulator.d.ts +15 -1
- package/dist/rules/rtdb/grammar/simulator.d.ts.map +1 -1
- package/dist/rules/rtdb/grammar/simulator.js +93 -65
- package/dist/rules/rtdb/grammar/simulator.js.map +1 -1
- package/dist/rules/rtdb/grammar/validator.d.ts.map +1 -1
- package/dist/rules/rtdb/grammar/validator.js +25 -26
- package/dist/rules/rtdb/grammar/validator.js.map +1 -1
- package/dist/rules/rtdb/simulation/handler.d.ts.map +1 -1
- package/dist/rules/rtdb/simulation/handler.js +136 -32
- package/dist/rules/rtdb/simulation/handler.js.map +1 -1
- package/dist/rules/rtdb/simulation/spec.d.ts +95 -5
- package/dist/rules/rtdb/simulation/spec.d.ts.map +1 -1
- package/dist/rules/rtdb/simulation/spec.js +22 -1
- package/dist/rules/rtdb/simulation/spec.js.map +1 -1
- package/dist/rules/rtdb/types.d.ts +18 -18
- package/dist/rules/simulator/evaluator.js +35 -69
- package/dist/rules/simulator/evaluator.js.map +1 -1
- package/dist/rules/simulator/handler.d.ts.map +1 -1
- package/dist/rules/simulator/handler.js +12 -3
- package/dist/rules/simulator/handler.js.map +1 -1
- package/dist/rules/simulator/mapdiff.d.ts +2 -0
- package/dist/rules/simulator/mapdiff.d.ts.map +1 -1
- package/dist/rules/simulator/mapdiff.js +7 -5
- package/dist/rules/simulator/mapdiff.js.map +1 -1
- package/dist/rules/simulator/query-proof-residual.d.ts +11 -0
- package/dist/rules/simulator/query-proof-residual.d.ts.map +1 -0
- package/dist/rules/simulator/query-proof-residual.js +177 -0
- package/dist/rules/simulator/query-proof-residual.js.map +1 -0
- package/dist/rules/simulator/query-proof.d.ts +21 -47
- package/dist/rules/simulator/query-proof.d.ts.map +1 -1
- package/dist/rules/simulator/query-proof.js +78 -13
- package/dist/rules/simulator/query-proof.js.map +1 -1
- package/dist/rules/simulator/request-path.d.ts +26 -0
- package/dist/rules/simulator/request-path.d.ts.map +1 -0
- package/dist/rules/simulator/request-path.js +36 -0
- package/dist/rules/simulator/request-path.js.map +1 -0
- package/dist/rules/simulator/trace-recorder.d.ts +1 -0
- package/dist/rules/simulator/trace-recorder.d.ts.map +1 -1
- package/dist/rules/simulator/trace-recorder.js +4 -0
- package/dist/rules/simulator/trace-recorder.js.map +1 -1
- package/dist/rules/simulator/wrappers/timestamp.d.ts +6 -0
- package/dist/rules/simulator/wrappers/timestamp.d.ts.map +1 -1
- package/dist/rules/simulator/wrappers/timestamp.js +8 -1
- package/dist/rules/simulator/wrappers/timestamp.js.map +1 -1
- package/dist/rules/simulator-tools-impl.d.ts.map +1 -1
- package/dist/rules/simulator-tools-impl.js +6 -3
- package/dist/rules/simulator-tools-impl.js.map +1 -1
- package/dist/rules/stdlib-tools.js +4 -4
- package/dist/rules/stdlib-tools.js.map +1 -1
- package/dist/rules/test/spec.d.ts +4 -4
- package/dist/sandbox/active-listeners.d.ts +69 -0
- package/dist/sandbox/active-listeners.d.ts.map +1 -0
- package/dist/sandbox/active-listeners.js +159 -0
- package/dist/sandbox/active-listeners.js.map +1 -0
- package/dist/sandbox/admin-firestore/error-translation.d.ts.map +1 -1
- package/dist/sandbox/admin-firestore/error-translation.js +15 -2
- package/dist/sandbox/admin-firestore/error-translation.js.map +1 -1
- package/dist/sandbox/admin-firestore/listeners.d.ts +0 -25
- package/dist/sandbox/admin-firestore/listeners.d.ts.map +1 -1
- package/dist/sandbox/admin-firestore/listeners.js +26 -2
- package/dist/sandbox/admin-firestore/listeners.js.map +1 -1
- package/dist/sandbox/admin-firestore/remote/listeners.d.ts.map +1 -1
- package/dist/sandbox/admin-firestore/remote/listeners.js +50 -29
- package/dist/sandbox/admin-firestore/remote/listeners.js.map +1 -1
- package/dist/sandbox/admin-firestore/remote/value-codec.d.ts +5 -12
- package/dist/sandbox/admin-firestore/remote/value-codec.d.ts.map +1 -1
- package/dist/sandbox/admin-firestore/remote/value-codec.js +7 -14
- package/dist/sandbox/admin-firestore/remote/value-codec.js.map +1 -1
- package/dist/sandbox/admin-firestore/remote/wire-types.d.ts +2 -0
- package/dist/sandbox/admin-firestore/remote/wire-types.d.ts.map +1 -1
- package/dist/sandbox/attribution/attribution-mode.d.ts +36 -0
- package/dist/sandbox/attribution/attribution-mode.d.ts.map +1 -0
- package/dist/sandbox/attribution/attribution-mode.js +68 -0
- package/dist/sandbox/attribution/attribution-mode.js.map +1 -0
- package/dist/sandbox/attribution/effect-regions.d.ts +37 -0
- package/dist/sandbox/attribution/effect-regions.d.ts.map +1 -0
- package/dist/sandbox/attribution/effect-regions.js +114 -0
- package/dist/sandbox/attribution/effect-regions.js.map +1 -0
- package/dist/sandbox/attribution/element-selector.d.ts +42 -0
- package/dist/sandbox/attribution/element-selector.d.ts.map +1 -0
- package/dist/sandbox/attribution/element-selector.js +109 -0
- package/dist/sandbox/attribution/element-selector.js.map +1 -0
- package/dist/sandbox/attribution/listener-owners.d.ts +111 -0
- package/dist/sandbox/attribution/listener-owners.d.ts.map +1 -0
- package/dist/sandbox/attribution/listener-owners.js +215 -0
- package/dist/sandbox/attribution/listener-owners.js.map +1 -0
- package/dist/sandbox/branches/engine.d.ts +129 -0
- package/dist/sandbox/branches/engine.d.ts.map +1 -0
- package/dist/sandbox/branches/engine.js +280 -0
- package/dist/sandbox/branches/engine.js.map +1 -0
- package/dist/sandbox/branches/index.d.ts +12 -139
- package/dist/sandbox/branches/index.d.ts.map +1 -1
- package/dist/sandbox/branches/index.js +8 -390
- package/dist/sandbox/branches/index.js.map +1 -1
- package/dist/sandbox/branches/promotion.d.ts +27 -0
- package/dist/sandbox/branches/promotion.d.ts.map +1 -0
- package/dist/sandbox/branches/promotion.js +160 -0
- package/dist/sandbox/branches/promotion.js.map +1 -0
- package/dist/sandbox/branches/state-diff.d.ts +66 -0
- package/dist/sandbox/branches/state-diff.d.ts.map +1 -0
- package/dist/sandbox/branches/state-diff.js +270 -0
- package/dist/sandbox/branches/state-diff.js.map +1 -0
- package/dist/sandbox/branches/store.d.ts +64 -0
- package/dist/sandbox/branches/store.d.ts.map +1 -0
- package/dist/sandbox/branches/store.js +264 -0
- package/dist/sandbox/branches/store.js.map +1 -0
- package/dist/sandbox/checkpoints/capture.d.ts +39 -0
- package/dist/sandbox/checkpoints/capture.d.ts.map +1 -0
- package/dist/sandbox/checkpoints/capture.js +69 -0
- package/dist/sandbox/checkpoints/capture.js.map +1 -0
- package/dist/sandbox/checkpoints/directory-backend.d.ts +30 -0
- package/dist/sandbox/checkpoints/directory-backend.d.ts.map +1 -0
- package/dist/sandbox/checkpoints/directory-backend.js +98 -0
- package/dist/sandbox/checkpoints/directory-backend.js.map +1 -0
- package/dist/sandbox/checkpoints/index.d.ts +15 -0
- package/dist/sandbox/checkpoints/index.d.ts.map +1 -0
- package/dist/sandbox/checkpoints/index.js +13 -0
- package/dist/sandbox/checkpoints/index.js.map +1 -0
- package/dist/sandbox/checkpoints/record-backend.d.ts +25 -0
- package/dist/sandbox/checkpoints/record-backend.d.ts.map +1 -0
- package/dist/sandbox/checkpoints/record-backend.js +81 -0
- package/dist/sandbox/checkpoints/record-backend.js.map +1 -0
- package/dist/sandbox/checkpoints/saved-states.d.ts +35 -0
- package/dist/sandbox/checkpoints/saved-states.d.ts.map +1 -0
- package/dist/sandbox/checkpoints/saved-states.js +47 -0
- package/dist/sandbox/checkpoints/saved-states.js.map +1 -0
- package/dist/sandbox/checkpoints/types.d.ts +84 -0
- package/dist/sandbox/checkpoints/types.d.ts.map +1 -0
- package/dist/sandbox/checkpoints/types.js +51 -0
- package/dist/sandbox/checkpoints/types.js.map +1 -0
- package/dist/sandbox/checkpoints/validation.d.ts +3 -0
- package/dist/sandbox/checkpoints/validation.d.ts.map +1 -0
- package/dist/sandbox/checkpoints/validation.js +99 -0
- package/dist/sandbox/checkpoints/validation.js.map +1 -0
- package/dist/sandbox/clock.d.ts +121 -0
- package/dist/sandbox/clock.d.ts.map +1 -0
- package/dist/sandbox/clock.js +167 -0
- package/dist/sandbox/clock.js.map +1 -0
- package/dist/sandbox/full-state.d.ts +160 -0
- package/dist/sandbox/full-state.d.ts.map +1 -0
- package/dist/sandbox/full-state.js +267 -0
- package/dist/sandbox/full-state.js.map +1 -0
- package/dist/sandbox/index.d.ts +13 -6
- package/dist/sandbox/index.d.ts.map +1 -1
- package/dist/sandbox/index.js +23 -9
- package/dist/sandbox/index.js.map +1 -1
- package/dist/sandbox/internal/ai-evidence.d.ts +27 -0
- package/dist/sandbox/internal/ai-evidence.d.ts.map +1 -0
- package/dist/sandbox/internal/ai-evidence.js +29 -0
- package/dist/sandbox/internal/ai-evidence.js.map +1 -0
- package/dist/sandbox/internal/event-history.d.ts +32 -0
- package/dist/sandbox/internal/event-history.d.ts.map +1 -0
- package/dist/sandbox/internal/event-history.js +199 -0
- package/dist/sandbox/internal/event-history.js.map +1 -0
- package/dist/sandbox/internal/history-integrity.d.ts +3 -0
- package/dist/sandbox/internal/history-integrity.d.ts.map +1 -0
- package/dist/sandbox/internal/history-integrity.js +12 -0
- package/dist/sandbox/internal/history-integrity.js.map +1 -0
- package/dist/sandbox/internal/history-retention.d.ts +6 -0
- package/dist/sandbox/internal/history-retention.d.ts.map +1 -0
- package/dist/sandbox/internal/history-retention.js +12 -0
- package/dist/sandbox/internal/history-retention.js.map +1 -0
- package/dist/sandbox/internal/index.d.ts +27 -0
- package/dist/sandbox/internal/index.d.ts.map +1 -1
- package/dist/sandbox/internal/index.js +26 -0
- package/dist/sandbox/internal/index.js.map +1 -1
- package/dist/sandbox/internal/observation-history.d.ts +6 -0
- package/dist/sandbox/internal/observation-history.d.ts.map +1 -0
- package/dist/sandbox/internal/observation-history.js +6 -0
- package/dist/sandbox/internal/observation-history.js.map +1 -0
- package/dist/sandbox/internal/observation-payload.d.ts +6 -0
- package/dist/sandbox/internal/observation-payload.d.ts.map +1 -0
- package/dist/sandbox/internal/observation-payload.js +24 -0
- package/dist/sandbox/internal/observation-payload.js.map +1 -0
- package/dist/sandbox/internal/provenance.d.ts +0 -1
- package/dist/sandbox/internal/provenance.d.ts.map +1 -1
- package/dist/sandbox/internal/provenance.js +6 -0
- package/dist/sandbox/internal/provenance.js.map +1 -1
- package/dist/sandbox/internal/root.d.ts +2 -1
- package/dist/sandbox/internal/root.d.ts.map +1 -1
- package/dist/sandbox/internal/root.js +2 -2
- package/dist/sandbox/internal/root.js.map +1 -1
- package/dist/sandbox/internal/rules-evidence-retention.d.ts +11 -0
- package/dist/sandbox/internal/rules-evidence-retention.d.ts.map +1 -0
- package/dist/sandbox/internal/rules-evidence-retention.js +27 -0
- package/dist/sandbox/internal/rules-evidence-retention.js.map +1 -0
- package/dist/sandbox/internal/sandbox-impl.d.ts +40 -33
- package/dist/sandbox/internal/sandbox-impl.d.ts.map +1 -1
- package/dist/sandbox/internal/sandbox-impl.js +83 -40
- package/dist/sandbox/internal/sandbox-impl.js.map +1 -1
- package/dist/sandbox/internal/sdk-activity.d.ts +112 -0
- package/dist/sandbox/internal/sdk-activity.d.ts.map +1 -0
- package/dist/sandbox/internal/sdk-activity.js +240 -0
- package/dist/sandbox/internal/sdk-activity.js.map +1 -0
- package/dist/sandbox/internal/sdk-coverage.d.ts +10 -0
- package/dist/sandbox/internal/sdk-coverage.d.ts.map +1 -0
- package/dist/sandbox/internal/sdk-coverage.js +21 -0
- package/dist/sandbox/internal/sdk-coverage.js.map +1 -0
- package/dist/sandbox/internal/sdk-observation.d.ts +32 -0
- package/dist/sandbox/internal/sdk-observation.d.ts.map +1 -0
- package/dist/sandbox/internal/sdk-observation.js +29 -0
- package/dist/sandbox/internal/sdk-observation.js.map +1 -0
- package/dist/sandbox/internal/sdk-rates.d.ts +97 -0
- package/dist/sandbox/internal/sdk-rates.d.ts.map +1 -0
- package/dist/sandbox/internal/sdk-rates.js +187 -0
- package/dist/sandbox/internal/sdk-rates.js.map +1 -0
- package/dist/sandbox/internal/sdk-write-activity.d.ts +5 -0
- package/dist/sandbox/internal/sdk-write-activity.d.ts.map +1 -0
- package/dist/sandbox/internal/sdk-write-activity.js +13 -0
- package/dist/sandbox/internal/sdk-write-activity.js.map +1 -0
- package/dist/sandbox/internal/state-schemas.d.ts +120 -0
- package/dist/sandbox/internal/state-schemas.d.ts.map +1 -0
- package/dist/sandbox/internal/state-schemas.js +42 -0
- package/dist/sandbox/internal/state-schemas.js.map +1 -0
- package/dist/sandbox/internal/state-values.d.ts +6 -0
- package/dist/sandbox/internal/state-values.d.ts.map +1 -0
- package/dist/sandbox/internal/state-values.js +15 -0
- package/dist/sandbox/internal/state-values.js.map +1 -0
- package/dist/sandbox/internal/storage-activity.d.ts +13 -0
- package/dist/sandbox/internal/storage-activity.d.ts.map +1 -0
- package/dist/sandbox/internal/storage-activity.js +48 -0
- package/dist/sandbox/internal/storage-activity.js.map +1 -0
- package/dist/sandbox/internal/usage-evidence.d.ts +24 -0
- package/dist/sandbox/internal/usage-evidence.d.ts.map +1 -0
- package/dist/sandbox/internal/usage-evidence.js +56 -0
- package/dist/sandbox/internal/usage-evidence.js.map +1 -0
- package/dist/sandbox/operation-record.d.ts +20 -1
- package/dist/sandbox/operation-record.d.ts.map +1 -1
- package/dist/sandbox/operation-record.js +100 -4
- package/dist/sandbox/operation-record.js.map +1 -1
- package/dist/sandbox/persistence/changed-buckets.d.ts +19 -0
- package/dist/sandbox/persistence/changed-buckets.d.ts.map +1 -0
- package/dist/sandbox/persistence/changed-buckets.js +72 -0
- package/dist/sandbox/persistence/changed-buckets.js.map +1 -0
- package/dist/sandbox/persistence/chunk-format.d.ts +27 -1
- package/dist/sandbox/persistence/chunk-format.d.ts.map +1 -1
- package/dist/sandbox/persistence/chunk-format.js +37 -25
- package/dist/sandbox/persistence/chunk-format.js.map +1 -1
- package/dist/sandbox/persistence/controller.d.ts.map +1 -1
- package/dist/sandbox/persistence/controller.js +91 -36
- package/dist/sandbox/persistence/controller.js.map +1 -1
- package/dist/sandbox/persistence/import-bundle.d.ts +8 -0
- package/dist/sandbox/persistence/import-bundle.d.ts.map +1 -0
- package/dist/sandbox/persistence/import-bundle.js +66 -0
- package/dist/sandbox/persistence/import-bundle.js.map +1 -0
- package/dist/sandbox/persistence/serialize.d.ts +1 -1
- package/dist/sandbox/persistence/serialize.d.ts.map +1 -1
- package/dist/sandbox/persistence/serialize.js +16 -11
- package/dist/sandbox/persistence/serialize.js.map +1 -1
- package/dist/sandbox/persistence/types.d.ts +4 -0
- package/dist/sandbox/persistence/types.d.ts.map +1 -1
- package/dist/sandbox/persistence/validate-services.d.ts +7 -0
- package/dist/sandbox/persistence/validate-services.d.ts.map +1 -0
- package/dist/sandbox/persistence/validate-services.js +73 -0
- package/dist/sandbox/persistence/validate-services.js.map +1 -0
- package/dist/sandbox/remote.d.ts +6 -0
- package/dist/sandbox/remote.d.ts.map +1 -1
- package/dist/sandbox/remote.js.map +1 -1
- package/dist/sandbox/replay/index.d.ts +1 -1
- package/dist/sandbox/replay/index.d.ts.map +1 -1
- package/dist/sandbox/replay/index.js +18 -8
- package/dist/sandbox/replay/index.js.map +1 -1
- package/dist/sandbox/types/errors.d.ts +3 -1
- package/dist/sandbox/types/errors.d.ts.map +1 -1
- package/dist/sandbox/types/errors.js +0 -4
- package/dist/sandbox/types/errors.js.map +1 -1
- package/dist/sandbox/types/events.d.ts +105 -76
- package/dist/sandbox/types/events.d.ts.map +1 -1
- package/dist/sandbox/types/events.js +0 -5
- package/dist/sandbox/types/events.js.map +1 -1
- package/dist/sandbox/types/index.d.ts +2 -1
- package/dist/sandbox/types/index.d.ts.map +1 -1
- package/dist/sandbox/types/index.js +1 -0
- package/dist/sandbox/types/index.js.map +1 -1
- package/dist/sandbox/types/operation.d.ts +13 -4
- package/dist/sandbox/types/operation.d.ts.map +1 -1
- package/dist/sandbox/types/persistence.d.ts +2 -2
- package/dist/sandbox/types/query-proof.d.ts +25 -0
- package/dist/sandbox/types/query-proof.d.ts.map +1 -0
- package/dist/sandbox/types/query-proof.js +2 -0
- package/dist/sandbox/types/query-proof.js.map +1 -0
- package/dist/sandbox/types/request-observation.d.ts +19 -0
- package/dist/sandbox/types/request-observation.d.ts.map +1 -0
- package/dist/sandbox/types/request-observation.js +13 -0
- package/dist/sandbox/types/request-observation.js.map +1 -0
- package/dist/sandbox/types/rules-evidence.d.ts +48 -0
- package/dist/sandbox/types/rules-evidence.d.ts.map +1 -0
- package/dist/sandbox/types/rules-evidence.js +2 -0
- package/dist/sandbox/types/rules-evidence.js.map +1 -0
- package/dist/sandbox/types/service-event-record.d.ts +30 -0
- package/dist/sandbox/types/service-event-record.d.ts.map +1 -0
- package/dist/sandbox/types/service-event-record.js +13 -0
- package/dist/sandbox/types/service-event-record.js.map +1 -0
- package/dist/sandbox/types/service-event-records.d.ts +64 -0
- package/dist/sandbox/types/service-event-records.d.ts.map +1 -0
- package/dist/sandbox/types/service-event-records.js +31 -0
- package/dist/sandbox/types/service-event-records.js.map +1 -0
- package/dist/sandbox/types/service-mutation-event.d.ts +88 -0
- package/dist/sandbox/types/service-mutation-event.d.ts.map +1 -0
- package/dist/sandbox/types/service-mutation-event.js +2 -0
- package/dist/sandbox/types/service-mutation-event.js.map +1 -0
- package/dist/storage/activity-coverage.d.ts +9 -0
- package/dist/storage/activity-coverage.d.ts.map +1 -0
- package/dist/storage/activity-coverage.js +9 -0
- package/dist/storage/activity-coverage.js.map +1 -0
- package/dist/storage/base64.d.ts +14 -0
- package/dist/storage/base64.d.ts.map +1 -0
- package/dist/storage/base64.js +34 -0
- package/dist/storage/base64.js.map +1 -0
- package/dist/storage/download.d.ts +12 -4
- package/dist/storage/download.d.ts.map +1 -1
- package/dist/storage/download.js +19 -6
- package/dist/storage/download.js.map +1 -1
- package/dist/storage/enforce.d.ts +13 -2
- package/dist/storage/enforce.d.ts.map +1 -1
- package/dist/storage/enforce.js +21 -3
- package/dist/storage/enforce.js.map +1 -1
- package/dist/storage/errors.d.ts +29 -5
- package/dist/storage/errors.d.ts.map +1 -1
- package/dist/storage/errors.js +28 -0
- package/dist/storage/errors.js.map +1 -1
- package/dist/storage/events.d.ts +12 -0
- package/dist/storage/events.d.ts.map +1 -0
- package/dist/storage/events.js +10 -0
- package/dist/storage/events.js.map +1 -0
- package/dist/storage/index.d.ts +7 -7
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +7 -5
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/internal.d.ts +10 -1
- package/dist/storage/internal.d.ts.map +1 -1
- package/dist/storage/internal.js +9 -1
- package/dist/storage/internal.js.map +1 -1
- package/dist/storage/metadata.d.ts +19 -0
- package/dist/storage/metadata.d.ts.map +1 -1
- package/dist/storage/metadata.js +50 -19
- package/dist/storage/metadata.js.map +1 -1
- package/dist/storage/observed.d.ts +16 -0
- package/dist/storage/observed.d.ts.map +1 -0
- package/dist/storage/observed.js +17 -0
- package/dist/storage/observed.js.map +1 -0
- package/dist/storage/persistence.d.ts +157 -20
- package/dist/storage/persistence.d.ts.map +1 -1
- package/dist/storage/persistence.js +423 -53
- package/dist/storage/persistence.js.map +1 -1
- package/dist/storage/reference.d.ts +3 -1
- package/dist/storage/reference.d.ts.map +1 -1
- package/dist/storage/reference.js +3 -2
- package/dist/storage/reference.js.map +1 -1
- package/dist/storage/remote-bytes.d.ts +44 -0
- package/dist/storage/remote-bytes.d.ts.map +1 -0
- package/dist/storage/remote-bytes.js +97 -0
- package/dist/storage/remote-bytes.js.map +1 -0
- package/dist/storage/resumable.d.ts.map +1 -1
- package/dist/storage/resumable.js +16 -0
- package/dist/storage/resumable.js.map +1 -1
- package/dist/storage/rules-resolution.d.ts +13 -1
- package/dist/storage/rules-resolution.d.ts.map +1 -1
- package/dist/storage/rules-resolution.js +28 -0
- package/dist/storage/rules-resolution.js.map +1 -1
- package/dist/storage/sandbox/persistence-state.d.ts +25 -0
- package/dist/storage/sandbox/persistence-state.d.ts.map +1 -0
- package/dist/storage/sandbox/persistence-state.js +53 -0
- package/dist/storage/sandbox/persistence-state.js.map +1 -0
- package/dist/storage/sandbox/rules-bindings.d.ts +15 -0
- package/dist/storage/sandbox/rules-bindings.d.ts.map +1 -0
- package/dist/storage/sandbox/rules-bindings.js +69 -0
- package/dist/storage/sandbox/rules-bindings.js.map +1 -0
- package/dist/storage/sandbox/rules-collection-methods.d.ts +3 -0
- package/dist/storage/sandbox/rules-collection-methods.d.ts.map +1 -0
- package/dist/storage/sandbox/rules-collection-methods.js +149 -0
- package/dist/storage/sandbox/rules-collection-methods.js.map +1 -0
- package/dist/storage/sandbox/rules-evaluator.d.ts +2 -2
- package/dist/storage/sandbox/rules-evaluator.d.ts.map +1 -1
- package/dist/storage/sandbox/rules-evaluator.js +51 -129
- package/dist/storage/sandbox/rules-evaluator.js.map +1 -1
- package/dist/storage/sandbox/rules-firestore-lookup.d.ts +25 -0
- package/dist/storage/sandbox/rules-firestore-lookup.d.ts.map +1 -0
- package/dist/storage/sandbox/rules-firestore-lookup.js +94 -0
- package/dist/storage/sandbox/rules-firestore-lookup.js.map +1 -0
- package/dist/storage/sandbox/rules-hashing-methods.d.ts +16 -0
- package/dist/storage/sandbox/rules-hashing-methods.d.ts.map +1 -0
- package/dist/storage/sandbox/rules-hashing-methods.js +41 -0
- package/dist/storage/sandbox/rules-hashing-methods.js.map +1 -0
- package/dist/storage/sandbox/rules-method-calls.d.ts +40 -0
- package/dist/storage/sandbox/rules-method-calls.d.ts.map +1 -0
- package/dist/storage/sandbox/rules-method-calls.js +47 -0
- package/dist/storage/sandbox/rules-method-calls.js.map +1 -0
- package/dist/storage/sandbox/rules-methods.d.ts +11 -12
- package/dist/storage/sandbox/rules-methods.d.ts.map +1 -1
- package/dist/storage/sandbox/rules-methods.js +62 -359
- package/dist/storage/sandbox/rules-methods.js.map +1 -1
- package/dist/storage/sandbox/rules-operators.d.ts +32 -0
- package/dist/storage/sandbox/rules-operators.d.ts.map +1 -0
- package/dist/storage/sandbox/rules-operators.js +85 -0
- package/dist/storage/sandbox/rules-operators.js.map +1 -0
- package/dist/storage/sandbox/rules-string-methods.d.ts +3 -0
- package/dist/storage/sandbox/rules-string-methods.d.ts.map +1 -0
- package/dist/storage/sandbox/rules-string-methods.js +199 -0
- package/dist/storage/sandbox/rules-string-methods.js.map +1 -0
- package/dist/storage/sandbox/rules-time-methods.d.ts +25 -0
- package/dist/storage/sandbox/rules-time-methods.d.ts.map +1 -0
- package/dist/storage/sandbox/rules-time-methods.js +89 -0
- package/dist/storage/sandbox/rules-time-methods.js.map +1 -0
- package/dist/storage/sandbox/rules-values.d.ts +6 -0
- package/dist/storage/sandbox/rules-values.d.ts.map +1 -1
- package/dist/storage/sandbox/rules-values.js +29 -2
- package/dist/storage/sandbox/rules-values.js.map +1 -1
- package/dist/storage/sandbox/rules.d.ts +25 -13
- package/dist/storage/sandbox/rules.d.ts.map +1 -1
- package/dist/storage/sandbox/rules.js +19 -10
- package/dist/storage/sandbox/rules.js.map +1 -1
- package/dist/storage/sandbox/running-service.d.ts +65 -0
- package/dist/storage/sandbox/running-service.d.ts.map +1 -0
- package/dist/storage/sandbox/running-service.js +30 -0
- package/dist/storage/sandbox/running-service.js.map +1 -0
- package/dist/storage/service.d.ts +46 -28
- package/dist/storage/service.d.ts.map +1 -1
- package/dist/storage/service.js +169 -57
- package/dist/storage/service.js.map +1 -1
- package/dist/storage/string-format.d.ts +9 -0
- package/dist/storage/string-format.d.ts.map +1 -0
- package/dist/storage/string-format.js +8 -0
- package/dist/storage/string-format.js.map +1 -0
- package/dist/storage/upload.d.ts +2 -1
- package/dist/storage/upload.d.ts.map +1 -1
- package/dist/storage/upload.js +6 -2
- package/dist/storage/upload.js.map +1 -1
- package/dist/storage/url.d.ts +18 -0
- package/dist/storage/url.d.ts.map +1 -0
- package/dist/storage/url.js +84 -0
- package/dist/storage/url.js.map +1 -0
- package/package.json +17 -1
- package/src/ai/activity.ts +43 -0
- package/src/ai/broker/broker.ts +59 -6
- package/src/ai/broker/gemini-engine.ts +16 -0
- package/src/ai/broker/index.ts +1 -1
- package/src/ai/broker/openai-engine.ts +6 -3
- package/src/ai/broker/scripted-engine.ts +16 -5
- package/src/ai/broker/types.ts +6 -2
- package/src/ai/events.ts +29 -0
- package/src/ai/generation-enums.ts +48 -0
- package/src/ai/index.ts +9 -0
- package/src/ai/instances.ts +22 -2
- package/src/ai/internal.ts +5 -0
- package/src/ai/sandbox-plane.ts +23 -8
- package/src/ai/scripting.ts +42 -7
- package/src/app/internal.ts +1 -0
- package/src/auth/email-link.ts +32 -21
- package/src/auth/events.ts +29 -0
- package/src/auth/factor-id.ts +7 -0
- package/src/auth/index.ts +2 -0
- package/src/auth/instances.ts +13 -1
- package/src/auth/internal.ts +24 -0
- package/src/auth/modular.ts +27 -0
- package/src/auth/reauth.ts +3 -2
- package/src/auth/sandbox/default-avatar.ts +177 -0
- package/src/auth/sandbox/driver.ts +54 -0
- package/src/auth/sandbox/project-store.ts +0 -2
- package/src/auth/sandbox-backend-types.ts +31 -20
- package/src/auth/sandbox-backend.ts +400 -94
- package/src/auth/seed-user.ts +38 -0
- package/src/auth/tokens.ts +21 -18
- package/src/auth/types.ts +13 -1
- package/src/database/activity-coverage.ts +10 -0
- package/src/database/connection-lifecycle.ts +53 -24
- package/src/database/events.ts +20 -0
- package/src/database/instances.ts +52 -21
- package/src/database/internal/query-projection.ts +333 -0
- package/src/database/internal.ts +2 -0
- package/src/database/listeners.ts +162 -44
- package/src/database/operations.ts +73 -50
- package/src/database/replay.ts +6 -2
- package/src/database/routing.ts +4 -0
- package/src/database/sandbox/backend-for.ts +145 -25
- package/src/database/sandbox/backend-state.ts +15 -1
- package/src/database/sandbox/backend.ts +4 -2
- package/src/database/sandbox/child-listeners.ts +32 -13
- package/src/database/sandbox/listener-types.ts +5 -0
- package/src/database/sandbox/operation-events.ts +23 -9
- package/src/database/sandbox/persistence-state.ts +4 -11
- package/src/database/sandbox/priority-writes.ts +2 -2
- package/src/database/sandbox/query.ts +13 -268
- package/src/database/sandbox/rules-eval.ts +144 -10
- package/src/database/sandbox/transactions.ts +17 -39
- package/src/database/sandbox/value-listeners.ts +66 -23
- package/src/database/sandbox/write-plane.ts +29 -22
- package/src/database/sdk-activity.ts +26 -0
- package/src/database/transactions.ts +15 -11
- package/src/database/types.ts +12 -1
- package/src/deferred/entry.ts +16 -10
- package/src/firestore/activity-coverage.ts +8 -0
- package/src/firestore/aggregates.ts +17 -9
- package/src/firestore/bytes.ts +56 -0
- package/src/firestore/converter-method.ts +49 -0
- package/src/firestore/errors.ts +8 -0
- package/src/firestore/field-values.ts +3 -158
- package/src/firestore/geo-point.ts +56 -0
- package/src/firestore/index.ts +1 -1
- package/src/firestore/instances.ts +23 -2
- package/src/firestore/internal/document-data.ts +9 -0
- package/src/firestore/internal/index.ts +7 -0
- package/src/firestore/internal/value-codec.ts +150 -83
- package/src/firestore/internal/value-depth.ts +19 -0
- package/src/firestore/listeners.ts +60 -18
- package/src/firestore/persistence.ts +14 -9
- package/src/firestore/plain-object.ts +7 -0
- package/src/firestore/query-constraints.ts +4 -8
- package/src/firestore/reads.ts +81 -48
- package/src/firestore/refs.ts +56 -41
- package/src/firestore/sandbox/activity-query-display.ts +138 -0
- package/src/firestore/sandbox/admin-compat/batch.ts +26 -19
- package/src/firestore/sandbox/admin-compat/query-comparison.ts +9 -8
- package/src/firestore/sandbox/admin-compat/query.ts +46 -12
- package/src/firestore/sandbox/admin-compat/read-translation.ts +18 -6
- package/src/firestore/sandbox/admin-compat/transaction.ts +14 -4
- package/src/firestore/sandbox/admin-compat/types.ts +6 -88
- package/src/firestore/sandbox/atomic-state.ts +112 -0
- package/src/firestore/sandbox/atomic-write-pipeline.ts +129 -77
- package/src/firestore/sandbox/batch-write-executor.ts +51 -29
- package/src/firestore/sandbox/converters/user-timestamp.ts +19 -42
- package/src/firestore/sandbox/document-copy.ts +27 -0
- package/src/firestore/sandbox/document-store.ts +108 -0
- package/src/firestore/sandbox/errors.ts +5 -1
- package/src/firestore/sandbox/event-log.ts +72 -7
- package/src/firestore/sandbox/field-merge.ts +10 -19
- package/src/firestore/sandbox/history-controls.ts +1 -1
- package/src/firestore/sandbox/list-query-proof.ts +43 -72
- package/src/firestore/sandbox/listener-dispatch.ts +59 -4
- package/src/firestore/sandbox/local-environment.ts +35 -7
- package/src/firestore/sandbox/local-state.ts +72 -232
- package/src/firestore/sandbox/query-execution.ts +56 -34
- package/src/firestore/sandbox/query-operand-equality.ts +57 -14
- package/src/firestore/sandbox/query-operators.ts +20 -0
- package/src/firestore/sandbox/query-value-registry.ts +3 -2
- package/src/firestore/sandbox/request-events.ts +5 -0
- package/src/firestore/sandbox/rules-evidence.ts +94 -0
- package/src/firestore/sandbox/rules-list-authorizer.ts +62 -107
- package/src/firestore/sandbox/rules-operation-reader.ts +11 -4
- package/src/firestore/sandbox/rules-read-engine.ts +19 -8
- package/src/firestore/sandbox/rules-state.ts +21 -0
- package/src/firestore/sandbox/snapshot-listeners.ts +12 -1
- package/src/firestore/sandbox/transaction-merge.ts +33 -20
- package/src/firestore/sandbox/transaction-types.ts +11 -21
- package/src/firestore/sandbox/transaction-write-executor.ts +103 -69
- package/src/firestore/sandbox/transaction.ts +24 -7
- package/src/firestore/sandbox/value-resolver.ts +2 -13
- package/src/firestore/sandbox/write-engine.ts +13 -5
- package/src/firestore/sandbox/write-runtime.ts +68 -40
- package/src/firestore/sandbox/writes.ts +3 -1
- package/src/firestore/sdk-activity.ts +31 -0
- package/src/firestore/snapshots.ts +84 -18
- package/src/firestore/state.ts +34 -14
- package/src/firestore/timestamp.ts +86 -0
- package/src/firestore/tools.ts +3 -3
- package/src/firestore/transactions.ts +88 -8
- package/src/firestore/types.ts +26 -5
- package/src/firestore/vector-value.ts +54 -0
- package/src/firestore/writes.ts +53 -43
- package/src/functions/events.ts +27 -0
- package/src/messaging/broker/broker.test.ts +114 -0
- package/src/messaging/broker/broker.ts +152 -65
- package/src/messaging/broker/delivery-history.ts +49 -0
- package/src/messaging/broker/index.ts +11 -0
- package/src/messaging/broker/persistence.ts +54 -0
- package/src/messaging/broker/types.ts +50 -0
- package/src/messaging/events.ts +29 -0
- package/src/rules/api/case-types.ts +7 -0
- package/src/rules/api/rtdb.ts +15 -7
- package/src/rules/grammar/parse-error-wording.ts +98 -0
- package/src/rules/indexes/query-analysis.ts +136 -0
- package/src/rules/indexes/service-query.ts +69 -0
- package/src/rules/internal/index.ts +16 -0
- package/src/rules/modules/rules-capabilities.generated.ts +1 -1
- package/src/rules/rtdb/constraints/atoms.spec.ts +7 -7
- package/src/rules/rtdb/constraints/atoms.ts +7 -7
- package/src/rules/rtdb/constraints/data.ts +4 -4
- package/src/rules/rtdb/constraints/document.ts +4 -2
- package/src/rules/rtdb/constraints/game.spec.ts +4 -4
- package/src/rules/rtdb/constraints/policies.spec.ts +5 -5
- package/src/rules/rtdb/constraints/policies.ts +4 -4
- package/src/rules/rtdb/constraints/schema.ts +3 -3
- package/src/rules/rtdb/grammar/RtdbExpr.ohm +1 -3
- package/src/rules/rtdb/grammar/RtdbExpr.ohm.generated.ts +1 -3
- package/src/rules/rtdb/grammar/linter.ts +34 -30
- package/src/rules/rtdb/grammar/simulator.ts +112 -74
- package/src/rules/rtdb/grammar/validator.ts +30 -26
- package/src/rules/rtdb/simulation/handler.ts +139 -36
- package/src/rules/rtdb/simulation/spec.ts +24 -1
- package/src/rules/simulator/evaluator.ts +34 -41
- package/src/rules/simulator/handler.ts +12 -3
- package/src/rules/simulator/mapdiff.ts +7 -5
- package/src/rules/simulator/query-proof-residual.ts +209 -0
- package/src/rules/simulator/query-proof.ts +53 -27
- package/src/rules/simulator/request-path.ts +39 -0
- package/src/rules/simulator/trace-recorder.ts +3 -0
- package/src/rules/simulator/wrappers/timestamp.ts +8 -1
- package/src/rules/simulator-tools-impl.ts +6 -3
- package/src/rules/stdlib-tools.ts +4 -4
- package/src/sandbox/active-listeners.ts +245 -0
- package/src/sandbox/admin-firestore/error-translation.ts +16 -2
- package/src/sandbox/admin-firestore/listeners.ts +26 -1
- package/src/sandbox/admin-firestore/remote/listeners.ts +50 -32
- package/src/sandbox/admin-firestore/remote/value-codec.ts +7 -14
- package/src/sandbox/admin-firestore/remote/wire-types.ts +3 -0
- package/src/sandbox/attribution/attribution-mode.ts +74 -0
- package/src/sandbox/attribution/effect-regions.ts +130 -0
- package/src/sandbox/attribution/element-selector.ts +118 -0
- package/src/sandbox/attribution/listener-owners.ts +277 -0
- package/src/sandbox/branches/engine.ts +362 -0
- package/src/sandbox/branches/index.ts +12 -448
- package/src/sandbox/branches/promotion.ts +207 -0
- package/src/sandbox/branches/state-diff.ts +333 -0
- package/src/sandbox/branches/store.ts +317 -0
- package/src/sandbox/checkpoints/capture.ts +77 -0
- package/src/sandbox/checkpoints/directory-backend.ts +110 -0
- package/src/sandbox/checkpoints/index.ts +32 -0
- package/src/sandbox/checkpoints/record-backend.ts +109 -0
- package/src/sandbox/checkpoints/saved-states.ts +72 -0
- package/src/sandbox/checkpoints/types.ts +115 -0
- package/src/sandbox/checkpoints/validation.ts +102 -0
- package/src/sandbox/clock.ts +205 -0
- package/src/sandbox/full-state.ts +403 -0
- package/src/sandbox/index.ts +53 -10
- package/src/sandbox/internal/ai-evidence.ts +38 -0
- package/src/sandbox/internal/event-history.ts +193 -0
- package/src/sandbox/internal/history-integrity.ts +12 -0
- package/src/sandbox/internal/history-retention.ts +16 -0
- package/src/sandbox/internal/index.ts +65 -0
- package/src/sandbox/internal/observation-history.ts +5 -0
- package/src/sandbox/internal/observation-payload.ts +18 -0
- package/src/sandbox/internal/provenance.ts +5 -0
- package/src/sandbox/internal/root.ts +3 -2
- package/src/sandbox/internal/rules-evidence-retention.ts +28 -0
- package/src/sandbox/internal/sandbox-impl.ts +91 -45
- package/src/sandbox/internal/sdk-activity.ts +291 -0
- package/src/sandbox/internal/sdk-coverage.ts +28 -0
- package/src/sandbox/internal/sdk-observation.ts +62 -0
- package/src/sandbox/internal/sdk-rates.ts +240 -0
- package/src/sandbox/internal/sdk-write-activity.ts +14 -0
- package/src/sandbox/internal/state-schemas.ts +47 -0
- package/src/sandbox/internal/state-values.ts +20 -0
- package/src/sandbox/internal/storage-activity.ts +43 -0
- package/src/sandbox/internal/usage-evidence.ts +77 -0
- package/src/sandbox/operation-record.ts +107 -4
- package/src/sandbox/persistence/changed-buckets.ts +61 -0
- package/src/sandbox/persistence/chunk-format.ts +39 -27
- package/src/sandbox/persistence/controller.ts +85 -33
- package/src/sandbox/persistence/import-bundle.ts +64 -0
- package/src/sandbox/persistence/serialize.ts +16 -10
- package/src/sandbox/persistence/types.ts +4 -0
- package/src/sandbox/persistence/validate-services.ts +70 -0
- package/src/sandbox/remote.ts +7 -0
- package/src/sandbox/replay/index.ts +15 -8
- package/src/sandbox/types/errors.ts +3 -1
- package/src/sandbox/types/events.ts +118 -75
- package/src/sandbox/types/index.ts +12 -0
- package/src/sandbox/types/operation.ts +14 -4
- package/src/sandbox/types/persistence.ts +2 -2
- package/src/sandbox/types/query-proof.ts +26 -0
- package/src/sandbox/types/request-observation.ts +25 -0
- package/src/sandbox/types/rules-evidence.ts +37 -0
- package/src/sandbox/types/service-event-record.ts +34 -0
- package/src/sandbox/types/service-event-records.ts +42 -0
- package/src/sandbox/types/service-mutation-event.ts +93 -0
- package/src/storage/activity-coverage.ts +8 -0
- package/src/storage/base64.ts +35 -0
- package/src/storage/download.ts +19 -6
- package/src/storage/enforce.ts +26 -4
- package/src/storage/errors.ts +29 -14
- package/src/storage/events.ts +21 -0
- package/src/storage/index.ts +7 -7
- package/src/storage/internal.ts +21 -0
- package/src/storage/metadata.ts +68 -19
- package/src/storage/observed.ts +16 -0
- package/src/storage/persistence.ts +574 -66
- package/src/storage/reference.ts +6 -3
- package/src/storage/remote-bytes.ts +122 -0
- package/src/storage/resumable.ts +16 -3
- package/src/storage/rules-resolution.ts +43 -1
- package/src/storage/sandbox/persistence-state.ts +71 -0
- package/src/storage/sandbox/rules-bindings.ts +69 -0
- package/src/storage/sandbox/rules-collection-methods.ts +161 -0
- package/src/storage/sandbox/rules-evaluator.ts +65 -142
- package/src/storage/sandbox/rules-firestore-lookup.ts +112 -0
- package/src/storage/sandbox/rules-hashing-methods.ts +50 -0
- package/src/storage/sandbox/rules-method-calls.ts +67 -0
- package/src/storage/sandbox/rules-methods.ts +63 -404
- package/src/storage/sandbox/rules-operators.ts +93 -0
- package/src/storage/sandbox/rules-string-methods.ts +214 -0
- package/src/storage/sandbox/rules-time-methods.ts +98 -0
- package/src/storage/sandbox/rules-values.ts +20 -1
- package/src/storage/sandbox/rules.ts +27 -14
- package/src/storage/sandbox/running-service.ts +52 -0
- package/src/storage/service.ts +196 -85
- package/src/storage/string-format.ts +8 -0
- package/src/storage/upload.ts +8 -3
- package/src/storage/url.ts +106 -0
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
* and hands it the live sandbox. Disposing the controller detaches
|
|
9
9
|
* every side effect and leaves the sandbox unchanged.
|
|
10
10
|
*/
|
|
11
|
+
import { ChangedBuckets } from './changed-buckets.js';
|
|
12
|
+
import { CHUNK_FORMAT_VERSION, META_RECORD_ID } from './chunk-format.js';
|
|
11
13
|
import { SandboxImpl } from '../internal/sandbox-impl.js';
|
|
14
|
+
import { getClock } from '../clock.js';
|
|
12
15
|
import { createIndexedDBBackend, createMemoryBackend } from './backends.js';
|
|
13
16
|
import { serializeToBuckets, deserializeFromBuckets, migrateV2ToRecords, } from './chunk-format.js';
|
|
14
17
|
const DEFAULT_FLUSH_INTERVAL_MS = 250;
|
|
@@ -101,44 +104,71 @@ export async function attachPersistence(sandbox, rawOptions) {
|
|
|
101
104
|
// so late-registering services can still receive their saved state even
|
|
102
105
|
// though they weren't in the registry when `restore()` ran.
|
|
103
106
|
const restoredServices = await restore(sandbox, backend, options.key, lastHashes);
|
|
107
|
+
const pendingServices = new Map(Object.entries(restoredServices ?? {}));
|
|
108
|
+
const serviceSnapshots = new Map();
|
|
104
109
|
let pendingFlush = null;
|
|
105
110
|
let disposed = false;
|
|
106
111
|
// Track unsubscribers for service change-notification hooks so we can
|
|
107
112
|
// clean up in dispose(). Keyed by service name (not strictly needed,
|
|
108
113
|
// but makes debugging easier).
|
|
109
114
|
const serviceUnsubs = new Map();
|
|
110
|
-
|
|
115
|
+
const localSandbox = sandbox instanceof SandboxImpl ? sandbox : null;
|
|
116
|
+
const changedBuckets = localSandbox ? new ChangedBuckets(() => localSandbox.getEnv().snapshot(), path => localSandbox.getEnv().getDocument(path), [...lastHashes.keys()].filter(id => id !== META_RECORD_ID)) : null;
|
|
117
|
+
// Prepare immutable records before awaiting the backend; later mutations stay dirty.
|
|
111
118
|
const realFlush = async () => {
|
|
112
119
|
if (disposed)
|
|
113
120
|
return;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
121
|
+
const prepared = changedBuckets?.prepare();
|
|
122
|
+
try {
|
|
123
|
+
const services = { ...Object.fromEntries(pendingServices) };
|
|
124
|
+
let records;
|
|
125
|
+
const usesChangedBuckets = prepared !== undefined && localSandbox !== null;
|
|
126
|
+
if (usesChangedBuckets) {
|
|
127
|
+
for (const [name, service] of localSandbox.getServiceRegistry()) {
|
|
128
|
+
const needsSnapshot = !service.subscribe || !serviceSnapshots.has(name);
|
|
129
|
+
if (needsSnapshot)
|
|
130
|
+
serviceSnapshots.set(name, structuredClone(service.snapshot()));
|
|
131
|
+
services[name] = serviceSnapshots.get(name);
|
|
132
|
+
}
|
|
133
|
+
records = new Map(prepared.records);
|
|
134
|
+
records.set(META_RECORD_ID, { version: CHUNK_FORMAT_VERSION, savedAt: getClock(sandbox).now(), services });
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
const snap = sandbox.snapshot();
|
|
138
|
+
records = serializeToBuckets(snap.firestore, { ...services, ...snap.services }, getClock(sandbox).now());
|
|
139
|
+
}
|
|
140
|
+
const changed = new Map();
|
|
141
|
+
const nextHashes = new Map();
|
|
142
|
+
for (const [id, record] of records) {
|
|
143
|
+
const hash = hashRecord(record);
|
|
144
|
+
nextHashes.set(id, hash);
|
|
145
|
+
const changedHash = lastHashes.get(id) !== hash;
|
|
146
|
+
if (changedHash)
|
|
147
|
+
changed.set(id, record);
|
|
148
|
+
}
|
|
149
|
+
const removed = prepared?.removed ?? [...lastHashes.keys()].filter(id => !records.has(id));
|
|
150
|
+
const applyChanges = backend.applyChanges;
|
|
151
|
+
const commitsAtomically = applyChanges !== undefined;
|
|
152
|
+
if (commitsAtomically) {
|
|
153
|
+
await applyChanges(options.key, changed, removed);
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
const hasChanges = changed.size > 0;
|
|
157
|
+
if (hasChanges)
|
|
158
|
+
await backend.putRecords(options.key, changed);
|
|
159
|
+
const hasRemovals = removed.length > 0;
|
|
160
|
+
if (hasRemovals)
|
|
161
|
+
await backend.deleteRecords(options.key, removed);
|
|
162
|
+
}
|
|
163
|
+
for (const id of removed)
|
|
164
|
+
lastHashes.delete(id);
|
|
165
|
+
for (const [id, hash] of nextHashes)
|
|
166
|
+
lastHashes.set(id, hash);
|
|
167
|
+
}
|
|
168
|
+
catch (error) {
|
|
169
|
+
prepared?.retry();
|
|
170
|
+
throw error;
|
|
133
171
|
}
|
|
134
|
-
const removed = [...lastHashes.keys()].filter((id) => !records.has(id));
|
|
135
|
-
if (changed.size > 0)
|
|
136
|
-
await backend.putRecords(options.key, changed);
|
|
137
|
-
if (removed.length > 0)
|
|
138
|
-
await backend.deleteRecords(options.key, removed);
|
|
139
|
-
lastHashes.clear();
|
|
140
|
-
for (const [id, h] of nextHashes)
|
|
141
|
-
lastHashes.set(id, h);
|
|
142
172
|
};
|
|
143
173
|
// Serialize flushes on a single chain so two never overlap. Without this, a
|
|
144
174
|
// newer flush that fails while an older one succeeds could adopt a stale
|
|
@@ -156,12 +186,14 @@ export async function attachPersistence(sandbox, rawOptions) {
|
|
|
156
186
|
const scheduleFlush = () => {
|
|
157
187
|
if (disposed)
|
|
158
188
|
return;
|
|
159
|
-
|
|
189
|
+
const alreadyScheduled = pendingFlush !== null;
|
|
190
|
+
if (alreadyScheduled)
|
|
160
191
|
return;
|
|
161
192
|
pendingFlush = setTimeout(() => {
|
|
162
193
|
pendingFlush = null;
|
|
163
194
|
void flushNow().catch((e) => {
|
|
164
|
-
|
|
195
|
+
const quotaExceeded = isQuotaExceeded(e);
|
|
196
|
+
if (quotaExceeded) {
|
|
165
197
|
// Storage is full: retrying will not help until space is freed, so
|
|
166
198
|
// warn loudly instead of busy-looping. The unpersisted changes stay in
|
|
167
199
|
// memory; the next successful flush (after space frees) re-detects them.
|
|
@@ -169,6 +201,11 @@ export async function attachPersistence(sandbox, rawOptions) {
|
|
|
169
201
|
'in memory only. Free storage or reduce sandbox data to persist them.');
|
|
170
202
|
return;
|
|
171
203
|
}
|
|
204
|
+
const requiresRepair = backend.retryFailedFlush === false;
|
|
205
|
+
if (requiresRepair) {
|
|
206
|
+
console.warn('[sandbox/persistence] auto-flush failed; repair and restart required.');
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
172
209
|
console.warn('[sandbox/persistence] auto-flush failed, will retry:', e);
|
|
173
210
|
// A failed flush did not adopt its hashes, so the change is still
|
|
174
211
|
// unpersisted. Re-arm rather than waiting for the next write event, so
|
|
@@ -186,6 +223,7 @@ export async function attachPersistence(sandbox, rawOptions) {
|
|
|
186
223
|
if (!hooks.subscribe || serviceUnsubs.has(name))
|
|
187
224
|
return;
|
|
188
225
|
const unsub = hooks.subscribe(() => {
|
|
226
|
+
serviceSnapshots.delete(name);
|
|
189
227
|
scheduleFlush();
|
|
190
228
|
});
|
|
191
229
|
serviceUnsubs.set(name, unsub);
|
|
@@ -273,8 +311,10 @@ export async function attachPersistence(sandbox, rawOptions) {
|
|
|
273
311
|
if (stored)
|
|
274
312
|
tryRestoreSession(name, stored, hooks);
|
|
275
313
|
};
|
|
276
|
-
|
|
314
|
+
const ownsServiceRegistry = sandbox instanceof SandboxImpl;
|
|
315
|
+
if (ownsServiceRegistry) {
|
|
277
316
|
for (const [name, hooks] of sandbox.getServiceRegistry()) {
|
|
317
|
+
pendingServices.delete(name);
|
|
278
318
|
attachServiceSubscription(name, hooks);
|
|
279
319
|
restoreSessionForService(name, hooks);
|
|
280
320
|
// Restore before subscribing: restore(mode, uid) can emit session
|
|
@@ -283,16 +323,20 @@ export async function attachPersistence(sandbox, rawOptions) {
|
|
|
283
323
|
attachSessionSubscription(name, hooks);
|
|
284
324
|
}
|
|
285
325
|
sandbox.setServiceRegistrationHook((name, hooks) => {
|
|
286
|
-
|
|
326
|
+
serviceSnapshots.delete(name);
|
|
327
|
+
const hasPendingState = pendingServices.has(name);
|
|
328
|
+
if (hasPendingState) {
|
|
287
329
|
try {
|
|
288
|
-
hooks.restore(
|
|
330
|
+
hooks.restore(pendingServices.get(name));
|
|
331
|
+
pendingServices.delete(name);
|
|
289
332
|
}
|
|
290
333
|
catch (error) {
|
|
291
334
|
console.warn(`[sandbox/persistence] late-restore for service '${name}' failed:`, error);
|
|
292
335
|
}
|
|
293
336
|
}
|
|
294
337
|
const stored = loadStoredSession(name);
|
|
295
|
-
|
|
338
|
+
const hasStoredSession = stored !== null;
|
|
339
|
+
if (hasStoredSession)
|
|
296
340
|
pendingSessions.set(name, stored);
|
|
297
341
|
restoreSessionForService(name, hooks);
|
|
298
342
|
attachServiceSubscription(name, hooks);
|
|
@@ -300,6 +344,7 @@ export async function attachPersistence(sandbox, rawOptions) {
|
|
|
300
344
|
scheduleFlush();
|
|
301
345
|
});
|
|
302
346
|
sandbox.setServiceUnregistrationHook((name) => {
|
|
347
|
+
serviceSnapshots.delete(name);
|
|
303
348
|
serviceUnsubs.get(name)?.();
|
|
304
349
|
serviceUnsubs.delete(name);
|
|
305
350
|
sessionUnsubs.get(name)?.();
|
|
@@ -311,6 +356,13 @@ export async function attachPersistence(sandbox, rawOptions) {
|
|
|
311
356
|
scheduleFlush();
|
|
312
357
|
});
|
|
313
358
|
}
|
|
359
|
+
const unsubscribeDocuments = localSandbox?.onDocumentChange(path => {
|
|
360
|
+
changedBuckets?.mark(path);
|
|
361
|
+
const replacesState = path === null;
|
|
362
|
+
if (replacesState)
|
|
363
|
+
serviceSnapshots.clear();
|
|
364
|
+
scheduleFlush();
|
|
365
|
+
});
|
|
314
366
|
const unsubscribe = sandbox.onEvent((event) => {
|
|
315
367
|
if (isPersistableEvent(event))
|
|
316
368
|
scheduleFlush();
|
|
@@ -326,7 +378,8 @@ export async function attachPersistence(sandbox, rawOptions) {
|
|
|
326
378
|
/* swallow — page is leaving */
|
|
327
379
|
});
|
|
328
380
|
};
|
|
329
|
-
|
|
381
|
+
const inBrowser = typeof window !== 'undefined';
|
|
382
|
+
if (inBrowser) {
|
|
330
383
|
window.addEventListener('beforeunload', beforeUnload);
|
|
331
384
|
}
|
|
332
385
|
return {
|
|
@@ -342,6 +395,7 @@ export async function attachPersistence(sandbox, rawOptions) {
|
|
|
342
395
|
// must treat every bucket as changed and re-persist the full in-memory
|
|
343
396
|
// state (otherwise untouched buckets stay suppressed and are lost).
|
|
344
397
|
lastHashes.clear();
|
|
398
|
+
changedBuckets?.mark(null);
|
|
345
399
|
},
|
|
346
400
|
dispose() {
|
|
347
401
|
if (disposed)
|
|
@@ -352,6 +406,7 @@ export async function attachPersistence(sandbox, rawOptions) {
|
|
|
352
406
|
pendingFlush = null;
|
|
353
407
|
}
|
|
354
408
|
unsubscribe();
|
|
409
|
+
unsubscribeDocuments?.();
|
|
355
410
|
// Detach service change-notification subscriptions.
|
|
356
411
|
for (const unsub of serviceUnsubs.values())
|
|
357
412
|
unsub();
|
|
@@ -458,7 +513,7 @@ async function restore(sandbox, backend, key, lastHashes) {
|
|
|
458
513
|
// does not redundantly re-write the just-restored (or just-migrated) buckets.
|
|
459
514
|
for (const [id, rec] of v3Records)
|
|
460
515
|
lastHashes.set(id, hashRecord(rec));
|
|
461
|
-
const parsed = deserializeFromBuckets(v3Records);
|
|
516
|
+
const parsed = deserializeFromBuckets(v3Records, { skipInvalidDocuments: true });
|
|
462
517
|
// 1. Restore Firestore documents first. These are the structural data
|
|
463
518
|
// that services (auth) may depend on being present.
|
|
464
519
|
for (const [path, data] of Object.entries(parsed.firestore)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller.js","sourceRoot":"","sources":["../../../src/sandbox/persistence/controller.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAG3B,MAAM,yBAAyB,GAAG,GAAG,CAAC;AAEtC;;;;;;;;;GASG;AACH,MAAM,mBAAmB,GAAG,4BAA4B,CAAC;AAEzD,SAAS,iBAAiB,CAAC,WAAmB;IAC5C,OAAO,WAAW,KAAK,MAAM,IAAI,WAAW,KAAK,wBAAwB;QACvE,CAAC,CAAC,mBAAmB;QACrB,CAAC,CAAC,GAAG,mBAAmB,IAAI,kBAAkB,CAAC,WAAW,CAAC,EAAE,CAAC;AAClE,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,UAAU,CAAC,MAAe;IACjC,MAAM,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACjC,IAAI,CAAC,GAAG,UAAU,CAAC;IACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAClC,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,C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AC;QACnC,MAAM,QAAQ,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;QAC9C,KAAK,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC3D,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAC/B,IAAI,CAAC,GAAG;gBAAE,SAAS,CAAC,4DAA4D;YAChF,IAAI,CAAC;gBACH,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YACpB,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,OAAO,CAAC,IAAI,CACV,kCAAkC,IAAI,qBAAqB;oBACzD,kEAAkE,EACpE,CAAC,CACF,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IAED,sEAAsE;IACtE,8DAA8D;IAC9D,OAAO,MAAM,CAAC,QAAQ,CAAC;AACzB,CAAC;AAED;;;;;;;;;GASG;AACH,SAAS,kBAAkB,CAAC,KAAmB;IAC7C,OAAO,KAAK,CAAC,IAAI,KAAK,OAAO,IAAI,KAAK,CAAC,IAAI,KAAK,kBAAkB,CAAC;AACrE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Decode a replacement before its caller changes the current sandbox. */
|
|
2
|
+
export declare function decodeImportBundle(bundle: string): {
|
|
3
|
+
firestore: Record<string, Record<string, unknown>>;
|
|
4
|
+
services: Record<string, unknown>;
|
|
5
|
+
};
|
|
6
|
+
/** Unknown codecs cannot be treated as corruption: an older host cannot decode them. */
|
|
7
|
+
export declare function validatePersistenceEncoding(encoding: unknown): void;
|
|
8
|
+
//# sourceMappingURL=import-bundle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import-bundle.d.ts","sourceRoot":"","sources":["../../../src/sandbox/persistence/import-bundle.ts"],"names":[],"mappings":"AAKA,0EAA0E;AAC1E,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM;;;EAmDhD;AAED,wFAAwF;AACxF,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAGnE"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { DOC_VALUE_ENCODING } from '../../firestore/internal/value-codec.js';
|
|
2
|
+
import { FirebaseError } from '../internal/firebase-error.js';
|
|
3
|
+
import { isPlainObject } from '../../firestore/plain-object.js';
|
|
4
|
+
import { CHUNK_FORMAT_VERSION, checksumDocs, deserializeFromBuckets, META_RECORD_ID, parseBundle } from './chunk-format.js';
|
|
5
|
+
/** Decode a replacement before its caller changes the current sandbox. */
|
|
6
|
+
export function decodeImportBundle(bundle) {
|
|
7
|
+
const records = parseBundle(bundle);
|
|
8
|
+
const isMissingMetadata = !records.has(META_RECORD_ID);
|
|
9
|
+
if (isMissingMetadata) {
|
|
10
|
+
throw new FirebaseError('invalid-argument', 'State import requires sandbox metadata.');
|
|
11
|
+
}
|
|
12
|
+
const metadata = records.get(META_RECORD_ID);
|
|
13
|
+
const isMalformedMetadata = !isPlainObject(metadata);
|
|
14
|
+
if (isMalformedMetadata) {
|
|
15
|
+
throw new FirebaseError('invalid-argument', 'State import metadata must be an object.');
|
|
16
|
+
}
|
|
17
|
+
const hasUnsupportedVersion = metadata.version !== CHUNK_FORMAT_VERSION;
|
|
18
|
+
if (hasUnsupportedVersion) {
|
|
19
|
+
throw new FirebaseError('invalid-argument', `State import requires metadata version ${CHUNK_FORMAT_VERSION}.`);
|
|
20
|
+
}
|
|
21
|
+
const isMalformedServices = !isPlainObject(metadata.services);
|
|
22
|
+
if (isMalformedServices) {
|
|
23
|
+
throw new FirebaseError('invalid-argument', 'State import requires a service state map.');
|
|
24
|
+
}
|
|
25
|
+
const paths = new Set();
|
|
26
|
+
for (const [id, record] of records) {
|
|
27
|
+
const isMetadata = id === META_RECORD_ID;
|
|
28
|
+
if (isMetadata)
|
|
29
|
+
continue;
|
|
30
|
+
const isMalformedBucket = !isPlainObject(record);
|
|
31
|
+
if (isMalformedBucket) {
|
|
32
|
+
throw new FirebaseError('invalid-argument', `State import bucket '${id}' must be an object.`);
|
|
33
|
+
}
|
|
34
|
+
validatePersistenceEncoding(record.encoding);
|
|
35
|
+
const documents = record.docs;
|
|
36
|
+
const isMalformedDocuments = !isPlainObject(documents);
|
|
37
|
+
if (isMalformedDocuments) {
|
|
38
|
+
throw new FirebaseError('invalid-argument', `State import bucket '${id}' requires a document map.`);
|
|
39
|
+
}
|
|
40
|
+
for (const [path, document] of Object.entries(documents)) {
|
|
41
|
+
const duplicatePath = paths.has(path);
|
|
42
|
+
if (duplicatePath)
|
|
43
|
+
throw new FirebaseError('invalid-argument', `State import contains duplicate document '${path}'.`);
|
|
44
|
+
paths.add(path);
|
|
45
|
+
const isMalformedDocument = !isPlainObject(document);
|
|
46
|
+
if (isMalformedDocument) {
|
|
47
|
+
throw new FirebaseError('invalid-argument', `State import document '${path}' must be an object.`);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
const hasChecksum = record.checksum !== undefined;
|
|
51
|
+
if (hasChecksum) {
|
|
52
|
+
const hasCorruptDocuments = record.checksum !== checksumDocs(documents);
|
|
53
|
+
if (hasCorruptDocuments) {
|
|
54
|
+
throw new FirebaseError('invalid-argument', `State import bucket '${id}' has an invalid checksum.`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return deserializeFromBuckets(records);
|
|
59
|
+
}
|
|
60
|
+
/** Unknown codecs cannot be treated as corruption: an older host cannot decode them. */
|
|
61
|
+
export function validatePersistenceEncoding(encoding) {
|
|
62
|
+
const unsupported = encoding !== undefined && encoding !== DOC_VALUE_ENCODING;
|
|
63
|
+
if (unsupported)
|
|
64
|
+
throw new FirebaseError('invalid-argument', 'Unsupported Firestore value encoding.');
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=import-bundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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M,CAAC,QAAQ,KAAK,SAAS,CAAC;QAClD,IAAI,WAAW,EAAE,CAAC;YAChB,MAAM,mBAAmB,GAAG,MAAM,CAAC,QAAQ,KAAK,YAAY,CAAC,SAAS,CAAC,CAAC;YACxE,IAAI,mBAAmB,EAAE,CAAC;gBACxB,MAAM,IAAI,aAAa,CAAC,kBAAkB,EAAE,wBAAwB,EAAE,4BAA4B,CAAC,CAAC;YACtG,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,sBAAsB,CAAC,OAAO,CAAC,CAAC;AACzC,CAAC;AAED,wFAAwF;AACxF,MAAM,UAAU,2BAA2B,CAAC,QAAiB;IAC3D,MAAM,WAAW,GAAG,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,kBAAkB,CAAC;IAC9E,IAAI,WAAW;QAAE,MAAM,IAAI,aAAa,CAAC,kBAAkB,EAAE,uCAAuC,CAAC,CAAC;AACxG,CAAC"}
|
|
@@ -24,7 +24,7 @@ export declare class PersistenceSchemaError extends Error {
|
|
|
24
24
|
constructor(message: string);
|
|
25
25
|
}
|
|
26
26
|
/** Serialize a sandbox snapshot to a string blob ready for storage. */
|
|
27
|
-
export declare function serializeSnapshot(firestore: Record<string, Record<string, unknown>>, services?: Record<string, unknown
|
|
27
|
+
export declare function serializeSnapshot(firestore: Record<string, Record<string, unknown>>, services?: Record<string, unknown>, savedAt?: number): string;
|
|
28
28
|
/**
|
|
29
29
|
* Parsed result of a persisted blob.
|
|
30
30
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serialize.d.ts","sourceRoot":"","sources":["../../../src/sandbox/persistence/serialize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAOH,OAAO,
|
|
1
|
+
{"version":3,"file":"serialize.d.ts","sourceRoot":"","sources":["../../../src/sandbox/persistence/serialize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAOH,OAAO,EAA8B,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAKxG,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAqB7B,qBAAa,sBAAuB,SAAQ,KAAK;gBACnC,OAAO,EAAE,MAAM;CAI5B;AAED,uEAAuE;AACvE,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAClD,QAAQ,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,EACtC,OAAO,GAAE,MAAmB,GAC3B,MAAM,CAQR;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACnD,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,oBAAoB,CAqCrE"}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
// engine. `serialize.ts` re-uses that same codec so there is exactly one
|
|
24
24
|
// rehydrate implementation — the IDB persistence format and the MessagePort
|
|
25
25
|
// wire format can't drift.
|
|
26
|
-
import { rehydrateDocValue } from '../../firestore/internal/value-codec.js';
|
|
26
|
+
import { assertEncodedDocValueDepth, rehydrateDocValue } from '../../firestore/internal/value-codec.js';
|
|
27
27
|
// Re-exported so existing consumers (`sandbox/persistence/index.ts` →
|
|
28
28
|
// `pyric/sandbox`) keep their import path; the implementation now lives in the
|
|
29
29
|
// leaf codec.
|
|
@@ -45,10 +45,10 @@ export class PersistenceSchemaError extends Error {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
/** Serialize a sandbox snapshot to a string blob ready for storage. */
|
|
48
|
-
export function serializeSnapshot(firestore, services = {}) {
|
|
48
|
+
export function serializeSnapshot(firestore, services = {}, savedAt = Date.now()) {
|
|
49
49
|
const payload = {
|
|
50
50
|
version: SCHEMA_VERSION,
|
|
51
|
-
savedAt
|
|
51
|
+
savedAt,
|
|
52
52
|
firestore,
|
|
53
53
|
services,
|
|
54
54
|
};
|
|
@@ -70,29 +70,34 @@ export function deserializeSnapshot(raw) {
|
|
|
70
70
|
try {
|
|
71
71
|
parsed = JSON.parse(raw);
|
|
72
72
|
}
|
|
73
|
-
catch (
|
|
74
|
-
|
|
73
|
+
catch (error) {
|
|
74
|
+
const isError = error instanceof Error;
|
|
75
|
+
throw new PersistenceSchemaError(`Persisted blob is not valid JSON: ${isError ? error.message : String(error)}`);
|
|
75
76
|
}
|
|
76
|
-
|
|
77
|
+
const isInvalidBlob = typeof parsed !== 'object' || parsed === null;
|
|
78
|
+
if (isInvalidBlob) {
|
|
77
79
|
throw new PersistenceSchemaError('Persisted blob is not an object');
|
|
78
80
|
}
|
|
79
81
|
// Accept v1 (no services) and v2 (with services). Any other version
|
|
80
82
|
// is unrecognized — quarantine it so we don't silently corrupt state.
|
|
81
|
-
|
|
83
|
+
const hasUnsupportedVersion = parsed.version !== 1 && parsed.version !== 2;
|
|
84
|
+
if (hasUnsupportedVersion) {
|
|
82
85
|
throw new PersistenceSchemaError(`Persisted blob has version ${String(parsed.version)}, expected 1 or 2`);
|
|
83
86
|
}
|
|
84
|
-
|
|
87
|
+
const hasNoFirestore = typeof parsed.firestore !== 'object' || parsed.firestore === null;
|
|
88
|
+
if (hasNoFirestore) {
|
|
85
89
|
throw new PersistenceSchemaError('Persisted blob has no firestore field');
|
|
86
90
|
}
|
|
87
91
|
const firestore = {};
|
|
88
92
|
for (const [path, data] of Object.entries(parsed.firestore)) {
|
|
93
|
+
assertEncodedDocValueDepth(data);
|
|
89
94
|
firestore[path] = rehydrateDocValue(data);
|
|
90
95
|
}
|
|
91
96
|
// v1 blobs lack `services` — default to {} so the restore path
|
|
92
97
|
// proceeds without error. No auth users in the blob = no auth restore.
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
98
|
+
const serviceState = parsed.services;
|
|
99
|
+
const hasServices = serviceState !== undefined && typeof serviceState === 'object' && serviceState !== null;
|
|
100
|
+
const services = hasServices ? serviceState : {};
|
|
96
101
|
return { firestore, services };
|
|
97
102
|
}
|
|
98
103
|
//# sourceMappingURL=serialize.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serialize.js","sourceRoot":"","sources":["../../../src/sandbox/persistence/serialize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,8EAA8E;AAC9E,6EAA6E;AAC7E,yEAAyE;AACzE,4EAA4E;AAC5E,2BAA2B;AAC3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"serialize.js","sourceRoot":"","sources":["../../../src/sandbox/persistence/serialize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,8EAA8E;AAC9E,6EAA6E;AAC7E,yEAAyE;AACzE,4EAA4E;AAC5E,2BAA2B;AAC3B,OAAO,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAExG,sEAAsE;AACtE,+EAA+E;AAC/E,cAAc;AACd,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAE7B;;;;;;;;GAQG;AACH,MAAM,cAAc,GAAG,CAAU,CAAC;AAUlC,MAAM,OAAO,sBAAuB,SAAQ,KAAK;IAC/C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAC;IACvC,CAAC;CACF;AAED,uEAAuE;AACvE,MAAM,UAAU,iBAAiB,CAC/B,SAAkD,EAClD,WAAoC,EAAE,EACtC,UAAkB,IAAI,CAAC,GAAG,EAAE;IAE5B,MAAM,OAAO,GAAmB;QAC9B,OAAO,EAAE,cAAc;QACvB,OAAO;QACP,SAAS;QACT,QAAQ;KACT,C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OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC;QAC5D,0BAA0B,CAAC,IAAI,CAAC,CAAC;QACjC,SAAS,CAAC,IAAI,CAAC,GAAG,iBAAiB,CAAC,IAAI,CAA4B,CAAC;IACvE,CAAC;IACD,+DAA+D;IAC/D,uEAAuE;IACvE,MAAM,YAAY,GAAG,MAAM,CAAC,QAAQ,CAAC;IACrC,MAAM,WAAW,GAAG,YAAY,KAAK,SAAS,IAAI,OAAO,YAAY,KAAK,QAAQ,IAAI,YAAY,KAAK,IAAI,CAAC;IAC5G,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IACjD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC;AACjC,CAAC"}
|
|
@@ -94,6 +94,10 @@ export interface SandboxPersistenceOptions {
|
|
|
94
94
|
* them. (v2 and earlier used a single string blob; v3 is record-shaped.)
|
|
95
95
|
*/
|
|
96
96
|
export interface PersistenceBackend {
|
|
97
|
+
/** False when a failed durable write requires operator repair and restart. */
|
|
98
|
+
retryFailedFlush?: boolean;
|
|
99
|
+
/** Commit changed and removed records atomically when the backend supports it. */
|
|
100
|
+
applyChanges?(key: string, changed: ReadonlyMap<string, unknown>, removed: readonly string[]): Promise<void>;
|
|
97
101
|
/** Read one record by id under `key`. Resolves `null` when absent. */
|
|
98
102
|
getRecord(key: string, recordId: string): Promise<unknown | null>;
|
|
99
103
|
/** List all record ids under `key`, any order. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/sandbox/persistence/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACpC,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KA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,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC5C,6EAA6E;IAC7E,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9E,+EAA+E;IAC/E,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxE,2DAA2D;IAC3D,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClC;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;CAC/D"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare class UnsupportedPersistedServiceError extends Error {
|
|
2
|
+
}
|
|
3
|
+
/** Hosted strict restore and explicit salvage use the same service validators. */
|
|
4
|
+
export declare function validatePersistedService(name: string, value: unknown): void;
|
|
5
|
+
/** Empty service envelopes are not evidence that salvage recovered user state. */
|
|
6
|
+
export declare function persistedServiceHasData(name: string, value: unknown): boolean;
|
|
7
|
+
//# sourceMappingURL=validate-services.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-services.d.ts","sourceRoot":"","sources":["../../../src/sandbox/persistence/validate-services.ts"],"names":[],"mappings":"AAaA,qBAAa,gCAAiC,SAAQ,KAAK;CAAG;AAE9D,kFAAkF;AAClF,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CA0B3E;AAED,kFAAkF;AAClF,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAgB7E"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { seedUserSchema } from '../internal/state-schemas.js';
|
|
3
|
+
import { isMessagingSnapshot } from '../../messaging/broker/persistence.js';
|
|
4
|
+
const authState = z.object({ users: z.array(seedUserSchema), providers: z.record(z.boolean()) });
|
|
5
|
+
const databaseState = z.object({
|
|
6
|
+
'.pyricRtdbPersistence': z.literal(1),
|
|
7
|
+
data: z.unknown().refine(value => value !== undefined, 'Required'),
|
|
8
|
+
priorities: z.record(z.union([z.string(), z.number().finite()])),
|
|
9
|
+
rules: z.object({ rules: z.record(z.unknown()) }).optional(),
|
|
10
|
+
instances: z.record(z.unknown()).optional(),
|
|
11
|
+
});
|
|
12
|
+
export class UnsupportedPersistedServiceError extends Error {
|
|
13
|
+
}
|
|
14
|
+
/** Hosted strict restore and explicit salvage use the same service validators. */
|
|
15
|
+
export function validatePersistedService(name, value) {
|
|
16
|
+
const isAuth = name === 'auth';
|
|
17
|
+
if (isAuth) {
|
|
18
|
+
authState.parse(value);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
const isDatabase = name === 'rtdb';
|
|
22
|
+
if (isDatabase) {
|
|
23
|
+
const parsed = databaseState.parse(value);
|
|
24
|
+
for (const instance of Object.values(parsed.instances ?? {}))
|
|
25
|
+
databaseState.parse(instance);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const isMessaging = name === 'messaging';
|
|
29
|
+
if (isMessaging) {
|
|
30
|
+
const valid = isMessagingSnapshot(value);
|
|
31
|
+
const invalidSnapshot = !valid;
|
|
32
|
+
if (invalidSnapshot)
|
|
33
|
+
throw new Error('Invalid persisted Messaging state.');
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const noDurableState = name === 'storage' || name.startsWith('auth-session:');
|
|
37
|
+
if (noDurableState) {
|
|
38
|
+
const invalid = value !== null;
|
|
39
|
+
if (invalid)
|
|
40
|
+
throw new Error(`Unexpected persisted data for '${name}'.`);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
throw new UnsupportedPersistedServiceError(`Unsupported persisted service '${name}'.`);
|
|
44
|
+
}
|
|
45
|
+
/** Empty service envelopes are not evidence that salvage recovered user state. */
|
|
46
|
+
export function persistedServiceHasData(name, value) {
|
|
47
|
+
const isAuth = name === 'auth';
|
|
48
|
+
if (isAuth) {
|
|
49
|
+
const auth = authState.parse(value);
|
|
50
|
+
return auth.users.length > 0 || Object.keys(auth.providers).length > 0;
|
|
51
|
+
}
|
|
52
|
+
const isDatabase = name === 'rtdb';
|
|
53
|
+
if (isDatabase) {
|
|
54
|
+
const database = databaseState.parse(value);
|
|
55
|
+
const hasData = containsDatabaseData(database.data);
|
|
56
|
+
const hasInstanceData = Object.values(database.instances ?? {}).some(instance => persistedServiceHasData('rtdb', instance));
|
|
57
|
+
return hasData || hasInstanceData;
|
|
58
|
+
}
|
|
59
|
+
const isMessaging = name === 'messaging' && isMessagingSnapshot(value);
|
|
60
|
+
if (isMessaging)
|
|
61
|
+
return value.tokens.length > 0 || value.topics.length > 0;
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
function containsDatabaseData(value) {
|
|
65
|
+
const isNull = value === null;
|
|
66
|
+
if (isNull)
|
|
67
|
+
return false;
|
|
68
|
+
const isObject = typeof value === 'object';
|
|
69
|
+
if (isObject)
|
|
70
|
+
return Object.values(value).some(containsDatabaseData);
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=validate-services.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-services.js","sourceRoot":"","sources":["../../../src/sandbox/persistence/validate-services.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAE5E,MAAM,SAAS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AAG,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC5C,MAAM,OAAO,GAAG,oBAAoB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACpD,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,uBAAuB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;QAC5H,OAAO,OAAO,IAAI,eAAe,CAAC;IACpC,CAAC;IACD,MAAM,WAAW,GAAG,IAAI,KAAK,WAAW,IAAI,mBAAmB,CAAC,KAAK,CAAC,CAAC;IACvE,IAAI,WAAW;QAAE,OAAO,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;IAC3E,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,oBAAoB,CAAC,KAAc;IAC1C,MAAM,MAAM,GAAG,KAAK,KAAK,IAAI,CAAC;IAC9B,IAAI,MAAM;QAAE,OAAO,KAAK,CAAC;IACzB,MAAM,QAAQ,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC;IAC3C,IAAI,QAAQ;QAAE,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;IACrE,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/sandbox/remote.d.ts
CHANGED
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
* export is the brand symbol and its guard.
|
|
27
27
|
*/
|
|
28
28
|
import type { Sandbox } from './types/service.js';
|
|
29
|
+
import type { RemoteByteRoute } from '../storage/remote-bytes.js';
|
|
29
30
|
/**
|
|
30
31
|
* Brand stamped (value `true`) on every remote sandbox handle.
|
|
31
32
|
* `Symbol.for` — registered globally so `pyric-admin`'s check matches the
|
|
@@ -64,6 +65,11 @@ export interface RemoteSandboxChannel {
|
|
|
64
65
|
} & Record<string, unknown>, onSnap: (value: unknown) => void, onError?: (err: Error & {
|
|
65
66
|
code: string;
|
|
66
67
|
}) => void): () => void;
|
|
68
|
+
/**
|
|
69
|
+
* The host's HTTP byte route for Storage bytes, once the channel is
|
|
70
|
+
* attached, or undefined when the host has none and takes bytes as frames.
|
|
71
|
+
*/
|
|
72
|
+
byteRoute?(): Promise<RemoteByteRoute | undefined>;
|
|
67
73
|
}
|
|
68
74
|
/**
|
|
69
75
|
* A branded remote sandbox handle. Structurally a {@link Sandbox} — it can
|