@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,153 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { FilesRequestError, assertFilesContent, canonicalUserEmail, } from './browse-types.js';
|
|
3
|
-
import { isUserGroundRoot } from '../registration/user-ground.js';
|
|
4
|
-
const HASH = /^[0-9a-f]{64}$/;
|
|
5
|
-
const READABLE_TYPES = new Set(['file.text', 'file.binary', 'link']);
|
|
6
|
-
export class CloudFiles {
|
|
7
|
-
port;
|
|
8
|
-
userEmail;
|
|
9
|
-
constructor(userEmail, port) {
|
|
10
|
-
this.port = port;
|
|
11
|
-
this.userEmail = canonicalUserEmail(userEmail);
|
|
12
|
-
}
|
|
13
|
-
async open() {
|
|
14
|
-
return new CloudFilesView(assertHead(await this.port.openActiveHead(), this.userEmail), this.port);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
export class CloudFilesView {
|
|
18
|
-
head;
|
|
19
|
-
port;
|
|
20
|
-
constructor(head, port) {
|
|
21
|
-
this.head = head;
|
|
22
|
-
this.port = port;
|
|
23
|
-
}
|
|
24
|
-
async list(parentId) {
|
|
25
|
-
const requestedId = parentId === undefined || !parentId.trim()
|
|
26
|
-
? this.head.root.uuid
|
|
27
|
-
: entityId(parentId, 'parent entity id');
|
|
28
|
-
const directory = requestedId === this.head.root.uuid
|
|
29
|
-
? directNode(this.head.root, this.head.root.parentUUID)
|
|
30
|
-
: await this.resolveNode(requestedId);
|
|
31
|
-
if (!CONTAINERS.has(directory.entity.type)) {
|
|
32
|
-
throw new FilesRequestError(400, 'not_a_directory', 'entity is not a directory');
|
|
33
|
-
}
|
|
34
|
-
const value = await this.port.list({ head: this.head, parentId: directory.entity.uuid });
|
|
35
|
-
const listed = value;
|
|
36
|
-
if (!listed || !Array.isArray(listed.entries))
|
|
37
|
-
throw new Error('cloud files returned an invalid directory');
|
|
38
|
-
const storedDirectory = activeRecord(listed.directory, 'cloud directory');
|
|
39
|
-
if (storedDirectory.uuid !== directory.entity.uuid || !CONTAINERS.has(storedDirectory.type)) {
|
|
40
|
-
throw new Error('cloud files returned the wrong directory');
|
|
41
|
-
}
|
|
42
|
-
if (!sameRecord(storedDirectory, directory.entity)) {
|
|
43
|
-
throw new Error('cloud files directory does not match the opened head');
|
|
44
|
-
}
|
|
45
|
-
const records = listed.entries.map((entry) => activeRecord(entry, 'cloud directory entry'));
|
|
46
|
-
const ids = new Set();
|
|
47
|
-
const names = new Set();
|
|
48
|
-
for (const entry of records) {
|
|
49
|
-
if (entry.parentUUID !== storedDirectory.uuid)
|
|
50
|
-
throw new Error('cloud directory entry has the wrong parent');
|
|
51
|
-
if (ids.has(entry.uuid) || names.has(entry.name))
|
|
52
|
-
throw new Error('cloud directory has duplicate entries');
|
|
53
|
-
ids.add(entry.uuid);
|
|
54
|
-
names.add(entry.name);
|
|
55
|
-
}
|
|
56
|
-
const entries = await Promise.all(records.map((record) => record.type === 'reference'
|
|
57
|
-
? this.referenceNode(record, directory.entryId)
|
|
58
|
-
: Promise.resolve(directNode(record, directory.entryId))));
|
|
59
|
-
return { directory, entries: [...entries].sort(compareEntries) };
|
|
60
|
-
}
|
|
61
|
-
async entry(value) {
|
|
62
|
-
const requestedId = entityId(value, 'entity id');
|
|
63
|
-
return (await this.resolveNode(requestedId)).entity;
|
|
64
|
-
}
|
|
65
|
-
async resolveNode(requestedId) {
|
|
66
|
-
const found = await this.port.entry({ head: this.head, entityId: requestedId });
|
|
67
|
-
if (found === null || found === undefined) {
|
|
68
|
-
throw new FilesRequestError(404, 'entity_not_found', 'file does not exist in the active cloud head');
|
|
69
|
-
}
|
|
70
|
-
const entry = activeRecord(found, 'cloud file');
|
|
71
|
-
if (entry.uuid !== requestedId)
|
|
72
|
-
throw new Error('cloud files returned the wrong entity');
|
|
73
|
-
return entry.type === 'reference'
|
|
74
|
-
? this.referenceNode(entry, entry.parentUUID)
|
|
75
|
-
: directNode(entry, entry.parentUUID);
|
|
76
|
-
}
|
|
77
|
-
async referenceNode(reference, parentEntityId) {
|
|
78
|
-
if (typeof reference.payloadVersion !== 'string') {
|
|
79
|
-
throw new Error(`cloud reference ${reference.uuid} has no target`);
|
|
80
|
-
}
|
|
81
|
-
const targetId = reference.payloadVersion.toLowerCase();
|
|
82
|
-
if (!UUID_PATTERN.test(targetId)) {
|
|
83
|
-
throw new Error(`cloud reference ${reference.uuid} has an invalid target UUID`);
|
|
84
|
-
}
|
|
85
|
-
const value = await this.port.entry({ head: this.head, entityId: targetId });
|
|
86
|
-
if (value === null || value === undefined) {
|
|
87
|
-
throw new Error(`cloud reference ${reference.uuid} has no active target`);
|
|
88
|
-
}
|
|
89
|
-
const target = activeRecord(value, 'cloud reference target');
|
|
90
|
-
if (target.uuid !== targetId || target.type === 'reference') {
|
|
91
|
-
throw new Error(`cloud reference ${reference.uuid} has an invalid target`);
|
|
92
|
-
}
|
|
93
|
-
return {
|
|
94
|
-
entryId: reference.uuid,
|
|
95
|
-
entity: target,
|
|
96
|
-
parentEntityId,
|
|
97
|
-
name: reference.name,
|
|
98
|
-
referenceId: reference.uuid,
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
async read(entry) {
|
|
102
|
-
assertReadable(entry);
|
|
103
|
-
const content = assertFilesContent(await this.port.read({ head: this.head, entity: entry }), 'cloud files port');
|
|
104
|
-
if (content.version !== entry.version)
|
|
105
|
-
throw new Error('cloud content does not match the opened head');
|
|
106
|
-
return content;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
export function assertReadable(entry) {
|
|
110
|
-
if (!READABLE_TYPES.has(entry.type)) {
|
|
111
|
-
throw new FilesRequestError(400, 'not_readable', 'entity does not have directly readable file content');
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
function assertHead(value, userEmail) {
|
|
115
|
-
const head = value;
|
|
116
|
-
if (!head || typeof head.checksum !== 'string' || !HASH.test(head.checksum)
|
|
117
|
-
|| !Number.isSafeInteger(head.version) || Number(head.version) < 0) {
|
|
118
|
-
throw new Error('cloud files returned an invalid active head');
|
|
119
|
-
}
|
|
120
|
-
const root = activeRecord(head.root, 'cloud files root');
|
|
121
|
-
if (!isUserGroundRoot(root, userEmail)) {
|
|
122
|
-
throw new Error('cloud files head does not name the authenticated user root');
|
|
123
|
-
}
|
|
124
|
-
return { checksum: head.checksum, version: Number(head.version), root };
|
|
125
|
-
}
|
|
126
|
-
function activeRecord(value, label) {
|
|
127
|
-
const record = assertRecord(value);
|
|
128
|
-
if (record.status !== 'active')
|
|
129
|
-
throw new Error(`${label} is not active`);
|
|
130
|
-
return record;
|
|
131
|
-
}
|
|
132
|
-
function entityId(value, label) {
|
|
133
|
-
const normalized = value.trim().toLowerCase();
|
|
134
|
-
if (!UUID_PATTERN.test(normalized)) {
|
|
135
|
-
throw new FilesRequestError(400, 'invalid_request', `${label} must be a UUID`);
|
|
136
|
-
}
|
|
137
|
-
return normalized;
|
|
138
|
-
}
|
|
139
|
-
function directNode(entity, parentEntityId) {
|
|
140
|
-
return {
|
|
141
|
-
entryId: entity.uuid,
|
|
142
|
-
entity,
|
|
143
|
-
parentEntityId,
|
|
144
|
-
name: entity.name,
|
|
145
|
-
referenceId: null,
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
function compareEntries(left, right) {
|
|
149
|
-
if (left.name !== right.name)
|
|
150
|
-
return left.name < right.name ? -1 : 1;
|
|
151
|
-
return left.entryId < right.entryId ? -1 : left.entryId > right.entryId ? 1 : 0;
|
|
152
|
-
}
|
|
153
|
-
//# sourceMappingURL=cloud-files.js.map
|
|
1
|
+
var I=Object.defineProperty;var a=(o,e)=>I(o,"name",{value:e,configurable:!0});import{CONTAINERS as p,UUID_PATTERN as m,assertRecord as E,sameRecord as U}from"../entities/index.js";import{FilesRequestError as s,assertFilesContent as N,canonicalUserEmail as g}from"./browse-types.js";import{isUserGroundRoot as D}from"../registration/user-ground.js";const _=/^[0-9a-f]{64}$/,R=new Set(["file.text","file.binary","link"]);class q{static{a(this,"CloudFiles")}port;userEmail;constructor(e,t){this.port=t,this.userEmail=g(e)}async open(){return new b(C(await this.port.openActiveHead(),this.userEmail),this.port)}}class b{static{a(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:l(e,"parent entity id"),r=t===this.head.root.uuid?c(this.head.root,this.head.root.parentUUID):await this.resolveNode(t);if(!p.has(r.entity.type))throw new s(400,"not_a_directory","entity is not a directory");const d=await this.port.list({head:this.head,parentId:r.entity.uuid});if(!d||!Array.isArray(d.entries))throw new Error("cloud files returned an invalid directory");const h=u(d.directory,"cloud directory");if(h.uuid!==r.entity.uuid||!p.has(h.type))throw new Error("cloud files returned the wrong directory");if(!U(h,r.entity))throw new Error("cloud files directory does not match the opened head");const y=d.entries.map(i=>u(i,"cloud directory entry")),f=new Set,w=new Set;for(const i of y){if(i.parentUUID!==h.uuid)throw new Error("cloud directory entry has the wrong parent");if(f.has(i.uuid)||w.has(i.name))throw new Error("cloud directory has duplicate entries");f.add(i.uuid),w.add(i.name)}const v=await Promise.all(y.map(i=>i.type==="reference"?this.referenceNode(i,r.entryId):Promise.resolve(c(i,r.entryId))));return{directory:r,entries:[...v].sort(S)}}async entry(e){const t=l(e,"entity id");return(await this.resolveNode(t)).entity}async place(e){const t=l(e,"entity id"),r=[];let n=t===this.head.root.uuid?c(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(d=>d.entity.uuid===n.entity.uuid))throw new s(404,"entity_not_found","file is not in the active cloud head");r.unshift(n),n=n.parentEntityId===this.head.root.uuid?c(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 s(404,"entity_not_found","file is not in the active cloud head");const r=u(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 s(404,"entity_not_found","file does not exist in the active cloud head");const r=u(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):c(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(!m.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 d=u(n,"cloud reference target");if(d.uuid!==r||d.type==="reference")throw new Error(`cloud reference ${e.uuid} has an invalid target`);return{entryId:e.uuid,entity:d,parentEntityId:t,name:e.name,referenceId:e.uuid}}async read(e){A(e);const t=N(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}}function A(o){if(!R.has(o.type))throw new s(400,"not_readable","entity does not have directly readable file content")}a(A,"assertReadable");function C(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=u(t.root,"cloud files root");if(!D(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}}a(C,"assertHead");function u(o,e){const t=E(o);if(t.status!=="active")throw new Error(`${e} is not active`);return t}a(u,"activeRecord");function l(o,e){const t=o.trim().toLowerCase();if(!m.test(t))throw new s(400,"invalid_request",`${e} must be a UUID`);return t}a(l,"entityId");function c(o,e){return{entryId:o.uuid,entity:o,parentEntityId:e,name:o.name,referenceId:null}}a(c,"directNode");function S(o,e){return o.name!==e.name?o.name<e.name?-1:1:o.entryId<e.entryId?-1:o.entryId>e.entryId?1:0}a(S,"compareEntries");export{q as CloudFiles,b as CloudFilesView,A as assertReadable};
|
package/dist/files/commands.d.ts
CHANGED
|
@@ -4,29 +4,16 @@ import { type AmalgmFolderMet } from './own-folders.js';
|
|
|
4
4
|
export interface ExternalWorkspaceInspection {
|
|
5
5
|
readonly absolutePath: string;
|
|
6
6
|
readonly name: string;
|
|
7
|
-
/** Present only when this machine already binds the same physical root. */
|
|
8
7
|
readonly workspaceId: string | null;
|
|
9
|
-
/** How the ground meets Amalgm's own folders (`own-folders.ts`), measured
|
|
10
|
-
* physically by the host; empty when it meets none. */
|
|
11
8
|
readonly amalgmFolders: readonly AmalgmFolderMet[];
|
|
12
9
|
}
|
|
13
10
|
export interface FilesRegisterPorts {
|
|
14
|
-
/** Resolve and prove an external directory without enrolling its contents. */
|
|
15
11
|
inspectExternalWorkspace(path: string): Promise<ExternalWorkspaceInspection>;
|
|
16
12
|
readonly randomUuid: () => string;
|
|
17
|
-
/** This computer's folder in the computers folder (`computerFolder`),
|
|
18
|
-
* chosen once and kept. */
|
|
19
13
|
computerFolder(): Promise<string>;
|
|
20
|
-
/** The sole effect of register: bring the ground inside Amalgm bounds.
|
|
21
|
-
* Record the local binding and render the reference at `address`, with
|
|
22
|
-
* the folders on its way; nothing is written inside the ground itself,
|
|
23
|
-
* whose sharing the home's one policy decides. Ordinary Detect then
|
|
24
|
-
* observes both, and the new ground travels as one package like any other
|
|
25
|
-
* new subtree. */
|
|
26
14
|
placeWorkspaceReference(input: {
|
|
27
15
|
readonly workspaceId: string;
|
|
28
16
|
readonly absolutePath: string;
|
|
29
|
-
/** Where the reference stands in the home (`computerAddress`). */
|
|
30
17
|
readonly address: readonly string[];
|
|
31
18
|
}): Promise<{
|
|
32
19
|
readonly created: boolean;
|
|
@@ -43,23 +30,10 @@ export interface FilesRegisterResult {
|
|
|
43
30
|
readonly declared: true;
|
|
44
31
|
readonly created: boolean;
|
|
45
32
|
}
|
|
46
|
-
/**
|
|
47
|
-
* Declare one external workspace: give it identity and link it into the
|
|
48
|
-
* home. Deliberately no scan, SQLite, content, or cloud port exists here:
|
|
49
|
-
* registration is a trigger, and the ground publishes through the one
|
|
50
|
-
* Detect → Record → Send path every other change takes.
|
|
51
|
-
*/
|
|
52
33
|
export declare function registerFilesWorkspace(path: string, ports: FilesRegisterPorts): Promise<FilesRegisterResult>;
|
|
53
34
|
export interface FilesAddPorts {
|
|
54
35
|
readonly sha256Hex: Sha256Hex;
|
|
55
|
-
/** Lookup is authenticated by the host and returns this user's one registry,
|
|
56
|
-
* scoped to the roots this add acts on: every root's own record plus the
|
|
57
|
-
* full records of the core root and the root holding `workspaceId`. */
|
|
58
36
|
lookupRegistry(workspaceId: string): Promise<CloudUserGround>;
|
|
59
|
-
/** Where this workspace's ground stands on this machine: where an earlier
|
|
60
|
-
* Add placed it or began to, else where a root named `name` would stand
|
|
61
|
-
* under `destinationParent`; and how that place meets Amalgm's own folders
|
|
62
|
-
* (`own-folders.ts`), measured physically by the host. Writes nothing. */
|
|
63
37
|
inspectDestination(input: {
|
|
64
38
|
readonly workspaceId: string;
|
|
65
39
|
readonly destinationParent: string;
|
|
@@ -68,29 +42,14 @@ export interface FilesAddPorts {
|
|
|
68
42
|
readonly absolutePath: string;
|
|
69
43
|
readonly amalgmFolders: readonly AmalgmFolderMet[];
|
|
70
44
|
}>;
|
|
71
|
-
/** Execute the crash-safe local install: durable intent, verified private
|
|
72
|
-
* staging, exact rows, atomic reveal, then binding, references, and the
|
|
73
|
-
* revealed root's Watch coverage, opened on the install's own verified graph
|
|
74
|
-
* as its one baseline only when nothing crossed a blind interval. Return
|
|
75
|
-
* with the intent still durable; healthy Watch coverage is the completion
|
|
76
|
-
* gate that clears it. Each accepted reference is current on this
|
|
77
|
-
* machine, named as still syncing (newer local work, or a transition
|
|
78
|
-
* already owned by Apply or Detect, is never overwritten by Add), or named
|
|
79
|
-
* as listed: its home is served by this computer's drive and the folders
|
|
80
|
-
* on its way are only listed, so the drive places it when something opens
|
|
81
|
-
* it. */
|
|
82
45
|
materializeWorkspace(input: {
|
|
83
46
|
readonly workspace: CloudEntityRecord;
|
|
84
47
|
readonly reference: CloudEntityRecord;
|
|
85
48
|
readonly references: readonly CloudEntityRecord[];
|
|
86
49
|
readonly records: readonly CloudEntityRecord[];
|
|
87
|
-
/** The selected subtree's members this machine does not reveal (its
|
|
88
|
-
* trash). The install verifies each absent, and only verified
|
|
89
|
-
* materialization discharges an entity's Apply work. */
|
|
90
50
|
readonly setAside: readonly CloudEntityRecord[];
|
|
91
51
|
readonly destinationParent: string;
|
|
92
52
|
readonly cloudHead: string;
|
|
93
|
-
/** Complete delivery prefix represented by the selected materialization graph. */
|
|
94
53
|
readonly deliveryWatermark: number;
|
|
95
54
|
}): Promise<{
|
|
96
55
|
readonly path: string;
|
|
@@ -102,9 +61,6 @@ export interface FilesAddPorts {
|
|
|
102
61
|
readonly listedReferences: readonly string[];
|
|
103
62
|
readonly alreadyMaterialized: boolean;
|
|
104
63
|
}>;
|
|
105
|
-
/** Prove the one Watch owner the install opened. A recovered visible
|
|
106
|
-
* install must settle its blind interval before this effect clears the
|
|
107
|
-
* pending intent. */
|
|
108
64
|
coverWorkspace(input: {
|
|
109
65
|
readonly workspaceId: string;
|
|
110
66
|
}): Promise<{
|
|
@@ -120,24 +76,14 @@ export interface FilesAddResult {
|
|
|
120
76
|
readonly cloudHead: string;
|
|
121
77
|
readonly materialized: true;
|
|
122
78
|
readonly alreadyMaterialized: boolean;
|
|
123
|
-
/** The materialized workspace is still converging on the current head. */
|
|
124
79
|
readonly syncing: boolean;
|
|
125
|
-
/** Accepted references whose local state is still converging on its own rail. */
|
|
126
80
|
readonly syncingReferences: readonly string[];
|
|
127
81
|
readonly watcherRoots: number;
|
|
128
82
|
}
|
|
129
|
-
/** Select exactly one referenced materialization boundary. Its portable parent
|
|
130
|
-
* may live outside the selection; UUID, not parentlessness, is the boundary.
|
|
131
|
-
*
|
|
132
|
-
* `subtree` is the boundary's complete cloud graph, trash included; `records`
|
|
133
|
-
* is the part a machine reveals: the subtree's active closure. Trash changes
|
|
134
|
-
* only status, so a trashed repository is still a repository. */
|
|
135
83
|
export declare function workspaceGraph(records: readonly CloudEntityRecord[], workspaceId: string): {
|
|
136
84
|
readonly workspace: CloudEntityRecord;
|
|
137
85
|
readonly reference: CloudEntityRecord;
|
|
138
86
|
readonly subtree: readonly CloudEntityRecord[];
|
|
139
87
|
readonly records: readonly CloudEntityRecord[];
|
|
140
88
|
};
|
|
141
|
-
/** Materialize one owned workspace root and establish Watch coverage for it. */
|
|
142
89
|
export declare function addFilesWorkspace(workspaceId: string, destinationParent: string, ports: FilesAddPorts): Promise<FilesAddResult>;
|
|
143
|
-
//# sourceMappingURL=commands.d.ts.map
|
package/dist/files/commands.js
CHANGED
|
@@ -1,140 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { computerAddress } from './computer-address.js';
|
|
3
|
-
import { ownFolderRefusal } from './own-folders.js';
|
|
4
|
-
function uuid(value, label) {
|
|
5
|
-
const normalized = typeof value === 'string' ? value.trim().toLowerCase() : '';
|
|
6
|
-
if (!UUID_PATTERN.test(normalized))
|
|
7
|
-
throw new Error(`${label} must be a UUID`);
|
|
8
|
-
return normalized;
|
|
9
|
-
}
|
|
10
|
-
function required(value, label) {
|
|
11
|
-
const normalized = typeof value === 'string' ? value.trim() : '';
|
|
12
|
-
if (!normalized)
|
|
13
|
-
throw new Error(`${label} is required`);
|
|
14
|
-
return normalized;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Declare one external workspace: give it identity and link it into the
|
|
18
|
-
* home. Deliberately no scan, SQLite, content, or cloud port exists here:
|
|
19
|
-
* registration is a trigger, and the ground publishes through the one
|
|
20
|
-
* Detect → Record → Send path every other change takes.
|
|
21
|
-
*/
|
|
22
|
-
export async function registerFilesWorkspace(path, ports) {
|
|
23
|
-
const requestedPath = required(path, 'workspace path');
|
|
24
|
-
const inspected = await ports.inspectExternalWorkspace(requestedPath);
|
|
25
|
-
const absolutePath = required(inspected.absolutePath, 'external workspace path');
|
|
26
|
-
const refused = ownFolderRefusal('files register', absolutePath, inspected.amalgmFolders);
|
|
27
|
-
if (refused)
|
|
28
|
-
throw refused;
|
|
29
|
-
const workspaceName = required(inspected.name, 'workspace name');
|
|
30
|
-
const workspaceId = inspected.workspaceId === null
|
|
31
|
-
? uuid(ports.randomUuid(), 'generated workspace id')
|
|
32
|
-
: uuid(inspected.workspaceId, 'existing workspace id');
|
|
33
|
-
const declared = await ports.placeWorkspaceReference({
|
|
34
|
-
workspaceId,
|
|
35
|
-
absolutePath,
|
|
36
|
-
address: computerAddress(await ports.computerFolder(), absolutePath),
|
|
37
|
-
});
|
|
38
|
-
return {
|
|
39
|
-
workspaceId,
|
|
40
|
-
workspaceName,
|
|
41
|
-
externalPath: absolutePath,
|
|
42
|
-
referenceName: required(declared.referenceName, 'reference name'),
|
|
43
|
-
referencePath: required(declared.referencePath, 'reference path'),
|
|
44
|
-
declared: true,
|
|
45
|
-
created: declared.created === true,
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
/** Select exactly one referenced materialization boundary. Its portable parent
|
|
49
|
-
* may live outside the selection; UUID, not parentlessness, is the boundary.
|
|
50
|
-
*
|
|
51
|
-
* `subtree` is the boundary's complete cloud graph, trash included; `records`
|
|
52
|
-
* is the part a machine reveals: the subtree's active closure. Trash changes
|
|
53
|
-
* only status, so a trashed repository is still a repository. */
|
|
54
|
-
export function workspaceGraph(records, workspaceId) {
|
|
55
|
-
const normalizedId = uuid(workspaceId, 'workspace id');
|
|
56
|
-
const snapshot = snapshotFromRecords(records);
|
|
57
|
-
const workspace = snapshot.records.find((record) => record.uuid === normalizedId);
|
|
58
|
-
if (!workspace || workspace.status !== 'active') {
|
|
59
|
-
throw new Error(`workspace ${normalizedId} does not exist in this user's cloud registry`);
|
|
60
|
-
}
|
|
61
|
-
if (!CONTAINERS.has(workspace.type)) {
|
|
62
|
-
throw new Error(`entity ${normalizedId} is not a registered workspace boundary`);
|
|
63
|
-
}
|
|
64
|
-
const references = snapshot.records.filter((record) => record.status === 'active'
|
|
65
|
-
&& record.type === 'reference' && record.payloadVersion === normalizedId);
|
|
66
|
-
if (references.length !== 1) {
|
|
67
|
-
throw new Error(`workspace ${normalizedId} must have exactly one durable reference`);
|
|
68
|
-
}
|
|
69
|
-
const subtree = containedRecords(snapshot.records, normalizedId);
|
|
70
|
-
return {
|
|
71
|
-
workspace,
|
|
72
|
-
reference: references[0],
|
|
73
|
-
subtree,
|
|
74
|
-
records: materializableRecords(subtree, normalizedId),
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
/** Materialize one owned workspace root and establish Watch coverage for it. */
|
|
78
|
-
export async function addFilesWorkspace(workspaceId, destinationParent, ports) {
|
|
79
|
-
const normalizedId = uuid(workspaceId, 'workspace id');
|
|
80
|
-
const destination = required(destinationParent, 'destination directory');
|
|
81
|
-
const cloud = await ports.lookupRegistry(normalizedId);
|
|
82
|
-
const { subtree, ...selected } = workspaceGraph(cloud.snapshot.records, normalizedId);
|
|
83
|
-
const place = await ports.inspectDestination({
|
|
84
|
-
workspaceId: normalizedId,
|
|
85
|
-
destinationParent: destination,
|
|
86
|
-
name: selected.workspace.name,
|
|
87
|
-
});
|
|
88
|
-
const refused = ownFolderRefusal('files add', required(place.absolutePath, 'destination path'), place.amalgmFolders);
|
|
89
|
-
if (refused)
|
|
90
|
-
throw refused;
|
|
91
|
-
// The trash this machine does not reveal stays part of the graph the
|
|
92
|
-
// installed rows are judged in.
|
|
93
|
-
const revealed = new Set(selected.records.map(({ uuid }) => uuid));
|
|
94
|
-
const setAside = subtree.filter(({ uuid }) => !revealed.has(uuid));
|
|
95
|
-
const references = cloud.snapshot.records.filter((record) => record.status === 'active' && record.type === 'reference');
|
|
96
|
-
const installed = await ports.materializeWorkspace({
|
|
97
|
-
...selected,
|
|
98
|
-
setAside,
|
|
99
|
-
references,
|
|
100
|
-
destinationParent: destination,
|
|
101
|
-
cloudHead: required(cloud.checksum, 'cloud head'),
|
|
102
|
-
deliveryWatermark: cloud.deliveryWatermark,
|
|
103
|
-
});
|
|
104
|
-
const installedRecords = snapshotFromRecords(installed.records || []).records;
|
|
105
|
-
const syncing = new Set(installed.syncingReferences);
|
|
106
|
-
const listed = new Set(installed.listedReferences);
|
|
107
|
-
const accepted = new Set(references.map(({ uuid }) => uuid));
|
|
108
|
-
// An install must persist exactly the head it selected. A completed Add's
|
|
109
|
-
// rows are already on their rails, Apply owning accepted transitions and
|
|
110
|
-
// Detect local ones, so its difference from the head is syncing work.
|
|
111
|
-
const current = installedSubtree(installedRecords, setAside, subtree, normalizedId);
|
|
112
|
-
if (!Number.isSafeInteger(installed.rows)
|
|
113
|
-
|| installed.rows !== installedRecords.length
|
|
114
|
-
|| (!current && installed.alreadyMaterialized !== true)
|
|
115
|
-
|| !sameRecords([installed.reference], [selected.reference])
|
|
116
|
-
|| syncing.size !== installed.syncingReferences.length
|
|
117
|
-
|| listed.size !== installed.listedReferences.length
|
|
118
|
-
|| [...syncing].some((id) => !accepted.has(id))
|
|
119
|
-
|| [...listed].some((id) => !accepted.has(id) || syncing.has(id))
|
|
120
|
-
|| !sameRecords(installed.references, references.filter(({ uuid }) => !syncing.has(uuid) && !listed.has(uuid)))) {
|
|
121
|
-
throw new Error('workspace materialization did not persist exactly the selected graph');
|
|
122
|
-
}
|
|
123
|
-
const coverage = await ports.coverWorkspace({ workspaceId: normalizedId });
|
|
124
|
-
if (coverage.active !== true || !Number.isSafeInteger(coverage.roots) || coverage.roots < 1) {
|
|
125
|
-
throw new Error('workspace watcher coverage is not active');
|
|
126
|
-
}
|
|
127
|
-
return {
|
|
128
|
-
workspaceId: normalizedId,
|
|
129
|
-
workspaceName: selected.workspace.name,
|
|
130
|
-
path: required(installed.path, 'materialized workspace path'),
|
|
131
|
-
rows: installed.rows,
|
|
132
|
-
cloudHead: cloud.checksum,
|
|
133
|
-
materialized: true,
|
|
134
|
-
alreadyMaterialized: installed.alreadyMaterialized === true,
|
|
135
|
-
syncing: !current,
|
|
136
|
-
syncingReferences: [...syncing].sort(),
|
|
137
|
-
watcherRoots: coverage.roots,
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
//# sourceMappingURL=commands.js.map
|
|
1
|
+
var P=Object.defineProperty;var w=(o,s)=>P(o,"name",{value:s,configurable:!0});import{CONTAINERS as N,UUID_PATTERN as S,containedRecords as W,installedSubtree as F,materializableRecords as U,sameRecords as b,snapshotFromRecords as v}from"../entities/index.js";import{computerAddress as $}from"./computer-address.js";import{ownFolderRefusal as x}from"./own-folders.js";function h(o,s){const e=typeof o=="string"?o.trim().toLowerCase():"";if(!S.test(e))throw new Error(`${s} must be a UUID`);return e}w(h,"uuid");function d(o,s){const e=typeof o=="string"?o.trim():"";if(!e)throw new Error(`${s} is required`);return e}w(d,"required");async function C(o,s){const e=d(o,"workspace path"),r=await s.inspectExternalWorkspace(e),c=d(r.absolutePath,"external workspace path"),i=x("files register",c,r.amalgmFolders);if(i)throw i;const l=d(r.name,"workspace name"),a=r.workspaceId===null?h(s.randomUuid(),"generated workspace id"):h(r.workspaceId,"existing workspace id"),p=await s.placeWorkspaceReference({workspaceId:a,absolutePath:c,address:$(await s.computerFolder(),c)});return{workspaceId:a,workspaceName:l,externalPath:c,referenceName:d(p.referenceName,"reference name"),referencePath:d(p.referencePath,"reference path"),declared:!0,created:p.created===!0}}w(C,"registerFilesWorkspace");function A(o,s){const e=h(s,"workspace id"),r=v(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(!N.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 l=W(r.records,e);return{workspace:c,reference:i[0],subtree:l,records:U(l,e)}}w(A,"workspaceGraph");async function H(o,s,e){const r=h(o,"workspace id"),c=d(s,"destination directory"),i=await e.lookupRegistry(r),{subtree:l,...a}=A(i.snapshot.records,r),p=await e.inspectDestination({workspaceId:r,destinationParent:c,name:a.workspace.name}),g=x("files add",d(p.absolutePath,"destination path"),p.amalgmFolders);if(g)throw g;const E=new Set(a.records.map(({uuid:t})=>t)),y=l.filter(({uuid:t})=>!E.has(t)),m=i.snapshot.records.filter(t=>t.status==="active"&&t.type==="reference"),n=await e.materializeWorkspace({...a,setAside:y,references:m,destinationParent:c,cloudHead:d(i.checksum,"cloud head"),deliveryWatermark:i.deliveryWatermark}),R=v(n.records||[]).records,f=new Set(n.syncingReferences),k=new Set(n.listedReferences),z=new Set(m.map(({uuid:t})=>t)),I=F(R,y,l,r);if(!Number.isSafeInteger(n.rows)||n.rows!==R.length||!I&&n.alreadyMaterialized!==!0||!b([n.reference],[a.reference])||f.size!==n.syncingReferences.length||k.size!==n.listedReferences.length||[...f].some(t=>!z.has(t))||[...k].some(t=>!z.has(t)||f.has(t))||!b(n.references,m.filter(({uuid:t})=>!f.has(t)&&!k.has(t))))throw new Error("workspace materialization did not persist exactly the selected graph");const u=await e.coverWorkspace({workspaceId:r});if(u.active!==!0||!Number.isSafeInteger(u.roots)||u.roots<1)throw new Error("workspace watcher coverage is not active");return{workspaceId:r,workspaceName:a.workspace.name,path:d(n.path,"materialized workspace path"),rows:n.rows,cloudHead:i.checksum,materialized:!0,alreadyMaterialized:n.alreadyMaterialized===!0,syncing:!I,syncingReferences:[...f].sort(),watcherRoots:u.roots}}w(H,"addFilesWorkspace");export{H as addFilesWorkspace,C as registerFilesWorkspace,A as workspaceGraph};
|
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
/** The folder a computer stands at in the computers folder: its name made
|
|
2
|
-
* safe for every disk, with `-2`, `-3`, … when another computer already holds
|
|
3
|
-
* that name in any letter case. A host chooses it once, from the names the
|
|
4
|
-
* accepted graph holds there, and keeps it. */
|
|
5
1
|
export declare function computerFolder(name: string, taken: Iterable<string>): string;
|
|
6
|
-
/** The address in the home of a folder at an absolute path on a computer:
|
|
7
|
-
* the computers folder, the computer's folder, then each segment of the path.
|
|
8
|
-
* A POSIX path splits on `/`; a Windows drive path keeps its letter as the
|
|
9
|
-
* first segment. A path naming no folder below a disk's top, or passing
|
|
10
|
-
* through a local-only folder (`.amalgm`, `.private`), is refused. */
|
|
11
2
|
export declare function computerAddress(computer: string, absolutePath: string): string[];
|
|
12
|
-
//# sourceMappingURL=computer-address.d.ts.map
|
|
@@ -1,48 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Where ground outside the Amalgm folder lives in the home: the computers
|
|
3
|
-
* folder holds one folder per computer, and in it each added folder stands at
|
|
4
|
-
* the absolute path it has on that computer. Every computer shows it at the
|
|
5
|
-
* same address, `files/<computer>/<path>`, so a folder from one computer is
|
|
6
|
-
* found where its own computer keeps it. Only the folders on that path that
|
|
7
|
-
* Amalgm holds exist; the rest of the computer's disk is no part of the home.
|
|
8
|
-
*/
|
|
9
|
-
import { entityFolderName, isLocalOnlyPath } from '@amalgm/core/identity';
|
|
10
|
-
import { isName } from '../entities/rules.js';
|
|
11
|
-
import { FILES_FOLDER } from '../registration/home-layout.js';
|
|
12
|
-
/** A Windows drive path: its letter, then the rest. */
|
|
13
|
-
const WINDOWS_DRIVE = /^([A-Za-z]):[\\/](.*)$/;
|
|
14
|
-
/** The folder a computer stands at in the computers folder: its name made
|
|
15
|
-
* safe for every disk, with `-2`, `-3`, … when another computer already holds
|
|
16
|
-
* that name in any letter case. A host chooses it once, from the names the
|
|
17
|
-
* accepted graph holds there, and keeps it. */
|
|
18
|
-
export function computerFolder(name, taken) {
|
|
19
|
-
return entityFolderName(name, taken);
|
|
20
|
-
}
|
|
21
|
-
/** The address in the home of a folder at an absolute path on a computer:
|
|
22
|
-
* the computers folder, the computer's folder, then each segment of the path.
|
|
23
|
-
* A POSIX path splits on `/`; a Windows drive path keeps its letter as the
|
|
24
|
-
* first segment. A path naming no folder below a disk's top, or passing
|
|
25
|
-
* through a local-only folder (`.amalgm`, `.private`), is refused. */
|
|
26
|
-
export function computerAddress(computer, absolutePath) {
|
|
27
|
-
const segments = pathSegments(absolutePath);
|
|
28
|
-
if (segments.length === 0)
|
|
29
|
-
throw new Error(`an added folder must stand below its disk's top, not at ${JSON.stringify(absolutePath)}`);
|
|
30
|
-
for (const name of [computer, ...segments]) {
|
|
31
|
-
if (!isName(name))
|
|
32
|
-
throw new Error(`invalid entity name ${JSON.stringify(name)}: a name is one non-empty path segment`);
|
|
33
|
-
if (isLocalOnlyPath(name))
|
|
34
|
-
throw new Error(`an added folder must not stand inside ${JSON.stringify(name)}, which never leaves its computer`);
|
|
35
|
-
}
|
|
36
|
-
return [FILES_FOLDER, computer, ...segments];
|
|
37
|
-
}
|
|
38
|
-
function pathSegments(absolutePath) {
|
|
39
|
-
const windows = WINDOWS_DRIVE.exec(absolutePath);
|
|
40
|
-
if (windows !== null) {
|
|
41
|
-
const rest = windows[2].split(/[\\/]/).filter(segment => segment !== '');
|
|
42
|
-
return rest.length === 0 ? [] : [windows[1].toUpperCase(), ...rest];
|
|
43
|
-
}
|
|
44
|
-
if (!absolutePath.startsWith('/'))
|
|
45
|
-
throw new Error(`${JSON.stringify(absolutePath)} is not an absolute path`);
|
|
46
|
-
return absolutePath.split('/').filter(segment => segment !== '');
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=computer-address.js.map
|
|
1
|
+
var o=Object.defineProperty;var i=(t,n)=>o(t,"name",{value:n,configurable:!0});import{entityFolderName as s,isLocalOnlyPath as f}from"@amalgm/core/identity";import{isName as m}from"../entities/rules.js";import{FILES_FOLDER as d}from"../registration/home-layout.js";const a=/^([A-Za-z]):[\\/](.*)$/;function h(t,n){return s(t,n)}i(h,"computerFolder");function u(t,n){const r=p(n);if(r.length===0)throw new Error(`an added folder must stand below its disk's top, not at ${JSON.stringify(n)}`);for(const e of[t,...r]){if(!m(e))throw new Error(`invalid entity name ${JSON.stringify(e)}: a name is one non-empty path segment`);if(f(e))throw new Error(`an added folder must not stand inside ${JSON.stringify(e)}, which never leaves its computer`)}return[d,t,...r]}i(u,"computerAddress");function p(t){const n=a.exec(t);if(n!==null){const r=n[2].split(/[\\/]/).filter(e=>e!=="");return r.length===0?[]:[n[1].toUpperCase(),...r]}if(!t.startsWith("/"))throw new Error(`${JSON.stringify(t)} is not an absolute path`);return t.split("/").filter(r=>r!=="")}i(p,"pathSegments");export{u as computerAddress,h as computerFolder};
|
package/dist/files/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/** Files product operations. Hosts own effects; Live owns decisions. */
|
|
2
1
|
export * from './commands.js';
|
|
3
2
|
export { computerAddress, computerFolder } from './computer-address.js';
|
|
4
3
|
export { ownFolderRefusal } from './own-folders.js';
|
|
@@ -8,7 +7,7 @@ export { createFilesApi } from './api.js';
|
|
|
8
7
|
export { FilesBrowser } from './browser.js';
|
|
9
8
|
export type { AmalgmFileRead, FilesBrowserOptions, LocalFileRead } from './browser.js';
|
|
10
9
|
export { FilesRequestError, amalgmUserRoot } from './browse-types.js';
|
|
11
|
-
export type { AmalgmDirectoryListing, AmalgmFileEntry, FilesBody, FilesContent, FilesHeadDescriptor, LocalDirectoryListing, LocalPathEntry, LocalPathKind, } from './browse-types.js';
|
|
10
|
+
export type { AmalgmDirectoryListing, AmalgmLocation, AmalgmFileEntry, FilesBody, FilesContent, FilesHeadDescriptor, LocalDirectoryListing, LocalPathEntry, LocalPathKind, } from './browse-types.js';
|
|
12
11
|
export { CloudFiles, CloudFilesView } from './cloud-files.js';
|
|
13
12
|
export type { CloudDirectory, CloudFileNode, CloudFilesHead, CloudFilesPort } from './cloud-files.js';
|
|
14
13
|
export { LocalFiles } from './local-files.js';
|
|
@@ -26,4 +25,3 @@ export type { FilesUsageChange, FilesUsageHolding } from './usage-effect.js';
|
|
|
26
25
|
export { filesUsageGitArtifact, filesUsageGitDirectory } from './usage-chain.js';
|
|
27
26
|
export type { FilesUsageGitArtifact, FilesUsageGitDirectory } from './usage-chain.js';
|
|
28
27
|
export type { FilesUsageCategoryTotal, FilesUsageCount, FilesUsageInput, FilesUsageItem, FilesUsageTotal, } from './usage.js';
|
|
29
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/files/index.js
CHANGED
|
@@ -1,18 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export * from './commands.js';
|
|
3
|
-
export { computerAddress, computerFolder } from './computer-address.js';
|
|
4
|
-
export { ownFolderRefusal } from './own-folders.js';
|
|
5
|
-
export * from './trash.js';
|
|
6
|
-
export { createFilesApi } from './api.js';
|
|
7
|
-
export { FilesBrowser } from './browser.js';
|
|
8
|
-
export { FilesRequestError, amalgmUserRoot } from './browse-types.js';
|
|
9
|
-
export { CloudFiles, CloudFilesView } from './cloud-files.js';
|
|
10
|
-
export { LocalFiles } from './local-files.js';
|
|
11
|
-
export { acceptedFilesChecksum, acceptedFilesPort, acceptedFilesRecords, statedResults } from './accepted-files.js';
|
|
12
|
-
export { filesMediaType } from './media-type.js';
|
|
13
|
-
export { FILES_PLANS, filesPlanFor } from './plans.js';
|
|
14
|
-
export { FILES_USAGE_CATEGORIES, filesUsageCategory } from './usage-categories.js';
|
|
15
|
-
export { FILES_USAGE_LARGEST, countFilesUsage, filesUsageHolds, filesUsageInTrash, filesUsageKept, filesUsageOwnBytes, } from './usage.js';
|
|
16
|
-
export { FILES_USAGE_NOTHING, filesUsageEffect, filesUsageHolding } from './usage-effect.js';
|
|
17
|
-
export { filesUsageGitArtifact, filesUsageGitDirectory } from './usage-chain.js';
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export*from"./commands.js";import{computerAddress as s,computerFolder as t}from"./computer-address.js";import{ownFolderRefusal as f}from"./own-folders.js";export*from"./trash.js";import{createFilesApi as p}from"./api.js";import{FilesBrowser as F}from"./browser.js";import{FilesRequestError as x,amalgmUserRoot as d}from"./browse-types.js";import{CloudFiles as g,CloudFilesView as E}from"./cloud-files.js";import{LocalFiles as u}from"./local-files.js";import{acceptedFilesChecksum as G,acceptedFilesPort as I,acceptedFilesRecords as L,statedResults as R}from"./accepted-files.js";import{filesMediaType as n}from"./media-type.js";import{FILES_PLANS as T,filesPlanFor as w}from"./plans.js";import{FILES_USAGE_CATEGORIES as H,filesUsageCategory as N}from"./usage-categories.js";import{FILES_USAGE_LARGEST as P,countFilesUsage as h,filesUsageHolds as B,filesUsageInTrash as k,filesUsageKept as q,filesUsageOwnBytes as D}from"./usage.js";import{FILES_USAGE_NOTHING as M,filesUsageEffect as V,filesUsageHolding as b}from"./usage-effect.js";import{filesUsageGitArtifact as v,filesUsageGitDirectory as z}from"./usage-chain.js";export{g as CloudFiles,E as CloudFilesView,T as FILES_PLANS,H as FILES_USAGE_CATEGORIES,P as FILES_USAGE_LARGEST,M as FILES_USAGE_NOTHING,F as FilesBrowser,x as FilesRequestError,u as LocalFiles,G as acceptedFilesChecksum,I as acceptedFilesPort,L as acceptedFilesRecords,d as amalgmUserRoot,s as computerAddress,t as computerFolder,h as countFilesUsage,p as createFilesApi,n as filesMediaType,w as filesPlanFor,N as filesUsageCategory,V as filesUsageEffect,v as filesUsageGitArtifact,z as filesUsageGitDirectory,b as filesUsageHolding,B as filesUsageHolds,k as filesUsageInTrash,q as filesUsageKept,D as filesUsageOwnBytes,f as ownFolderRefusal,R as statedResults};
|
|
@@ -13,7 +13,6 @@ export interface LocalFilesPort {
|
|
|
13
13
|
readonly cloudHead: string;
|
|
14
14
|
readonly entities: readonly CloudEntityRecord[];
|
|
15
15
|
}): Promise<unknown>;
|
|
16
|
-
/** Return null only when this entity is not currently materialized. */
|
|
17
16
|
readMaterialized(input: {
|
|
18
17
|
readonly computerId: string;
|
|
19
18
|
readonly cloudHead: string;
|
|
@@ -36,4 +35,3 @@ export declare class LocalFiles {
|
|
|
36
35
|
list(computerIdValue: string, pathValue?: string): Promise<LocalDirectoryListing>;
|
|
37
36
|
read(computerIdValue: string, pathValue: string): Promise<FilesContent>;
|
|
38
37
|
}
|
|
39
|
-
//# sourceMappingURL=local-files.d.ts.map
|