openryoko 2026.10.8 → 2026.10.13
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/bin/jimmy.js +51 -1
- package/dist/bin/jimmy.js.map +1 -1
- package/dist/package.json +2 -1
- package/dist/src/backup/archive.d.ts +65 -0
- package/dist/src/backup/archive.d.ts.map +1 -0
- package/dist/src/backup/archive.js +214 -0
- package/dist/src/backup/archive.js.map +1 -0
- package/dist/src/backup/catalog.d.ts +64 -0
- package/dist/src/backup/catalog.d.ts.map +1 -0
- package/dist/src/backup/catalog.js +252 -0
- package/dist/src/backup/catalog.js.map +1 -0
- package/dist/src/backup/database-restore.d.ts +63 -0
- package/dist/src/backup/database-restore.d.ts.map +1 -0
- package/dist/src/backup/database-restore.js +236 -0
- package/dist/src/backup/database-restore.js.map +1 -0
- package/dist/src/backup/database-source.d.ts +70 -0
- package/dist/src/backup/database-source.d.ts.map +1 -0
- package/dist/src/backup/database-source.js +70 -0
- package/dist/src/backup/database-source.js.map +1 -0
- package/dist/src/backup/format.d.ts +4 -0
- package/dist/src/backup/format.d.ts.map +1 -0
- package/dist/src/backup/format.js +15 -0
- package/dist/src/backup/format.js.map +1 -0
- package/dist/src/backup/gateway-liveness.d.ts +44 -0
- package/dist/src/backup/gateway-liveness.d.ts.map +1 -0
- package/dist/src/backup/gateway-liveness.js +120 -0
- package/dist/src/backup/gateway-liveness.js.map +1 -0
- package/dist/src/backup/inspect.d.ts +45 -0
- package/dist/src/backup/inspect.d.ts.map +1 -0
- package/dist/src/backup/inspect.js +291 -0
- package/dist/src/backup/inspect.js.map +1 -0
- package/dist/src/backup/layout.d.ts +11 -0
- package/dist/src/backup/layout.d.ts.map +1 -0
- package/dist/src/backup/layout.js +16 -0
- package/dist/src/backup/layout.js.map +1 -0
- package/dist/src/backup/limits.d.ts +54 -0
- package/dist/src/backup/limits.d.ts.map +1 -0
- package/dist/src/backup/limits.js +59 -0
- package/dist/src/backup/limits.js.map +1 -0
- package/dist/src/backup/manifest.d.ts +45 -0
- package/dist/src/backup/manifest.d.ts.map +1 -0
- package/dist/src/backup/manifest.js +77 -0
- package/dist/src/backup/manifest.js.map +1 -0
- package/dist/src/backup/restore.d.ts +73 -0
- package/dist/src/backup/restore.d.ts.map +1 -0
- package/dist/src/backup/restore.js +685 -0
- package/dist/src/backup/restore.js.map +1 -0
- package/dist/src/backup/run.d.ts +76 -0
- package/dist/src/backup/run.d.ts.map +1 -0
- package/dist/src/backup/run.js +181 -0
- package/dist/src/backup/run.js.map +1 -0
- package/dist/src/backup/scheduler.d.ts +51 -0
- package/dist/src/backup/scheduler.d.ts.map +1 -0
- package/dist/src/backup/scheduler.js +198 -0
- package/dist/src/backup/scheduler.js.map +1 -0
- package/dist/src/backup/settings.d.ts +44 -0
- package/dist/src/backup/settings.d.ts.map +1 -0
- package/dist/src/backup/settings.js +91 -0
- package/dist/src/backup/settings.js.map +1 -0
- package/dist/src/backup/space.d.ts +22 -0
- package/dist/src/backup/space.d.ts.map +1 -0
- package/dist/src/backup/space.js +47 -0
- package/dist/src/backup/space.js.map +1 -0
- package/dist/src/backup/state.d.ts +46 -0
- package/dist/src/backup/state.d.ts.map +1 -0
- package/dist/src/backup/state.js +137 -0
- package/dist/src/backup/state.js.map +1 -0
- package/dist/src/backup/tar.d.ts +64 -0
- package/dist/src/backup/tar.d.ts.map +1 -0
- package/dist/src/backup/tar.js +274 -0
- package/dist/src/backup/tar.js.map +1 -0
- package/dist/src/backup/targets.d.ts +85 -0
- package/dist/src/backup/targets.d.ts.map +1 -0
- package/dist/src/backup/targets.js +104 -0
- package/dist/src/backup/targets.js.map +1 -0
- package/dist/src/backup/walk.d.ts +42 -0
- package/dist/src/backup/walk.d.ts.map +1 -0
- package/dist/src/backup/walk.js +324 -0
- package/dist/src/backup/walk.js.map +1 -0
- package/dist/src/cli/backup.d.ts +45 -0
- package/dist/src/cli/backup.d.ts.map +1 -0
- package/dist/src/cli/backup.js +344 -0
- package/dist/src/cli/backup.js.map +1 -0
- package/dist/src/cli/bundled-skills.d.ts +7 -1
- package/dist/src/cli/bundled-skills.d.ts.map +1 -1
- package/dist/src/cli/bundled-skills.js +12 -2
- package/dist/src/cli/bundled-skills.js.map +1 -1
- package/dist/src/cli/config-failure.d.ts +18 -0
- package/dist/src/cli/config-failure.d.ts.map +1 -0
- package/dist/src/cli/config-failure.js +39 -0
- package/dist/src/cli/config-failure.js.map +1 -0
- package/dist/src/cli/gateway-audit.d.ts +3 -0
- package/dist/src/cli/gateway-audit.d.ts.map +1 -1
- package/dist/src/cli/gateway-audit.js +61 -14
- package/dist/src/cli/gateway-audit.js.map +1 -1
- package/dist/src/cli/gateway-url-backup.d.ts +21 -0
- package/dist/src/cli/gateway-url-backup.d.ts.map +1 -0
- package/dist/src/cli/gateway-url-backup.js +87 -0
- package/dist/src/cli/gateway-url-backup.js.map +1 -0
- package/dist/src/cli/home-copy.d.ts +37 -0
- package/dist/src/cli/home-copy.d.ts.map +1 -0
- package/dist/src/cli/home-copy.js +155 -0
- package/dist/src/cli/home-copy.js.map +1 -0
- package/dist/src/cli/interactive-config.d.ts +5 -0
- package/dist/src/cli/interactive-config.d.ts.map +1 -1
- package/dist/src/cli/interactive-config.js +16 -7
- package/dist/src/cli/interactive-config.js.map +1 -1
- package/dist/src/cli/migrate.d.ts +20 -0
- package/dist/src/cli/migrate.d.ts.map +1 -1
- package/dist/src/cli/migrate.js +365 -68
- package/dist/src/cli/migrate.js.map +1 -1
- package/dist/src/cli/migration-declarations.d.ts +24 -0
- package/dist/src/cli/migration-declarations.d.ts.map +1 -0
- package/dist/src/cli/migration-declarations.js +54 -0
- package/dist/src/cli/migration-declarations.js.map +1 -0
- package/dist/src/cli/start.d.ts.map +1 -1
- package/dist/src/cli/start.js +40 -1
- package/dist/src/cli/start.js.map +1 -1
- package/dist/src/connectors/chunked-send.d.ts +27 -0
- package/dist/src/connectors/chunked-send.d.ts.map +1 -0
- package/dist/src/connectors/chunked-send.js +40 -0
- package/dist/src/connectors/chunked-send.js.map +1 -0
- package/dist/src/connectors/cron/index.d.ts +10 -0
- package/dist/src/connectors/cron/index.d.ts.map +1 -1
- package/dist/src/connectors/cron/index.js +26 -3
- package/dist/src/connectors/cron/index.js.map +1 -1
- package/dist/src/connectors/discord/attachments.d.ts +25 -0
- package/dist/src/connectors/discord/attachments.d.ts.map +1 -0
- package/dist/src/connectors/discord/attachments.js +33 -0
- package/dist/src/connectors/discord/attachments.js.map +1 -0
- package/dist/src/connectors/discord/format.d.ts +17 -1
- package/dist/src/connectors/discord/format.d.ts.map +1 -1
- package/dist/src/connectors/discord/format.js +36 -6
- package/dist/src/connectors/discord/format.js.map +1 -1
- package/dist/src/connectors/discord/index.d.ts +12 -0
- package/dist/src/connectors/discord/index.d.ts.map +1 -1
- package/dist/src/connectors/discord/index.js +47 -40
- package/dist/src/connectors/discord/index.js.map +1 -1
- package/dist/src/connectors/discord/remote.d.ts +45 -1
- package/dist/src/connectors/discord/remote.d.ts.map +1 -1
- package/dist/src/connectors/discord/remote.js +147 -22
- package/dist/src/connectors/discord/remote.js.map +1 -1
- package/dist/src/connectors/slack/attachments.d.ts +25 -0
- package/dist/src/connectors/slack/attachments.d.ts.map +1 -0
- package/dist/src/connectors/slack/attachments.js +32 -0
- package/dist/src/connectors/slack/attachments.js.map +1 -0
- package/dist/src/connectors/slack/auth-test-cache.d.ts +22 -0
- package/dist/src/connectors/slack/auth-test-cache.d.ts.map +1 -0
- package/dist/src/connectors/slack/auth-test-cache.js +34 -0
- package/dist/src/connectors/slack/auth-test-cache.js.map +1 -0
- package/dist/src/connectors/slack/format.d.ts +6 -1
- package/dist/src/connectors/slack/format.d.ts.map +1 -1
- package/dist/src/connectors/slack/format.js +65 -13
- package/dist/src/connectors/slack/format.js.map +1 -1
- package/dist/src/connectors/slack/index.d.ts +4 -0
- package/dist/src/connectors/slack/index.d.ts.map +1 -1
- package/dist/src/connectors/slack/index.js +64 -52
- package/dist/src/connectors/slack/index.js.map +1 -1
- package/dist/src/connectors/slack/provider-auth-blocks.d.ts +62 -0
- package/dist/src/connectors/slack/provider-auth-blocks.d.ts.map +1 -0
- package/dist/src/connectors/slack/provider-auth-blocks.js +204 -0
- package/dist/src/connectors/slack/provider-auth-blocks.js.map +1 -0
- package/dist/src/connectors/slack/provider-auth.d.ts +126 -0
- package/dist/src/connectors/slack/provider-auth.d.ts.map +1 -0
- package/dist/src/connectors/slack/provider-auth.js +357 -0
- package/dist/src/connectors/slack/provider-auth.js.map +1 -0
- package/dist/src/connectors/telegram/index.d.ts +5 -0
- package/dist/src/connectors/telegram/index.d.ts.map +1 -1
- package/dist/src/connectors/telegram/index.js +14 -22
- package/dist/src/connectors/telegram/index.js.map +1 -1
- package/dist/src/connectors/whatsapp/index.d.ts +3 -0
- package/dist/src/connectors/whatsapp/index.d.ts.map +1 -1
- package/dist/src/connectors/whatsapp/index.js +33 -14
- package/dist/src/connectors/whatsapp/index.js.map +1 -1
- package/dist/src/cron/alert-throttle.d.ts +28 -0
- package/dist/src/cron/alert-throttle.d.ts.map +1 -0
- package/dist/src/cron/alert-throttle.js +106 -0
- package/dist/src/cron/alert-throttle.js.map +1 -0
- package/dist/src/cron/jobs.d.ts +8 -0
- package/dist/src/cron/jobs.d.ts.map +1 -1
- package/dist/src/cron/jobs.js +27 -1
- package/dist/src/cron/jobs.js.map +1 -1
- package/dist/src/cron/run-outcome.d.ts +28 -0
- package/dist/src/cron/run-outcome.d.ts.map +1 -0
- package/dist/src/cron/run-outcome.js +66 -0
- package/dist/src/cron/run-outcome.js.map +1 -0
- package/dist/src/cron/runner.d.ts.map +1 -1
- package/dist/src/cron/runner.js +68 -5
- package/dist/src/cron/runner.js.map +1 -1
- package/dist/src/cron/scheduler.d.ts +8 -1
- package/dist/src/cron/scheduler.d.ts.map +1 -1
- package/dist/src/cron/scheduler.js +11 -4
- package/dist/src/cron/scheduler.js.map +1 -1
- package/dist/src/cron/waiting-fires.d.ts +18 -0
- package/dist/src/cron/waiting-fires.d.ts.map +1 -0
- package/dist/src/cron/waiting-fires.js +49 -0
- package/dist/src/cron/waiting-fires.js.map +1 -0
- package/dist/src/engines/claude-interactive.d.ts +19 -3
- package/dist/src/engines/claude-interactive.d.ts.map +1 -1
- package/dist/src/engines/claude-interactive.js +42 -17
- package/dist/src/engines/claude-interactive.js.map +1 -1
- package/dist/src/engines/claude.d.ts.map +1 -1
- package/dist/src/engines/claude.js +38 -5
- package/dist/src/engines/claude.js.map +1 -1
- package/dist/src/engines/codex.d.ts.map +1 -1
- package/dist/src/engines/codex.js +1 -0
- package/dist/src/engines/codex.js.map +1 -1
- package/dist/src/engines/gemini.d.ts.map +1 -1
- package/dist/src/engines/gemini.js +1 -0
- package/dist/src/engines/gemini.js.map +1 -1
- package/dist/src/gateway/api.d.ts.map +1 -1
- package/dist/src/gateway/api.js +184 -160
- package/dist/src/gateway/api.js.map +1 -1
- package/dist/src/gateway/config-redaction.d.ts +32 -0
- package/dist/src/gateway/config-redaction.d.ts.map +1 -0
- package/dist/src/gateway/config-redaction.js +139 -0
- package/dist/src/gateway/config-redaction.js.map +1 -0
- package/dist/src/gateway/config-revision.d.ts +46 -0
- package/dist/src/gateway/config-revision.d.ts.map +1 -0
- package/dist/src/gateway/config-revision.js +63 -0
- package/dist/src/gateway/config-revision.js.map +1 -0
- package/dist/src/gateway/connector-config.d.ts +21 -0
- package/dist/src/gateway/connector-config.d.ts.map +1 -0
- package/dist/src/gateway/connector-config.js +24 -0
- package/dist/src/gateway/connector-config.js.map +1 -0
- package/dist/src/gateway/daemon-entry.js +5 -0
- package/dist/src/gateway/daemon-entry.js.map +1 -1
- package/dist/src/gateway/engine-health-monitor.d.ts +67 -0
- package/dist/src/gateway/engine-health-monitor.d.ts.map +1 -0
- package/dist/src/gateway/engine-health-monitor.js +221 -0
- package/dist/src/gateway/engine-health-monitor.js.map +1 -0
- package/dist/src/gateway/files.d.ts +7 -1
- package/dist/src/gateway/files.d.ts.map +1 -1
- package/dist/src/gateway/files.js +110 -217
- package/dist/src/gateway/files.js.map +1 -1
- package/dist/src/gateway/onboarding-personalize.d.ts +2 -0
- package/dist/src/gateway/onboarding-personalize.d.ts.map +1 -1
- package/dist/src/gateway/onboarding-personalize.js +17 -1
- package/dist/src/gateway/onboarding-personalize.js.map +1 -1
- package/dist/src/gateway/portal-config.d.ts +17 -3
- package/dist/src/gateway/portal-config.d.ts.map +1 -1
- package/dist/src/gateway/portal-config.js +52 -3
- package/dist/src/gateway/portal-config.js.map +1 -1
- package/dist/src/gateway/request-origin.d.ts +9 -0
- package/dist/src/gateway/request-origin.d.ts.map +1 -1
- package/dist/src/gateway/request-origin.js +10 -0
- package/dist/src/gateway/request-origin.js.map +1 -1
- package/dist/src/gateway/server.d.ts.map +1 -1
- package/dist/src/gateway/server.js +82 -59
- package/dist/src/gateway/server.js.map +1 -1
- package/dist/src/gateway/slack-connect-rollback.d.ts +23 -0
- package/dist/src/gateway/slack-connect-rollback.d.ts.map +1 -0
- package/dist/src/gateway/slack-connect-rollback.js +53 -0
- package/dist/src/gateway/slack-connect-rollback.js.map +1 -0
- package/dist/src/gateway/status-reconciler.d.ts +25 -7
- package/dist/src/gateway/status-reconciler.d.ts.map +1 -1
- package/dist/src/gateway/status-reconciler.js +86 -43
- package/dist/src/gateway/status-reconciler.js.map +1 -1
- package/dist/src/gateway/watcher.d.ts.map +1 -1
- package/dist/src/gateway/watcher.js +44 -3
- package/dist/src/gateway/watcher.js.map +1 -1
- package/dist/src/mcp/gateway-server.js +21 -3
- package/dist/src/mcp/gateway-server.js.map +1 -1
- package/dist/src/mcp/resolver.d.ts.map +1 -1
- package/dist/src/mcp/resolver.js +51 -1
- package/dist/src/mcp/resolver.js.map +1 -1
- package/dist/src/models/service.d.ts.map +1 -1
- package/dist/src/models/service.js +14 -8
- package/dist/src/models/service.js.map +1 -1
- package/dist/src/provider-auth/discovery.d.ts +16 -0
- package/dist/src/provider-auth/discovery.d.ts.map +1 -0
- package/dist/src/provider-auth/discovery.js +66 -0
- package/dist/src/provider-auth/discovery.js.map +1 -0
- package/dist/src/provider-auth/failure-notices.d.ts +29 -0
- package/dist/src/provider-auth/failure-notices.d.ts.map +1 -0
- package/dist/src/provider-auth/failure-notices.js +48 -0
- package/dist/src/provider-auth/failure-notices.js.map +1 -0
- package/dist/src/provider-auth/failure-signal.d.ts +22 -0
- package/dist/src/provider-auth/failure-signal.d.ts.map +1 -0
- package/dist/src/provider-auth/failure-signal.js +79 -0
- package/dist/src/provider-auth/failure-signal.js.map +1 -0
- package/dist/src/provider-auth/index.d.ts +26 -0
- package/dist/src/provider-auth/index.d.ts.map +1 -0
- package/dist/src/provider-auth/index.js +51 -0
- package/dist/src/provider-auth/index.js.map +1 -0
- package/dist/src/provider-auth/input.d.ts +44 -0
- package/dist/src/provider-auth/input.d.ts.map +1 -0
- package/dist/src/provider-auth/input.js +86 -0
- package/dist/src/provider-auth/input.js.map +1 -0
- package/dist/src/provider-auth/providers.d.ts +26 -0
- package/dist/src/provider-auth/providers.d.ts.map +1 -0
- package/dist/src/provider-auth/providers.js +86 -0
- package/dist/src/provider-auth/providers.js.map +1 -0
- package/dist/src/provider-auth/runtime.d.ts +21 -0
- package/dist/src/provider-auth/runtime.d.ts.map +1 -0
- package/dist/src/provider-auth/runtime.js +104 -0
- package/dist/src/provider-auth/runtime.js.map +1 -0
- package/dist/src/provider-auth/service.d.ts +70 -0
- package/dist/src/provider-auth/service.d.ts.map +1 -0
- package/dist/src/provider-auth/service.js +349 -0
- package/dist/src/provider-auth/service.js.map +1 -0
- package/dist/src/provider-auth/terminal.d.ts +21 -0
- package/dist/src/provider-auth/terminal.d.ts.map +1 -0
- package/dist/src/provider-auth/terminal.js +46 -0
- package/dist/src/provider-auth/terminal.js.map +1 -0
- package/dist/src/provider-auth/types.d.ts +123 -0
- package/dist/src/provider-auth/types.d.ts.map +1 -0
- package/dist/src/provider-auth/types.js +10 -0
- package/dist/src/provider-auth/types.js.map +1 -0
- package/dist/src/sessions/accounting.d.ts +3 -0
- package/dist/src/sessions/accounting.d.ts.map +1 -1
- package/dist/src/sessions/accounting.js +5 -0
- package/dist/src/sessions/accounting.js.map +1 -1
- package/dist/src/sessions/backup-integrity.d.ts +45 -0
- package/dist/src/sessions/backup-integrity.d.ts.map +1 -0
- package/dist/src/sessions/backup-integrity.js +122 -0
- package/dist/src/sessions/backup-integrity.js.map +1 -0
- package/dist/src/sessions/backup.d.ts +40 -2
- package/dist/src/sessions/backup.d.ts.map +1 -1
- package/dist/src/sessions/backup.js +88 -12
- package/dist/src/sessions/backup.js.map +1 -1
- package/dist/src/sessions/callbacks.d.ts +9 -0
- package/dist/src/sessions/callbacks.d.ts.map +1 -1
- package/dist/src/sessions/callbacks.js +55 -10
- package/dist/src/sessions/callbacks.js.map +1 -1
- package/dist/src/sessions/completion-batching.d.ts +82 -0
- package/dist/src/sessions/completion-batching.d.ts.map +1 -0
- package/dist/src/sessions/completion-batching.js +126 -0
- package/dist/src/sessions/completion-batching.js.map +1 -0
- package/dist/src/sessions/connector-command-guard.d.ts +66 -0
- package/dist/src/sessions/connector-command-guard.d.ts.map +1 -0
- package/dist/src/sessions/connector-command-guard.js +145 -0
- package/dist/src/sessions/connector-command-guard.js.map +1 -0
- package/dist/src/sessions/context.d.ts.map +1 -1
- package/dist/src/sessions/context.js +3 -4
- package/dist/src/sessions/context.js.map +1 -1
- package/dist/src/sessions/engine-fallback.d.ts +43 -1
- package/dist/src/sessions/engine-fallback.d.ts.map +1 -1
- package/dist/src/sessions/engine-fallback.js +266 -15
- package/dist/src/sessions/engine-fallback.js.map +1 -1
- package/dist/src/sessions/engine-health-gate.d.ts +83 -0
- package/dist/src/sessions/engine-health-gate.d.ts.map +1 -0
- package/dist/src/sessions/engine-health-gate.js +186 -0
- package/dist/src/sessions/engine-health-gate.js.map +1 -0
- package/dist/src/sessions/engine-login.d.ts +58 -0
- package/dist/src/sessions/engine-login.d.ts.map +1 -0
- package/dist/src/sessions/engine-login.js +107 -0
- package/dist/src/sessions/engine-login.js.map +1 -0
- package/dist/src/sessions/fork.d.ts.map +1 -1
- package/dist/src/sessions/fork.js +3 -1
- package/dist/src/sessions/fork.js.map +1 -1
- package/dist/src/sessions/goal-execution.d.ts.map +1 -1
- package/dist/src/sessions/goal-execution.js +8 -1
- package/dist/src/sessions/goal-execution.js.map +1 -1
- package/dist/src/sessions/limit-failure-notice.d.ts +41 -0
- package/dist/src/sessions/limit-failure-notice.d.ts.map +1 -0
- package/dist/src/sessions/limit-failure-notice.js +87 -0
- package/dist/src/sessions/limit-failure-notice.js.map +1 -0
- package/dist/src/sessions/lost-turn.d.ts +39 -0
- package/dist/src/sessions/lost-turn.d.ts.map +1 -0
- package/dist/src/sessions/lost-turn.js +32 -0
- package/dist/src/sessions/lost-turn.js.map +1 -0
- package/dist/src/sessions/manager.d.ts.map +1 -1
- package/dist/src/sessions/manager.js +104 -47
- package/dist/src/sessions/manager.js.map +1 -1
- package/dist/src/sessions/new-session-engine.d.ts +42 -0
- package/dist/src/sessions/new-session-engine.d.ts.map +1 -0
- package/dist/src/sessions/new-session-engine.js +100 -0
- package/dist/src/sessions/new-session-engine.js.map +1 -0
- package/dist/src/sessions/origin-delivery.d.ts +50 -4
- package/dist/src/sessions/origin-delivery.d.ts.map +1 -1
- package/dist/src/sessions/origin-delivery.js +108 -9
- package/dist/src/sessions/origin-delivery.js.map +1 -1
- package/dist/src/sessions/queue.d.ts +14 -0
- package/dist/src/sessions/queue.d.ts.map +1 -1
- package/dist/src/sessions/queue.js +38 -2
- package/dist/src/sessions/queue.js.map +1 -1
- package/dist/src/sessions/registry.d.ts +4 -2
- package/dist/src/sessions/registry.d.ts.map +1 -1
- package/dist/src/sessions/registry.js +21 -4
- package/dist/src/sessions/registry.js.map +1 -1
- package/dist/src/sessions/reply-disposition.d.ts +8 -0
- package/dist/src/sessions/reply-disposition.d.ts.map +1 -1
- package/dist/src/sessions/reply-disposition.js +8 -0
- package/dist/src/sessions/reply-disposition.js.map +1 -1
- package/dist/src/sessions/restart-resume.d.ts +234 -0
- package/dist/src/sessions/restart-resume.d.ts.map +1 -0
- package/dist/src/sessions/restart-resume.js +596 -0
- package/dist/src/sessions/restart-resume.js.map +1 -0
- package/dist/src/sessions/speaker-prefix.d.ts.map +1 -1
- package/dist/src/sessions/speaker-prefix.js +3 -1
- package/dist/src/sessions/speaker-prefix.js.map +1 -1
- package/dist/src/sessions/turn-delivery.d.ts +26 -0
- package/dist/src/sessions/turn-delivery.d.ts.map +1 -0
- package/dist/src/sessions/turn-delivery.js +34 -0
- package/dist/src/sessions/turn-delivery.js.map +1 -0
- package/dist/src/sessions/unrequested-stop.d.ts +26 -0
- package/dist/src/sessions/unrequested-stop.d.ts.map +1 -0
- package/dist/src/sessions/unrequested-stop.js +19 -0
- package/dist/src/sessions/unrequested-stop.js.map +1 -0
- package/dist/src/sessions/usage-limit-wait.d.ts +14 -0
- package/dist/src/sessions/usage-limit-wait.d.ts.map +1 -0
- package/dist/src/sessions/usage-limit-wait.js +9 -0
- package/dist/src/sessions/usage-limit-wait.js.map +1 -0
- package/dist/src/shared/attachment-download.d.ts +41 -0
- package/dist/src/shared/attachment-download.d.ts.map +1 -0
- package/dist/src/shared/attachment-download.js +110 -0
- package/dist/src/shared/attachment-download.js.map +1 -0
- package/dist/src/shared/attachment-notice.d.ts +24 -0
- package/dist/src/shared/attachment-notice.d.ts.map +1 -0
- package/dist/src/shared/attachment-notice.js +37 -0
- package/dist/src/shared/attachment-notice.js.map +1 -0
- package/dist/src/shared/attachments.d.ts +65 -0
- package/dist/src/shared/attachments.d.ts.map +1 -0
- package/dist/src/shared/attachments.js +153 -0
- package/dist/src/shared/attachments.js.map +1 -0
- package/dist/src/shared/childEnv.d.ts +15 -0
- package/dist/src/shared/childEnv.d.ts.map +1 -1
- package/dist/src/shared/childEnv.js +15 -0
- package/dist/src/shared/childEnv.js.map +1 -1
- package/dist/src/shared/claude-auto-memory.d.ts +33 -0
- package/dist/src/shared/claude-auto-memory.d.ts.map +1 -0
- package/dist/src/shared/claude-auto-memory.js +156 -0
- package/dist/src/shared/claude-auto-memory.js.map +1 -0
- package/dist/src/shared/claude-limit-reset.d.ts +54 -0
- package/dist/src/shared/claude-limit-reset.d.ts.map +1 -0
- package/dist/src/shared/claude-limit-reset.js +99 -0
- package/dist/src/shared/claude-limit-reset.js.map +1 -0
- package/dist/src/shared/config-error.d.ts +21 -0
- package/dist/src/shared/config-error.d.ts.map +1 -0
- package/dist/src/shared/config-error.js +37 -0
- package/dist/src/shared/config-error.js.map +1 -0
- package/dist/src/shared/config-file.d.ts +57 -0
- package/dist/src/shared/config-file.d.ts.map +1 -0
- package/dist/src/shared/config-file.js +217 -0
- package/dist/src/shared/config-file.js.map +1 -0
- package/dist/src/shared/config-yaml-edit.d.ts +20 -0
- package/dist/src/shared/config-yaml-edit.d.ts.map +1 -0
- package/dist/src/shared/config-yaml-edit.js +468 -0
- package/dist/src/shared/config-yaml-edit.js.map +1 -0
- package/dist/src/shared/config.d.ts.map +1 -1
- package/dist/src/shared/config.js +12 -4
- package/dist/src/shared/config.js.map +1 -1
- package/dist/src/shared/engine-fallback.d.ts +22 -0
- package/dist/src/shared/engine-fallback.d.ts.map +1 -1
- package/dist/src/shared/engine-fallback.js +55 -4
- package/dist/src/shared/engine-fallback.js.map +1 -1
- package/dist/src/shared/engine-health.d.ts +16 -0
- package/dist/src/shared/engine-health.d.ts.map +1 -1
- package/dist/src/shared/engine-health.js +42 -0
- package/dist/src/shared/engine-health.js.map +1 -1
- package/dist/src/shared/list-alignment.d.ts +23 -0
- package/dist/src/shared/list-alignment.d.ts.map +1 -0
- package/dist/src/shared/list-alignment.js +61 -0
- package/dist/src/shared/list-alignment.js.map +1 -0
- package/dist/src/shared/logger.d.ts.map +1 -1
- package/dist/src/shared/logger.js +104 -33
- package/dist/src/shared/logger.js.map +1 -1
- package/dist/src/shared/map-limited.d.ts +11 -0
- package/dist/src/shared/map-limited.d.ts.map +1 -0
- package/dist/src/shared/map-limited.js +30 -0
- package/dist/src/shared/map-limited.js.map +1 -0
- package/dist/src/shared/oneShotCli.d.ts.map +1 -1
- package/dist/src/shared/oneShotCli.js +4 -2
- package/dist/src/shared/oneShotCli.js.map +1 -1
- package/dist/src/shared/partial-delivery.d.ts +24 -0
- package/dist/src/shared/partial-delivery.d.ts.map +1 -0
- package/dist/src/shared/partial-delivery.js +46 -0
- package/dist/src/shared/partial-delivery.js.map +1 -0
- package/dist/src/shared/process-safety-net.d.ts +44 -0
- package/dist/src/shared/process-safety-net.d.ts.map +1 -0
- package/dist/src/shared/process-safety-net.js +88 -0
- package/dist/src/shared/process-safety-net.js.map +1 -0
- package/dist/src/shared/rateLimit.d.ts +45 -2
- package/dist/src/shared/rateLimit.d.ts.map +1 -1
- package/dist/src/shared/rateLimit.js +64 -2
- package/dist/src/shared/rateLimit.js.map +1 -1
- package/dist/src/shared/redact.d.ts.map +1 -1
- package/dist/src/shared/redact.js +11 -1
- package/dist/src/shared/redact.js.map +1 -1
- package/dist/src/shared/safe-file-name.d.ts +9 -0
- package/dist/src/shared/safe-file-name.d.ts.map +1 -0
- package/dist/src/shared/safe-file-name.js +16 -0
- package/dist/src/shared/safe-file-name.js.map +1 -0
- package/dist/src/shared/terminal-safe-text.d.ts +2 -0
- package/dist/src/shared/terminal-safe-text.d.ts.map +1 -0
- package/dist/src/shared/terminal-safe-text.js +21 -0
- package/dist/src/shared/terminal-safe-text.js.map +1 -0
- package/dist/src/shared/types.d.ts +75 -4
- package/dist/src/shared/types.d.ts.map +1 -1
- package/dist/src/skills-sync/apply.d.ts +21 -0
- package/dist/src/skills-sync/apply.d.ts.map +1 -0
- package/dist/src/skills-sync/apply.js +209 -0
- package/dist/src/skills-sync/apply.js.map +1 -0
- package/dist/src/skills-sync/backup-run.d.ts +47 -0
- package/dist/src/skills-sync/backup-run.d.ts.map +1 -0
- package/dist/src/skills-sync/backup-run.js +150 -0
- package/dist/src/skills-sync/backup-run.js.map +1 -0
- package/dist/src/skills-sync/bounded-read.d.ts +32 -0
- package/dist/src/skills-sync/bounded-read.d.ts.map +1 -0
- package/dist/src/skills-sync/bounded-read.js +104 -0
- package/dist/src/skills-sync/bounded-read.js.map +1 -0
- package/dist/src/skills-sync/bundled.d.ts +28 -0
- package/dist/src/skills-sync/bundled.d.ts.map +1 -0
- package/dist/src/skills-sync/bundled.js +84 -0
- package/dist/src/skills-sync/bundled.js.map +1 -0
- package/dist/src/skills-sync/fingerprint.d.ts +32 -0
- package/dist/src/skills-sync/fingerprint.d.ts.map +1 -0
- package/dist/src/skills-sync/fingerprint.js +58 -0
- package/dist/src/skills-sync/fingerprint.js.map +1 -0
- package/dist/src/skills-sync/history.d.ts +44 -0
- package/dist/src/skills-sync/history.d.ts.map +1 -0
- package/dist/src/skills-sync/history.js +115 -0
- package/dist/src/skills-sync/history.js.map +1 -0
- package/dist/src/skills-sync/home-skill.d.ts +28 -0
- package/dist/src/skills-sync/home-skill.d.ts.map +1 -0
- package/dist/src/skills-sync/home-skill.js +67 -0
- package/dist/src/skills-sync/home-skill.js.map +1 -0
- package/dist/src/skills-sync/instance.d.ts +26 -0
- package/dist/src/skills-sync/instance.d.ts.map +1 -0
- package/dist/src/skills-sync/instance.js +128 -0
- package/dist/src/skills-sync/instance.js.map +1 -0
- package/dist/src/skills-sync/names.d.ts +25 -0
- package/dist/src/skills-sync/names.d.ts.map +1 -0
- package/dist/src/skills-sync/names.js +56 -0
- package/dist/src/skills-sync/names.js.map +1 -0
- package/dist/src/skills-sync/plan.d.ts +58 -0
- package/dist/src/skills-sync/plan.d.ts.map +1 -0
- package/dist/src/skills-sync/plan.js +132 -0
- package/dist/src/skills-sync/plan.js.map +1 -0
- package/dist/src/skills-sync/receipt.d.ts +61 -0
- package/dist/src/skills-sync/receipt.d.ts.map +1 -0
- package/dist/src/skills-sync/receipt.js +149 -0
- package/dist/src/skills-sync/receipt.js.map +1 -0
- package/dist/src/skills-sync/staging.d.ts +21 -0
- package/dist/src/skills-sync/staging.d.ts.map +1 -0
- package/dist/src/skills-sync/staging.js +81 -0
- package/dist/src/skills-sync/staging.js.map +1 -0
- package/dist/src/skills-sync/sync.d.ts +37 -0
- package/dist/src/skills-sync/sync.d.ts.map +1 -0
- package/dist/src/skills-sync/sync.js +201 -0
- package/dist/src/skills-sync/sync.js.map +1 -0
- package/dist/src/skills-sync/types.d.ts +66 -0
- package/dist/src/skills-sync/types.d.ts.map +1 -0
- package/dist/src/skills-sync/types.js +2 -0
- package/dist/src/skills-sync/types.js.map +1 -0
- package/dist/src/stt/config.d.ts +5 -0
- package/dist/src/stt/config.d.ts.map +1 -0
- package/dist/src/stt/config.js +18 -0
- package/dist/src/stt/config.js.map +1 -0
- package/dist/src/updates/maintenance.d.ts.map +1 -1
- package/dist/src/updates/maintenance.js +24 -4
- package/dist/src/updates/maintenance.js.map +1 -1
- package/dist/src/workflows/repository-mutex.d.ts +1 -1
- package/dist/web/404.html +1 -1
- package/dist/web/__next.__PAGE__.txt +11 -11
- package/dist/web/__next._full.txt +12 -12
- package/dist/web/__next._tree.txt +2 -2
- package/dist/web/_next/static/chunks/{0g5c5ppr8zmup.js → 20v6mri7epga5.js} +1 -1
- package/dist/web/_next/static/chunks/2u0328ngpt-ek.js +1 -0
- package/dist/web/_next/static/chunks/3f9i3f9q6v6_j.css +1 -0
- package/dist/web/_next/static/chunks/{08i7uo3uz6_fn.js → 3yy053rafgrzy.js} +1 -1
- package/dist/web/_not-found/__next._full.txt +10 -10
- package/dist/web/_not-found/__next._not-found.__PAGE__.txt +9 -9
- package/dist/web/_not-found/__next._tree.txt +2 -2
- package/dist/web/_not-found.html +1 -1
- package/dist/web/_not-found.txt +10 -10
- package/dist/web/chat/__next._full.txt +12 -12
- package/dist/web/chat/__next._tree.txt +2 -2
- package/dist/web/chat/__next.chat.__PAGE__.txt +11 -11
- package/dist/web/chat.html +1 -1
- package/dist/web/chat.txt +12 -12
- package/dist/web/cron/__next._full.txt +12 -12
- package/dist/web/cron/__next._tree.txt +2 -2
- package/dist/web/cron/__next.cron.__PAGE__.txt +11 -11
- package/dist/web/cron.html +1 -1
- package/dist/web/cron.txt +12 -12
- package/dist/web/index.html +1 -1
- package/dist/web/index.txt +12 -12
- package/dist/web/kanban/__next._full.txt +12 -12
- package/dist/web/kanban/__next._tree.txt +2 -2
- package/dist/web/kanban/__next.kanban.__PAGE__.txt +11 -11
- package/dist/web/kanban.html +1 -1
- package/dist/web/kanban.txt +12 -12
- package/dist/web/logs/__next._full.txt +12 -12
- package/dist/web/logs/__next._tree.txt +2 -2
- package/dist/web/logs/__next.logs.__PAGE__.txt +11 -11
- package/dist/web/logs.html +1 -1
- package/dist/web/logs.txt +12 -12
- package/dist/web/models/__next._full.txt +12 -12
- package/dist/web/models/__next._tree.txt +2 -2
- package/dist/web/models/__next.models.__PAGE__.txt +11 -11
- package/dist/web/models.html +1 -1
- package/dist/web/models.txt +12 -12
- package/dist/web/org/__next._full.txt +12 -12
- package/dist/web/org/__next._tree.txt +2 -2
- package/dist/web/org/__next.org.__PAGE__.txt +11 -11
- package/dist/web/org.html +1 -1
- package/dist/web/org.txt +12 -12
- package/dist/web/sessions/__next._full.txt +10 -10
- package/dist/web/sessions/__next._tree.txt +2 -2
- package/dist/web/sessions/__next.sessions.__PAGE__.txt +9 -9
- package/dist/web/sessions.html +1 -1
- package/dist/web/sessions.txt +10 -10
- package/dist/web/settings/__next._full.txt +12 -12
- package/dist/web/settings/__next._tree.txt +2 -2
- package/dist/web/settings/__next.settings.__PAGE__.txt +11 -11
- package/dist/web/settings.html +1 -1
- package/dist/web/settings.txt +12 -12
- package/dist/web/skills/__next._full.txt +12 -12
- package/dist/web/skills/__next._tree.txt +2 -2
- package/dist/web/skills/__next.skills.__PAGE__.txt +11 -11
- package/dist/web/skills.html +1 -1
- package/dist/web/skills.txt +12 -12
- package/package.json +2 -1
- package/template/AGENTS.md +48 -308
- package/template/CLAUDE.md +4 -349
- package/template/bundled-skill-history.json +377 -0
- package/template/config.default.yaml +52 -3
- package/template/docs/architecture.md +41 -3
- package/template/docs/backup.md +142 -0
- package/template/docs/connectors.md +192 -16
- package/template/docs/cron.md +30 -11
- package/template/docs/memory.md +47 -0
- package/template/docs/overview.md +6 -2
- package/template/docs/self-modification.md +11 -10
- package/template/docs/skills.md +77 -4
- package/template/migrations/0.3.0/MIGRATION.md +6 -0
- package/template/migrations/0.7.3/MIGRATION.md +6 -0
- package/template/migrations/0.7.5/MIGRATION.md +1 -1
- package/template/migrations/0.9.0/MIGRATION.md +6 -0
- package/template/migrations/2026.10.13/MIGRATION.md +76 -0
- package/template/migrations/2026.10.13/files/docs/architecture.md +112 -0
- package/template/migrations/2026.10.13/files/docs/automations.md +110 -0
- package/template/migrations/2026.10.13/files/docs/backup.md +142 -0
- package/template/migrations/2026.10.13/files/docs/connectors.md +370 -0
- package/template/migrations/2026.10.13/files/docs/cron-commands.md +52 -0
- package/template/migrations/2026.10.13/files/docs/cron.md +178 -0
- package/template/migrations/2026.10.13/files/docs/mcp.md +108 -0
- package/template/migrations/2026.10.13/files/docs/memory.md +47 -0
- package/template/migrations/2026.10.13/files/docs/org.md +111 -0
- package/template/migrations/2026.10.13/files/docs/overview.md +44 -0
- package/template/migrations/2026.10.13/files/docs/self-modification.md +71 -0
- package/template/migrations/2026.10.13/files/docs/skills.md +140 -0
- package/template/migrations/2026.10.13/files/skills/cron-manager/SKILL.md +107 -0
- package/template/migrations/2026.10.13/files/skills/management/SKILL.md +227 -0
- package/template/migrations/2026.10.13/files/skills/migrate/SKILL.md +194 -0
- package/template/migrations/2026.10.13/files/skills/onboarding/SKILL.md +153 -0
- package/template/migrations/2026.10.13/files/skills/openryoko-config/SKILL.md +35 -0
- package/template/migrations/2026.10.13/files/skills/openryoko-config/references/engine-fallback.md +98 -0
- package/template/migrations/2026.10.13/files/skills/openryoko-config/references/jev.md +89 -0
- package/template/migrations/2026.10.13/files/skills/openryoko-config/references/maintenance.md +49 -0
- package/template/migrations/2026.10.13/files/skills/openryoko-config/references/platform.md +100 -0
- package/template/migrations/2026.10.13/files/skills/self-heal/SKILL.md +187 -0
- package/template/migrations/2026.10.9/MIGRATION.md +44 -0
- package/template/migrations/2026.10.9/files/docs/memory.md +47 -0
- package/template/migrations/2026.10.9/files/skills/migrate/SKILL.md +194 -0
- package/template/migrations/2026.5.7/MIGRATION.md +6 -0
- package/template/migrations/2026.8.28/MIGRATION.md +6 -0
- package/template/migrations/2026.9.11/MIGRATION.md +6 -0
- package/template/skills/cron-manager/SKILL.md +10 -0
- package/template/skills/management/SKILL.md +5 -4
- package/template/skills/migrate/SKILL.md +47 -14
- package/template/skills/onboarding/SKILL.md +3 -3
- package/template/skills/openryoko-config/SKILL.md +1 -1
- package/template/skills/openryoko-config/references/engine-fallback.md +16 -5
- package/template/skills/openryoko-config/references/platform.md +23 -4
- package/template/skills/self-heal/SKILL.md +117 -44
- package/dist/src/engines/mock.d.ts +0 -16
- package/dist/src/engines/mock.d.ts.map +0 -1
- package/dist/src/engines/mock.js +0 -47
- package/dist/src/engines/mock.js.map +0 -1
- package/dist/src/shared/test-support/posix-mode.d.ts +0 -17
- package/dist/src/shared/test-support/posix-mode.d.ts.map +0 -1
- package/dist/src/shared/test-support/posix-mode.js +0 -23
- package/dist/src/shared/test-support/posix-mode.js.map +0 -1
- package/dist/web/_next/static/Oux0UBcCkbX5eOp9-vC4k/_buildManifest.js +0 -11
- package/dist/web/_next/static/Oux0UBcCkbX5eOp9-vC4k/_clientMiddlewareManifest.js +0 -1
- package/dist/web/_next/static/Oux0UBcCkbX5eOp9-vC4k/_ssgManifest.js +0 -1
- package/dist/web/_next/static/chunks/02h65sho8c14h.js +0 -1
- package/dist/web/_next/static/chunks/0ic18n-m7ixyw.css +0 -1
- package/dist/web/_next/static/chunks/19s8vn2kgy7q1.js +0 -1
- package/dist/web/_next/static/chunks/1_jm0szyu2the.js +0 -1
- package/dist/web/_next/static/chunks/1omdg4m5w9lgx.js +0 -1
- package/dist/web/_next/static/chunks/25nob1new8t4s.js +0 -79
- package/dist/web/_next/static/chunks/2iqxlc9wtxzm2.js +0 -1
- package/dist/web/_next/static/chunks/3_6klkygi417n.js +0 -1
- package/dist/web/_next/static/chunks/3alc-b00c58_3.css +0 -1
- /package/dist/web/_next/static/{70PNIyOj8-2kywAG6J41- → ov0mWzyHx0B5oEnTHE_pa}/_buildManifest.js +0 -0
- /package/dist/web/_next/static/{70PNIyOj8-2kywAG6J41- → ov0mWzyHx0B5oEnTHE_pa}/_clientMiddlewareManifest.js +0 -0
- /package/dist/web/_next/static/{70PNIyOj8-2kywAG6J41- → ov0mWzyHx0B5oEnTHE_pa}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DatabaseBackupName } from "../sessions/backup.js";
|
|
2
|
+
/**
|
|
3
|
+
* Re-bases a path that `shared/paths.ts` defines under the running home onto
|
|
4
|
+
* `home`. The backup code takes the home as an argument so it can be pointed at
|
|
5
|
+
* any directory, but where things live inside one is defined in exactly one
|
|
6
|
+
* place and read from there.
|
|
7
|
+
*/
|
|
8
|
+
export declare function inHome(home: string, pathInRunningHome: string): string;
|
|
9
|
+
/** Where a database lives inside a home. */
|
|
10
|
+
export declare function databasePath(home: string, name: DatabaseBackupName): string;
|
|
11
|
+
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/backup/layout.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAGhE;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED,4CAA4C;AAC5C,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,GAAG,MAAM,CAE3E"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { JINN_HOME, SESSIONS_DB, WORKFLOWS_DB_PATH } from "../shared/paths.js";
|
|
3
|
+
/**
|
|
4
|
+
* Re-bases a path that `shared/paths.ts` defines under the running home onto
|
|
5
|
+
* `home`. The backup code takes the home as an argument so it can be pointed at
|
|
6
|
+
* any directory, but where things live inside one is defined in exactly one
|
|
7
|
+
* place and read from there.
|
|
8
|
+
*/
|
|
9
|
+
export function inHome(home, pathInRunningHome) {
|
|
10
|
+
return path.join(home, path.relative(JINN_HOME, pathInRunningHome));
|
|
11
|
+
}
|
|
12
|
+
/** Where a database lives inside a home. */
|
|
13
|
+
export function databasePath(home, name) {
|
|
14
|
+
return inHome(home, name === "sessions" ? SESSIONS_DB : WORKFLOWS_DB_PATH);
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../src/backup/layout.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE/E;;;;;GAKG;AACH,MAAM,UAAU,MAAM,CAAC,IAAY,EAAE,iBAAyB;IAC5D,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC,CAAC;AACtE,CAAC;AAED,4CAA4C;AAC5C,MAAM,UAAU,YAAY,CAAC,IAAY,EAAE,IAAwB;IACjE,OAAO,MAAM,CAAC,IAAI,EAAE,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC;AAC7E,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What one archive may hold. Applied when an archive is written and again when
|
|
3
|
+
* one is read, because both happen where running out of memory is an outage:
|
|
4
|
+
* the daily backup runs inside the gateway, and `verify` and `restore` read
|
|
5
|
+
* whatever file is sitting in the backup directory.
|
|
6
|
+
*
|
|
7
|
+
* A cap on bytes alone is not a cap. Directories, symlinks and empty files
|
|
8
|
+
* weigh nothing, and every one of them is still an object held in memory while
|
|
9
|
+
* the home is listed and a line in the manifest. A hundred thousand of them fit
|
|
10
|
+
* in a megabyte of gzip.
|
|
11
|
+
*/
|
|
12
|
+
export interface ArchiveLimits {
|
|
13
|
+
/** Files, directories and symlinks together. */
|
|
14
|
+
maxEntries: number;
|
|
15
|
+
/** Uncompressed bytes of file content. */
|
|
16
|
+
maxBytes: number;
|
|
17
|
+
/** Longest home-relative path carried. Past it an entry is left out and reported. Default: {@link MAX_ENTRY_PATH_BYTES}. */
|
|
18
|
+
maxPathBytes?: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Far longer than anything a home holds, and short enough that the entry limit
|
|
22
|
+
* bounds memory: without it, fifty thousand paths of four kilobytes each are
|
|
23
|
+
* two hundred megabytes of names.
|
|
24
|
+
*/
|
|
25
|
+
export declare const MAX_ENTRY_PATH_BYTES = 1024;
|
|
26
|
+
/** How much of what was skipped or found wrong is kept, by item. The total is always counted. */
|
|
27
|
+
export declare const MAX_RECORDED_ITEMS = 100;
|
|
28
|
+
/**
|
|
29
|
+
* The largest manifest an archive under these limits may carry. The manifest
|
|
30
|
+
* names every entry, so this is what bounds the memory a reader needs - and a
|
|
31
|
+
* writer too: a home of few entries with enormous names is refused here.
|
|
32
|
+
*/
|
|
33
|
+
export declare function manifestByteLimit(limits: ArchiveLimits): number;
|
|
34
|
+
export declare function pathByteLimit(limits: ArchiveLimits): number;
|
|
35
|
+
/**
|
|
36
|
+
* The most an archive under these limits can unpack to: its content, its
|
|
37
|
+
* manifest, what tar adds around every entry, and its closing. A reader stops
|
|
38
|
+
* when the stream goes past this.
|
|
39
|
+
*
|
|
40
|
+
* The other limits are judged from what the headers announce, so they say
|
|
41
|
+
* nothing about bytes that are announced by no entry at all - pax records with
|
|
42
|
+
* nothing behind them, or whatever else a file is padded out with. Without
|
|
43
|
+
* this, such a file is read to its end however long that is.
|
|
44
|
+
*/
|
|
45
|
+
export declare function unpackedByteLimit(limits: ArchiveLimits): number;
|
|
46
|
+
/**
|
|
47
|
+
* The home, or an archive, holds more than one archive is allowed to. Trying
|
|
48
|
+
* again changes nothing until the operator raises a limit or moves the bulk
|
|
49
|
+
* out, so the scheduler leaves this for the next daily run.
|
|
50
|
+
*/
|
|
51
|
+
export declare class ArchiveTooLargeError extends Error {
|
|
52
|
+
constructor(message: string);
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=limits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limits.d.ts","sourceRoot":"","sources":["../../../src/backup/limits.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,MAAM,WAAW,aAAa;IAC5B,gDAAgD;IAChD,UAAU,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,4HAA4H;IAC5H,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,OAAO,CAAC;AAKzC,iGAAiG;AACjG,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAE/D;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAE3D;AAYD;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAK/D;AAED;;;;GAIG;AACH,qBAAa,oBAAqB,SAAQ,KAAK;gBACjC,OAAO,EAAE,MAAM;CAI5B"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { MAX_TRAILING_PADDING_BYTES, TAR_BLOCK_BYTES } from "./tar.js";
|
|
2
|
+
/**
|
|
3
|
+
* Far longer than anything a home holds, and short enough that the entry limit
|
|
4
|
+
* bounds memory: without it, fifty thousand paths of four kilobytes each are
|
|
5
|
+
* two hundred megabytes of names.
|
|
6
|
+
*/
|
|
7
|
+
export const MAX_ENTRY_PATH_BYTES = 1024;
|
|
8
|
+
/** What one entry may cost in the manifest on average, name included. */
|
|
9
|
+
const MANIFEST_BYTES_PER_ENTRY = 640;
|
|
10
|
+
/** How much of what was skipped or found wrong is kept, by item. The total is always counted. */
|
|
11
|
+
export const MAX_RECORDED_ITEMS = 100;
|
|
12
|
+
/**
|
|
13
|
+
* The largest manifest an archive under these limits may carry. The manifest
|
|
14
|
+
* names every entry, so this is what bounds the memory a reader needs - and a
|
|
15
|
+
* writer too: a home of few entries with enormous names is refused here.
|
|
16
|
+
*/
|
|
17
|
+
export function manifestByteLimit(limits) {
|
|
18
|
+
return limits.maxEntries * MANIFEST_BYTES_PER_ENTRY;
|
|
19
|
+
}
|
|
20
|
+
export function pathByteLimit(limits) {
|
|
21
|
+
return limits.maxPathBytes ?? MAX_ENTRY_PATH_BYTES;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* What one entry can add to an archive besides its content: its header, the
|
|
25
|
+
* padding after its data, and - for a path or a link target too long for the
|
|
26
|
+
* header - a pax header with both spelled out.
|
|
27
|
+
*/
|
|
28
|
+
function tarOverheadPerEntry(limits) {
|
|
29
|
+
const paxRecords = Math.ceil((2 * (pathByteLimit(limits) + 32)) / TAR_BLOCK_BYTES) * TAR_BLOCK_BYTES;
|
|
30
|
+
return 3 * TAR_BLOCK_BYTES + paxRecords;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The most an archive under these limits can unpack to: its content, its
|
|
34
|
+
* manifest, what tar adds around every entry, and its closing. A reader stops
|
|
35
|
+
* when the stream goes past this.
|
|
36
|
+
*
|
|
37
|
+
* The other limits are judged from what the headers announce, so they say
|
|
38
|
+
* nothing about bytes that are announced by no entry at all - pax records with
|
|
39
|
+
* nothing behind them, or whatever else a file is padded out with. Without
|
|
40
|
+
* this, such a file is read to its end however long that is.
|
|
41
|
+
*/
|
|
42
|
+
export function unpackedByteLimit(limits) {
|
|
43
|
+
return limits.maxBytes
|
|
44
|
+
+ manifestByteLimit(limits)
|
|
45
|
+
+ (limits.maxEntries + 1) * tarOverheadPerEntry(limits)
|
|
46
|
+
+ 2 * TAR_BLOCK_BYTES + MAX_TRAILING_PADDING_BYTES;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The home, or an archive, holds more than one archive is allowed to. Trying
|
|
50
|
+
* again changes nothing until the operator raises a limit or moves the bulk
|
|
51
|
+
* out, so the scheduler leaves this for the next daily run.
|
|
52
|
+
*/
|
|
53
|
+
export class ArchiveTooLargeError extends Error {
|
|
54
|
+
constructor(message) {
|
|
55
|
+
super(message);
|
|
56
|
+
this.name = "ArchiveTooLargeError";
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=limits.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limits.js","sourceRoot":"","sources":["../../../src/backup/limits.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAsBvE;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC;AAEzC,yEAAyE;AACzE,MAAM,wBAAwB,GAAG,GAAG,CAAC;AAErC,iGAAiG;AACjG,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAEtC;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAqB;IACrD,OAAO,MAAM,CAAC,UAAU,GAAG,wBAAwB,CAAC;AACtD,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,MAAqB;IACjD,OAAO,MAAM,CAAC,YAAY,IAAI,oBAAoB,CAAC;AACrD,CAAC;AAED;;;;GAIG;AACH,SAAS,mBAAmB,CAAC,MAAqB;IAChD,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,eAAe,CAAC,GAAG,eAAe,CAAC;IACrG,OAAO,CAAC,GAAG,eAAe,GAAG,UAAU,CAAC;AAC1C,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAqB;IACrD,OAAO,MAAM,CAAC,QAAQ;UAClB,iBAAiB,CAAC,MAAM,CAAC;UACzB,CAAC,MAAM,CAAC,UAAU,GAAG,CAAC,CAAC,GAAG,mBAAmB,CAAC,MAAM,CAAC;UACrD,CAAC,GAAG,eAAe,GAAG,0BAA0B,CAAC;AACvD,CAAC;AAED;;;;GAIG;AACH,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAC7C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export declare const MANIFEST_SCHEMA_VERSION = 1;
|
|
2
|
+
export declare const MANIFEST_FORMAT = "openryoko-home-archive";
|
|
3
|
+
export interface ManifestEntry {
|
|
4
|
+
/** Home-relative, slash-separated. */
|
|
5
|
+
path: string;
|
|
6
|
+
type: "file" | "directory" | "symlink";
|
|
7
|
+
mode: number;
|
|
8
|
+
/** Files only. */
|
|
9
|
+
size?: number;
|
|
10
|
+
/** Files only. */
|
|
11
|
+
sha256?: string;
|
|
12
|
+
/** Symlinks only: the link text, exactly as it was read. */
|
|
13
|
+
target?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface SkippedEntry {
|
|
16
|
+
path: string;
|
|
17
|
+
reason: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Travels inside the archive as its last entry: the hashes are only known once
|
|
21
|
+
* every file has been streamed past, and one pass is what keeps a file that
|
|
22
|
+
* changes during the backup from disagreeing with its own record.
|
|
23
|
+
*/
|
|
24
|
+
export interface BackupManifest {
|
|
25
|
+
schemaVersion: typeof MANIFEST_SCHEMA_VERSION;
|
|
26
|
+
format: typeof MANIFEST_FORMAT;
|
|
27
|
+
id: string;
|
|
28
|
+
createdAt: string;
|
|
29
|
+
/** The home this was taken from. Informational: restore never trusts it as a destination. */
|
|
30
|
+
home: string;
|
|
31
|
+
/** Uncompressed bytes of every archived file. */
|
|
32
|
+
contentBytes: number;
|
|
33
|
+
entries: ManifestEntry[];
|
|
34
|
+
/** What the walk met and deliberately left out (unreadable, not a regular file). */
|
|
35
|
+
skipped: SkippedEntry[];
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The entry for `entryPath`, by binary search. A manifest lists its entries in
|
|
39
|
+
* path order, so nothing has to be indexed to look one up.
|
|
40
|
+
*/
|
|
41
|
+
export declare function findManifestEntry(entries: readonly ManifestEntry[], entryPath: string): ManifestEntry | undefined;
|
|
42
|
+
export declare function serializeManifest(manifest: BackupManifest): Buffer;
|
|
43
|
+
/** Reads a manifest, refusing one this version does not understand or that is not shaped like one. */
|
|
44
|
+
export declare function parseManifest(bytes: Buffer): BackupManifest;
|
|
45
|
+
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../src/backup/manifest.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,eAAO,MAAM,eAAe,2BAA2B,CAAC;AAExD,MAAM,WAAW,aAAa;IAC5B,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAAC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kBAAkB;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4DAA4D;IAC5D,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,aAAa,EAAE,OAAO,uBAAuB,CAAC;IAC9C,MAAM,EAAE,OAAO,eAAe,CAAC;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,6FAA6F;IAC7F,IAAI,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,oFAAoF;IACpF,OAAO,EAAE,YAAY,EAAE,CAAC;CACzB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,SAAS,aAAa,EAAE,EAAE,SAAS,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAWjH;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,cAAc,GAAG,MAAM,CAElE;AAyBD,sGAAsG;AACtG,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,CA2B3D"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
export const MANIFEST_SCHEMA_VERSION = 1;
|
|
2
|
+
export const MANIFEST_FORMAT = "openryoko-home-archive";
|
|
3
|
+
/**
|
|
4
|
+
* The entry for `entryPath`, by binary search. A manifest lists its entries in
|
|
5
|
+
* path order, so nothing has to be indexed to look one up.
|
|
6
|
+
*/
|
|
7
|
+
export function findManifestEntry(entries, entryPath) {
|
|
8
|
+
let low = 0;
|
|
9
|
+
let high = entries.length - 1;
|
|
10
|
+
while (low <= high) {
|
|
11
|
+
const middle = (low + high) >> 1;
|
|
12
|
+
const candidate = entries[middle].path;
|
|
13
|
+
if (candidate === entryPath)
|
|
14
|
+
return entries[middle];
|
|
15
|
+
if (candidate < entryPath)
|
|
16
|
+
low = middle + 1;
|
|
17
|
+
else
|
|
18
|
+
high = middle - 1;
|
|
19
|
+
}
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
export function serializeManifest(manifest) {
|
|
23
|
+
return Buffer.from(`${JSON.stringify(manifest, null, 2)}\n`, "utf8");
|
|
24
|
+
}
|
|
25
|
+
function isRecord(value) {
|
|
26
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
27
|
+
}
|
|
28
|
+
function parseEntry(value, index) {
|
|
29
|
+
if (!isRecord(value) || typeof value.path !== "string" || typeof value.mode !== "number") {
|
|
30
|
+
throw new Error(`manifest entry ${index} is malformed`);
|
|
31
|
+
}
|
|
32
|
+
// Keys in the order the writer emits them, so a manifest that is read and
|
|
33
|
+
// written again comes out byte for byte the same and can be compared as bytes.
|
|
34
|
+
const { path: entryPath, mode } = value;
|
|
35
|
+
if (value.type === "directory")
|
|
36
|
+
return { path: entryPath, type: "directory", mode };
|
|
37
|
+
if (value.type === "symlink" && typeof value.target === "string")
|
|
38
|
+
return { path: entryPath, type: "symlink", mode, target: value.target };
|
|
39
|
+
if (value.type === "file"
|
|
40
|
+
&& typeof value.size === "number" && Number.isSafeInteger(value.size) && value.size >= 0
|
|
41
|
+
&& typeof value.sha256 === "string" && /^[0-9a-f]{64}$/.test(value.sha256)) {
|
|
42
|
+
return { path: entryPath, type: "file", mode, size: value.size, sha256: value.sha256 };
|
|
43
|
+
}
|
|
44
|
+
throw new Error(`manifest entry ${index} (${value.path}) is malformed`);
|
|
45
|
+
}
|
|
46
|
+
/** Reads a manifest, refusing one this version does not understand or that is not shaped like one. */
|
|
47
|
+
export function parseManifest(bytes) {
|
|
48
|
+
let parsed;
|
|
49
|
+
try {
|
|
50
|
+
parsed = JSON.parse(bytes.toString("utf8"));
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
throw new Error("manifest is not valid JSON");
|
|
54
|
+
}
|
|
55
|
+
if (!isRecord(parsed) || parsed.format !== MANIFEST_FORMAT)
|
|
56
|
+
throw new Error("manifest is not a home archive manifest");
|
|
57
|
+
if (parsed.schemaVersion !== MANIFEST_SCHEMA_VERSION) {
|
|
58
|
+
throw new Error(`unsupported manifest version ${String(parsed.schemaVersion)}`);
|
|
59
|
+
}
|
|
60
|
+
if (typeof parsed.id !== "string" || typeof parsed.createdAt !== "string" || !Array.isArray(parsed.entries)) {
|
|
61
|
+
throw new Error("manifest is missing required fields");
|
|
62
|
+
}
|
|
63
|
+
const skipped = Array.isArray(parsed.skipped)
|
|
64
|
+
? parsed.skipped.filter(isRecord).map((item) => ({ path: String(item.path), reason: String(item.reason) }))
|
|
65
|
+
: [];
|
|
66
|
+
return {
|
|
67
|
+
schemaVersion: MANIFEST_SCHEMA_VERSION,
|
|
68
|
+
format: MANIFEST_FORMAT,
|
|
69
|
+
id: parsed.id,
|
|
70
|
+
createdAt: parsed.createdAt,
|
|
71
|
+
home: typeof parsed.home === "string" ? parsed.home : "",
|
|
72
|
+
contentBytes: typeof parsed.contentBytes === "number" ? parsed.contentBytes : 0,
|
|
73
|
+
entries: parsed.entries.map(parseEntry),
|
|
74
|
+
skipped,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../../src/backup/manifest.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { type ArchiveInspection, type InspectOptions } from "./archive.js";
|
|
2
|
+
import type { ArchiveLimits } from "./limits.js";
|
|
3
|
+
import { type ManifestEntry } from "./manifest.js";
|
|
4
|
+
import { type DiskSpaceProbe } from "./space.js";
|
|
5
|
+
import { type BackupKind } from "./targets.js";
|
|
6
|
+
export interface RestoreOptions {
|
|
7
|
+
archive: string;
|
|
8
|
+
home: string;
|
|
9
|
+
/** Limits the restore to these kinds. Default: everything the archive holds. */
|
|
10
|
+
only?: readonly BackupKind[];
|
|
11
|
+
/** Work out what would change and stop there. */
|
|
12
|
+
dryRun?: boolean;
|
|
13
|
+
/** Recreate symlinks whose target lies outside the home. Refused unless set. */
|
|
14
|
+
allowExternalSymlinks?: boolean;
|
|
15
|
+
/** Where the snapshot of the current state goes before anything is written. */
|
|
16
|
+
backupDirectory: string;
|
|
17
|
+
now: Date;
|
|
18
|
+
/**
|
|
19
|
+
* What an archive may hold - the one being restored, and the snapshot taken
|
|
20
|
+
* first of what it will overwrite. Default: what an instance uses when its config says nothing.
|
|
21
|
+
*/
|
|
22
|
+
limits?: ArchiveLimits;
|
|
23
|
+
/** The existing free-space judgement, replaceable in tests. */
|
|
24
|
+
diskSpace?: DiskSpaceProbe;
|
|
25
|
+
/** Overrides the verification pass. The seam that lets a test stand in for an inspector that misses something. */
|
|
26
|
+
inspect?: (file: string, context: InspectOptions) => Promise<ArchiveInspection>;
|
|
27
|
+
}
|
|
28
|
+
/** "mode": the bytes already match and only the permissions are put back. */
|
|
29
|
+
export type RestoreAction = "create" | "replace" | "mode" | "unchanged";
|
|
30
|
+
export interface RestoreChange {
|
|
31
|
+
path: string;
|
|
32
|
+
type: ManifestEntry["type"];
|
|
33
|
+
/** Null for a directory that only exists to hold a restored path, like `cron`. */
|
|
34
|
+
kind: BackupKind | null;
|
|
35
|
+
action: Exclude<RestoreAction, "unchanged">;
|
|
36
|
+
}
|
|
37
|
+
export interface RestoreResult {
|
|
38
|
+
id: string;
|
|
39
|
+
archive: string;
|
|
40
|
+
home: string;
|
|
41
|
+
dryRun: boolean;
|
|
42
|
+
/** The kinds actually restored: the ones asked for that the archive holds. */
|
|
43
|
+
kinds: BackupKind[];
|
|
44
|
+
changes: RestoreChange[];
|
|
45
|
+
unchanged: number;
|
|
46
|
+
/** In the home under the restored kinds, absent from the archive. Left exactly as they are. */
|
|
47
|
+
untouched: string[];
|
|
48
|
+
/** In the archive but under no archive target. Never written. */
|
|
49
|
+
ignored: string[];
|
|
50
|
+
/** The snapshot taken before writing. Null on a dry run or when nothing needed saving. */
|
|
51
|
+
preRestore: {
|
|
52
|
+
id: string;
|
|
53
|
+
file: string;
|
|
54
|
+
} | null;
|
|
55
|
+
/** What the restore did and the operator should still know: at present, a working directory it could not clear away. */
|
|
56
|
+
warnings: string[];
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Restores files from a home archive into `home`.
|
|
60
|
+
*
|
|
61
|
+
* Nothing is written until the archive has been read end to end and checked
|
|
62
|
+
* against its manifest, the plan has been worked out, and what the plan will
|
|
63
|
+
* overwrite has been archived as it stands, as a pre-restore snapshot. Files
|
|
64
|
+
* are then extracted into a staging directory, verified again, and moved into
|
|
65
|
+
* place.
|
|
66
|
+
*
|
|
67
|
+
* A restore brings back what the archive has. It deletes nothing: a file added
|
|
68
|
+
* to the home since the backup stays where it is and is reported as untouched.
|
|
69
|
+
* It writes only under the paths a home archive is made of, never through a
|
|
70
|
+
* symlink, and never recreates a symlink leading out of the home unless asked.
|
|
71
|
+
*/
|
|
72
|
+
export declare function restoreHomeArchive(options: RestoreOptions): Promise<RestoreResult>;
|
|
73
|
+
//# sourceMappingURL=restore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restore.d.ts","sourceRoot":"","sources":["../../../src/backup/restore.ts"],"names":[],"mappings":"AAIA,OAAO,EAML,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACpB,MAAM,cAAc,CAAC;AAItB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAA0C,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAE3F,OAAO,EAAqC,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AACpF,OAAO,EAAoE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAOjH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,gFAAgF;IAChF,IAAI,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;IAC7B,iDAAiD;IACjD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,gFAAgF;IAChF,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,+EAA+E;IAC/E,eAAe,EAAE,MAAM,CAAC;IACxB,GAAG,EAAE,IAAI,CAAC;IACV;;;OAGG;IACH,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,+DAA+D;IAC/D,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,kHAAkH;IAClH,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC;CACjF;AAED,6EAA6E;AAC7E,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,WAAW,CAAC;AAKxE,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC5B,kFAAkF;IAClF,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,OAAO,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;CAC7C;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,8EAA8E;IAC9E,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,+FAA+F;IAC/F,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,iEAAiE;IACjE,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,0FAA0F;IAC1F,UAAU,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAChD,wHAAwH;IACxH,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAgoBD;;;;;;;;;;;;;GAaG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CAsCxF"}
|