@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,169 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* The one Sharing command surface. Every door (CLI, MCP, and any later API)
|
|
4
|
-
* consumes this list: the same names, the same inputs, the same annotations,
|
|
5
|
-
* and the same SDK calls.
|
|
6
|
-
*/
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.commandDefinitions = void 0;
|
|
9
|
-
exports.commandDefinition = commandDefinition;
|
|
10
|
-
exports.createCommands = createCommands;
|
|
11
|
-
const command_input_js_1 = require("./command-input.js");
|
|
12
|
-
const KIND = 'agent, automation, app, or tool';
|
|
13
|
-
const construct = {
|
|
14
|
-
kind: (0, command_input_js_1.string)(`Construct kind: ${KIND}`, true),
|
|
15
|
-
ref: (0, command_input_js_1.string)('Construct name or UUID', true),
|
|
16
|
-
};
|
|
17
|
-
const link = { link: (0, command_input_js_1.string)('The share or publication link, or its UUID', true) };
|
|
18
|
-
const granting = {
|
|
19
|
-
anyone: (0, command_input_js_1.boolean)('Open it to anyone with the link, as viewer'),
|
|
20
|
-
add: (0, command_input_js_1.strings)('Emails to let in'),
|
|
21
|
-
role: (0, command_input_js_1.string)('The role the added people get: viewer (default) or editor'),
|
|
22
|
-
only: (0, command_input_js_1.boolean)('Grant the head alone; its dependencies do not follow, so it will not run for recipients'),
|
|
23
|
-
};
|
|
24
|
-
function text(input, name) {
|
|
25
|
-
return input[name];
|
|
26
|
-
}
|
|
27
|
-
function grantInput(input) {
|
|
28
|
-
return {
|
|
29
|
-
anyone: input.anyone,
|
|
30
|
-
add: input.add,
|
|
31
|
-
role: text(input, 'role'),
|
|
32
|
-
only: input.only,
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
const definitions = [
|
|
36
|
-
define({
|
|
37
|
-
name: 'share',
|
|
38
|
-
title: 'Share a construct',
|
|
39
|
-
description: `Share an ${KIND} with everything it depends on: the people you name get the same role on the head and its dependencies, and their computers receive it on the rails. Share again to change who may open it.`,
|
|
40
|
-
shape: { ...construct, ...granting },
|
|
41
|
-
positional: ['kind', 'ref'],
|
|
42
|
-
annotations: write(true),
|
|
43
|
-
run: (sharing, actor, input) => sharing.share(actor, {
|
|
44
|
-
kind: input.kind,
|
|
45
|
-
ref: input.ref,
|
|
46
|
-
...grantInput(input),
|
|
47
|
-
}),
|
|
48
|
-
}),
|
|
49
|
-
define({
|
|
50
|
-
name: 'link',
|
|
51
|
-
title: 'Get a share link',
|
|
52
|
-
description: 'The link for a construct you own. Every construct has one; access decides who may open it.',
|
|
53
|
-
shape: construct,
|
|
54
|
-
positional: ['kind', 'ref'],
|
|
55
|
-
annotations: read(),
|
|
56
|
-
run: (sharing, actor, input) => sharing.link(actor, { kind: input.kind, ref: input.ref }),
|
|
57
|
-
}),
|
|
58
|
-
define({
|
|
59
|
-
name: 'access',
|
|
60
|
-
title: 'See or change access',
|
|
61
|
-
description: 'Who may open something you own: open it to anyone with the link, restrict it, add or remove people. With no target, everything you share, everything shared with you, and pending requests.',
|
|
62
|
-
shape: {
|
|
63
|
-
kind: (0, command_input_js_1.string)(`Construct kind (${KIND}) when naming a construct; omit when giving a link`),
|
|
64
|
-
ref: (0, command_input_js_1.string)('Construct name or UUID, or a share or publication link'),
|
|
65
|
-
...granting,
|
|
66
|
-
restricted: (0, command_input_js_1.boolean)('Close it to anyone with the link; only the people you add remain'),
|
|
67
|
-
remove: (0, command_input_js_1.strings)('Emails to take out'),
|
|
68
|
-
},
|
|
69
|
-
positional: ['kind', 'ref'],
|
|
70
|
-
annotations: write(true),
|
|
71
|
-
run: (sharing, actor, input) => sharing.access(actor, {
|
|
72
|
-
kind: text(input, 'kind'),
|
|
73
|
-
ref: text(input, 'ref'),
|
|
74
|
-
...grantInput(input),
|
|
75
|
-
restricted: input.restricted,
|
|
76
|
-
remove: input.remove,
|
|
77
|
-
}),
|
|
78
|
-
}),
|
|
79
|
-
define({
|
|
80
|
-
name: 'unshare',
|
|
81
|
-
title: 'Unshare a construct',
|
|
82
|
-
description: 'Revoke everything sharing this construct gave. Recipients lose it and its dependencies.',
|
|
83
|
-
shape: construct,
|
|
84
|
-
positional: ['kind', 'ref'],
|
|
85
|
-
annotations: destructive(),
|
|
86
|
-
run: (sharing, actor, input) => sharing.unshare(actor, { kind: input.kind, ref: input.ref }),
|
|
87
|
-
}),
|
|
88
|
-
define({
|
|
89
|
-
name: 'publish',
|
|
90
|
-
title: 'Publish a copy',
|
|
91
|
-
description: `Publish a copy of an ${KIND} with everything it depends on, under new UUIDs. Whoever downloads it gets their own copy; yours never reaches theirs.`,
|
|
92
|
-
shape: { ...construct, ...granting },
|
|
93
|
-
positional: ['kind', 'ref'],
|
|
94
|
-
annotations: write(false),
|
|
95
|
-
run: (sharing, actor, input) => sharing.publish(actor, {
|
|
96
|
-
kind: input.kind,
|
|
97
|
-
ref: input.ref,
|
|
98
|
-
...grantInput(input),
|
|
99
|
-
}),
|
|
100
|
-
}),
|
|
101
|
-
define({
|
|
102
|
-
name: 'unpublish',
|
|
103
|
-
title: 'Unpublish a copy',
|
|
104
|
-
description: 'Take a publication down: revoke its grants and trash the published copy. Copies already downloaded stay with their owners.',
|
|
105
|
-
shape: { id: (0, command_input_js_1.string)('The publication link or UUID', true) },
|
|
106
|
-
positional: ['id'],
|
|
107
|
-
annotations: destructive(),
|
|
108
|
-
run: (sharing, actor, input) => sharing.unpublish(actor, { id: input.id }),
|
|
109
|
-
}),
|
|
110
|
-
define({
|
|
111
|
-
name: 'download',
|
|
112
|
-
title: 'Download from a link',
|
|
113
|
-
description: 'Follow what a share or publication link points at on this computer; the rails deliver it. A publication additionally becomes your own copy.',
|
|
114
|
-
shape: link,
|
|
115
|
-
positional: ['link'],
|
|
116
|
-
annotations: write(true),
|
|
117
|
-
run: (sharing, actor, input) => sharing.download(actor, { link: input.link }),
|
|
118
|
-
}),
|
|
119
|
-
define({
|
|
120
|
-
name: 'request',
|
|
121
|
-
title: 'Request access',
|
|
122
|
-
description: 'Ask the owner of a share or publication to let you in.',
|
|
123
|
-
shape: link,
|
|
124
|
-
positional: ['link'],
|
|
125
|
-
annotations: write(true),
|
|
126
|
-
run: (sharing, actor, input) => sharing.request(actor, { link: input.link }),
|
|
127
|
-
}),
|
|
128
|
-
];
|
|
129
|
-
const commandDefinitions = definitions;
|
|
130
|
-
exports.commandDefinitions = commandDefinitions;
|
|
131
|
-
function read() {
|
|
132
|
-
return { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false };
|
|
133
|
-
}
|
|
134
|
-
function write(idempotentHint) {
|
|
135
|
-
return { readOnlyHint: false, destructiveHint: false, idempotentHint, openWorldHint: false };
|
|
136
|
-
}
|
|
137
|
-
function destructive() {
|
|
138
|
-
return { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false };
|
|
139
|
-
}
|
|
140
|
-
function define(spec) {
|
|
141
|
-
for (const field of spec.positional) {
|
|
142
|
-
if (!(field in spec.shape))
|
|
143
|
-
throw new Error(`${spec.name} positional field is not an input: ${field}`);
|
|
144
|
-
}
|
|
145
|
-
return {
|
|
146
|
-
name: spec.name,
|
|
147
|
-
mcpName: `amalgm_${spec.name}`,
|
|
148
|
-
title: spec.title,
|
|
149
|
-
description: spec.description,
|
|
150
|
-
inputShape: spec.shape,
|
|
151
|
-
positional: spec.positional,
|
|
152
|
-
annotations: spec.annotations,
|
|
153
|
-
inputSchema: () => (0, command_input_js_1.jsonSchema)(spec.shape),
|
|
154
|
-
invoke: (sharing, actor, input) => spec.run(sharing, actor, (0, command_input_js_1.parseInput)(spec.shape, input ?? {})),
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
function commandDefinition(name) {
|
|
158
|
-
const definition = commandDefinitions.find((candidate) => candidate.name === name);
|
|
159
|
-
if (!definition)
|
|
160
|
-
throw new Error(`Unknown Sharing command: ${name}`);
|
|
161
|
-
return definition;
|
|
162
|
-
}
|
|
163
|
-
/** Bind the surface to one SDK and one acting user; the host resolves both. */
|
|
164
|
-
function createCommands(sharing, actor) {
|
|
165
|
-
return {
|
|
166
|
-
execute: (name, input = {}) => commandDefinition(name).invoke(sharing, actor, input),
|
|
167
|
-
};
|
|
168
|
-
}
|
|
169
|
-
//# sourceMappingURL=commands.js.map
|
|
1
|
+
"use strict";var y=Object.defineProperty;var i=(n,t)=>y(n,"name",{value:t,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.commandDefinitions=void 0,exports.commandDefinition=k,exports.createCommands=v;const o=require("../commands/input.js"),s="agent, automation, app, or tool",d={kind:(0,o.string)(`Construct kind: ${s}`,!0),ref:(0,o.string)("Construct name or UUID",!0)},p={link:(0,o.string)("The share or publication link, or its UUID",!0)},h={anyone:(0,o.boolean)("Open it to anyone with the link, as viewer"),add:(0,o.strings)("Emails to let in"),role:(0,o.string)("The role the added people get: viewer (default) or editor"),only:(0,o.boolean)("Grant the head alone; its dependencies do not follow, so it will not run for recipients")};function c(n,t){return n[t]}i(c,"text");function u(n){return{anyone:n.anyone,add:n.add,role:c(n,"role"),only:n.only}}i(u,"grantInput");const w=[r({name:"share",title:"Share a construct",description:`Share an ${s} with everything it depends on: the people you name get the same role on the head and its dependencies, and their computers receive it on the rails. Share again to change who may open it.`,shape:{...d,...h},positional:["kind","ref"],annotations:a(!0),run:i((n,t,e)=>n.share(t,{kind:e.kind,ref:e.ref,...u(e)}),"run")}),r({name:"link",title:"Get a share link",description:"The link for a construct you own. Every construct has one; access decides who may open it.",shape:d,positional:["kind","ref"],annotations:g(),run:i((n,t,e)=>n.link(t,{kind:e.kind,ref:e.ref}),"run")}),r({name:"access",title:"See or change access",description:"Who may open something you own: open it to anyone with the link, restrict it, add or remove people. With no target, everything you share, everything shared with you, and pending requests.",shape:{kind:(0,o.string)(`Construct kind (${s}) when naming a construct; omit when giving a link`),ref:(0,o.string)("Construct name or UUID, or a share or publication link"),...h,restricted:(0,o.boolean)("Close it to anyone with the link; only the people you add remain"),remove:(0,o.strings)("Emails to take out")},positional:["kind","ref"],annotations:a(!0),run:i((n,t,e)=>n.access(t,{kind:c(e,"kind"),ref:c(e,"ref"),...u(e),restricted:e.restricted,remove:e.remove}),"run")}),r({name:"unshare",title:"Unshare a construct",description:"Revoke everything sharing this construct gave. Recipients lose it and its dependencies.",shape:d,positional:["kind","ref"],annotations:f(),run:i((n,t,e)=>n.unshare(t,{kind:e.kind,ref:e.ref}),"run")}),r({name:"publish",title:"Publish a copy",description:`Publish a copy of an ${s} with everything it depends on, under new UUIDs. Whoever downloads it gets their own copy; yours never reaches theirs.`,shape:{...d,...h},positional:["kind","ref"],annotations:a(!1),run:i((n,t,e)=>n.publish(t,{kind:e.kind,ref:e.ref,...u(e)}),"run")}),r({name:"unpublish",title:"Unpublish a copy",description:"Take a publication down: revoke its grants and trash the published copy. Copies already downloaded stay with their owners.",shape:{id:(0,o.string)("The publication link or UUID",!0)},positional:["id"],annotations:f(),run:i((n,t,e)=>n.unpublish(t,{id:e.id}),"run")}),r({name:"download",title:"Download from a link",description:"Follow what a share or publication link points at on this computer; the rails deliver it. A publication additionally becomes your own copy.",shape:p,positional:["link"],annotations:a(!0),run:i((n,t,e)=>n.download(t,{link:e.link}),"run")}),r({name:"request",title:"Request access",description:"Ask the owner of a share or publication to let you in.",shape:p,positional:["link"],annotations:a(!0),run:i((n,t,e)=>n.request(t,{link:e.link}),"run")})],m=w;exports.commandDefinitions=m;function g(){return{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}}i(g,"read");function a(n){return{readOnlyHint:!1,destructiveHint:!1,idempotentHint:n,openWorldHint:!1}}i(a,"write");function f(){return{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!1}}i(f,"destructive");function r(n){for(const t of n.positional)if(!(t in n.shape))throw new Error(`${n.name} positional field is not an input: ${t}`);return{name:n.name,mcpName:`amalgm_${n.name}`,title:n.title,description:n.description,inputShape:n.shape,positional:n.positional,annotations:n.annotations,inputSchema:i(()=>(0,o.jsonSchema)(n.shape),"inputSchema"),invoke:i((t,e,l)=>n.run(t,e,(0,o.parseInput)(n.shape,l??{})),"invoke")}}i(r,"define");function k(n){const t=m.find(e=>e.name===n);if(!t)throw new Error(`Unknown Sharing command: ${n}`);return t}i(k,"commandDefinition");function v(n,t){return{execute:i((e,l={})=>k(e).invoke(n,t,l),"execute")}}i(v,"createCommands");
|
|
@@ -1,53 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Naming a construct on the actor's computer, its dependency closure, and
|
|
4
|
-
* the detachment law a published copy must satisfy.
|
|
5
|
-
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.assertDetached = assertDetached;
|
|
8
|
-
exports.closureOf = closureOf;
|
|
9
|
-
exports.ownedConstruct = ownedConstruct;
|
|
10
|
-
exports.parseKind = parseKind;
|
|
11
|
-
exports.resolve = resolve;
|
|
12
|
-
const types_js_1 = require("../entities/types.js");
|
|
13
|
-
const errors_js_1 = require("./errors.js");
|
|
14
|
-
function parseKind(value) {
|
|
15
|
-
const kind = value.trim().toLowerCase();
|
|
16
|
-
if (!(0, types_js_1.isShareableType)(kind))
|
|
17
|
-
throw new errors_js_1.SharingError('invalid', `kind must be agent, automation, app, or tool, not ${value}`);
|
|
18
|
-
return kind;
|
|
19
|
-
}
|
|
20
|
-
function resolve(ports, input) {
|
|
21
|
-
const ref = input.ref.trim();
|
|
22
|
-
if (!ref)
|
|
23
|
-
throw new errors_js_1.SharingError('invalid', 'name the construct');
|
|
24
|
-
return ports.constructs.resolve(parseKind(input.kind), ref);
|
|
25
|
-
}
|
|
26
|
-
/** The construct the actor owns; one shared with them cannot be shared by them. */
|
|
27
|
-
async function ownedConstruct(ports, actor, input) {
|
|
28
|
-
const construct = await resolve(ports, input);
|
|
29
|
-
if (await ports.ownerOf(construct.id) !== actor.userId) {
|
|
30
|
-
throw new errors_js_1.SharingError('forbidden', `${construct.kind} ${construct.name} is shared with you, not by you`);
|
|
31
|
-
}
|
|
32
|
-
return construct;
|
|
33
|
-
}
|
|
34
|
-
/** The head and every UUID it depends on, the head first, each once. A secret
|
|
35
|
-
* is never among them: sharing what uses one leaves the secret behind. A member
|
|
36
|
-
* whose type this computer cannot say could be one, so the whole act refuses. */
|
|
37
|
-
async function closureOf(ports, id) {
|
|
38
|
-
const closure = [];
|
|
39
|
-
for (const member of new Set([id, ...await ports.constructs.dependencies(id)])) {
|
|
40
|
-
if (await ports.typeOf(member) !== 'secret')
|
|
41
|
-
closure.push(member);
|
|
42
|
-
}
|
|
43
|
-
return closure;
|
|
44
|
-
}
|
|
45
|
-
/** Fail if any UUID of the original closure survives in the copy's. */
|
|
46
|
-
function assertDetached(original, copy) {
|
|
47
|
-
const copied = new Set(copy);
|
|
48
|
-
const surviving = original.filter((id) => copied.has(id));
|
|
49
|
-
if (surviving.length) {
|
|
50
|
-
throw new errors_js_1.SharingError('invalid', `published copy still carries source identities: ${surviving.join(', ')}`);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
//# sourceMappingURL=construct.js.map
|
|
1
|
+
"use strict";var u=Object.defineProperty;var o=(e,r)=>u(e,"name",{value:r,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.assertDetached=h,exports.closureOf=w,exports.ownedConstruct=f,exports.parseKind=s,exports.resolve=c;const d=require("../entities/types.js"),i=require("./errors.js");function s(e){const r=e.trim().toLowerCase();if(!(0,d.isShareableType)(r))throw new i.SharingError("invalid",`kind must be agent, automation, app, or tool, not ${e}`);return r}o(s,"parseKind");function c(e,r){const t=r.ref.trim();if(!t)throw new i.SharingError("invalid","name the construct");return e.constructs.resolve(s(r.kind),t)}o(c,"resolve");async function f(e,r,t){const n=await c(e,t);if(await e.ownerOf(n.id)!==r.userId)throw new i.SharingError("forbidden",`${n.kind} ${n.name} is shared with you, not by you`);return n}o(f,"ownedConstruct");async function w(e,r){const t=[];for(const n of new Set([r,...await e.constructs.dependencies(r)]))await e.typeOf(n)!=="secret"&&t.push(n);return t}o(w,"closureOf");function h(e,r){const t=new Set(r),n=e.filter(a=>t.has(a));if(n.length)throw new i.SharingError("invalid",`published copy still carries source identities: ${n.join(", ")}`)}o(h,"assertDetached");
|
|
@@ -1,48 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* The recipient's side. `download` holds the link's UUID and every UUID the
|
|
4
|
-
* head's grants reach on this computer's record rail; the rails deliver the
|
|
5
|
-
* entities. For a restricted share the grant signal already held them, so
|
|
6
|
-
* this only confirms. For a publication the product then copies the
|
|
7
|
-
* received closure into the recipient's own UUIDs. Without access, `request`
|
|
8
|
-
* asks the owner.
|
|
9
|
-
*/
|
|
10
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.download = download;
|
|
12
|
-
exports.request = request;
|
|
13
|
-
const entity_js_1 = require("./entity.js");
|
|
14
|
-
/** The head and every closure UUID the actor may read. */
|
|
15
|
-
async function readableClosure(ports, actor, head) {
|
|
16
|
-
const sourced = await ports.records.listGrantsSourcedAt(head);
|
|
17
|
-
const held = [head];
|
|
18
|
-
for (const id of new Set(sourced.map((grant) => grant.entityId))) {
|
|
19
|
-
if ((await (0, entity_js_1.entityAccess)(ports, actor, id)).role !== null)
|
|
20
|
-
held.push(id);
|
|
21
|
-
}
|
|
22
|
-
return held;
|
|
23
|
-
}
|
|
24
|
-
async function download(ports, actor, input) {
|
|
25
|
-
const access = await (0, entity_js_1.accessibleEntity)(ports, actor, input.link);
|
|
26
|
-
const held = await readableClosure(ports, actor, access.id);
|
|
27
|
-
for (const id of held)
|
|
28
|
-
ports.rail.hold(id);
|
|
29
|
-
const downloaded = { id: access.id, link: ports.link(access.id), role: access.role, held };
|
|
30
|
-
if (await ports.records.getPublication(access.id))
|
|
31
|
-
downloaded.copy = await ports.constructs.copy(access.id);
|
|
32
|
-
return downloaded;
|
|
33
|
-
}
|
|
34
|
-
/** Ask the owner to let the actor in. Nothing to ask when the actor already may open it. */
|
|
35
|
-
async function request(ports, actor, input) {
|
|
36
|
-
const access = await (0, entity_js_1.entityAccess)(ports, actor, input.link);
|
|
37
|
-
if (access.role !== null)
|
|
38
|
-
return { id: access.id, requested: false };
|
|
39
|
-
await ports.records.putRequest({
|
|
40
|
-
entityId: access.id,
|
|
41
|
-
ownerId: access.ownerId,
|
|
42
|
-
userId: actor.userId,
|
|
43
|
-
email: actor.email.trim().toLowerCase(),
|
|
44
|
-
requestedAt: ports.now(),
|
|
45
|
-
});
|
|
46
|
-
return { id: access.id, requested: true };
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=download.js.map
|
|
1
|
+
"use strict";var a=Object.defineProperty;var c=(e,i)=>a(e,"name",{value:i,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.download=l,exports.request=w;const o=require("./entity.js");async function u(e,i,n){const t=await e.records.listGrantsSourcedAt(n),d=[n];for(const s of new Set(t.map(r=>r.entityId)))(await(0,o.entityAccess)(e,i,s)).role!==null&&d.push(s);return d}c(u,"readableClosure");async function l(e,i,n){const t=await(0,o.accessibleEntity)(e,i,n.link),d=await u(e,i,t.id);for(const r of d)e.rail.hold(r);const s={id:t.id,link:e.link(t.id),role:t.role,held:d};return await e.records.getPublication(t.id)&&(s.copy=await e.constructs.copy(t.id)),s}c(l,"download");async function w(e,i,n){const t=await(0,o.entityAccess)(e,i,n.link);return t.role!==null?{id:t.id,requested:!1}:(await e.records.putRequest({entityId:t.id,ownerId:t.ownerId,userId:i.userId,email:i.email.trim().toLowerCase(),requestedAt:e.now()}),{id:t.id,requested:!0})}c(w,"request");
|
|
@@ -1,59 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Reaching one entity under the access law. Every operation finds its
|
|
4
|
-
* entity, its owner, and the actor's role through here, so the law is
|
|
5
|
-
* applied once.
|
|
6
|
-
*/
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.accessibleEntity = accessibleEntity;
|
|
9
|
-
exports.entityAccess = entityAccess;
|
|
10
|
-
exports.idOfLink = idOfLink;
|
|
11
|
-
exports.ownedEntity = ownedEntity;
|
|
12
|
-
exports.ownerView = ownerView;
|
|
13
|
-
const access_js_1 = require("./access.js");
|
|
14
|
-
const errors_js_1 = require("./errors.js");
|
|
15
|
-
/** A link is the id, or a URL whose last path segment is the id. */
|
|
16
|
-
function idOfLink(link) {
|
|
17
|
-
const trimmed = link.trim();
|
|
18
|
-
if (!/^[a-z]+:\/\//.test(trimmed))
|
|
19
|
-
return trimmed;
|
|
20
|
-
const segments = new URL(trimmed).pathname.split('/').filter(Boolean);
|
|
21
|
-
return segments[segments.length - 1] ?? '';
|
|
22
|
-
}
|
|
23
|
-
/** A secret answers exactly as nothing does, to everyone, its owner included:
|
|
24
|
-
* no link opens one, and no one learns from asking that one exists. */
|
|
25
|
-
async function entityAccess(ports, actor, idOrLink) {
|
|
26
|
-
const id = idOfLink(idOrLink);
|
|
27
|
-
const ownerId = !id || await ports.typeOf(id) === 'secret' ? null : await ports.ownerOf(id);
|
|
28
|
-
if (ownerId === null)
|
|
29
|
-
throw new errors_js_1.SharingError('not_found', `nothing is shared at ${idOrLink}`);
|
|
30
|
-
const grants = await ports.records.listGrantsOn(id);
|
|
31
|
-
return { id, ownerId, grants, role: (0, access_js_1.roleOf)(ownerId, grants, actor) };
|
|
32
|
-
}
|
|
33
|
-
/** The entity behind a link, if the actor may open it. */
|
|
34
|
-
async function accessibleEntity(ports, actor, link) {
|
|
35
|
-
const access = await entityAccess(ports, actor, link);
|
|
36
|
-
if (access.role === null) {
|
|
37
|
-
throw new errors_js_1.SharingError('forbidden', `you do not have access to ${access.id}; ask the owner with request`);
|
|
38
|
-
}
|
|
39
|
-
return { ...access, role: access.role };
|
|
40
|
-
}
|
|
41
|
-
async function ownedEntity(ports, actor, idOrLink) {
|
|
42
|
-
const access = await entityAccess(ports, actor, idOrLink);
|
|
43
|
-
if (access.role !== 'owner')
|
|
44
|
-
throw new errors_js_1.SharingError('not_found', `you do not own ${idOrLink}`);
|
|
45
|
-
return access.id;
|
|
46
|
-
}
|
|
47
|
-
async function ownerView(ports, id) {
|
|
48
|
-
const grants = await ports.records.listGrantsOn(id);
|
|
49
|
-
return {
|
|
50
|
-
id,
|
|
51
|
-
link: ports.link(id),
|
|
52
|
-
role: 'owner',
|
|
53
|
-
native: grants.filter(access_js_1.isNative),
|
|
54
|
-
inherited: grants.filter((grant) => !(0, access_js_1.isNative)(grant)),
|
|
55
|
-
effective: (0, access_js_1.effectiveGrants)(grants),
|
|
56
|
-
requests: await ports.records.listRequestsOn(id),
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
//# sourceMappingURL=entity.js.map
|
|
1
|
+
"use strict";var w=Object.defineProperty;var s=(t,e)=>w(t,"name",{value:e,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.accessibleEntity=f,exports.entityAccess=c,exports.idOfLink=u,exports.ownedEntity=d,exports.ownerView=h;const i=require("./access.js"),a=require("./errors.js");function u(t){const e=t.trim();if(!/^[a-z]+:\/\//.test(e))return e;const r=new URL(e).pathname.split("/").filter(Boolean);return r[r.length-1]??""}s(u,"idOfLink");async function c(t,e,r){const n=u(r),o=!n||await t.typeOf(n)==="secret"?null:await t.ownerOf(n);if(o===null)throw new a.SharingError("not_found",`nothing is shared at ${r}`);const l=await t.records.listGrantsOn(n);return{id:n,ownerId:o,grants:l,role:(0,i.roleOf)(o,l,e)}}s(c,"entityAccess");async function f(t,e,r){const n=await c(t,e,r);if(n.role===null)throw new a.SharingError("forbidden",`you do not have access to ${n.id}; ask the owner with request`);return{...n,role:n.role}}s(f,"accessibleEntity");async function d(t,e,r){const n=await c(t,e,r);if(n.role!=="owner")throw new a.SharingError("not_found",`you do not own ${r}`);return n.id}s(d,"ownedEntity");async function h(t,e){const r=await t.records.listGrantsOn(e);return{id:e,link:t.link(e),role:"owner",native:r.filter(i.isNative),inherited:r.filter(n=>!(0,i.isNative)(n)),effective:(0,i.effectiveGrants)(r),requests:await t.records.listRequestsOn(e)}}s(h,"ownerView");
|
|
@@ -1,14 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/** Typed sharing failures so thin surfaces can map them without parsing text. */
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.SharingError = void 0;
|
|
5
|
-
class SharingError extends Error {
|
|
6
|
-
code;
|
|
7
|
-
constructor(code, message) {
|
|
8
|
-
super(message);
|
|
9
|
-
this.name = 'SharingError';
|
|
10
|
-
this.code = code;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
exports.SharingError = SharingError;
|
|
14
|
-
//# sourceMappingURL=errors.js.map
|
|
1
|
+
"use strict";var t=Object.defineProperty;var o=(e,r)=>t(e,"name",{value:r,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.SharingError=void 0;class i extends Error{static{o(this,"SharingError")}code;constructor(r,s){super(s),this.name="SharingError",this.code=r}}exports.SharingError=i;
|
|
@@ -1,108 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Writing grants. Native grants are edited on one entity; a head's native
|
|
4
|
-
* grants are mirrored onto its dependency closure as inherited rows sourced
|
|
5
|
-
* at the head, so revoking through the head removes exactly what the head
|
|
6
|
-
* gave and nothing another head still grants.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.changeNativeGrants = changeNativeGrants;
|
|
10
|
-
exports.hasChange = hasChange;
|
|
11
|
-
exports.propagateGrants = propagateGrants;
|
|
12
|
-
exports.revokeHeadGrants = revokeHeadGrants;
|
|
13
|
-
const access_js_1 = require("./access.js");
|
|
14
|
-
const errors_js_1 = require("./errors.js");
|
|
15
|
-
const types_js_1 = require("./types.js");
|
|
16
|
-
function hasChange(change) {
|
|
17
|
-
return Boolean(change.anyone || change.restricted || change.add?.length || change.remove?.length);
|
|
18
|
-
}
|
|
19
|
-
function sameKey(a, b) {
|
|
20
|
-
return a.entityId === b.entityId && a.principal === b.principal && a.source === b.source;
|
|
21
|
-
}
|
|
22
|
-
function normalizeEmail(email) {
|
|
23
|
-
return email.trim().toLowerCase();
|
|
24
|
-
}
|
|
25
|
-
async function principalOf(ports, email) {
|
|
26
|
-
const normalized = normalizeEmail(email);
|
|
27
|
-
if (!normalized.includes('@'))
|
|
28
|
-
throw new errors_js_1.SharingError('invalid', `not an email address: ${email}`);
|
|
29
|
-
const userId = await ports.userIdOf(normalized);
|
|
30
|
-
if (userId === null)
|
|
31
|
-
throw new errors_js_1.SharingError('not_found', `no user has the email ${normalized}`);
|
|
32
|
-
return userId;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Apply a change to the entity's native grants; return the native set after.
|
|
36
|
-
* A role change is an upsert of the same row; only a withdrawn principal is
|
|
37
|
-
* tombstoned.
|
|
38
|
-
*/
|
|
39
|
-
async function changeNativeGrants(ports, actor, entityId, change) {
|
|
40
|
-
if (change.anyone && change.restricted)
|
|
41
|
-
throw new errors_js_1.SharingError('invalid', 'choose anyone or restricted, not both');
|
|
42
|
-
const role = (0, access_js_1.parseRole)(change.role);
|
|
43
|
-
const now = ports.now();
|
|
44
|
-
const native = new Map((await ports.records.listGrantsOn(entityId)).filter(access_js_1.isNative).map((grant) => [grant.principal, grant]));
|
|
45
|
-
const put = [];
|
|
46
|
-
const revoke = [];
|
|
47
|
-
const grant = (principal, granted) => {
|
|
48
|
-
const held = native.get(principal);
|
|
49
|
-
if (held?.role === granted)
|
|
50
|
-
return;
|
|
51
|
-
const row = { entityId, principal, role: granted, source: types_js_1.NATIVE, grantedBy: actor.userId, createdAt: now };
|
|
52
|
-
native.set(principal, row);
|
|
53
|
-
put.push(row);
|
|
54
|
-
};
|
|
55
|
-
const withdraw = (principal) => {
|
|
56
|
-
const held = native.get(principal);
|
|
57
|
-
if (!held)
|
|
58
|
-
return;
|
|
59
|
-
native.delete(principal);
|
|
60
|
-
revoke.push(held);
|
|
61
|
-
};
|
|
62
|
-
if (change.anyone)
|
|
63
|
-
grant(types_js_1.ANYONE, 'viewer');
|
|
64
|
-
if (change.restricted)
|
|
65
|
-
withdraw(types_js_1.ANYONE);
|
|
66
|
-
for (const email of change.add ?? []) {
|
|
67
|
-
const principal = await principalOf(ports, email);
|
|
68
|
-
grant(principal, role);
|
|
69
|
-
await ports.records.deleteRequest(entityId, principal);
|
|
70
|
-
}
|
|
71
|
-
for (const email of change.remove ?? [])
|
|
72
|
-
withdraw(await principalOf(ports, email));
|
|
73
|
-
if (revoke.length)
|
|
74
|
-
await ports.records.revokeGrants(revoke, now);
|
|
75
|
-
if (put.length)
|
|
76
|
-
await ports.records.putGrants(put);
|
|
77
|
-
return [...native.values()];
|
|
78
|
-
}
|
|
79
|
-
/** Make the rows sourced at `head` equal `native` mirrored onto `closure`. */
|
|
80
|
-
async function propagateGrants(ports, head, closure, native) {
|
|
81
|
-
const now = ports.now();
|
|
82
|
-
const existing = await ports.records.listGrantsSourcedAt(head);
|
|
83
|
-
const desired = closure.filter((id) => id !== head).flatMap((entityId) => native.map((grant) => ({
|
|
84
|
-
entityId,
|
|
85
|
-
principal: grant.principal,
|
|
86
|
-
role: grant.role,
|
|
87
|
-
source: head,
|
|
88
|
-
grantedBy: grant.grantedBy,
|
|
89
|
-
createdAt: now,
|
|
90
|
-
})));
|
|
91
|
-
const revoke = existing.filter((row) => !desired.some((want) => sameKey(want, row)));
|
|
92
|
-
const put = desired.filter((want) => !existing.some((row) => sameKey(want, row) && want.role === row.role));
|
|
93
|
-
if (revoke.length)
|
|
94
|
-
await ports.records.revokeGrants(revoke, now);
|
|
95
|
-
if (put.length)
|
|
96
|
-
await ports.records.putGrants(put);
|
|
97
|
-
}
|
|
98
|
-
/** Revoke everything the head gave: its native rows and every row sourced at it. */
|
|
99
|
-
async function revokeHeadGrants(ports, head) {
|
|
100
|
-
const rows = [
|
|
101
|
-
...(await ports.records.listGrantsOn(head)).filter(access_js_1.isNative),
|
|
102
|
-
...await ports.records.listGrantsSourcedAt(head),
|
|
103
|
-
];
|
|
104
|
-
if (rows.length)
|
|
105
|
-
await ports.records.revokeGrants(rows, ports.now());
|
|
106
|
-
return rows.length;
|
|
107
|
-
}
|
|
108
|
-
//# sourceMappingURL=grants.js.map
|
|
1
|
+
"use strict";var g=Object.defineProperty;var i=(e,r)=>g(e,"name",{value:r,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.changeNativeGrants=k,exports.hasChange=N,exports.propagateGrants=A,exports.revokeHeadGrants=E;const v=require("./access.js"),h=require("./errors.js"),G=require("./types.js");function N(e){return!!(e.anyone||e.restricted||e.add?.length||e.remove?.length)}i(N,"hasChange");function y(e,r){return e.entityId===r.entityId&&e.principal===r.principal&&e.source===r.source}i(y,"sameKey");function _(e){return e.trim().toLowerCase()}i(_,"normalizeEmail");async function p(e,r){const t=_(r);if(!t.includes("@"))throw new h.SharingError("invalid",`not an email address: ${r}`);const o=await e.userIdOf(t);if(o===null)throw new h.SharingError("not_found",`no user has the email ${t}`);return o}i(p,"principalOf");async function k(e,r,t,o){if(o.anyone&&o.restricted)throw new h.SharingError("invalid","choose anyone or restricted, not both");const w=(0,v.parseRole)(o.role),f=e.now(),c=new Map((await e.records.listGrantsOn(t)).filter(v.isNative).map(n=>[n.principal,n])),d=[],u=[],s=i((n,l)=>{if(c.get(n)?.role===l)return;const m={entityId:t,principal:n,role:l,source:G.NATIVE,grantedBy:r.userId,createdAt:f};c.set(n,m),d.push(m)},"grant"),a=i(n=>{const l=c.get(n);l&&(c.delete(n),u.push(l))},"withdraw");o.anyone&&s(G.ANYONE,"viewer"),o.restricted&&a(G.ANYONE);for(const n of o.add??[]){const l=await p(e,n);s(l,w),await e.records.deleteRequest(t,l)}for(const n of o.remove??[])a(await p(e,n));return u.length&&await e.records.revokeGrants(u,f),d.length&&await e.records.putGrants(d),[...c.values()]}i(k,"changeNativeGrants");async function A(e,r,t,o){const w=e.now(),f=await e.records.listGrantsSourcedAt(r),c=t.filter(s=>s!==r).flatMap(s=>o.map(a=>({entityId:s,principal:a.principal,role:a.role,source:r,grantedBy:a.grantedBy,createdAt:w}))),d=f.filter(s=>!c.some(a=>y(a,s))),u=c.filter(s=>!f.some(a=>y(s,a)&&s.role===a.role));d.length&&await e.records.revokeGrants(d,w),u.length&&await e.records.putGrants(u)}i(A,"propagateGrants");async function E(e,r){const t=[...(await e.records.listGrantsOn(r)).filter(v.isNative),...await e.records.listGrantsSourcedAt(r)];return t.length&&await e.records.revokeGrants(t,e.now()),t.length}i(E,"revokeHeadGrants");
|
|
@@ -1,36 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Sharing: who may open an agent, automation, app, or tool. Every entity
|
|
4
|
-
* carries its own grants, native or inherited down a dependency closure;
|
|
5
|
-
* the rails move the bytes to whichever computers the grants reach. One
|
|
6
|
-
* access law, one command surface, thin CLI and MCP doors.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.NATIVE = exports.ANYONE = exports.createMcpTools = exports.runCli = exports.parseCli = exports.CLI_HELP = exports.createCommands = exports.commandDefinitions = exports.commandDefinition = exports.idOfLink = exports.parseKind = exports.assertDetached = exports.roleOf = exports.isNative = exports.effectiveGrants = exports.SharingError = exports.createSharing = void 0;
|
|
10
|
-
var sharing_js_1 = require("./sharing.js");
|
|
11
|
-
Object.defineProperty(exports, "createSharing", { enumerable: true, get: function () { return sharing_js_1.createSharing; } });
|
|
12
|
-
var errors_js_1 = require("./errors.js");
|
|
13
|
-
Object.defineProperty(exports, "SharingError", { enumerable: true, get: function () { return errors_js_1.SharingError; } });
|
|
14
|
-
var access_js_1 = require("./access.js");
|
|
15
|
-
Object.defineProperty(exports, "effectiveGrants", { enumerable: true, get: function () { return access_js_1.effectiveGrants; } });
|
|
16
|
-
Object.defineProperty(exports, "isNative", { enumerable: true, get: function () { return access_js_1.isNative; } });
|
|
17
|
-
Object.defineProperty(exports, "roleOf", { enumerable: true, get: function () { return access_js_1.roleOf; } });
|
|
18
|
-
var construct_js_1 = require("./construct.js");
|
|
19
|
-
Object.defineProperty(exports, "assertDetached", { enumerable: true, get: function () { return construct_js_1.assertDetached; } });
|
|
20
|
-
Object.defineProperty(exports, "parseKind", { enumerable: true, get: function () { return construct_js_1.parseKind; } });
|
|
21
|
-
var entity_js_1 = require("./entity.js");
|
|
22
|
-
Object.defineProperty(exports, "idOfLink", { enumerable: true, get: function () { return entity_js_1.idOfLink; } });
|
|
23
|
-
var commands_js_1 = require("./commands.js");
|
|
24
|
-
Object.defineProperty(exports, "commandDefinition", { enumerable: true, get: function () { return commands_js_1.commandDefinition; } });
|
|
25
|
-
Object.defineProperty(exports, "commandDefinitions", { enumerable: true, get: function () { return commands_js_1.commandDefinitions; } });
|
|
26
|
-
Object.defineProperty(exports, "createCommands", { enumerable: true, get: function () { return commands_js_1.createCommands; } });
|
|
27
|
-
var cli_js_1 = require("./cli.js");
|
|
28
|
-
Object.defineProperty(exports, "CLI_HELP", { enumerable: true, get: function () { return cli_js_1.CLI_HELP; } });
|
|
29
|
-
Object.defineProperty(exports, "parseCli", { enumerable: true, get: function () { return cli_js_1.parseCli; } });
|
|
30
|
-
Object.defineProperty(exports, "runCli", { enumerable: true, get: function () { return cli_js_1.runCli; } });
|
|
31
|
-
var mcp_js_1 = require("./mcp.js");
|
|
32
|
-
Object.defineProperty(exports, "createMcpTools", { enumerable: true, get: function () { return mcp_js_1.createMcpTools; } });
|
|
33
|
-
var types_js_1 = require("./types.js");
|
|
34
|
-
Object.defineProperty(exports, "ANYONE", { enumerable: true, get: function () { return types_js_1.ANYONE; } });
|
|
35
|
-
Object.defineProperty(exports, "NATIVE", { enumerable: true, get: function () { return types_js_1.NATIVE; } });
|
|
36
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use strict";var o=Object.defineProperty;var e=(a,c)=>o(a,"name",{value:c,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.NATIVE=exports.ANYONE=exports.createMcpTools=exports.runCli=exports.parseCli=exports.CLI_HELP=exports.createCommands=exports.commandDefinitions=exports.commandDefinition=exports.idOfLink=exports.parseKind=exports.assertDetached=exports.roleOf=exports.isNative=exports.effectiveGrants=exports.SharingError=exports.createSharing=void 0;var f=require("./sharing.js");Object.defineProperty(exports,"createSharing",{enumerable:!0,get:e(function(){return f.createSharing},"get")});var s=require("./errors.js");Object.defineProperty(exports,"SharingError",{enumerable:!0,get:e(function(){return s.SharingError},"get")});var r=require("./access.js");Object.defineProperty(exports,"effectiveGrants",{enumerable:!0,get:e(function(){return r.effectiveGrants},"get")}),Object.defineProperty(exports,"isNative",{enumerable:!0,get:e(function(){return r.isNative},"get")}),Object.defineProperty(exports,"roleOf",{enumerable:!0,get:e(function(){return r.roleOf},"get")});var i=require("./construct.js");Object.defineProperty(exports,"assertDetached",{enumerable:!0,get:e(function(){return i.assertDetached},"get")}),Object.defineProperty(exports,"parseKind",{enumerable:!0,get:e(function(){return i.parseKind},"get")});var d=require("./entity.js");Object.defineProperty(exports,"idOfLink",{enumerable:!0,get:e(function(){return d.idOfLink},"get")});var t=require("./commands.js");Object.defineProperty(exports,"commandDefinition",{enumerable:!0,get:e(function(){return t.commandDefinition},"get")}),Object.defineProperty(exports,"commandDefinitions",{enumerable:!0,get:e(function(){return t.commandDefinitions},"get")}),Object.defineProperty(exports,"createCommands",{enumerable:!0,get:e(function(){return t.createCommands},"get")});var n=require("./cli.js");Object.defineProperty(exports,"CLI_HELP",{enumerable:!0,get:e(function(){return n.CLI_HELP},"get")}),Object.defineProperty(exports,"parseCli",{enumerable:!0,get:e(function(){return n.parseCli},"get")}),Object.defineProperty(exports,"runCli",{enumerable:!0,get:e(function(){return n.runCli},"get")});var m=require("./mcp.js");Object.defineProperty(exports,"createMcpTools",{enumerable:!0,get:e(function(){return m.createMcpTools},"get")});var u=require("./types.js");Object.defineProperty(exports,"ANYONE",{enumerable:!0,get:e(function(){return u.ANYONE},"get")}),Object.defineProperty(exports,"NATIVE",{enumerable:!0,get:e(function(){return u.NATIVE},"get")});
|
package/dist-cjs/sharing/mcp.js
CHANGED
|
@@ -1,33 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* MCP door over the Sharing command surface: one tool per command, with the
|
|
4
|
-
* command's own schema and annotations. Results are the command result as
|
|
5
|
-
* JSON text; failures are error text with isError set. The descriptors carry
|
|
6
|
-
* no transport; a host registers them with whatever MCP server it runs.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.createMcpTools = createMcpTools;
|
|
10
|
-
const commands_js_1 = require("./commands.js");
|
|
11
|
-
function text(value) {
|
|
12
|
-
return {
|
|
13
|
-
content: [{ type: 'text', text: typeof value === 'string' ? value : JSON.stringify(value, null, 2) }],
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
function createMcpTools(commands) {
|
|
17
|
-
return commands_js_1.commandDefinitions.map((definition) => ({
|
|
18
|
-
name: definition.mcpName,
|
|
19
|
-
title: definition.title,
|
|
20
|
-
description: definition.description,
|
|
21
|
-
inputSchema: definition.inputSchema(),
|
|
22
|
-
annotations: definition.annotations,
|
|
23
|
-
async handler(args = {}) {
|
|
24
|
-
try {
|
|
25
|
-
return text(await commands.execute(definition.name, args));
|
|
26
|
-
}
|
|
27
|
-
catch (error) {
|
|
28
|
-
return { ...text(error instanceof Error ? error.message : String(error)), isError: true };
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
}));
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=mcp.js.map
|
|
1
|
+
"use strict";var n=Object.defineProperty;var c=(r,e)=>n(r,"name",{value:e,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.createMcpTools=m;const a=require("../commands/mcp.js"),o=require("./commands.js");function m(r){return o.commandDefinitions.map(e=>({name:e.mcpName,title:e.title,description:e.description,inputSchema:e.inputSchema(),annotations:e.annotations,async handler(s={}){try{return(0,a.mcpText)(await r.execute(e.name,s))}catch(t){return{...(0,a.mcpText)(t instanceof Error?t.message:String(t)),isError:!0}}}}))}c(m,"createMcpTools");
|
|
@@ -1,47 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Seeing and changing access. With a target, edit its native grants and,
|
|
4
|
-
* unless `--only`, re-derive its closure's inherited rows. Without one, the
|
|
5
|
-
* overview: what the actor shares, what they may receive, and the requests
|
|
6
|
-
* waiting on them.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.access = access;
|
|
10
|
-
const construct_js_1 = require("./construct.js");
|
|
11
|
-
const entity_js_1 = require("./entity.js");
|
|
12
|
-
const errors_js_1 = require("./errors.js");
|
|
13
|
-
const grants_js_1 = require("./grants.js");
|
|
14
|
-
const share_js_1 = require("./share.js");
|
|
15
|
-
async function target(ports, actor, input) {
|
|
16
|
-
if (input.kind)
|
|
17
|
-
return (await (0, construct_js_1.ownedConstruct)(ports, actor, { kind: input.kind, ref: input.ref })).id;
|
|
18
|
-
return (0, entity_js_1.ownedEntity)(ports, actor, input.ref);
|
|
19
|
-
}
|
|
20
|
-
async function access(ports, actor, input = {}) {
|
|
21
|
-
if (!input.ref) {
|
|
22
|
-
if (input.kind || (0, grants_js_1.hasChange)(input))
|
|
23
|
-
throw new errors_js_1.SharingError('invalid', 'name the construct or link whose access to change');
|
|
24
|
-
return overview(ports, actor);
|
|
25
|
-
}
|
|
26
|
-
const id = await target(ports, actor, { ...input, ref: input.ref });
|
|
27
|
-
return (0, grants_js_1.hasChange)(input) ? (0, share_js_1.grantHead)(ports, actor, id, input) : (0, entity_js_1.ownerView)(ports, id);
|
|
28
|
-
}
|
|
29
|
-
function byEntity(grants) {
|
|
30
|
-
const groups = new Map();
|
|
31
|
-
for (const grant of grants)
|
|
32
|
-
groups.set(grant.entityId, [...groups.get(grant.entityId) ?? [], grant]);
|
|
33
|
-
return groups;
|
|
34
|
-
}
|
|
35
|
-
async function overview(ports, actor) {
|
|
36
|
-
const shared = [...byEntity(await ports.records.listGrantsBy(actor.userId))]
|
|
37
|
-
.map(([id, native]) => ({ id, link: ports.link(id), native }));
|
|
38
|
-
const received = [];
|
|
39
|
-
for (const id of byEntity(await ports.records.listGrantsTo(actor.userId)).keys()) {
|
|
40
|
-
const held = await (0, entity_js_1.entityAccess)(ports, actor, id);
|
|
41
|
-
if (held.role !== null && held.role !== 'owner') {
|
|
42
|
-
received.push({ id, link: ports.link(id), role: held.role, grants: held.grants });
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return { shared, received, requests: await ports.records.listRequestsTo(actor.userId) };
|
|
46
|
-
}
|
|
47
|
-
//# sourceMappingURL=permissions.js.map
|
|
1
|
+
"use strict";var u=Object.defineProperty;var a=(e,n)=>u(e,"name",{value:n,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.access=y;const f=require("./construct.js"),c=require("./entity.js"),l=require("./errors.js"),o=require("./grants.js"),w=require("./share.js");async function h(e,n,r){return r.kind?(await(0,f.ownedConstruct)(e,n,{kind:r.kind,ref:r.ref})).id:(0,c.ownedEntity)(e,n,r.ref)}a(h,"target");async function y(e,n,r={}){if(!r.ref){if(r.kind||(0,o.hasChange)(r))throw new l.SharingError("invalid","name the construct or link whose access to change");return g(e,n)}const i=await h(e,n,{...r,ref:r.ref});return(0,o.hasChange)(r)?(0,w.grantHead)(e,n,i,r):(0,c.ownerView)(e,i)}a(y,"access");function d(e){const n=new Map;for(const r of e)n.set(r.entityId,[...n.get(r.entityId)??[],r]);return n}a(d,"byEntity");async function g(e,n){const r=[...d(await e.records.listGrantsBy(n.userId))].map(([s,t])=>({id:s,link:e.link(s),native:t})),i=[];for(const s of d(await e.records.listGrantsTo(n.userId)).keys()){const t=await(0,c.entityAccess)(e,n,s);t.role!==null&&t.role!=="owner"&&i.push({id:s,link:e.link(s),role:t.role,grants:t.grants})}return{shared:r,received:i,requests:await e.records.listRequestsTo(n.userId)}}a(g,"overview");
|