@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,49 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* A repository's Git directory for usage: what a person sees is its current
|
|
4
|
-
* Git directory, so that is what counts. Its objects are every pack the
|
|
5
|
-
* current state needs, each once; its files are the current copy of each
|
|
6
|
-
* Git-directory file (index, refs, reflogs, COMMIT_EDITMSG and the rest).
|
|
7
|
-
* The copies older states carried are version history and count nowhere.
|
|
8
|
-
*
|
|
9
|
-
* The walk is a receiver's (src/git/chain.ts), back from the current
|
|
10
|
-
* artifact along its parents, reading heads alone. A pack is thin against
|
|
11
|
-
* its parent's roots, and compaction is not built, so packs count back to
|
|
12
|
-
* the first whole one, a first artifact's or one thin against nothing. An
|
|
13
|
-
* artifact carries only the files its parent's state lacks, so each current
|
|
14
|
-
* file is sized from the artifact that carried it, as far back as the walk
|
|
15
|
-
* must go to find it. Every artifact names one parent, a played line's
|
|
16
|
-
* too, so the walk never reads a sibling.
|
|
17
|
-
*/
|
|
18
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.filesUsageGitArtifact = void 0;
|
|
20
|
-
exports.filesUsageGitDirectory = filesUsageGitDirectory;
|
|
21
|
-
const state_js_1 = require("../git/state.js");
|
|
22
|
-
const filesUsageGitArtifact = ({ parent, excludes, packLength, blobLengths }) => ({ parent, whole: excludes.length === 0, packLength, blobLengths });
|
|
23
|
-
exports.filesUsageGitArtifact = filesUsageGitArtifact;
|
|
24
|
-
/** The Git directory `current` stands for. `read` answers an artifact's head
|
|
25
|
-
* by its transport version. An artifact the walk needs and cannot find, or a
|
|
26
|
-
* current file no artifact carried, is the authority's fault and throws. */
|
|
27
|
-
async function filesUsageGitDirectory(current, head, read) {
|
|
28
|
-
const unsized = (0, state_js_1.gitBlobs)(head.state);
|
|
29
|
-
const chain = [];
|
|
30
|
-
let bytes = 0;
|
|
31
|
-
let packs = true;
|
|
32
|
-
for (let at = current; at !== null && (packs || unsized.size > 0);) {
|
|
33
|
-
const artifact = chain.length === 0 ? (0, exports.filesUsageGitArtifact)(head) : await read(at);
|
|
34
|
-
chain.push(at);
|
|
35
|
-
if (packs)
|
|
36
|
-
bytes += artifact.packLength;
|
|
37
|
-
packs &&= !artifact.whole;
|
|
38
|
-
for (const [oid, length] of artifact.blobLengths) {
|
|
39
|
-
if (unsized.delete(oid))
|
|
40
|
-
bytes += length;
|
|
41
|
-
}
|
|
42
|
-
at = artifact.parent;
|
|
43
|
-
}
|
|
44
|
-
if (unsized.size > 0) {
|
|
45
|
-
throw new Error(`repository artifact ${current} names ${unsized.size} Git-directory files no artifact on its chain carries`);
|
|
46
|
-
}
|
|
47
|
-
return { bytes, chain };
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=usage-chain.js.map
|
|
1
|
+
"use strict";var h=Object.defineProperty;var f=(t,e)=>h(t,"name",{value:e,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.filesUsageGitArtifact=void 0,exports.filesUsageGitDirectory=G;const u=require("../git/state.js"),y=f(({parent:t,excludes:e,packLength:a,blobLengths:i})=>({parent:t,whole:e.length===0,packLength:a,blobLengths:i}),"filesUsageGitArtifact");exports.filesUsageGitArtifact=y;async function G(t,e,a){const i=(0,u.gitBlobs)(e.state),o=[];let c=0,n=!0;for(let s=t;s!==null&&(n||i.size>0);){const r=o.length===0?(0,exports.filesUsageGitArtifact)(e):await a(s);o.push(s),n&&(c+=r.packLength),n&&=!r.whole;for(const[l,g]of r.blobLengths)i.delete(l)&&(c+=g);s=r.parent}if(i.size>0)throw new Error(`repository artifact ${t} names ${i.size} Git-directory files no artifact on its chain carries`);return{bytes:c,chain:o}}f(G,"filesUsageGitDirectory");
|
|
@@ -1,34 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FILES_USAGE_NOTHING = void 0;
|
|
4
|
-
exports.filesUsageHolding = filesUsageHolding;
|
|
5
|
-
exports.filesUsageEffect = filesUsageEffect;
|
|
6
|
-
const usage_js_1 = require("./usage.js");
|
|
7
|
-
exports.FILES_USAGE_NOTHING = Object.freeze({ usedBytes: 0, trashBytes: 0 });
|
|
8
|
-
const RANK = { active: 0, trashed: 1, deleted: 2 };
|
|
9
|
-
const stricter = (left, right) => (RANK[left] >= RANK[right] ? left : right);
|
|
10
|
-
/**
|
|
11
|
-
* What an entity with this lifecycle, holding `ownBytes` itself, holds with
|
|
12
|
-
* everything beneath it. `beneath` is the sum of each child's own holding,
|
|
13
|
-
* read with the child's own status. Active keeps both as they are; Trash
|
|
14
|
-
* turns everything into Trash; deleted holds nothing.
|
|
15
|
-
*/
|
|
16
|
-
function filesUsageHolding(lifecycle, ownBytes, beneath) {
|
|
17
|
-
if (lifecycle === 'deleted')
|
|
18
|
-
return exports.FILES_USAGE_NOTHING;
|
|
19
|
-
if (lifecycle === 'trashed') {
|
|
20
|
-
return { usedBytes: 0, trashBytes: ownBytes + beneath.usedBytes + beneath.trashBytes };
|
|
21
|
-
}
|
|
22
|
-
return { usedBytes: ownBytes + beneath.usedBytes, trashBytes: beneath.trashBytes };
|
|
23
|
-
}
|
|
24
|
-
/** The change one accepted record makes to `usedBytes` and `trashBytes`:
|
|
25
|
-
* bytes added are positive, bytes released are negative. */
|
|
26
|
-
function filesUsageEffect(change) {
|
|
27
|
-
const { base, result, held, inherited, beneath } = change;
|
|
28
|
-
const after = filesUsageHolding(stricter(result.status, inherited.result), (0, usage_js_1.filesUsageOwnBytes)(result, held.result), beneath);
|
|
29
|
-
if (base === null)
|
|
30
|
-
return after;
|
|
31
|
-
const before = filesUsageHolding(stricter(base.status, inherited.base), (0, usage_js_1.filesUsageOwnBytes)(base, held.base), beneath);
|
|
32
|
-
return { usedBytes: after.usedBytes - before.usedBytes, trashBytes: after.trashBytes - before.trashBytes };
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=usage-effect.js.map
|
|
1
|
+
"use strict";var c=Object.defineProperty;var r=(s,e)=>c(s,"name",{value:e,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.FILES_USAGE_NOTHING=void 0,exports.filesUsageHolding=a,exports.filesUsageEffect=o;const y=require("./usage.js");exports.FILES_USAGE_NOTHING=Object.freeze({usedBytes:0,trashBytes:0});const B={active:0,trashed:1,deleted:2},l=r((s,e)=>B[s]>=B[e]?s:e,"stricter");function a(s,e,t){return s==="deleted"?exports.FILES_USAGE_NOTHING:s==="trashed"?{usedBytes:0,trashBytes:e+t.usedBytes+t.trashBytes}:{usedBytes:e+t.usedBytes,trashBytes:t.trashBytes}}r(a,"filesUsageHolding");function o(s){const{base:e,result:t,held:d,inherited:i,beneath:n}=s,u=a(l(t.status,i.result),(0,y.filesUsageOwnBytes)(t,d.result),n);if(e===null)return u;const f=a(l(e.status,i.base),(0,y.filesUsageOwnBytes)(e,d.base),n);return{usedBytes:u.usedBytes-f.usedBytes,trashBytes:u.trashBytes-f.trashBytes}}r(o,"filesUsageEffect");
|
package/dist-cjs/files/usage.js
CHANGED
|
@@ -1,140 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FILES_USAGE_LARGEST = void 0;
|
|
4
|
-
exports.filesUsageHolds = filesUsageHolds;
|
|
5
|
-
exports.filesUsageKept = filesUsageKept;
|
|
6
|
-
exports.filesUsageInTrash = filesUsageInTrash;
|
|
7
|
-
exports.countFilesUsage = countFilesUsage;
|
|
8
|
-
exports.filesUsageOwnBytes = filesUsageOwnBytes;
|
|
9
|
-
const types_js_1 = require("../entities/types.js");
|
|
10
|
-
const units_js_1 = require("../entities/units.js");
|
|
11
|
-
const usage_categories_js_1 = require("./usage-categories.js");
|
|
12
|
-
/** How many of the largest items a count names. */
|
|
13
|
-
exports.FILES_USAGE_LARGEST = 50;
|
|
14
|
-
/** Whether the host must say what `record` holds: a repository's Git directory or a
|
|
15
|
-
* construct's payload, which its record does not carry. */
|
|
16
|
-
function filesUsageHolds(record) {
|
|
17
|
-
return record.status !== 'deleted' && (record.type === 'repo.git' || types_js_1.CONSTRUCT_TYPES.has(record.type));
|
|
18
|
-
}
|
|
19
|
-
/** The records the count keeps, active or in Trash: every one whose
|
|
20
|
-
* lifecycle, inherited down, is not deleted. A host reads what these hold,
|
|
21
|
-
* and only these. Each UUID once. */
|
|
22
|
-
function filesUsageKept(records) {
|
|
23
|
-
const byUuid = uniqueRecords(records);
|
|
24
|
-
const lifecycle = lifecycleOf(byUuid);
|
|
25
|
-
return [...byUuid.values()].filter((record) => lifecycle(record) !== 'deleted');
|
|
26
|
-
}
|
|
27
|
-
/** The UUIDs of `records` in Trash, their own or an ancestor's. A host
|
|
28
|
-
* keeps what these name stored apart from what is current. */
|
|
29
|
-
function filesUsageInTrash(records) {
|
|
30
|
-
const byUuid = uniqueRecords(records);
|
|
31
|
-
const lifecycle = lifecycleOf(byUuid);
|
|
32
|
-
return new Set([...byUuid.values()].filter((record) => lifecycle(record) === 'trashed').map(({ uuid }) => uuid));
|
|
33
|
-
}
|
|
34
|
-
function countFilesUsage(input) {
|
|
35
|
-
const byUuid = uniqueRecords(input.records);
|
|
36
|
-
const lifecycle = lifecycleOf(byUuid);
|
|
37
|
-
const units = new Map();
|
|
38
|
-
const place = (uuid) => byUuid.get(uuid);
|
|
39
|
-
const items = new Map();
|
|
40
|
-
let trashBytes = 0;
|
|
41
|
-
for (const record of byUuid.values()) {
|
|
42
|
-
const status = lifecycle(record);
|
|
43
|
-
if (status === 'deleted')
|
|
44
|
-
continue;
|
|
45
|
-
const bytes = bytesOf(record, input.held.get(record.uuid) ?? null);
|
|
46
|
-
if (bytes === null)
|
|
47
|
-
continue;
|
|
48
|
-
if (status === 'trashed') {
|
|
49
|
-
trashBytes += bytes;
|
|
50
|
-
continue;
|
|
51
|
-
}
|
|
52
|
-
const unit = (0, units_js_1.unitOf)(record.uuid, place, units);
|
|
53
|
-
const owner = byUuid.get(unit);
|
|
54
|
-
const category = owner.type === 'repo.git' ? 'repos' : (0, usage_categories_js_1.filesUsageCategory)(record.type, record.name);
|
|
55
|
-
const item = items.get(unit) ?? { record: owner, category, bytes: 0 };
|
|
56
|
-
item.bytes += bytes;
|
|
57
|
-
items.set(unit, item);
|
|
58
|
-
}
|
|
59
|
-
const totals = new Map();
|
|
60
|
-
for (const id of usage_categories_js_1.FILES_USAGE_CATEGORIES)
|
|
61
|
-
if (id !== 'chats')
|
|
62
|
-
totals.set(id, { bytes: 0, items: 0 });
|
|
63
|
-
for (const { category, bytes } of items.values()) {
|
|
64
|
-
const total = totals.get(category);
|
|
65
|
-
total.bytes += bytes;
|
|
66
|
-
total.items += 1;
|
|
67
|
-
}
|
|
68
|
-
const attachments = input.chatAttachments;
|
|
69
|
-
if (attachments !== null)
|
|
70
|
-
totals.set('chats', { bytes: attachments.bytes, items: attachments.items });
|
|
71
|
-
const categories = usage_categories_js_1.FILES_USAGE_CATEGORIES.flatMap((id) => {
|
|
72
|
-
const total = totals.get(id);
|
|
73
|
-
return total ? [Object.freeze({ id, bytes: total.bytes, items: total.items })] : [];
|
|
74
|
-
});
|
|
75
|
-
const largest = [...items.values()]
|
|
76
|
-
.sort((left, right) => right.bytes - left.bytes || (left.record.uuid < right.record.uuid ? -1 : 1))
|
|
77
|
-
.slice(0, exports.FILES_USAGE_LARGEST)
|
|
78
|
-
.map(({ record, category, bytes }) => Object.freeze({ entityId: record.uuid, name: record.name, category, bytes }));
|
|
79
|
-
return Object.freeze({
|
|
80
|
-
usedBytes: categories.reduce((sum, { bytes }) => sum + bytes, 0),
|
|
81
|
-
categories: Object.freeze(categories),
|
|
82
|
-
trashBytes,
|
|
83
|
-
largest: Object.freeze(largest),
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
function uniqueRecords(records) {
|
|
87
|
-
const byUuid = new Map();
|
|
88
|
-
for (const record of records) {
|
|
89
|
-
if (byUuid.has(record.uuid))
|
|
90
|
-
throw new Error(`usage counts ${record.uuid} once; it was given twice`);
|
|
91
|
-
byUuid.set(record.uuid, record);
|
|
92
|
-
}
|
|
93
|
-
return byUuid;
|
|
94
|
-
}
|
|
95
|
-
/** What one record holds by itself, its descendants apart: a file its
|
|
96
|
-
* size (nothing before it has content), a repository or construct what the
|
|
97
|
-
* host says it holds, and anything else nothing. */
|
|
98
|
-
function filesUsageOwnBytes(record, held) {
|
|
99
|
-
return bytesOf(record, held) ?? 0;
|
|
100
|
-
}
|
|
101
|
-
/** What one current record holds, or null when its type holds nothing. */
|
|
102
|
-
function bytesOf(record, held) {
|
|
103
|
-
if (filesUsageHolds(record)) {
|
|
104
|
-
if (held === null)
|
|
105
|
-
throw new Error(`usage needs what ${record.type} ${record.uuid} holds; the host did not say`);
|
|
106
|
-
return held;
|
|
107
|
-
}
|
|
108
|
-
if (record.type === 'file.text' || record.type === 'file.binary')
|
|
109
|
-
return record.size ?? 0;
|
|
110
|
-
return null;
|
|
111
|
-
}
|
|
112
|
-
/** Lifecycle inherits down, remembered per UUID: deleted if the entity or any
|
|
113
|
-
* ancestor is, trashed if any is, otherwise active. An ancestor the records
|
|
114
|
-
* do not hold ends the walk. */
|
|
115
|
-
function lifecycleOf(byUuid) {
|
|
116
|
-
const known = new Map();
|
|
117
|
-
const rank = { active: 0, trashed: 1, deleted: 2 };
|
|
118
|
-
return (record) => {
|
|
119
|
-
const chain = [];
|
|
120
|
-
const passed = new Set();
|
|
121
|
-
let inherited = 'active';
|
|
122
|
-
for (let at = record; at && !passed.has(at.uuid);) {
|
|
123
|
-
const remembered = known.get(at.uuid);
|
|
124
|
-
if (remembered !== undefined) {
|
|
125
|
-
inherited = remembered;
|
|
126
|
-
break;
|
|
127
|
-
}
|
|
128
|
-
passed.add(at.uuid);
|
|
129
|
-
chain.push(at);
|
|
130
|
-
at = at.parentUUID === null ? undefined : byUuid.get(at.parentUUID);
|
|
131
|
-
}
|
|
132
|
-
for (const at of chain.reverse()) {
|
|
133
|
-
if (rank[at.status] > rank[inherited])
|
|
134
|
-
inherited = at.status;
|
|
135
|
-
known.set(at.uuid, inherited);
|
|
136
|
-
}
|
|
137
|
-
return known.get(record.uuid);
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
//# sourceMappingURL=usage.js.map
|
|
1
|
+
"use strict";var j=Object.defineProperty;var o=(t,n)=>j(t,"name",{value:n,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.FILES_USAGE_LARGEST=void 0,exports.filesUsageHolds=O,exports.filesUsageKept=M,exports.filesUsageInTrash=R,exports.countFilesUsage=z,exports.filesUsageOwnBytes=k;const L=require("../entities/types.js"),F=require("../entities/units.js"),p=require("./usage-categories.js");exports.FILES_USAGE_LARGEST=50;function O(t){return t.status!=="deleted"&&(t.type==="repo.git"||L.CONSTRUCT_TYPES.has(t.type))}o(O,"filesUsageHolds");function M(t){const n=S(t),c=E(n);return[...n.values()].filter(a=>c(a)!=="deleted")}o(M,"filesUsageKept");function R(t){const n=S(t),c=E(n);return new Set([...n.values()].filter(a=>c(a)==="trashed").map(({uuid:a})=>a))}o(R,"filesUsageInTrash");function z(t){const n=S(t.records),c=E(n),a=new Map,d=o(e=>n.get(e),"place"),r=C(n,t.changedAt),s=new Map;let i=0;for(const e of n.values()){const u=c(e);if(u==="deleted")continue;const f=I(e,t.held.get(e.uuid)??null);if(f===null)continue;if(u==="trashed"){i+=f;continue}const g=(0,F.unitOf)(e.uuid,d,a),b=n.get(g),T=b.type==="repo.git"?"repos":(0,p.filesUsageCategory)(e.type,e.name),y=s.get(g)??{record:b,category:T,bytes:0,changedAt:r(b)};y.bytes+=f;const U=r(e);U!==null&&(y.changedAt===null||U>y.changedAt)&&(y.changedAt=U),s.set(g,y)}const l=new Map;for(const e of p.FILES_USAGE_CATEGORIES)e!=="chats"&&l.set(e,{bytes:0,items:0});for(const{category:e,bytes:u}of s.values()){const f=l.get(e);f.bytes+=u,f.items+=1}const h=t.chatAttachments;h!==null&&l.set("chats",{bytes:h.bytes,items:h.items});const w=p.FILES_USAGE_CATEGORIES.flatMap(e=>{const u=l.get(e);return u?[Object.freeze({id:e,bytes:u.bytes,items:u.items})]:[]}),_=o((e,u)=>e.record.uuid<u.record.uuid?-1:1,"byUuidOrder"),m=[...s.values()],A=o(({record:e,category:u,bytes:f,changedAt:g})=>Object.freeze({entityId:e.uuid,name:e.name,category:u,bytes:f,changedAt:g===null?null:new Date(g).toISOString()}),"named"),G=[...m].sort((e,u)=>u.bytes-e.bytes||_(e,u)).slice(0,exports.FILES_USAGE_LARGEST).map(A),v=m.filter(({changedAt:e})=>e!==null).sort((e,u)=>u.changedAt-e.changedAt||_(e,u)).slice(0,exports.FILES_USAGE_LARGEST).map(A);return Object.freeze({usedBytes:w.reduce((e,{bytes:u})=>e+u,0),categories:Object.freeze(w),trashBytes:i,largest:Object.freeze(G),recent:Object.freeze(v)})}o(z,"countFilesUsage");function S(t){const n=new Map;for(const c of t){if(n.has(c.uuid))throw new Error(`usage counts ${c.uuid} once; it was given twice`);n.set(c.uuid,c)}return n}o(S,"uniqueRecords");function k(t,n){return I(t,n)??0}o(k,"filesUsageOwnBytes");function I(t,n){if(O(t)){if(n===null)throw new Error(`usage needs what ${t.type} ${t.uuid} holds; the host did not say`);return n}return t.type==="file.text"||t.type==="file.binary"?t.size??0:null}o(I,"bytesOf");function C(t,n){const c=new Map;return a=>{const d=[];let r=null;for(let s=a;s&&!d.includes(s);){const i=c.get(s.uuid);if(i!==void 0){r=i;break}d.push(s);const l=n.get(s.uuid);if(l!==void 0){r=l;break}s=s.parentUUID===null?void 0:t.get(s.parentUUID)}for(const s of d)c.set(s.uuid,r);return r}}o(C,"changedOf");function E(t){const n=new Map,c={active:0,trashed:1,deleted:2};return a=>{const d=[],r=new Set;let s="active";for(let i=a;i&&!r.has(i.uuid);){const l=n.get(i.uuid);if(l!==void 0){s=l;break}r.add(i.uuid),d.push(i),i=i.parentUUID===null?void 0:t.get(i.parentUUID)}for(const i of d.reverse())c[i.status]>c[s]&&(s=i.status),n.set(i.uuid,s);return n.get(a.uuid)}}o(E,"lifecycleOf");
|
|
@@ -1,84 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* `objects/info/alternates` names other object storage Git reads this
|
|
4
|
-
* repository's objects from, one path a line: `git clone --shared` writes
|
|
5
|
-
* it, and a second Git process on one disk reads it. It travels with the rest
|
|
6
|
-
* of the Git directory, with the one thing each machine places differently:
|
|
7
|
-
* where its ground stands. A line naming the ground holding the repository,
|
|
8
|
-
* or a place in it, travels as what follows the ground's path, after a NUL,
|
|
9
|
-
* and each machine writes its own ground's path back in front. Git reads no
|
|
10
|
-
* further than a file's first NUL, so no line Git reads begins with one; a
|
|
11
|
-
* line that does travels with a second NUL in front. Every other line
|
|
12
|
-
* travels as written.
|
|
13
|
-
*
|
|
14
|
-
* The storage a line names belongs to its own repository and travels with
|
|
15
|
-
* it. The borrower's pack leaves out what it borrows (`pack-objects
|
|
16
|
-
* --local`), so every machine reads borrowed objects where they are lent, as
|
|
17
|
-
* Git reads them here.
|
|
18
|
-
*/
|
|
19
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.GIT_ALTERNATES_PATH = void 0;
|
|
21
|
-
exports.portableGitAlternates = portableGitAlternates;
|
|
22
|
-
exports.localGitAlternates = localGitAlternates;
|
|
23
|
-
const bytes_js_1 = require("../entities/bytes.js");
|
|
24
|
-
exports.GIT_ALTERNATES_PATH = 'objects/info/alternates';
|
|
25
|
-
const NUL = 0;
|
|
26
|
-
const NEWLINE = 10;
|
|
27
|
-
const SLASH = 47;
|
|
28
|
-
const lines = (bytes) => {
|
|
29
|
-
const found = [];
|
|
30
|
-
let start = 0;
|
|
31
|
-
for (let at = 0; at <= bytes.length; at += 1) {
|
|
32
|
-
if (at === bytes.length || bytes[at] === NEWLINE) {
|
|
33
|
-
found.push(bytes.subarray(start, at));
|
|
34
|
-
start = at + 1;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return found;
|
|
38
|
-
};
|
|
39
|
-
const joined = (parts) => {
|
|
40
|
-
const out = new Uint8Array(parts.reduce((total, part) => total + part.length, Math.max(0, parts.length - 1)));
|
|
41
|
-
let at = 0;
|
|
42
|
-
for (const [index, part] of parts.entries()) {
|
|
43
|
-
if (index > 0)
|
|
44
|
-
out[at++] = NEWLINE;
|
|
45
|
-
out.set(part, at);
|
|
46
|
-
at += part.length;
|
|
47
|
-
}
|
|
48
|
-
return out;
|
|
49
|
-
};
|
|
50
|
-
const startsWith = (line, prefix) => line.length >= prefix.length && prefix.every((byte, at) => line[at] === byte);
|
|
51
|
-
const prefixed = (prefix, rest) => {
|
|
52
|
-
const out = new Uint8Array(prefix.length + rest.length);
|
|
53
|
-
out.set(prefix);
|
|
54
|
-
out.set(rest, prefix.length);
|
|
55
|
-
return out;
|
|
56
|
-
};
|
|
57
|
-
const MARK = new Uint8Array([NUL]);
|
|
58
|
-
/** The file as it travels, from the bytes standing here. `ground` is the real
|
|
59
|
-
* path of the ground holding the repository, or null when it stands in none. */
|
|
60
|
-
function portableGitAlternates(local, ground) {
|
|
61
|
-
const root = ground === null ? null : (0, bytes_js_1.utf8Encode)(ground);
|
|
62
|
-
return joined(lines(local).map(line => {
|
|
63
|
-
if (line[0] === NUL)
|
|
64
|
-
return prefixed(MARK, line);
|
|
65
|
-
if (root && startsWith(line, root) && (line.length === root.length || line[root.length] === SLASH)) {
|
|
66
|
-
return prefixed(MARK, line.subarray(root.length));
|
|
67
|
-
}
|
|
68
|
-
return line;
|
|
69
|
-
}));
|
|
70
|
-
}
|
|
71
|
-
/** The bytes to stand here, from the file as it travels. */
|
|
72
|
-
function localGitAlternates(portable, ground) {
|
|
73
|
-
const root = ground === null ? null : (0, bytes_js_1.utf8Encode)(ground);
|
|
74
|
-
return joined(lines(portable).map(line => {
|
|
75
|
-
if (line[0] !== NUL)
|
|
76
|
-
return line;
|
|
77
|
-
if (line[1] === NUL)
|
|
78
|
-
return line.subarray(1);
|
|
79
|
-
if (!root)
|
|
80
|
-
throw new Error(`${exports.GIT_ALTERNATES_PATH} names a place in its ground, and this repository stands in none`);
|
|
81
|
-
return prefixed(root, line.subarray(1));
|
|
82
|
-
}));
|
|
83
|
-
}
|
|
84
|
-
//# sourceMappingURL=alternates.js.map
|
|
1
|
+
"use strict";var f=Object.defineProperty;var o=(n,r)=>f(n,"name",{value:r,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.GIT_ALTERNATES_PATH=void 0,exports.portableGitAlternates=d,exports.localGitAlternates=E;const l=require("../entities/bytes.js");exports.GIT_ALTERNATES_PATH="objects/info/alternates";const a=0,c=10,g=47,h=o(n=>{const r=[];let e=0;for(let t=0;t<=n.length;t+=1)(t===n.length||n[t]===c)&&(r.push(n.subarray(e,t)),e=t+1);return r},"lines"),i=o(n=>{const r=new Uint8Array(n.reduce((t,s)=>t+s.length,Math.max(0,n.length-1)));let e=0;for(const[t,s]of n.entries())t>0&&(r[e++]=c),r.set(s,e),e+=s.length;return r},"joined"),T=o((n,r)=>n.length>=r.length&&r.every((e,t)=>n[t]===e),"startsWith"),u=o((n,r)=>{const e=new Uint8Array(n.length+r.length);return e.set(n),e.set(r,n.length),e},"prefixed"),A=new Uint8Array([a]);function d(n,r){const e=r===null?null:(0,l.utf8Encode)(r);return i(h(n).map(t=>t[0]===a?u(A,t):e&&T(t,e)&&(t.length===e.length||t[e.length]===g)?u(A,t.subarray(e.length)):t))}o(d,"portableGitAlternates");function E(n,r){const e=r===null?null:(0,l.utf8Encode)(r);return i(h(n).map(t=>{if(t[0]!==a)return t;if(t[1]===a)return t.subarray(1);if(!e)throw new Error(`${exports.GIT_ALTERNATES_PATH} names a place in its ground, and this repository stands in none`);return u(e,t.subarray(1))}))}o(E,"localGitAlternates");
|
package/dist-cjs/git/artifact.js
CHANGED
|
@@ -1,202 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* The one transport artifact for a repository record: its Git state, one Git
|
|
4
|
-
* pack, and the bytes of the Git-directory files its parent's state lacks.
|
|
5
|
-
*
|
|
6
|
-
* The pack holds what a second Git process on the same disk finds: what the
|
|
7
|
-
* objects one settled reading of the Git directory names reach (its refs,
|
|
8
|
-
* reflogs, index, and the root refs and a rebase's autostash, state.ts),
|
|
9
|
-
* packed by `git pack-objects --revs --thin` from those objects alone, except
|
|
10
|
-
* what the parent's roots already reach. Packing never reads the refs or the
|
|
11
|
-
* index again, so the pack and the state are one moment. The roots name that
|
|
12
|
-
* set as Git does: the objects refs, reflogs and root refs name, and each
|
|
13
|
-
* index entry's object, or the tree of the outermost folder holding it whose
|
|
14
|
-
* cache tree is valid, as `--indexed-objects` counts it. Git's own `index-pack
|
|
15
|
-
* --fix-thin` installs the pack once what the excluded roots reach stands on
|
|
16
|
-
* the receiver (chain.ts). Objects nothing names do not travel, as `git gc`
|
|
17
|
-
* keeps them no more than a clone carries them.
|
|
18
|
-
*
|
|
19
|
-
* A linked worktree keeps its objects in its main checkout's storage, so its
|
|
20
|
-
* pack is thin against that checkout's last recorded roots too (`shared`):
|
|
21
|
-
* what the main checkout's own artifacts carry never travels twice.
|
|
22
|
-
*
|
|
23
|
-
* A record states the change its sender made: from the state its sender
|
|
24
|
-
* showed (`basis`) to this one. That is its parent's state unless the
|
|
25
|
-
* sender's line moved past it (play.ts), and then the basis travels too: its
|
|
26
|
-
* files' bytes the parent lacks, and the objects its refs name in the pack.
|
|
27
|
-
*
|
|
28
|
-
* A repository its sender's Git cannot pack travels in byte form (state.ts):
|
|
29
|
-
* its storage's files are blobs like any other, and it carries no pack, names
|
|
30
|
-
* no roots and states no basis, so a receiver asks its Git nothing and the
|
|
31
|
-
* next state that travels as Git, thin against no roots, packs whole. A
|
|
32
|
-
* record in byte form replaces the line rather than plays (play.ts), so it
|
|
33
|
-
* needs no basis. A linked worktree whose main checkout Git cannot pack is
|
|
34
|
-
* sent the same way, with no pack and no roots; its state is the one it
|
|
35
|
-
* would have had.
|
|
36
|
-
*
|
|
37
|
-
* Layout: the 8-byte magic, a big-endian u32 header length, the header JSON,
|
|
38
|
-
* the pack, then each listed file's bytes in the header's order. Pack bytes
|
|
39
|
-
* are never re-encoded.
|
|
40
|
-
*/
|
|
41
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
exports.gitPackObjectCount = exports.gitAsksGit = exports.GIT_ARTIFACT_PREFIX = exports.gitTransportVersion = exports.gitBlobId = exports.GIT_ARTIFACT_CONTRACT = void 0;
|
|
43
|
-
exports.gitNewBlobs = gitNewBlobs;
|
|
44
|
-
exports.encodeGitArtifact = encodeGitArtifact;
|
|
45
|
-
exports.gitArtifactHeadLength = gitArtifactHeadLength;
|
|
46
|
-
exports.decodeGitArtifactHead = decodeGitArtifactHead;
|
|
47
|
-
exports.decodeGitArtifact = decodeGitArtifact;
|
|
48
|
-
const validate_js_1 = require("../contracts/validate.js");
|
|
49
|
-
const bytes_js_1 = require("../entities/bytes.js");
|
|
50
|
-
const state_js_1 = require("./state.js");
|
|
51
|
-
const text_js_1 = require("./text.js");
|
|
52
|
-
exports.GIT_ARTIFACT_CONTRACT = 'amalgm.git-artifact.v4';
|
|
53
|
-
const MAGIC = (0, bytes_js_1.utf8Encode)('AMGGIT04');
|
|
54
|
-
const PACK_SIGNATURE = (0, bytes_js_1.utf8Encode)('PACK');
|
|
55
|
-
/** The SHA-256 Git blob ID of a file's bytes. */
|
|
56
|
-
const gitBlobId = (bytes, sha256) => sha256(concat([(0, bytes_js_1.utf8Encode)(`blob ${bytes.length}\0`), bytes]));
|
|
57
|
-
exports.gitBlobId = gitBlobId;
|
|
58
|
-
/** The blobs an artifact names: the state's, and its basis's files'. The
|
|
59
|
-
* play reads a basis's files, never its index's bytes. */
|
|
60
|
-
const namedBlobs = (state, basis) => new Set([...(0, state_js_1.gitBlobs)(state), ...(basis?.files ?? []).flatMap(file => file.oid === null ? [] : [file.oid])]);
|
|
61
|
-
/** The blobs an artifact carries: those it names, less its parent's, sorted. */
|
|
62
|
-
function gitNewBlobs(state, basis, parent) {
|
|
63
|
-
const held = parent === null ? new Set() : (0, state_js_1.gitBlobs)(parent);
|
|
64
|
-
return [...namedBlobs(state, basis)].filter(oid => !held.has(oid)).sort(text_js_1.compareGitText);
|
|
65
|
-
}
|
|
66
|
-
function encodeGitArtifact(artifact) {
|
|
67
|
-
const blobs = [...artifact.blobs.keys()].sort(text_js_1.compareGitText);
|
|
68
|
-
const header = (0, bytes_js_1.utf8Encode)(JSON.stringify({
|
|
69
|
-
contract: exports.GIT_ARTIFACT_CONTRACT,
|
|
70
|
-
state: (0, state_js_1.gitStateJson)(artifact.state),
|
|
71
|
-
parent: artifact.parent,
|
|
72
|
-
basis: artifact.basis && (0, state_js_1.gitStateJson)(artifact.basis),
|
|
73
|
-
roots: artifact.roots,
|
|
74
|
-
excludes: artifact.excludes,
|
|
75
|
-
shared: artifact.shared,
|
|
76
|
-
pack: artifact.pack.length,
|
|
77
|
-
blobs: blobs.map(oid => [oid, artifact.blobs.get(oid).length]),
|
|
78
|
-
}));
|
|
79
|
-
const length = new Uint8Array(4);
|
|
80
|
-
new DataView(length.buffer).setUint32(0, header.length);
|
|
81
|
-
return concat([MAGIC, length, header, artifact.pack, ...blobs.map(oid => artifact.blobs.get(oid))]);
|
|
82
|
-
}
|
|
83
|
-
const gitTransportVersion = (bytes, sha256) => sha256(bytes);
|
|
84
|
-
exports.gitTransportVersion = gitTransportVersion;
|
|
85
|
-
const EXAMPLE = `AMGGIT04 <u32 length> { contract: "${exports.GIT_ARTIFACT_CONTRACT}", state, parent, basis, roots, excludes, shared, pack, blobs: [[<sha256>, <length>]] } <PACK> <bytes>`;
|
|
86
|
-
const sortedOids = (format, value) => Array.isArray(value)
|
|
87
|
-
&& value.every((oid, at) => (0, state_js_1.isGitOid)(format, oid) && (at === 0 || (0, text_js_1.compareGitText)(value[at - 1], oid) < 0));
|
|
88
|
-
const isLength = (value) => typeof value === 'number' && Number.isSafeInteger(value) && value >= 0;
|
|
89
|
-
/** How many leading bytes hold an artifact's head, read from its first
|
|
90
|
-
* GIT_ARTIFACT_PREFIX bytes; null when they are no artifact's. */
|
|
91
|
-
exports.GIT_ARTIFACT_PREFIX = MAGIC.length + 4;
|
|
92
|
-
function gitArtifactHeadLength(prefix) {
|
|
93
|
-
if (prefix.length < exports.GIT_ARTIFACT_PREFIX || !MAGIC.every((byte, at) => prefix[at] === byte))
|
|
94
|
-
return null;
|
|
95
|
-
return exports.GIT_ARTIFACT_PREFIX + new DataView(prefix.buffer, prefix.byteOffset, prefix.byteLength).getUint32(MAGIC.length);
|
|
96
|
-
}
|
|
97
|
-
function decodeHead(bytes) {
|
|
98
|
-
const bad = (problem) => (0, validate_js_1.failShape)(EXAMPLE, problem);
|
|
99
|
-
const end = gitArtifactHeadLength(bytes);
|
|
100
|
-
if (end === null)
|
|
101
|
-
return bad('the bytes do not start with the artifact magic');
|
|
102
|
-
if (end > bytes.length)
|
|
103
|
-
return bad('the header overruns the artifact');
|
|
104
|
-
let header;
|
|
105
|
-
try {
|
|
106
|
-
header = JSON.parse((0, bytes_js_1.utf8Decode)(bytes.subarray(exports.GIT_ARTIFACT_PREFIX, end)));
|
|
107
|
-
}
|
|
108
|
-
catch {
|
|
109
|
-
return bad('the header is not JSON');
|
|
110
|
-
}
|
|
111
|
-
if (!(0, validate_js_1.isRecord)(header) || header.contract !== exports.GIT_ARTIFACT_CONTRACT)
|
|
112
|
-
return bad(`the contract is not ${exports.GIT_ARTIFACT_CONTRACT}`);
|
|
113
|
-
const state = (0, state_js_1.checkGitState)(header.state);
|
|
114
|
-
if (!state.ok)
|
|
115
|
-
return state;
|
|
116
|
-
const { parent, roots, excludes, shared, pack, blobs } = header;
|
|
117
|
-
const format = state.value.format;
|
|
118
|
-
const basis = header.basis === null ? null : (0, state_js_1.checkGitState)(header.basis);
|
|
119
|
-
if (basis !== null && !basis.ok)
|
|
120
|
-
return bad(`basis: ${basis.error}`);
|
|
121
|
-
if (!(parent === null || typeof parent === 'string' && /^[0-9a-f]{64}$/.test(parent))) {
|
|
122
|
-
return bad('parent is not null or a transport version');
|
|
123
|
-
}
|
|
124
|
-
if (!sortedOids(format, roots) || !sortedOids(format, excludes) || parent === null && excludes.length > 0) {
|
|
125
|
-
return bad('roots and excludes are not sorted unique object IDs, excludes empty without a parent');
|
|
126
|
-
}
|
|
127
|
-
if (!sortedOids(format, shared) || shared.length > 0 && !(0, state_js_1.gitSharesObjects)(state.value)) {
|
|
128
|
-
return bad('shared is not sorted unique object IDs, empty unless the state is a linked worktree\'s');
|
|
129
|
-
}
|
|
130
|
-
if (!isLength(pack))
|
|
131
|
-
return bad('pack is not a length');
|
|
132
|
-
const named = namedBlobs(state.value, basis?.value ?? null);
|
|
133
|
-
if (!Array.isArray(blobs))
|
|
134
|
-
return bad('blobs is not a list');
|
|
135
|
-
const blobLengths = new Map();
|
|
136
|
-
for (const [index, entry] of blobs.entries()) {
|
|
137
|
-
if (!Array.isArray(entry) || entry.length !== 2 || !(0, state_js_1.isGitOid)('sha256', entry[0]) || !isLength(entry[1])
|
|
138
|
-
|| !named.has(entry[0]) || index > 0 && (0, text_js_1.compareGitText)(blobs[index - 1][0], entry[0]) >= 0) {
|
|
139
|
-
return bad(`blob ${index} is not a sorted [<sha256>, <length>] the state or its basis names`);
|
|
140
|
-
}
|
|
141
|
-
blobLengths.set(entry[0], entry[1]);
|
|
142
|
-
}
|
|
143
|
-
if ((0, state_js_1.gitBytesForm)(state.value)
|
|
144
|
-
&& (basis !== null || roots.length > 0 || excludes.length > 0 || shared.length > 0 || pack !== 0)) {
|
|
145
|
-
return bad('a state in byte form states no basis, names no roots, excludes or shared, and carries no pack');
|
|
146
|
-
}
|
|
147
|
-
return (0, validate_js_1.pass)({
|
|
148
|
-
head: { state: state.value, parent, basis: basis?.value ?? null, roots, excludes, shared, packLength: pack, blobLengths },
|
|
149
|
-
end,
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
/** An artifact's head and the lengths of its pack and files, from its
|
|
153
|
-
* leading bytes alone: what cache retention, Detect's notebook and usage
|
|
154
|
-
* need, never its pack. */
|
|
155
|
-
function decodeGitArtifactHead(bytes) {
|
|
156
|
-
const decoded = decodeHead(bytes);
|
|
157
|
-
return decoded.ok ? (0, validate_js_1.pass)(decoded.value.head) : decoded;
|
|
158
|
-
}
|
|
159
|
-
/** The artifact, every carried file proved to be the blob it names. */
|
|
160
|
-
function decodeGitArtifact(bytes, sha256) {
|
|
161
|
-
const bad = (problem) => (0, validate_js_1.failShape)(EXAMPLE, problem);
|
|
162
|
-
const decoded = decodeHead(bytes);
|
|
163
|
-
if (!decoded.ok)
|
|
164
|
-
return decoded;
|
|
165
|
-
const { head: { packLength, blobLengths, ...head }, end } = decoded.value;
|
|
166
|
-
let at = end;
|
|
167
|
-
if (at + packLength > bytes.length
|
|
168
|
-
|| packLength > 0 && !PACK_SIGNATURE.every((byte, offset) => bytes[at + offset] === byte)) {
|
|
169
|
-
return bad('the pack does not fit the artifact');
|
|
170
|
-
}
|
|
171
|
-
const pack = bytes.subarray(at, at += packLength);
|
|
172
|
-
const carried = new Map();
|
|
173
|
-
for (const [oid, length] of blobLengths) {
|
|
174
|
-
if (at + length > bytes.length)
|
|
175
|
-
return bad(`blob ${oid} overruns the artifact`);
|
|
176
|
-
const content = bytes.subarray(at, at += length);
|
|
177
|
-
if ((0, exports.gitBlobId)(content, sha256) !== oid)
|
|
178
|
-
return bad(`the bytes of blob ${oid} are another blob`);
|
|
179
|
-
carried.set(oid, content);
|
|
180
|
-
}
|
|
181
|
-
if (at !== bytes.length)
|
|
182
|
-
return bad('bytes follow the last blob');
|
|
183
|
-
return (0, validate_js_1.pass)({ ...head, pack, blobs: carried });
|
|
184
|
-
}
|
|
185
|
-
/** Whether a receiver asks its Git anything for this artifact: what Git
|
|
186
|
-
* installs and checks are the objects its roots name, and an artifact that
|
|
187
|
-
* names none, a state in byte form or a worktree sent as one, asks nothing. */
|
|
188
|
-
const gitAsksGit = (head) => head.roots.length > 0;
|
|
189
|
-
exports.gitAsksGit = gitAsksGit;
|
|
190
|
-
/** How many objects a pack holds, from its header; none for no pack. */
|
|
191
|
-
const gitPackObjectCount = (pack) => pack.byteLength === 0 ? 0 : new DataView(pack.buffer, pack.byteOffset, pack.byteLength).getUint32(8);
|
|
192
|
-
exports.gitPackObjectCount = gitPackObjectCount;
|
|
193
|
-
function concat(parts) {
|
|
194
|
-
const out = new Uint8Array(parts.reduce((total, part) => total + part.length, 0));
|
|
195
|
-
let at = 0;
|
|
196
|
-
for (const part of parts) {
|
|
197
|
-
out.set(part, at);
|
|
198
|
-
at += part.length;
|
|
199
|
-
}
|
|
200
|
-
return out;
|
|
201
|
-
}
|
|
202
|
-
//# sourceMappingURL=artifact.js.map
|
|
1
|
+
"use strict";var v=Object.defineProperty;var r=(t,e)=>v(t,"name",{value:e,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.gitPackObjectCount=exports.gitAsksGit=exports.GIT_ARTIFACT_PREFIX=exports.gitTransportVersion=exports.gitBlobId=exports.GIT_ARTIFACT_CONTRACT=void 0,exports.gitNewBlobs=P,exports.encodeGitArtifact=E,exports.gitArtifactHeadLength=O,exports.decodeGitArtifactHead=L,exports.decodeGitArtifact=B;const g=require("../contracts/validate.js"),I=require("../entities/bytes.js"),l=require("./state.js"),p=require("./text.js");exports.GIT_ARTIFACT_CONTRACT="amalgm.git-artifact.v4";const _=(0,I.utf8Encode)("AMGGIT04"),S=(0,I.utf8Encode)("PACK"),N=r((t,e)=>e(F([(0,I.utf8Encode)(`blob ${t.length}\0`),t])),"gitBlobId");exports.gitBlobId=N;const R=r((t,e)=>new Set([...(0,l.gitBlobs)(t),...(e?.files??[]).flatMap(n=>n.oid===null?[]:[n.oid])]),"namedBlobs");function P(t,e,n){const s=n===null?new Set:(0,l.gitBlobs)(n);return[...R(t,e)].filter(o=>!s.has(o)).sort(p.compareGitText)}r(P,"gitNewBlobs");function E(t){const e=[...t.blobs.keys()].sort(p.compareGitText),n=(0,I.utf8Encode)(JSON.stringify({contract:exports.GIT_ARTIFACT_CONTRACT,state:(0,l.gitStateJson)(t.state),parent:t.parent,basis:t.basis&&(0,l.gitStateJson)(t.basis),roots:t.roots,excludes:t.excludes,shared:t.shared,pack:t.pack.length,blobs:e.map(o=>[o,t.blobs.get(o).length])})),s=new Uint8Array(4);return new DataView(s.buffer).setUint32(0,n.length),F([_,s,n,t.pack,...e.map(o=>t.blobs.get(o))])}r(E,"encodeGitArtifact");const j=r((t,e)=>e(t),"gitTransportVersion");exports.gitTransportVersion=j;const k=`AMGGIT04 <u32 length> { contract: "${exports.GIT_ARTIFACT_CONTRACT}", state, parent, basis, roots, excludes, shared, pack, blobs: [[<sha256>, <length>]] } <PACK> <bytes>`,C=r((t,e)=>Array.isArray(e)&&e.every((n,s)=>(0,l.isGitOid)(t,n)&&(s===0||(0,p.compareGitText)(e[s-1],n)<0)),"sortedOids"),m=r(t=>typeof t=="number"&&Number.isSafeInteger(t)&&t>=0,"isLength");exports.GIT_ARTIFACT_PREFIX=_.length+4;function O(t){return t.length<exports.GIT_ARTIFACT_PREFIX||!_.every((e,n)=>t[n]===e)?null:exports.GIT_ARTIFACT_PREFIX+new DataView(t.buffer,t.byteOffset,t.byteLength).getUint32(_.length)}r(O,"gitArtifactHeadLength");function w(t){const e=r(T=>(0,g.failShape)(k,T),"bad"),n=O(t);if(n===null)return e("the bytes do not start with the artifact magic");if(n>t.length)return e("the header overruns the artifact");let s;try{s=JSON.parse((0,I.utf8Decode)(t.subarray(exports.GIT_ARTIFACT_PREFIX,n)))}catch{return e("the header is not JSON")}if(!(0,g.isRecord)(s)||s.contract!==exports.GIT_ARTIFACT_CONTRACT)return e(`the contract is not ${exports.GIT_ARTIFACT_CONTRACT}`);const o=(0,l.checkGitState)(s.state);if(!o.ok)return o;const{parent:d,roots:f,excludes:h,shared:a,pack:A,blobs:b}=s,i=o.value.format,c=s.basis===null?null:(0,l.checkGitState)(s.basis);if(c!==null&&!c.ok)return e(`basis: ${c.error}`);if(!(d===null||typeof d=="string"&&/^[0-9a-f]{64}$/.test(d)))return e("parent is not null or a transport version");if(!C(i,f)||!C(i,h)||d===null&&h.length>0)return e("roots and excludes are not sorted unique object IDs, excludes empty without a parent");if(!C(i,a)||a.length>0&&!(0,l.gitSharesObjects)(o.value))return e("shared is not sorted unique object IDs, empty unless the state is a linked worktree's");if(!m(A))return e("pack is not a length");const G=R(o.value,c?.value??null);if(!Array.isArray(b))return e("blobs is not a list");const y=new Map;for(const[T,u]of b.entries()){if(!Array.isArray(u)||u.length!==2||!(0,l.isGitOid)("sha256",u[0])||!m(u[1])||!G.has(u[0])||T>0&&(0,p.compareGitText)(b[T-1][0],u[0])>=0)return e(`blob ${T} is not a sorted [<sha256>, <length>] the state or its basis names`);y.set(u[0],u[1])}return(0,l.gitBytesForm)(o.value)&&(c!==null||f.length>0||h.length>0||a.length>0||A!==0)?e("a state in byte form states no basis, names no roots, excludes or shared, and carries no pack"):(0,g.pass)({head:{state:o.value,parent:d,basis:c?.value??null,roots:f,excludes:h,shared:a,packLength:A,blobLengths:y},end:n})}r(w,"decodeHead");function L(t){const e=w(t);return e.ok?(0,g.pass)(e.value.head):e}r(L,"decodeGitArtifactHead");function B(t,e){const n=r(i=>(0,g.failShape)(k,i),"bad"),s=w(t);if(!s.ok)return s;const{head:{packLength:o,blobLengths:d,...f},end:h}=s.value;let a=h;if(a+o>t.length||o>0&&!S.every((i,c)=>t[a+c]===i))return n("the pack does not fit the artifact");const A=t.subarray(a,a+=o),b=new Map;for(const[i,c]of d){if(a+c>t.length)return n(`blob ${i} overruns the artifact`);const G=t.subarray(a,a+=c);if((0,exports.gitBlobId)(G,e)!==i)return n(`the bytes of blob ${i} are another blob`);b.set(i,G)}return a!==t.length?n("bytes follow the last blob"):(0,g.pass)({...f,pack:A,blobs:b})}r(B,"decodeGitArtifact");const x=r(t=>t.roots.length>0,"gitAsksGit");exports.gitAsksGit=x;const M=r(t=>t.byteLength===0?0:new DataView(t.buffer,t.byteOffset,t.byteLength).getUint32(8),"gitPackObjectCount");exports.gitPackObjectCount=M;function F(t){const e=new Uint8Array(t.reduce((s,o)=>s+o.length,0));let n=0;for(const s of t)e.set(s,n),n+=s.length;return e}r(F,"concat");
|
package/dist-cjs/git/chain.js
CHANGED
|
@@ -1,59 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Which artifacts a receiver reads to reach a state, in two walks back from
|
|
4
|
-
* the target along its parents.
|
|
5
|
-
*
|
|
6
|
-
* Files: an artifact carries only the blobs its parent's state lacks, so a
|
|
7
|
-
* file the receiver does not already hold is found by walking back to the
|
|
8
|
-
* artifact that first carried it, each artifact read once and only as far
|
|
9
|
-
* back as a file asked for first travelled.
|
|
10
|
-
*
|
|
11
|
-
* Objects: a pack is thin against its excluded roots, so it installs once
|
|
12
|
-
* everything they reach stands here; otherwise its parent's pack comes first,
|
|
13
|
-
* and so on back to a pack whose exclusions are held or that has none. Held
|
|
14
|
-
* is Git's connectivity, never an object's presence: an interrupted install
|
|
15
|
-
* leaves commits whose trees never arrived. A linked worktree's pack is thin
|
|
16
|
-
* against its main checkout's roots as well, which only that checkout's own
|
|
17
|
-
* artifacts carry: until they stand here, the walk waits for the main
|
|
18
|
-
* checkout's Apply.
|
|
19
|
-
*
|
|
20
|
-
* The walks are separate because Git acts under the configuration the
|
|
21
|
-
* repository will hold: a receiver writes the configuration files first,
|
|
22
|
-
* then asks its Git which packs it lacks.
|
|
23
|
-
*/
|
|
24
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.gitChainReader = gitChainReader;
|
|
26
|
-
exports.gitChainPacks = gitChainPacks;
|
|
27
|
-
const validate_js_1 = require("../contracts/validate.js");
|
|
28
|
-
/** Reads blobs from the chain back from the target: each artifact read
|
|
29
|
-
* once, only as far back as a blob asked for first travelled. Null for a
|
|
30
|
-
* blob no artifact on the chain carries. */
|
|
31
|
-
function gitChainReader(target, artifact) {
|
|
32
|
-
const found = new Map();
|
|
33
|
-
let next = target;
|
|
34
|
-
return async (oid) => {
|
|
35
|
-
while (!found.has(oid) && next !== null) {
|
|
36
|
-
const read = await artifact(next);
|
|
37
|
-
for (const [blob, bytes] of read.blobs)
|
|
38
|
-
if (!found.has(blob))
|
|
39
|
-
found.set(blob, bytes);
|
|
40
|
-
next = read.parent;
|
|
41
|
-
}
|
|
42
|
-
return found.get(oid) ?? null;
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
/** The packs that bring the target's objects here. */
|
|
46
|
-
async function gitChainPacks(target, artifact, holds) {
|
|
47
|
-
const packs = [];
|
|
48
|
-
for (let next = target; next !== null;) {
|
|
49
|
-
const read = await artifact(next);
|
|
50
|
-
if (read.shared.length > 0 && !await holds(read.shared))
|
|
51
|
-
return (0, validate_js_1.pass)({ kind: 'owner' });
|
|
52
|
-
packs.push(read.pack);
|
|
53
|
-
if (read.excludes.length === 0 || await holds(read.excludes))
|
|
54
|
-
return (0, validate_js_1.pass)({ kind: 'packs', packs: packs.reverse() });
|
|
55
|
-
next = read.parent;
|
|
56
|
-
}
|
|
57
|
-
return (0, validate_js_1.fail)(`the chain from ${target} ends before a pack whose exclusions stand here`);
|
|
58
|
-
}
|
|
59
|
-
//# sourceMappingURL=chain.js.map
|
|
1
|
+
"use strict";var o=Object.defineProperty;var i=(n,r)=>o(n,"name",{value:r,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.gitChainReader=h,exports.gitChainPacks=d;const c=require("../contracts/validate.js");function h(n,r){const a=new Map;let t=n;return async s=>{for(;!a.has(s)&&t!==null;){const e=await r(t);for(const[u,l]of e.blobs)a.has(u)||a.set(u,l);t=e.parent}return a.get(s)??null}}i(h,"gitChainReader");async function d(n,r,a){const t=[];for(let s=n;s!==null;){const e=await r(s);if(e.shared.length>0&&!await a(e.shared))return(0,c.pass)({kind:"owner"});if(t.push(e.pack),e.excludes.length===0||await a(e.excludes))return(0,c.pass)({kind:"packs",packs:t.reverse()});s=e.parent}return(0,c.fail)(`the chain from ${n} ends before a pack whose exclusions stand here`)}i(d,"gitChainPacks");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var a=Object.defineProperty;var l=(e,n)=>a(e,"name",{value:n,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.gitPlace=u,exports.gitHolds=c,exports.heldResult=d,exports.absentResult=f,exports.heldStatement=p;const o=require("../entities/rules.js"),s=new Map([[33188,420],[33261,493]]);function u(e){if(e===void 0||e.skipWorktree||e.intentToAdd)return null;const n=s.get(e.mode);return n===void 0?null:{oid:e.oid,fileMode:n}}l(u,"gitPlace");function c(e,n,t){if(e.promisor)return!1;const i=u(e.entries.get(n));return i!==null&&t.fileMode===i.fileMode&&t.gitBlob===i.oid}l(c,"gitHolds");const r=new Set(["file.text","file.binary"]);function d(e,n){if(!r.has(e.type))throw new Error(`Git holds only ordinary files, not a ${e.type}`);const t={...e,payloadVersion:null,size:null};return{...t,version:(0,o.canonicalVersion)(t,n)}}l(d,"heldResult");function f(e,n){if(!r.has(e.type))throw new Error(`Git holds only ordinary files, not a ${e.type}`);const t={...e,payloadVersion:null,size:null,fileMode:null,mtime:null};return{...t,version:(0,o.canonicalVersion)(t,n)}}l(f,"absentResult");function p(e,n,t){return e!==null&&(0,o.fileAbsent)(e)?"change":e===null||e.payloadVersion===null&&!t.project?t.project?"change":"apply":e.payloadVersion!==null&&r.has(e.type)&&e.status==="active"&&n.status==="active"&&e.parentUUID===n.parentUUID&&e.name===n.name&&e.type===n.type&&e.payloadVersion===n.payloadVersion&&e.fileMode===n.fileMode?t.row?t.line?"echo":"change":"kept":"change"}l(p,"heldStatement");
|
package/dist-cjs/git/index.js
CHANGED
|
@@ -1,29 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.compareGitText = void 0;
|
|
18
|
-
__exportStar(require("./state.js"), exports);
|
|
19
|
-
__exportStar(require("./alternates.js"), exports);
|
|
20
|
-
var text_js_1 = require("./text.js");
|
|
21
|
-
Object.defineProperty(exports, "compareGitText", { enumerable: true, get: function () { return text_js_1.compareGitText; } });
|
|
22
|
-
__exportStar(require("./artifact.js"), exports);
|
|
23
|
-
__exportStar(require("./chain.js"), exports);
|
|
24
|
-
__exportStar(require("./plan.js"), exports);
|
|
25
|
-
__exportStar(require("./play.js"), exports);
|
|
26
|
-
__exportStar(require("./commands.js"), exports);
|
|
27
|
-
__exportStar(require("./tag.js"), exports);
|
|
28
|
-
__exportStar(require("./turns.js"), exports);
|
|
29
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use strict";var o=Object.defineProperty;var u=(i,r)=>o(i,"name",{value:r,configurable:!0});var f=exports&&exports.__createBinding||(Object.create?(function(i,r,t,n){n===void 0&&(n=t);var a=Object.getOwnPropertyDescriptor(r,t);(!a||("get"in a?!r.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:u(function(){return r[t]},"get")}),Object.defineProperty(i,n,a)}):(function(i,r,t,n){n===void 0&&(n=t),i[n]=r[t]})),e=exports&&exports.__exportStar||function(i,r){for(var t in i)t!=="default"&&!Object.prototype.hasOwnProperty.call(r,t)&&f(r,i,t)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.gitPartsChanged=exports.gitParts=exports.gitPartBlobs=exports.GIT_PARTS=exports.compareGitText=void 0,e(require("./state.js"),exports),e(require("./alternates.js"),exports);var g=require("./text.js");Object.defineProperty(exports,"compareGitText",{enumerable:!0,get:u(function(){return g.compareGitText},"get")}),e(require("./artifact.js"),exports),e(require("./chain.js"),exports),e(require("./plan.js"),exports),e(require("./play.js"),exports),e(require("./tag.js"),exports),e(require("./turns.js"),exports),e(require("./holds.js"),exports),e(require("./places.js"),exports);var c=require("./parts.js");Object.defineProperty(exports,"GIT_PARTS",{enumerable:!0,get:u(function(){return c.GIT_PARTS},"get")}),Object.defineProperty(exports,"gitPartBlobs",{enumerable:!0,get:u(function(){return c.gitPartBlobs},"get")}),Object.defineProperty(exports,"gitParts",{enumerable:!0,get:u(function(){return c.gitParts},"get")}),Object.defineProperty(exports,"gitPartsChanged",{enumerable:!0,get:u(function(){return c.gitPartsChanged},"get")}),e(require("./restore.js"),exports);
|