@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,411 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Send is one line per Outbox. It awaits one batch attempt at a time. Each
|
|
3
|
-
* attempt offers one bounded consecutive prefix beginning at the oldest
|
|
4
|
-
* durably unstamped row, in local record order, and stamps exactly the
|
|
5
|
-
* prefix the authority's committed answer accepted, in one local
|
|
6
|
-
* transaction, before the line moves on. Nothing is offered until the store
|
|
7
|
-
* says the whole prefix survives power loss: the authority never holds a
|
|
8
|
-
* record this computer could forget.
|
|
9
|
-
*
|
|
10
|
-
* A lost answer, a malformed one, or a failed stamp proves nothing: the line
|
|
11
|
-
* retries from the oldest unstamped row under the same mutation identities,
|
|
12
|
-
* forever, on one backoff. A refusal stamps what came before it and waits on
|
|
13
|
-
* that backoff with the refused row at the head.
|
|
14
|
-
*
|
|
15
|
-
* One refusal pauses instead: over the storage limit. The authority rings
|
|
16
|
-
* when the person's storage or plan changes, so the line holds its head,
|
|
17
|
-
* prepares nothing, arms no backoff and reports the refusal once. The bell,
|
|
18
|
-
* or a dropped wire (the authority listens per connection), resumes it; a
|
|
19
|
-
* settle that owes the paused head answers the refusal at once. While it is
|
|
20
|
-
* paused the line still offers the rows that free storage, ahead of the
|
|
21
|
-
* head, because a person gets back under the limit by deleting
|
|
22
|
-
* (send-freeing.ts). Those stamps are not a prefix, so they never move the
|
|
23
|
-
* line's own stamped mark. The Trash of the refused upload cannot go ahead
|
|
24
|
-
* of it: the line offers its head once more with every row through it,
|
|
25
|
-
* since the authority does not count an upload the same offer moves to the
|
|
26
|
-
* Trash. A paused head reaches once, until a bell, and an offer that stays
|
|
27
|
-
* refused is not reported again. A failed offer of those rows waits on the
|
|
28
|
-
* backoff.
|
|
29
|
-
*
|
|
30
|
-
* Rows an unanswered offer may have delivered are uncertain, and so is
|
|
31
|
-
* every row pending when the line starts: an earlier lifetime may have
|
|
32
|
-
* offered it. Only a stamp settles uncertainty, because an earlier offer may
|
|
33
|
-
* still commit after any later answer.
|
|
34
|
-
*
|
|
35
|
-
* An uncertain row is offered bare: by its record bytes alone, with no cargo
|
|
36
|
-
* preparation. The authority answers a row it already holds from those
|
|
37
|
-
* bytes, newly accepts one whose cargo is already sealed or which carries
|
|
38
|
-
* none, and refuses the first row whose cargo it lacks as missing. Every
|
|
39
|
-
* offer begins at the oldest unstamped row, so that refusal shows the
|
|
40
|
-
* authority lacked the refused row and every row after it when it decided,
|
|
41
|
-
* and Send offers their cargo next. It proves absence only at that decision:
|
|
42
|
-
* an earlier offer may still commit, so after any failure every uncertain
|
|
43
|
-
* row is offered bare again, on the same backoff.
|
|
44
|
-
*
|
|
45
|
-
* A settle owes the prefix of the Outbox it reads when it is called, and
|
|
46
|
-
* the line registers that obligation before anything yields. While a prefix
|
|
47
|
-
* is owed, every attempt the line starts, for a settle or in the background,
|
|
48
|
-
* admits rows to preparation and to its offer only up to the oldest prefix
|
|
49
|
-
* still owed, and preparation inside it keeps its bounds. No later row can
|
|
50
|
-
* then hold a cargo operation, prepared bytes, a sealing or a refusal that
|
|
51
|
-
* the owed rows must wait for. An attempt whose rows were all read before a
|
|
52
|
-
* settle registered holds only rows that settle owes, because that settle's
|
|
53
|
-
* read comes after.
|
|
54
|
-
*
|
|
55
|
-
* Start's read of the saved Outbox completes before Send acts on anything,
|
|
56
|
-
* and stop joins every read and attempt the line started. Until that read
|
|
57
|
-
* answers, every pending row is uncertain.
|
|
58
|
-
*/
|
|
59
|
-
import { OwnedEffects } from './owned-effects.js';
|
|
60
|
-
import { RetryClock } from './retry-clock.js';
|
|
61
|
-
import { ENTITY_RECORD_CARGO_MISSING, ENTITY_RECORD_OVER_STORAGE_LIMIT, EntityRecordRefusedError, acceptedPrefix, selectBatch, } from './send-batch.js';
|
|
62
|
-
import { FreeingScan } from './send-freeing.js';
|
|
63
|
-
import { ENTITY_RECORD_LOOKAHEAD_ROWS, SendPreparation } from './send-preparation.js';
|
|
64
|
-
const IDLE = Object.freeze({ progressed: false, failure: null });
|
|
65
|
-
const sendStopped = () => new Error('entity record Send stopped before stamping the rows it owes');
|
|
66
|
-
export class SendLine {
|
|
67
|
-
#store;
|
|
68
|
-
#authority;
|
|
69
|
-
#preparation;
|
|
70
|
-
#retry;
|
|
71
|
-
#reads = new OwnedEffects(sendStopped);
|
|
72
|
-
#onStamped;
|
|
73
|
-
#onError;
|
|
74
|
-
/** Start's read of the saved Outbox. Every other operation waits for it. */
|
|
75
|
-
#starting = null;
|
|
76
|
-
#started = false;
|
|
77
|
-
#stopped = false;
|
|
78
|
-
#needsSend = false;
|
|
79
|
-
/** The refusal the line is paused on, until the authority rings. */
|
|
80
|
-
#paused = null;
|
|
81
|
-
/** What the pause has judged of the rows that may still go. */
|
|
82
|
-
#freeing = null;
|
|
83
|
-
/** A row the next head offer waits to carry, or 0. */
|
|
84
|
-
#reach = 0;
|
|
85
|
-
/** Whether the paused head has reached since the last bell. */
|
|
86
|
-
#reached = false;
|
|
87
|
-
/** Bells heard. One heard while an attempt was in flight may answer the
|
|
88
|
-
* refusal that attempt ends in, so that refusal does not pause. */
|
|
89
|
-
#bells = 0;
|
|
90
|
-
#stopListening = [];
|
|
91
|
-
/** The loop that attempts batches while the line has work. Never rejects. */
|
|
92
|
-
#driving = null;
|
|
93
|
-
/** The one attempt in flight. Never rejects. */
|
|
94
|
-
#attempt = null;
|
|
95
|
-
/** The prefix each unfinished settle owes, in the order they registered.
|
|
96
|
-
* Each never rejects: a settle whose read failed owes nothing. */
|
|
97
|
-
#owed = new Set();
|
|
98
|
-
/** Pending rows at or before it may already be held by the authority. An
|
|
99
|
-
* unanswered offer raises it, and nothing lowers it. */
|
|
100
|
-
#uncertainThrough = 0;
|
|
101
|
-
/** Pending rows at or before it are offered bare. Every failure raises it
|
|
102
|
-
* to the uncertain mark; a bare row refused as missing cargo lowers it to
|
|
103
|
-
* just before that row. */
|
|
104
|
-
#bareThrough = 0;
|
|
105
|
-
#stamped = 0;
|
|
106
|
-
/** The newest row this line stamped. The line stamps only consecutive
|
|
107
|
-
* prefixes of the Outbox, so every row at or before it is stamped. */
|
|
108
|
-
#stampedThrough = 0;
|
|
109
|
-
constructor(options) {
|
|
110
|
-
this.#store = options.store;
|
|
111
|
-
this.#authority = options.authority;
|
|
112
|
-
this.#onStamped = options.onStamped;
|
|
113
|
-
this.#onError = options.onError;
|
|
114
|
-
this.#preparation = new SendPreparation(options.cargo, options.onError);
|
|
115
|
-
this.#retry = new RetryClock(options.schedule);
|
|
116
|
-
}
|
|
117
|
-
/** Rows stamped since the line started. */
|
|
118
|
-
get stamped() {
|
|
119
|
-
return this.#stamped;
|
|
120
|
-
}
|
|
121
|
-
/** Pending rows at or before this local sequence may already be held by
|
|
122
|
-
* the authority. Undefined until start has read the saved Outbox: then any
|
|
123
|
-
* pending row may be. */
|
|
124
|
-
get uncertainThrough() {
|
|
125
|
-
return this.#started ? this.#uncertainThrough : undefined;
|
|
126
|
-
}
|
|
127
|
-
/** Why the line is paused, or null while it sends. */
|
|
128
|
-
get paused() {
|
|
129
|
-
return this.#paused;
|
|
130
|
-
}
|
|
131
|
-
/** Inherit every row already saved as uncertain, then begin. */
|
|
132
|
-
start() {
|
|
133
|
-
if (!this.#starting) {
|
|
134
|
-
const resume = () => this.resume();
|
|
135
|
-
this.#stopListening = [this.#authority.onStorageChanged(resume), this.#authority.onDisconnect(resume)];
|
|
136
|
-
}
|
|
137
|
-
this.#starting ??= this.#reads.run(() => this.#store.readLocalSequence()).then((saved) => {
|
|
138
|
-
this.#uncertainThrough = this.#bareThrough = saved;
|
|
139
|
-
this.#started = true;
|
|
140
|
-
this.wake();
|
|
141
|
-
});
|
|
142
|
-
return this.#starting;
|
|
143
|
-
}
|
|
144
|
-
/** The authority rang: offer the paused head again. */
|
|
145
|
-
resume() {
|
|
146
|
-
this.#bells += 1;
|
|
147
|
-
this.#reached = false;
|
|
148
|
-
if (!this.#paused)
|
|
149
|
-
return;
|
|
150
|
-
this.#paused = null;
|
|
151
|
-
this.#freeing = null;
|
|
152
|
-
this.wake();
|
|
153
|
-
}
|
|
154
|
-
/** New local work, or an elapsed backoff. A wake never shortens a waiting
|
|
155
|
-
* head's backoff: that head is unchanged. */
|
|
156
|
-
wake() {
|
|
157
|
-
if (this.#stopped)
|
|
158
|
-
return;
|
|
159
|
-
this.#needsSend = true;
|
|
160
|
-
this.#kick();
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* Finite: the rows the Outbox holds when it is invoked, a prefix of the
|
|
164
|
-
* line, read before it waits on anything; resolves with the newest local
|
|
165
|
-
* sequence among them. Until it finishes, no attempt prepares or offers a
|
|
166
|
-
* row past the oldest prefix still owed. It joins the attempt in flight
|
|
167
|
-
* and attempts a head it owes at once. It fails only while a row it owes
|
|
168
|
-
* stays unstamped after the attempt that offered it failed, or the line
|
|
169
|
-
* stops first; later rows belong to the background line, and their
|
|
170
|
-
* failures never answer it. Once this line has stamped through the prefix,
|
|
171
|
-
* nothing is owed, however late a read answers.
|
|
172
|
-
*/
|
|
173
|
-
async settle() {
|
|
174
|
-
if (!this.#starting)
|
|
175
|
-
throw new Error('entity record Send has not started');
|
|
176
|
-
const boundary = this.#reads.run(() => this.#store.readLocalSequence());
|
|
177
|
-
const owed = boundary.catch(() => 0);
|
|
178
|
-
this.#owed.add(owed);
|
|
179
|
-
try {
|
|
180
|
-
const [, through] = await Promise.all([this.#starting, boundary]);
|
|
181
|
-
let failure = null;
|
|
182
|
-
while (this.#stampedThrough < through) {
|
|
183
|
-
const [head] = await this.#reads.run(() => this.#store.readPending(1));
|
|
184
|
-
if (!head || head.localSequence > through)
|
|
185
|
-
break;
|
|
186
|
-
// A read invoked before this line stamped its head may answer after.
|
|
187
|
-
if (head.localSequence <= this.#stampedThrough)
|
|
188
|
-
continue;
|
|
189
|
-
if (failure)
|
|
190
|
-
throw failure.error;
|
|
191
|
-
if (this.#paused)
|
|
192
|
-
throw this.#paused;
|
|
193
|
-
({ failure } = await (this.#attempt ?? this.#begin()));
|
|
194
|
-
}
|
|
195
|
-
return through;
|
|
196
|
-
}
|
|
197
|
-
finally {
|
|
198
|
-
this.#owed.delete(owed);
|
|
199
|
-
this.wake();
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
/** Admit nothing more now, and resolve once start, every read, the attempt
|
|
203
|
-
* in flight, and every cargo read have settled. */
|
|
204
|
-
async stop() {
|
|
205
|
-
this.#stopped = true;
|
|
206
|
-
this.#retry.cancel();
|
|
207
|
-
for (const stopListening of this.#stopListening)
|
|
208
|
-
stopListening();
|
|
209
|
-
await Promise.allSettled([
|
|
210
|
-
this.#starting,
|
|
211
|
-
this.#driving,
|
|
212
|
-
this.#attempt,
|
|
213
|
-
this.#preparation.stop(),
|
|
214
|
-
this.#reads.stop(),
|
|
215
|
-
]);
|
|
216
|
-
}
|
|
217
|
-
#kick() {
|
|
218
|
-
if (!this.#started || this.#stopped || this.#retry.armed || this.#driving)
|
|
219
|
-
return;
|
|
220
|
-
const driving = this.#drive();
|
|
221
|
-
this.#driving = driving;
|
|
222
|
-
void driving.then(() => {
|
|
223
|
-
this.#driving = null;
|
|
224
|
-
if (this.#needsSend)
|
|
225
|
-
this.#kick();
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
|
-
async #drive() {
|
|
229
|
-
while (!this.#stopped && this.#needsSend && !this.#retry.armed) {
|
|
230
|
-
this.#needsSend = false;
|
|
231
|
-
const outcome = await (this.#attempt ?? this.#begin());
|
|
232
|
-
// A failed attempt armed the backoff, which wakes the line again, or
|
|
233
|
-
// paused it until the authority rings.
|
|
234
|
-
if (outcome.failure)
|
|
235
|
-
return;
|
|
236
|
-
if (outcome.progressed)
|
|
237
|
-
this.#needsSend = true;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
#begin() {
|
|
241
|
-
this.#retry.cancel();
|
|
242
|
-
const attempt = this.#freeing ? this.#free(this.#freeing) : this.#run();
|
|
243
|
-
this.#attempt = attempt;
|
|
244
|
-
void attempt.then(() => {
|
|
245
|
-
if (this.#attempt === attempt)
|
|
246
|
-
this.#attempt = null;
|
|
247
|
-
});
|
|
248
|
-
return attempt;
|
|
249
|
-
}
|
|
250
|
-
async #run() {
|
|
251
|
-
let offered = [];
|
|
252
|
-
let stamped = 0;
|
|
253
|
-
const bells = this.#bells;
|
|
254
|
-
const reach = this.#reach;
|
|
255
|
-
this.#reach = 0;
|
|
256
|
-
try {
|
|
257
|
-
const pending = await this.#reads.run(() => this.#store.readPending(ENTITY_RECORD_LOOKAHEAD_ROWS));
|
|
258
|
-
const cutoff = await this.#oldestOwed();
|
|
259
|
-
const window = pending.filter((row) => row.localSequence <= cutoff);
|
|
260
|
-
const bare = this.#bareThrough;
|
|
261
|
-
this.#preparation.retain(window, bare);
|
|
262
|
-
const head = window[0];
|
|
263
|
-
if (!head)
|
|
264
|
-
return IDLE;
|
|
265
|
-
await this.#preparation.head(head);
|
|
266
|
-
// Carry the row this offer reaches for, as far as the bounds allow.
|
|
267
|
-
if (reach > 0)
|
|
268
|
-
await this.#preparation.settledThrough(reach);
|
|
269
|
-
if (this.#stopped)
|
|
270
|
-
return IDLE;
|
|
271
|
-
const batch = selectBatch(window, (row) => this.#preparation.prepared(row));
|
|
272
|
-
// Not yet offered: a failure or a stop here leaves these rows exactly
|
|
273
|
-
// as certain as they were.
|
|
274
|
-
await this.#reads.run(() => this.#store.durableThrough(batch[batch.length - 1].row.localSequence));
|
|
275
|
-
offered = batch;
|
|
276
|
-
const reply = await this.#authority.submit(offered.map(({ submission }) => submission));
|
|
277
|
-
const stamps = acceptedPrefix(offered.map(({ row }) => row), reply);
|
|
278
|
-
if (stamps.length > 0) {
|
|
279
|
-
await this.#store.stampAccepted(stamps);
|
|
280
|
-
stamped = stamps.length;
|
|
281
|
-
this.#settled(stamps, true);
|
|
282
|
-
this.#retry.succeeded();
|
|
283
|
-
this.#reached = false;
|
|
284
|
-
}
|
|
285
|
-
if (reply.refusal) {
|
|
286
|
-
const refused = offered[stamped].row;
|
|
287
|
-
if (refused.localSequence > bare || reply.refusal.code !== ENTITY_RECORD_CARGO_MISSING) {
|
|
288
|
-
this.#preparation.forget([refused]);
|
|
289
|
-
throw new EntityRecordRefusedError(refused.record.mutationId, reply.refusal, { id: refused.record.entityId, type: refused.record.change.result.type });
|
|
290
|
-
}
|
|
291
|
-
// Absent at this decision: offer this row's cargo, and its successors', next.
|
|
292
|
-
this.#bareThrough = refused.localSequence - 1;
|
|
293
|
-
}
|
|
294
|
-
return { progressed: true, failure: null };
|
|
295
|
-
}
|
|
296
|
-
catch (error) {
|
|
297
|
-
// Only a committed answer settles an offer. Without one, every row it
|
|
298
|
-
// offered and did not stamp may already be held by the authority.
|
|
299
|
-
if (!(error instanceof EntityRecordRefusedError) && offered.length > stamped) {
|
|
300
|
-
this.#uncertainThrough = Math.max(this.#uncertainThrough, offered[offered.length - 1].row.localSequence);
|
|
301
|
-
}
|
|
302
|
-
this.#bareThrough = this.#uncertainThrough;
|
|
303
|
-
// Only a committed answer spends a reach.
|
|
304
|
-
if (!(error instanceof EntityRecordRefusedError))
|
|
305
|
-
this.#reach ||= reach;
|
|
306
|
-
if (!this.#stopped) {
|
|
307
|
-
const over = error instanceof EntityRecordRefusedError && error.code === ENTITY_RECORD_OVER_STORAGE_LIMIT;
|
|
308
|
-
// A bell heard while this attempt was in flight may answer it.
|
|
309
|
-
const pausing = over && this.#bells === bells;
|
|
310
|
-
if (pausing) {
|
|
311
|
-
this.#paused = error;
|
|
312
|
-
this.#freeing = new FreeingScan(this.#reached);
|
|
313
|
-
this.#preparation.retain([], this.#bareThrough);
|
|
314
|
-
}
|
|
315
|
-
// Paused, offer what frees storage next; else the head again.
|
|
316
|
-
if (over)
|
|
317
|
-
this.#needsSend = true;
|
|
318
|
-
else
|
|
319
|
-
this.#retry.arm(() => this.wake());
|
|
320
|
-
// A head still refused with the row it reached for was reported.
|
|
321
|
-
if (!(pausing && reach > 0))
|
|
322
|
-
this.#onError(error);
|
|
323
|
-
}
|
|
324
|
-
return { progressed: stamped > 0, failure: { error } };
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
/** One offer of the rows that free storage while the line is paused, or
|
|
328
|
-
* the head's offer once more, to carry a freeing row that cannot go ahead.
|
|
329
|
-
* A refused row stays behind the head, reported once. A failure arms the
|
|
330
|
-
* backoff and answers no settle: no settle owes these rows ahead of the
|
|
331
|
-
* head. */
|
|
332
|
-
async #free(scan) {
|
|
333
|
-
let offered = [];
|
|
334
|
-
let stamped = 0;
|
|
335
|
-
try {
|
|
336
|
-
while (scan.wanting) {
|
|
337
|
-
const page = await this.#reads.run(() => this.#store.readPending(ENTITY_RECORD_LOOKAHEAD_ROWS, scan.after));
|
|
338
|
-
scan.judge(page);
|
|
339
|
-
if (page.length < ENTITY_RECORD_LOOKAHEAD_ROWS)
|
|
340
|
-
break;
|
|
341
|
-
}
|
|
342
|
-
if (scan.reach !== null) {
|
|
343
|
-
this.#paused = null;
|
|
344
|
-
this.#freeing = null;
|
|
345
|
-
this.#reach = scan.reach;
|
|
346
|
-
this.#reached = true;
|
|
347
|
-
return { progressed: true, failure: null };
|
|
348
|
-
}
|
|
349
|
-
const batch = scan.offer();
|
|
350
|
-
if (batch.length === 0 || this.#stopped)
|
|
351
|
-
return IDLE;
|
|
352
|
-
await this.#reads.run(() => this.#store.durableThrough(batch[batch.length - 1].row.localSequence));
|
|
353
|
-
offered = batch;
|
|
354
|
-
const reply = await this.#authority.submit(offered.map(({ submission }) => submission));
|
|
355
|
-
const stamps = acceptedPrefix(offered.map(({ row }) => row), reply);
|
|
356
|
-
if (stamps.length > 0) {
|
|
357
|
-
await this.#store.stampAccepted(stamps);
|
|
358
|
-
stamped = stamps.length;
|
|
359
|
-
scan.stamped(stamps);
|
|
360
|
-
this.#settled(stamps, false);
|
|
361
|
-
}
|
|
362
|
-
if (reply.refusal) {
|
|
363
|
-
// The refused row stays behind the head; the rows after it may go.
|
|
364
|
-
const refused = offered[stamped].row;
|
|
365
|
-
scan.refused();
|
|
366
|
-
this.#onError(new EntityRecordRefusedError(refused.record.mutationId, reply.refusal, { id: refused.record.entityId, type: refused.record.change.result.type }));
|
|
367
|
-
}
|
|
368
|
-
return { progressed: stamped > 0 || reply.refusal !== null, failure: null };
|
|
369
|
-
}
|
|
370
|
-
catch (error) {
|
|
371
|
-
if (offered.length > stamped) {
|
|
372
|
-
this.#uncertainThrough = Math.max(this.#uncertainThrough, offered[offered.length - 1].row.localSequence);
|
|
373
|
-
}
|
|
374
|
-
this.#bareThrough = this.#uncertainThrough;
|
|
375
|
-
if (!this.#stopped) {
|
|
376
|
-
this.#retry.arm(() => this.wake());
|
|
377
|
-
this.#onError(error);
|
|
378
|
-
}
|
|
379
|
-
return IDLE;
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
/** The oldest prefix a settle registered by now still owes, or Infinity.
|
|
383
|
-
* Prefixes rise in the order settles register, so the oldest one still
|
|
384
|
-
* owed bounds every later one: it waits only for reads registered before
|
|
385
|
-
* that one answers. A settle registered later reads after this window did,
|
|
386
|
-
* so it owes every row in it. */
|
|
387
|
-
async #oldestOwed() {
|
|
388
|
-
for (const owed of [...this.#owed]) {
|
|
389
|
-
const through = await owed;
|
|
390
|
-
if (through > this.#stampedThrough)
|
|
391
|
-
return through;
|
|
392
|
-
}
|
|
393
|
-
return Number.POSITIVE_INFINITY;
|
|
394
|
-
}
|
|
395
|
-
/** Stamps are durable. Nothing after them may turn their rows back into
|
|
396
|
-
* failed offers: a failing listener is only reported. Only a prefix moves
|
|
397
|
-
* the stamped mark. */
|
|
398
|
-
#settled(stamps, prefix) {
|
|
399
|
-
this.#stamped += stamps.length;
|
|
400
|
-
if (prefix)
|
|
401
|
-
this.#stampedThrough = Math.max(this.#stampedThrough, stamps[stamps.length - 1].row.localSequence);
|
|
402
|
-
this.#preparation.forget(stamps.map(({ row }) => row));
|
|
403
|
-
try {
|
|
404
|
-
this.#onStamped(stamps);
|
|
405
|
-
}
|
|
406
|
-
catch (error) {
|
|
407
|
-
this.#onError(error);
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
//# sourceMappingURL=send-line.js.map
|
|
1
|
+
var y=Object.defineProperty;var d=(p,t)=>y(p,"name",{value:t,configurable:!0});import{OwnedEffects as E}from"./owned-effects.js";import{RetryClock as b}from"./retry-clock.js";import{ENTITY_RECORD_CARGO_MISSING as I,ENTITY_RECORD_OVER_STORAGE_LIMIT as T,EntityRecordRefusedError as o,acceptedPrefix as S,selectBatch as O}from"./send-batch.js";import{FreeingScan as R}from"./send-freeing.js";import{ENTITY_RECORD_LOOKAHEAD_ROWS as w,SendPreparation as k}from"./send-preparation.js";const f=Object.freeze({progressed:!1,failure:null}),q=d(()=>new Error("entity record Send stopped before stamping the rows it owes"),"sendStopped");class C{static{d(this,"SendLine")}#t;#c;#e;#s;#i=new E(q);#I;#d;#a=null;#y=!1;#r=!1;#o=!1;#n=null;#w=null;#f=null;#p=0;#m=!1;#E=0;#T=[];#S=null;#l=null;#b=new Set;#h=0;#u=0;#O=0;#g=0;constructor(t){this.#t=t.store,this.#c=t.authority,this.#I=t.onStamped,this.#d=t.onError,this.#e=new k(t.cargo,t.onError),this.#s=new b(t.schedule)}get stamped(){return this.#O}get uncertainThrough(){return this.#y?this.#h:void 0}get paused(){return this.#n}get held(){return this.#w}start(){if(!this.#a){const t=d(()=>this.resume(),"resume");this.#T=[this.#c.onStorageChanged(t),this.#c.onDisconnect(t)]}return this.#a??=this.#i.run(()=>this.#t.readLocalSequence()).then(t=>{this.#h=this.#u=t,this.#y=!0,this.wake()}),this.#a}resume(){this.#E+=1,this.#m=!1,this.#n&&(this.#n=null,this.#f=null,this.wake())}wake(){this.#r||(this.#o=!0,this.#R())}async settle(){if(!this.#a)throw new Error("entity record Send has not started");const t=this.#i.run(()=>this.#t.readLocalSequence()),e=t.catch(()=>0);this.#b.add(e);try{const[,h]=await Promise.all([this.#a,t]);let r=null;for(;this.#g<h;){const[i]=await this.#i.run(()=>this.#t.readPending(1));if(!i||i.localSequence>h)break;if(!(i.localSequence<=this.#g)){if(r)throw r.error;if(this.#n)throw this.#n;({failure:r}=await(this.#l??this.#k()))}}return h}finally{this.#b.delete(e),this.wake()}}async stop(){this.#r=!0,this.#s.cancel();for(const t of this.#T)t();await Promise.allSettled([this.#a,this.#S,this.#l,this.#e.stop(),this.#i.stop()])}#R(){if(!this.#y||this.#r||this.#s.armed||this.#S)return;const t=this.#_();this.#S=t,t.then(()=>{this.#S=null,this.#o&&this.#R()})}async#_(){for(;!this.#r&&this.#o&&!this.#s.armed;){this.#o=!1;const t=await(this.#l??this.#k());if(t.failure)return;t.progressed&&(this.#o=!0)}}#k(){this.#s.cancel();const t=this.#f?this.#L(this.#f):this.#P();return this.#l=t,t.then(()=>{this.#l===t&&(this.#l=null)}),t}async#P(){let t=[],e=0;const h=this.#E,r=this.#p;this.#p=0;try{const i=await this.#i.run(()=>this.#t.readPending(w));i.length===0&&(this.#w=null);const a=await this.#N(),s=i.filter(n=>n.localSequence<=a),l=this.#u;this.#e.retain(s,l);const m=s[0];if(!m||(await this.#e.head(m),r>0&&await this.#e.settledThrough(r),this.#r))return f;const g=O(s,n=>this.#e.prepared(n));await this.#i.run(()=>this.#t.durableThrough(g[g.length-1].row.localSequence)),t=g;const u=await this.#c.submit(t.map(({submission:n})=>n)),c=S(t.map(({row:n})=>n),u);if(c.length>0&&(await this.#t.stampAccepted(c),e=c.length,this.#w=null,this.#q(c,!0),this.#s.succeeded(),this.#m=!1),u.refusal){const n=t[e].row;if(n.localSequence>l||u.refusal.code!==I)throw this.#e.forget([n]),new o(n.record.mutationId,u.refusal,{id:n.record.entityId,type:n.record.change.result.type});this.#u=n.localSequence-1}return{progressed:!0,failure:null}}catch(i){if(!(i instanceof o)&&t.length>e&&(this.#h=Math.max(this.#h,t[t.length-1].row.localSequence)),this.#u=this.#h,i instanceof o?this.#w=i:this.#p||=r,!this.#r){const a=i instanceof o&&i.code===T,s=a&&this.#E===h;s&&(this.#n=i,this.#f=new R(this.#m,l=>this.#i.run(()=>this.#t.readPackagePage(l))),this.#e.retain([],this.#u)),a?this.#o=!0:this.#s.arm(()=>this.wake()),s&&r>0||this.#d(i)}return{progressed:e>0,failure:{error:i}}}}async#L(t){let e=[],h=0;try{for(;t.wanting;){const s=await this.#i.run(()=>this.#t.readPending(w,t.after));if(await t.judge(s),s.length<w)break}if(t.reach!==null)return this.#n=null,this.#f=null,this.#p=t.reach,this.#m=!0,{progressed:!0,failure:null};const r=t.offer();if(r.length===0||this.#r)return f;await this.#i.run(()=>this.#t.durableThrough(r[r.length-1].row.localSequence)),e=r;const i=await this.#c.submit(e.map(({submission:s})=>s)),a=S(e.map(({row:s})=>s),i);if(a.length>0&&(await this.#t.stampAccepted(a),h=a.length,t.stamped(a),this.#q(a,!1)),i.refusal){const s=e[h].row;t.refused(),this.#d(new o(s.record.mutationId,i.refusal,{id:s.record.entityId,type:s.record.change.result.type}))}return{progressed:h>0||i.refusal!==null,failure:null}}catch(r){return e.length>h&&(this.#h=Math.max(this.#h,e[e.length-1].row.localSequence)),this.#u=this.#h,this.#r||(this.#s.arm(()=>this.wake()),this.#d(r)),f}}async#N(){for(const t of[...this.#b]){const e=await t;if(e>this.#g)return e}return Number.POSITIVE_INFINITY}#q(t,e){this.#O+=t.length,e&&(this.#g=Math.max(this.#g,t[t.length-1].row.localSequence)),this.#e.forget(t.map(({row:h})=>h));try{this.#I(t)}catch(h){this.#d(h)}}}export{C as SendLine};
|
|
@@ -1,54 +1,15 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Preparation makes rows ready to offer: each row's exact record bytes and
|
|
3
|
-
* whatever cargo travels inside the frame.
|
|
4
|
-
*
|
|
5
|
-
* Three bounds hold at every admission: how many rows it looks ahead, how
|
|
6
|
-
* many bytes it retains, and how many cargo reads run together. Rows reserve
|
|
7
|
-
* in Outbox order, before any cargo is read, at the most their submission
|
|
8
|
-
* could weigh: a row is at most one batch, so its declared heads add inline
|
|
9
|
-
* artifacts only while it stays one, however many heads it declares (a
|
|
10
|
-
* package declares one per page). A ready row keeps only what it holds. A
|
|
11
|
-
* later row never starts before an earlier one, and the head is first to any
|
|
12
|
-
* capacity: it reclaims the bytes of later rows that are ready, newest first,
|
|
13
|
-
* while a read in flight stays charged until it settles. One batch fits the
|
|
14
|
-
* byte bound, so the head always becomes ready and no admission exceeds a
|
|
15
|
-
* bound.
|
|
16
|
-
*
|
|
17
|
-
* A row the line offers bare, and a row with no cargo, requires no cargo
|
|
18
|
-
* preparation: it is ready at once and charged its record bytes, inside the
|
|
19
|
-
* same bounds. Whether a row carries cargo is part of its preparation, so a
|
|
20
|
-
* bare preparation is never offered as one that carries cargo.
|
|
21
|
-
*/
|
|
22
1
|
import type { EntityRecordCargoPort, PendingEntityRecord } from './rail-ports.js';
|
|
23
2
|
import { type PreparedEntityRecord } from './send-batch.js';
|
|
24
|
-
/** Pending rows Send reads and prepares ahead of the line. */
|
|
25
3
|
export declare const ENTITY_RECORD_LOOKAHEAD_ROWS = 512;
|
|
26
|
-
/** Bytes prepared rows retain, including rows an unanswered attempt offered.
|
|
27
|
-
* At least one batch, so the head always fits. */
|
|
28
4
|
export declare const ENTITY_RECORD_PREPARED_BYTES: number;
|
|
29
|
-
/** Cargo reads in flight at once. */
|
|
30
5
|
export declare const ENTITY_RECORD_CARGO_READS = 4;
|
|
31
6
|
export declare class SendPreparation {
|
|
32
7
|
#private;
|
|
33
8
|
constructor(cargo: EntityRecordCargoPort, onError: (error: unknown) => void);
|
|
34
|
-
/** Prepare exactly this lookahead, oldest first, offering the rows at or
|
|
35
|
-
* before `bareThrough` bare; release rows it lacks or prepared otherwise. */
|
|
36
9
|
retain(window: readonly PendingEntityRecord[], bareThrough: number): void;
|
|
37
|
-
/** Release rows the line is done with: stamped rows, and a refused row,
|
|
38
|
-
* which prepares again when it is next the head. */
|
|
39
10
|
forget(rows: readonly PendingEntityRecord[]): void;
|
|
40
11
|
prepared(row: PendingEntityRecord): PreparedEntityRecord | null;
|
|
41
|
-
/** The head, ready to offer, once capacity admits it. A head whose
|
|
42
|
-
* preparation failed prepares again; this attempt fails with that
|
|
43
|
-
* preparation's failure. */
|
|
44
12
|
head(row: PendingEntityRecord): Promise<PreparedEntityRecord>;
|
|
45
|
-
/** Once every lookahead row at or before `localSequence` that the bounds
|
|
46
|
-
* admit has settled, ready or failed: an offer meant to carry that row
|
|
47
|
-
* waits for the rows before it. A row a settling read admits joins. */
|
|
48
13
|
settledThrough(localSequence: number): Promise<void>;
|
|
49
|
-
/** Admit nothing more from now: a reserved row whose cargo read has not
|
|
50
|
-
* started never starts it. Release everything, and resolve once every
|
|
51
|
-
* cargo read in flight has settled. */
|
|
52
14
|
stop(): Promise<void>;
|
|
53
15
|
}
|
|
54
|
-
//# sourceMappingURL=send-preparation.d.ts.map
|