@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,54 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FilesRequestError = void 0;
|
|
4
|
-
exports.requiredText = requiredText;
|
|
5
|
-
exports.canonicalUserEmail = canonicalUserEmail;
|
|
6
|
-
exports.amalgmUserRoot = amalgmUserRoot;
|
|
7
|
-
exports.assertFilesContent = assertFilesContent;
|
|
8
|
-
class FilesRequestError extends Error {
|
|
9
|
-
status;
|
|
10
|
-
code;
|
|
11
|
-
constructor(status, code, message) {
|
|
12
|
-
super(message);
|
|
13
|
-
this.status = status;
|
|
14
|
-
this.code = code;
|
|
15
|
-
this.name = 'FilesRequestError';
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
exports.FilesRequestError = FilesRequestError;
|
|
19
|
-
function requiredText(value, label) {
|
|
20
|
-
const text = typeof value === 'string' ? value.trim() : '';
|
|
21
|
-
if (!text)
|
|
22
|
-
throw new FilesRequestError(400, 'invalid_request', `${label} is required`);
|
|
23
|
-
return text;
|
|
24
|
-
}
|
|
25
|
-
function canonicalUserEmail(value) {
|
|
26
|
-
const email = requiredText(value, 'authenticated user email').toLowerCase();
|
|
27
|
-
if (email.includes('/') || email.includes('\\') || email.includes('\0')) {
|
|
28
|
-
throw new FilesRequestError(400, 'invalid_identity', 'authenticated user email is not path-safe');
|
|
29
|
-
}
|
|
30
|
-
return email;
|
|
31
|
-
}
|
|
32
|
-
function amalgmUserRoot(userEmail) {
|
|
33
|
-
return `/amalgm/users/${canonicalUserEmail(userEmail)}`;
|
|
34
|
-
}
|
|
35
|
-
function assertFilesContent(value, label) {
|
|
36
|
-
const content = value;
|
|
37
|
-
const stream = content?.body;
|
|
38
|
-
const validBody = content?.body instanceof Uint8Array
|
|
39
|
-
|| (stream !== undefined && typeof stream.getReader === 'function');
|
|
40
|
-
if (!content || !validBody
|
|
41
|
-
|| typeof content.mediaType !== 'string' || !content.mediaType.trim()
|
|
42
|
-
|| (content.bytes !== null
|
|
43
|
-
&& (!Number.isSafeInteger(content.bytes) || Number(content.bytes) < 0))
|
|
44
|
-
|| typeof content.version !== 'string' || !content.version) {
|
|
45
|
-
throw new Error(`${label} returned invalid content`);
|
|
46
|
-
}
|
|
47
|
-
return {
|
|
48
|
-
body: content.body,
|
|
49
|
-
mediaType: content.mediaType,
|
|
50
|
-
bytes: content.bytes === null ? null : Number(content.bytes),
|
|
51
|
-
version: content.version,
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
//# sourceMappingURL=browse-types.js.map
|
|
1
|
+
"use strict";var d=Object.defineProperty;var s=(r,t)=>d(r,"name",{value:t,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.FilesRequestError=void 0,exports.requiredText=o,exports.canonicalUserEmail=a,exports.amalgmUserRoot=l,exports.assertFilesContent=c;class i extends Error{static{s(this,"FilesRequestError")}status;code;constructor(t,e,n){super(n),this.status=t,this.code=e,this.name="FilesRequestError"}}exports.FilesRequestError=i;function o(r,t){const e=typeof r=="string"?r.trim():"";if(!e)throw new i(400,"invalid_request",`${t} is required`);return e}s(o,"requiredText");function a(r){const t=o(r,"authenticated user email").toLowerCase();if(t.includes("/")||t.includes("\\")||t.includes("\0"))throw new i(400,"invalid_identity","authenticated user email is not path-safe");return t}s(a,"canonicalUserEmail");function l(r){return`/amalgm/users/${a(r)}`}s(l,"amalgmUserRoot");function c(r,t){const e=r,n=e?.body,u=e?.body instanceof Uint8Array||n!==void 0&&typeof n.getReader=="function";if(!e||!u||typeof e.mediaType!="string"||!e.mediaType.trim()||e.bytes!==null&&(!Number.isSafeInteger(e.bytes)||Number(e.bytes)<0)||typeof e.version!="string"||!e.version)throw new Error(`${t} returned invalid content`);return{body:e.body,mediaType:e.mediaType,bytes:e.bytes===null?null:Number(e.bytes),version:e.version}}s(c,"assertFilesContent");
|
|
@@ -1,104 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FilesBrowser = void 0;
|
|
4
|
-
const browse_types_js_1 = require("./browse-types.js");
|
|
5
|
-
const cloud_files_js_1 = require("./cloud-files.js");
|
|
6
|
-
const local_files_js_1 = require("./local-files.js");
|
|
7
|
-
class FilesBrowser {
|
|
8
|
-
root;
|
|
9
|
-
cloud;
|
|
10
|
-
local;
|
|
11
|
-
constructor(options) {
|
|
12
|
-
this.cloud = new cloud_files_js_1.CloudFiles(options.userEmail, options.cloud);
|
|
13
|
-
this.local = new local_files_js_1.LocalFiles(options.local);
|
|
14
|
-
this.root = (0, browse_types_js_1.amalgmUserRoot)(options.userEmail);
|
|
15
|
-
}
|
|
16
|
-
async listAmalgm(input = {}) {
|
|
17
|
-
const cloud = await this.cloud.open();
|
|
18
|
-
const listed = await cloud.list(input.parentId);
|
|
19
|
-
const records = uniqueEntities([listed.directory, ...listed.entries]);
|
|
20
|
-
const computerId = optionalText(input.computerId);
|
|
21
|
-
const local = computerId === null
|
|
22
|
-
? new Map()
|
|
23
|
-
: await this.local.available(computerId, cloud.head, records);
|
|
24
|
-
return {
|
|
25
|
-
scope: 'amalgm',
|
|
26
|
-
root: this.root,
|
|
27
|
-
head: headDescriptor(cloud.head),
|
|
28
|
-
computerId,
|
|
29
|
-
directory: present(listed.directory, local),
|
|
30
|
-
entries: listed.entries.map((entry) => present(entry, local)),
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
async readAmalgm(input) {
|
|
34
|
-
const cloud = await this.cloud.open();
|
|
35
|
-
const entity = await cloud.entry(input.entityId);
|
|
36
|
-
(0, cloud_files_js_1.assertReadable)(entity);
|
|
37
|
-
const computerId = optionalText(input.computerId);
|
|
38
|
-
if (computerId !== null) {
|
|
39
|
-
const local = await this.local.readIfMaterialized(computerId, cloud.head, entity);
|
|
40
|
-
if (local !== null) {
|
|
41
|
-
return {
|
|
42
|
-
scope: 'amalgm',
|
|
43
|
-
head: headDescriptor(cloud.head),
|
|
44
|
-
entityId: entity.uuid,
|
|
45
|
-
source: 'local',
|
|
46
|
-
content: local,
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return {
|
|
51
|
-
scope: 'amalgm',
|
|
52
|
-
head: headDescriptor(cloud.head),
|
|
53
|
-
entityId: entity.uuid,
|
|
54
|
-
source: 'cloud',
|
|
55
|
-
content: await cloud.read(entity),
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
listLocal(input) {
|
|
59
|
-
return this.local.list(input.computerId, input.path);
|
|
60
|
-
}
|
|
61
|
-
async readLocal(input) {
|
|
62
|
-
return {
|
|
63
|
-
scope: 'local-only',
|
|
64
|
-
computerId: input.computerId.trim(),
|
|
65
|
-
source: 'local',
|
|
66
|
-
content: await this.local.read(input.computerId, input.path),
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
exports.FilesBrowser = FilesBrowser;
|
|
71
|
-
function present(node, local) {
|
|
72
|
-
const localVersion = local.get(node.entity.uuid) ?? null;
|
|
73
|
-
const isLocal = localVersion !== null;
|
|
74
|
-
return {
|
|
75
|
-
entryId: node.entryId,
|
|
76
|
-
entityId: node.entity.uuid,
|
|
77
|
-
parentEntityId: node.parentEntityId,
|
|
78
|
-
referenceId: node.referenceId,
|
|
79
|
-
name: node.name,
|
|
80
|
-
type: node.entity.type,
|
|
81
|
-
status: node.entity.status,
|
|
82
|
-
version: node.entity.version,
|
|
83
|
-
availability: {
|
|
84
|
-
cloud: true,
|
|
85
|
-
local: isLocal,
|
|
86
|
-
localVersion,
|
|
87
|
-
matchesCloud: localVersion === null ? null : localVersion === node.entity.version,
|
|
88
|
-
},
|
|
89
|
-
source: isLocal ? 'local' : 'cloud',
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
function uniqueEntities(nodes) {
|
|
93
|
-
return [...new Map(nodes.map((node) => [node.entity.uuid, node.entity])).values()];
|
|
94
|
-
}
|
|
95
|
-
function headDescriptor(head) {
|
|
96
|
-
return { checksum: head.checksum, version: head.version };
|
|
97
|
-
}
|
|
98
|
-
function optionalText(value) {
|
|
99
|
-
if (value === undefined)
|
|
100
|
-
return null;
|
|
101
|
-
const text = value.trim();
|
|
102
|
-
return text || null;
|
|
103
|
-
}
|
|
104
|
-
//# sourceMappingURL=browser.js.map
|
|
1
|
+
"use strict";var y=Object.defineProperty;var c=(e,t)=>y(e,"name",{value:t,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.FilesBrowser=void 0;const p=require("./browse-types.js"),u=require("./cloud-files.js"),h=require("./local-files.js");class I{static{c(this,"FilesBrowser")}root;cloud;local;constructor(t){this.cloud=new u.CloudFiles(t.userEmail,t.cloud),this.local=new h.LocalFiles(t.local),this.root=(0,p.amalgmUserRoot)(t.userEmail)}async listAmalgm(t={}){const a=await this.cloud.open(),l=await a.list(t.parentId),r=w([l.directory,...l.entries]),o=d(t.computerId),n=o===null?new Map:await this.local.available(o,a.head,r);return{scope:"amalgm",root:this.root,head:s(a.head),computerId:o,directory:i(l.directory,n),entries:l.entries.map(m=>i(m,n))}}async locateAmalgm(t){const a=await this.cloud.open(),l=await a.place(t.entityId);return{scope:"amalgm",root:this.root,head:s(a.head),entries:l.map(r=>i(r,new Map))}}async readAmalgm(t){const a=await this.cloud.open(),l=await a.entry(t.entityId);(0,u.assertReadable)(l);const r=d(t.computerId);if(r!==null){const o=await this.local.readIfMaterialized(r,a.head,l);if(o!==null)return{scope:"amalgm",head:s(a.head),entityId:l.uuid,source:"local",content:o}}return{scope:"amalgm",head:s(a.head),entityId:l.uuid,source:"cloud",content:await a.read(l)}}listLocal(t){return this.local.list(t.computerId,t.path)}async readLocal(t){return{scope:"local-only",computerId:t.computerId.trim(),source:"local",content:await this.local.read(t.computerId,t.path)}}}exports.FilesBrowser=I;function i(e,t){const a=t.get(e.entity.uuid)??null,l=a!==null;return{entryId:e.entryId,entityId:e.entity.uuid,parentEntityId:e.parentEntityId,referenceId:e.referenceId,name:e.name,type:e.entity.type,status:e.entity.status,version:e.entity.version,size:e.entity.size,availability:{cloud:!0,local:l,localVersion:a,matchesCloud:a===null?null:a===e.entity.version},source:l?"local":"cloud"}}c(i,"present");function w(e){return[...new Map(e.map(t=>[t.entity.uuid,t.entity])).values()]}c(w,"uniqueEntities");function s(e){return{checksum:e.checksum,version:e.version}}c(s,"headDescriptor");function d(e){return e===void 0?null:e.trim()||null}c(d,"optionalText");
|
|
@@ -1,159 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CloudFilesView = exports.CloudFiles = void 0;
|
|
4
|
-
exports.assertReadable = assertReadable;
|
|
5
|
-
const index_js_1 = require("../entities/index.js");
|
|
6
|
-
const browse_types_js_1 = require("./browse-types.js");
|
|
7
|
-
const user_ground_js_1 = require("../registration/user-ground.js");
|
|
8
|
-
const HASH = /^[0-9a-f]{64}$/;
|
|
9
|
-
const READABLE_TYPES = new Set(['file.text', 'file.binary', 'link']);
|
|
10
|
-
class CloudFiles {
|
|
11
|
-
port;
|
|
12
|
-
userEmail;
|
|
13
|
-
constructor(userEmail, port) {
|
|
14
|
-
this.port = port;
|
|
15
|
-
this.userEmail = (0, browse_types_js_1.canonicalUserEmail)(userEmail);
|
|
16
|
-
}
|
|
17
|
-
async open() {
|
|
18
|
-
return new CloudFilesView(assertHead(await this.port.openActiveHead(), this.userEmail), this.port);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.CloudFiles = CloudFiles;
|
|
22
|
-
class CloudFilesView {
|
|
23
|
-
head;
|
|
24
|
-
port;
|
|
25
|
-
constructor(head, port) {
|
|
26
|
-
this.head = head;
|
|
27
|
-
this.port = port;
|
|
28
|
-
}
|
|
29
|
-
async list(parentId) {
|
|
30
|
-
const requestedId = parentId === undefined || !parentId.trim()
|
|
31
|
-
? this.head.root.uuid
|
|
32
|
-
: entityId(parentId, 'parent entity id');
|
|
33
|
-
const directory = requestedId === this.head.root.uuid
|
|
34
|
-
? directNode(this.head.root, this.head.root.parentUUID)
|
|
35
|
-
: await this.resolveNode(requestedId);
|
|
36
|
-
if (!index_js_1.CONTAINERS.has(directory.entity.type)) {
|
|
37
|
-
throw new browse_types_js_1.FilesRequestError(400, 'not_a_directory', 'entity is not a directory');
|
|
38
|
-
}
|
|
39
|
-
const value = await this.port.list({ head: this.head, parentId: directory.entity.uuid });
|
|
40
|
-
const listed = value;
|
|
41
|
-
if (!listed || !Array.isArray(listed.entries))
|
|
42
|
-
throw new Error('cloud files returned an invalid directory');
|
|
43
|
-
const storedDirectory = activeRecord(listed.directory, 'cloud directory');
|
|
44
|
-
if (storedDirectory.uuid !== directory.entity.uuid || !index_js_1.CONTAINERS.has(storedDirectory.type)) {
|
|
45
|
-
throw new Error('cloud files returned the wrong directory');
|
|
46
|
-
}
|
|
47
|
-
if (!(0, index_js_1.sameRecord)(storedDirectory, directory.entity)) {
|
|
48
|
-
throw new Error('cloud files directory does not match the opened head');
|
|
49
|
-
}
|
|
50
|
-
const records = listed.entries.map((entry) => activeRecord(entry, 'cloud directory entry'));
|
|
51
|
-
const ids = new Set();
|
|
52
|
-
const names = new Set();
|
|
53
|
-
for (const entry of records) {
|
|
54
|
-
if (entry.parentUUID !== storedDirectory.uuid)
|
|
55
|
-
throw new Error('cloud directory entry has the wrong parent');
|
|
56
|
-
if (ids.has(entry.uuid) || names.has(entry.name))
|
|
57
|
-
throw new Error('cloud directory has duplicate entries');
|
|
58
|
-
ids.add(entry.uuid);
|
|
59
|
-
names.add(entry.name);
|
|
60
|
-
}
|
|
61
|
-
const entries = await Promise.all(records.map((record) => record.type === 'reference'
|
|
62
|
-
? this.referenceNode(record, directory.entryId)
|
|
63
|
-
: Promise.resolve(directNode(record, directory.entryId))));
|
|
64
|
-
return { directory, entries: [...entries].sort(compareEntries) };
|
|
65
|
-
}
|
|
66
|
-
async entry(value) {
|
|
67
|
-
const requestedId = entityId(value, 'entity id');
|
|
68
|
-
return (await this.resolveNode(requestedId)).entity;
|
|
69
|
-
}
|
|
70
|
-
async resolveNode(requestedId) {
|
|
71
|
-
const found = await this.port.entry({ head: this.head, entityId: requestedId });
|
|
72
|
-
if (found === null || found === undefined) {
|
|
73
|
-
throw new browse_types_js_1.FilesRequestError(404, 'entity_not_found', 'file does not exist in the active cloud head');
|
|
74
|
-
}
|
|
75
|
-
const entry = activeRecord(found, 'cloud file');
|
|
76
|
-
if (entry.uuid !== requestedId)
|
|
77
|
-
throw new Error('cloud files returned the wrong entity');
|
|
78
|
-
return entry.type === 'reference'
|
|
79
|
-
? this.referenceNode(entry, entry.parentUUID)
|
|
80
|
-
: directNode(entry, entry.parentUUID);
|
|
81
|
-
}
|
|
82
|
-
async referenceNode(reference, parentEntityId) {
|
|
83
|
-
if (typeof reference.payloadVersion !== 'string') {
|
|
84
|
-
throw new Error(`cloud reference ${reference.uuid} has no target`);
|
|
85
|
-
}
|
|
86
|
-
const targetId = reference.payloadVersion.toLowerCase();
|
|
87
|
-
if (!index_js_1.UUID_PATTERN.test(targetId)) {
|
|
88
|
-
throw new Error(`cloud reference ${reference.uuid} has an invalid target UUID`);
|
|
89
|
-
}
|
|
90
|
-
const value = await this.port.entry({ head: this.head, entityId: targetId });
|
|
91
|
-
if (value === null || value === undefined) {
|
|
92
|
-
throw new Error(`cloud reference ${reference.uuid} has no active target`);
|
|
93
|
-
}
|
|
94
|
-
const target = activeRecord(value, 'cloud reference target');
|
|
95
|
-
if (target.uuid !== targetId || target.type === 'reference') {
|
|
96
|
-
throw new Error(`cloud reference ${reference.uuid} has an invalid target`);
|
|
97
|
-
}
|
|
98
|
-
return {
|
|
99
|
-
entryId: reference.uuid,
|
|
100
|
-
entity: target,
|
|
101
|
-
parentEntityId,
|
|
102
|
-
name: reference.name,
|
|
103
|
-
referenceId: reference.uuid,
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
async read(entry) {
|
|
107
|
-
assertReadable(entry);
|
|
108
|
-
const content = (0, browse_types_js_1.assertFilesContent)(await this.port.read({ head: this.head, entity: entry }), 'cloud files port');
|
|
109
|
-
if (content.version !== entry.version)
|
|
110
|
-
throw new Error('cloud content does not match the opened head');
|
|
111
|
-
return content;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
exports.CloudFilesView = CloudFilesView;
|
|
115
|
-
function assertReadable(entry) {
|
|
116
|
-
if (!READABLE_TYPES.has(entry.type)) {
|
|
117
|
-
throw new browse_types_js_1.FilesRequestError(400, 'not_readable', 'entity does not have directly readable file content');
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
function assertHead(value, userEmail) {
|
|
121
|
-
const head = value;
|
|
122
|
-
if (!head || typeof head.checksum !== 'string' || !HASH.test(head.checksum)
|
|
123
|
-
|| !Number.isSafeInteger(head.version) || Number(head.version) < 0) {
|
|
124
|
-
throw new Error('cloud files returned an invalid active head');
|
|
125
|
-
}
|
|
126
|
-
const root = activeRecord(head.root, 'cloud files root');
|
|
127
|
-
if (!(0, user_ground_js_1.isUserGroundRoot)(root, userEmail)) {
|
|
128
|
-
throw new Error('cloud files head does not name the authenticated user root');
|
|
129
|
-
}
|
|
130
|
-
return { checksum: head.checksum, version: Number(head.version), root };
|
|
131
|
-
}
|
|
132
|
-
function activeRecord(value, label) {
|
|
133
|
-
const record = (0, index_js_1.assertRecord)(value);
|
|
134
|
-
if (record.status !== 'active')
|
|
135
|
-
throw new Error(`${label} is not active`);
|
|
136
|
-
return record;
|
|
137
|
-
}
|
|
138
|
-
function entityId(value, label) {
|
|
139
|
-
const normalized = value.trim().toLowerCase();
|
|
140
|
-
if (!index_js_1.UUID_PATTERN.test(normalized)) {
|
|
141
|
-
throw new browse_types_js_1.FilesRequestError(400, 'invalid_request', `${label} must be a UUID`);
|
|
142
|
-
}
|
|
143
|
-
return normalized;
|
|
144
|
-
}
|
|
145
|
-
function directNode(entity, parentEntityId) {
|
|
146
|
-
return {
|
|
147
|
-
entryId: entity.uuid,
|
|
148
|
-
entity,
|
|
149
|
-
parentEntityId,
|
|
150
|
-
name: entity.name,
|
|
151
|
-
referenceId: null,
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
function compareEntries(left, right) {
|
|
155
|
-
if (left.name !== right.name)
|
|
156
|
-
return left.name < right.name ? -1 : 1;
|
|
157
|
-
return left.entryId < right.entryId ? -1 : left.entryId > right.entryId ? 1 : 0;
|
|
158
|
-
}
|
|
159
|
-
//# sourceMappingURL=cloud-files.js.map
|
|
1
|
+
"use strict";var I=Object.defineProperty;var d=(o,e)=>I(o,"name",{value:e,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.CloudFilesView=exports.CloudFiles=void 0,exports.assertReadable=E;const u=require("../entities/index.js"),a=require("./browse-types.js"),U=require("../registration/user-ground.js"),_=/^[0-9a-f]{64}$/,N=new Set(["file.text","file.binary","link"]);class R{static{d(this,"CloudFiles")}port;userEmail;constructor(e,t){this.port=t,this.userEmail=(0,a.canonicalUserEmail)(e)}async open(){return new m(g(await this.port.openActiveHead(),this.userEmail),this.port)}}exports.CloudFiles=R;class m{static{d(this,"CloudFilesView")}head;port;constructor(e,t){this.head=e,this.port=t}async list(e){const t=e===void 0||!e.trim()?this.head.root.uuid:y(e,"parent entity id"),r=t===this.head.root.uuid?h(this.head.root,this.head.root.parentUUID):await this.resolveNode(t);if(!u.CONTAINERS.has(r.entity.type))throw new a.FilesRequestError(400,"not_a_directory","entity is not a directory");const s=await this.port.list({head:this.head,parentId:r.entity.uuid});if(!s||!Array.isArray(s.entries))throw new Error("cloud files returned an invalid directory");const l=c(s.directory,"cloud directory");if(l.uuid!==r.entity.uuid||!u.CONTAINERS.has(l.type))throw new Error("cloud files returned the wrong directory");if(!(0,u.sameRecord)(l,r.entity))throw new Error("cloud files directory does not match the opened head");const w=s.entries.map(i=>c(i,"cloud directory entry")),f=new Set,p=new Set;for(const i of w){if(i.parentUUID!==l.uuid)throw new Error("cloud directory entry has the wrong parent");if(f.has(i.uuid)||p.has(i.name))throw new Error("cloud directory has duplicate entries");f.add(i.uuid),p.add(i.name)}const v=await Promise.all(w.map(i=>i.type==="reference"?this.referenceNode(i,r.entryId):Promise.resolve(h(i,r.entryId))));return{directory:r,entries:[...v].sort(D)}}async entry(e){const t=y(e,"entity id");return(await this.resolveNode(t)).entity}async place(e){const t=y(e,"entity id"),r=[];let n=t===this.head.root.uuid?h(this.head.root,this.head.root.parentUUID):await this.resolveNode(t);for(;n.entity.uuid!==this.head.root.uuid;){if(n.parentEntityId===null&&(n=await this.placedRoot(n.entity)),r.some(s=>s.entity.uuid===n.entity.uuid))throw new a.FilesRequestError(404,"entity_not_found","file is not in the active cloud head");r.unshift(n),n=n.parentEntityId===this.head.root.uuid?h(this.head.root,this.head.root.parentUUID):await this.resolveNode(n.parentEntityId)}return r}async placedRoot(e){const t=await this.port.referenceTo({head:this.head,targetId:e.uuid});if(t==null)throw new a.FilesRequestError(404,"entity_not_found","file is not in the active cloud head");const r=c(t,"cloud root reference");if(r.type!=="reference"||r.payloadVersion?.toLowerCase()!==e.uuid)throw new Error("cloud files returned the wrong reference");return this.referenceNode(r,r.parentUUID)}async resolveNode(e){const t=await this.port.entry({head:this.head,entityId:e});if(t==null)throw new a.FilesRequestError(404,"entity_not_found","file does not exist in the active cloud head");const r=c(t,"cloud file");if(r.uuid!==e)throw new Error("cloud files returned the wrong entity");return r.type==="reference"?this.referenceNode(r,r.parentUUID):h(r,r.parentUUID)}async referenceNode(e,t){if(typeof e.payloadVersion!="string")throw new Error(`cloud reference ${e.uuid} has no target`);const r=e.payloadVersion.toLowerCase();if(!u.UUID_PATTERN.test(r))throw new Error(`cloud reference ${e.uuid} has an invalid target UUID`);const n=await this.port.entry({head:this.head,entityId:r});if(n==null)throw new Error(`cloud reference ${e.uuid} has no active target`);const s=c(n,"cloud reference target");if(s.uuid!==r||s.type==="reference")throw new Error(`cloud reference ${e.uuid} has an invalid target`);return{entryId:e.uuid,entity:s,parentEntityId:t,name:e.name,referenceId:e.uuid}}async read(e){E(e);const t=(0,a.assertFilesContent)(await this.port.read({head:this.head,entity:e}),"cloud files port");if(t.version!==e.version)throw new Error("cloud content does not match the opened head");return t}}exports.CloudFilesView=m;function E(o){if(!N.has(o.type))throw new a.FilesRequestError(400,"not_readable","entity does not have directly readable file content")}d(E,"assertReadable");function g(o,e){const t=o;if(!t||typeof t.checksum!="string"||!_.test(t.checksum)||!Number.isSafeInteger(t.version)||Number(t.version)<0)throw new Error("cloud files returned an invalid active head");const r=c(t.root,"cloud files root");if(!(0,U.isUserGroundRoot)(r,e))throw new Error("cloud files head does not name the authenticated user root");return{checksum:t.checksum,version:Number(t.version),root:r}}d(g,"assertHead");function c(o,e){const t=(0,u.assertRecord)(o);if(t.status!=="active")throw new Error(`${e} is not active`);return t}d(c,"activeRecord");function y(o,e){const t=o.trim().toLowerCase();if(!u.UUID_PATTERN.test(t))throw new a.FilesRequestError(400,"invalid_request",`${e} must be a UUID`);return t}d(y,"entityId");function h(o,e){return{entryId:o.uuid,entity:o,parentEntityId:e,name:o.name,referenceId:null}}d(h,"directNode");function D(o,e){return o.name!==e.name?o.name<e.name?-1:1:o.entryId<e.entryId?-1:o.entryId>e.entryId?1:0}d(D,"compareEntries");
|
|
@@ -1,145 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.registerFilesWorkspace = registerFilesWorkspace;
|
|
4
|
-
exports.workspaceGraph = workspaceGraph;
|
|
5
|
-
exports.addFilesWorkspace = addFilesWorkspace;
|
|
6
|
-
const index_js_1 = require("../entities/index.js");
|
|
7
|
-
const computer_address_js_1 = require("./computer-address.js");
|
|
8
|
-
const own_folders_js_1 = require("./own-folders.js");
|
|
9
|
-
function uuid(value, label) {
|
|
10
|
-
const normalized = typeof value === 'string' ? value.trim().toLowerCase() : '';
|
|
11
|
-
if (!index_js_1.UUID_PATTERN.test(normalized))
|
|
12
|
-
throw new Error(`${label} must be a UUID`);
|
|
13
|
-
return normalized;
|
|
14
|
-
}
|
|
15
|
-
function required(value, label) {
|
|
16
|
-
const normalized = typeof value === 'string' ? value.trim() : '';
|
|
17
|
-
if (!normalized)
|
|
18
|
-
throw new Error(`${label} is required`);
|
|
19
|
-
return normalized;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Declare one external workspace: give it identity and link it into the
|
|
23
|
-
* home. Deliberately no scan, SQLite, content, or cloud port exists here:
|
|
24
|
-
* registration is a trigger, and the ground publishes through the one
|
|
25
|
-
* Detect → Record → Send path every other change takes.
|
|
26
|
-
*/
|
|
27
|
-
async function registerFilesWorkspace(path, ports) {
|
|
28
|
-
const requestedPath = required(path, 'workspace path');
|
|
29
|
-
const inspected = await ports.inspectExternalWorkspace(requestedPath);
|
|
30
|
-
const absolutePath = required(inspected.absolutePath, 'external workspace path');
|
|
31
|
-
const refused = (0, own_folders_js_1.ownFolderRefusal)('files register', absolutePath, inspected.amalgmFolders);
|
|
32
|
-
if (refused)
|
|
33
|
-
throw refused;
|
|
34
|
-
const workspaceName = required(inspected.name, 'workspace name');
|
|
35
|
-
const workspaceId = inspected.workspaceId === null
|
|
36
|
-
? uuid(ports.randomUuid(), 'generated workspace id')
|
|
37
|
-
: uuid(inspected.workspaceId, 'existing workspace id');
|
|
38
|
-
const declared = await ports.placeWorkspaceReference({
|
|
39
|
-
workspaceId,
|
|
40
|
-
absolutePath,
|
|
41
|
-
address: (0, computer_address_js_1.computerAddress)(await ports.computerFolder(), absolutePath),
|
|
42
|
-
});
|
|
43
|
-
return {
|
|
44
|
-
workspaceId,
|
|
45
|
-
workspaceName,
|
|
46
|
-
externalPath: absolutePath,
|
|
47
|
-
referenceName: required(declared.referenceName, 'reference name'),
|
|
48
|
-
referencePath: required(declared.referencePath, 'reference path'),
|
|
49
|
-
declared: true,
|
|
50
|
-
created: declared.created === true,
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
/** Select exactly one referenced materialization boundary. Its portable parent
|
|
54
|
-
* may live outside the selection; UUID, not parentlessness, is the boundary.
|
|
55
|
-
*
|
|
56
|
-
* `subtree` is the boundary's complete cloud graph, trash included; `records`
|
|
57
|
-
* is the part a machine reveals: the subtree's active closure. Trash changes
|
|
58
|
-
* only status, so a trashed repository is still a repository. */
|
|
59
|
-
function workspaceGraph(records, workspaceId) {
|
|
60
|
-
const normalizedId = uuid(workspaceId, 'workspace id');
|
|
61
|
-
const snapshot = (0, index_js_1.snapshotFromRecords)(records);
|
|
62
|
-
const workspace = snapshot.records.find((record) => record.uuid === normalizedId);
|
|
63
|
-
if (!workspace || workspace.status !== 'active') {
|
|
64
|
-
throw new Error(`workspace ${normalizedId} does not exist in this user's cloud registry`);
|
|
65
|
-
}
|
|
66
|
-
if (!index_js_1.CONTAINERS.has(workspace.type)) {
|
|
67
|
-
throw new Error(`entity ${normalizedId} is not a registered workspace boundary`);
|
|
68
|
-
}
|
|
69
|
-
const references = snapshot.records.filter((record) => record.status === 'active'
|
|
70
|
-
&& record.type === 'reference' && record.payloadVersion === normalizedId);
|
|
71
|
-
if (references.length !== 1) {
|
|
72
|
-
throw new Error(`workspace ${normalizedId} must have exactly one durable reference`);
|
|
73
|
-
}
|
|
74
|
-
const subtree = (0, index_js_1.containedRecords)(snapshot.records, normalizedId);
|
|
75
|
-
return {
|
|
76
|
-
workspace,
|
|
77
|
-
reference: references[0],
|
|
78
|
-
subtree,
|
|
79
|
-
records: (0, index_js_1.materializableRecords)(subtree, normalizedId),
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
/** Materialize one owned workspace root and establish Watch coverage for it. */
|
|
83
|
-
async function addFilesWorkspace(workspaceId, destinationParent, ports) {
|
|
84
|
-
const normalizedId = uuid(workspaceId, 'workspace id');
|
|
85
|
-
const destination = required(destinationParent, 'destination directory');
|
|
86
|
-
const cloud = await ports.lookupRegistry(normalizedId);
|
|
87
|
-
const { subtree, ...selected } = workspaceGraph(cloud.snapshot.records, normalizedId);
|
|
88
|
-
const place = await ports.inspectDestination({
|
|
89
|
-
workspaceId: normalizedId,
|
|
90
|
-
destinationParent: destination,
|
|
91
|
-
name: selected.workspace.name,
|
|
92
|
-
});
|
|
93
|
-
const refused = (0, own_folders_js_1.ownFolderRefusal)('files add', required(place.absolutePath, 'destination path'), place.amalgmFolders);
|
|
94
|
-
if (refused)
|
|
95
|
-
throw refused;
|
|
96
|
-
// The trash this machine does not reveal stays part of the graph the
|
|
97
|
-
// installed rows are judged in.
|
|
98
|
-
const revealed = new Set(selected.records.map(({ uuid }) => uuid));
|
|
99
|
-
const setAside = subtree.filter(({ uuid }) => !revealed.has(uuid));
|
|
100
|
-
const references = cloud.snapshot.records.filter((record) => record.status === 'active' && record.type === 'reference');
|
|
101
|
-
const installed = await ports.materializeWorkspace({
|
|
102
|
-
...selected,
|
|
103
|
-
setAside,
|
|
104
|
-
references,
|
|
105
|
-
destinationParent: destination,
|
|
106
|
-
cloudHead: required(cloud.checksum, 'cloud head'),
|
|
107
|
-
deliveryWatermark: cloud.deliveryWatermark,
|
|
108
|
-
});
|
|
109
|
-
const installedRecords = (0, index_js_1.snapshotFromRecords)(installed.records || []).records;
|
|
110
|
-
const syncing = new Set(installed.syncingReferences);
|
|
111
|
-
const listed = new Set(installed.listedReferences);
|
|
112
|
-
const accepted = new Set(references.map(({ uuid }) => uuid));
|
|
113
|
-
// An install must persist exactly the head it selected. A completed Add's
|
|
114
|
-
// rows are already on their rails, Apply owning accepted transitions and
|
|
115
|
-
// Detect local ones, so its difference from the head is syncing work.
|
|
116
|
-
const current = (0, index_js_1.installedSubtree)(installedRecords, setAside, subtree, normalizedId);
|
|
117
|
-
if (!Number.isSafeInteger(installed.rows)
|
|
118
|
-
|| installed.rows !== installedRecords.length
|
|
119
|
-
|| (!current && installed.alreadyMaterialized !== true)
|
|
120
|
-
|| !(0, index_js_1.sameRecords)([installed.reference], [selected.reference])
|
|
121
|
-
|| syncing.size !== installed.syncingReferences.length
|
|
122
|
-
|| listed.size !== installed.listedReferences.length
|
|
123
|
-
|| [...syncing].some((id) => !accepted.has(id))
|
|
124
|
-
|| [...listed].some((id) => !accepted.has(id) || syncing.has(id))
|
|
125
|
-
|| !(0, index_js_1.sameRecords)(installed.references, references.filter(({ uuid }) => !syncing.has(uuid) && !listed.has(uuid)))) {
|
|
126
|
-
throw new Error('workspace materialization did not persist exactly the selected graph');
|
|
127
|
-
}
|
|
128
|
-
const coverage = await ports.coverWorkspace({ workspaceId: normalizedId });
|
|
129
|
-
if (coverage.active !== true || !Number.isSafeInteger(coverage.roots) || coverage.roots < 1) {
|
|
130
|
-
throw new Error('workspace watcher coverage is not active');
|
|
131
|
-
}
|
|
132
|
-
return {
|
|
133
|
-
workspaceId: normalizedId,
|
|
134
|
-
workspaceName: selected.workspace.name,
|
|
135
|
-
path: required(installed.path, 'materialized workspace path'),
|
|
136
|
-
rows: installed.rows,
|
|
137
|
-
cloudHead: cloud.checksum,
|
|
138
|
-
materialized: true,
|
|
139
|
-
alreadyMaterialized: installed.alreadyMaterialized === true,
|
|
140
|
-
syncing: !current,
|
|
141
|
-
syncingReferences: [...syncing].sort(),
|
|
142
|
-
watcherRoots: coverage.roots,
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
//# sourceMappingURL=commands.js.map
|
|
1
|
+
"use strict";var _=Object.defineProperty;var u=(o,t)=>_(o,"name",{value:t,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.registerFilesWorkspace=W,exports.workspaceGraph=F,exports.addFilesWorkspace=N;const d=require("../entities/index.js"),E=require("./computer-address.js"),v=require("./own-folders.js");function m(o,t){const e=typeof o=="string"?o.trim().toLowerCase():"";if(!d.UUID_PATTERN.test(e))throw new Error(`${t} must be a UUID`);return e}u(m,"uuid");function l(o,t){const e=typeof o=="string"?o.trim():"";if(!e)throw new Error(`${t} is required`);return e}u(l,"required");async function W(o,t){const e=l(o,"workspace path"),r=await t.inspectExternalWorkspace(e),c=l(r.absolutePath,"external workspace path"),i=(0,v.ownFolderRefusal)("files register",c,r.amalgmFolders);if(i)throw i;const p=l(r.name,"workspace name"),a=r.workspaceId===null?m(t.randomUuid(),"generated workspace id"):m(r.workspaceId,"existing workspace id"),w=await t.placeWorkspaceReference({workspaceId:a,absolutePath:c,address:(0,E.computerAddress)(await t.computerFolder(),c)});return{workspaceId:a,workspaceName:p,externalPath:c,referenceName:l(w.referenceName,"reference name"),referencePath:l(w.referencePath,"reference path"),declared:!0,created:w.created===!0}}u(W,"registerFilesWorkspace");function F(o,t){const e=m(t,"workspace id"),r=(0,d.snapshotFromRecords)(o),c=r.records.find(a=>a.uuid===e);if(!c||c.status!=="active")throw new Error(`workspace ${e} does not exist in this user's cloud registry`);if(!d.CONTAINERS.has(c.type))throw new Error(`entity ${e} is not a registered workspace boundary`);const i=r.records.filter(a=>a.status==="active"&&a.type==="reference"&&a.payloadVersion===e);if(i.length!==1)throw new Error(`workspace ${e} must have exactly one durable reference`);const p=(0,d.containedRecords)(r.records,e);return{workspace:c,reference:i[0],subtree:p,records:(0,d.materializableRecords)(p,e)}}u(F,"workspaceGraph");async function N(o,t,e){const r=m(o,"workspace id"),c=l(t,"destination directory"),i=await e.lookupRegistry(r),{subtree:p,...a}=F(i.snapshot.records,r),w=await e.inspectDestination({workspaceId:r,destinationParent:c,name:a.workspace.name}),y=(0,v.ownFolderRefusal)("files add",l(w.absolutePath,"destination path"),w.amalgmFolders);if(y)throw y;const P=new Set(a.records.map(({uuid:s})=>s)),R=p.filter(({uuid:s})=>!P.has(s)),k=i.snapshot.records.filter(s=>s.status==="active"&&s.type==="reference"),n=await e.materializeWorkspace({...a,setAside:R,references:k,destinationParent:c,cloudHead:l(i.checksum,"cloud head"),deliveryWatermark:i.deliveryWatermark}),z=(0,d.snapshotFromRecords)(n.records||[]).records,f=new Set(n.syncingReferences),g=new Set(n.listedReferences),b=new Set(k.map(({uuid:s})=>s)),I=(0,d.installedSubtree)(z,R,p,r);if(!Number.isSafeInteger(n.rows)||n.rows!==z.length||!I&&n.alreadyMaterialized!==!0||!(0,d.sameRecords)([n.reference],[a.reference])||f.size!==n.syncingReferences.length||g.size!==n.listedReferences.length||[...f].some(s=>!b.has(s))||[...g].some(s=>!b.has(s)||f.has(s))||!(0,d.sameRecords)(n.references,k.filter(({uuid:s})=>!f.has(s)&&!g.has(s))))throw new Error("workspace materialization did not persist exactly the selected graph");const h=await e.coverWorkspace({workspaceId:r});if(h.active!==!0||!Number.isSafeInteger(h.roots)||h.roots<1)throw new Error("workspace watcher coverage is not active");return{workspaceId:r,workspaceName:a.workspace.name,path:l(n.path,"materialized workspace path"),rows:n.rows,cloudHead:i.checksum,materialized:!0,alreadyMaterialized:n.alreadyMaterialized===!0,syncing:!I,syncingReferences:[...f].sort(),watcherRoots:h.roots}}u(N,"addFilesWorkspace");
|
|
@@ -1,52 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.computerFolder = computerFolder;
|
|
4
|
-
exports.computerAddress = computerAddress;
|
|
5
|
-
/**
|
|
6
|
-
* Where ground outside the Amalgm folder lives in the home: the computers
|
|
7
|
-
* folder holds one folder per computer, and in it each added folder stands at
|
|
8
|
-
* the absolute path it has on that computer. Every computer shows it at the
|
|
9
|
-
* same address, `files/<computer>/<path>`, so a folder from one computer is
|
|
10
|
-
* found where its own computer keeps it. Only the folders on that path that
|
|
11
|
-
* Amalgm holds exist; the rest of the computer's disk is no part of the home.
|
|
12
|
-
*/
|
|
13
|
-
const identity_1 = require("@amalgm/core/identity");
|
|
14
|
-
const rules_js_1 = require("../entities/rules.js");
|
|
15
|
-
const home_layout_js_1 = require("../registration/home-layout.js");
|
|
16
|
-
/** A Windows drive path: its letter, then the rest. */
|
|
17
|
-
const WINDOWS_DRIVE = /^([A-Za-z]):[\\/](.*)$/;
|
|
18
|
-
/** The folder a computer stands at in the computers folder: its name made
|
|
19
|
-
* safe for every disk, with `-2`, `-3`, … when another computer already holds
|
|
20
|
-
* that name in any letter case. A host chooses it once, from the names the
|
|
21
|
-
* accepted graph holds there, and keeps it. */
|
|
22
|
-
function computerFolder(name, taken) {
|
|
23
|
-
return (0, identity_1.entityFolderName)(name, taken);
|
|
24
|
-
}
|
|
25
|
-
/** The address in the home of a folder at an absolute path on a computer:
|
|
26
|
-
* the computers folder, the computer's folder, then each segment of the path.
|
|
27
|
-
* A POSIX path splits on `/`; a Windows drive path keeps its letter as the
|
|
28
|
-
* first segment. A path naming no folder below a disk's top, or passing
|
|
29
|
-
* through a local-only folder (`.amalgm`, `.private`), is refused. */
|
|
30
|
-
function computerAddress(computer, absolutePath) {
|
|
31
|
-
const segments = pathSegments(absolutePath);
|
|
32
|
-
if (segments.length === 0)
|
|
33
|
-
throw new Error(`an added folder must stand below its disk's top, not at ${JSON.stringify(absolutePath)}`);
|
|
34
|
-
for (const name of [computer, ...segments]) {
|
|
35
|
-
if (!(0, rules_js_1.isName)(name))
|
|
36
|
-
throw new Error(`invalid entity name ${JSON.stringify(name)}: a name is one non-empty path segment`);
|
|
37
|
-
if ((0, identity_1.isLocalOnlyPath)(name))
|
|
38
|
-
throw new Error(`an added folder must not stand inside ${JSON.stringify(name)}, which never leaves its computer`);
|
|
39
|
-
}
|
|
40
|
-
return [home_layout_js_1.FILES_FOLDER, computer, ...segments];
|
|
41
|
-
}
|
|
42
|
-
function pathSegments(absolutePath) {
|
|
43
|
-
const windows = WINDOWS_DRIVE.exec(absolutePath);
|
|
44
|
-
if (windows !== null) {
|
|
45
|
-
const rest = windows[2].split(/[\\/]/).filter(segment => segment !== '');
|
|
46
|
-
return rest.length === 0 ? [] : [windows[1].toUpperCase(), ...rest];
|
|
47
|
-
}
|
|
48
|
-
if (!absolutePath.startsWith('/'))
|
|
49
|
-
throw new Error(`${JSON.stringify(absolutePath)} is not an absolute path`);
|
|
50
|
-
return absolutePath.split('/').filter(segment => segment !== '');
|
|
51
|
-
}
|
|
52
|
-
//# sourceMappingURL=computer-address.js.map
|
|
1
|
+
"use strict";var o=Object.defineProperty;var s=(e,t)=>o(e,"name",{value:t,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.computerFolder=a,exports.computerAddress=f;const i=require("@amalgm/core/identity"),d=require("../entities/rules.js"),c=require("../registration/home-layout.js"),u=/^([A-Za-z]):[\\/](.*)$/;function a(e,t){return(0,i.entityFolderName)(e,t)}s(a,"computerFolder");function f(e,t){const r=l(t);if(r.length===0)throw new Error(`an added folder must stand below its disk's top, not at ${JSON.stringify(t)}`);for(const n of[e,...r]){if(!(0,d.isName)(n))throw new Error(`invalid entity name ${JSON.stringify(n)}: a name is one non-empty path segment`);if((0,i.isLocalOnlyPath)(n))throw new Error(`an added folder must not stand inside ${JSON.stringify(n)}, which never leaves its computer`)}return[c.FILES_FOLDER,e,...r]}s(f,"computerAddress");function l(e){const t=u.exec(e);if(t!==null){const r=t[2].split(/[\\/]/).filter(n=>n!=="");return r.length===0?[]:[t[1].toUpperCase(),...r]}if(!e.startsWith("/"))throw new Error(`${JSON.stringify(e)} is not an absolute path`);return e.split("/").filter(r=>r!=="")}s(l,"pathSegments");
|
package/dist-cjs/files/index.js
CHANGED
|
@@ -1,65 +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.filesUsageGitDirectory = exports.filesUsageGitArtifact = exports.filesUsageHolding = exports.filesUsageEffect = exports.FILES_USAGE_NOTHING = exports.filesUsageOwnBytes = exports.filesUsageKept = exports.filesUsageInTrash = exports.filesUsageHolds = exports.countFilesUsage = exports.FILES_USAGE_LARGEST = exports.filesUsageCategory = exports.FILES_USAGE_CATEGORIES = exports.filesPlanFor = exports.FILES_PLANS = exports.filesMediaType = exports.statedResults = exports.acceptedFilesRecords = exports.acceptedFilesPort = exports.acceptedFilesChecksum = exports.LocalFiles = exports.CloudFilesView = exports.CloudFiles = exports.amalgmUserRoot = exports.FilesRequestError = exports.FilesBrowser = exports.createFilesApi = exports.ownFolderRefusal = exports.computerFolder = exports.computerAddress = void 0;
|
|
18
|
-
/** Files product operations. Hosts own effects; Live owns decisions. */
|
|
19
|
-
__exportStar(require("./commands.js"), exports);
|
|
20
|
-
var computer_address_js_1 = require("./computer-address.js");
|
|
21
|
-
Object.defineProperty(exports, "computerAddress", { enumerable: true, get: function () { return computer_address_js_1.computerAddress; } });
|
|
22
|
-
Object.defineProperty(exports, "computerFolder", { enumerable: true, get: function () { return computer_address_js_1.computerFolder; } });
|
|
23
|
-
var own_folders_js_1 = require("./own-folders.js");
|
|
24
|
-
Object.defineProperty(exports, "ownFolderRefusal", { enumerable: true, get: function () { return own_folders_js_1.ownFolderRefusal; } });
|
|
25
|
-
__exportStar(require("./trash.js"), exports);
|
|
26
|
-
var api_js_1 = require("./api.js");
|
|
27
|
-
Object.defineProperty(exports, "createFilesApi", { enumerable: true, get: function () { return api_js_1.createFilesApi; } });
|
|
28
|
-
var browser_js_1 = require("./browser.js");
|
|
29
|
-
Object.defineProperty(exports, "FilesBrowser", { enumerable: true, get: function () { return browser_js_1.FilesBrowser; } });
|
|
30
|
-
var browse_types_js_1 = require("./browse-types.js");
|
|
31
|
-
Object.defineProperty(exports, "FilesRequestError", { enumerable: true, get: function () { return browse_types_js_1.FilesRequestError; } });
|
|
32
|
-
Object.defineProperty(exports, "amalgmUserRoot", { enumerable: true, get: function () { return browse_types_js_1.amalgmUserRoot; } });
|
|
33
|
-
var cloud_files_js_1 = require("./cloud-files.js");
|
|
34
|
-
Object.defineProperty(exports, "CloudFiles", { enumerable: true, get: function () { return cloud_files_js_1.CloudFiles; } });
|
|
35
|
-
Object.defineProperty(exports, "CloudFilesView", { enumerable: true, get: function () { return cloud_files_js_1.CloudFilesView; } });
|
|
36
|
-
var local_files_js_1 = require("./local-files.js");
|
|
37
|
-
Object.defineProperty(exports, "LocalFiles", { enumerable: true, get: function () { return local_files_js_1.LocalFiles; } });
|
|
38
|
-
var accepted_files_js_1 = require("./accepted-files.js");
|
|
39
|
-
Object.defineProperty(exports, "acceptedFilesChecksum", { enumerable: true, get: function () { return accepted_files_js_1.acceptedFilesChecksum; } });
|
|
40
|
-
Object.defineProperty(exports, "acceptedFilesPort", { enumerable: true, get: function () { return accepted_files_js_1.acceptedFilesPort; } });
|
|
41
|
-
Object.defineProperty(exports, "acceptedFilesRecords", { enumerable: true, get: function () { return accepted_files_js_1.acceptedFilesRecords; } });
|
|
42
|
-
Object.defineProperty(exports, "statedResults", { enumerable: true, get: function () { return accepted_files_js_1.statedResults; } });
|
|
43
|
-
var media_type_js_1 = require("./media-type.js");
|
|
44
|
-
Object.defineProperty(exports, "filesMediaType", { enumerable: true, get: function () { return media_type_js_1.filesMediaType; } });
|
|
45
|
-
var plans_js_1 = require("./plans.js");
|
|
46
|
-
Object.defineProperty(exports, "FILES_PLANS", { enumerable: true, get: function () { return plans_js_1.FILES_PLANS; } });
|
|
47
|
-
Object.defineProperty(exports, "filesPlanFor", { enumerable: true, get: function () { return plans_js_1.filesPlanFor; } });
|
|
48
|
-
var usage_categories_js_1 = require("./usage-categories.js");
|
|
49
|
-
Object.defineProperty(exports, "FILES_USAGE_CATEGORIES", { enumerable: true, get: function () { return usage_categories_js_1.FILES_USAGE_CATEGORIES; } });
|
|
50
|
-
Object.defineProperty(exports, "filesUsageCategory", { enumerable: true, get: function () { return usage_categories_js_1.filesUsageCategory; } });
|
|
51
|
-
var usage_js_1 = require("./usage.js");
|
|
52
|
-
Object.defineProperty(exports, "FILES_USAGE_LARGEST", { enumerable: true, get: function () { return usage_js_1.FILES_USAGE_LARGEST; } });
|
|
53
|
-
Object.defineProperty(exports, "countFilesUsage", { enumerable: true, get: function () { return usage_js_1.countFilesUsage; } });
|
|
54
|
-
Object.defineProperty(exports, "filesUsageHolds", { enumerable: true, get: function () { return usage_js_1.filesUsageHolds; } });
|
|
55
|
-
Object.defineProperty(exports, "filesUsageInTrash", { enumerable: true, get: function () { return usage_js_1.filesUsageInTrash; } });
|
|
56
|
-
Object.defineProperty(exports, "filesUsageKept", { enumerable: true, get: function () { return usage_js_1.filesUsageKept; } });
|
|
57
|
-
Object.defineProperty(exports, "filesUsageOwnBytes", { enumerable: true, get: function () { return usage_js_1.filesUsageOwnBytes; } });
|
|
58
|
-
var usage_effect_js_1 = require("./usage-effect.js");
|
|
59
|
-
Object.defineProperty(exports, "FILES_USAGE_NOTHING", { enumerable: true, get: function () { return usage_effect_js_1.FILES_USAGE_NOTHING; } });
|
|
60
|
-
Object.defineProperty(exports, "filesUsageEffect", { enumerable: true, get: function () { return usage_effect_js_1.filesUsageEffect; } });
|
|
61
|
-
Object.defineProperty(exports, "filesUsageHolding", { enumerable: true, get: function () { return usage_effect_js_1.filesUsageHolding; } });
|
|
62
|
-
var usage_chain_js_1 = require("./usage-chain.js");
|
|
63
|
-
Object.defineProperty(exports, "filesUsageGitArtifact", { enumerable: true, get: function () { return usage_chain_js_1.filesUsageGitArtifact; } });
|
|
64
|
-
Object.defineProperty(exports, "filesUsageGitDirectory", { enumerable: true, get: function () { return usage_chain_js_1.filesUsageGitDirectory; } });
|
|
65
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use strict";var p=Object.defineProperty;var e=(i,r)=>p(i,"name",{value:r,configurable:!0});var F=exports&&exports.__createBinding||(Object.create?(function(i,r,t,n){n===void 0&&(n=t);var u=Object.getOwnPropertyDescriptor(r,t);(!u||("get"in u?!r.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:e(function(){return r[t]},"get")}),Object.defineProperty(i,n,u)}):(function(i,r,t,n){n===void 0&&(n=t),i[n]=r[t]})),o=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.filesUsageGitDirectory=exports.filesUsageGitArtifact=exports.filesUsageHolding=exports.filesUsageEffect=exports.FILES_USAGE_NOTHING=exports.filesUsageOwnBytes=exports.filesUsageKept=exports.filesUsageInTrash=exports.filesUsageHolds=exports.countFilesUsage=exports.FILES_USAGE_LARGEST=exports.filesUsageCategory=exports.FILES_USAGE_CATEGORIES=exports.filesPlanFor=exports.FILES_PLANS=exports.filesMediaType=exports.statedResults=exports.acceptedFilesRecords=exports.acceptedFilesPort=exports.acceptedFilesChecksum=exports.LocalFiles=exports.CloudFilesView=exports.CloudFiles=exports.amalgmUserRoot=exports.FilesRequestError=exports.FilesBrowser=exports.createFilesApi=exports.ownFolderRefusal=exports.computerFolder=exports.computerAddress=void 0,o(require("./commands.js"),exports);var c=require("./computer-address.js");Object.defineProperty(exports,"computerAddress",{enumerable:!0,get:e(function(){return c.computerAddress},"get")}),Object.defineProperty(exports,"computerFolder",{enumerable:!0,get:e(function(){return c.computerFolder},"get")});var j=require("./own-folders.js");Object.defineProperty(exports,"ownFolderRefusal",{enumerable:!0,get:e(function(){return j.ownFolderRefusal},"get")}),o(require("./trash.js"),exports);var y=require("./api.js");Object.defineProperty(exports,"createFilesApi",{enumerable:!0,get:e(function(){return y.createFilesApi},"get")});var O=require("./browser.js");Object.defineProperty(exports,"FilesBrowser",{enumerable:!0,get:e(function(){return O.FilesBrowser},"get")});var f=require("./browse-types.js");Object.defineProperty(exports,"FilesRequestError",{enumerable:!0,get:e(function(){return f.FilesRequestError},"get")}),Object.defineProperty(exports,"amalgmUserRoot",{enumerable:!0,get:e(function(){return f.amalgmUserRoot},"get")});var d=require("./cloud-files.js");Object.defineProperty(exports,"CloudFiles",{enumerable:!0,get:e(function(){return d.CloudFiles},"get")}),Object.defineProperty(exports,"CloudFilesView",{enumerable:!0,get:e(function(){return d.CloudFilesView},"get")});var m=require("./local-files.js");Object.defineProperty(exports,"LocalFiles",{enumerable:!0,get:e(function(){return m.LocalFiles},"get")});var a=require("./accepted-files.js");Object.defineProperty(exports,"acceptedFilesChecksum",{enumerable:!0,get:e(function(){return a.acceptedFilesChecksum},"get")}),Object.defineProperty(exports,"acceptedFilesPort",{enumerable:!0,get:e(function(){return a.acceptedFilesPort},"get")}),Object.defineProperty(exports,"acceptedFilesRecords",{enumerable:!0,get:e(function(){return a.acceptedFilesRecords},"get")}),Object.defineProperty(exports,"statedResults",{enumerable:!0,get:e(function(){return a.statedResults},"get")});var P=require("./media-type.js");Object.defineProperty(exports,"filesMediaType",{enumerable:!0,get:e(function(){return P.filesMediaType},"get")});var g=require("./plans.js");Object.defineProperty(exports,"FILES_PLANS",{enumerable:!0,get:e(function(){return g.FILES_PLANS},"get")}),Object.defineProperty(exports,"filesPlanFor",{enumerable:!0,get:e(function(){return g.filesPlanFor},"get")});var _=require("./usage-categories.js");Object.defineProperty(exports,"FILES_USAGE_CATEGORIES",{enumerable:!0,get:e(function(){return _.FILES_USAGE_CATEGORIES},"get")}),Object.defineProperty(exports,"filesUsageCategory",{enumerable:!0,get:e(function(){return _.filesUsageCategory},"get")});var s=require("./usage.js");Object.defineProperty(exports,"FILES_USAGE_LARGEST",{enumerable:!0,get:e(function(){return s.FILES_USAGE_LARGEST},"get")}),Object.defineProperty(exports,"countFilesUsage",{enumerable:!0,get:e(function(){return s.countFilesUsage},"get")}),Object.defineProperty(exports,"filesUsageHolds",{enumerable:!0,get:e(function(){return s.filesUsageHolds},"get")}),Object.defineProperty(exports,"filesUsageInTrash",{enumerable:!0,get:e(function(){return s.filesUsageInTrash},"get")}),Object.defineProperty(exports,"filesUsageKept",{enumerable:!0,get:e(function(){return s.filesUsageKept},"get")}),Object.defineProperty(exports,"filesUsageOwnBytes",{enumerable:!0,get:e(function(){return s.filesUsageOwnBytes},"get")});var l=require("./usage-effect.js");Object.defineProperty(exports,"FILES_USAGE_NOTHING",{enumerable:!0,get:e(function(){return l.FILES_USAGE_NOTHING},"get")}),Object.defineProperty(exports,"filesUsageEffect",{enumerable:!0,get:e(function(){return l.filesUsageEffect},"get")}),Object.defineProperty(exports,"filesUsageHolding",{enumerable:!0,get:e(function(){return l.filesUsageHolding},"get")});var b=require("./usage-chain.js");Object.defineProperty(exports,"filesUsageGitArtifact",{enumerable:!0,get:e(function(){return b.filesUsageGitArtifact},"get")}),Object.defineProperty(exports,"filesUsageGitDirectory",{enumerable:!0,get:e(function(){return b.filesUsageGitDirectory},"get")});
|