@amalgm/live 0.2.81-preview.45708334404 → 0.2.81-preview.46146788616
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/apply/contracts.d.ts +17 -348
- package/dist/apply/contracts.js +1 -108
- package/dist/apply/fetch-ahead.d.ts +0 -45
- package/dist/apply/fetch-ahead.js +1 -169
- package/dist/apply/index.d.ts +0 -2
- package/dist/apply/index.js +1 -10
- package/dist/apply/journey.d.ts +0 -35
- package/dist/apply/journey.js +1 -403
- package/dist/apply/lane.d.ts +0 -34
- package/dist/apply/lane.js +1 -72
- package/dist/apply/line.d.ts +0 -28
- package/dist/apply/line.js +1 -81
- package/dist/apply/plans.d.ts +0 -14
- package/dist/apply/plans.js +1 -182
- package/dist/apply/rail.d.ts +0 -60
- package/dist/apply/rail.js +1 -776
- package/dist/apply/selection.d.ts +0 -15
- package/dist/apply/selection.js +1 -111
- package/dist/apply/settling.d.ts +0 -57
- package/dist/apply/settling.js +1 -63
- package/dist/apply/showing.d.ts +1 -95
- package/dist/apply/showing.js +1 -203
- package/dist/apply/type-adapters.d.ts +0 -8
- package/dist/apply/type-adapters.js +1 -39
- package/dist/apply/window.d.ts +0 -109
- package/dist/apply/window.js +1 -323
- package/dist/clash/bodmas.d.ts +1 -51
- package/dist/clash/bodmas.js +1 -130
- package/dist/clash/echo.d.ts +0 -27
- package/dist/clash/echo.js +1 -35
- package/dist/clash/index.d.ts +0 -1
- package/dist/clash/index.js +1 -6
- package/dist/clash/local-work.d.ts +0 -36
- package/dist/clash/local-work.js +1 -51
- package/dist/clash/resolution.d.ts +0 -13
- package/dist/clash/resolution.js +1 -15
- package/dist/clash/tetris.d.ts +0 -18
- package/dist/clash/tetris.js +1 -26
- package/dist/{sharing/command-input.d.ts → commands/input.d.ts} +5 -9
- package/dist/commands/input.js +1 -0
- package/dist/commands/mcp.d.ts +23 -0
- package/dist/commands/mcp.js +1 -0
- package/dist/contracts/content.d.ts +0 -78
- package/dist/contracts/content.js +1 -251
- package/dist/contracts/index.d.ts +0 -6
- package/dist/contracts/index.js +1 -9
- package/dist/contracts/protection.d.ts +16 -22
- package/dist/contracts/protection.js +1 -53
- package/dist/contracts/validate.d.ts +0 -18
- package/dist/contracts/validate.js +1 -23
- package/dist/detection/adapter-contract.d.ts +0 -75
- package/dist/detection/adapter-contract.js +1 -130
- package/dist/detection/batch.d.ts +1 -14
- package/dist/detection/batch.js +1 -75
- package/dist/detection/classify.d.ts +6 -40
- package/dist/detection/classify.js +1 -45
- package/dist/detection/content.d.ts +0 -17
- package/dist/detection/content.js +1 -76
- package/dist/detection/dispositions.d.ts +3 -82
- package/dist/detection/dispositions.js +0 -20
- package/dist/detection/echo.d.ts +0 -20
- package/dist/detection/echo.js +1 -33
- package/dist/detection/identity.d.ts +0 -56
- package/dist/detection/identity.js +1 -229
- package/dist/detection/ignore-lines.d.ts +0 -15
- package/dist/detection/ignore-lines.js +2 -212
- package/dist/detection/index.d.ts +0 -31
- package/dist/detection/index.js +1 -48
- package/dist/detection/package-proposal.d.ts +0 -24
- package/dist/detection/package-proposal.js +1 -114
- package/dist/detection/record-order.d.ts +5 -19
- package/dist/detection/record-order.js +1 -311
- package/dist/detection/record-proposal.d.ts +0 -98
- package/dist/detection/record-proposal.js +1 -384
- package/dist/detection/refusal.d.ts +0 -69
- package/dist/detection/refusal.js +1 -78
- package/dist/detection/removals.d.ts +0 -8
- package/dist/detection/removals.js +1 -51
- package/dist/detection/scoped-identity.d.ts +1 -61
- package/dist/detection/scoped-identity.js +1 -189
- package/dist/detection/skip-defaults.d.ts +0 -16
- package/dist/detection/skip-defaults.js +3 -20
- package/dist/detection/skip-policy.d.ts +0 -58
- package/dist/detection/skip-policy.js +1 -203
- package/dist/detection/watch-boundary.d.ts +0 -16
- package/dist/detection/watch-boundary.js +1 -47
- package/dist/drive/contracts.d.ts +0 -182
- package/dist/drive/contracts.js +1 -30
- package/dist/drive/drive.d.ts +0 -147
- package/dist/drive/drive.js +1 -414
- package/dist/drive/held-removals.d.ts +0 -49
- package/dist/drive/held-removals.js +1 -136
- package/dist/drive/index.d.ts +0 -7
- package/dist/drive/index.js +1 -16
- package/dist/drive/kept.d.ts +0 -10
- package/dist/drive/kept.js +1 -33
- package/dist/drive/listing.d.ts +2 -13
- package/dist/drive/listing.js +1 -84
- package/dist/drive/map-index.d.ts +0 -59
- package/dist/drive/map-index.js +1 -240
- package/dist/drive/placements.d.ts +0 -71
- package/dist/drive/placements.js +1 -164
- package/dist/drive/records.d.ts +0 -43
- package/dist/drive/records.js +1 -85
- package/dist/drive/where.d.ts +7 -94
- package/dist/drive/where.js +2 -378
- package/dist/entities/accepted-view.d.ts +0 -47
- package/dist/entities/accepted-view.js +1 -260
- package/dist/entities/bytes.d.ts +0 -16
- package/dist/entities/bytes.js +1 -112
- package/dist/entities/cloud.d.ts +0 -125
- package/dist/entities/cloud.js +1 -430
- package/dist/entities/graph-head.d.ts +0 -32
- package/dist/entities/graph-head.js +1 -114
- package/dist/entities/graph-pages.d.ts +0 -75
- package/dist/entities/graph-pages.js +1 -239
- package/dist/entities/index.d.ts +0 -28
- package/dist/entities/index.js +1 -40
- package/dist/entities/package-pages.d.ts +0 -28
- package/dist/entities/package-pages.js +1 -91
- package/dist/entities/placement-owed.d.ts +0 -27
- package/dist/entities/placement-owed.js +1 -86
- package/dist/entities/reducer.d.ts +0 -30
- package/dist/entities/reducer.js +1 -130
- package/dist/entities/registry-graph.d.ts +0 -80
- package/dist/entities/registry-graph.js +1 -478
- package/dist/entities/rules.d.ts +7 -72
- package/dist/entities/rules.js +1 -230
- package/dist/entities/types.d.ts +0 -71
- package/dist/entities/types.js +1 -55
- package/dist/entities/units.d.ts +0 -25
- package/dist/entities/units.js +1 -27
- package/dist/faults/classify.d.ts +0 -24
- package/dist/faults/classify.js +1 -77
- package/dist/faults/index.d.ts +0 -8
- package/dist/faults/index.js +1 -13
- package/dist/faults/need.d.ts +0 -24
- package/dist/faults/need.js +1 -76
- package/dist/faults/recover.d.ts +0 -18
- package/dist/faults/recover.js +1 -44
- package/dist/faults/report.d.ts +0 -23
- package/dist/faults/report.js +1 -130
- package/dist/faults/scrub.d.ts +0 -27
- package/dist/faults/scrub.js +3 -159
- package/dist/faults/wire.d.ts +0 -13
- package/dist/faults/wire.js +1 -42
- package/dist/files/accepted-files.d.ts +0 -37
- package/dist/files/accepted-files.js +1 -129
- package/dist/files/api.d.ts +0 -1
- package/dist/files/api.js +1 -83
- package/dist/files/browse-types.d.ts +7 -7
- package/dist/files/browse-types.js +1 -46
- package/dist/files/browser.d.ts +4 -2
- package/dist/files/browser.js +1 -100
- package/dist/files/cloud-files.d.ts +6 -5
- package/dist/files/cloud-files.js +1 -153
- package/dist/files/commands.d.ts +0 -54
- package/dist/files/commands.js +1 -140
- package/dist/files/computer-address.d.ts +0 -10
- package/dist/files/computer-address.js +1 -48
- package/dist/files/index.d.ts +1 -3
- package/dist/files/index.js +1 -18
- package/dist/files/local-files.d.ts +0 -2
- package/dist/files/local-files.js +1 -104
- package/dist/files/media-type.d.ts +0 -1
- package/dist/files/media-type.js +1 -50
- package/dist/files/own-folders.d.ts +0 -29
- package/dist/files/own-folders.js +1 -50
- package/dist/files/plans.d.ts +1 -16
- package/dist/files/plans.js +1 -36
- package/dist/files/trash.d.ts +0 -97
- package/dist/files/trash.js +1 -287
- package/dist/files/usage-categories.d.ts +0 -13
- package/dist/files/usage-categories.js +1 -33
- package/dist/files/usage-chain.d.ts +0 -27
- package/dist/files/usage-chain.js +1 -44
- package/dist/files/usage-effect.d.ts +0 -34
- package/dist/files/usage-effect.js +1 -29
- package/dist/files/usage.d.ts +3 -47
- package/dist/files/usage.js +1 -132
- package/dist/git/alternates.d.ts +0 -21
- package/dist/git/alternates.js +1 -79
- package/dist/git/artifact.d.ts +0 -69
- package/dist/git/artifact.js +1 -190
- package/dist/git/chain.d.ts +0 -32
- package/dist/git/chain.js +1 -55
- package/dist/git/holds.d.ts +30 -0
- package/dist/git/holds.js +1 -0
- package/dist/git/index.d.ts +4 -2
- package/dist/git/index.js +1 -11
- package/dist/git/parts.d.ts +10 -0
- package/dist/git/parts.js +7 -0
- package/dist/git/places.d.ts +6 -0
- package/dist/git/places.js +1 -0
- package/dist/git/plan.d.ts +0 -40
- package/dist/git/plan.js +1 -97
- package/dist/git/play.d.ts +11 -72
- package/dist/git/play.js +4 -318
- package/dist/git/refs.d.ts +0 -18
- package/dist/git/refs.js +8 -63
- package/dist/git/restore.d.ts +8 -0
- package/dist/git/restore.js +2 -0
- package/dist/git/state.d.ts +0 -103
- package/dist/git/state.js +3 -209
- package/dist/git/tag.d.ts +5 -51
- package/dist/git/tag.js +3 -68
- package/dist/git/text.d.ts +0 -3
- package/dist/git/text.js +1 -4
- package/dist/git/turns.d.ts +0 -104
- package/dist/git/turns.js +1 -153
- package/dist/history/history.d.ts +2 -14
- package/dist/history/history.js +1 -51
- package/dist/history/identity.d.ts +11 -0
- package/dist/history/identity.js +1 -0
- package/dist/history/index.d.ts +6 -9
- package/dist/history/index.js +1 -10
- package/dist/history/rule.d.ts +3 -38
- package/dist/history/rule.js +1 -78
- package/dist/history/runs.d.ts +17 -0
- package/dist/history/runs.js +1 -0
- package/dist/history/types.d.ts +6 -64
- package/dist/history/types.js +0 -9
- package/dist/history/version.d.ts +2 -8
- package/dist/history/version.js +1 -32
- package/dist/index.d.ts +0 -15
- package/dist/index.js +1 -32
- package/dist/records/authority.d.ts +0 -7
- package/dist/records/authority.js +1 -28
- package/dist/records/codec.d.ts +0 -2
- package/dist/records/codec.js +1 -43
- package/dist/records/contracts.d.ts +0 -20
- package/dist/records/contracts.js +1 -190
- package/dist/records/inbox.d.ts +0 -3
- package/dist/records/inbox.js +1 -40
- package/dist/records/index.d.ts +0 -2
- package/dist/records/index.js +1 -18
- package/dist/records/intentional.d.ts +0 -24
- package/dist/records/intentional.js +1 -58
- package/dist/records/outbox.d.ts +0 -10
- package/dist/records/outbox.js +1 -46
- package/dist/records/owned-effects.d.ts +0 -8
- package/dist/records/owned-effects.js +1 -37
- package/dist/records/publication.d.ts +1 -67
- package/dist/records/publication.js +1 -583
- package/dist/records/rail-ports.d.ts +2 -81
- package/dist/records/rail-ports.js +0 -3
- package/dist/records/rail.d.ts +1 -42
- package/dist/records/rail.js +1 -195
- package/dist/records/receive-channel.d.ts +0 -42
- package/dist/records/receive-channel.js +1 -131
- package/dist/records/receive-loop.d.ts +0 -48
- package/dist/records/receive-loop.js +1 -278
- package/dist/records/receive-pages.d.ts +0 -23
- package/dist/records/receive-pages.js +1 -98
- package/dist/records/retry-clock.d.ts +0 -3
- package/dist/records/retry-clock.js +1 -35
- package/dist/records/send-batch.d.ts +0 -45
- package/dist/records/send-batch.js +1 -119
- package/dist/records/send-freeing.d.ts +4 -42
- package/dist/records/send-freeing.js +1 -124
- package/dist/records/send-line.d.ts +1 -82
- package/dist/records/send-line.js +1 -411
- package/dist/records/send-preparation.d.ts +0 -39
- package/dist/records/send-preparation.js +1 -226
- package/dist/records/submit-frame.d.ts +0 -28
- package/dist/records/submit-frame.js +1 -161
- package/dist/records/unsent-count.d.ts +0 -24
- package/dist/records/unsent-count.js +1 -91
- package/dist/records/wire.d.ts +0 -10
- package/dist/records/wire.js +1 -121
- package/dist/registration/home-layout.d.ts +0 -18
- package/dist/registration/home-layout.js +1 -34
- package/dist/registration/index.d.ts +0 -3
- package/dist/registration/index.js +1 -5
- package/dist/registration/user-ground.d.ts +0 -165
- package/dist/registration/user-ground.js +1 -399
- package/dist/sharing/access.d.ts +0 -8
- package/dist/sharing/access.js +1 -51
- package/dist/sharing/cli.d.ts +0 -7
- package/dist/sharing/cli.js +8 -88
- package/dist/sharing/commands.d.ts +3 -16
- package/dist/sharing/commands.js +1 -164
- package/dist/sharing/construct.d.ts +0 -10
- package/dist/sharing/construct.js +1 -47
- package/dist/sharing/download.d.ts +0 -12
- package/dist/sharing/download.js +1 -45
- package/dist/sharing/entity.d.ts +0 -11
- package/dist/sharing/entity.js +1 -53
- package/dist/sharing/errors.d.ts +0 -2
- package/dist/sharing/errors.js +1 -11
- package/dist/sharing/grants.d.ts +0 -15
- package/dist/sharing/grants.js +1 -103
- package/dist/sharing/index.d.ts +3 -9
- package/dist/sharing/index.js +1 -16
- package/dist/sharing/mcp.d.ts +2 -25
- package/dist/sharing/mcp.js +1 -31
- package/dist/sharing/permissions.d.ts +0 -8
- package/dist/sharing/permissions.js +1 -45
- package/dist/sharing/publish.d.ts +0 -8
- package/dist/sharing/publish.js +1 -42
- package/dist/sharing/share.d.ts +0 -10
- package/dist/sharing/share.js +1 -31
- package/dist/sharing/sharing.d.ts +0 -5
- package/dist/sharing/sharing.js +1 -22
- package/dist/sharing/types.d.ts +0 -47
- package/dist/sharing/types.js +1 -15
- package/dist/steps.d.ts +0 -18
- package/dist/steps.js +1 -58
- package/dist/transfer/artifacts.d.ts +0 -19
- package/dist/transfer/artifacts.js +1 -89
- package/dist/transfer/batches.d.ts +0 -11
- package/dist/transfer/batches.js +1 -40
- package/dist/transfer/cargo-pack.d.ts +39 -0
- package/dist/transfer/cargo-pack.js +1 -0
- package/dist/transfer/cargo.d.ts +0 -39
- package/dist/transfer/cargo.js +1 -130
- package/dist/transfer/dispute.d.ts +9 -0
- package/dist/transfer/dispute.js +1 -0
- package/dist/transfer/download.d.ts +0 -97
- package/dist/transfer/download.js +1 -627
- package/dist/transfer/index.d.ts +2 -3
- package/dist/transfer/index.js +1 -10
- package/dist/transfer/parallel.d.ts +0 -19
- package/dist/transfer/parallel.js +1 -136
- package/dist/transfer/ranges.d.ts +0 -22
- package/dist/transfer/ranges.js +1 -59
- package/dist/transfer/refs.d.ts +0 -22
- package/dist/transfer/refs.js +1 -41
- package/dist/transfer/upload.d.ts +0 -49
- package/dist/transfer/upload.js +1 -248
- package/dist/versions/admit.d.ts +8 -0
- package/dist/versions/admit.js +1 -0
- package/dist/versions/api.d.ts +3 -0
- package/dist/versions/api.js +1 -0
- package/dist/versions/cli-text.d.ts +3 -0
- package/dist/versions/cli-text.js +5 -0
- package/dist/versions/cli.d.ts +12 -0
- package/dist/versions/cli.js +19 -0
- package/dist/versions/commands.d.ts +31 -0
- package/dist/versions/commands.js +1 -0
- package/dist/versions/content.d.ts +4 -0
- package/dist/versions/content.js +1 -0
- package/dist/versions/dates.d.ts +15 -0
- package/dist/versions/dates.js +1 -0
- package/dist/versions/deliver.d.ts +25 -0
- package/dist/versions/deliver.js +2 -0
- package/dist/versions/errors.d.ts +10 -0
- package/dist/versions/errors.js +1 -0
- package/dist/versions/index.d.ts +18 -0
- package/dist/versions/index.js +1 -0
- package/dist/versions/line.d.ts +8 -0
- package/dist/versions/line.js +1 -0
- package/dist/versions/list.d.ts +5 -0
- package/dist/versions/list.js +1 -0
- package/dist/versions/mcp.d.ts +3 -0
- package/dist/versions/mcp.js +1 -0
- package/dist/versions/ports.d.ts +46 -0
- package/dist/versions/ports.js +0 -0
- package/dist/versions/read.d.ts +12 -0
- package/dist/versions/read.js +1 -0
- package/dist/versions/restore.d.ts +5 -0
- package/dist/versions/restore.js +1 -0
- package/dist/versions/services.d.ts +4 -0
- package/dist/versions/services.js +1 -0
- package/dist/versions/show.d.ts +5 -0
- package/dist/versions/show.js +1 -0
- package/dist/versions/types.d.ts +64 -0
- package/dist/versions/types.js +0 -0
- package/dist/versions/versions.d.ts +10 -0
- package/dist/versions/versions.js +1 -0
- package/dist/watching/coverage.d.ts +0 -23
- package/dist/watching/coverage.js +1 -44
- package/dist/watching/index.d.ts +0 -6
- package/dist/watching/index.js +1 -9
- package/dist/watching/maintenance.d.ts +0 -66
- package/dist/watching/maintenance.js +1 -204
- package/dist/watching/suspicion.d.ts +0 -59
- package/dist/watching/suspicion.js +1 -513
- package/dist/workspace/api.d.ts +0 -1
- package/dist/workspace/api.js +1 -108
- package/dist/workspace/entries.d.ts +0 -3
- package/dist/workspace/entries.js +1 -77
- package/dist/workspace/identity.d.ts +0 -2
- package/dist/workspace/identity.js +1 -27
- package/dist/workspace/index.d.ts +0 -1
- package/dist/workspace/index.js +1 -5
- package/dist/workspace/registry.d.ts +0 -12
- package/dist/workspace/registry.js +1 -255
- package/dist/workspace/types.d.ts +0 -19
- package/dist/workspace/types.js +0 -2
- package/dist-cjs/apply/contracts.js +1 -115
- package/dist-cjs/apply/fetch-ahead.js +1 -174
- package/dist-cjs/apply/index.js +1 -26
- package/dist-cjs/apply/journey.js +1 -408
- package/dist-cjs/apply/lane.js +1 -76
- package/dist-cjs/apply/line.js +1 -91
- package/dist-cjs/apply/plans.js +1 -185
- package/dist-cjs/apply/rail.js +1 -780
- package/dist-cjs/apply/selection.js +1 -117
- package/dist-cjs/apply/settling.js +1 -67
- package/dist-cjs/apply/showing.js +1 -211
- package/dist-cjs/apply/type-adapters.js +1 -43
- package/dist-cjs/apply/window.js +1 -331
- package/dist-cjs/clash/bodmas.js +1 -133
- package/dist-cjs/clash/echo.js +1 -38
- package/dist-cjs/clash/index.js +1 -22
- package/dist-cjs/clash/local-work.js +1 -57
- package/dist-cjs/clash/resolution.js +1 -19
- package/dist-cjs/clash/tetris.js +1 -29
- package/dist-cjs/commands/input.js +1 -0
- package/dist-cjs/commands/mcp.js +1 -0
- package/dist-cjs/contracts/content.js +1 -267
- package/dist-cjs/contracts/index.js +1 -25
- package/dist-cjs/contracts/protection.js +1 -58
- package/dist-cjs/contracts/validate.js +1 -31
- package/dist-cjs/detection/adapter-contract.js +1 -135
- package/dist-cjs/detection/batch.js +1 -78
- package/dist-cjs/detection/classify.js +1 -52
- package/dist-cjs/detection/content.js +1 -82
- package/dist-cjs/detection/dispositions.js +1 -21
- package/dist-cjs/detection/echo.js +1 -36
- package/dist-cjs/detection/identity.js +1 -239
- package/dist-cjs/detection/ignore-lines.js +2 -216
- package/dist-cjs/detection/index.js +1 -64
- package/dist-cjs/detection/package-proposal.js +1 -120
- package/dist-cjs/detection/record-order.js +1 -314
- package/dist-cjs/detection/record-proposal.js +1 -398
- package/dist-cjs/detection/refusal.js +1 -88
- package/dist-cjs/detection/removals.js +1 -54
- package/dist-cjs/detection/scoped-identity.js +1 -192
- package/dist-cjs/detection/skip-defaults.js +2 -22
- package/dist-cjs/detection/skip-policy.js +1 -208
- package/dist-cjs/detection/watch-boundary.js +1 -51
- package/dist-cjs/drive/contracts.js +1 -34
- package/dist-cjs/drive/drive.js +1 -418
- package/dist-cjs/drive/held-removals.js +1 -140
- package/dist-cjs/drive/index.js +1 -32
- package/dist-cjs/drive/kept.js +1 -36
- package/dist-cjs/drive/listing.js +1 -87
- package/dist-cjs/drive/map-index.js +1 -245
- package/dist-cjs/drive/placements.js +1 -168
- package/dist-cjs/drive/records.js +1 -93
- package/dist-cjs/drive/where.js +2 -394
- package/dist-cjs/entities/accepted-view.js +1 -264
- package/dist-cjs/entities/bytes.js +1 -124
- package/dist-cjs/entities/cloud.js +1 -451
- package/dist-cjs/entities/graph-head.js +1 -121
- package/dist-cjs/entities/graph-pages.js +1 -257
- package/dist-cjs/entities/index.js +1 -56
- package/dist-cjs/entities/package-pages.js +1 -99
- package/dist-cjs/entities/placement-owed.js +1 -91
- package/dist-cjs/entities/reducer.js +1 -136
- package/dist-cjs/entities/registry-graph.js +1 -483
- package/dist-cjs/entities/rules.js +1 -251
- package/dist-cjs/entities/types.js +1 -61
- package/dist-cjs/entities/units.js +1 -30
- package/dist-cjs/faults/classify.js +1 -83
- package/dist-cjs/faults/index.js +1 -32
- package/dist-cjs/faults/need.js +1 -84
- package/dist-cjs/faults/recover.js +1 -49
- package/dist-cjs/faults/report.js +1 -135
- package/dist-cjs/faults/scrub.js +3 -169
- package/dist-cjs/faults/wire.js +1 -47
- package/dist-cjs/files/accepted-files.js +1 -135
- package/dist-cjs/files/api.js +1 -85
- package/dist-cjs/files/browse-types.js +1 -54
- package/dist-cjs/files/browser.js +1 -104
- package/dist-cjs/files/cloud-files.js +1 -159
- package/dist-cjs/files/commands.js +1 -145
- package/dist-cjs/files/computer-address.js +1 -52
- package/dist-cjs/files/index.js +1 -65
- package/dist-cjs/files/local-files.js +1 -108
- package/dist-cjs/files/media-type.js +1 -53
- package/dist-cjs/files/own-folders.js +1 -53
- package/dist-cjs/files/plans.js +1 -40
- package/dist-cjs/files/trash.js +1 -299
- package/dist-cjs/files/usage-categories.js +1 -37
- package/dist-cjs/files/usage-chain.js +1 -49
- package/dist-cjs/files/usage-effect.js +1 -34
- package/dist-cjs/files/usage.js +1 -140
- package/dist-cjs/git/alternates.js +1 -84
- package/dist-cjs/git/artifact.js +1 -202
- package/dist-cjs/git/chain.js +1 -59
- package/dist-cjs/git/holds.js +1 -0
- package/dist-cjs/git/index.js +1 -29
- package/dist-cjs/git/parts.js +7 -0
- package/dist-cjs/git/places.js +1 -0
- package/dist-cjs/git/plan.js +1 -100
- package/dist-cjs/git/play.js +4 -323
- package/dist-cjs/git/refs.js +8 -72
- package/dist-cjs/git/restore.js +2 -0
- package/dist-cjs/git/state.js +3 -230
- package/dist-cjs/git/tag.js +3 -72
- package/dist-cjs/git/text.js +1 -8
- package/dist-cjs/git/turns.js +1 -162
- package/dist-cjs/history/history.js +1 -53
- package/dist-cjs/history/identity.js +1 -0
- package/dist-cjs/history/index.js +1 -21
- package/dist-cjs/history/rule.js +1 -83
- package/dist-cjs/history/runs.js +1 -0
- package/dist-cjs/history/types.js +1 -10
- package/dist-cjs/history/version.js +1 -36
- package/dist-cjs/index.js +1 -48
- package/dist-cjs/records/authority.js +1 -31
- package/dist-cjs/records/codec.js +1 -49
- package/dist-cjs/records/contracts.js +1 -196
- package/dist-cjs/records/inbox.js +1 -43
- package/dist-cjs/records/index.js +1 -47
- package/dist-cjs/records/intentional.js +1 -61
- package/dist-cjs/records/outbox.js +1 -50
- package/dist-cjs/records/owned-effects.js +1 -41
- package/dist-cjs/records/publication.js +1 -593
- package/dist-cjs/records/rail-ports.js +1 -4
- package/dist-cjs/records/rail.js +1 -199
- package/dist-cjs/records/receive-channel.js +1 -136
- package/dist-cjs/records/receive-loop.js +1 -282
- package/dist-cjs/records/receive-pages.js +1 -103
- package/dist-cjs/records/retry-clock.js +1 -39
- package/dist-cjs/records/send-batch.js +1 -126
- package/dist-cjs/records/send-freeing.js +1 -128
- package/dist-cjs/records/send-line.js +1 -415
- package/dist-cjs/records/send-preparation.js +1 -230
- package/dist-cjs/records/submit-frame.js +1 -167
- package/dist-cjs/records/unsent-count.js +1 -95
- package/dist-cjs/records/wire.js +1 -127
- package/dist-cjs/registration/home-layout.js +1 -38
- package/dist-cjs/registration/index.js +1 -21
- package/dist-cjs/registration/user-ground.js +1 -407
- package/dist-cjs/sharing/access.js +1 -56
- package/dist-cjs/sharing/cli.js +8 -93
- package/dist-cjs/sharing/commands.js +1 -169
- package/dist-cjs/sharing/construct.js +1 -53
- package/dist-cjs/sharing/download.js +1 -48
- package/dist-cjs/sharing/entity.js +1 -59
- package/dist-cjs/sharing/errors.js +1 -14
- package/dist-cjs/sharing/grants.js +1 -108
- package/dist-cjs/sharing/index.js +1 -36
- package/dist-cjs/sharing/mcp.js +1 -33
- package/dist-cjs/sharing/permissions.js +1 -47
- package/dist-cjs/sharing/publish.js +1 -45
- package/dist-cjs/sharing/share.js +1 -36
- package/dist-cjs/sharing/sharing.js +1 -24
- package/dist-cjs/sharing/types.js +1 -19
- package/dist-cjs/steps.js +1 -64
- package/dist-cjs/transfer/artifacts.js +1 -95
- package/dist-cjs/transfer/batches.js +1 -44
- package/dist-cjs/transfer/cargo-pack.js +1 -0
- package/dist-cjs/transfer/cargo.js +1 -135
- package/dist-cjs/transfer/dispute.js +1 -0
- package/dist-cjs/transfer/download.js +1 -634
- package/dist-cjs/transfer/index.js +1 -30
- package/dist-cjs/transfer/parallel.js +1 -143
- package/dist-cjs/transfer/ranges.js +1 -63
- package/dist-cjs/transfer/refs.js +1 -45
- package/dist-cjs/transfer/upload.js +1 -256
- package/dist-cjs/versions/admit.js +1 -0
- package/dist-cjs/versions/api.js +1 -0
- package/dist-cjs/versions/cli-text.js +5 -0
- package/dist-cjs/versions/cli.js +19 -0
- package/dist-cjs/versions/commands.js +1 -0
- package/dist-cjs/versions/content.js +1 -0
- package/dist-cjs/versions/dates.js +1 -0
- package/dist-cjs/versions/deliver.js +2 -0
- package/dist-cjs/versions/errors.js +1 -0
- package/dist-cjs/versions/index.js +1 -0
- package/dist-cjs/versions/line.js +1 -0
- package/dist-cjs/versions/list.js +1 -0
- package/dist-cjs/versions/mcp.js +1 -0
- package/dist-cjs/versions/ports.js +1 -0
- package/dist-cjs/versions/read.js +1 -0
- package/dist-cjs/versions/restore.js +1 -0
- package/dist-cjs/versions/services.js +1 -0
- package/dist-cjs/versions/show.js +1 -0
- package/dist-cjs/versions/types.js +1 -0
- package/dist-cjs/versions/versions.js +1 -0
- package/dist-cjs/watching/coverage.js +1 -48
- package/dist-cjs/watching/index.js +1 -25
- package/dist-cjs/watching/maintenance.js +1 -208
- package/dist-cjs/watching/suspicion.js +1 -517
- package/dist-cjs/workspace/api.js +1 -110
- package/dist-cjs/workspace/entries.js +1 -82
- package/dist-cjs/workspace/identity.js +1 -32
- package/dist-cjs/workspace/index.js +1 -15
- package/dist-cjs/workspace/registry.js +1 -259
- package/dist-cjs/workspace/types.js +1 -3
- package/package.json +22 -7
- package/PURPOSE.md +0 -697
- package/dist/apply/contracts.d.ts.map +0 -1
- package/dist/apply/contracts.js.map +0 -1
- package/dist/apply/fetch-ahead.d.ts.map +0 -1
- package/dist/apply/fetch-ahead.js.map +0 -1
- package/dist/apply/index.d.ts.map +0 -1
- package/dist/apply/index.js.map +0 -1
- package/dist/apply/journey.d.ts.map +0 -1
- package/dist/apply/journey.js.map +0 -1
- package/dist/apply/lane.d.ts.map +0 -1
- package/dist/apply/lane.js.map +0 -1
- package/dist/apply/line.d.ts.map +0 -1
- package/dist/apply/line.js.map +0 -1
- package/dist/apply/plans.d.ts.map +0 -1
- package/dist/apply/plans.js.map +0 -1
- package/dist/apply/rail.d.ts.map +0 -1
- package/dist/apply/rail.js.map +0 -1
- package/dist/apply/selection.d.ts.map +0 -1
- package/dist/apply/selection.js.map +0 -1
- package/dist/apply/settling.d.ts.map +0 -1
- package/dist/apply/settling.js.map +0 -1
- package/dist/apply/showing.d.ts.map +0 -1
- package/dist/apply/showing.js.map +0 -1
- package/dist/apply/type-adapters.d.ts.map +0 -1
- package/dist/apply/type-adapters.js.map +0 -1
- package/dist/apply/window.d.ts.map +0 -1
- package/dist/apply/window.js.map +0 -1
- package/dist/clash/bodmas.d.ts.map +0 -1
- package/dist/clash/bodmas.js.map +0 -1
- package/dist/clash/echo.d.ts.map +0 -1
- package/dist/clash/echo.js.map +0 -1
- package/dist/clash/index.d.ts.map +0 -1
- package/dist/clash/index.js.map +0 -1
- package/dist/clash/local-work.d.ts.map +0 -1
- package/dist/clash/local-work.js.map +0 -1
- package/dist/clash/resolution.d.ts.map +0 -1
- package/dist/clash/resolution.js.map +0 -1
- package/dist/clash/tetris.d.ts.map +0 -1
- package/dist/clash/tetris.js.map +0 -1
- package/dist/contracts/content.d.ts.map +0 -1
- package/dist/contracts/content.js.map +0 -1
- package/dist/contracts/index.d.ts.map +0 -1
- package/dist/contracts/index.js.map +0 -1
- package/dist/contracts/protection.d.ts.map +0 -1
- package/dist/contracts/protection.js.map +0 -1
- package/dist/contracts/validate.d.ts.map +0 -1
- package/dist/contracts/validate.js.map +0 -1
- package/dist/detection/adapter-contract.d.ts.map +0 -1
- package/dist/detection/adapter-contract.js.map +0 -1
- package/dist/detection/batch.d.ts.map +0 -1
- package/dist/detection/batch.js.map +0 -1
- package/dist/detection/classify.d.ts.map +0 -1
- package/dist/detection/classify.js.map +0 -1
- package/dist/detection/content.d.ts.map +0 -1
- package/dist/detection/content.js.map +0 -1
- package/dist/detection/dispositions.d.ts.map +0 -1
- package/dist/detection/dispositions.js.map +0 -1
- package/dist/detection/echo.d.ts.map +0 -1
- package/dist/detection/echo.js.map +0 -1
- package/dist/detection/identity.d.ts.map +0 -1
- package/dist/detection/identity.js.map +0 -1
- package/dist/detection/ignore-lines.d.ts.map +0 -1
- package/dist/detection/ignore-lines.js.map +0 -1
- package/dist/detection/index.d.ts.map +0 -1
- package/dist/detection/index.js.map +0 -1
- package/dist/detection/package-proposal.d.ts.map +0 -1
- package/dist/detection/package-proposal.js.map +0 -1
- package/dist/detection/record-order.d.ts.map +0 -1
- package/dist/detection/record-order.js.map +0 -1
- package/dist/detection/record-proposal.d.ts.map +0 -1
- package/dist/detection/record-proposal.js.map +0 -1
- package/dist/detection/refusal.d.ts.map +0 -1
- package/dist/detection/refusal.js.map +0 -1
- package/dist/detection/removals.d.ts.map +0 -1
- package/dist/detection/removals.js.map +0 -1
- package/dist/detection/scoped-identity.d.ts.map +0 -1
- package/dist/detection/scoped-identity.js.map +0 -1
- package/dist/detection/skip-defaults.d.ts.map +0 -1
- package/dist/detection/skip-defaults.js.map +0 -1
- package/dist/detection/skip-policy.d.ts.map +0 -1
- package/dist/detection/skip-policy.js.map +0 -1
- package/dist/detection/watch-boundary.d.ts.map +0 -1
- package/dist/detection/watch-boundary.js.map +0 -1
- package/dist/drive/contracts.d.ts.map +0 -1
- package/dist/drive/contracts.js.map +0 -1
- package/dist/drive/drive.d.ts.map +0 -1
- package/dist/drive/drive.js.map +0 -1
- package/dist/drive/held-removals.d.ts.map +0 -1
- package/dist/drive/held-removals.js.map +0 -1
- package/dist/drive/index.d.ts.map +0 -1
- package/dist/drive/index.js.map +0 -1
- package/dist/drive/kept.d.ts.map +0 -1
- package/dist/drive/kept.js.map +0 -1
- package/dist/drive/listing.d.ts.map +0 -1
- package/dist/drive/listing.js.map +0 -1
- package/dist/drive/map-index.d.ts.map +0 -1
- package/dist/drive/map-index.js.map +0 -1
- package/dist/drive/placements.d.ts.map +0 -1
- package/dist/drive/placements.js.map +0 -1
- package/dist/drive/records.d.ts.map +0 -1
- package/dist/drive/records.js.map +0 -1
- package/dist/drive/where.d.ts.map +0 -1
- package/dist/drive/where.js.map +0 -1
- package/dist/entities/accepted-view.d.ts.map +0 -1
- package/dist/entities/accepted-view.js.map +0 -1
- package/dist/entities/bytes.d.ts.map +0 -1
- package/dist/entities/bytes.js.map +0 -1
- package/dist/entities/cloud.d.ts.map +0 -1
- package/dist/entities/cloud.js.map +0 -1
- package/dist/entities/graph-head.d.ts.map +0 -1
- package/dist/entities/graph-head.js.map +0 -1
- package/dist/entities/graph-pages.d.ts.map +0 -1
- package/dist/entities/graph-pages.js.map +0 -1
- package/dist/entities/index.d.ts.map +0 -1
- package/dist/entities/index.js.map +0 -1
- package/dist/entities/package-pages.d.ts.map +0 -1
- package/dist/entities/package-pages.js.map +0 -1
- package/dist/entities/placement-owed.d.ts.map +0 -1
- package/dist/entities/placement-owed.js.map +0 -1
- package/dist/entities/reducer.d.ts.map +0 -1
- package/dist/entities/reducer.js.map +0 -1
- package/dist/entities/registry-graph.d.ts.map +0 -1
- package/dist/entities/registry-graph.js.map +0 -1
- package/dist/entities/rules.d.ts.map +0 -1
- package/dist/entities/rules.js.map +0 -1
- package/dist/entities/types.d.ts.map +0 -1
- package/dist/entities/types.js.map +0 -1
- package/dist/entities/units.d.ts.map +0 -1
- package/dist/entities/units.js.map +0 -1
- package/dist/faults/classify.d.ts.map +0 -1
- package/dist/faults/classify.js.map +0 -1
- package/dist/faults/index.d.ts.map +0 -1
- package/dist/faults/index.js.map +0 -1
- package/dist/faults/need.d.ts.map +0 -1
- package/dist/faults/need.js.map +0 -1
- package/dist/faults/recover.d.ts.map +0 -1
- package/dist/faults/recover.js.map +0 -1
- package/dist/faults/report.d.ts.map +0 -1
- package/dist/faults/report.js.map +0 -1
- package/dist/faults/scrub.d.ts.map +0 -1
- package/dist/faults/scrub.js.map +0 -1
- package/dist/faults/wire.d.ts.map +0 -1
- package/dist/faults/wire.js.map +0 -1
- package/dist/files/accepted-files.d.ts.map +0 -1
- package/dist/files/accepted-files.js.map +0 -1
- package/dist/files/api.d.ts.map +0 -1
- package/dist/files/api.js.map +0 -1
- package/dist/files/browse-types.d.ts.map +0 -1
- package/dist/files/browse-types.js.map +0 -1
- package/dist/files/browser.d.ts.map +0 -1
- package/dist/files/browser.js.map +0 -1
- package/dist/files/cloud-files.d.ts.map +0 -1
- package/dist/files/cloud-files.js.map +0 -1
- package/dist/files/commands.d.ts.map +0 -1
- package/dist/files/commands.js.map +0 -1
- package/dist/files/computer-address.d.ts.map +0 -1
- package/dist/files/computer-address.js.map +0 -1
- package/dist/files/index.d.ts.map +0 -1
- package/dist/files/index.js.map +0 -1
- package/dist/files/local-files.d.ts.map +0 -1
- package/dist/files/local-files.js.map +0 -1
- package/dist/files/media-type.d.ts.map +0 -1
- package/dist/files/media-type.js.map +0 -1
- package/dist/files/own-folders.d.ts.map +0 -1
- package/dist/files/own-folders.js.map +0 -1
- package/dist/files/plans.d.ts.map +0 -1
- package/dist/files/plans.js.map +0 -1
- package/dist/files/trash.d.ts.map +0 -1
- package/dist/files/trash.js.map +0 -1
- package/dist/files/usage-categories.d.ts.map +0 -1
- package/dist/files/usage-categories.js.map +0 -1
- package/dist/files/usage-chain.d.ts.map +0 -1
- package/dist/files/usage-chain.js.map +0 -1
- package/dist/files/usage-effect.d.ts.map +0 -1
- package/dist/files/usage-effect.js.map +0 -1
- package/dist/files/usage.d.ts.map +0 -1
- package/dist/files/usage.js.map +0 -1
- package/dist/git/alternates.d.ts.map +0 -1
- package/dist/git/alternates.js.map +0 -1
- package/dist/git/artifact.d.ts.map +0 -1
- package/dist/git/artifact.js.map +0 -1
- package/dist/git/chain.d.ts.map +0 -1
- package/dist/git/chain.js.map +0 -1
- package/dist/git/commands.d.ts +0 -3
- package/dist/git/commands.d.ts.map +0 -1
- package/dist/git/commands.js +0 -35
- package/dist/git/commands.js.map +0 -1
- package/dist/git/index.d.ts.map +0 -1
- package/dist/git/index.js.map +0 -1
- package/dist/git/plan.d.ts.map +0 -1
- package/dist/git/plan.js.map +0 -1
- package/dist/git/play.d.ts.map +0 -1
- package/dist/git/play.js.map +0 -1
- package/dist/git/refs.d.ts.map +0 -1
- package/dist/git/refs.js.map +0 -1
- package/dist/git/state.d.ts.map +0 -1
- package/dist/git/state.js.map +0 -1
- package/dist/git/tag.d.ts.map +0 -1
- package/dist/git/tag.js.map +0 -1
- package/dist/git/text.d.ts.map +0 -1
- package/dist/git/text.js.map +0 -1
- package/dist/git/turns.d.ts.map +0 -1
- package/dist/git/turns.js.map +0 -1
- package/dist/history/history.d.ts.map +0 -1
- package/dist/history/history.js.map +0 -1
- package/dist/history/index.d.ts.map +0 -1
- package/dist/history/index.js.map +0 -1
- package/dist/history/rule.d.ts.map +0 -1
- package/dist/history/rule.js.map +0 -1
- package/dist/history/types.d.ts.map +0 -1
- package/dist/history/types.js.map +0 -1
- package/dist/history/version.d.ts.map +0 -1
- package/dist/history/version.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/records/authority.d.ts.map +0 -1
- package/dist/records/authority.js.map +0 -1
- package/dist/records/codec.d.ts.map +0 -1
- package/dist/records/codec.js.map +0 -1
- package/dist/records/contracts.d.ts.map +0 -1
- package/dist/records/contracts.js.map +0 -1
- package/dist/records/inbox.d.ts.map +0 -1
- package/dist/records/inbox.js.map +0 -1
- package/dist/records/index.d.ts.map +0 -1
- package/dist/records/index.js.map +0 -1
- package/dist/records/intentional.d.ts.map +0 -1
- package/dist/records/intentional.js.map +0 -1
- package/dist/records/outbox.d.ts.map +0 -1
- package/dist/records/outbox.js.map +0 -1
- package/dist/records/owned-effects.d.ts.map +0 -1
- package/dist/records/owned-effects.js.map +0 -1
- package/dist/records/publication.d.ts.map +0 -1
- package/dist/records/publication.js.map +0 -1
- package/dist/records/rail-ports.d.ts.map +0 -1
- package/dist/records/rail-ports.js.map +0 -1
- package/dist/records/rail.d.ts.map +0 -1
- package/dist/records/rail.js.map +0 -1
- package/dist/records/receive-channel.d.ts.map +0 -1
- package/dist/records/receive-channel.js.map +0 -1
- package/dist/records/receive-loop.d.ts.map +0 -1
- package/dist/records/receive-loop.js.map +0 -1
- package/dist/records/receive-pages.d.ts.map +0 -1
- package/dist/records/receive-pages.js.map +0 -1
- package/dist/records/retry-clock.d.ts.map +0 -1
- package/dist/records/retry-clock.js.map +0 -1
- package/dist/records/send-batch.d.ts.map +0 -1
- package/dist/records/send-batch.js.map +0 -1
- package/dist/records/send-freeing.d.ts.map +0 -1
- package/dist/records/send-freeing.js.map +0 -1
- package/dist/records/send-line.d.ts.map +0 -1
- package/dist/records/send-line.js.map +0 -1
- package/dist/records/send-preparation.d.ts.map +0 -1
- package/dist/records/send-preparation.js.map +0 -1
- package/dist/records/submit-frame.d.ts.map +0 -1
- package/dist/records/submit-frame.js.map +0 -1
- package/dist/records/unsent-count.d.ts.map +0 -1
- package/dist/records/unsent-count.js.map +0 -1
- package/dist/records/wire.d.ts.map +0 -1
- package/dist/records/wire.js.map +0 -1
- package/dist/registration/home-layout.d.ts.map +0 -1
- package/dist/registration/home-layout.js.map +0 -1
- package/dist/registration/index.d.ts.map +0 -1
- package/dist/registration/index.js.map +0 -1
- package/dist/registration/user-ground.d.ts.map +0 -1
- package/dist/registration/user-ground.js.map +0 -1
- package/dist/sharing/access.d.ts.map +0 -1
- package/dist/sharing/access.js.map +0 -1
- package/dist/sharing/cli.d.ts.map +0 -1
- package/dist/sharing/cli.js.map +0 -1
- package/dist/sharing/command-input.d.ts.map +0 -1
- package/dist/sharing/command-input.js +0 -63
- package/dist/sharing/command-input.js.map +0 -1
- package/dist/sharing/commands.d.ts.map +0 -1
- package/dist/sharing/commands.js.map +0 -1
- package/dist/sharing/construct.d.ts.map +0 -1
- package/dist/sharing/construct.js.map +0 -1
- package/dist/sharing/download.d.ts.map +0 -1
- package/dist/sharing/download.js.map +0 -1
- package/dist/sharing/entity.d.ts.map +0 -1
- package/dist/sharing/entity.js.map +0 -1
- package/dist/sharing/errors.d.ts.map +0 -1
- package/dist/sharing/errors.js.map +0 -1
- package/dist/sharing/grants.d.ts.map +0 -1
- package/dist/sharing/grants.js.map +0 -1
- package/dist/sharing/index.d.ts.map +0 -1
- package/dist/sharing/index.js.map +0 -1
- package/dist/sharing/mcp.d.ts.map +0 -1
- package/dist/sharing/mcp.js.map +0 -1
- package/dist/sharing/permissions.d.ts.map +0 -1
- package/dist/sharing/permissions.js.map +0 -1
- package/dist/sharing/publish.d.ts.map +0 -1
- package/dist/sharing/publish.js.map +0 -1
- package/dist/sharing/share.d.ts.map +0 -1
- package/dist/sharing/share.js.map +0 -1
- package/dist/sharing/sharing.d.ts.map +0 -1
- package/dist/sharing/sharing.js.map +0 -1
- package/dist/sharing/types.d.ts.map +0 -1
- package/dist/sharing/types.js.map +0 -1
- package/dist/steps.d.ts.map +0 -1
- package/dist/steps.js.map +0 -1
- package/dist/transfer/artifacts.d.ts.map +0 -1
- package/dist/transfer/artifacts.js.map +0 -1
- package/dist/transfer/batches.d.ts.map +0 -1
- package/dist/transfer/batches.js.map +0 -1
- package/dist/transfer/cargo-frame.d.ts +0 -42
- package/dist/transfer/cargo-frame.d.ts.map +0 -1
- package/dist/transfer/cargo-frame.js +0 -98
- package/dist/transfer/cargo-frame.js.map +0 -1
- package/dist/transfer/cargo.d.ts.map +0 -1
- package/dist/transfer/cargo.js.map +0 -1
- package/dist/transfer/download.d.ts.map +0 -1
- package/dist/transfer/download.js.map +0 -1
- package/dist/transfer/index.d.ts.map +0 -1
- package/dist/transfer/index.js.map +0 -1
- package/dist/transfer/parallel.d.ts.map +0 -1
- package/dist/transfer/parallel.js.map +0 -1
- package/dist/transfer/ranges.d.ts.map +0 -1
- package/dist/transfer/ranges.js.map +0 -1
- package/dist/transfer/refs.d.ts.map +0 -1
- package/dist/transfer/refs.js.map +0 -1
- package/dist/transfer/upload.d.ts.map +0 -1
- package/dist/transfer/upload.js.map +0 -1
- package/dist/watching/coverage.d.ts.map +0 -1
- package/dist/watching/coverage.js.map +0 -1
- package/dist/watching/index.d.ts.map +0 -1
- package/dist/watching/index.js.map +0 -1
- package/dist/watching/maintenance.d.ts.map +0 -1
- package/dist/watching/maintenance.js.map +0 -1
- package/dist/watching/suspicion.d.ts.map +0 -1
- package/dist/watching/suspicion.js.map +0 -1
- package/dist/workspace/api.d.ts.map +0 -1
- package/dist/workspace/api.js.map +0 -1
- package/dist/workspace/entries.d.ts.map +0 -1
- package/dist/workspace/entries.js.map +0 -1
- package/dist/workspace/identity.d.ts.map +0 -1
- package/dist/workspace/identity.js.map +0 -1
- package/dist/workspace/index.d.ts.map +0 -1
- package/dist/workspace/index.js.map +0 -1
- package/dist/workspace/registry.d.ts.map +0 -1
- package/dist/workspace/registry.js.map +0 -1
- package/dist/workspace/types.d.ts.map +0 -1
- package/dist/workspace/types.js.map +0 -1
- package/dist-cjs/apply/contracts.js.map +0 -1
- package/dist-cjs/apply/fetch-ahead.js.map +0 -1
- package/dist-cjs/apply/index.js.map +0 -1
- package/dist-cjs/apply/journey.js.map +0 -1
- package/dist-cjs/apply/lane.js.map +0 -1
- package/dist-cjs/apply/line.js.map +0 -1
- package/dist-cjs/apply/plans.js.map +0 -1
- package/dist-cjs/apply/rail.js.map +0 -1
- package/dist-cjs/apply/selection.js.map +0 -1
- package/dist-cjs/apply/settling.js.map +0 -1
- package/dist-cjs/apply/showing.js.map +0 -1
- package/dist-cjs/apply/type-adapters.js.map +0 -1
- package/dist-cjs/apply/window.js.map +0 -1
- package/dist-cjs/clash/bodmas.js.map +0 -1
- package/dist-cjs/clash/echo.js.map +0 -1
- package/dist-cjs/clash/index.js.map +0 -1
- package/dist-cjs/clash/local-work.js.map +0 -1
- package/dist-cjs/clash/resolution.js.map +0 -1
- package/dist-cjs/clash/tetris.js.map +0 -1
- package/dist-cjs/contracts/content.js.map +0 -1
- package/dist-cjs/contracts/index.js.map +0 -1
- package/dist-cjs/contracts/protection.js.map +0 -1
- package/dist-cjs/contracts/validate.js.map +0 -1
- package/dist-cjs/detection/adapter-contract.js.map +0 -1
- package/dist-cjs/detection/batch.js.map +0 -1
- package/dist-cjs/detection/classify.js.map +0 -1
- package/dist-cjs/detection/content.js.map +0 -1
- package/dist-cjs/detection/dispositions.js.map +0 -1
- package/dist-cjs/detection/echo.js.map +0 -1
- package/dist-cjs/detection/identity.js.map +0 -1
- package/dist-cjs/detection/ignore-lines.js.map +0 -1
- package/dist-cjs/detection/index.js.map +0 -1
- package/dist-cjs/detection/package-proposal.js.map +0 -1
- package/dist-cjs/detection/record-order.js.map +0 -1
- package/dist-cjs/detection/record-proposal.js.map +0 -1
- package/dist-cjs/detection/refusal.js.map +0 -1
- package/dist-cjs/detection/removals.js.map +0 -1
- package/dist-cjs/detection/scoped-identity.js.map +0 -1
- package/dist-cjs/detection/skip-defaults.js.map +0 -1
- package/dist-cjs/detection/skip-policy.js.map +0 -1
- package/dist-cjs/detection/watch-boundary.js.map +0 -1
- package/dist-cjs/drive/contracts.js.map +0 -1
- package/dist-cjs/drive/drive.js.map +0 -1
- package/dist-cjs/drive/held-removals.js.map +0 -1
- package/dist-cjs/drive/index.js.map +0 -1
- package/dist-cjs/drive/kept.js.map +0 -1
- package/dist-cjs/drive/listing.js.map +0 -1
- package/dist-cjs/drive/map-index.js.map +0 -1
- package/dist-cjs/drive/placements.js.map +0 -1
- package/dist-cjs/drive/records.js.map +0 -1
- package/dist-cjs/drive/where.js.map +0 -1
- package/dist-cjs/entities/accepted-view.js.map +0 -1
- package/dist-cjs/entities/bytes.js.map +0 -1
- package/dist-cjs/entities/cloud.js.map +0 -1
- package/dist-cjs/entities/graph-head.js.map +0 -1
- package/dist-cjs/entities/graph-pages.js.map +0 -1
- package/dist-cjs/entities/index.js.map +0 -1
- package/dist-cjs/entities/package-pages.js.map +0 -1
- package/dist-cjs/entities/placement-owed.js.map +0 -1
- package/dist-cjs/entities/reducer.js.map +0 -1
- package/dist-cjs/entities/registry-graph.js.map +0 -1
- package/dist-cjs/entities/rules.js.map +0 -1
- package/dist-cjs/entities/types.js.map +0 -1
- package/dist-cjs/entities/units.js.map +0 -1
- package/dist-cjs/faults/classify.js.map +0 -1
- package/dist-cjs/faults/index.js.map +0 -1
- package/dist-cjs/faults/need.js.map +0 -1
- package/dist-cjs/faults/recover.js.map +0 -1
- package/dist-cjs/faults/report.js.map +0 -1
- package/dist-cjs/faults/scrub.js.map +0 -1
- package/dist-cjs/faults/wire.js.map +0 -1
- package/dist-cjs/files/accepted-files.js.map +0 -1
- package/dist-cjs/files/api.js.map +0 -1
- package/dist-cjs/files/browse-types.js.map +0 -1
- package/dist-cjs/files/browser.js.map +0 -1
- package/dist-cjs/files/cloud-files.js.map +0 -1
- package/dist-cjs/files/commands.js.map +0 -1
- package/dist-cjs/files/computer-address.js.map +0 -1
- package/dist-cjs/files/index.js.map +0 -1
- package/dist-cjs/files/local-files.js.map +0 -1
- package/dist-cjs/files/media-type.js.map +0 -1
- package/dist-cjs/files/own-folders.js.map +0 -1
- package/dist-cjs/files/plans.js.map +0 -1
- package/dist-cjs/files/trash.js.map +0 -1
- package/dist-cjs/files/usage-categories.js.map +0 -1
- package/dist-cjs/files/usage-chain.js.map +0 -1
- package/dist-cjs/files/usage-effect.js.map +0 -1
- package/dist-cjs/files/usage.js.map +0 -1
- package/dist-cjs/git/alternates.js.map +0 -1
- package/dist-cjs/git/artifact.js.map +0 -1
- package/dist-cjs/git/chain.js.map +0 -1
- package/dist-cjs/git/commands.js +0 -39
- package/dist-cjs/git/commands.js.map +0 -1
- package/dist-cjs/git/index.js.map +0 -1
- package/dist-cjs/git/plan.js.map +0 -1
- package/dist-cjs/git/play.js.map +0 -1
- package/dist-cjs/git/refs.js.map +0 -1
- package/dist-cjs/git/state.js.map +0 -1
- package/dist-cjs/git/tag.js.map +0 -1
- package/dist-cjs/git/text.js.map +0 -1
- package/dist-cjs/git/turns.js.map +0 -1
- package/dist-cjs/history/history.js.map +0 -1
- package/dist-cjs/history/index.js.map +0 -1
- package/dist-cjs/history/rule.js.map +0 -1
- package/dist-cjs/history/types.js.map +0 -1
- package/dist-cjs/history/version.js.map +0 -1
- package/dist-cjs/index.js.map +0 -1
- package/dist-cjs/records/authority.js.map +0 -1
- package/dist-cjs/records/codec.js.map +0 -1
- package/dist-cjs/records/contracts.js.map +0 -1
- package/dist-cjs/records/inbox.js.map +0 -1
- package/dist-cjs/records/index.js.map +0 -1
- package/dist-cjs/records/intentional.js.map +0 -1
- package/dist-cjs/records/outbox.js.map +0 -1
- package/dist-cjs/records/owned-effects.js.map +0 -1
- package/dist-cjs/records/publication.js.map +0 -1
- package/dist-cjs/records/rail-ports.js.map +0 -1
- package/dist-cjs/records/rail.js.map +0 -1
- package/dist-cjs/records/receive-channel.js.map +0 -1
- package/dist-cjs/records/receive-loop.js.map +0 -1
- package/dist-cjs/records/receive-pages.js.map +0 -1
- package/dist-cjs/records/retry-clock.js.map +0 -1
- package/dist-cjs/records/send-batch.js.map +0 -1
- package/dist-cjs/records/send-freeing.js.map +0 -1
- package/dist-cjs/records/send-line.js.map +0 -1
- package/dist-cjs/records/send-preparation.js.map +0 -1
- package/dist-cjs/records/submit-frame.js.map +0 -1
- package/dist-cjs/records/unsent-count.js.map +0 -1
- package/dist-cjs/records/wire.js.map +0 -1
- package/dist-cjs/registration/home-layout.js.map +0 -1
- package/dist-cjs/registration/index.js.map +0 -1
- package/dist-cjs/registration/user-ground.js.map +0 -1
- package/dist-cjs/sharing/access.js.map +0 -1
- package/dist-cjs/sharing/cli.js.map +0 -1
- package/dist-cjs/sharing/command-input.js +0 -69
- package/dist-cjs/sharing/command-input.js.map +0 -1
- package/dist-cjs/sharing/commands.js.map +0 -1
- package/dist-cjs/sharing/construct.js.map +0 -1
- package/dist-cjs/sharing/download.js.map +0 -1
- package/dist-cjs/sharing/entity.js.map +0 -1
- package/dist-cjs/sharing/errors.js.map +0 -1
- package/dist-cjs/sharing/grants.js.map +0 -1
- package/dist-cjs/sharing/index.js.map +0 -1
- package/dist-cjs/sharing/mcp.js.map +0 -1
- package/dist-cjs/sharing/permissions.js.map +0 -1
- package/dist-cjs/sharing/publish.js.map +0 -1
- package/dist-cjs/sharing/share.js.map +0 -1
- package/dist-cjs/sharing/sharing.js.map +0 -1
- package/dist-cjs/sharing/types.js.map +0 -1
- package/dist-cjs/steps.js.map +0 -1
- package/dist-cjs/transfer/artifacts.js.map +0 -1
- package/dist-cjs/transfer/batches.js.map +0 -1
- package/dist-cjs/transfer/cargo-frame.js +0 -104
- package/dist-cjs/transfer/cargo-frame.js.map +0 -1
- package/dist-cjs/transfer/cargo.js.map +0 -1
- package/dist-cjs/transfer/download.js.map +0 -1
- package/dist-cjs/transfer/index.js.map +0 -1
- package/dist-cjs/transfer/parallel.js.map +0 -1
- package/dist-cjs/transfer/ranges.js.map +0 -1
- package/dist-cjs/transfer/refs.js.map +0 -1
- package/dist-cjs/transfer/upload.js.map +0 -1
- package/dist-cjs/watching/coverage.js.map +0 -1
- package/dist-cjs/watching/index.js.map +0 -1
- package/dist-cjs/watching/maintenance.js.map +0 -1
- package/dist-cjs/watching/suspicion.js.map +0 -1
- package/dist-cjs/workspace/api.js.map +0 -1
- package/dist-cjs/workspace/entries.js.map +0 -1
- package/dist-cjs/workspace/identity.js.map +0 -1
- package/dist-cjs/workspace/index.js.map +0 -1
- package/dist-cjs/workspace/registry.js.map +0 -1
- package/dist-cjs/workspace/types.js.map +0 -1
|
@@ -1,24 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Receive is one loop over one authority's delivery tail and the entity
|
|
3
|
-
* channels this computer follows: those a grant holds, and those a caller
|
|
4
|
-
* waits on. It subscribes before it catches up and reads from its durable
|
|
5
|
-
* cursors. A doorbell only flags a channel; the tail and the channels are
|
|
6
|
-
* the truth. Idle, it reads nothing.
|
|
7
|
-
*
|
|
8
|
-
* Flagged channels take turns, one page each (receive-pages.ts), in the
|
|
9
|
-
* order they were flagged, so no channel's traffic can delay another's by
|
|
10
|
-
* more than one page per channel. A channel whose page was full takes its
|
|
11
|
-
* next turn after the others. A failed turn parks only its own channel, and
|
|
12
|
-
* answers only the callers it owed (receive-channel.ts), until the backoff
|
|
13
|
-
* fires; disconnect parks every channel. The backoff resets once every
|
|
14
|
-
* channel has caught up. Starting waits for no answer: a caller that needs
|
|
15
|
-
* the authority's history asks for it (receiveCurrent, receiveThrough).
|
|
16
|
-
*
|
|
17
|
-
* The loop owns every effect a turn starts (owned-effects.ts): after stop a
|
|
18
|
-
* turn starts nothing more and acts on no late answer. Receive keeps a
|
|
19
|
-
* channel while a grant holds it, a caller waits on it, or a turn owns it,
|
|
20
|
-
* so a channel released and held again mid-turn stays the one channel.
|
|
21
|
-
*/
|
|
22
1
|
import type { EntityRecordAuthorityPort, EntityRecordAvailability, EntityRecordSchedulePort, EntityRecordStorePort } from './rail-ports.js';
|
|
23
2
|
export interface ReceiveLoopOptions {
|
|
24
3
|
readonly authorityId: string;
|
|
@@ -32,40 +11,13 @@ export interface ReceiveLoopOptions {
|
|
|
32
11
|
export declare class ReceiveLoop {
|
|
33
12
|
#private;
|
|
34
13
|
constructor(options: ReceiveLoopOptions);
|
|
35
|
-
/** Listen, then begin catching up from the durable cursors. */
|
|
36
14
|
start(): void;
|
|
37
|
-
/** Flag what one availability names: a followed channel, or this tail. */
|
|
38
15
|
ring(signal: EntityRecordAvailability): void;
|
|
39
16
|
hold(entityId: string): void;
|
|
40
17
|
release(entityId: string): void;
|
|
41
|
-
/**
|
|
42
|
-
* Resolves once this authority's gap-free delivery cursor reaches
|
|
43
|
-
* `watermark`, a position the authority has committed: as soon as the page
|
|
44
|
-
* that covers it commits, however much tail follows. A turn that begins
|
|
45
|
-
* after it and ends caught up below it rejects as unavailable; one that
|
|
46
|
-
* fails rejects with its failure. A caller never waits for another
|
|
47
|
-
* caller's larger watermark or for Send.
|
|
48
|
-
*/
|
|
49
18
|
receiveThrough(watermark: number): Promise<void>;
|
|
50
|
-
/**
|
|
51
|
-
* Resolves once this authority's tail holds the history as it stands: the
|
|
52
|
-
* first turn begun after this call that ends caught up holds every
|
|
53
|
-
* position above this computer's basis that the authority had committed
|
|
54
|
-
* when it read. It answers nothing about positions committed later, and a
|
|
55
|
-
* failed turn rejects it. With no basis nothing lies above it, so a caller
|
|
56
|
-
* keeps its head first.
|
|
57
|
-
*/
|
|
58
19
|
receiveCurrent(): Promise<void>;
|
|
59
|
-
/** The same for one entity's dense sequence, read from that entity's own
|
|
60
|
-
* channel whether or not this computer holds it. */
|
|
61
20
|
receiveEntityThrough(entityId: string, globalSequence: number): Promise<void>;
|
|
62
|
-
/** Resolves once Receive covers every position the stamped Outbox rows at
|
|
63
|
-
* or before `through` name, read from their durable stamps: this
|
|
64
|
-
* authority's delivery positions, and each other authority's entity
|
|
65
|
-
* sequences. */
|
|
66
21
|
coverReceipts(through: number): Promise<void>;
|
|
67
|
-
/** Stop listening, join the turn and effects in flight, then answer every
|
|
68
|
-
* caller still waiting. */
|
|
69
22
|
stop(): Promise<void>;
|
|
70
23
|
}
|
|
71
|
-
//# sourceMappingURL=receive-loop.d.ts.map
|
|
@@ -1,278 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Receive is one loop over one authority's delivery tail and the entity
|
|
3
|
-
* channels this computer follows: those a grant holds, and those a caller
|
|
4
|
-
* waits on. It subscribes before it catches up and reads from its durable
|
|
5
|
-
* cursors. A doorbell only flags a channel; the tail and the channels are
|
|
6
|
-
* the truth. Idle, it reads nothing.
|
|
7
|
-
*
|
|
8
|
-
* Flagged channels take turns, one page each (receive-pages.ts), in the
|
|
9
|
-
* order they were flagged, so no channel's traffic can delay another's by
|
|
10
|
-
* more than one page per channel. A channel whose page was full takes its
|
|
11
|
-
* next turn after the others. A failed turn parks only its own channel, and
|
|
12
|
-
* answers only the callers it owed (receive-channel.ts), until the backoff
|
|
13
|
-
* fires; disconnect parks every channel. The backoff resets once every
|
|
14
|
-
* channel has caught up. Starting waits for no answer: a caller that needs
|
|
15
|
-
* the authority's history asks for it (receiveCurrent, receiveThrough).
|
|
16
|
-
*
|
|
17
|
-
* The loop owns every effect a turn starts (owned-effects.ts): after stop a
|
|
18
|
-
* turn starts nothing more and acts on no late answer. Receive keeps a
|
|
19
|
-
* channel while a grant holds it, a caller waits on it, or a turn owns it,
|
|
20
|
-
* so a channel released and held again mid-turn stays the one channel.
|
|
21
|
-
*/
|
|
22
|
-
import { ReceiveChannel } from './receive-channel.js';
|
|
23
|
-
import { receiveEntityPage, receiveTailPage } from './receive-pages.js';
|
|
24
|
-
import { OwnedEffects } from './owned-effects.js';
|
|
25
|
-
import { RetryClock } from './retry-clock.js';
|
|
26
|
-
const stopped = () => new Error('entity record rail stopped before reaching its watermark');
|
|
27
|
-
const checkPosition = (position) => {
|
|
28
|
-
if (!Number.isSafeInteger(position) || position < 0) {
|
|
29
|
-
throw new Error('entity record watermark must be a non-negative integer');
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
export class ReceiveLoop {
|
|
33
|
-
#authorityId;
|
|
34
|
-
#store;
|
|
35
|
-
#authority;
|
|
36
|
-
#pages;
|
|
37
|
-
#onError;
|
|
38
|
-
#retry;
|
|
39
|
-
#effects = new OwnedEffects(stopped);
|
|
40
|
-
#tail;
|
|
41
|
-
/** Every entity channel Receive keeps now. */
|
|
42
|
-
#entities = new Map();
|
|
43
|
-
/** Flagged channels, in turn order, each at most once. */
|
|
44
|
-
#flagged = new Set();
|
|
45
|
-
/** Channels that wait for the backoff. */
|
|
46
|
-
#parked = new Set();
|
|
47
|
-
#started = false;
|
|
48
|
-
#stopped = false;
|
|
49
|
-
/** The turns in flight. Never rejects. */
|
|
50
|
-
#receiving = null;
|
|
51
|
-
#removeListeners = [];
|
|
52
|
-
constructor(options) {
|
|
53
|
-
this.#authorityId = options.authorityId;
|
|
54
|
-
this.#store = options.store;
|
|
55
|
-
this.#authority = options.authority;
|
|
56
|
-
this.#onError = options.onError;
|
|
57
|
-
this.#pages = {
|
|
58
|
-
store: options.store,
|
|
59
|
-
authority: options.authority,
|
|
60
|
-
run: (effect) => this.#effects.run(effect),
|
|
61
|
-
// The commit is durable whether or not its doorbell rings: a failing
|
|
62
|
-
// doorbell is reported, never charged to the read that committed.
|
|
63
|
-
onInboxCommitted: () => {
|
|
64
|
-
try {
|
|
65
|
-
options.onInboxCommitted();
|
|
66
|
-
}
|
|
67
|
-
catch (error) {
|
|
68
|
-
this.#onError(error);
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
};
|
|
72
|
-
this.#retry = new RetryClock(options.schedule);
|
|
73
|
-
this.#tail = new ReceiveChannel(options.authorityId, null, true);
|
|
74
|
-
for (const entityId of options.channels)
|
|
75
|
-
this.#entity(entityId).held = true;
|
|
76
|
-
}
|
|
77
|
-
/** Listen, then begin catching up from the durable cursors. */
|
|
78
|
-
start() {
|
|
79
|
-
this.#started = true;
|
|
80
|
-
this.#removeListeners = [
|
|
81
|
-
this.#authority.onAvailable((signal) => this.ring(signal)),
|
|
82
|
-
this.#authority.onDisconnect(() => {
|
|
83
|
-
if (this.#stopped)
|
|
84
|
-
return;
|
|
85
|
-
for (const channel of this.#channels())
|
|
86
|
-
this.#park(channel);
|
|
87
|
-
}),
|
|
88
|
-
];
|
|
89
|
-
for (const channel of this.#channels())
|
|
90
|
-
this.#flag(channel);
|
|
91
|
-
}
|
|
92
|
-
/** Flag what one availability names: a followed channel, or this tail. */
|
|
93
|
-
ring(signal) {
|
|
94
|
-
if (signal.entityId !== null) {
|
|
95
|
-
const channel = this.#entities.get(signal.entityId);
|
|
96
|
-
if (channel)
|
|
97
|
-
this.#flag(channel);
|
|
98
|
-
}
|
|
99
|
-
else if (signal.authorityId === this.#authorityId) {
|
|
100
|
-
this.#flag(this.#tail);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
hold(entityId) {
|
|
104
|
-
if (this.#stopped)
|
|
105
|
-
return;
|
|
106
|
-
const channel = this.#entity(entityId);
|
|
107
|
-
if (channel.held)
|
|
108
|
-
return;
|
|
109
|
-
channel.held = true;
|
|
110
|
-
this.#flag(channel);
|
|
111
|
-
}
|
|
112
|
-
release(entityId) {
|
|
113
|
-
const channel = this.#entities.get(entityId);
|
|
114
|
-
if (!channel)
|
|
115
|
-
return;
|
|
116
|
-
channel.held = false;
|
|
117
|
-
this.#forgetIfUnneeded(channel);
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Resolves once this authority's gap-free delivery cursor reaches
|
|
121
|
-
* `watermark`, a position the authority has committed: as soon as the page
|
|
122
|
-
* that covers it commits, however much tail follows. A turn that begins
|
|
123
|
-
* after it and ends caught up below it rejects as unavailable; one that
|
|
124
|
-
* fails rejects with its failure. A caller never waits for another
|
|
125
|
-
* caller's larger watermark or for Send.
|
|
126
|
-
*/
|
|
127
|
-
async receiveThrough(watermark) {
|
|
128
|
-
checkPosition(watermark);
|
|
129
|
-
await this.#reach(this.#tail, watermark);
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Resolves once this authority's tail holds the history as it stands: the
|
|
133
|
-
* first turn begun after this call that ends caught up holds every
|
|
134
|
-
* position above this computer's basis that the authority had committed
|
|
135
|
-
* when it read. It answers nothing about positions committed later, and a
|
|
136
|
-
* failed turn rejects it. With no basis nothing lies above it, so a caller
|
|
137
|
-
* keeps its head first.
|
|
138
|
-
*/
|
|
139
|
-
async receiveCurrent() {
|
|
140
|
-
if (this.#stopped)
|
|
141
|
-
throw stopped();
|
|
142
|
-
const current = this.#tail.wait(null);
|
|
143
|
-
this.#flag(this.#tail);
|
|
144
|
-
await current;
|
|
145
|
-
}
|
|
146
|
-
/** The same for one entity's dense sequence, read from that entity's own
|
|
147
|
-
* channel whether or not this computer holds it. */
|
|
148
|
-
async receiveEntityThrough(entityId, globalSequence) {
|
|
149
|
-
checkPosition(globalSequence);
|
|
150
|
-
if (this.#stopped)
|
|
151
|
-
throw stopped();
|
|
152
|
-
await this.#reach(this.#entity(entityId), globalSequence);
|
|
153
|
-
}
|
|
154
|
-
/** Resolves once Receive covers every position the stamped Outbox rows at
|
|
155
|
-
* or before `through` name, read from their durable stamps: this
|
|
156
|
-
* authority's delivery positions, and each other authority's entity
|
|
157
|
-
* sequences. */
|
|
158
|
-
async coverReceipts(through) {
|
|
159
|
-
const receipts = await this.#effects.run(() => this.#store.readReceipts(this.#authorityId, through));
|
|
160
|
-
const covered = await Promise.allSettled([
|
|
161
|
-
this.receiveThrough(receipts.delivery),
|
|
162
|
-
...receipts.entities.map(({ entityId, globalSequence }) => this.receiveEntityThrough(entityId, globalSequence)),
|
|
163
|
-
]);
|
|
164
|
-
for (const result of covered)
|
|
165
|
-
if (result.status === 'rejected')
|
|
166
|
-
throw result.reason;
|
|
167
|
-
}
|
|
168
|
-
/** Stop listening, join the turn and effects in flight, then answer every
|
|
169
|
-
* caller still waiting. */
|
|
170
|
-
async stop() {
|
|
171
|
-
this.#stopped = true;
|
|
172
|
-
this.#retry.cancel();
|
|
173
|
-
for (const remove of this.#removeListeners)
|
|
174
|
-
remove();
|
|
175
|
-
this.#removeListeners = [];
|
|
176
|
-
await Promise.allSettled([this.#receiving, this.#effects.stop()]);
|
|
177
|
-
for (const channel of this.#channels())
|
|
178
|
-
channel.stop(stopped());
|
|
179
|
-
}
|
|
180
|
-
#channels() {
|
|
181
|
-
return [this.#tail, ...this.#entities.values()];
|
|
182
|
-
}
|
|
183
|
-
#entity(entityId) {
|
|
184
|
-
let channel = this.#entities.get(entityId);
|
|
185
|
-
if (!channel)
|
|
186
|
-
this.#entities.set(entityId, channel = new ReceiveChannel(entityId, entityId, false));
|
|
187
|
-
return channel;
|
|
188
|
-
}
|
|
189
|
-
#reach(channel, target) {
|
|
190
|
-
if (this.#stopped)
|
|
191
|
-
return Promise.reject(stopped());
|
|
192
|
-
if (channel.covers(target))
|
|
193
|
-
return Promise.resolve();
|
|
194
|
-
const reached = channel.wait(target);
|
|
195
|
-
this.#flag(channel);
|
|
196
|
-
return reached;
|
|
197
|
-
}
|
|
198
|
-
/** A channel needs a turn. A parked one takes it when the backoff fires. */
|
|
199
|
-
#flag(channel) {
|
|
200
|
-
if (this.#stopped || this.#parked.has(channel))
|
|
201
|
-
return;
|
|
202
|
-
this.#flagged.add(channel);
|
|
203
|
-
this.#kick();
|
|
204
|
-
}
|
|
205
|
-
#park(channel) {
|
|
206
|
-
this.#flagged.delete(channel);
|
|
207
|
-
this.#parked.add(channel);
|
|
208
|
-
this.#retry.arm(() => {
|
|
209
|
-
const parked = [...this.#parked];
|
|
210
|
-
this.#parked.clear();
|
|
211
|
-
for (const waiting of parked)
|
|
212
|
-
this.#flag(waiting);
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
#forgetIfUnneeded(channel) {
|
|
216
|
-
if (channel.needed || channel.entityId === null)
|
|
217
|
-
return;
|
|
218
|
-
this.#entities.delete(channel.entityId);
|
|
219
|
-
this.#flagged.delete(channel);
|
|
220
|
-
this.#parked.delete(channel);
|
|
221
|
-
}
|
|
222
|
-
#kick() {
|
|
223
|
-
if (!this.#started || this.#stopped || this.#receiving)
|
|
224
|
-
return;
|
|
225
|
-
const receiving = this.#receive();
|
|
226
|
-
this.#receiving = receiving;
|
|
227
|
-
void receiving.then(() => {
|
|
228
|
-
this.#receiving = null;
|
|
229
|
-
if (this.#stopped)
|
|
230
|
-
return;
|
|
231
|
-
if (this.#flagged.size > 0) {
|
|
232
|
-
this.#kick();
|
|
233
|
-
}
|
|
234
|
-
else if (this.#parked.size === 0) {
|
|
235
|
-
this.#retry.succeeded();
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
}
|
|
239
|
-
async #receive() {
|
|
240
|
-
for (let channel = this.#next(); channel && !this.#stopped; channel = this.#next()) {
|
|
241
|
-
await this.#turn(channel);
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
#next() {
|
|
245
|
-
const [channel] = this.#flagged;
|
|
246
|
-
if (channel)
|
|
247
|
-
this.#flagged.delete(channel);
|
|
248
|
-
return channel;
|
|
249
|
-
}
|
|
250
|
-
/** One page of one channel. Never rejects. */
|
|
251
|
-
async #turn(channel) {
|
|
252
|
-
const turn = channel.beginTurn();
|
|
253
|
-
const observe = (cursor) => channel.observe(cursor);
|
|
254
|
-
try {
|
|
255
|
-
const full = channel.entityId === null
|
|
256
|
-
? await receiveTailPage(this.#pages, this.#authorityId, observe)
|
|
257
|
-
: await receiveEntityPage(this.#pages, channel.entityId, observe);
|
|
258
|
-
if (this.#stopped)
|
|
259
|
-
return;
|
|
260
|
-
if (full)
|
|
261
|
-
this.#flag(channel);
|
|
262
|
-
else
|
|
263
|
-
channel.caughtUp(turn);
|
|
264
|
-
}
|
|
265
|
-
catch (error) {
|
|
266
|
-
if (this.#stopped)
|
|
267
|
-
return;
|
|
268
|
-
channel.failed(turn, error);
|
|
269
|
-
this.#park(channel);
|
|
270
|
-
this.#onError(error);
|
|
271
|
-
}
|
|
272
|
-
finally {
|
|
273
|
-
channel.endTurn();
|
|
274
|
-
this.#forgetIfUnneeded(channel);
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
//# sourceMappingURL=receive-loop.js.map
|
|
1
|
+
var f=Object.defineProperty;var r=(h,t)=>f(h,"name",{value:t,configurable:!0});import{ReceiveChannel as n}from"./receive-channel.js";import{receiveEntityPage as u,receiveTailPage as l}from"./receive-pages.js";import{OwnedEffects as d}from"./owned-effects.js";import{RetryClock as y}from"./retry-clock.js";const o=r(()=>new Error("entity record rail stopped before reaching its watermark"),"stopped"),a=r(h=>{if(!Number.isSafeInteger(h)||h<0)throw new Error("entity record watermark must be a non-negative integer")},"checkPosition");class I{static{r(this,"ReceiveLoop")}#o;#v;#c;#f;#u;#n;#l=new d(o);#i;#s=new Map;#r=new Set;#h=new Set;#m=!1;#t=!1;#a=null;#d=[];constructor(t){this.#o=t.authorityId,this.#v=t.store,this.#c=t.authority,this.#u=t.onError,this.#f={store:t.store,authority:t.authority,run:r(e=>this.#l.run(e),"run"),onInboxCommitted:r(()=>{try{t.onInboxCommitted()}catch(e){this.#u(e)}},"onInboxCommitted")},this.#n=new y(t.schedule),this.#i=new n(t.authorityId,null,!0);for(const e of t.channels)this.#w(e).held=!0}start(){this.#m=!0,this.#d=[this.#c.onAvailable(t=>this.ring(t)),this.#c.onDisconnect(()=>{if(!this.#t)for(const t of this.#y())this.#p(t)})];for(const t of this.#y())this.#e(t)}ring(t){if(t.entityId!==null){const e=this.#s.get(t.entityId);e&&this.#e(e)}else t.authorityId===this.#o&&this.#e(this.#i)}hold(t){if(this.#t)return;const e=this.#w(t);e.held||(e.held=!0,this.#e(e))}release(t){const e=this.#s.get(t);e&&(e.held=!1,this.#I(e))}async receiveThrough(t){a(t),await this.#g(this.#i,t)}async receiveCurrent(){if(this.#t)throw o();const t=this.#i.wait(null);this.#e(this.#i),await t}async receiveEntityThrough(t,e){if(a(e),this.#t)throw o();await this.#g(this.#w(t),e)}async coverReceipts(t){const e=await this.#l.run(()=>this.#v.readReceipts(this.#o,t)),s=await Promise.allSettled([this.receiveThrough(e.delivery),...e.entities.map(({entityId:i,globalSequence:c})=>this.receiveEntityThrough(i,c))]);for(const i of s)if(i.status==="rejected")throw i.reason}async stop(){this.#t=!0,this.#n.cancel();for(const t of this.#d)t();this.#d=[],await Promise.allSettled([this.#a,this.#l.stop()]);for(const t of this.#y())t.stop(o())}#y(){return[this.#i,...this.#s.values()]}#w(t){let e=this.#s.get(t);return e||this.#s.set(t,e=new n(t,t,!1)),e}#g(t,e){if(this.#t)return Promise.reject(o());if(t.covers(e))return Promise.resolve();const s=t.wait(e);return this.#e(t),s}#e(t){this.#t||this.#h.has(t)||(this.#r.add(t),this.#b())}#p(t){this.#r.delete(t),this.#h.add(t),this.#n.arm(()=>{const e=[...this.#h];this.#h.clear();for(const s of e)this.#e(s)})}#I(t){t.needed||t.entityId===null||(this.#s.delete(t.entityId),this.#r.delete(t),this.#h.delete(t))}#b(){if(!this.#m||this.#t||this.#a)return;const t=this.#E();this.#a=t,t.then(()=>{this.#a=null,!this.#t&&(this.#r.size>0?this.#b():this.#h.size===0&&this.#n.succeeded())})}async#E(){for(let t=this.#k();t&&!this.#t;t=this.#k())await this.#P(t)}#k(){const[t]=this.#r;return t&&this.#r.delete(t),t}async#P(t){const e=t.beginTurn(),s=r(i=>t.observe(i),"observe");try{const i=t.entityId===null?await l(this.#f,this.#o,s):await u(this.#f,t.entityId,s);if(this.#t)return;i?this.#e(t):t.caughtUp(e)}catch(i){if(this.#t)return;t.failed(e,i),this.#p(t),this.#u(i)}finally{t.endTurn(),this.#I(t)}}}export{I as ReceiveLoop};
|
|
@@ -1,33 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* What one Receive turn reads: one page of one history after its durable
|
|
3
|
-
* cursor, committed in one Inbox transaction. Each page reports every cursor
|
|
4
|
-
* it observes, and answers whether it was full, so more may follow.
|
|
5
|
-
*
|
|
6
|
-
* Every effect a page starts goes through its owner's `run`, so once Receive
|
|
7
|
-
* stops a page starts nothing more and acts on no late answer. A page
|
|
8
|
-
* reports coverage before it rings the Inbox doorbell: a commit is durable
|
|
9
|
-
* whether or not anyone hears it.
|
|
10
|
-
*/
|
|
11
1
|
import type { EntityRecordAuthorityPort, EntityRecordStorePort, MaybePromise } from './rail-ports.js';
|
|
12
2
|
export declare const ENTITY_RECORD_DELIVERY_LIMIT = 256;
|
|
13
3
|
export interface ReceivePagePorts {
|
|
14
4
|
readonly store: EntityRecordStorePort;
|
|
15
5
|
readonly authority: EntityRecordAuthorityPort;
|
|
16
|
-
/** Start one effect for Receive: refused once Receive stops. */
|
|
17
6
|
readonly run: <T>(effect: () => MaybePromise<T>) => Promise<T>;
|
|
18
|
-
/** After each committed Inbox transaction. Never throws. */
|
|
19
7
|
readonly onInboxCommitted: () => void;
|
|
20
8
|
}
|
|
21
|
-
/** One page of this authority's delivery tail. A per-entity gap is repaired
|
|
22
|
-
* from that entity's own history before the delivery cursor advances. A
|
|
23
|
-
* computer with no basis for the authority follows nothing yet: its tail is
|
|
24
|
-
* caught up at no position. */
|
|
25
9
|
export declare function receiveTailPage(ports: ReceivePagePorts, authorityId: string, observe: (cursor: number) => void): Promise<boolean>;
|
|
26
|
-
/** One page of one entity's channel: its own dense history. The cursor is
|
|
27
|
-
* the Inbox cursor, so a page after it can never gap. An entity that is its
|
|
28
|
-
* own authority, a construct, is that authority's whole history, so its page
|
|
29
|
-
* is also the authority's complete delivery prefix and Apply's line starts
|
|
30
|
-
* there. Any other entity is one among many, and its page moves no authority
|
|
31
|
-
* position. */
|
|
32
10
|
export declare function receiveEntityPage(ports: ReceivePagePorts, entityId: string, observe: (cursor: number) => void): Promise<boolean>;
|
|
33
|
-
//# sourceMappingURL=receive-pages.d.ts.map
|
|
@@ -1,98 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* What one Receive turn reads: one page of one history after its durable
|
|
3
|
-
* cursor, committed in one Inbox transaction. Each page reports every cursor
|
|
4
|
-
* it observes, and answers whether it was full, so more may follow.
|
|
5
|
-
*
|
|
6
|
-
* Every effect a page starts goes through its owner's `run`, so once Receive
|
|
7
|
-
* stops a page starts nothing more and acts on no late answer. A page
|
|
8
|
-
* reports coverage before it rings the Inbox doorbell: a commit is durable
|
|
9
|
-
* whether or not anyone hears it.
|
|
10
|
-
*/
|
|
11
|
-
import { failure } from '../faults/need.js';
|
|
12
|
-
export const ENTITY_RECORD_DELIVERY_LIMIT = 256;
|
|
13
|
-
/** A per-entity gap that stays is our own contradiction: the authority
|
|
14
|
-
* delivered past a sequence its own history does not hold. */
|
|
15
|
-
function gapped(message, trigger, gap, deliveries) {
|
|
16
|
-
return failure(message, 'invariant-broken', trigger, entity(gap.entityId, deliveries), String(gap.after + 1));
|
|
17
|
-
}
|
|
18
|
-
function entity(entityId, deliveries) {
|
|
19
|
-
const delivered = deliveries.find(({ record }) => record.entityId === entityId);
|
|
20
|
-
return { id: entityId, type: delivered?.record.change.result.type ?? null };
|
|
21
|
-
}
|
|
22
|
-
/** One page of this authority's delivery tail. A per-entity gap is repaired
|
|
23
|
-
* from that entity's own history before the delivery cursor advances. A
|
|
24
|
-
* computer with no basis for the authority follows nothing yet: its tail is
|
|
25
|
-
* caught up at no position. */
|
|
26
|
-
export async function receiveTailPage(ports, authorityId, observe) {
|
|
27
|
-
const { store, authority, run } = ports;
|
|
28
|
-
const after = await run(() => store.readDeliveryCursor(authorityId));
|
|
29
|
-
if (after === null)
|
|
30
|
-
return false;
|
|
31
|
-
observe(after);
|
|
32
|
-
const deliveries = await run(() => authority.subscribe({
|
|
33
|
-
authorityId,
|
|
34
|
-
afterDeliverySequence: after,
|
|
35
|
-
limit: ENTITY_RECORD_DELIVERY_LIMIT,
|
|
36
|
-
}));
|
|
37
|
-
if (deliveries.length === 0)
|
|
38
|
-
return false;
|
|
39
|
-
let stored = await run(() => store.receive({ authorityId, deliveries, advanceDeliveryCursor: true }));
|
|
40
|
-
if (stored.kind === 'gap') {
|
|
41
|
-
const { gap } = stored;
|
|
42
|
-
const missing = await run(() => authority.backfill({
|
|
43
|
-
authorityId,
|
|
44
|
-
entityId: gap.entityId,
|
|
45
|
-
afterGlobalSequence: gap.after,
|
|
46
|
-
throughGlobalSequence: gap.received,
|
|
47
|
-
}));
|
|
48
|
-
if (missing.length === 0) {
|
|
49
|
-
throw gapped(`entity ${gap.entityId} is missing sequence ${gap.after + 1}`, 'backfill-empty', gap, deliveries);
|
|
50
|
-
}
|
|
51
|
-
const repaired = await run(() => store.receive({ authorityId, deliveries: missing, advanceDeliveryCursor: false }));
|
|
52
|
-
if (repaired.kind === 'gap') {
|
|
53
|
-
throw gapped(`entity ${repaired.gap.entityId} history remained gapped after backfill`, 'gap-after-backfill', repaired.gap, [...missing, ...deliveries]);
|
|
54
|
-
}
|
|
55
|
-
ports.onInboxCommitted();
|
|
56
|
-
stored = await run(() => store.receive({ authorityId, deliveries, advanceDeliveryCursor: true }));
|
|
57
|
-
if (stored.kind === 'gap') {
|
|
58
|
-
throw gapped(`entity ${stored.gap.entityId} history did not reach ${stored.gap.received}`, 'gap-after-repair', stored.gap, deliveries);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
observe(stored.deliveryCursor);
|
|
62
|
-
ports.onInboxCommitted();
|
|
63
|
-
return deliveries.length === ENTITY_RECORD_DELIVERY_LIMIT;
|
|
64
|
-
}
|
|
65
|
-
/** One page of one entity's channel: its own dense history. The cursor is
|
|
66
|
-
* the Inbox cursor, so a page after it can never gap. An entity that is its
|
|
67
|
-
* own authority, a construct, is that authority's whole history, so its page
|
|
68
|
-
* is also the authority's complete delivery prefix and Apply's line starts
|
|
69
|
-
* there. Any other entity is one among many, and its page moves no authority
|
|
70
|
-
* position. */
|
|
71
|
-
export async function receiveEntityPage(ports, entityId, observe) {
|
|
72
|
-
const { store, authority, run } = ports;
|
|
73
|
-
const after = await run(() => store.readEntityCursor(entityId));
|
|
74
|
-
observe(after);
|
|
75
|
-
const deliveries = await run(() => authority.subscribeEntity({
|
|
76
|
-
entityId,
|
|
77
|
-
afterGlobalSequence: after,
|
|
78
|
-
limit: ENTITY_RECORD_DELIVERY_LIMIT,
|
|
79
|
-
}));
|
|
80
|
-
if (deliveries.length === 0)
|
|
81
|
-
return false;
|
|
82
|
-
if (deliveries.some((delivery) => delivery.record.entityId !== entityId)) {
|
|
83
|
-
throw failure(`entity channel ${entityId} delivered another entity's record`, 'invariant-broken', 'channel-crossed', { id: entityId, type: null });
|
|
84
|
-
}
|
|
85
|
-
const { authorityId } = deliveries[0].record;
|
|
86
|
-
const stored = await run(() => store.receive({
|
|
87
|
-
authorityId,
|
|
88
|
-
deliveries,
|
|
89
|
-
advanceDeliveryCursor: authorityId === entityId,
|
|
90
|
-
}));
|
|
91
|
-
if (stored.kind === 'gap') {
|
|
92
|
-
throw gapped(`entity ${entityId} is missing sequence ${stored.gap.after + 1}`, 'channel-gap', stored.gap, deliveries);
|
|
93
|
-
}
|
|
94
|
-
observe(deliveries[deliveries.length - 1].record.globalSequence);
|
|
95
|
-
ports.onInboxCommitted();
|
|
96
|
-
return deliveries.length === ENTITY_RECORD_DELIVERY_LIMIT;
|
|
97
|
-
}
|
|
98
|
-
//# sourceMappingURL=receive-pages.js.map
|
|
1
|
+
var y=Object.defineProperty;var d=(t,e)=>y(t,"name",{value:e,configurable:!0});import{failure as v}from"../faults/need.js";const u=256;function g(t,e,a,i){return v(t,"invariant-broken",e,h(a.entityId,i),String(a.after+1))}d(g,"gapped");function h(t,e){const a=e.find(({record:i})=>i.entityId===t);return{id:t,type:a?.record.change.result.type??null}}d(h,"entity");async function w(t,e,a){const{store:i,authority:f,run:o}=t,l=await o(()=>i.readDeliveryCursor(e));if(l===null)return!1;a(l);const r=await o(()=>f.subscribe({authorityId:e,afterDeliverySequence:l,limit:u}));if(r.length===0)return!1;let n=await o(()=>i.receive({authorityId:e,deliveries:r,advanceDeliveryCursor:!0}));if(n.kind==="gap"){const{gap:c}=n,s=await o(()=>f.backfill({authorityId:e,entityId:c.entityId,afterGlobalSequence:c.after,throughGlobalSequence:c.received}));if(s.length===0)throw g(`entity ${c.entityId} is missing sequence ${c.after+1}`,"backfill-empty",c,r);const p=await o(()=>i.receive({authorityId:e,deliveries:s,advanceDeliveryCursor:!1}));if(p.kind==="gap")throw g(`entity ${p.gap.entityId} history remained gapped after backfill`,"gap-after-backfill",p.gap,[...s,...r]);if(t.onInboxCommitted(),n=await o(()=>i.receive({authorityId:e,deliveries:r,advanceDeliveryCursor:!0})),n.kind==="gap")throw g(`entity ${n.gap.entityId} history did not reach ${n.gap.received}`,"gap-after-repair",n.gap,r)}return a(n.deliveryCursor),t.onInboxCommitted(),r.length===u}d(w,"receiveTailPage");async function C(t,e,a){const{store:i,authority:f,run:o}=t,l=await o(()=>i.readEntityCursor(e));a(l);const r=await o(()=>f.subscribeEntity({entityId:e,afterGlobalSequence:l,limit:u}));if(r.length===0)return!1;if(r.some(s=>s.record.entityId!==e))throw v(`entity channel ${e} delivered another entity's record`,"invariant-broken","channel-crossed",{id:e,type:null});const{authorityId:n}=r[0].record,c=await o(()=>i.receive({authorityId:n,deliveries:r,advanceDeliveryCursor:n===e}));if(c.kind==="gap")throw g(`entity ${e} is missing sequence ${c.gap.after+1}`,"channel-gap",c.gap,r);return a(r[r.length-1].record.globalSequence),t.onInboxCommitted(),r.length===u}d(C,"receiveEntityPage");export{u as ENTITY_RECORD_DELIVERY_LIMIT,C as receiveEntityPage,w as receiveTailPage};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
/** One loop's backoff: doubling from one second to thirty, jittered, forever. */
|
|
2
1
|
import type { EntityRecordSchedulePort } from './rail-ports.js';
|
|
3
2
|
export declare const ENTITY_RECORD_RETRY_BASE_MS = 1000;
|
|
4
3
|
export declare const ENTITY_RECORD_RETRY_MAX_MS = 30000;
|
|
5
|
-
/** Armed means its loop is paused until the timer fires. */
|
|
6
4
|
export declare class RetryClock {
|
|
7
5
|
#private;
|
|
8
6
|
constructor(schedule: EntityRecordSchedulePort);
|
|
@@ -11,4 +9,3 @@ export declare class RetryClock {
|
|
|
11
9
|
cancel(): void;
|
|
12
10
|
succeeded(): void;
|
|
13
11
|
}
|
|
14
|
-
//# sourceMappingURL=retry-clock.d.ts.map
|
|
@@ -1,35 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export const ENTITY_RECORD_RETRY_BASE_MS = 1_000;
|
|
3
|
-
export const ENTITY_RECORD_RETRY_MAX_MS = 30_000;
|
|
4
|
-
/** Armed means its loop is paused until the timer fires. */
|
|
5
|
-
export class RetryClock {
|
|
6
|
-
#schedule;
|
|
7
|
-
#attempt = 0;
|
|
8
|
-
#timer = null;
|
|
9
|
-
constructor(schedule) {
|
|
10
|
-
this.#schedule = schedule;
|
|
11
|
-
}
|
|
12
|
-
get armed() {
|
|
13
|
-
return this.#timer !== null;
|
|
14
|
-
}
|
|
15
|
-
arm(callback) {
|
|
16
|
-
if (this.#timer)
|
|
17
|
-
return;
|
|
18
|
-
const base = Math.min(ENTITY_RECORD_RETRY_MAX_MS, ENTITY_RECORD_RETRY_BASE_MS * (2 ** Math.min(this.#attempt, 16)));
|
|
19
|
-
const random = Math.max(0, Math.min(1, this.#schedule.random()));
|
|
20
|
-
const delay = Math.round(base * (0.5 + random));
|
|
21
|
-
this.#attempt += 1;
|
|
22
|
-
this.#timer = this.#schedule.schedule(delay, () => {
|
|
23
|
-
this.#timer = null;
|
|
24
|
-
callback();
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
cancel() {
|
|
28
|
-
this.#timer?.cancel();
|
|
29
|
-
this.#timer = null;
|
|
30
|
-
}
|
|
31
|
-
succeeded() {
|
|
32
|
-
this.#attempt = 0;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=retry-clock.js.map
|
|
1
|
+
var c=Object.defineProperty;var e=(s,t)=>c(s,"name",{value:t,configurable:!0});const R=1e3,a=3e4;class r{static{e(this,"RetryClock")}#s;#e=0;#t=null;constructor(t){this.#s=t}get armed(){return this.#t!==null}arm(t){if(this.#t)return;const n=Math.min(3e4,1e3*2**Math.min(this.#e,16)),h=Math.max(0,Math.min(1,this.#s.random())),_=Math.round(n*(.5+h));this.#e+=1,this.#t=this.#s.schedule(_,()=>{this.#t=null,t()})}cancel(){this.#t?.cancel(),this.#t=null}succeeded(){this.#e=0}}export{R as ENTITY_RECORD_RETRY_BASE_MS,a as ENTITY_RECORD_RETRY_MAX_MS,r as RetryClock};
|
|
@@ -1,65 +1,20 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The pure laws of one Send batch: which rows it offers, and which answer
|
|
3
|
-
* may stamp them.
|
|
4
|
-
*
|
|
5
|
-
* Within each authority, a computer's first acceptances form a prefix of its
|
|
6
|
-
* immutable local record order; retries return existing acceptances and may
|
|
7
|
-
* only extend that prefix. A batch therefore offers one consecutive prefix
|
|
8
|
-
* that begins at the oldest unstamped row, and only an answer that accepts
|
|
9
|
-
* a leading part of exactly what it offered may stamp anything. The one
|
|
10
|
-
* exception is a line paused over the storage limit, which offers the rows
|
|
11
|
-
* that free storage ahead of its head (send-freeing.ts): one in-order batch
|
|
12
|
-
* of them, each entity still in local order.
|
|
13
|
-
*/
|
|
14
1
|
import { type RecoveryNeed, type RecoverySubject } from '../faults/need.js';
|
|
15
2
|
import type { EntityRecordBatchReply, EntityRecordRefusal, EntityRecordStamp, EntityRecordSubmission, PendingEntityRecord } from './rail-ports.js';
|
|
16
|
-
/** Rows one batch may offer. */
|
|
17
3
|
export declare const ENTITY_RECORD_BATCH_ROWS = 256;
|
|
18
|
-
/** Frame body bytes one batch may carry. One row always fits: a row is at
|
|
19
|
-
* most one batch, its declared heads riding inline only while it stays one
|
|
20
|
-
* (send-preparation.ts). */
|
|
21
4
|
export declare const ENTITY_RECORD_BATCH_BYTES: number;
|
|
22
|
-
/** The refusal that names a first row whose cargo the authority lacks. */
|
|
23
5
|
export declare const ENTITY_RECORD_CARGO_MISSING = "entity_record_cargo_missing";
|
|
24
|
-
/** The refusal that names a first row adding bytes to a person's Files past
|
|
25
|
-
* their plan. The authority rings its storage bell when that may change, so
|
|
26
|
-
* Send pauses on it instead of retrying. */
|
|
27
6
|
export declare const ENTITY_RECORD_OVER_STORAGE_LIMIT = "files_over_storage_limit";
|
|
28
|
-
/** Whether the row only moves its entity to the Trash or deletes it: a row
|
|
29
|
-
* that frees storage, which a line paused over the limit still sends. */
|
|
30
7
|
export declare function freesStorage(row: PendingEntityRecord): boolean;
|
|
31
|
-
/** A row whose exact submission is ready, and its exact frame body bytes. */
|
|
32
8
|
export interface PreparedEntityRecord {
|
|
33
9
|
readonly row: PendingEntityRecord;
|
|
34
10
|
readonly submission: EntityRecordSubmission;
|
|
35
11
|
readonly bytes: number;
|
|
36
12
|
}
|
|
37
|
-
/**
|
|
38
|
-
* The batch Send offers now: the head and the consecutive rows after it
|
|
39
|
-
* that are already prepared, in local order, ending at the first unready
|
|
40
|
-
* row, an authority change, or a batch bound. A one-row batch is a batch.
|
|
41
|
-
* Nothing waits to fill it.
|
|
42
|
-
*/
|
|
43
13
|
export declare function selectBatch(rows: readonly PendingEntityRecord[], prepared: (row: PendingEntityRecord) => PreparedEntityRecord | null): readonly PreparedEntityRecord[];
|
|
44
|
-
/** The authority committed nothing past an accepted prefix and named why.
|
|
45
|
-
* The same bytes get the same answer on every offer, so a refusal under any
|
|
46
|
-
* code but access or plan states a `record-refused` need on its entity. */
|
|
47
14
|
export declare class EntityRecordRefusedError extends Error {
|
|
48
15
|
readonly code: string;
|
|
49
16
|
readonly mutationId: string;
|
|
50
17
|
readonly need: RecoveryNeed | null;
|
|
51
18
|
constructor(mutationId: string, refusal: EntityRecordRefusal, subject?: RecoverySubject | null);
|
|
52
19
|
}
|
|
53
|
-
/**
|
|
54
|
-
* Prove a committed answer against what was offered and return the stamps
|
|
55
|
-
* it earns. The answer must accept a leading part of the offered rows, in
|
|
56
|
-
* order, each with its exact local bytes; a refusal names the first row it
|
|
57
|
-
* left out, and an answer without one accepts every row. Each entity's
|
|
58
|
-
* sequences rise along the batch, and so do delivery positions, because one
|
|
59
|
-
* computer's acceptances follow its local order; a row that frees storage
|
|
60
|
-
* may hold an older position, since a paused line sent it ahead of the rows
|
|
61
|
-
* before it (send-freeing.ts) and its answer may have been lost. Anything
|
|
62
|
-
* else proves nothing and stamps nothing.
|
|
63
|
-
*/
|
|
64
20
|
export declare function acceptedPrefix(offered: readonly PendingEntityRecord[], reply: EntityRecordBatchReply): readonly EntityRecordStamp[];
|
|
65
|
-
//# sourceMappingURL=send-batch.d.ts.map
|