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,142 @@
|
|
|
1
|
+
# Backup
|
|
2
|
+
|
|
3
|
+
`~/.ryoko/` の設定・cron・人格・記憶は、人もエージェントも直接編集します。壊したときに前の状態へ戻せるように、gateway が1日1回バックアップを取ります。設定は要りません。既定で有効です。
|
|
4
|
+
|
|
5
|
+
ファイルを壊したと気づいたら、手で作り直す前に `ryoko backup list` を見てください。昨日の状態が残っています。
|
|
6
|
+
|
|
7
|
+
## 何が取られるか
|
|
8
|
+
|
|
9
|
+
gateway が動いている間、対象ごとに前回の成功から24時間たつと取ります(起動した直後にも判定します)。できるものは2種類です。
|
|
10
|
+
|
|
11
|
+
**ホームのアーカイブ**(`home-<日時>.tar.gz`)。中身は次の種類に分かれていて、復元のときに `--only` で選べます。
|
|
12
|
+
|
|
13
|
+
| 種類 | 中身 |
|
|
14
|
+
|---|---|
|
|
15
|
+
| `config` | `config.yaml`、`.env`(あれば) |
|
|
16
|
+
| `cron` | `cron/jobs.json` |
|
|
17
|
+
| `cron-history` | `cron/runs/`(ジョブの実行履歴) |
|
|
18
|
+
| `persona` | ホーム直下の `*.md` すべて。`AGENTS.md`・`CLAUDE.md`・`SOUL.md`・`IDENTITY.md`・`TOOLS.md`・`BOOTSTRAP.md` と、自分で足した文書。`MEMORY.md` だけは `memory` に入る |
|
|
19
|
+
| `memory` | `MEMORY.md`、`memory/` |
|
|
20
|
+
| `org` | `org/` |
|
|
21
|
+
| `skills` | `skills/`、`skills.json` |
|
|
22
|
+
| `docs` | `docs/` |
|
|
23
|
+
| `knowledge` | `knowledge/` |
|
|
24
|
+
| `workflows` | `workflows/` のうち DB 以外 |
|
|
25
|
+
|
|
26
|
+
**DB のコピー**。セッションの記録(`sessions-<日付>.db`)と、workflow の定義と実行履歴(`workflows-<日付>.db`。workflow を使っている場合)。DB のコピーは1日に1つで、同じ日にもう一度実行しても取り直しません。
|
|
27
|
+
|
|
28
|
+
DB をコピーするのは gateway だけです。動いている間、1日1回、自分でコピーします。手動の `ryoko backup run` が取るのはホームのアーカイブ(上の表のファイル)だけです。DB は開きません。
|
|
29
|
+
|
|
30
|
+
DB のコピーは、名前を付ける前に SQLite の `integrity_check` で確かめます。通らなければ、そのコピーは捨てて失敗として報告します(次に試すのは翌日です)。コピーはページ単位の複製なので、通らないときは元の DB 自体が壊れている可能性があります。`ryoko backup list` で以前のコピーを確かめ、下の「DB を戻すとき」を見てください。
|
|
31
|
+
|
|
32
|
+
この検査で分かるのは構造の破損だけです。別々の時点のページが混ざったコピーは、構造が保たれていれば検出できません。そういうコピーができるのは、動いている gateway に気づかないまま外からコピーした場合です。
|
|
33
|
+
|
|
34
|
+
検査そのものを実行できなかった場合(決められた時間内に終わらず打ち切った場合を含みます)は、コピーは残し、検査できなかったことを警告としてログに出します(`the copy was kept without being checked`)。
|
|
35
|
+
|
|
36
|
+
アーカイブには `config.yaml` の token や `.env` の鍵がそのまま入ります。ファイルは所有者だけが読める権限(0600)で作られますが、持ち出すときは秘密として扱ってください。
|
|
37
|
+
|
|
38
|
+
## 取られないもの
|
|
39
|
+
|
|
40
|
+
次のものはバックアップに入りません。入っている前提で作業しないでください。
|
|
41
|
+
|
|
42
|
+
- `logs/`、`tmp/`、`files/`(アップロードされたファイル)、`cron/commands/`(実行中のロックと出力)
|
|
43
|
+
- 対象の中にある `node_modules`、`.git`、`.venv`、`__pycache__`(どの深さでも)
|
|
44
|
+
- 認証の状態: `credentials/`、`connectors/`、`.whatsapp-auth`、`gateway-auth.json`、`auth-devices.json`。編集するものではないので、ホームごと失ったときは復元ではなく再認証します
|
|
45
|
+
- **symlink の先**。symlink はリンクとして記録するだけで、指している先の中身は読みません。`skills/` にホームの外のフォルダを symlink している場合、その中身は別の方法で守ってください
|
|
46
|
+
- ホーム直下の `*.md` 以外のファイル(`AGENTS.md.bak-…` のような退避ファイルなど)
|
|
47
|
+
|
|
48
|
+
## 保存先と設定
|
|
49
|
+
|
|
50
|
+
保存先は `~/.ryoko/backups/` です。ホームの中にあるので、目的は誤編集からの復旧です。ディスクごと失う事故に備えるなら、`backup.directory` でホームの外(別のディスクなど)を指定します。
|
|
51
|
+
|
|
52
|
+
```yaml
|
|
53
|
+
backup:
|
|
54
|
+
enabled: true # false にすると日次のバックアップを止める
|
|
55
|
+
directory: /path/to/backups # 省略時は ~/.ryoko/backups
|
|
56
|
+
retention: 14 # アーカイブを残す日数
|
|
57
|
+
maxArchiveMb: 512 # 1回のアーカイブに入れるファイル合計の上限
|
|
58
|
+
maxEntries: 50000 # 1回のアーカイブに入れるファイル・ディレクトリ・symlink の数の上限
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
`retention` は日数です。バックアップのある日を新しい順に `retention` 日分残し、それぞれの日の最新を必ず残します。同じ日に何度も取った場合、その日の分は直近 3 個までです。手動で何回取っても、前の日の分が押し出されることはありません。復元の前に自動で取られる `pre-restore-…` も、同じ数え方で別枠に残ります。
|
|
62
|
+
|
|
63
|
+
DB のコピーは1日1つ、7 世代で固定です。
|
|
64
|
+
|
|
65
|
+
ホームの対象が `maxArchiveMb` か `maxEntries` を超えると、アーカイブは書かれず失敗として扱います(DB のコピーは続きます)。空のファイルやディレクトリは容量を取りませんが、数としては数えます。大きなファイルや不要なファイルの山を対象の外へ出すか、上限を上げてください。この失敗は次の日次の機会まで再試行しないので、直したあとは `ryoko backup run` で取り直せます。
|
|
66
|
+
|
|
67
|
+
2つの上限は、アーカイブを読むとき(`verify`・`restore`)にも掛かります。上限を上げて取ったアーカイブは、同じ設定のもとで読めます。`config.yaml` が壊れていて読めないときは既定の上限が使われるので、それを超えるアーカイブから戻すには、先に `backup:` の節だけを書いた最小の `config.yaml` を置いてください。
|
|
68
|
+
|
|
69
|
+
復元の前に取る退避(`pre-restore-…`)にも同じ上限が掛かりますが、退避するのは復元が上書きするファイルだけです。バックアップを取ったあとでホーム全体が上限を超えていても復元できます。上書きするファイルだけで上限を超える場合は、`--only` で種類を絞って少しずつ戻すか、上限を上げてください。
|
|
70
|
+
|
|
71
|
+
失敗は gateway のログ(`Backup failed (...)`)と、`GET /api/status` の `backup` に出ます。`level` が `warning` のときは、どの対象がなぜ失敗したかが `targets` に入っています。
|
|
72
|
+
|
|
73
|
+
## どこで実行するか
|
|
74
|
+
|
|
75
|
+
`ryoko backup` は、gateway が動いている場所で実行します。ホームをコンテナに bind mount している場合は、コンテナの中です。
|
|
76
|
+
|
|
77
|
+
ホスト側のコマンドは、コンテナの中で動いている gateway を確実には見つけられません。コンテナの境界を越えると、プロセスの番号は通じません。ファイルのロックも、構成によっては共有されません。
|
|
78
|
+
|
|
79
|
+
そのため、どのコマンドも既定ではホームの DB を開きません。`run` はファイルをアーカイブするだけ、`list`・`verify`・`restore` が開くのはバックアップ先のファイルだけです。DB に触れるのは、明示して頼んだ2つの場合だけです(`run --include-databases` と、DB の `restore`)。この2つは、gateway が動いていた場所で、gateway を止めてから実行してください。
|
|
80
|
+
|
|
81
|
+
## 戻し方
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
ryoko backup list # 新しい順の一覧。左端が id
|
|
85
|
+
ryoko backup verify <id> # 読み戻して壊れていないか確かめる
|
|
86
|
+
ryoko backup restore <id> --only config --dry-run # 何が変わるかだけ表示する
|
|
87
|
+
ryoko backup restore <id> --only config # 実際に戻す
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
- `--only` には上の表の種類をカンマ区切りで渡します(`--only config,cron`)。省くと、アーカイブにあるすべての種類が対象です。まず `--dry-run` で確かめてください。
|
|
91
|
+
- ファイルの復元は、gateway が動いたままで構いません。`config.yaml`・`cron/jobs.json`・`org/`・`skills/` は、gateway が変更を検知して読み直します。
|
|
92
|
+
- **復元は上書きだけ**です。バックアップにあるファイルを戻し、バックアップに無いファイル(あとから足したメモや Skill)は消しません。消したいものは、表示された一覧を見て自分で消します。
|
|
93
|
+
- 復元が上書きするファイル(置き換えるものと、権限を変えるもの)は、直前の状態が自動で `pre-restore-<日時>` に退避されます。退避するのはそのファイルだけで、ホーム全体ではありません。戻しすぎたら `ryoko backup restore pre-restore-<日時>` で、上書きされたファイルを復元前の内容に戻せます。
|
|
94
|
+
- ただし、戻すのも上書きだけの復元です。**復元で新しく作られたファイルは、`pre-restore-…` へ戻しても消えません**。どれが作られたかは復元の出力の「作成」の行で分かります(件数が多いときは `--json` で全件が出ます)。要らないものは自分で消します。何も上書きしない復元(作成だけ)では、退避は作られません。
|
|
95
|
+
- `cron` が戻すのは `jobs.json` だけです。実行履歴まで巻き戻したいときだけ `cron-history` を指定します。
|
|
96
|
+
- `persona` を戻すと、オンボーディングが終わる前のバックアップなら `BOOTSTRAP.md` も戻ります。`--dry-run` に「作成 BOOTSTRAP.md」と出たら、戻したあとで消してください(残すとオンボーディングがやり直しになります)。
|
|
97
|
+
- ホームの外を指す symlink を新しく作ることになる復元は、既定では拒否されます。自分で張ったリンクを戻すときは `--allow-external-symlinks` を付けます。
|
|
98
|
+
- `<id>` には、別の場所へ持ち出したバックアップのファイルパスも渡せます。
|
|
99
|
+
- 復元は `tmp/restore-…` という作業ディレクトリに展開してから配置します。終わると自分が置いたファイルだけを消し、空になったディレクトリを消します。ほかの何かが入っていた場合は、ディレクトリごと残して警告を出します(`… was left as it is`)。中身を確かめて、要らなければ自分で消してください。
|
|
100
|
+
|
|
101
|
+
大きな変更の前に、いま取っておきたいときは `ryoko backup run` を使います。取るのは設定・cron・人格・記憶などのファイルです。何度実行しても構いません(その日の分は直近 3 個が残ります)。DB はこのコマンドでは取りません。gateway が毎日自分でコピーしています。
|
|
102
|
+
|
|
103
|
+
## DB を手動でコピーするとき
|
|
104
|
+
|
|
105
|
+
ふつうは要りません。DB は gateway が1日1回、自分でコピーします。`ryoko backup run` を `--json` で実行すると、開かなかった DB は `status` が `withheld`、`reason` が `not-requested` と出ます。
|
|
106
|
+
|
|
107
|
+
日次のバックアップを止めている場合(`backup.enabled: false`)や、gateway を止めたついでにその時点の DB を取っておきたい場合だけ、次のようにします。
|
|
108
|
+
|
|
109
|
+
1. gateway を止める
|
|
110
|
+
2. 1分ほど待つ
|
|
111
|
+
3. gateway が動いていた場所(コンテナで動かしているなら、コンテナの中)で `ryoko backup run --include-databases`
|
|
112
|
+
|
|
113
|
+
gateway が動いている気配があると、DB は開きません。気配とは、PID ファイルが指すプロセスが生きていること、または DB への直近1分以内の書き込みです。そのときはファイルのアーカイブだけを取り、終了コード 1 で終わります。`--json` では、全体の `status` が `incomplete`、その DB の `status` が `withheld`、`reason` が `gateway-running` になります。その日のコピーがすでにあれば、gateway が動いていても何もせずに正常終了します。
|
|
114
|
+
|
|
115
|
+
気配が無いことは、止まっている証拠にはなりません(下の「DB を戻すとき」と同じです)。必ず止めてから実行してください。
|
|
116
|
+
|
|
117
|
+
既定で DB を開かないのは、読み取り専用の接続でも DB の隣の `-shm` には書き込むためです。ほかのプロセスがその DB を開いていることが見えないと、`-shm` を作り直します。ホスト側から、コンテナの中で動いている gateway の DB にこれをした場合に何が起きるかは、確かめられていません。このコマンド自身の読み取りも `-shm` を更新するので、続けて DB を復元するときは、もう1分待ってください。
|
|
118
|
+
|
|
119
|
+
## DB を戻すとき
|
|
120
|
+
|
|
121
|
+
DB(`sessions-…`、`workflows-…`)の復元は、**gateway を止めてから**行います。動いている gateway の下で DB を差し替えると、記録が壊れます。
|
|
122
|
+
|
|
123
|
+
1. gateway を止める(`ryoko stop`。サービスやコンテナで動かしている場合は、その方法で止める)
|
|
124
|
+
2. 1分ほど待つ
|
|
125
|
+
3. gateway が動いていた場所で実行する。ホームをコンテナに bind mount している場合は、**コンテナの中**で実行する。gateway を止めるとコンテナごと終了する構成では、同じホームを mount した一回限りのコンテナで実行する
|
|
126
|
+
4. `ryoko backup restore sessions-<日付> --gateway-stopped`
|
|
127
|
+
5. gateway を起動する
|
|
128
|
+
|
|
129
|
+
`--gateway-stopped` は「止めたことを確認した」という申告で、必須です。コマンドも稼働中の gateway を自分で探しますが、DB を開いて確かめることはしません。使われているかもしれない DB は、開くだけで記録を壊すことがあるためです。見るのは次の2つだけです。
|
|
130
|
+
|
|
131
|
+
- PID ファイル(`gateway.json`・`gateway.pid`)が指すプロセスが生きているか
|
|
132
|
+
- DB と、その `-wal`・`-shm` が、直近1分以内に書き換えられているか
|
|
133
|
+
|
|
134
|
+
どちらかに当たると、何も変えずに断ります。gateway を止めた直後は、たいてい2つ目に当たります。手順2で1分ほど待つのはそのためです。
|
|
135
|
+
|
|
136
|
+
この確認は確実ではありません。コンテナの中の gateway の PID は、ホスト側からは見えません。1分以上なにも書いていない gateway は、動いていても見つけられません。ホスト側で実行すると、動いている gateway に気づかないまま差し替えてしまうことがあります。手順3のとおり、gateway が動いていた場所で実行してください。
|
|
137
|
+
|
|
138
|
+
置き換える前の DB は `pre-restore-<日時>-sessions` として退避されます。
|
|
139
|
+
|
|
140
|
+
DB の復元は、ホームの中では実ディレクトリにしか書きません。`sessions/`・`workflows/` や、ホームの中のバックアップ先が symlink になっていると、何も変えずに断ります。バックアップをホームの外に置きたいときは、symlink ではなく `backup.directory` で指定してください。
|
|
141
|
+
|
|
142
|
+
エージェントは DB を復元できません。自分が動いている gateway を止める必要があるためです。DB の復元が要ると判断したら、上の手順をオペレータに伝えてください。
|
|
@@ -9,22 +9,33 @@ interface Connector {
|
|
|
9
9
|
name: string;
|
|
10
10
|
start(): Promise<void>;
|
|
11
11
|
stop(): Promise<void>;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
getCapabilities(): ConnectorCapabilities; // threading, messageEdits, reactions, attachments
|
|
13
|
+
getHealth(): ConnectorHealth; // running | stopped | error | qr_pending
|
|
14
|
+
reconstructTarget(replyContext: ReplyContext): Target;
|
|
15
|
+
sendMessage(target: Target, text: string): Promise<string | void>;
|
|
16
|
+
replyMessage(target: Target, text: string): Promise<string | void>;
|
|
17
|
+
addReaction(target: Target, emoji: string): Promise<void>;
|
|
18
|
+
removeReaction(target: Target, emoji: string): Promise<void>;
|
|
19
|
+
editMessage(target: Target, text: string): Promise<void>;
|
|
16
20
|
onMessage(handler: (msg: IncomingMessage) => void): void;
|
|
17
21
|
}
|
|
18
22
|
|
|
19
23
|
interface IncomingMessage {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
connector: string; // Connector name
|
|
25
|
+
source: string; // Platform the message arrived on
|
|
26
|
+
sessionKey: string; // The session the message belongs to
|
|
27
|
+
channel: string;
|
|
28
|
+
thread?: string;
|
|
29
|
+
user: string; // Display name
|
|
30
|
+
userId: string; // Platform user ID
|
|
31
|
+
text: string; // Message content
|
|
32
|
+
attachments: Attachment[]; // Files the connector downloaded
|
|
33
|
+
replyContext: ReplyContext; // What a reply needs to find its way back
|
|
25
34
|
}
|
|
26
35
|
```
|
|
27
36
|
|
|
37
|
+
`sendMessage` and `replyMessage` report delivery. The promise resolves when the whole message reached the platform, and rejects when it did not. A long reply is sent in chunks; one that stops part-way rejects as a partial delivery and is not sent again from the top, because that would post the first chunks twice. `POST /api/connectors/<name>/send` answers `{"status":"sent"}` only when all of the message arrived. Otherwise it answers 500 with the reason — `only N of M chunks were delivered` for a partial delivery.
|
|
38
|
+
|
|
28
39
|
## Slack Connector
|
|
29
40
|
|
|
30
41
|
Uses `@slack/bolt` with Socket Mode (no public URL required).
|
|
@@ -36,8 +47,13 @@ connectors:
|
|
|
36
47
|
slack:
|
|
37
48
|
appToken: xapp-... # Socket Mode app token
|
|
38
49
|
botToken: xoxb-... # Bot user OAuth token
|
|
50
|
+
maxAttachmentMb: 200 # optional: largest attachment downloaded, in MB (default 200)
|
|
39
51
|
```
|
|
40
52
|
|
|
53
|
+
An attachment over `maxAttachmentMb` is not downloaded; the session is told which one and why, so it can say so in its reply. The same key works under `discord` and `whatsapp`.
|
|
54
|
+
|
|
55
|
+
Files are fetched only for a message the bot is going to answer, and only from Slack's own file host (`files.slack.com`), the one place the bot token is sent. A file that Slack only links to — a Google Drive document or another remote file shared in the channel — is not downloaded. The session is told that it could not be retrieved, as for any attachment that fails.
|
|
56
|
+
|
|
41
57
|
### Response Gating (`respondTo`)
|
|
42
58
|
|
|
43
59
|
By default the bot responds to every message it can see. `respondTo` adds a
|
|
@@ -72,20 +88,21 @@ Modes per scope: `always` | `mention` | `never`.
|
|
|
72
88
|
|
|
73
89
|
Slack messages are mapped to sessions based on conversation context:
|
|
74
90
|
|
|
75
|
-
| Slack Context |
|
|
91
|
+
| Slack Context | Session Key | Session Behavior |
|
|
76
92
|
|---|---|---|
|
|
77
93
|
| Direct message | `slack:dm:<userId>` | One session per DM user |
|
|
78
|
-
|
|
|
79
|
-
|
|
|
94
|
+
| Thread inside a direct message | `slack:dm:<userId>:<threadTs>` | One session per thread |
|
|
95
|
+
| Channel root message | `slack:<channelId>:<ts>` | One session per root message; replies in its thread continue it |
|
|
96
|
+
| Thread reply | `slack:<channelId>:<threadTs>` | The session of that thread's root message |
|
|
80
97
|
|
|
81
98
|
### Reaction Workflow
|
|
82
99
|
|
|
83
100
|
Reactions provide visual feedback during processing:
|
|
84
101
|
|
|
85
|
-
1. Message
|
|
86
|
-
2.
|
|
87
|
-
3.
|
|
88
|
-
4.
|
|
102
|
+
1. Message waits behind a turn that is still running → add :clock1:
|
|
103
|
+
2. Its turn starts → remove :clock1:, add :eyes:
|
|
104
|
+
3. The turn waits for a usage limit to reset → replace :eyes: with :hourglass_flowing_sand:
|
|
105
|
+
4. The turn ends → remove the reaction. The reply, or the error, is the answer; no reaction marks success or failure
|
|
89
106
|
|
|
90
107
|
### Employee Routing
|
|
91
108
|
|
|
@@ -93,6 +110,108 @@ Reactions provide visual feedback during processing:
|
|
|
93
110
|
- `@mention`: messages mentioning a specific employee name route to that employee
|
|
94
111
|
- Thread continuity: replies in a thread continue with the same employee
|
|
95
112
|
|
|
113
|
+
### Provider Re-login from the Operator's DM (`providerAuth`)
|
|
114
|
+
|
|
115
|
+
When Claude's or Codex's login expires, every turn fails until someone logs in
|
|
116
|
+
again on the host. On a host with no shell to log in from (a read-only
|
|
117
|
+
container, a headless server) the operator can do it from Slack instead. It is
|
|
118
|
+
off by default.
|
|
119
|
+
|
|
120
|
+
```yaml
|
|
121
|
+
portal:
|
|
122
|
+
operatorSlackId: U0123ABCDE # required — the only person who can use it
|
|
123
|
+
|
|
124
|
+
connectors:
|
|
125
|
+
slack:
|
|
126
|
+
providerAuth:
|
|
127
|
+
enabled: true
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
A named Slack instance under `connectors.instances[]` takes the same
|
|
131
|
+
`providerAuth` block. Saving the config reloads the connector; the gateway log
|
|
132
|
+
then shows `[slack] provider-auth: enabled`. If it shows a warning about
|
|
133
|
+
`portal.operatorSlackId` instead, the feature is inert until that is fixed:
|
|
134
|
+
the value must be the operator's Slack *user* ID (`U…`, or `W…` on Enterprise
|
|
135
|
+
Grid). A channel ID, a handle or a display name is treated as unset.
|
|
136
|
+
|
|
137
|
+
**Using it** — in your own 1:1 DM with the bot:
|
|
138
|
+
|
|
139
|
+
1. Send `ログイン` (also `再ログイン`, `login`, or `/login`). The bot answers
|
|
140
|
+
with two buttons, *Claude にログイン* and *Codex にログイン*.
|
|
141
|
+
2. **Claude**: open the login page from the button, approve, copy the
|
|
142
|
+
authentication code the page shows (it contains a `#`), press *コードを入力*
|
|
143
|
+
and paste it into the dialog. If your browser lands on a
|
|
144
|
+
`http://localhost:…/callback?...` address instead, paste that whole address.
|
|
145
|
+
3. **Codex**: open the login page from the button and type in the device code
|
|
146
|
+
the bot shows. Nothing is sent back; the bot notices when you are done.
|
|
147
|
+
4. The bot confirms the result with the CLI's own status command and rewrites
|
|
148
|
+
its message — the link and the code are gone from the DM either way. After
|
|
149
|
+
a Codex login it also shows what the CLI reports about the login and asks
|
|
150
|
+
you to confirm the approval was yours (see the note on device codes below).
|
|
151
|
+
|
|
152
|
+
A login that is not finished within 10 minutes is stopped; press *キャンセル*
|
|
153
|
+
to stop it sooner. Only one login per provider runs at a time. Saving the
|
|
154
|
+
config (which reloads the connectors) or restarting the gateway also stops a
|
|
155
|
+
login in progress — start it again afterwards.
|
|
156
|
+
|
|
157
|
+
If the bot reports that it cannot read a sign-in link from the CLI, the CLI's
|
|
158
|
+
output has changed in a way this version does not understand. Cancel, and log
|
|
159
|
+
in on the host instead.
|
|
160
|
+
|
|
161
|
+
When a turn fails because a login is gone, the bot DMs the operator a button
|
|
162
|
+
to log in again — at most once per provider every 30 minutes. This covers
|
|
163
|
+
Slack messages, cron jobs, workflows and web chat alike.
|
|
164
|
+
|
|
165
|
+
**Slack app settings.** Buttons and the code dialog need *Interactivity*
|
|
166
|
+
turned on (Socket Mode delivers it; no Request URL is needed), the `chat:write`
|
|
167
|
+
and `im:history` bot scopes, and the `message.im` bot event. The manifest
|
|
168
|
+
offered in Settings already contains all of these. An app set up by hand needs
|
|
169
|
+
Interactivity enabled and a reinstall to the workspace. Slack gives the bot no
|
|
170
|
+
way to detect that Interactivity is off — a button that does nothing when
|
|
171
|
+
pressed means exactly that.
|
|
172
|
+
|
|
173
|
+
**What to know before enabling it:**
|
|
174
|
+
|
|
175
|
+
- It reacts only to `portal.operatorSlackId`, compared exactly, and only in
|
|
176
|
+
that person's 1:1 DM. In channels, group DMs, and for everyone else, the
|
|
177
|
+
bot behaves as if the feature did not exist. If `allowFrom` is set, the
|
|
178
|
+
operator must be on it.
|
|
179
|
+
- Whoever controls the operator's Slack account can sign the instance in to a
|
|
180
|
+
provider account of their choosing. Protect that account accordingly.
|
|
181
|
+
- Never paste the code into the chat. A bot cannot delete your message, so the
|
|
182
|
+
bot refuses a pasted code, keeps it out of the session and the log, and asks
|
|
183
|
+
you to delete it yourself. While a login is open — ten minutes at most —
|
|
184
|
+
this is applied broadly: any message of yours in the DM that contains
|
|
185
|
+
something shaped like a code, even inside a sentence or with a file
|
|
186
|
+
attached, gets that answer instead of reaching the assistant. (A short
|
|
187
|
+
`XXXX-XXXX` code counts only during a Codex login, the one that has such a
|
|
188
|
+
code.) Send the message again once the login has ended. Outside a login,
|
|
189
|
+
only a message that is nothing but an OAuth code is held back.
|
|
190
|
+
- The link and the device code stay in the DM until the login ends, and are
|
|
191
|
+
never written to the gateway log or the session database. Slack itself may
|
|
192
|
+
retain edited messages under your workspace's retention and export settings.
|
|
193
|
+
- **A Codex device code works for whoever sees it.** That is how a device
|
|
194
|
+
login is built: the code is typed into a browser, and the CLI is signed in
|
|
195
|
+
to whichever account that browser is using. Someone who can read the
|
|
196
|
+
operator's DM while a Codex login is open — a shared screen, a workspace
|
|
197
|
+
admin, a second device — can enter the code with *their own* ChatGPT
|
|
198
|
+
account. The instance then runs as that account, and the bot reports a
|
|
199
|
+
perfectly successful login. So: treat the code like a password for those
|
|
200
|
+
minutes, and when the bot reports success, make sure you had finished the
|
|
201
|
+
browser step yourself. If a Codex login completes and you had not, log in
|
|
202
|
+
again at once. Claude is not exposed to this — its code only ever travels
|
|
203
|
+
from you to the CLI, through the dialog.
|
|
204
|
+
- The CLI runs with the same binary (`engines.<name>.bin`) and environment as
|
|
205
|
+
the engine, so the credentials land where the engine reads them
|
|
206
|
+
(`~/.claude` or `CLAUDE_CONFIG_DIR`; `~/.codex`). In a container that
|
|
207
|
+
location must be writable and must survive a restart.
|
|
208
|
+
- Employees with `sshHost` run on another machine; their login is not touched.
|
|
209
|
+
- Codex's device-code login is governed by a setting in ChatGPT's security
|
|
210
|
+
settings, per account or workspace. If the Codex login ends at once, check
|
|
211
|
+
that it is allowed there.
|
|
212
|
+
- In the operator's DM, `/login` opens this menu rather than being passed to
|
|
213
|
+
Claude Code.
|
|
214
|
+
|
|
96
215
|
## Discord Connector
|
|
97
216
|
|
|
98
217
|
Uses `discord.js` over the Discord gateway (no public URL required).
|
|
@@ -105,8 +224,11 @@ connectors:
|
|
|
105
224
|
botToken: ... # Discord bot token
|
|
106
225
|
guildId: ... # optional: only handle messages from this guild
|
|
107
226
|
channelId: ... # optional: only handle messages from this channel
|
|
227
|
+
maxAttachmentMb: 200 # optional: largest attachment downloaded, in MB (default 200)
|
|
108
228
|
```
|
|
109
229
|
|
|
230
|
+
`maxAttachmentMb` applies to messages this instance receives from Discord itself. An instance that receives messages forwarded by a primary (`proxyVia`, see `channelRouting` below) fetches a forwarded attachment only from Discord's CDN over https, at most ten per message and up to 50 MB each, whatever `maxAttachmentMb` says.
|
|
231
|
+
|
|
110
232
|
### Response Gating (`respondTo`)
|
|
111
233
|
|
|
112
234
|
The Discord port of the Slack gate. By default the bot responds to every
|
|
@@ -186,6 +308,60 @@ connectors:
|
|
|
186
308
|
- With `channelRouting`, the *primary* instance's `replyStyle` applies —
|
|
187
309
|
it renders every proxied send.
|
|
188
310
|
|
|
311
|
+
## Commands in Chat
|
|
312
|
+
|
|
313
|
+
A message that starts with `/` is one of three things. This applies to every
|
|
314
|
+
connector (Slack, Discord, Telegram, WhatsApp).
|
|
315
|
+
|
|
316
|
+
- **A gateway command** — answered by the gateway, never sent to the CLI.
|
|
317
|
+
`/new`, `/status`, `/doctor`, `/cron list` and `/goal …` work for anyone
|
|
318
|
+
the connector lets in (they read, or touch only the one conversation). Who
|
|
319
|
+
may use the state-changing ones — `/model <name>`, and
|
|
320
|
+
`/cron run|enable|disable` — depends on whether an operator ID is set
|
|
321
|
+
(`portal.operatorSlackId` / `portal.operatorDiscordId`):
|
|
322
|
+
- **No operator ID set**: they stay open to everyone, on every connector,
|
|
323
|
+
as before.
|
|
324
|
+
- **An operator ID set**: only the operator runs them, and only on a
|
|
325
|
+
platform whose operator ID is configured. From anyone else they reach the
|
|
326
|
+
assistant as an ordinary message instead. A platform with no operator ID
|
|
327
|
+
has no operator: Telegram and WhatsApp always, and Discord while only
|
|
328
|
+
the Slack ID is set (or the reverse). On such an instance nobody can run
|
|
329
|
+
these commands from there — use Slack, Discord or the dashboard for them.
|
|
330
|
+
|
|
331
|
+
(On Slack the model-settings panel has always been operator-only; the text
|
|
332
|
+
command now matches it.)
|
|
333
|
+
- **A Claude Code command the operator may run from chat** —
|
|
334
|
+
`/compact [instructions]`, `/clear`. Passed to the CLI only when the
|
|
335
|
+
sender's platform ID equals `portal.operatorSlackId` (Slack) or
|
|
336
|
+
`portal.operatorDiscordId` (Discord). A display name never counts. If
|
|
337
|
+
neither ID is configured nobody is the operator, and Telegram and WhatsApp
|
|
338
|
+
have no operator at all — so set the ID if you want these from chat.
|
|
339
|
+
- **Anything else** — delivered to the assistant as an ordinary message, with
|
|
340
|
+
a one-line note that it was not run. That includes `/usage` and `/cost`
|
|
341
|
+
(they open a panel that nothing in chat can see), `/logout`, `/login`,
|
|
342
|
+
`/permissions`, `/resume`, `/config`, `/mcp`, `/hooks`, `/agents`,
|
|
343
|
+
`/add-dir`, `/exit` and every other CLI command, from the operator too, and
|
|
344
|
+
any command a later CLI version adds: only the two above are let through.
|
|
345
|
+
Run the others in a terminal on the machine.
|
|
346
|
+
|
|
347
|
+
`/<skill-name>` still works: the assistant reads it and uses the skill.
|
|
348
|
+
|
|
349
|
+
The same holds for a message that starts with `-` or `!`, or that is only
|
|
350
|
+
`exit` or `quit`: it reaches the assistant as text, never the CLI as an
|
|
351
|
+
option, a shell command or a quit. Control characters are removed from chat
|
|
352
|
+
messages.
|
|
353
|
+
|
|
354
|
+
`/logout` is turned off in the Claude CLI the gateway runs: it signs the
|
|
355
|
+
shared account out from under every session, so it is disabled at the source
|
|
356
|
+
rather than left to chance. To log out, use a terminal on the machine. (The
|
|
357
|
+
sign-in command is left on, so the operator can recover from the web live
|
|
358
|
+
terminal.) A turn that runs over SSH on an employee's own machine (`sshHost`)
|
|
359
|
+
uses that machine's CLI, which the gateway does not change.
|
|
360
|
+
|
|
361
|
+
The gateway does not answer "that command is not allowed" — the sender gets
|
|
362
|
+
the assistant's reply to the message. Prompts from the web UI, the API and
|
|
363
|
+
cron jobs are yours and are not affected.
|
|
364
|
+
|
|
189
365
|
## Future Connectors
|
|
190
366
|
|
|
191
367
|
The connector interface is designed for additional platforms:
|
package/template/docs/cron.md
CHANGED
|
@@ -13,7 +13,7 @@ interface CronJob {
|
|
|
13
13
|
kind?: "prompt" | "update-notification" | "command"; // Default: prompt
|
|
14
14
|
maintenance?: { mode: "off" | "review" | "apply" }; // Update notifications; default review
|
|
15
15
|
timezone?: string; // IANA timezone (default: system timezone)
|
|
16
|
-
engine
|
|
16
|
+
engine?: string; // "claude", "codex" or "gemini". Omitted: the employee's engine, else engines.default
|
|
17
17
|
effortLevel?: string; // Per-job reasoning effort for prompt jobs
|
|
18
18
|
command?: { executable: string; args?: string[]; cwd?: string; timeoutSeconds?: number };
|
|
19
19
|
failureDelivery?: { connector: string; channel: string } | null;
|
|
@@ -61,13 +61,21 @@ Examples:
|
|
|
61
61
|
|
|
62
62
|
## Hot Reload
|
|
63
63
|
|
|
64
|
-
The gateway watches `cron/jobs.json
|
|
65
|
-
1.
|
|
66
|
-
2.
|
|
67
|
-
3.
|
|
64
|
+
The gateway watches the directory that holds `cron/jobs.json`, and every 30 seconds compares the file with what is scheduled, in case a change was missed. When the file changes:
|
|
65
|
+
1. The new file is parsed and validated
|
|
66
|
+
2. Jobs that are new or changed are rescheduled, and jobs that were removed or disabled are unscheduled. A job that did not change keeps its registration
|
|
67
|
+
3. If the file cannot be read — invalid JSON, a duplicate id, a file caught half-written, a file that is missing — nothing changes. The jobs registered before stay scheduled, and the gateway logs `Cron reload skipped; keeping previous registrations`
|
|
68
|
+
|
|
69
|
+
A valid empty list `[]` is a change like any other: it unschedules every job. Deleting the file does not.
|
|
68
70
|
|
|
69
71
|
No restart is required. Create and update through the authenticated `/api/cron` API so the running scheduler is reloaded immediately. Direct file edits are for offline recovery, with a backup.
|
|
70
72
|
|
|
73
|
+
The `cron` section of `config.yaml` (`alertConnector`, `alertChannel`, `alertThrottleMinutes`, `defaultDelivery`) and the engine defaults are read each time a job fires. A change to them applies from the next fire, without a restart.
|
|
74
|
+
|
|
75
|
+
## Which Engine a Job Runs On
|
|
76
|
+
|
|
77
|
+
A job that names neither `engine` nor `model` runs on its employee's engine, or on `engines.default`. While that engine's usage limit is on record and a fallback engine can take the job, it starts there straight away, and goes back after the reset. A job that names its `engine` or `model` is taken at its word and is not moved: during the same limit every fire first fails a turn on the named engine, and is switched only then. Name them where the job needs that engine or model, and leave them out otherwise.
|
|
78
|
+
|
|
71
79
|
For `kind: "command"`, the gateway executes `command` without creating an AI session. Legacy prompt/model fields are ignored by this kind. See [Direct command jobs](cron-commands.md) for timeout, output, failure delivery, and lock recovery.
|
|
72
80
|
|
|
73
81
|
## Run Logs
|
|
@@ -76,15 +84,26 @@ Each job execution is logged to `~/.ryoko/cron/runs/<jobId>.jsonl`. Each line is
|
|
|
76
84
|
|
|
77
85
|
```json
|
|
78
86
|
{
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"completedAt": "2026-01-15T09:00:45.000Z",
|
|
87
|
+
"timestamp": "2026-01-15T09:00:00.000Z",
|
|
88
|
+
"sessionKey": "cron:daily-standup:1768467600000",
|
|
89
|
+
"sessionId": "8b1f0c1e-7a52-4a0e-9d55-2f1f5a0c9b11",
|
|
83
90
|
"status": "success",
|
|
84
|
-
"
|
|
91
|
+
"durationMs": 45000,
|
|
92
|
+
"error": null,
|
|
93
|
+
"resultPreview": null
|
|
85
94
|
}
|
|
86
95
|
```
|
|
87
96
|
|
|
97
|
+
`status` is `success`, `error` or `skipped` (with a `reason`). The `kind: "maintenance"` lines an update-notification job writes for its inspection use `notified`, not `success`, once the inspection report has been delivered. A prompt run is an `error`, with the reason in `error`, when its session ended in error, when its result was not delivered (the delivery connector was not running, or refused the message), or when the job names an engine the gateway does not have. It is not a `success` merely because the turn returned. `GET /api/cron/<id>/runs` lists runs oldest first; add `?limit=N` for only the newest N.
|
|
98
|
+
|
|
99
|
+
A prompt run is `skipped`, with `reason: "previous-run-waiting-for-usage-limit"`, when an earlier fire of the same job is still waiting for an engine's usage limit to reset. `waitingSessionId` names the session that is waiting and `resetsAt`, when the wait knows it, the reset it is waiting for. That fire runs the job once when the limit resets; the fires skipped in the meantime are not made up. A job that is simply still running when its next fire comes is not skipped.
|
|
100
|
+
|
|
101
|
+
## Failure Alerts
|
|
102
|
+
|
|
103
|
+
A failed prompt run is always written to the run log, and alerts `cron.alertConnector` / `cron.alertChannel` in `config.yaml` when both are set. While the same failure of a job repeats, the alert is sent once and then held back for `cron.alertThrottleMinutes` (default 60; `0` alerts on every failure). A new reason, or a success in between, alerts again at once. No new alert therefore does not mean the job recovered: check its run log. What was already alerted is kept in memory only, so the first failure after a gateway restart alerts again. Command jobs alert as described in [Direct command jobs](cron-commands.md).
|
|
104
|
+
|
|
105
|
+
When an engine's usage limit will not reset within six hours and no fallback engine can take the job, each fire fails at once instead of waiting, and is logged as an `error` that names the reset. That failure is alerted once per limit period (an engine and the reset it stated) rather than once per `cron.alertThrottleMinutes`; `0` still alerts on every failure. The job's delivery channel is told once per limit period as well, not on every fire. Silence in either place does not mean the job recovered: check its run log.
|
|
106
|
+
|
|
88
107
|
## Delegation Pattern
|
|
89
108
|
|
|
90
109
|
When a cron job produces analytical, reporting, or decision-informing output, it should **always target {{portalSlug}}** (the COO), not the employee directly. {{portalName}} then delegates to the employee via a child session, reviews the output, filters noise, and delivers the final result.
|
|
@@ -125,7 +144,7 @@ When a cron job produces analytical, reporting, or decision-informing output, it
|
|
|
125
144
|
}
|
|
126
145
|
```
|
|
127
146
|
|
|
128
|
-
Direct employee-to-user delivery is only acceptable for simple, no-review-needed tasks (e.g. a health check ping).
|
|
147
|
+
Direct employee-to-user delivery is only acceptable for simple, no-review-needed tasks (e.g. a health check ping). Nothing stops such a job: the gateway only notes in its debug log that the job delivers for an employee other than {{portalSlug}}.
|
|
129
148
|
|
|
130
149
|
## Example Configuration
|
|
131
150
|
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Memory
|
|
2
|
+
|
|
3
|
+
このインスタンスの記憶は `~/.ryoko/` の中にだけ置きます。どのエンジン(Claude Code・Codex・Gemini)で動いても同じ記憶を使い、誰に見せてよいかを gateway が制御するためです。
|
|
4
|
+
|
|
5
|
+
## 2つの層
|
|
6
|
+
|
|
7
|
+
| 層 | 場所 | 読まれ方 |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| 長期記憶 | `MEMORY.md` | gateway が system prompt へ注入する。private な web セッションと、`portal.trustedSpeakers` に ID を載せた相手との DM だけ。共有チャンネル・従業員・定期ジョブには注入しない |
|
|
10
|
+
| 参照記憶 | `knowledge/<topic>.md` | 自動では読まれない。`knowledge/` 直下のファイル名の一覧だけがセッションに渡り(サブフォルダの中は一覧に出ない)、必要なときに検索して読む |
|
|
11
|
+
|
|
12
|
+
`knowledge/` には、話者による公開範囲の制御がありません。どのセッションも、読もうとすれば読めます。所有者個人に関する事実や、特定の相手にしか見せない情報は `MEMORY.md` に置いてください。
|
|
13
|
+
|
|
14
|
+
`MEMORY.md` には、短い事実・好み・決定を1項目1〜3行で書きます。24,000 バイトを超えた分は注入時に切り捨てられるので、長くなる内容は `knowledge/` へ切り出し、`MEMORY.md` には所在を1行残します。日々の出来事は `memory/YYYY-MM-DD.md` に書きます。
|
|
15
|
+
|
|
16
|
+
## エンジン固有の記憶機能を使わない
|
|
17
|
+
|
|
18
|
+
Claude Code には、作業ディレクトリごとに `~/.claude/projects/<作業ディレクトリ>/memory/` へメモを溜め、その索引(`MEMORY.md`)を毎回のセッションに読み込む「自動メモリ」があります。gateway の配下では、これは別の記憶の置き場になり、次の問題を起こします。
|
|
19
|
+
|
|
20
|
+
- Claude のセッションにしか届かない。Codex や Gemini のセッションからは存在が見えない
|
|
21
|
+
- 索引が、話者を問わずすべての Claude セッションに読み込まれる。上の表の公開範囲の制御を通らない
|
|
22
|
+
- 訂正や教訓が `~/.ryoko/` の外に溜まり、バックアップや引き継ぎの対象から漏れる
|
|
23
|
+
|
|
24
|
+
そのため、gateway が起動する Claude では自動メモリを止めます(`CLAUDE_CODE_DISABLE_AUTO_MEMORY=1`)。
|
|
25
|
+
|
|
26
|
+
### 既にメモが溜まっている場合
|
|
27
|
+
|
|
28
|
+
自動メモリのフォルダに Markdown のメモが残っている間は、自動では止めません。止めると、それまで読めていた記憶が黙って見えなくなるためです。gateway は起動時にログへ警告を出します。次の手順で `~/.ryoko/` へ移してください。
|
|
29
|
+
|
|
30
|
+
1. フォルダの場所を確かめる。gateway の警告ログに実際のパスが出る。`~/.ryoko` が `/root/.ryoko` なら `~/.claude/projects/-root--ryoko/memory/`(パスの英数字以外が `-` に置き換わる)。`~/.ryoko` が git リポジトリの中にあるときは、リポジトリのルートのパスから名前が決まる
|
|
31
|
+
2. フォルダを丸ごと退避する。退避先は `~/.ryoko/backups/` 以外にする(そこは gateway のバックアップの保存先で、置いたものは日次のアーカイブに入らない)
|
|
32
|
+
3. メモを仕分ける。所有者個人に関する事実や、特定の相手にしか見せない内容は、要点を `MEMORY.md` へ移す(`knowledge/` は話者を問わず読めるため)。判断がつかないものは、所有者に確認する
|
|
33
|
+
4. 残りのファイル(索引の `MEMORY.md` を除く)を、名前を変えずに `~/.ryoko/knowledge/notes/` へ写す。名前を変えなければ、`[[feedback_...]]` のような名前での参照がそのまま辿れる
|
|
34
|
+
5. 索引を `knowledge/notes/INDEX.md` に作り直す。「いつ読むか」(メールを書く前、資料を作る前、など)の見出しで並べると、必要な節だけ読める
|
|
35
|
+
6. `AGENTS.md` の逆引きに、`knowledge/notes/INDEX.md` への1行を足す。訂正や教訓を新しく受けたときの書き先も、同じフォルダにする
|
|
36
|
+
7. 元のフォルダを `knowledge/notes/` へのシンボリックリンクに置き換える。元のパスを直接書いているジョブや Skill がそのまま動き、gateway は移行済みと判断して自動メモリを止める
|
|
37
|
+
8. Claude と、ほかに使っているエンジンの両方で、移したメモを検索して読めることを確かめる
|
|
38
|
+
|
|
39
|
+
### 設定で明示する
|
|
40
|
+
|
|
41
|
+
```yaml
|
|
42
|
+
engines:
|
|
43
|
+
claude:
|
|
44
|
+
autoMemory: false # 常に止める。true にすると常に有効
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
未設定のときは、メモが残っていなければ止め、残っていれば有効のままにします。
|
|
@@ -4,16 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
## Core Principle
|
|
6
6
|
|
|
7
|
-
**{{portalName}} is a bus, not a brain.** All AI intelligence comes from the engines natively. {{portalName}} adds no custom agentic loop, no prompt engineering layer, no opinions on how AI should behave. It delegates everything to professional tools (Claude Code
|
|
7
|
+
**{{portalName}} is a bus, not a brain.** All AI intelligence comes from the engines natively. {{portalName}} adds no custom agentic loop, no prompt engineering layer, no opinions on how AI should behave. It delegates everything to professional tools (the Claude Code, Codex and Gemini CLIs) and focuses solely on routing, scheduling, and connectivity.
|
|
8
8
|
|
|
9
9
|
## What {{portalName}} Does
|
|
10
10
|
|
|
11
11
|
- **Gateway**: Single Node.js process that accepts messages from multiple sources and routes them to AI engines
|
|
12
|
-
- **Connectors**: Modular input/output adapters (Slack,
|
|
12
|
+
- **Connectors**: Modular input/output adapters (Slack, Discord, Telegram, WhatsApp, and the web UI)
|
|
13
13
|
- **Cron**: Scheduled AI jobs with hot-reloadable configuration
|
|
14
14
|
- **Organization**: Employee personas with departments, ranks, and inter-agent communication via boards
|
|
15
15
|
- **Skills**: Markdown instruction sets that engines read and follow natively
|
|
16
16
|
- **Self-modification**: {{portalName}} can edit its own config, skills, cron jobs, and org structure at runtime
|
|
17
|
+
- **Backups**: A daily archive of the home and copies of the databases, so a file an edit broke can be put back with `ryoko backup restore`
|
|
17
18
|
|
|
18
19
|
## How It Differs from Custom Agentic Frameworks
|
|
19
20
|
|
|
@@ -28,6 +29,7 @@ Traditional approaches build custom tool-calling loops, manage context windows,
|
|
|
28
29
|
registry.db # SQLite session registry
|
|
29
30
|
docs/ # These reference docs
|
|
30
31
|
skills/ # Skill directories with SKILL.md files
|
|
32
|
+
knowledge/ # Reference notes, read on demand
|
|
31
33
|
cron/
|
|
32
34
|
jobs.json # Cron job definitions
|
|
33
35
|
runs/ # Run logs (JSONL)
|
|
@@ -37,4 +39,6 @@ Traditional approaches build custom tool-calling loops, manage context windows,
|
|
|
37
39
|
board.json # Task board
|
|
38
40
|
<name>.yaml # Employee persona
|
|
39
41
|
logs/ # Application logs
|
|
42
|
+
backups/ # Daily backups the gateway writes (see backup.md)
|
|
43
|
+
tmp/ # The gateway's working state — not a cache to clear
|
|
40
44
|
```
|