@idleware/ringi 0.4.0 → 0.6.0
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/README.md +1 -1
- package/package.json +5 -1
- package/target/dts/adapters/fs/index.d.ts +2 -0
- package/target/dts/adapters/fs/lock.d.ts +1 -0
- package/target/dts/adapters/fs/write.d.ts +5 -0
- package/target/dts/adapters/host-posix/group-state.d.ts +7 -0
- package/target/dts/adapters/host-posix/groups.d.ts +1 -0
- package/target/dts/adapters/host-posix/index.d.ts +2 -0
- package/target/dts/adapters/host-posix/launch.d.ts +7 -0
- package/target/dts/adapters/host-posix/probes.d.ts +5 -0
- package/target/dts/adapters/host-posix/stats.d.ts +9 -0
- package/target/dts/adapters/keys-file/index.d.ts +2 -0
- package/target/dts/adapters/state-fs/index.d.ts +5 -0
- package/target/dts/adapters/tool-claude/index.d.ts +2 -0
- package/target/dts/adapters/tool-codex/index.d.ts +2 -0
- package/target/dts/adapters/tool-cursor/index.d.ts +2 -0
- package/target/dts/adapters/tool-traces/index.d.ts +3 -0
- package/target/dts/adapters/transport-git/branches.d.ts +43 -0
- package/target/dts/adapters/transport-git/files.d.ts +2 -0
- package/target/dts/adapters/transport-git/index.d.ts +32 -0
- package/target/dts/adapters/transport-git/marks.d.ts +20 -0
- package/target/dts/adapters/transport-git/remote/admit.d.ts +7 -0
- package/target/dts/adapters/transport-git/remote/alarms.d.ts +3 -0
- package/target/dts/adapters/transport-git/remote/bootstrap.d.ts +7 -0
- package/target/dts/adapters/transport-git/remote/branch-commit.d.ts +3 -0
- package/target/dts/adapters/transport-git/remote/branch-control.d.ts +15 -0
- package/target/dts/adapters/transport-git/remote/branch-scan.d.ts +2 -0
- package/target/dts/adapters/transport-git/remote/branch.d.ts +5 -0
- package/target/dts/adapters/transport-git/remote/cache.d.ts +3 -0
- package/target/dts/adapters/transport-git/remote/commits.d.ts +2 -0
- package/target/dts/adapters/transport-git/remote/forget.d.ts +2 -0
- package/target/dts/adapters/transport-git/remote/git.d.ts +26 -0
- package/target/dts/adapters/transport-git/remote/heartbeat-facts.d.ts +1 -0
- package/target/dts/adapters/transport-git/remote/heartbeat-name.d.ts +6 -0
- package/target/dts/adapters/transport-git/remote/heartbeat-object.d.ts +10 -0
- package/target/dts/adapters/transport-git/remote/heartbeat-push.d.ts +2 -0
- package/target/dts/adapters/transport-git/remote/heartbeat.d.ts +7 -0
- package/target/dts/adapters/transport-git/remote/keys.d.ts +13 -0
- package/target/dts/adapters/transport-git/remote/main.d.ts +11 -0
- package/target/dts/adapters/transport-git/remote/process.d.ts +20 -0
- package/target/dts/adapters/transport-git/remote/push-retry.d.ts +2 -0
- package/target/dts/adapters/transport-git/remote/push-validate.d.ts +2 -0
- package/target/dts/adapters/transport-git/remote/push.d.ts +16 -0
- package/target/dts/adapters/transport-git/remote/roster.d.ts +7 -0
- package/target/dts/adapters/transport-git/remote/signals.d.ts +15 -0
- package/target/dts/adapters/transport-git/remote/signature.d.ts +5 -0
- package/target/dts/adapters/transport-git/remote/sync-heartbeat.d.ts +2 -0
- package/target/dts/adapters/transport-git/remote/sync-rooms.d.ts +6 -0
- package/target/dts/adapters/transport-git/remote/sync-tags.d.ts +8 -0
- package/target/dts/adapters/transport-git/remote/sync.d.ts +2 -0
- package/target/dts/adapters/transport-git/remote/types.d.ts +64 -0
- package/target/dts/adapters/transport-git/remote.d.ts +17 -0
- package/target/dts/adapters/transport-git/repo.d.ts +31 -0
- package/target/dts/adapters/transport-git/run.d.ts +21 -0
- package/target/dts/adapters/transport-git/signing.d.ts +4 -0
- package/target/dts/adapters/transport-git/tags.d.ts +15 -0
- package/target/dts/adapters/transport-git/transport.d.ts +7 -0
- package/target/dts/adapters/transport-kafka/index.d.ts +2 -0
- package/target/dts/adapters/transport-temporal/index.d.ts +2 -0
- package/target/dts/cli.d.ts +2 -1
- package/target/dts/{cli/agent.d.ts → clients/cli/agent/index.d.ts} +3 -3
- package/target/dts/{cli → clients/cli/agent}/session.d.ts +2 -2
- package/target/dts/clients/cli/arg-parse.d.ts +2 -0
- package/target/dts/{cli → clients/cli}/args.d.ts +2 -2
- package/target/dts/clients/cli/commands.d.ts +2 -0
- package/target/dts/clients/cli/context.d.ts +4 -0
- package/target/dts/{cli/index.d.ts → clients/cli/help.d.ts} +1 -3
- package/target/dts/clients/cli/index.d.ts +4 -0
- package/target/dts/clients/cli/operator/heartbeat-format.d.ts +5 -0
- package/target/dts/clients/cli/operator/heartbeat.d.ts +3 -0
- package/target/dts/clients/cli/operator/hub-commands.d.ts +6 -0
- package/target/dts/clients/cli/operator/hub.d.ts +2 -0
- package/target/dts/clients/cli/operator/index.d.ts +5 -0
- package/target/dts/clients/cli/operator/room-lifecycle.d.ts +5 -0
- package/target/dts/clients/cli/operator/room-list.d.ts +5 -0
- package/target/dts/clients/cli/operator/room-members.d.ts +4 -0
- package/target/dts/clients/cli/operator/room.d.ts +2 -0
- package/target/dts/clients/cli/operator/sessions.d.ts +5 -0
- package/target/dts/clients/cli/operator/watch.d.ts +2 -0
- package/target/dts/clients/cli/operator/where-format.d.ts +7 -0
- package/target/dts/clients/cli/operator/where.d.ts +2 -0
- package/target/dts/clients/cli/shared/budget.d.ts +7 -0
- package/target/dts/clients/cli/shared/files.d.ts +4 -0
- package/target/dts/clients/cli/shared/index.d.ts +7 -0
- package/target/dts/clients/cli/shared/messages.d.ts +7 -0
- package/target/dts/clients/cli/shared/profile.d.ts +4 -0
- package/target/dts/clients/cli/shared/session.d.ts +6 -0
- package/target/dts/clients/cli/shared/signals.d.ts +3 -0
- package/target/dts/clients/cli/shared/work.d.ts +6 -0
- package/target/dts/clients/cli/skill/index.d.ts +3 -0
- package/target/dts/{cli/skill.d.ts → clients/cli/skill/targets.d.ts} +1 -2
- package/target/dts/composition/index.d.ts +2 -0
- package/target/dts/core/agents/heartbeat/index.d.ts +33 -0
- package/target/dts/core/agents/heartbeat/pulse.d.ts +32 -0
- package/target/dts/core/agents/heartbeat/singleton.d.ts +3 -0
- package/target/dts/core/agents/heartbeat/tools.d.ts +6 -0
- package/target/dts/{app → core/agents}/overview.d.ts +12 -6
- package/target/dts/core/agents/ports/host.d.ts +47 -0
- package/target/dts/core/agents/ports/index.d.ts +9 -0
- package/target/dts/core/agents/ports/tools.d.ts +18 -0
- package/target/dts/core/agents/sessions/agent.d.ts +70 -0
- package/target/dts/core/agents/sessions/binding.d.ts +9 -0
- package/target/dts/core/agents/sessions/context.d.ts +8 -0
- package/target/dts/{runtime/session.d.ts → core/agents/sessions/index.d.ts} +2 -9
- package/target/dts/core/agents/sessions/join.d.ts +20 -0
- package/target/dts/core/agents/sessions/resume.d.ts +2 -0
- package/target/dts/core/agents/sessions/session.d.ts +46 -0
- package/target/dts/core/agents/sessions/wait.d.ts +38 -0
- package/target/dts/core/agents/turns/budgets.d.ts +5 -0
- package/target/dts/core/agents/turns/dispatch.d.ts +9 -0
- package/target/dts/core/agents/turns/exhaustion.d.ts +11 -0
- package/target/dts/core/agents/turns/grants.d.ts +4 -0
- package/target/dts/core/agents/turns/index.d.ts +4 -0
- package/target/dts/core/agents/turns/limits.d.ts +2 -0
- package/target/dts/core/agents/turns/messages.d.ts +10 -0
- package/target/dts/core/agents/turns/pings.d.ts +5 -0
- package/target/dts/core/agents/turns/plan.d.ts +3 -0
- package/target/dts/core/agents/turns/poll.d.ts +8 -0
- package/target/dts/core/agents/turns/results.d.ts +3 -0
- package/target/dts/core/agents/turns/seat.d.ts +2 -0
- package/target/dts/core/agents/turns/types.d.ts +59 -0
- package/target/dts/core/hub/decisions/budget.d.ts +15 -0
- package/target/dts/core/hub/decisions/check.d.ts +6 -0
- package/target/dts/core/hub/decisions/index.d.ts +5 -0
- package/target/dts/core/hub/decisions/proposal.d.ts +38 -0
- package/target/dts/core/hub/decisions/usage.d.ts +12 -0
- package/target/dts/{runtime/reader.d.ts → core/hub/history/index.d.ts} +12 -6
- package/target/dts/core/hub/ports/index.d.ts +16 -0
- package/target/dts/core/hub/ports/state.d.ts +12 -0
- package/target/dts/{store/index.d.ts → core/hub/ports/store.d.ts} +58 -17
- package/target/dts/core/hub/protocol/index.d.ts +5 -0
- package/target/dts/{protocol/index.d.ts → core/hub/protocol/model.d.ts} +0 -25
- package/target/dts/core/hub/protocol/order.d.ts +2 -0
- package/target/dts/core/hub/protocol/reading.d.ts +8 -0
- package/target/dts/core/hub/protocol/text.d.ts +11 -0
- package/target/dts/core/hub/protocol/threads.d.ts +5 -0
- package/target/dts/core/hub/rooms/compat.d.ts +5 -0
- package/target/dts/core/hub/rooms/hubs.d.ts +14 -0
- package/target/dts/core/hub/rooms/index.d.ts +53 -0
- package/target/dts/core/hub/rooms/messages.d.ts +8 -0
- package/target/dts/core/hub/rooms/rooms.d.ts +10 -0
- package/target/dts/core/hub/signals/check.d.ts +3 -0
- package/target/dts/core/hub/signals/effective.d.ts +3 -0
- package/target/dts/core/hub/signals/index.d.ts +5 -0
- package/target/dts/core/hub/signals/marks.d.ts +4 -0
- package/target/dts/core/hub/signals/model.d.ts +28 -0
- package/target/dts/core/hub/signals/pins.d.ts +5 -0
- package/target/dts/{hub/signals.d.ts → core/hub/signals/write.d.ts} +1 -1
- package/target/dts/core/hub/usecases/actor.d.ts +6 -0
- package/target/dts/{app → core/hub/usecases}/budget.d.ts +5 -18
- package/target/dts/core/hub/usecases/config.d.ts +6 -0
- package/target/dts/{app → core/hub/usecases}/context.d.ts +3 -8
- package/target/dts/{app → core/hub/usecases}/hubs.d.ts +1 -1
- package/target/dts/core/hub/usecases/propose.d.ts +17 -0
- package/target/dts/{app → core/hub/usecases}/room.d.ts +8 -33
- package/target/dts/{app → core/hub/usecases}/rooms.d.ts +2 -6
- package/target/dts/core/hub/usecases/roster.d.ts +5 -0
- package/target/dts/core/hub/usecases/send.d.ts +21 -0
- package/target/dts/core/hub/usecases/staging.d.ts +8 -0
- package/target/dts/{app → core/hub/usecases}/view.d.ts +4 -4
- package/target/dts/{domain/profiles.d.ts → core/hub/work/index.d.ts} +3 -7
- package/target/dts/core/hub/work/parse.d.ts +2 -0
- package/target/dts/core/hub/work/task.d.ts +6 -0
- package/target/dts/core/signing/index.d.ts +35 -0
- package/target/dts/index.d.ts +8 -8
- package/target/dts/lib/fail.d.ts +8 -0
- package/target/dts/lib/index.d.ts +3 -11
- package/target/dts/lib/json.d.ts +1 -0
- package/target/esm/adapters/fs/index.js +5 -0
- package/target/esm/adapters/fs/lock.js +83 -0
- package/target/esm/adapters/fs/write.js +25 -0
- package/target/esm/adapters/host-posix/group-state.js +24 -0
- package/target/esm/adapters/host-posix/groups.js +43 -0
- package/target/esm/adapters/host-posix/index.js +35 -0
- package/target/esm/adapters/host-posix/launch.js +80 -0
- package/target/esm/adapters/host-posix/probes.js +66 -0
- package/target/esm/adapters/host-posix/stats.js +27 -0
- package/target/esm/adapters/keys-file/index.js +68 -0
- package/target/esm/adapters/state-fs/index.js +79 -0
- package/target/esm/adapters/tool-claude/index.js +32 -0
- package/target/esm/adapters/tool-codex/index.js +38 -0
- package/target/esm/adapters/tool-cursor/index.js +8 -0
- package/target/esm/adapters/tool-traces/index.js +18 -0
- package/target/esm/adapters/transport-git/branches.js +155 -0
- package/target/esm/adapters/transport-git/files.js +48 -0
- package/target/esm/adapters/transport-git/index.js +128 -0
- package/target/esm/adapters/transport-git/marks.js +88 -0
- package/target/esm/adapters/transport-git/remote/admit.js +71 -0
- package/target/esm/adapters/transport-git/remote/alarms.js +30 -0
- package/target/esm/adapters/transport-git/remote/bootstrap.js +47 -0
- package/target/esm/adapters/transport-git/remote/branch-commit.js +36 -0
- package/target/esm/adapters/transport-git/remote/branch-control.js +37 -0
- package/target/esm/adapters/transport-git/remote/branch-scan.js +28 -0
- package/target/esm/adapters/transport-git/remote/branch.js +37 -0
- package/target/esm/adapters/transport-git/remote/cache.js +23 -0
- package/target/esm/adapters/transport-git/remote/commits.js +25 -0
- package/target/esm/adapters/transport-git/remote/forget.js +35 -0
- package/target/esm/adapters/transport-git/remote/git.js +58 -0
- package/target/esm/adapters/transport-git/remote/heartbeat-facts.js +35 -0
- package/target/esm/adapters/transport-git/remote/heartbeat-name.js +19 -0
- package/target/esm/adapters/transport-git/remote/heartbeat-object.js +40 -0
- package/target/esm/adapters/transport-git/remote/heartbeat-push.js +44 -0
- package/target/esm/adapters/transport-git/remote/heartbeat.js +44 -0
- package/target/esm/adapters/transport-git/remote/keys.js +75 -0
- package/target/esm/adapters/transport-git/remote/main.js +41 -0
- package/target/esm/adapters/transport-git/remote/process.js +37 -0
- package/target/esm/adapters/transport-git/remote/push-retry.js +46 -0
- package/target/esm/adapters/transport-git/remote/push-validate.js +39 -0
- package/target/esm/adapters/transport-git/remote/push.js +62 -0
- package/target/esm/adapters/transport-git/remote/roster.js +48 -0
- package/target/esm/adapters/transport-git/remote/signals.js +63 -0
- package/target/esm/adapters/transport-git/remote/signature.js +56 -0
- package/target/esm/adapters/transport-git/remote/sync-heartbeat.js +26 -0
- package/target/esm/adapters/transport-git/remote/sync-rooms.js +38 -0
- package/target/esm/adapters/transport-git/remote/sync-tags.js +48 -0
- package/target/esm/adapters/transport-git/remote/sync.js +38 -0
- package/target/esm/adapters/transport-git/remote/types.js +10 -0
- package/target/esm/adapters/transport-git/remote.js +17 -0
- package/target/esm/adapters/transport-git/repo.js +115 -0
- package/target/esm/adapters/transport-git/run.js +57 -0
- package/target/esm/adapters/transport-git/signing.js +44 -0
- package/target/esm/adapters/transport-git/tags.js +21 -0
- package/target/esm/adapters/transport-git/transport.js +29 -0
- package/target/esm/adapters/transport-kafka/index.js +4 -0
- package/target/esm/adapters/transport-temporal/index.js +4 -0
- package/target/esm/cli.js +5 -4
- package/target/esm/{cli/agent.js → clients/cli/agent/index.js} +8 -7
- package/target/esm/{cli → clients/cli/agent}/session.js +13 -7
- package/target/esm/clients/cli/arg-parse.js +41 -0
- package/target/esm/{cli → clients/cli}/args.js +3 -36
- package/target/esm/clients/cli/commands.js +45 -0
- package/target/esm/clients/cli/context.js +6 -0
- package/target/esm/{cli/index.js → clients/cli/help.js} +6 -73
- package/target/esm/clients/cli/index.js +27 -0
- package/target/esm/clients/cli/operator/heartbeat-format.js +8 -0
- package/target/esm/clients/cli/operator/heartbeat.js +35 -0
- package/target/esm/clients/cli/operator/hub-commands.js +37 -0
- package/target/esm/clients/cli/operator/hub.js +10 -0
- package/target/esm/clients/cli/operator/index.js +8 -0
- package/target/esm/clients/cli/operator/room-lifecycle.js +23 -0
- package/target/esm/clients/cli/operator/room-list.js +27 -0
- package/target/esm/clients/cli/operator/room-members.js +15 -0
- package/target/esm/clients/cli/operator/room.js +15 -0
- package/target/esm/clients/cli/operator/sessions.js +32 -0
- package/target/esm/clients/cli/operator/watch.js +15 -0
- package/target/esm/clients/cli/operator/where-format.js +24 -0
- package/target/esm/clients/cli/operator/where.js +32 -0
- package/target/esm/clients/cli/shared/budget.js +50 -0
- package/target/esm/clients/cli/shared/files.js +26 -0
- package/target/esm/clients/cli/shared/index.js +10 -0
- package/target/esm/clients/cli/shared/messages.js +41 -0
- package/target/esm/clients/cli/shared/profile.js +17 -0
- package/target/esm/clients/cli/shared/session.js +8 -0
- package/target/esm/clients/cli/shared/signals.js +21 -0
- package/target/esm/clients/cli/shared/work.js +26 -0
- package/target/esm/clients/cli/skill/index.js +40 -0
- package/target/esm/clients/cli/skill/targets.js +20 -0
- package/target/esm/composition/index.js +34 -0
- package/target/esm/core/agents/heartbeat/index.js +43 -0
- package/target/esm/core/agents/heartbeat/pulse.js +86 -0
- package/target/esm/core/agents/heartbeat/singleton.js +38 -0
- package/target/esm/core/agents/heartbeat/tools.js +24 -0
- package/target/esm/{app → core/agents}/overview.js +15 -9
- package/target/esm/core/agents/ports/host.js +4 -0
- package/target/esm/core/agents/ports/index.js +7 -0
- package/target/esm/core/agents/ports/tools.js +5 -0
- package/target/esm/{app → core/agents/sessions}/agent.js +11 -43
- package/target/esm/core/agents/sessions/binding.js +43 -0
- package/target/esm/core/agents/sessions/context.js +11 -0
- package/target/esm/core/agents/sessions/index.js +59 -0
- package/target/esm/core/agents/sessions/join.js +55 -0
- package/target/esm/core/agents/sessions/resume.js +54 -0
- package/target/esm/core/agents/sessions/session.js +28 -0
- package/target/esm/core/agents/sessions/wait.js +47 -0
- package/target/esm/core/agents/turns/budgets.js +48 -0
- package/target/esm/core/agents/turns/dispatch.js +40 -0
- package/target/esm/core/agents/turns/exhaustion.js +16 -0
- package/target/esm/core/agents/turns/grants.js +36 -0
- package/target/esm/core/agents/turns/index.js +33 -0
- package/target/esm/core/agents/turns/limits.js +11 -0
- package/target/esm/core/agents/turns/messages.js +32 -0
- package/target/esm/core/agents/turns/pings.js +30 -0
- package/target/esm/core/agents/turns/plan.js +29 -0
- package/target/esm/core/agents/turns/poll.js +48 -0
- package/target/esm/core/agents/turns/results.js +40 -0
- package/target/esm/core/agents/turns/seat.js +44 -0
- package/target/esm/core/agents/turns/types.js +3 -0
- package/target/esm/{domain/index.js → core/hub/capabilities.js} +3 -3
- package/target/esm/core/hub/decisions/budget.js +40 -0
- package/target/esm/core/hub/decisions/check.js +43 -0
- package/target/esm/core/hub/decisions/index.js +10 -0
- package/target/esm/core/hub/decisions/proposal.js +73 -0
- package/target/esm/core/hub/decisions/usage.js +39 -0
- package/target/esm/core/hub/history/index.js +90 -0
- package/target/esm/core/hub/ports/index.js +10 -0
- package/target/esm/core/hub/ports/state.js +5 -0
- package/target/esm/core/hub/ports/store.js +10 -0
- package/target/esm/{protocol → core/hub/protocol}/files.js +4 -2
- package/target/esm/core/hub/protocol/index.js +9 -0
- package/target/esm/core/hub/protocol/model.js +15 -0
- package/target/esm/core/hub/protocol/order.js +39 -0
- package/target/esm/core/hub/protocol/reading.js +29 -0
- package/target/esm/core/hub/protocol/text.js +95 -0
- package/target/esm/core/hub/protocol/threads.js +52 -0
- package/target/esm/core/hub/rooms/compat.js +42 -0
- package/target/esm/core/hub/rooms/hubs.js +92 -0
- package/target/esm/core/hub/rooms/index.js +23 -0
- package/target/esm/core/hub/rooms/messages.js +47 -0
- package/target/esm/core/hub/rooms/rooms.js +84 -0
- package/target/esm/core/hub/signals/check.js +33 -0
- package/target/esm/core/hub/signals/effective.js +31 -0
- package/target/esm/core/hub/signals/index.js +23 -0
- package/target/esm/core/hub/signals/marks.js +30 -0
- package/target/esm/core/hub/signals/model.js +5 -0
- package/target/esm/core/hub/signals/pins.js +21 -0
- package/target/esm/{hub/signals.js → core/hub/signals/write.js} +4 -4
- package/target/esm/core/hub/usecases/actor.js +3 -0
- package/target/esm/core/hub/usecases/budget.js +78 -0
- package/target/esm/core/hub/usecases/config.js +5 -0
- package/target/esm/core/hub/usecases/context.js +13 -0
- package/target/esm/core/hub/usecases/hubs.js +95 -0
- package/target/esm/core/hub/usecases/propose.js +39 -0
- package/target/esm/core/hub/usecases/room.js +82 -0
- package/target/esm/{app → core/hub/usecases}/rooms.js +11 -63
- package/target/esm/core/hub/usecases/roster.js +47 -0
- package/target/esm/core/hub/usecases/send.js +78 -0
- package/target/esm/core/hub/usecases/staging.js +60 -0
- package/target/esm/{app → core/hub/usecases}/view.js +33 -33
- package/target/esm/core/hub/work/index.js +13 -0
- package/target/esm/core/hub/work/parse.js +37 -0
- package/target/esm/core/hub/work/task.js +68 -0
- package/target/esm/core/signing/index.js +4 -0
- package/target/esm/index.js +7 -6
- package/target/esm/lib/fail.js +18 -0
- package/target/esm/lib/index.js +20 -195
- package/target/esm/lib/json.js +81 -0
- package/target/dts/app/agent.d.ts +0 -109
- package/target/dts/app/session.d.ts +0 -65
- package/target/dts/cli/context.d.ts +0 -6
- package/target/dts/cli/operator.d.ts +0 -8
- package/target/dts/cli/shared.d.ts +0 -27
- package/target/dts/domain/decisions.d.ts +0 -65
- package/target/dts/domain/signals.d.ts +0 -37
- package/target/dts/home/index.d.ts +0 -21
- package/target/dts/hub/index.d.ts +0 -72
- package/target/dts/runtime/watch.d.ts +0 -17
- package/target/dts/store/git/index.d.ts +0 -79
- package/target/dts/store/git/remote.d.ts +0 -86
- package/target/dts/store/kafka/index.d.ts +0 -2
- package/target/dts/store/temporal/index.d.ts +0 -2
- package/target/esm/app/budget.js +0 -95
- package/target/esm/app/context.js +0 -16
- package/target/esm/app/hubs.js +0 -76
- package/target/esm/app/room.js +0 -163
- package/target/esm/app/session.js +0 -99
- package/target/esm/cli/context.js +0 -8
- package/target/esm/cli/operator.js +0 -157
- package/target/esm/cli/shared.js +0 -159
- package/target/esm/cli/skill.js +0 -54
- package/target/esm/domain/decisions.js +0 -178
- package/target/esm/domain/profiles.js +0 -96
- package/target/esm/domain/signals.js +0 -134
- package/target/esm/home/index.js +0 -88
- package/target/esm/hub/index.js +0 -224
- package/target/esm/protocol/index.js +0 -219
- package/target/esm/runtime/reader.js +0 -65
- package/target/esm/runtime/session.js +0 -116
- package/target/esm/runtime/watch.js +0 -321
- package/target/esm/store/git/index.js +0 -644
- package/target/esm/store/git/remote.js +0 -758
- package/target/esm/store/index.js +0 -15
- package/target/esm/store/kafka/index.js +0 -3
- package/target/esm/store/temporal/index.js +0 -3
- /package/target/dts/{domain/index.d.ts → core/hub/capabilities.d.ts} +0 -0
- /package/target/dts/{protocol → core/hub/protocol}/files.d.ts +0 -0
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const locked: <T>(file: string, fn: () => T, timeout?: number) => T;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const SANDBOX: RegExp;
|
|
2
|
+
export declare const cannotWrite: (where: string, detail: string) => never;
|
|
3
|
+
export declare const guardWrite: <T>(where: string, fn: () => T) => T;
|
|
4
|
+
export declare const mkdirIn: (where: string, d: string) => void;
|
|
5
|
+
export declare const writeJsonAtomic: (file: string, v: unknown) => void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type GroupMember = {
|
|
2
|
+
group: number;
|
|
3
|
+
state: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const procMember: (text: string) => GroupMember | null;
|
|
6
|
+
export declare const psMember: (text: string) => GroupMember | null;
|
|
7
|
+
export declare const groupRunning: (group: number, members: Array<GroupMember | null>) => boolean | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const groupAlive: (group: number) => boolean;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Ancestor, ProcessRows } from '../../core/agents/ports/host.ts';
|
|
2
|
+
export declare const supported: boolean;
|
|
3
|
+
export declare const alive: (pid: number) => boolean;
|
|
4
|
+
export declare const snapshot: () => ProcessRows | null;
|
|
5
|
+
export declare const ancestors: (first: number) => Ancestor[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const seconds: (time: string) => number;
|
|
2
|
+
export declare const procStat: (line: string) => {
|
|
3
|
+
ppid: number;
|
|
4
|
+
cpu: number;
|
|
5
|
+
} | null;
|
|
6
|
+
export declare const treeCpu: (pid: number, rows: Map<number, {
|
|
7
|
+
ppid: number;
|
|
8
|
+
cpu: number;
|
|
9
|
+
}> | null) => number | null;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as Remote from './remote.ts';
|
|
2
|
+
import { Repo } from './repo.ts';
|
|
3
|
+
import type { Roster, StoredRoom } from '../../core/hub/ports/store.ts';
|
|
4
|
+
import type { Entry } from '../../core/hub/protocol/files.ts';
|
|
5
|
+
export declare const CONTROL_FILES: Set<string>;
|
|
6
|
+
type Entry_ = {
|
|
7
|
+
sha: string;
|
|
8
|
+
author: string;
|
|
9
|
+
text: string;
|
|
10
|
+
control: boolean;
|
|
11
|
+
skipped?: string;
|
|
12
|
+
};
|
|
13
|
+
type Named = Pick<StoredRoom, 'name' | 'genesis' | 'archived'>;
|
|
14
|
+
export declare class Branches extends Repo {
|
|
15
|
+
protected ref(name: string): string;
|
|
16
|
+
protected tip(name: string): string | null;
|
|
17
|
+
roomBranches(): string[];
|
|
18
|
+
roomNames(archived: boolean): string[];
|
|
19
|
+
protected isControl(room: Pick<StoredRoom, 'genesis'>, sha: string, author: string, text: string): boolean;
|
|
20
|
+
protected scanned: Map<string, {
|
|
21
|
+
tip: string;
|
|
22
|
+
entries: Entry_[];
|
|
23
|
+
}>;
|
|
24
|
+
protected entries(room: Named, tip: string): Entry_[];
|
|
25
|
+
protected judged(room: Named, tip: string, entries: Entry_[]): Entry_[];
|
|
26
|
+
protected scan(room: Pick<StoredRoom, 'genesis'>, tip: string, after?: string): Array<Entry_ & {
|
|
27
|
+
parent: string;
|
|
28
|
+
}>;
|
|
29
|
+
room(name: string): StoredRoom | null;
|
|
30
|
+
controlFile(room: StoredRoom, name: string, rev?: string): string | null;
|
|
31
|
+
createRoom(name: string, who: string, text: string, files: Record<string, string>): string;
|
|
32
|
+
updateControl(room: StoredRoom, who: string, text: string, files: Record<string, string>): string;
|
|
33
|
+
protected refsUnder(prefix: string): Array<[string, string]>;
|
|
34
|
+
archiveRoom(room: StoredRoom, as: string): void;
|
|
35
|
+
deleteRoom(room: StoredRoom): void;
|
|
36
|
+
protected remote(room: StoredRoom): Remote.Room;
|
|
37
|
+
roster(room: StoredRoom): Roster | null;
|
|
38
|
+
protected live(room: StoredRoom): Entry_[];
|
|
39
|
+
alarms(room: StoredRoom): string[];
|
|
40
|
+
protected onTop(room: StoredRoom, who: string, text: string, entries: Entry[], drop?: string[]): string;
|
|
41
|
+
protected commitsOf(room: StoredRoom): Set<string>;
|
|
42
|
+
}
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Marks } from './marks.ts';
|
|
2
|
+
export { runGit } from './run.ts';
|
|
3
|
+
import type { Descriptor, JoinKey, Store, StoredMessage, StoredRoom } from '../../core/hub/ports/store.ts';
|
|
4
|
+
import type { Entry } from '../../core/hub/protocol/files.ts';
|
|
5
|
+
import type { SigningContext } from '../../core/signing/index.ts';
|
|
6
|
+
export declare class GitStore extends Marks implements Store {
|
|
7
|
+
readonly type = "git";
|
|
8
|
+
static create(hubDir: string, d: Descriptor, connection: string | {
|
|
9
|
+
home: string;
|
|
10
|
+
signing?: SigningContext;
|
|
11
|
+
}, contract: Record<string, string>, text: string): GitStore;
|
|
12
|
+
static rootFor(hubDir: string, d: Descriptor, home: string, signing?: SigningContext): string;
|
|
13
|
+
logIds(room: StoredRoom): string[];
|
|
14
|
+
logHead(room: StoredRoom, id: string): string | null;
|
|
15
|
+
messages(room: StoredRoom, id: string, head: string): StoredMessage[];
|
|
16
|
+
blob(file: string): {
|
|
17
|
+
id: string;
|
|
18
|
+
size: number;
|
|
19
|
+
};
|
|
20
|
+
retain(room: StoredRoom, who: string, entries: Entry[]): void;
|
|
21
|
+
append(room: StoredRoom, who: string, text: string, entries: Entry[]): string;
|
|
22
|
+
verifyLog(room: StoredRoom, id: string, head: string): string | null;
|
|
23
|
+
pin(room: StoredRoom, reader: string, id: string, rev: string): void;
|
|
24
|
+
unpin(room: StoredRoom, reader: string, id: string): void;
|
|
25
|
+
file(rev: string, p: string): Buffer;
|
|
26
|
+
sizes(rev: string, paths: string[]): Map<string, number>;
|
|
27
|
+
admit(room: StoredRoom, who: string, key: string): string;
|
|
28
|
+
joinKey(room: StoredRoom, who: string): JoinKey;
|
|
29
|
+
forgetLog(room: StoredRoom, _id: string): void;
|
|
30
|
+
rootKey(): string;
|
|
31
|
+
rootRoster(): string;
|
|
32
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Branches } from './branches.ts';
|
|
2
|
+
import type { SignalRecord, StoredRoom } from '../../core/hub/ports/store.ts';
|
|
3
|
+
export declare class Marks extends Branches {
|
|
4
|
+
heartbeat(room: StoredRoom, who: string, target: string, text: string): string;
|
|
5
|
+
heartbeats(room: StoredRoom): Array<{
|
|
6
|
+
agent: string;
|
|
7
|
+
target: string;
|
|
8
|
+
time: number;
|
|
9
|
+
text: string;
|
|
10
|
+
}>;
|
|
11
|
+
signal(room: StoredRoom, who: string, target: string, name: string): void;
|
|
12
|
+
protected tags(): import("./tags.ts").TagRef[];
|
|
13
|
+
protected tagObjects(shas: string[]): Map<string, {
|
|
14
|
+
target: string;
|
|
15
|
+
tagger: string;
|
|
16
|
+
time: number;
|
|
17
|
+
text: string;
|
|
18
|
+
}>;
|
|
19
|
+
signals(room: StoredRoom): SignalRecord[];
|
|
20
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Handle, Room } from './types.ts';
|
|
2
|
+
export declare const join: (H: Handle, R: Room, who: string, home: string) => {
|
|
3
|
+
publicKey: string;
|
|
4
|
+
fingerprint: string;
|
|
5
|
+
admitted: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const roomAdmit: (H: Handle, R: Room, who: string, publicKey: string, home: string) => string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as C from '../../../lib/index.ts';
|
|
2
|
+
import type { Handle, Raw, VerifiedRoom } from './types.ts';
|
|
3
|
+
export type Scan = {
|
|
4
|
+
H: Handle;
|
|
5
|
+
genesis: Raw;
|
|
6
|
+
touching: Set<string>;
|
|
7
|
+
parent: string;
|
|
8
|
+
roster: Omit<VerifiedRoom, 'genesis'>;
|
|
9
|
+
control: string[];
|
|
10
|
+
authors: Map<string, string>;
|
|
11
|
+
skipped: Map<string, string>;
|
|
12
|
+
};
|
|
13
|
+
export declare const broken: (why: string) => C.Fail;
|
|
14
|
+
export declare const isControl: (s: Scan, c: Raw) => boolean;
|
|
15
|
+
export declare const acceptControl: (s: Scan, c: Raw) => void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Branch, Handle, Room, VerifiedRoom } from './types.ts';
|
|
2
|
+
export declare const branchData: (H: Handle, name: string, tip: string, expectedGenesis?: string) => Branch;
|
|
3
|
+
export declare const branch: (H: Handle, R: Pick<Room, 'name' | 'ref' | 'genesis'>, tip: string) => Branch;
|
|
4
|
+
export declare const verifyRoom: (H: Handle, R: Room) => VerifiedRoom;
|
|
5
|
+
export declare const verify: (H: Handle, R: Room, who: string, head: string) => string | null;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { SpawnSyncReturns } from 'node:child_process';
|
|
2
|
+
import type { CommandOpt, Handle } from './types.ts';
|
|
3
|
+
export declare const reason: (e: unknown) => string;
|
|
4
|
+
export declare const mkdir: (d: string) => string | undefined;
|
|
5
|
+
export declare const id: (s: string) => string;
|
|
6
|
+
export declare const zero: (H: Handle) => string;
|
|
7
|
+
export declare const ident: (who: string) => NodeJS.ProcessEnv;
|
|
8
|
+
export declare function git(H: Handle, args: string[], opt: CommandOpt & {
|
|
9
|
+
ok: true;
|
|
10
|
+
}): SpawnSyncReturns<string>;
|
|
11
|
+
export declare function git(H: Handle, args: string[], opt: CommandOpt & {
|
|
12
|
+
raw: true;
|
|
13
|
+
}): Buffer;
|
|
14
|
+
export declare function git(H: Handle, args: string[], opt?: CommandOpt): string;
|
|
15
|
+
export declare const config: (H: Handle, key: string, value?: string) => string;
|
|
16
|
+
export declare const rev: (H: Handle, ref: string) => string | null;
|
|
17
|
+
export declare const object: (H: Handle, ref: string) => string | null;
|
|
18
|
+
export declare const ancestor: (H: Handle, a: string, b: string) => boolean;
|
|
19
|
+
export declare const isRemote: (H: Handle) => boolean;
|
|
20
|
+
export declare const origin: (H: Handle) => string | undefined;
|
|
21
|
+
export declare const suffix: (ref: string) => string;
|
|
22
|
+
export declare const accepted: (ref: string) => string;
|
|
23
|
+
export declare const tracking: (ref: string) => string;
|
|
24
|
+
export declare const locked: <T>(H: Handle, fn: () => T) => T;
|
|
25
|
+
export declare const refs: (H: Handle, prefix: string) => Map<string, string>;
|
|
26
|
+
export declare const promote: (H: Handle, ref: string, sha: string) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const heartbeatBody: (text: string) => string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Handle, Room } from './types.ts';
|
|
2
|
+
export declare const heartbeatObject: (H: Handle, ref: string, sha: string) => {
|
|
3
|
+
actor: string;
|
|
4
|
+
genesis12: string;
|
|
5
|
+
genesis: string;
|
|
6
|
+
target: string;
|
|
7
|
+
time: number;
|
|
8
|
+
text: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const checkHeartbeat: (H: Handle, R: Room, ref: string, sha: string) => void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Handle, Room } from './types.ts';
|
|
2
|
+
export { checkHeartbeat, heartbeatObject } from './heartbeat-object.ts';
|
|
3
|
+
export { heartbeatBody } from './heartbeat-facts.ts';
|
|
4
|
+
export { HEARTBEAT_NAME, heartbeatName, heartbeatRef } from './heartbeat-name.ts';
|
|
5
|
+
export declare const verifyHeartbeat: (H: Handle, R: Room, ref: string, sha: string) => string | null;
|
|
6
|
+
type HeartbeatArgs = [H: Handle, R: Room, who: string, target: string, text: string, home: string];
|
|
7
|
+
export declare const makeHeartbeat: (...[H, R, who, target, text, home]: HeartbeatArgs) => string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Handle, Key } from './types.ts';
|
|
2
|
+
export declare const parseKey: (value: unknown) => Key;
|
|
3
|
+
export declare const keyInput: (value: string) => Key;
|
|
4
|
+
export declare const rootKey: (H: Handle) => Key;
|
|
5
|
+
export declare const signerLine: (who: string, key: Key) => string;
|
|
6
|
+
export declare const identityKey: (H: Handle, who: string, home: string, create?: boolean) => Key;
|
|
7
|
+
export declare const setupSigned: (H: Handle, home: string, url?: string) => {
|
|
8
|
+
root: string;
|
|
9
|
+
allowedSigners: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const sign: (H: Handle, who: string, home: string) => string[];
|
|
12
|
+
export declare const rootRoster: (H: Handle) => string;
|
|
13
|
+
export declare const checkUrl: (url: string) => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Handle } from './types.ts';
|
|
2
|
+
export declare const verifyMain: (H: Handle, head: string) => {
|
|
3
|
+
head: string;
|
|
4
|
+
genesis: string;
|
|
5
|
+
commits: string[];
|
|
6
|
+
};
|
|
7
|
+
export declare const verifyHub: (H: Handle) => {
|
|
8
|
+
head: string;
|
|
9
|
+
genesis: string;
|
|
10
|
+
commits: string[];
|
|
11
|
+
} | null;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { SpawnSyncReturns } from 'node:child_process';
|
|
2
|
+
import type { CommandOpt } from './types.ts';
|
|
3
|
+
export declare const ENV: {
|
|
4
|
+
GIT_CONFIG_GLOBAL: string;
|
|
5
|
+
GIT_CONFIG_NOSYSTEM: string;
|
|
6
|
+
GIT_TERMINAL_PROMPT: string;
|
|
7
|
+
GIT_NO_REPLACE_OBJECTS: string;
|
|
8
|
+
LC_ALL: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const BASE: string[];
|
|
11
|
+
export declare const gitEnv: (extra?: NodeJS.ProcessEnv) => NodeJS.ProcessEnv;
|
|
12
|
+
export declare const gitTimeout: () => number;
|
|
13
|
+
export declare const checkGitTimeout: (error?: NodeJS.ErrnoException) => void;
|
|
14
|
+
export declare function command(cmd: string, args: string[], opt: CommandOpt & {
|
|
15
|
+
ok: true;
|
|
16
|
+
}): SpawnSyncReturns<string>;
|
|
17
|
+
export declare function command(cmd: string, args: string[], opt: CommandOpt & {
|
|
18
|
+
raw: true;
|
|
19
|
+
}): Buffer;
|
|
20
|
+
export declare function command(cmd: string, args: string[], opt?: CommandOpt): string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Handle } from './types.ts';
|
|
2
|
+
export { validateRef } from './push-validate.ts';
|
|
3
|
+
export type Publication = {
|
|
4
|
+
H: Handle;
|
|
5
|
+
ref: string;
|
|
6
|
+
alarms: Record<string, string>;
|
|
7
|
+
tag: boolean;
|
|
8
|
+
pin: string;
|
|
9
|
+
track: string;
|
|
10
|
+
sha: string;
|
|
11
|
+
acc: string | null;
|
|
12
|
+
url: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const push: (H: Handle, ref: string, { behind }?: {
|
|
15
|
+
behind?: boolean;
|
|
16
|
+
}) => boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Member } from '../../../core/hub/ports/store.ts';
|
|
2
|
+
import type { Handle, Signer } from './types.ts';
|
|
3
|
+
export declare const blobText: (H: Handle, sha: string, name: string) => string;
|
|
4
|
+
export declare const rosterAt: (H: Handle, sha: string) => {
|
|
5
|
+
entries: Signer[];
|
|
6
|
+
members: Record<string, Member>;
|
|
7
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Handle, Room } from './types.ts';
|
|
2
|
+
export declare const SIGNAL_NAME: RegExp;
|
|
3
|
+
export declare const signalName: (ref: string) => {
|
|
4
|
+
actor: string;
|
|
5
|
+
id: string;
|
|
6
|
+
signal: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const signalObject: (H: Handle, ref: string, sha: string) => {
|
|
9
|
+
actor: string;
|
|
10
|
+
id: string;
|
|
11
|
+
signal: string;
|
|
12
|
+
message: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const checkSignal: (H: Handle, R: Room, ref: string, sha: string) => void;
|
|
15
|
+
export declare const verifySignal: (H: Handle, R: Room, ref: string, sha: string) => string | null;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Commit, Handle, Key } from './types.ts';
|
|
2
|
+
export declare const verified: Set<string>;
|
|
3
|
+
export declare const checkSignature: (H: Handle, sha: string, who: string, key: Key, kind?: 'commit' | 'tag') => void;
|
|
4
|
+
export declare const chain: (H: Handle, head: string, base?: string) => Commit[];
|
|
5
|
+
export declare const linear: (commits: Commit[], initial: string | null, check: (sha: string) => void) => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Handle } from './types.ts';
|
|
2
|
+
import type { RoomsIndex } from './sync-rooms.ts';
|
|
3
|
+
export type TagSync = RoomsIndex & {
|
|
4
|
+
H: Handle;
|
|
5
|
+
tags: Map<string, string>;
|
|
6
|
+
pinned: Map<string, string>;
|
|
7
|
+
};
|
|
8
|
+
export declare const syncTags: (H: Handle, rooms: RoomsIndex) => void;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { Descriptor, Member } from '../../../core/hub/ports/store.ts';
|
|
2
|
+
import type { SigningContext } from '../../../core/signing/index.ts';
|
|
3
|
+
export type Handle = {
|
|
4
|
+
name: string;
|
|
5
|
+
dir: string;
|
|
6
|
+
d: Descriptor;
|
|
7
|
+
signing?: SigningContext;
|
|
8
|
+
main?: string;
|
|
9
|
+
remoteAlarms?: Record<string, string>;
|
|
10
|
+
heartbeatErrors?: Record<string, string>;
|
|
11
|
+
bootstrap?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export type Room = {
|
|
14
|
+
name: string;
|
|
15
|
+
ref: string;
|
|
16
|
+
head: string;
|
|
17
|
+
genesis: string;
|
|
18
|
+
archived?: boolean;
|
|
19
|
+
members?: Record<string, Member>;
|
|
20
|
+
};
|
|
21
|
+
export type Key = {
|
|
22
|
+
line: string;
|
|
23
|
+
fp: string;
|
|
24
|
+
};
|
|
25
|
+
export type Signer = {
|
|
26
|
+
principal: string;
|
|
27
|
+
key: Key;
|
|
28
|
+
};
|
|
29
|
+
export type VerifiedRoom = {
|
|
30
|
+
genesis: string;
|
|
31
|
+
entries: Signer[];
|
|
32
|
+
members: Record<string, Member>;
|
|
33
|
+
};
|
|
34
|
+
export type Branch = VerifiedRoom & {
|
|
35
|
+
subject: string;
|
|
36
|
+
control: string[];
|
|
37
|
+
authors: Map<string, string>;
|
|
38
|
+
skipped: Map<string, string>;
|
|
39
|
+
};
|
|
40
|
+
export declare const CONTROL_FILES: string[];
|
|
41
|
+
export type CommandOpt = {
|
|
42
|
+
input?: string | Buffer;
|
|
43
|
+
env?: NodeJS.ProcessEnv;
|
|
44
|
+
ok?: boolean;
|
|
45
|
+
raw?: boolean;
|
|
46
|
+
};
|
|
47
|
+
export declare const SHA: RegExp;
|
|
48
|
+
export declare const ROOT = "operator";
|
|
49
|
+
export declare const TRACK = "refs/remotes/origin/";
|
|
50
|
+
export declare const ACCEPT = "refs/ringi/remote-accepted/";
|
|
51
|
+
export declare const TAGS = "refs/tags/";
|
|
52
|
+
export declare const TAG_TRACK = "refs/ringi/remote-tags/";
|
|
53
|
+
export declare const TAG_ACCEPT = "refs/ringi/remote-accepted-tags/";
|
|
54
|
+
export type Commit = {
|
|
55
|
+
sha: string;
|
|
56
|
+
parents: string[];
|
|
57
|
+
};
|
|
58
|
+
export type Raw = {
|
|
59
|
+
sha: string;
|
|
60
|
+
parents: string[];
|
|
61
|
+
author: string;
|
|
62
|
+
text: string;
|
|
63
|
+
body: Buffer;
|
|
64
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type { Handle, Room, Branch } from './remote/types.ts';
|
|
2
|
+
export { withVerification } from './remote/cache.ts';
|
|
3
|
+
export { gitEnv, gitTimeout, checkGitTimeout } from './remote/process.ts';
|
|
4
|
+
export { isRemote } from './remote/git.ts';
|
|
5
|
+
export { parseKey, setupSigned, sign, rootRoster } from './remote/keys.ts';
|
|
6
|
+
export { verifyHub } from './remote/main.ts';
|
|
7
|
+
export { readCommits } from './remote/commits.ts';
|
|
8
|
+
export { branch, verifyRoom, verify } from './remote/branch.ts';
|
|
9
|
+
export { heartbeatName, heartbeatRef, verifyHeartbeat, makeHeartbeat } from './remote/heartbeat.ts';
|
|
10
|
+
export { verifySignal } from './remote/signals.ts';
|
|
11
|
+
export { sync } from './remote/sync.ts';
|
|
12
|
+
export { hubAdd } from './remote/bootstrap.ts';
|
|
13
|
+
export { join, roomAdmit } from './remote/admit.ts';
|
|
14
|
+
export { push } from './remote/push.ts';
|
|
15
|
+
export { pushHeartbeat } from './remote/heartbeat-push.ts';
|
|
16
|
+
export { forget } from './remote/forget.ts';
|
|
17
|
+
export { strictJson } from '../../lib/index.ts';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as Remote from './remote.ts';
|
|
2
|
+
import type { GitOpt } from './run.ts';
|
|
3
|
+
import type { Descriptor } from '../../core/hub/ports/store.ts';
|
|
4
|
+
import type { Entry } from '../../core/hub/protocol/files.ts';
|
|
5
|
+
import type { SigningContext } from '../../core/signing/index.ts';
|
|
6
|
+
export declare const init: (dir: string, home: string) => string;
|
|
7
|
+
export declare class Repo {
|
|
8
|
+
readonly trust: 'asserted' | 'signed';
|
|
9
|
+
readonly dir: string;
|
|
10
|
+
readonly d: Descriptor;
|
|
11
|
+
readonly home: string;
|
|
12
|
+
readonly h: Remote.Handle;
|
|
13
|
+
constructor(hubDir: string, d: Descriptor, home: string, signing?: SigningContext);
|
|
14
|
+
protected openable(): void;
|
|
15
|
+
protected checkout(): void;
|
|
16
|
+
protected args(a: string[]): string[];
|
|
17
|
+
protected git(a: string[], o?: GitOpt): string;
|
|
18
|
+
protected gitOk(a: string[], o?: GitOpt): import("node:child_process").SpawnSyncReturns<string>;
|
|
19
|
+
rev(ref: string): string | null;
|
|
20
|
+
isAncestor(a: string, b: string): boolean;
|
|
21
|
+
isRef(s: string): boolean;
|
|
22
|
+
extends(older: string, newer: string): boolean;
|
|
23
|
+
protected tree(base: string | null, entries: Entry[], drop?: string[]): string;
|
|
24
|
+
protected commit(who: string, text: string, tree: string, parents: string[]): string;
|
|
25
|
+
protected advance(ref: string, sha: string, old: string | null): boolean;
|
|
26
|
+
sync(): void;
|
|
27
|
+
contractHead(): string;
|
|
28
|
+
contractFile(rev: string, name: string): string | null;
|
|
29
|
+
contractFiles(rev: string): string[];
|
|
30
|
+
amendContract(who: string, text: string, files: Record<string, string | Buffer>): string;
|
|
31
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { SpawnSyncReturns } from 'node:child_process';
|
|
2
|
+
export declare const ZERO: string;
|
|
3
|
+
export declare const ident: (id: string) => {
|
|
4
|
+
GIT_AUTHOR_NAME: string;
|
|
5
|
+
GIT_AUTHOR_EMAIL: string;
|
|
6
|
+
GIT_COMMITTER_NAME: string;
|
|
7
|
+
GIT_COMMITTER_EMAIL: string;
|
|
8
|
+
};
|
|
9
|
+
export type GitOpt = {
|
|
10
|
+
input?: string | Buffer;
|
|
11
|
+
env?: Record<string, string>;
|
|
12
|
+
where?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const runGit: (args: string[], o?: GitOpt) => string;
|
|
15
|
+
export declare const runGitOk: (args: string[], o?: GitOpt) => SpawnSyncReturns<string>;
|
|
16
|
+
export declare const runGitRaw: (args: string[], where?: string, input?: Buffer) => Buffer;
|
|
17
|
+
export declare const splitBuf: (b: Buffer, sep: number) => Buffer[];
|
|
18
|
+
export declare const frames: (raw: Buffer, shas: string[]) => Map<string, {
|
|
19
|
+
type: string;
|
|
20
|
+
body: Buffer;
|
|
21
|
+
}>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Handle } from './remote/types.ts';
|
|
2
|
+
export declare const signBytes: (H: Handle, who: string, payload: Buffer | string, home: string) => string;
|
|
3
|
+
export declare const signCommit: (H: Handle, who: string, sha: string, home: string) => string;
|
|
4
|
+
export declare const signedTag: (H: Handle, who: string, tag: string, target: string, home: string) => string;
|